PageSourceSearch

https://app.goto.com/index.db001cc74c185d56e618.js

js goto.com collected 2026-09-24 08:24:12 UTC 3,503,546 bytes, 5,992 lines download raw bytes

1/*! For license information please see index.db001cc74c185d56e618.js.LICENSE.txt */
2!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,function(){return function(){var e={181:function(){!function(){"use strict";var e,t=!1,r=[],n=!1;function o(){window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))}function i(){window.customElements&&customElements.polyfillWrapFlushCallback&&customElements.polyfillWrapFlushCallback(function(t){e=t,n&&e()})}function s(){window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(window.document),t=!0,a().then(o)}function a(){n=!1;var t=r.map(function(e){return e instanceof Function?e():e});return r=[],Promise.all(t).then(function(){n=!0,e&&e()}).catch(function(e){console.error(e)})}window.WebComponents=window.WebComponents||{},window.WebComponents.ready=window.WebComponents.ready||!1,window.WebComponents.waitFor=window.WebComponents.waitFor||function(e){e&&(r.push(e),t&&a())},window.WebComponents._batchCustomElements=i;var l="webcomponents-loader.js",c=[];(!("attachShadow"in Element.prototype)||!("getRootNode"in Element.prototype)||window.ShadyDOM&&window.ShadyDOM.force)&&c.push("sd"),window.customElements&&!window.customElements.forcePolyfill||c.push("ce");var d,u,h=function(){var e=document.createElement("template");if(!("content"in e))return!0;if(!(e.content.cloneNode()instanceof DocumentFragment))return!0;var t=document.createElement("template");t.content.appendChild(document.createElement("div")),e.content.appendChild(t);var r=e.cloneNode(!0);return 0===r.content.childNodes.length||0===r.content.firstChild.content.childNodes.length}();if(window.Promise&&Array.from&&window.URL&&window.Symbol&&!h||(c=["sd-ce-pf"]),c.length){var p,g=(u={createHTML:d=function(e){return e},createScript:d,createScriptURL:d},window.trustedTypes&&window.trustedTypes.createPolicy("webcomponents-loader",u)||u),f="bundles/webcomponents-"+c.join("-")+".js";if(window.WebComponents.root)p=window.WebComponents.root+f,window.trustedTypes&&window.trustedTypes.isScriptURL(window.WebComponents.root)&&(p=g.createScriptURL(p));else{var m=document.querySelector('script[src*="'+l+'"]');p=g.createScriptURL(m.src.replace(l,f))}var v=document.createElement("script");v.src=p,"loading"===document.readyState?(v.setAttribute("onload",g.createScript("window.WebComponents._batchCustomElements()")),document.write(g.createHTML(v.outerHTML)),document.addEventListener("DOMContentLoaded",s)):(v.addEventListener("load",function(){i(),s()}),v.addEventListener("error",function(){throw new Error("Could not load polyfill bundle"+p)}),document.head.appendChild(v))}else"complete"===document.readyState?(t=!0,o()):(window.addEventListener("load",s),window.addEventListener("DOMContentLoaded",function(){window.removeEventListener("load",s),s()}))}()},260:function(e,t,r){e.exports=function e(t,r,n){function o(s,a){if(!r[s]){if(!t[s]){if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){return o(t[s][1][e]||e)},c,c.exports,e,t,r,n)}return r[s].exports}for(var i=void 0,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,t,r){"use strict";var n=e("./utils"),o=e("./support"),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(e){for(var t,r,o,s,a,l,c,d=[],u=0,h=e.length,p=h,g="string"!==n.getTypeOf(e);u<e.length;)p=h-u,o=g?(t=e[u++],r=u<h?e[u++]:0,u<h?e[u++]:0):(t=e.charCodeAt(u++),r=u<h?e.charCodeAt(u++):0,u<h?e.charCodeAt(u++):0),s=t>>2,a=(3&t)<<4|r>>4,l=1<p?(15&r)<<2|o>>6:64,c=2<p?63&o:64,d.push(i.charAt(s)+i.charAt(a)+i.charAt(l)+i.charAt(c));return d.join("")},r.decode=function(e){var t,r,n,s,a,l,c=0,d=0,u="data:";if(e.substr(0,5)===u)throw new Error("Invalid base64 input, it looks like a data url.");var h,p=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===i.charAt(64)&&p--,e.charAt(e.length-2)===i.charAt(64)&&p--,p%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=o.uint8array?new Uint8Array(0|p):new Array(0|p);c<e.length;)t=i.indexOf(e.charAt(c++))<<2|(s=i.indexOf(e.charAt(c++)))>>4,r=(15&s)<<4|(a=i.indexOf(e.charAt(c++)))>>2,n=(3&a)<<6|(l=i.indexOf(e.charAt(c++))),h[d++]=t,64!==a&&(h[d++]=r),64!==l&&(h[d++]=n);return h}},{"./support":30,"./utils":32}],2:[function(e,t,r){"use strict";var n=e("./external"),o=e("./stream/DataWorker"),i=e("./stream/Crc32Probe"),s=e("./stream/DataLengthProbe");function a(e,t,r,n,o){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=o}a.prototype={getContentWorker:function(){var e=new o(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new o(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(e,t,r){return e.pipe(new i).pipe(new s("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new s("compressedSize")).withStreamInfo("compression",t)},t.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){"use strict";var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){"use strict";var n=e("./utils"),o=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r){var n=o,i=0+r;e^=-1;for(var s=0;s<i;s++)e=e>>>8^n[255&(e^t[s])];return-1^e}(0|t,e,e.length):function(e,t,r){var n=o,i=0+r;e^=-1;for(var s=0;s<i;s++)e=e>>>8^n[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){"use strict";var n;n="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,o=e("pako"),i=e("./utils"),s=e("./stream/GenericWorker"),a=n?"uint8array":"array";function l(e,t){s.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",i.inherits(l,s),l.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(i.transformTo(a,e.data),!1)},l.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)}
vendor: 6,827 bytes, line 2
2,l.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},r.compressWorker=function(e){return new l("Deflate",e)},r.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){"use strict";function n(e,t){var r,n="";for(r=0;r<t;r++)n+=String.fromCharCode(255&e),e>>>=8;return n}function o(e,t,r,o,s,d){var u,h,p=e.file,g=e.compression,f=d!==a.utf8encode,m=i.transformTo("string",d(p.name)),v=i.transformTo("string",a.utf8encode(p.name)),b=p.comment,y=i.transformTo("string",d(b)),w=i.transformTo("string",a.utf8encode(b)),x=v.length!==p.name.length,_=w.length!==b.length,k="",C="",S="",E=p.dir,I=p.date,A={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(A.crc32=e.crc32,A.compressedSize=e.compressedSize,A.uncompressedSize=e.uncompressedSize);var T=0;t&&(T|=8),f||!x&&!_||(T|=2048);var O=0,L=0;E&&(O|=16),"UNIX"===s?(L=798,O|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(p.unixPermissions,E)):(L=20,O|=function(e){return 63&(e||0)}(p.dosPermissions)),u=I.getUTCHours(),u<<=6,u|=I.getUTCMinutes(),u<<=5,u|=I.getUTCSeconds()/2,h=I.getUTCFullYear()-1980,h<<=4,h|=I.getUTCMonth()+1,h<<=5,h|=I.getUTCDate(),x&&(C=n(1,1)+n(l(m),4)+v,k+="up"+n(C.length,2)+C),_&&(S=n(1,1)+n(l(y),4)+w,k+="uc"+n(S.length,2)+S);var $="";return $+="\n\0",$+=n(T,2),$+=g.magic,$+=n(u,2),$+=n(h,2),$+=n(A.crc32,4),$+=n(A.compressedSize,4),$+=n(A.uncompressedSize,4),$+=n(m.length,2),$+=n(k.length,2),{fileRecord:c.LOCAL_FILE_HEADER+$+m+k,dirRecord:c.CENTRAL_FILE_HEADER+n(L,2)+$+n(y.length,2)+"\0\0\0\0"+n(O,4)+n(o,4)+m+k+y}}var i=e("../utils"),s=e("../stream/GenericWorker"),a=e("../utf8"),l=e("../crc32"),c=e("../signature");function d(e,t,r,n){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}i.inherits(d,s),d.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,s.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},d.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=o(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=o(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return c.DATA_DESCRIPTOR+n(e.crc32,4)+n(e.compressedSize,4)+n(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},d.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,o=function(e,t,r,o,s){var a=i.transformTo("string",s(o));return c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(e,2)+n(e,2)+n(t,4)+n(r,4)+n(a.length,2)+a}(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:o,meta:{percent:100}})},d.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},d.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(e){t.error(e)}),this},d.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},d.prototype.error=function(e){var t=this._sources;if(!s.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch(e){}return!0},d.prototype.lock=function(){s.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=d},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){"use strict";var n=e("../compressions"),o=e("./ZipFileWorker");r.generateWorker=function(e,t,r){var i=new o(t.streamFiles,r,t.platform,t.encodeFileName),s=0;try{e.forEach(function(e,r){s++;var o=function(e,t){var r=e||t,o=n[r];if(!o)throw new Error(r+" is not a valid compression method !");return o}(r.options.compression,t.compression),a=r.options.compressionOptions||t.compressionOptions||{},l=r.dir,c=r.date;r._compressWorker(o,a).withStreamInfo("file",{name:e,dir:l,date:c,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(i)}),i.entriesCount=s}catch(e){i.error(e)}return i}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new n;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(n.prototype=e("./object")).loadAsync=e("./load"),n.support=e("./support"),n.defaults=e("./defaults"),n.version="3.10.1",n.loadAsync=function(e,t){return(new n).loadAsync(e,t)},n.external=e("./external"),t.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,r){"use strict";var n=e("./utils"),o=e("./external"),i=e("./utf8"),s=e("./zipEntries"),a=e("./stream/Crc32Probe"),l=e("./nodejsUtils");function c(e){return new o.Promise(function(t,r){var n=e.decompressed.getContentWorker().pipe(new a);n.on("error",function(e){r(e)}).on("end",function(){n.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t()}).resume()})}t.exports=function(e,t){var r=this;return t=n.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:i.utf8decode}),l.isNode&&l.isStream(e)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):n.prepareContent("the loaded zip f
2ile",e,!0,t.optimizedBinaryString,t.base64).then(function(e){var r=new s(t);return r.load(e),r}).then(function(e){var r=[o.Promise.resolve(e)],n=e.files;if(t.checkCRC32)for(var i=0;i<n.length;i++)r.push(c(n[i]));return o.Promise.all(r)}).then(function(e){for(var o=e.shift(),i=o.files,s=0;s<i.length;s++){var a=i[s],l=a.fileNameStr,c=n.resolve(a.fileNameStr);r.file(c,a.decompressed,{binary:!0,optimizedBinaryString:!0,date:a.date,dir:a.dir,comment:a.fileCommentStr.length?a.fileCommentStr:null,unixPermissions:a.unixPermissions,dosPermissions:a.dosPermissions,createFolders:t.createFolders}),a.dir||(r.file(c).unsafeOriginalName=l)}return o.zipComment.length&&(r.comment=o.zipComment),r})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,r){"use strict";var n=e("../utils"),o=e("../stream/GenericWorker");function i(e,t){o.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}n.inherits(i,o),i.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",function(e){t.push({data:e,meta:{percent:0}})}).on("error",function(e){t.isPaused?this.generatedError=e:t.error(e)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})},i.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},i.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=i},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,r){"use strict";var n=e("readable-stream").Readable;function o(e,t,r){n.call(this,t),this._helper=e;var o=this;e.on("data",function(e,t){o.push(e)||o._helper.pause(),r&&r(t)}).on("error",function(e){o.emit("error",e)}).on("end",function(){o.push(null)})}e("../utils").inherits(o,n),o.prototype._read=function(){this._helper.resume()},t.exports=o},{"../utils":32,"readable-stream":16}],14:[function(e,t,r){"use strict";t.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,r){"use strict";function n(e,t,r){var n,o=i.getTypeOf(t),a=i.extend(r||{},l);a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),"string"==typeof a.unixPermissions&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&16384&a.unixPermissions&&(a.dir=!0),a.dosPermissions&&16&a.dosPermissions&&(a.dir=!0),a.dir&&(e=f(e)),a.createFolders&&(n=g(e))&&m.call(this,n,!0);var u="string"===o&&!1===a.binary&&!1===a.base64;r&&void 0!==r.binary||(a.binary=!u),(t instanceof c&&0===t.uncompressedSize||a.dir||!t||0===t.length)&&(a.base64=!1,a.binary=!0,t="",a.compression="STORE",o="string");var v;v=t instanceof c||t instanceof s?t:h.isNode&&h.isStream(t)?new p(e,t):i.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var b=new d(e,v,a);this.files[e]=b}var o=e("./utf8"),i=e("./utils"),s=e("./stream/GenericWorker"),a=e("./stream/StreamHelper"),l=e("./defaults"),c=e("./compressedObject"),d=e("./zipObject"),u=e("./generate"),h=e("./nodejsUtils"),p=e("./nodejs/NodejsStreamInputAdapter"),g=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},f=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},m=function(e,t){return t=void 0!==t?t:l.createFolders,e=f(e),this.files[e]||n.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function v(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var b={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)n=this.files[t],(r=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(r,n)},filter:function(e){var t=[];
vendor: 4,152 bytes, line 2
2return this.forEach(function(r,n){e(r,n)&&t.push(n)}),t},file:function(e,t,r){if(1!==arguments.length)return e=this.root+e,n.call(this,e,t,r),this;if(v(e)){var o=e;return this.filter(function(e,t){return!t.dir&&o.test(e)})}var i=this.files[this.root+e];return i&&!i.dir?i:null},folder:function(e){if(!e)return this;if(v(e))return this.filter(function(t,r){return r.dir&&e.test(t)});var t=this.root+e,r=m.call(this,t),n=this.clone();return n.root=r.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter(function(t,r){return r.name.slice(0,e.length)===e}),n=0;n<r.length;n++)delete this.files[r[n].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if((r=i.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");i.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var n=r.comment||this.comment||"";t=u.generateWorker(this,r,n)}catch(e){(t=new s("error")).error(e)}return new a(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=b},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,r){"use strict";t.exports=e("stream")},{stream:void 0}],17:[function(e,t,r){"use strict";var n=e("./DataReader");function o(e){n.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(o,n),o.prototype.byteAt=function(e){return this.data[this.zero+e]},o.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),o=e.charCodeAt(3),i=this.length-4;0<=i;--i)if(this.data[i]===t&&this.data[i+1]===r&&this.data[i+2]===n&&this.data[i+3]===o)return i-this.zero;return-1},o.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),o=e.charCodeAt(3),i=this.readData(4);return t===i[0]&&r===i[1]&&n===i[2]&&o===i[3]},o.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=o},{"../utils":32,"./DataReader":18}],18:[function(e,t,r){"use strict";var n=e("../utils");function o(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,r=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=o},{"../utils":32}],19:[function(e,t,r){"use strict";var n=e("./Uint8ArrayReader");function o(e){n.call(this,e)}e("../utils").inherits(o,n),o.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t}
vendor: 2,405 bytes, line 2
2,t.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){"use strict";var n=e("./DataReader");function o(e){n.call(this,e)}e("../utils").inherits(o,n),o.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},o.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},o.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},o.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=o},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){"use strict";var n=e("./ArrayReader");function o(e){n.call(this,e)}e("../utils").inherits(o,n),o.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){"use strict";var n=e("../utils"),o=e("../support"),i=e("./ArrayReader"),s=e("./StringReader"),a=e("./NodeBufferReader"),l=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||o.uint8array?"nodebuffer"===t?new a(e):o.uint8array?new l(n.transformTo("uint8array",e)):new i(n.transformTo("array",e)):new s(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){"use strict";r.LOCAL_FILE_HEADER="PK��",r.CENTRAL_FILE_HEADER="PK��",r.CENTRAL_DIRECTORY_END="PK��",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK��",r.ZIP64_CENTRAL_DIRECTORY_END="PK��",r.DATA_DESCRIPTOR="PK�\b"},{}],24:[function(e,t,r){"use strict";var n=e("./GenericWorker"),o=e("../utils");function i(e){n.call(this,"ConvertWorker to "+e),this.destType=e}o.inherits(i,n),i.prototype.processChunk=function(e){this.push({data:o.transformTo(this.destType,e.data),meta:e.meta})},t.exports=i},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){"use strict";var n=e("./GenericWorker"),o=e("../crc32");function i(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(i,n),i.prototype.processChunk=function(e){this.streamInfo.crc32=o(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=i},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){"use strict";var n=e("../utils"),o=e("./GenericWorker");
vendor: 7,081 bytes, line 2
2function i(e){o.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(i,o),i.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}o.prototype.processChunk.call(this,e)},t.exports=i},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){"use strict";var n=e("../utils"),o=e("./GenericWorker");function i(e){o.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}n.inherits(i,o),i.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},i.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},i.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},i.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=i},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){"use strict";function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.end()}),e.on("error",function(e){t.error(e)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=n},{}],29:[function(e,t,r){"use strict";var n=e("../utils"),o=e("./ConvertWorker"),i=e("./GenericWorker"),s=e("../base64"),a=e("../support"),l=e("../external"),c=null;if(a.nodestream)try{c=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function d(e,t,r){var s=t;switch(t){case"blob":case"arraybuffer":s="uint8array";break;case"base64":s="string"}try{this._internalType=s,this._outputType=t,this._mimeType=r,n.checkSupport(s),this._worker=e.pipe(new o(s)),e.lock()}catch(e){this._worker=new i("error"),this._worker.error(e)}}d.prototype={accumulate:function(e){return function(e,t){return new l.Promise(function(r,o){var i=[],a=e._internalType,l=e._outputType,c=e._mimeType;e.on("data",function(e,r){i.push(e),t&&t(r)}).on("error",function(e){i=[],o(e)}).on("end",function(){try{var e=function(e,t,r){switch(e){case"blob":return n.newBlob(n.transformTo("arraybuffer",t),r);case"base64":return s.encode(t);default:return n.transformTo(e,t)}}(l,function(e,t){var r,n=0,o=null,i=0;for(r=0;r<t.length;r++)i+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(o=new Uint8Array(i),r=0;r<t.length;r++)o.set(t[r],n),n+=t[r].length;return o;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(a,i),c);r(e)}catch(e){o(e)}i=[]}).resume()})}(this,e)},on:function(e,t){var r=this;return"data"===e?this._worker.on(e,function(e){t.call(r,e.data,e.meta)}):this._worker.on(e,function(){n.delay(t,arguments,r)}),this},resume:function(){return n.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(n.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new c(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=d},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,r){"use strict";if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof Buffer,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var n=new ArrayBuffer(0);try{r.blob=0===new Blob([n],{type:"application/zip"}).size}catch(e){try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(n),r.blob=0===o.getBlob("application/zip").size}catch(e){r.blob=!1}}}try{r.nodestream=!!e("readable-stream").Readable}catch(e){r.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,r){"use strict";for(var n=e("./utils"),o=e("./support"),i=e("./nodejsUtils"),s=e("./stream/GenericWorker"),a=new Array(256),l=0;l<256;l++)a[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function c(){s.call(this,"utf-8 decode"),this.leftOver=null}function d(){s.call(this,"utf-8 encode")}a[254]=a[254]=1,r.utf8encode=function(e){return o.nodebuffer?i.newBufferFrom(e,"utf-8"):function(e){var t,r,n,i,s,a=e.length,l=0;for(i=0;i<a;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),l
vendor: 8,827 bytes, line 2
2+=r<128?1:r<2048?2:r<65536?3:4;for(t=o.uint8array?new Uint8Array(l):new Array(l),i=s=0;s<l;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t}(e)},r.utf8decode=function(e){return o.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,o,i,s=e.length,l=new Array(2*s);for(t=r=0;t<s;)if((o=e[t++])<128)l[r++]=o;else if(4<(i=a[o]))l[r++]=65533,t+=i-1;else{for(o&=2===i?31:3===i?15:7;1<i&&t<s;)o=o<<6|63&e[t++],i--;1<i?l[r++]=65533:o<65536?l[r++]=o:(o-=65536,l[r++]=55296|o>>10&1023,l[r++]=56320|1023&o)}return l.length!==r&&(l.subarray?l=l.subarray(0,r):l.length=r),n.applyFromCharCode(l)}(e=n.transformTo(o.uint8array?"uint8array":"array",e))},n.inherits(c,s),c.prototype.processChunk=function(e){var t=n.transformTo(o.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var i=t;(t=new Uint8Array(i.length+this.leftOver.length)).set(this.leftOver,0),t.set(i,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var s=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+a[e[r]]>t?r:t}(t),l=t;s!==t.length&&(o.uint8array?(l=t.subarray(0,s),this.leftOver=t.subarray(s,t.length)):(l=t.slice(0,s),this.leftOver=t.slice(s,t.length))),this.push({data:r.utf8decode(l),meta:e.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=c,n.inherits(d,s),d.prototype.processChunk=function(e){this.push({data:r.utf8encode(e.data),meta:e.meta})},r.Utf8EncodeWorker=d},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,r){"use strict";var n=e("./support"),o=e("./base64"),i=e("./nodejsUtils"),s=e("./external");function a(e){return e}function l(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}e("setimmediate"),r.newBlob=function(e,t){r.checkSupport("blob");try{return new Blob([e],{type:t})}catch(r){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(e),n.getBlob(t)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var c={stringifyByChunk:function(e,t,r){var n=[],o=0,i=e.length;if(i<=r)return String.fromCharCode.apply(null,e);for(;o<i;)"array"===t||"nodebuffer"===t?n.push(String.fromCharCode.apply(null,e.slice(o,Math.min(o+r,i)))):n.push(String.fromCharCode.apply(null,e.subarray(o,Math.min(o+r,i)))),o+=r;return n.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&1===String.fromCharCode.apply(null,i.allocBuffer(1)).length}catch(e){return!1}}()}};function d(e){var t=65536,n=r.getTypeOf(e),o=!0;if("uint8array"===n?o=c.applyCanBeUsed.uint8array:"nodebuffer"===n&&(o=c.applyCanBeUsed.nodebuffer),o)for(;1<t;)try{return c.stringifyByChunk(e,n,t)}catch(e){t=Math.floor(t/2)}return c.stringifyByChar(e)}function u(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}r.applyFromCharCode=d;var h={};h.string={string:a,array:function(e){return l(e,new Array(e.length))},arraybuffer:function(e){return h.string.uint8array(e).buffer},uint8array:function(e){return l(e,new Uint8Array(e.length))},nodebuffer:function(e){return l(e,i.allocBuffer(e.length))}},h.array={string:d,array:a,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return i.newBufferFrom(e)}},h.arraybuffer={string:function(e){return d(new Uint8Array(e))},array:function(e){return u(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:a,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return i.newBufferFrom(new Uint8Array(e))}},h.uint8array={string:d,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:a,nodebuffer:function(e){return i.newBufferFrom(e)}},h.nodebuffer={string:d,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return h.nodebuffer.uint8array(e).buffer},uint8array:function(e){return u(e,new Uint8Array(e.length))},nodebuffer:a},r.transformTo=function(e,t){if(t=t||"",!e)return t;r.checkSupport(e);var n=r.getTypeOf(t);return h[n][e](t)},r.resolve=function(e){for(var t=e.split("/"),r=[],n=0;n<t.length;n++){var o=t[n];"."===o||""===o&&0!==n&&n!==t.length-1||(".."===o?r.pop():r.push(o))}return r.join("/")},r.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":n.nodebuffer&&i.isBuffer(e)?"nodebuffer":n.uint8array&&e instanceof Uint8Array?"uint8array":n.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(e){if(!n[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(e){var t,r,n="";for(r=0;r<(e||"").length;r++)n+="\\x"+((t=e.charCodeAt(r))<16?"0":"")+t.toString(16).toUpperCase();return n},r.delay=function(e,t,r){setImmediate(function(){e.apply(r||null,t||[])})},r.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r},r.extend=function(){var e,t,r={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===r[t]&&(r[t]=arguments[e][t]);return r},r.prepareContent=function(e,t,i,a,c){return s.Promise.resolve(t).then(function(e){return n.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new s.Promise(function(t,r){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=function(e){r(e.target.error)},n.readAsArrayBuffer(e)}):e}).then(function(t){var d=r.getTypeOf(t);return d?("arraybuffer"===d?t=r.transformTo("uint8array",t):"string"===d&&(c?t=o.decode(t):i&&!0!==a&&(t=function(e){return l(e,n.uint8array?new Uint8Array(e.length):new Array(e.length))}(t))),t):s.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,r){"use strict";var n=e("./reader/readerFor"),o=e("./utils"),i=e("./signature"),s=e("./zipEntry"),a=e("./support");function l(e){this.files=[],this.loadOptions=e}l.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(t)+", expected "+o.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4)===t;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=a.uint8array?"uint8array":"array",r=o.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,r,n=this.zip64EndOfCentralSize-44;0<n;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(i.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;
vendor: 4,656 bytes, line 2
2for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(i.CENTRAL_FILE_HEADER);)(e=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(i.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,i.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(i.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,i.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=t-r;if(0<n)this.isSignature(t,i.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=l},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,r){"use strict";var n=e("./reader/readerFor"),o=e("./utils"),i=e("./compressedObject"),s=e("./crc32"),a=e("./utf8"),l=e("./compressions"),c=e("./support");function d(e,t){this.options=e,this.loadOptions=t}d.prototype={isEncrypted:function(){return!(1&~this.bitFlag)},useUTF8:function(){return!(2048&~this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in l)if(Object.prototype.hasOwnProperty.call(l,t)&&l[t].magic===e)return l[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new i(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=n(this.extraFields[1].value);
vendor: 2,537 bytes, line 2
2this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,r,n,o=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<o;)t=e.readInt(2),r=e.readInt(2),n=e.readData(r),this.extraFields[t]={id:t,length:r,value:n};e.setIndex(o)},handleUTF8:function(){var e=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var r=o.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var i=o.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(i)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=n(e.value);return 1!==t.readInt(1)||s(this.fileName)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=n(e.value);return 1!==t.readInt(1)||s(this.fileComment)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null}},t.exports=d},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,r){"use strict";function n(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}}var o=e("./stream/StreamHelper"),i=e("./stream/DataWorker"),s=e("./utf8"),a=e("./compressedObject"),l=e("./stream/GenericWorker");n.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var n="string"===(r=e.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker();var i=!this._dataBinary;i&&!n&&(t=t.pipe(new s.Utf8EncodeWorker)),!i&&n&&(t=t.pipe(new s.Utf8DecodeWorker))}catch(e){(t=new l("error")).error(e)}return new o(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)}
vendor: 11,878 bytes, line 2
2,nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof a&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new s.Utf8EncodeWorker)),a.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof l?this._data:new i(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],d=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},u=0;u<c.length;u++)n.prototype[c[u]]=d;t.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,n){(function(e){"use strict";var r,n,o=e.MutationObserver||e.WebKitMutationObserver;if(o){var i=0,s=new o(d),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),r=function(){a.data=i=++i%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){d(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(d,0)};else{var l=new e.MessageChannel;l.port1.onmessage=d,r=function(){l.port2.postMessage(0)}}var c=[];function d(){var e,t;n=!0;for(var r=c.length;r;){for(t=c,c=[],e=-1;++e<r;)t[e]();r=c.length}n=!1}t.exports=function(e){1!==c.push(e)||n||r()}}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,r){"use strict";var n=e("immediate");function o(){}var i={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==o&&p(this,e)}function d(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function u(e,t,r){n(function(){var n;try{n=t(r)}catch(n){return i.reject(e,n)}n===e?i.reject(e,new TypeError("Cannot resolve promise with itself")):i.resolve(e,n)})}function h(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function p(e,t){var r=!1;function n(t){r||(r=!0,i.reject(e,t))}function o(t){r||(r=!0,i.resolve(e,t))}var s=g(function(){t(o,n)});"error"===s.status&&n(s.value)}function g(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}(t.exports=c).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){throw r})})},c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var r=new this.constructor(o);return this.state!==l?u(r,this.state===a?e:t,this.outcome):this.queue.push(new d(r,e,t)),r},d.prototype.callFulfilled=function(e){i.resolve(this.promise,e)},d.prototype.otherCallFulfilled=function(e){u(this.promise,this.onFulfilled,e)},d.prototype.callRejected=function(e){i.reject(this.promise,e)},d.prototype.otherCallRejected=function(e){u(this.promise,this.onRejected,e)},i.resolve=function(e,t){var r=g(h,t);if("error"===r.status)return i.reject(e,r.value);var n=r.value;if(n)p(e,n);else{e.state=a,e.outcome=t;for(var o=-1,s=e.queue.length;++o<s;)e.queue[o].callFulfilled(t)}return e},i.reject=function(e,t){e.state=s,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:i.resolve(new this(o),e)},c.reject=function(e){var t=new this(o);return i.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var s=new Array(r),a=0,l=-1,c=new this(o);++l<r;)d(e[l],l);return c;function d(e,o){t.resolve(e).then(function(e){s[o]=e,++a!==r||n||(n=!0,i.resolve(c,s))},function(e){n||(n=!0,i.reject(c,e))})}},c.race=function(e){if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var t=e.length,r=!1;if(!t)return this.resolve([]);for(var n,s=-1,a=new this(o);++s<t;)n=e[s],this.resolve(n).then(function(e){r||(r=!0,i.resolve(a,e))},function(e){r||(r=!0,i.reject(a,e))});return a}},{immediate:36}],38:[function(e,t,r){"use strict";var n={};(0,e("./lib/utils/common").assign)(n,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=n},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,r){"use strict";var n=e("./zlib/deflate"),o=e("./utils/common"),i=e("./utils/strings"),s=e("./zlib/messages"),a=e("./zlib/zstream"),l=Object.prototype.toString;function c(e){if(!(this instanceof c))return new c(e);this.options=o.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==r)throw new Error(s[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var d;if(d="string"==typeof t.dictionary?i.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(r=n.deflateSetDictionary(this.strm,d)))throw new Error(s[r]);this._dict_set=!0}}function d(e,t){var r=new c(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}c.prototype.push=function(e,t){var r,s,a=this.strm,c=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=i.string2buf(e):"[object ArrayBuffer]"===l.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new o.Buf8(c),a.next_out=0,a.avail_out=c),1!==(r=n.deflate(a,s))&&0!==r)return this.onEnd(r),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(i.buf2binstring(o.shrinkBuf(a.output,a.next_out))):this.onData(o.shrinkBuf(a.output,a.next_out)))}while((0<a.avail_in||0===a.avail_out)&&1!==r);return 4===s?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==s||(this.onEnd(0),!(a.avail_out=0))},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Deflate=c,r.deflate=d,r.deflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},r.gzip=function(e,t){return(t=t||{}).gzip=!0,d(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,r){"use strict";var n=e("./zlib/inflate"),o=e("./utils/common"),i=e("./utils/strings"),s=e("./zlib/constants"),a=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),d=Object.prototype.toString;function u(e){if(!(this instanceof u))return new u(e);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&!(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==s.Z_OK)throw new Error(a[r]);this.header=new c,n.inflateGetHeader(this.strm,this.header)}function h(e,t){var r=new u(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}u.prototype.push=function(e,t){var r,a,l,c,u,h,p=this.strm,g=this.options.chunkSize,f=this.options.dictionary,m=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof e?p.input=i.binstring2buf(e):"[object ArrayBuffer]"===d.call(e)?p.input=new Uint8Array(e):p.input=e,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new o.Buf8(g),p.next_out=0,p.avail_out=g),(r=n.inflate(p,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&f&&(h="string"==typeof f?i.string2buf(f):"[object ArrayBuffer]"===d.call(f)?new Uint8Array(f):f,r=n.inflateSetDictionary(this.strm,h)),r===s.Z_BUF_ERROR&&!0===m&&(r=s.Z_OK,m=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),!(this.ended=!0);p.next_out&&(0!==p.avail_out&&r!==s.Z_STREAM_END&&(0!==p.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(l=i.utf8border(p.output,p.next_out),c=p.next_out-l,u=i.buf2string(p.output,l),p.next_out=c,p.avail_out=g-c,c&&o.arraySet(p.output,p.output,l,c,0),this.onData(u)):this.onData(o.shrinkBuf(p.output,p.next_out)))),0===p.avail_in&&0===p.avail_out&&(m=!0)}while((0<p.avail_in||0===p.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(p.avail_out=0))},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){e===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=u,r.inflate=h,r.inflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},r.ungzip=h},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,r,n,o){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),o);else for(var i=0;i<n;i++)e[o+i]=t[r+i]},flattenChunks:function(e){var t,r,n,o,i,s;for(t=n=0,r=e.length;t<r;t++)n+=e[t].length;for(s=new Uint8Array(n),t=o=0,r=e.length;t<r;t++)i=e[t],s.set(i,o),o+=i.length;return s}},i={arraySet:function(e,t,r,n,o){for(var i=0;i<n;i++)e[o+i]=t[r+i]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,o)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,i))},r.setTyped(n)},{}],42:[function(e,t,r){"use strict";var n=e("./common"),o=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch(e){o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){i=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function l(e,t){if(t<65537&&(e.subarray&&i||!e.subarray&&o))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",s=0;s<t;s++)r+=String.fromCharCode(e[s]);return r}s[254]=s[254]=1,r.string2buf=function(e){var t,r,o,i,s,a=e.length,l=0;for(i=0;i<a;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(o=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(o-56320),i++),l
vendor: 13,193 bytes, line 2
2+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(l),i=s=0;s<l;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(o=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(o-56320),i++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t},r.buf2binstring=function(e){return l(e,e.length)},r.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,o=t.length;r<o;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,n,o,i,a=t||e.length,c=new Array(2*a);for(r=n=0;r<a;)if((o=e[r++])<128)c[n++]=o;else if(4<(i=s[o]))c[n++]=65533,r+=i-1;else{for(o&=2===i?31:3===i?15:7;1<i&&r<a;)o=o<<6|63&e[r++],i--;1<i?c[n++]=65533:o<65536?c[n++]=o:(o-=65536,c[n++]=55296|o>>10&1023,c[n++]=56320|1023&o)}return l(c,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){for(var o=65535&e,i=e>>>16&65535,s=0;0!==r;){for(r-=s=2e3<r?2e3:r;i=i+(o=o+t[n++]|0)|0,--s;);o%=65521,i%=65521}return o|i<<16}},{}],44:[function(e,t,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,r){"use strict";var n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,o){var i=n,s=o+r;e^=-1;for(var a=o;a<s;a++)e=e>>>8^i[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,r){"use strict";var n,o=e("../utils/common"),i=e("./trees"),s=e("./adler32"),a=e("./crc32"),l=e("./messages"),c=-2,d=258,u=262,h=113;function p(e,t){return e.msg=l[t],t}function g(e){return(e<<1)-(4<e?9:0)}function f(e){for(var t=e.length;0<=--t;)e[t]=0}function m(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(o.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function v(e,t){i._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,m(e.strm)}function b(e,t){e.pending_buf[e.pending++]=t}function y(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function w(e,t){var r,n,o=e.max_chain_length,i=e.strstart,s=e.prev_length,a=e.nice_match,l=e.strstart>e.w_size-u?e.strstart-(e.w_size-u):0,c=e.window,h=e.w_mask,p=e.prev,g=e.strstart+d,f=c[i+s-1],m=c[i+s];e.prev_length>=e.good_match&&(o>>=2),a>e.lookahead&&(a=e.lookahead);do{if(c[(r=t)+s]===m&&c[r+s-1]===f&&c[r]===c[i]&&c[++r]===c[i+1]){i+=2,r++;do{}while(c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&i<g);if(n=d-(g-i),i=g-d,s<n){if(e.match_start=t,a<=(s=n))break;f=c[i+s-1],m=c[i+s]}}}while((t=p[t&h])>l&&0!=--o);return s<=e.lookahead?s:e.lookahead}function x(e){var t,r,n,i,l,c,d,h,p,g,f=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-u)){for(o.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=r=e.hash_size;n=e.head[--t],e.head[t]=f<=n?n-f:0,--r;);for(t=r=f;n=e.prev[--t],e.prev[t]=f<=n?n-f:0,--r;);i+=f}if(0===e.strm.avail_in)break;if(c=e.strm,d=e.window,h=e.strstart+e.lookahead,g=void 0,(p=i)<(g=c.avail_in)&&(g=p),r=0===g?0:(c.avail_in-=g,o.arraySet(d,c.input,c.next_in,g,h),1===c.state.wrap?c.adler=s(c.adler,d,g,h):2===c.state.wrap&&(c.adler=a(c.adler,d,g,h)),c.next_in+=g,c.total_in+=g,g),e.lookahead+=r,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+3-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<u&&0!==e.strm.avail_in)}function _(e,t){for(var r,n;;){if(e.lookahead<u){if(x(e),e.lookahead<u&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-u&&(e.match_length=w(e,r)),e.match_length>=3)if(n=i._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}function k(e,t){for(var r,n,o;;){if(e.lookahead<u){if(x(e),e.lookahead<u&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-u&&(e.match_length=w(e,r),e.match_length<=5&&(1===e.strategy||3===e.match_length&&4096<e.strstart-e.match_start)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){for(o=e.strstart+e.lookahead-3,n=i._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(v(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=i._tr_tally(e,0,e.window[e.strstart-1]))&&v(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=i._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}function C(e,t,r,n,o){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=o}function S(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(1146),this.dyn_dtree=new o.Buf16(122),this.bl_tree=new o.Buf16(78),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(16),this.heap=new o.Buf16(573),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(573),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function E(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:h,e.adler=2===t.wrap?0:1,t.last_flush=0,i._tr_init(t),0):p(e,c)}function I(e){var t=E(e);return 0===t&&function(e){e.window_size=2*e.w_size,f(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0}(e.state),t}function A(e,t,r,n,i,s){if(!e)return c;var a=1;if(-1===t&&(t=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),i<1||9<i||8!==r||n<8||15<n||t<0||9<t||s<0||4<s)return p(e,c);8===n&&(n=9);var l=new S;return(e.state=l).strm=e,l.wrap=a,l.gzhead=null,l.w_bits=n,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=i+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new o.Buf8(2*l.w_size),l.head=new o.Buf16(l.hash_size),l.prev=new o.Buf16(l.w_size),l.lit_bufsize=1<<i+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new o.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=s,l.method=r,I(e)}n=[new C(0,0,0,0,function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(x(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,v(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-u&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(v(e,!1),e.strm.avail_out),1)}),new C(4,4,8,4,_),new C(4,5,16,8,_),new C(4,6,32,32,_),new C(4,4,16,16,k),new C(8,16,32,32,k),new C(8,16,128,128,k),new C(8,32,128,256,k),new C(32,128,258,1024,k),new C(32,258,258,4096,k)],r.deflateInit=function(e,t){return A(e,t,8,15,8,0)},r.deflateInit2=A,r.deflateReset=I,r.deflateResetKeep=E,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?c:(e.state.gzhead=t,0):c},r.deflate=function(e,t){var r,o,s,l;if(!e||!e.state||5<t||t<0)return e?p(e,c):c;if(o=e.state,!e.output||!e.input&&0!==e.avail_in||666===o.status&&4!==t)return p(e,0===e.avail_out?-5:c);if(o.strm=e,r=o.last_flush,o.last_flush=t,42===o.status)if(2===o.wrap)e.adler=0,b(o,31),b(o,139),b(o,8),o.gzhead?(b(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),b(o,255&o.gzhead.time),b(o,o.gzhead.time>>8&255),b(o,o.gzhead.time>>16&255),b(o,o.gzhead.time>>24&255),b(o,9===o.level?2:2<=o.strategy||o.level<2?4:0),b(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(b(o,255&o.gzhead.extra.length),b(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=a(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(b(o,0),b(o,0),b(o,0),b(o,0),b(o,0),b(o,9===o.level?2:2<=o.strategy||o.level<2?4:0),b(o,3),o.status=h);else{var u=8+(o.w_bits-8<<4)<<8;u|=(2<=o.strategy||o.level<2?0:o.level<6?1:6===o.level?2:3)<<6,0!==o.strstart&&(u|=32),u+=31-u%31,o.status=h,y(o,u),0!==o.strstart&&(y(o,e.adler>>>16),y(o,65535&e.adler)),e.adler=1}if(69===o.status)if(o.gzhead.extra){for(s=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),m(e),s=o.pending,o.pending!==o.pending_buf_size));)b(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){s=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),m(e),s=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,b(o,l)}while(0!==l);o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),0===l&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){s=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),m(e),s=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,b(o,l)}while(0!==l);o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),0===l&&(o.status=103)}else o.status=103;if(103===o.status&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&m(e),o.pending+2<=o.pending_buf_size&&(b(o,255&e.adler),b(o,e.adler>>8&255),e.adler=0,o.status=h)):o.status=h),0!==o.pending){if(m(e),0===e.avail_out)return o.last_flush=-1,0}else if(0===e.avail_in&&g(t)<=g(r)&&4!==t)return p(e,-5);if(666===o.status&&0!==e.avail_in)return p(e,-5);if(0!==e.avail_in||0!==o.lookahead||0!==t&&666!==o.status){var w=2===o.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(x(e),0===e.lookahead)){if(0===t)return 1;break}
vendor: 6,086 bytes, line 2
2if(e.match_length=0,r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}(o,t):3===o.strategy?function(e,t){for(var r,n,o,s,a=e.window;;){if(e.lookahead<=d){if(x(e),e.lookahead<=d&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&0<e.strstart&&(n=a[o=e.strstart-1])===a[++o]&&n===a[++o]&&n===a[++o]){s=e.strstart+d;do{}while(n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&o<s);e.match_length=d-(s-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=i._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}(o,t):n[o.level].func(o,t);if(3!==w&&4!==w||(o.status=666),1===w||3===w)return 0===e.avail_out&&(o.last_flush=-1),0;if(2===w&&(1===t?i._tr_align(o):5!==t&&(i._tr_stored_block(o,0,0,!1),3===t&&(f(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),m(e),0===e.avail_out))return o.last_flush=-1,0}return 4!==t?0:o.wrap<=0?1:(2===o.wrap?(b(o,255&e.adler),b(o,e.adler>>8&255),b(o,e.adler>>16&255),b(o,e.adler>>24&255),b(o,255&e.total_in),b(o,e.total_in>>8&255),b(o,e.total_in>>16&255),b(o,e.total_in>>24&255)):(y(o,e.adler>>>16),y(o,65535&e.adler)),m(e),0<o.wrap&&(o.wrap=-o.wrap),0!==o.pending?0:1)},r.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&t!==h&&666!==t?p(e,c):(e.state=null,t===h?p(e,-3):0):c},r.deflateSetDictionary=function(e,t){var r,n,i,a,l,d,u,h,p=t.length;if(!e||!e.state)return c;if(2===(a=(r=e.state).wrap)||1===a&&42!==r.status||r.lookahead)return c;for(1===a&&(e.adler=s(e.adler,t,p,0)),r.wrap=0,p>=r.w_size&&(0===a&&(f(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new o.Buf8(r.w_size),o.arraySet(h,t,p-r.w_size,r.w_size,0),t=h,p=r.w_size),l=e.avail_in,d=e.next_in,u=e.input,e.avail_in=p,e.next_in=0,e.input=t,x(r);r.lookahead>=3;){for(n=r.strstart,i=r.lookahead-2;r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++,--i;);r.strstart=n,r.lookahead=2,x(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=d,e.input=u,e.avail_in=l,r.wrap=a,0},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,r){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,o,i,s,a,l,c,d,u,h,p,g,f,m,v,b,y,w,x,_,k,C,S,E;r=e.state,n=e.next_in,S=e.input,o=n+(e.avail_in-5),i=e.next_out,E=e.output,s=i-(t-e.avail_out),a=i+(e.avail_out-257),l=r.dmax,c=r.wsize,d=r.whave,u=r.wnext,h=r.window,p=r.hold,g=r.bits,f=r.lencode,m=r.distcode,v=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;e:do{g<15&&(p+=S[n++]<<g,g+=8,p+=S[n++]<<g,g+=8),y=f[p&v];t:for(;;){if(p>>>=w=y>>>24,g-=w,0==(w=y>>>16&255))E[i++]=65535&y;else{if(!(16&w)){if(!(64&w)){y=f[(65535&y)+(p&(1<<w)-1)];continue t}if(32&w){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}x=65535&y,(w&=15)&&(g<w&&(p+=S[n++]<<g,g+=8),x+=p&(1<<w)-1,p>>>=w,g-=w),g<15&&(p+=S[n++]<<g,g+=8,p+=S[n++]<<g,g+=8),y=m[p&b];r:for(;;){if(p>>>=w=y>>>24,g-=w,!(16&(w=y>>>16&255))){if(!(64&w)){y=m[(65535&y)+(p&(1<<w)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(_=65535&y,g<(w&=15)&&(p+=S[n++]<<g,(g+=8)<w&&(p+=S[n++]<<g,g+=8)),l<(_+=p&(1<<w)-1)){e.msg="invalid distance too far back",r.mode=30;break e}if(p>>>=w,g-=w,(w=i-s)<_){if(d<(w=_-w)&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(C=h,(k=0)===u){if(k+=c-w,w<x){for(x-=w;E[i++]=h[k++],--w;);k=i-_,C=E}}else if(u<w){if(k+=c+u-w,(w-=u)<x){for(x-=w;E[i++]=h[k++],--w;);if(k=0,u<x){for(x-=w=u;E[i++]=h[k++],--w;);k=i-_,C=E}}}else if(k+=u-w,w<x){for(x-=w;E[i++]=h[k++],--w;);k=i-_,C=E}for(;2<x;)E[i++]=C[k++],E[i++]=C[k++],E[i++]=C[k++],x-=3;x&&(E[i++]=C[k++],1<x&&(E[i++]=C[k++]))}else{for(k=i-_;E[i++]=E[k++],E[i++]=E[k++],E[i++]=E[k++],2<(x-=3););x&&(E[i++]=E[k++],1<x&&(E[i++]=E[k++]))}break}}break}}while(n<o&&i<a);n-=x=g>>3,p&=(1<<(g-=x<<3))-1,e.next_in=n,e.next_out=i,e.avail_in=n<o?o-n+5:5-(n-o),e.avail_out=i<a?a-i+257:257-(i-a),r.hold=p,r.bits=g}},{}],49:[function(e,t,r){"use strict";var n=e("../utils/common"),o=e("./adler32"),i=e("./crc32"),s=e("./inffast"),a=e("./inftrees"),l=-2;function c(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function d(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function u(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):l}function h(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,u(e)):l}function p(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?l:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,h(e))):l}function g(e,t){var r,n;
vendor: 5,024 bytes, line 2
2return e?(n=new d,(e.state=n).window=null,0!==(r=p(e,t))&&(e.state=null),r):l}var f,m,v=!0;function b(e){if(v){var t;for(f=new n.Buf32(512),m=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,f,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,m,0,e.work,{bits:5}),v=!1}e.lencode=f,e.lenbits=9,e.distcode=m,e.distbits=5}function y(e,t,r,o){var i,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),o>=s.wsize?(n.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(o<(i=s.wsize-s.wnext)&&(i=o),n.arraySet(s.window,t,r-o,i,s.wnext),(o-=i)?(n.arraySet(s.window,t,r-o,o,0),s.wnext=o,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0}r.inflateReset=h,r.inflateReset2=p,r.inflateResetKeep=u,r.inflateInit=function(e){return g(e,15)},r.inflateInit2=g,r.inflate=function(e,t){var r,d,u,h,p,g,f,m,v,w,x,_,k,C,S,E,I,A,T,O,L,$,N,R,P=0,D=new n.Buf8(4),M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return l;12===(r=e.state).mode&&(r.mode=13),p=e.next_out,u=e.output,f=e.avail_out,h=e.next_in,d=e.input,g=e.avail_in,m=r.hold,v=r.bits,w=g,x=f,$=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;v<16;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(2&r.wrap&&35615===m){D[r.check=0]=255&m,D[1]=m>>>8&255,r.check=i(r.check,D,2,0),v=m=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&m)){e.msg="unknown compression method",r.mode=30;break}if(v-=4,L=8+(15&(m>>>=4)),0===r.wbits)r.wbits=L;else if(L>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<L,e.adler=r.check=1,r.mode=512&m?10:12,v=m=0;break;case 2:for(;v<16;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(r.flags=m,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=m>>8&1),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,r.check=i(r.check,D,2,0)),v=m=0,r.mode=3;case 3:for(;v<32;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.head&&(r.head.time=m),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,D[2]=m>>>16&255,D[3]=m>>>24&255,r.check=i(r.check,D,4,0)),v=m=0,r.mode=4;case 4:for(;v<16;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.head&&(r.head.xflags=255&m,r.head.os=m>>8),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,r.check=i(r.check,D,2,0)),v=m=0,r.mode=5;case 5:if(1024&r.flags){for(;v<16;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.length=m,r.head&&(r.head.extra_len=m),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,r.check=i(r.check,D,2,0)),v=m=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(g<(_=r.length)&&(_=g),_&&(r.head&&(L=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,d,h,_,L)),512&r.flags&&(r.check=i(r.check,d,_,h)),g-=_,h+=_,r.length-=_),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===g)break e;for(_=0;L=d[h+_++],r.head&&L&&r.length<65536&&(r.head.name+=String.fromCharCode(L)),L&&_<g;);if(512&r.flags&&(r.check=i(r.check,d,_,h)),g-=_,h+=_,L)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===g)break e;for(_=0;L=d[h+_++],r.head&&L&&r.length<65536&&(r.head.comment+=String.fromCharCode(L)),L&&_<g;);if(512&r.flags&&(r.check=i(r.check,d,_,h)),g-=_,h+=_,L)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;v<16;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(m!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}v=m=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;v<32;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}e.adler=r.check=c(m),v=m=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=p,e.avail_out=f,e.next_in=h,e.avail_in=g,r.hold=m,r.bits=v,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){m>>>=7&v,v-=7&v,r.mode=27;break}for(;v<3;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}switch(r.last=1&m,v-=1,3&(m>>>=1)){case 0:r.mode=14;break;case 1:if(b(r),r.mode=20,6!==t)break;m>>>=2,v-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}m>>>=2,v-=2;break;case 14:for(m>>>=7&v,v-=7&v;v<32;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if((65535&m)!=(m>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&m,v=m=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(_=r.length){if(g<_&&(_=g),f<_&&(_=f),0===_)break e;n.arraySet(u,d,h,_,p),g-=_,h+=_,f-=_,p+=_,r.length-=_;break}r.mode=12;break;case 17:for(;v<14;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(r.nlen=257+(31&m),m>>>=5,v-=5,r.ndist=1+(31&m),m>>>=5,v-=5,r.ncode=4+(15&m),m>>>=4,v-=4,286<r.nlen||30<r.ndist){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;
vendor: 10,131 bytes, line 2
2v<3;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.lens[M[r.have++]]=7&m,m>>>=3,v-=3}for(;r.have<19;)r.lens[M[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,N={bits:r.lenbits},$=a(0,r.lens,0,19,r.lencode,0,r.work,N),r.lenbits=N.bits,$){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;E=(P=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,I=65535&P,!((S=P>>>24)<=v);){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(I<16)m>>>=S,v-=S,r.lens[r.have++]=I;else{if(16===I){for(R=S+2;v<R;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(m>>>=S,v-=S,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}L=r.lens[r.have-1],_=3+(3&m),m>>>=2,v-=2}else if(17===I){for(R=S+3;v<R;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}v-=S,L=0,_=3+(7&(m>>>=S)),m>>>=3,v-=3}else{for(R=S+7;v<R;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}v-=S,L=0,_=11+(127&(m>>>=S)),m>>>=7,v-=7}if(r.have+_>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;_--;)r.lens[r.have++]=L}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,N={bits:r.lenbits},$=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,N),r.lenbits=N.bits,$){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,N={bits:r.distbits},$=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,N),r.distbits=N.bits,$){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=g&&258<=f){e.next_out=p,e.avail_out=f,e.next_in=h,e.avail_in=g,r.hold=m,r.bits=v,s(e,x),p=e.next_out,u=e.output,f=e.avail_out,h=e.next_in,d=e.input,g=e.avail_in,m=r.hold,v=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;E=(P=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,I=65535&P,!((S=P>>>24)<=v);){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(E&&!(240&E)){for(A=S,T=E,O=I;E=(P=r.lencode[O+((m&(1<<A+T)-1)>>A)])>>>16&255,I=65535&P,!(A+(S=P>>>24)<=v);){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}m>>>=A,v-=A,r.back+=A}if(m>>>=S,v-=S,r.back+=S,r.length=I,0===E){r.mode=26;break}if(32&E){r.back=-1,r.mode=12;break}if(64&E){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&E,r.mode=22;case 22:if(r.extra){for(R=r.extra;v<R;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.length+=m&(1<<r.extra)-1,m>>>=r.extra,v-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;E=(P=r.distcode[m&(1<<r.distbits)-1])>>>16&255,I=65535&P,!((S=P>>>24)<=v);){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(!(240&E)){for(A=S,T=E,O=I;E=(P=r.distcode[O+((m&(1<<A+T)-1)>>A)])>>>16&255,I=65535&P,!(A+(S=P>>>24)<=v);){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}m>>>=A,v-=A,r.back+=A}if(m>>>=S,v-=S,r.back+=S,64&E){e.msg="invalid distance code",r.mode=30;break}r.offset=I,r.extra=15&E,r.mode=24;case 24:if(r.extra){for(R=r.extra;v<R;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.offset+=m&(1<<r.extra)-1,m>>>=r.extra,v-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===f)break e;if(_=x-f,r.offset>_){if((_=r.offset-_)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}k=_>r.wnext?(_-=r.wnext,r.wsize-_):r.wnext-_,_>r.length&&(_=r.length),C=r.window}else C=u,k=p-r.offset,_=r.length;for(f<_&&(_=f),f-=_,r.length-=_;u[p++]=C[k++],--_;);0===r.length&&(r.mode=21);break;case 26:if(0===f)break e;u[p++]=r.length,f--,r.mode=21;break;case 27:if(r.wrap){for(;v<32;){if(0===g)break e;g--,m|=d[h++]<<v,v+=8}if(x-=f,e.total_out+=x,r.total+=x,x&&(e.adler=r.check=r.flags?i(r.check,u,x,p-x):o(r.check,u,x,p-x)),x=f,(r.flags?m:c(m))!==r.check){e.msg="incorrect data check",r.mode=30;break}v=m=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;v<32;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(m!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}v=m=0}r.mode=29;case 29:$=1;break e;case 30:$=-3;break e;case 31:return-4;default:return l}return e.next_out=p,e.avail_out=f,e.next_in=h,e.avail_in=g,r.hold=m,r.bits=v,(r.wsize||x!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&y(e,e.output,e.next_out,x-e.avail_out)?(r.mode=31,-4):(w-=e.avail_in,x-=e.avail_out,e.total_in+=w,e.total_out+=x,r.total+=x,r.wrap&&x&&(e.adler=r.check=r.flags?i(r.check,u,x,e.next_out-x):o(r.check,u,x,e.next_out-x)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==w&&0===x||4===t)&&0===$&&($=-5),$)},r.inflateEnd=function(e){if(!e||!e.state)return l;var t=e.state;return t.window&&(t.window=null),e.state=null,0},r.inflateGetHeader=function(e,t){var r;return e&&e.state&&2&(r=e.state).wrap?((r.head=t).done=!1,0):l},r.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?l:11===r.mode&&o(1,t,n,0)!==r.check?-3:y(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,0):l},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,r){"use strict";var n=e("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],i=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,l,c,d,u,h){var p,g,f,m,v,b,y,w,x,_=h.bits,k=0,C=0,S=0,E=0,I=0,A=0,T=0,O=0,L=0,$=0,N=null,R=0,P=new n.Buf16(16),D=new n.Buf16(16),M=null,z=0;for(k=0;k<=15;k++)P[k]=0;for(C=0;C<l;C++)P[t[r+C]]++;for(I=_,E=15;1<=E&&0===P[E];E--);if(E<I&&(I=E),0===E)return c[d++]=20971520,c[d++]=20971520,h.bits=1,0;for(S=1;S<E&&0===P[S];S++);for(I<S&&(I=S),k=O=1;k<=15;k++)if(O<<=1,(O-=P[k])<0)return-1;if(0<O&&(0===e||1!==E))return-1;for(D[1]=0,k=1;k<15;k++)D[k+1]=D[k]+P[k];for(C=0;C<l;C++)0!==t[r+C]&&(u[D[t[r+C]]++]=C);if(b=0===e?(N=M=u,19):1===e?(N=o,R-=257,M=i,z-=257,256):(N=s,M=a,-1),k=S,v=d,T=C=$=0,f=-1,m=(L=1<<(A=I))-1,1===e&&852<L||2===e&&592<L)return 1;for(;;){for(y=k-T,x=u[C]<b?(w=0,u[C]):u[C]>b?(w=M[z+u[C]],N[R+u[C]]):(w=96,0),p=1<<k-T,S=g=1<<A;c[v+($>>T)+(g-=p)]=y<<24|w<<16|x,0!==g;);for(p=1<<k-1;$&p;)p>>=1;if(0!==p?($&=p-1,$+=p):$=0,C++,0==--P[k]){if(k===E)break;k=t[r+u[C]]}if(I<k&&($&m)!==f){for(0===T&&(T=I),v+=S,O=1<<(A=k-T);A+T<E&&!((O-=P[A+T])<=0);)A++,O<<=1;if(L+=1<<A,1===e&&852<L||2===e&&592<L)return 1;c[f=$&m]=I<<24|A<<16|v-d}}return 0!==$&&(c[v+$]=k-T<<24|64<<16),h.bits=I,0}},{"../utils/common":41}],51:[function(e,t,r){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,t,r){"use strict";var n=e("../utils/common");function o(e){for(var t=e.length;0<=--t;)e[t]=0}var i=256,s=286,a=30,l=15,c=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],d=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=new Array(576);o(p);var g=new Array(60);o(g);var f=new Array(512);o(f);var m=new Array(256);o(m);var v=new Array(29);o(v);var b,y,w,x=new Array(a);function _(e,t,r,n,o){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}function k(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function C(e){return e<256?f[e]:f[256+(e>>>7)]}function S(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function E(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,S(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function I(e,t,r){E(e,r[2*t],r[2*t+1])}function A(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function T(e,t,r){var n,o,i=new Array(16),s=0;for(n=1;n<=l;n++)i[n]=s=s+r[n-1]<<1;for(o=0;o<=t;o++){var a=e[2*o+1];0!==a&&(e[2*o]=A(i[a]++,a))}}function O(e){var t;for(t=0;t<s;t++)e.dyn_ltree[2*t]=0;for(t=0;t<a;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function L(e){8<e.bi_valid?S(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function $(e,t,r,n){var o=2*t,i=2*r;return e[o]<e[i]||e[o]===e[i]&&n[t]<=n[r]}function N(e,t,r){for(var n=e.heap[r],o=r<<1;o<=e.heap_len&&(o<e.heap_len&&$(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!$(t,n,e.heap[o],e.depth));)e.heap[r]=e.heap[o],r=o,o<<=1;e.heap[r]=n}function R(e,t,r){var n,o,s,a,l=0;if(0!==e.last_lit)for(;n=e.pending_buf[e.d_buf+2*l]<<8|e.pending_buf[e.d_buf+2*l+1],o=e.pending_buf[e.l_buf+l],l++,0===n?I(e,o,t):(I(e,(s=m[o])+i+1,t),0!==(a=c[s])&&E(e,o-=v[s],a),I(e,s=C(--n),r),0!==(a=d[s])&&E(e,n-=x[s],a)),l<e.last_lit;);I(e,256,t)}function P(e,t){var r,n,o,i=t.dyn_tree,s=t.stat_desc.static_tree,a=t.stat_desc.has_stree,c=t.stat_desc.elems,d=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<c;r++)0!==i[2*r]?(e.heap[++e.heap_len]=d=r,e.depth[r]=0):i[2*r+1]=0;for(;e.heap_len<2;)i[2*(o=e.heap[++e.heap_len]=d<2?++d:0)]=1,e.depth[o]=0,e.opt_len--,a&&(e.static_len-=s[2*o+1]);for(t.max_code=d,r=e.heap_len>>1;1<=r;r--)N(e,i,r);for(o=c;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],N(e,i,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,i[2*o]=i[2*r]+i[2*n],e.depth[o]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,i[2*r+1]=i[2*n+1]=o,e.heap[1]=o++,N(e,i,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,o,i,s,a,c=t.dyn_tree,d=t.max_code,u=t.stat_desc.static_tree,h=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,g=t.stat_desc.extra_base,f=t.stat_desc.max_length,m=0;for(i=0;i<=l;i++)e.bl_count[i]=0;for(c[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)f<(i=c[2*c[2*(n=e.heap[r])+1]+1]+1)&&(i=f,m++),c[2*n+1]=i,d<n||(e.bl_count[i]++,s=0,g<=n&&(s=p[n-g]),a=c[2*n],e.opt_len+=a*(i+s),h&&(e.static_len+=a*(u[2*n+1]+s)));if(0!==m){do{for(i=f-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[f]--,m-=2}while(0<m);for(i=f;0!==i;i--)for(n=e.bl_count[i];0!==n;
vendor: 6,634 bytes, line 2
2)d<(o=e.heap[--r])||(c[2*o+1]!==i&&(e.opt_len+=(i-c[2*o+1])*c[2*o],c[2*o+1]=i),n--)}}(e,t),T(i,d,e.bl_count)}function D(e,t,r){var n,o,i=-1,s=t[1],a=0,l=7,c=4;for(0===s&&(l=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)o=s,s=t[2*(n+1)+1],++a<l&&o===s||(a<c?e.bl_tree[2*o]+=a:0!==o?(o!==i&&e.bl_tree[2*o]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,i=o,c=(a=0)===s?(l=138,3):o===s?(l=6,3):(l=7,4))}function M(e,t,r){var n,o,i=-1,s=t[1],a=0,l=7,c=4;for(0===s&&(l=138,c=3),n=0;n<=r;n++)if(o=s,s=t[2*(n+1)+1],!(++a<l&&o===s)){if(a<c)for(;I(e,o,e.bl_tree),0!=--a;);else 0!==o?(o!==i&&(I(e,o,e.bl_tree),a--),I(e,16,e.bl_tree),E(e,a-3,2)):a<=10?(I(e,17,e.bl_tree),E(e,a-3,3)):(I(e,18,e.bl_tree),E(e,a-11,7));i=o,c=(a=0)===s?(l=138,3):o===s?(l=6,3):(l=7,4)}}o(x);var z=!1;function F(e,t,r,o){E(e,0+(o?1:0),3),function(e,t,r){L(e),S(e,r),S(e,~r),n.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r)}r._tr_init=function(e){z||(function(){var e,t,r,n,o,i=new Array(16);for(n=r=0;n<28;n++)for(v[n]=r,e=0;e<1<<c[n];e++)m[r++]=n;for(m[r-1]=n,n=o=0;n<16;n++)for(x[n]=o,e=0;e<1<<d[n];e++)f[o++]=n;for(o>>=7;n<a;n++)for(x[n]=o<<7,e=0;e<1<<d[n]-7;e++)f[256+o++]=n;for(t=0;t<=l;t++)i[t]=0;for(e=0;e<=143;)p[2*e+1]=8,e++,i[8]++;for(;e<=255;)p[2*e+1]=9,e++,i[9]++;for(;e<=279;)p[2*e+1]=7,e++,i[7]++;for(;e<=287;)p[2*e+1]=8,e++,i[8]++;for(T(p,287,i),e=0;e<a;e++)g[2*e+1]=5,g[2*e]=A(e,5);b=new _(p,c,257,s,l),y=new _(g,d,0,a,l),w=new _(new Array(0),u,0,19,7)}(),z=!0),e.l_desc=new k(e.dyn_ltree,b),e.d_desc=new k(e.dyn_dtree,y),e.bl_desc=new k(e.bl_tree,w),e.bi_buf=0,e.bi_valid=0,O(e)},r._tr_stored_block=F,r._tr_flush_block=function(e,t,r,n){var o,s,a=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<i;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),P(e,e.l_desc),P(e,e.d_desc),a=function(e){var t;for(D(e,e.dyn_ltree,e.l_desc.max_code),D(e,e.dyn_dtree,e.d_desc.max_code),P(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*h[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=r+5,r+4<=o&&-1!==t?F(e,t,r,n):4===e.strategy||s===o?(E(e,2+(n?1:0),3),R(e,p,g)):(E(e,4+(n?1:0),3),function(e,t,r,n){var o;for(E(e,t-257,5),E(e,r-1,5),E(e,n-4,4),o=0;o<n;o++)E(e,e.bl_tree[2*h[o]+1],3);M(e,e.dyn_ltree,t-1),M(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),R(e,e.dyn_ltree,e.dyn_dtree)),O(e),n&&L(e)},r._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(m[r]+i+1)]++,e.dyn_dtree[2*C(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){E(e,2,3),I(e,256,p),function(e){16===e.bi_valid?(S(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){!function(e){"use strict";if(!e.setImmediate){var t,r,n,o,i=1,s={},a=!1,l=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,t="[object process]"==={}.toString.call(e.process)?function(e){process.nextTick(function(){u(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(o="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",h,!1):e.attachEvent("onmessage",h),function(t){e.postMessage(o+t,"*")}):e.MessageChannel?((n=new MessageChannel).port1.onmessage=function(e){u(e.data)},function(e){n.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(r=l.documentElement,function(e){var t=l.createElement("script");t.onreadystatechange=function(){u(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(u,0,e)},c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var r=new Array(arguments.length-1),n=0;n<r.length;n++)r[n]=arguments[n+1];var o={callback:e,args:r};return s[i]=o,t(i),i++},c.clearImmediate=d}function d(e){delete s[e]}function u(e){if(a)setTimeout(u,0,e);else{var t=s[e];if(t){a=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{d(e),a=!1}}}}function h(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&u(+t.data.slice(o.length))}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)},769:function(e,t,r){"use strict";r.d(t,{E:function(){return Rn},S:function(){return fx},U:function(){return SC},Z:function(){return l},_:function(){return o},a3:function(){return ex},a9:function(){return Pa},aF:function(){return yu},aS:function(){return rh},aX:function(){return Kn},aY:function(){return od},ae:function(){return M_},bP:function(){return Wk},bS:function(){return O_},bZ:function(){return n},bl:function(){return v},bn:function(){return pv},bo:function(){return mv},bt:function(){return Qi},bx:function(){return Xi},c0:function(){return a},cG:function(){return V_},cH:function(){return x_},ca:function(){return xp},cg:function(){return $x},ch:function(){return Nx},cn:function(){return I_},co:function(){return vu},ct:function(){return A_},d3:function(){return jt},d5:function(){return mi},dQ:function(){return dk},dS:function(){return uk},dT:function(){return Eu},e:function(){return Ah},e1:function(){return ck},eP:function(){return v_},eV:function(){return u},e_:function(){return Cp},em:function(){return Dc},eu:function(){return Su},f4:function(){return Ap},fE:function(){return gv},fF:function(){return Zv},fP:function(){return h_},f_:function(){return w_},fs:function(){return Xv},g:function(){return eo},ge:function(){return oc},gj:function(){return bc},gq:function(){return lh},j:function(){return Mk},k:function(){return Hk},m:function(){return Yk},o:function(){return qc},p:function(){return Kc},q:function(){return Gc}});var n=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof r.g<"u"?r.g:typeof self<"u"?self:{};
vendor: 3,070 bytes, line 2
2function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i,s={exports:{}},a=function(){if(i)return s.exports;i=1;var e,t="object"==typeof Reflect?Reflect:null,r=t&&"function"==typeof t.apply?t.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};e=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var n=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}s.exports=o,s.exports.once=function(e,t){return new Promise(function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}m(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,o)})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function d(e,t,r,n){var o,i,s;if(l(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=c(e))>0&&s.length>o&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,function(e){console&&console.warn&&console.warn(e)}(a)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=u.bind(n);return o.listener=r,n.wrapFn=o,o}function p(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):f(o,o.length)}function g(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function f(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function m(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function o(i){n.once&&e.removeEventListener(t,o),r(i)})}}return Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a}
2,set:function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),o.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var c=l.length,d=f(l,c);for(n=0;n<c;++n)r(d[n],this,t)}return!0},o.prototype.addListener=function(e,t){return d(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return d(this,e,t,!0)},o.prototype.once=function(e,t){return l(t),this.on(e,h(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,h(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,o,i,s;if(l(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return p(this,e,!0)},o.prototype.rawListeners=function(e){return p(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},o.prototype.listenerCount=g,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},s.exports}();function l(){try{return window.opener.shell||globalThis.shell}catch{return globalThis.shell}}const c=(e,t)=>l()?.analytics.track(e,{...t,Experience:"Shell"}),d=()=>({track:c});var u,h;(h=u||(u={})).Available="available",h.Away="away",h.Busy="busy",h.Disconnected="disconnected",h.DoNotDisturb="dnd",h.Initial="initial",h.Offline="offline";const p={config:{name:"Badge",platforms:["web"]},setBadgeCount:e=>navigator.setAppBadge?.(e),setBadgeStatus:()=>{}};var g,f,m,v,b,y,w,x;!function(e){e.PermissionDeniedMac="Cannot update: mac permission denied",e.CheckFailed="Check for updates failed",e.AnotherCheckInProgress="Another check for updates is currently in progress",e.UpdatesAreDisabled="Updates are disabled"}(g||(g={})),function(e){e.iAmInContainer="I am in container",e.iAmOutside="I am outside"}(f||(f={})),function(e){e.confirmed="confirmed",e.newNetworkClientVersion="new_network_client_version"}(m||(m={})),function(e){e.disconnected="disconnected",e.connecting="connecting",e.connected="connected"}(v||(v={})),function(e){e.attribution="attribution"}(b||(b={})),function(e){e.appLogoOverride="appLogoOverride",e.hero="hero"}(y||(y={})),function(e){e.circle="circle"}(w||(w={})),function(e){e.reminder="reminder",e.alarm="alarm",e.incomingCall="incomingCall"}(x||(x={}));const _={nativeContainer:()=>globalThis[Et],connectionPort(e){try{const t=new URL(e.url);return parseInt(t.port)}catch{return Number.NaN}}},k=console,C={config:{name:"Logger",platforms:["web"]},createLogger:()=>k,debug:k.debug,log:k.log,info:k.info,warn:k.warn,error:k.error},S=C.createLogger("DesktopCompanion"),E=e=>{let t="";for(let r=e.length-1;r>=0;--r)t+=e[r];return t},I=new class{constructor(){this._clientLocalVersion="0.0.2",this._clientNetworkVersion=this._clientLocalVersion}getEncodingFunc(){switch(this._clientNetworkVersion){case"0.0.1":return e=>E(btoa(e)).replace(/=/g,"");case"0.0.2":return e=>E(btoa(encodeURIComponent(e))).replace(/=/g,"");default:return e=>e}}getDecodingFunc(){switch(this._clientNetworkVersion){case"0.0.1":return e=>atob(E(e));case"0.0.2":return e=>decodeURIComponent(atob(E(e)));default:return e=>e}}getEncodedMessage(e){try{return{success:!0,message:this.getEncodingFunc()(e)}}catch{return S.error("Cannot encode a message, ignoring"),{success:!1,message:e}}}getDecodedMessage(e){try{return{success:!0,message:this.getDecodingFunc()(e)}}catch{return S.error("Cannot decode a message, ignoring"),{success:!1,message:e}}}getClientNetworkVersion(){return this._clientNetworkVersion}getClientLocalVersion(){return this._clientLocalVersion}setClientNetworkVersion(e){this._clientNetworkVersion=e}},A=C.createLogger("DesktopCompanionHandshake"),T=new class{async newConfirmedConnectionWithConfig(e){const t=e.ports.map(e=>this._newConfirmedConnectionToPort(e));try{return await Promise.any(t)}catch{throw new Error("Failed to establish connection")}}async _newConfirmedConnectionToPort(e){const t=await this._newConnectionToPort(e);return await this._confirmConnection(t),t}_newConnectionToPort(e){return new Promise((t,r)=>{const n=new WebSocket(`ws://127.0.0.1:${e}`),o=()=>{s(),t(n)},i=()=>{s(),n.close(),r()},s=()=>{n.removeEventListener("open",o),n.removeEventListener("error",i)};n.addEventListener("open",o),n.addEventListener("error",i)})}_confirmConnection(e){return new Promise((t,r)=>{const n=()=>{o(),e.close(),r()},o=()=>{clearTimeout(i),e.removeEventListener("message",s),e.removeEventListener("close",a),e.removeEventListener("error",l)},i=setTimeout(()=>{const t=_.connectionPort(e);A.error(`Connected to port ${t} but server did not respond on time`),n()},2e3),s=r=>{const i=_.connectionPort(e);if("string"==typeof r.data)try{const e=JSON.parse(r.data);
2e.message===m.confirmed?(I.setClientNetworkVersion(e.clientVersion),o(),t()):(A.error(`Connected to port ${i} but received unexpected response from server`),n())}catch(e){A.error(`Connected to port ${i} but received error trying to parse the data: ${JSON.stringify(e)}`),n()}else A.error(`Connected to port ${i} but received a data with a type different than a string: ${typeof r.data}`),n()},a=t=>{const r=_.connectionPort(e);A.error(`Connected to port ${r} but connection closed before server response`),n()},l=t=>{const r=_.connectionPort(e);A.error(`Connected to port ${r} but connection error before server response`),n()};e.addEventListener("message",s,{once:!0}),e.addEventListener("close",a,{once:!0}),e.addEventListener("error",l,{once:!0});const c={message:_.nativeContainer()?f.iAmInContainer:f.iAmOutside,clientVersion:I.getClientLocalVersion()};e.send(JSON.stringify(c))})}},O=C.createLogger("DesktopCompanion"),L=()=>_.nativeContainer()?.plugins.DesktopCompanionServer;class $ extends Event{constructor(e){super("connectionStatusChanged"),this.connectionStatus=e}}const N=e=>`message-${e}`;class R extends Event{constructor(e){super(N(e.type)),this.message=e}}class P{constructor(){this.config={name:"DesktopCompanion",platforms:["web"]},this._eventTarget=new EventTarget,this._connectionStatus=v.disconnected,this._ws=void 0,this._currentConfig=void 0,this._tryConnectTimerId=void 0}_setConnectionStatus(e){this._connectionStatus!==e&&(this._connectionStatus=e,O.log(`Connection status changed: ${e}`),this._eventTarget.dispatchEvent(new $(e)))}_connectedWithCompatibleConfig(e){if(!this._ws)return!1;const t=_.connectionPort(this._ws);return e.ports.includes(t)}_closeConnection(){this._tryConnectTimerId&&(clearTimeout(this._tryConnectTimerId),this._tryConnectTimerId=void 0),this._currentConfig=void 0,this._ws?.close(),this._ws=void 0,this._setConnectionStatus(v.disconnected)}async _tryConnectTimerHandler(){if(this._currentConfig)try{if(this._ws=await T.newConfirmedConnectionWithConfig(this._currentConfig),O.log(`Connected to port ${_.connectionPort(this._ws)}`),this._tryConnectTimerId=void 0,!this._currentConfig)return void this._closeConnection();this._ws.addEventListener("close",()=>this._closeHandler()),this._ws.addEventListener("message",e=>this._messageHandler(e)),this._setConnectionStatus(v.connected)}catch{this._tryConnectTimerId=setTimeout(this._tryConnectTimerHandler.bind(this),1e3)}}_closeHandler(){this._ws=void 0,this._currentConfig?.autoReconnect?(O.log("Connection closed but reconnecting due to autoReconnect being enabled"),this._setConnectionStatus(v.connecting),this._tryConnectTimerHandler()):this._setConnectionStatus(v.disconnected)}static _isDesktopCompanionMessage(e){return e&&"object"==typeof e&&"string"==typeof e.type&&"object"==typeof e.payload}static _isDesktopCompanionHandshakeMessage(e){return e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.clientVersion}_messageHandler(e){const t=e.data;if("string"==typeof t)try{const e=I.getDecodedMessage(t.toString());if(e.success){const t=JSON.parse(e.message);if(P._isDesktopCompanionMessage(t))return void this._eventTarget.dispatchEvent(new R(t));O.error("Failed to parse a decoded message as DesktopCompanionMessage, ignoring")}const r=JSON.parse(t.toString());P._isDesktopCompanionHandshakeMessage(r)?r.message===m.newNetworkClientVersion&&I.setClientNetworkVersion(r.clientVersion):O.error("Failed to parse a message as DesktopCompanionHandshakeMessage, ignoring")}catch(e){O.error("Failed to parse message, ignoring, error: "+JSON.stringify(e))}else O.error(`Received message with non-string type (${typeof t}), ignoring`)}get connectionStatus(){return this._connectionStatus}startConnecting(e){this._connectedWithCompatibleConfig(e)?O.log("Already connected with compatible config"):(this._closeConnection(),this._currentConfig=e,O.log("Starting connecting",this._currentConfig),this._setConnectionStatus(v.connecting),L()?.startListening(e),this._tryConnectTimerHandler())}disconnect(){L()?.stop(),this._closeConnection()}send(e){if(this._ws&&this._ws.readyState===WebSocket.OPEN)try{const t=I.getEncodedMessage(JSON.stringify(e));t.success?this._ws.send(t.message):O.error("We cannot send a message because the encoding is failing, ignoring")}catch(e){const t="We cannot send this message because the JSON.stringify is failing, ignoring, error: "+JSON.stringify(e);throw O.error(t),new Error(t)}}addEventListener(e,t,r){this._eventTarget.addEventListener(e,t,r)}addMessageEventListener(e,t,r){this._eventTarget.addEventListener(N(e),t,r)}removeEventListener(e,t,r){this._eventTarget.removeEventListener(e,t,r)}removeMessageEventListener(e,t,r){this._eventTarget.removeEventListener(N(e),t,r)}}const D=new P;function M(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var z,F={exports:{}},U=(z||(z=1,function(e){e.exports=function e(t,r,n){function o(s,a){if(!r[s]){if(!t[s]){if(!a&&M)return M(s);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){return o(t[s][1][e]||e)},c,c.exports,e,t,r,n)}return r[s].exports}for(var i=M,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,t,r){var n=e("./utils"),o=e("./support"),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
vendor: 5,998 bytes, line 2
2+/=";r.encode=function(e){for(var t,r,o,s,a,l,c,d=[],u=0,h=e.length,p=h,g="string"!==n.getTypeOf(e);u<e.length;)p=h-u,o=g?(t=e[u++],r=u<h?e[u++]:0,u<h?e[u++]:0):(t=e.charCodeAt(u++),r=u<h?e.charCodeAt(u++):0,u<h?e.charCodeAt(u++):0),s=t>>2,a=(3&t)<<4|r>>4,l=1<p?(15&r)<<2|o>>6:64,c=2<p?63&o:64,d.push(i.charAt(s)+i.charAt(a)+i.charAt(l)+i.charAt(c));return d.join("")},r.decode=function(e){var t,r,n,s,a,l,c=0,d=0,u="data:";if(e.substr(0,5)===u)throw new Error("Invalid base64 input, it looks like a data url.");var h,p=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===i.charAt(64)&&p--,e.charAt(e.length-2)===i.charAt(64)&&p--,p%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=o.uint8array?new Uint8Array(0|p):new Array(0|p);c<e.length;)t=i.indexOf(e.charAt(c++))<<2|(s=i.indexOf(e.charAt(c++)))>>4,r=(15&s)<<4|(a=i.indexOf(e.charAt(c++)))>>2,n=(3&a)<<6|(l=i.indexOf(e.charAt(c++))),h[d++]=t,64!==a&&(h[d++]=r),64!==l&&(h[d++]=n);return h}},{"./support":30,"./utils":32}],2:[function(e,t,r){var n=e("./external"),o=e("./stream/DataWorker"),i=e("./stream/Crc32Probe"),s=e("./stream/DataLengthProbe");function a(e,t,r,n,o){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=o}a.prototype={getContentWorker:function(){var e=new o(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new o(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(e,t,r){return e.pipe(new i).pipe(new s("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new s("compressedSize")).withStreamInfo("compression",t)},t.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){var n=e("./utils"),o=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r){var n=o,i=0+r;e^=-1;for(var s=0;s<i;s++)e=e>>>8^n[255&(e^t[s])];return-1^e}(0|t,e,e.length):function(e,t,r){var n=o,i=0+r;e^=-1;for(var s=0;s<i;s++)e=e>>>8^n[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){var n;n=typeof Promise<"u"?Promise:e("lie"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,r){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=e("pako"),i=e("./utils"),s=e("./stream/GenericWorker"),a=n?"uint8array":"array";function l(e,t){s.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",i.inherits(l,s),l.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(i.transformTo(a,e.data),!1)},l.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},r.compressWorker=function(e){return new l("Deflate",e)},r.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){function n(e,t){var r,n="";for(r=0;r<t;r++)n+=String.fromCharCode(255&e),e>>>=8;return n}function o(e,t,r,o,s,d){var u,h,p=e.file,g=e.compression,f=d!==a.utf8encode,m=i.transformTo("string",d(p.name)),v=i.transformTo("string",a.utf8encode(p.name)),b=p.comment,y=i.transformTo("string",d(b)),w=i.transformTo("string",a.utf8encode(b)),x=v.length!==p.name.length,_=w.length!==b.length,k="",C="",S="",E=p.dir,I=p.date,A={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(A.crc32=e.crc32,A.compressedSize=e.compressedSize,A.uncompressedSize=e.uncompressedSize);var T=0;t&&(T|=8),f||!x&&!_||(T|=2048);var O,L,$=0,N=0;E&&($|=16),"UNIX"===s?(N=798,$|=(L=O=p.unixPermissions,O||(L=E?16893:33204),(65535&L)<<16)):(N=20,$|=function(e){return 63&(e||0)}(p.dosPermissions)),u=I.getUTCHours(),u<<=6,u|=I.getUTCMinutes(),u<<=5,u|=I.getUTCSeconds()/2,h=I.getUTCFullYear()-1980,h<<=4,h|=I.getUTCMonth()+1,h<<=5,h|=I.getUTCDate(),x&&(C=n(1,1)+n(l(m),4)+v,k+="up"+n(C.length,2)+C),_&&(S=n(1,1)+n(l(y),4)+w,k+="uc"+n(S.length,2)+S);var R="";return R+="\n\0",R+=n(T,2),R+=g.magic,R+=n(u,2),R+=n(h,2),R+=n(A.crc32,4),R+=n(A.compressedSize,4),R+=n(A.uncompressedSize,4),R+=n(m.length,2),R+=n(k.length,2),{fileRecord:c.LOCAL_FILE_HEADER+R+m+k,dirRecord:c.CENTRAL_FILE_HEADER+n(N,2)+R+n(y.length,2)+"\0\0\0\0"+n($,4)+n(o,4)+m+k+y}}var i=e("../utils"),s=e("../stream/GenericWorker"),a=e("../utf8"),l=e("../crc32"),c=e("../signature");function d(e,t,r,n){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}i.inherits(d,s),d.prototype.push=function(e){var t=e.meta.percent||0,r
vendor: 4,499 bytes, line 2
2=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,s.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},d.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=o(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d.prototype.closedSource=function(e){this.accumulate=!1;var t,r=this.streamFiles&&!e.file.dir,i=o(e,r,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(i.dirRecord),r)this.push({data:(t=e,c.DATA_DESCRIPTOR+n(t.crc32,4)+n(t.compressedSize,4)+n(t.uncompressedSize,4)),meta:{percent:100}});else for(this.push({data:i.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},d.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r,o,s,a,l,d,u=this.bytesWritten-e,h=(r=this.dirRecords.length,o=u,s=e,a=this.zipComment,l=this.encodeFileName,d=i.transformTo("string",l(a)),c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(r,2)+n(r,2)+n(o,4)+n(s,4)+n(d.length,2)+d);this.push({data:h,meta:{percent:100}})},d.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},d.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(e){t.error(e)}),this},d.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},d.prototype.error=function(e){var t=this._sources;if(!s.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch{}return!0},d.prototype.lock=function(){s.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=d},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){var n=e("../compressions"),o=e("./ZipFileWorker");r.generateWorker=function(e,t,r){var i=new o(t.streamFiles,r,t.platform,t.encodeFileName),s=0;try{e.forEach(function(e,r){s++;var o=function(e,t){var r=e||t,o=n[r];if(!o)throw new Error(r+" is not a valid compression method !");return o}(r.options.compression,t.compression),a=r.options.compressionOptions||t.compressionOptions||{},l=r.dir,c=r.date;r._compressWorker(o,a).withStreamInfo("file",{name:e,dir:l,date:c,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(i)}),i.entriesCount=s}catch(e){i.error(e)}return i}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new n;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(n.prototype=e("./object")).loadAsync=e("./load"),n.support=e("./support"),n.defaults=e("./defaults"),n.version="3.10.1",n.loadAsync=function(e,t){return(new n).loadAsync(e,t)},n.external=e("./external"),t.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,r){var n=e("./utils"),o=e("./external"),i=e("./utf8"),s=e("./zipEntries"),a=e("./stream/Crc32Probe"),l=e("./nodejsUtils");function c(e){return new o.Promise(function(t,r){var n=e.decompressed.getContentWorker().pipe(new a);n.on("error",function(e){r(e)}).on("end",function(){n.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t()}).resume()})}t.exports=function(e,t){var r=this;return t=n.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:i.utf8decode}),l.isNode&&l.isStream(e)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):n.prepareContent("the loaded zip f
2ile",e,!0,t.optimizedBinaryString,t.base64).then(function(e){var r=new s(t);return r.load(e),r}).then(function(e){var r=[o.Promise.resolve(e)],n=e.files;if(t.checkCRC32)for(var i=0;i<n.length;i++)r.push(c(n[i]));return o.Promise.all(r)}).then(function(e){for(var o=e.shift(),i=o.files,s=0;s<i.length;s++){var a=i[s],l=a.fileNameStr,c=n.resolve(a.fileNameStr);r.file(c,a.decompressed,{binary:!0,optimizedBinaryString:!0,date:a.date,dir:a.dir,comment:a.fileCommentStr.length?a.fileCommentStr:null,unixPermissions:a.unixPermissions,dosPermissions:a.dosPermissions,createFolders:t.createFolders}),a.dir||(r.file(c).unsafeOriginalName=l)}return o.zipComment.length&&(r.comment=o.zipComment),r})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,r){var n=e("../utils"),o=e("../stream/GenericWorker");function i(e,t){o.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}n.inherits(i,o),i.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",function(e){t.push({data:e,meta:{percent:0}})}).on("error",function(e){t.isPaused?this.generatedError=e:t.error(e)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})},i.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},i.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=i},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,r){var n=e("readable-stream").Readable;function o(e,t,r){n.call(this,t),this._helper=e;var o=this;e.on("data",function(e,t){o.push(e)||o._helper.pause(),r&&r(t)}).on("error",function(e){o.emit("error",e)}).on("end",function(){o.push(null)})}e("../utils").inherits(o,n),o.prototype._read=function(){this._helper.resume()},t.exports=o},{"../utils":32,"readable-stream":16}],14:[function(e,t,r){t.exports={isNode:typeof Buffer<"u",newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,r){function n(e,t,r){var n,o=i.getTypeOf(t),a=i.extend(r||{},l);a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),"string"==typeof a.unixPermissions&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&16384&a.unixPermissions&&(a.dir=!0),a.dosPermissions&&16&a.dosPermissions&&(a.dir=!0),a.dir&&(e=f(e)),a.createFolders&&(n=g(e))&&m.call(this,n,!0);var u="string"===o&&!1===a.binary&&!1===a.base64;r&&void 0!==r.binary||(a.binary=!u),(t instanceof c&&0===t.uncompressedSize||a.dir||!t||0===t.length)&&(a.base64=!1,a.binary=!0,t="",a.compression="STORE",o="string");var v;v=t instanceof c||t instanceof s?t:h.isNode&&h.isStream(t)?new p(e,t):i.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var b=new d(e,v,a);this.files[e]=b}var o=e("./utf8"),i=e("./utils"),s=e("./stream/GenericWorker"),a=e("./stream/StreamHelper"),l=e("./defaults"),c=e("./compressedObject"),d=e("./zipObject"),u=e("./generate"),h=e("./nodejsUtils"),p=e("./nodejs/NodejsStreamInputAdapter"),g=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},f=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},m=function(e,t){return t=void 0!==t?t:l.createFolders,e=f(e),this.files[e]||n.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function v(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var b={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)n=this.files[t],(r=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(r,n)},filter:function(e){var t=[];
vendor: 4,100 bytes, line 2
2return this.forEach(function(r,n){e(r,n)&&t.push(n)}),t},file:function(e,t,r){if(1!==arguments.length)return e=this.root+e,n.call(this,e,t,r),this;if(v(e)){var o=e;return this.filter(function(e,t){return!t.dir&&o.test(e)})}var i=this.files[this.root+e];return i&&!i.dir?i:null},folder:function(e){if(!e)return this;if(v(e))return this.filter(function(t,r){return r.dir&&e.test(t)});var t=this.root+e,r=m.call(this,t),n=this.clone();return n.root=r.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter(function(t,r){return r.name.slice(0,e.length)===e}),n=0;n<r.length;n++)delete this.files[r[n].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if((r=i.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");i.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var n=r.comment||this.comment||"";t=u.generateWorker(this,r,n)}catch(e){(t=new s("error")).error(e)}return new a(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=b},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,r){t.exports=e("stream")},{stream:void 0}],17:[function(e,t,r){var n=e("./DataReader");function o(e){n.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(o,n),o.prototype.byteAt=function(e){return this.data[this.zero+e]},o.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),o=e.charCodeAt(3),i=this.length-4;0<=i;--i)if(this.data[i]===t&&this.data[i+1]===r&&this.data[i+2]===n&&this.data[i+3]===o)return i-this.zero;return-1},o.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),o=e.charCodeAt(3),i=this.readData(4);return t===i[0]&&r===i[1]&&n===i[2]&&o===i[3]},o.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=o},{"../utils":32,"./DataReader":18}],18:[function(e,t,r){var n=e("../utils");function o(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,r=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=o},{"../utils":32}],19:[function(e,t,r){var n=e("./Uint8ArrayReader");function o(e){n.call(this,e)}e("../utils").inherits(o,n),o.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t}
vendor: 2,314 bytes, line 2
2,t.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){var n=e("./DataReader");function o(e){n.call(this,e)}e("../utils").inherits(o,n),o.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},o.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},o.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},o.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=o},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){var n=e("./ArrayReader");function o(e){n.call(this,e)}e("../utils").inherits(o,n),o.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){var n=e("../utils"),o=e("../support"),i=e("./ArrayReader"),s=e("./StringReader"),a=e("./NodeBufferReader"),l=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||o.uint8array?"nodebuffer"===t?new a(e):o.uint8array?new l(n.transformTo("uint8array",e)):new i(n.transformTo("array",e)):new s(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){r.LOCAL_FILE_HEADER="PK��",r.CENTRAL_FILE_HEADER="PK��",r.CENTRAL_DIRECTORY_END="PK��",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK��",r.ZIP64_CENTRAL_DIRECTORY_END="PK��",r.DATA_DESCRIPTOR="PK�\b"},{}],24:[function(e,t,r){var n=e("./GenericWorker"),o=e("../utils");function i(e){n.call(this,"ConvertWorker to "+e),this.destType=e}o.inherits(i,n),i.prototype.processChunk=function(e){this.push({data:o.transformTo(this.destType,e.data),meta:e.meta})},t.exports=i},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){var n=e("./GenericWorker"),o=e("../crc32");function i(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(i,n),i.prototype.processChunk=function(e){this.streamInfo.crc32=o(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=i},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){var n=e("../utils"),o=e("./GenericWorker");
vendor: 6,959 bytes, line 2
2function i(e){o.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(i,o),i.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}o.prototype.processChunk.call(this,e)},t.exports=i},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){var n=e("../utils"),o=e("./GenericWorker");function i(e){o.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}n.inherits(i,o),i.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},i.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},i.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},i.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=i},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.end()}),e.on("error",function(e){t.error(e)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=n},{}],29:[function(e,t,r){var n=e("../utils"),o=e("./ConvertWorker"),i=e("./GenericWorker"),s=e("../base64"),a=e("../support"),l=e("../external"),c=null;if(a.nodestream)try{c=e("../nodejs/NodejsStreamOutputAdapter")}catch{}function d(e,t,r){var s=t;switch(t){case"blob":case"arraybuffer":s="uint8array";break;case"base64":s="string"}try{this._internalType=s,this._outputType=t,this._mimeType=r,n.checkSupport(s),this._worker=e.pipe(new o(s)),e.lock()}catch(e){this._worker=new i("error"),this._worker.error(e)}}d.prototype={accumulate:function(e){return function(e,t){return new l.Promise(function(r,o){var i=[],a=e._internalType,l=e._outputType,c=e._mimeType;e.on("data",function(e,r){i.push(e),t&&t(r)}).on("error",function(e){i=[],o(e)}).on("end",function(){try{var e=function(e,t,r){switch(e){case"blob":return n.newBlob(n.transformTo("arraybuffer",t),r);case"base64":return s.encode(t);default:return n.transformTo(e,t)}}(l,function(e,t){var r,n=0,o=null,i=0;for(r=0;r<t.length;r++)i+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(o=new Uint8Array(i),r=0;r<t.length;r++)o.set(t[r],n),n+=t[r].length;return o;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(a,i),c);r(e)}catch(e){o(e)}i=[]}).resume()})}(this,e)},on:function(e,t){var r=this;return"data"===e?this._worker.on(e,function(e){t.call(r,e.data,e.meta)}):this._worker.on(e,function(){n.delay(t,arguments,r)}),this},resume:function(){return n.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(n.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new c(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=d},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,r){if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",r.nodebuffer=typeof Buffer<"u",r.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")r.blob=!1;else{var n=new ArrayBuffer(0);try{r.blob=0===new Blob([n],{type:"application/zip"}).size}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(n),r.blob=0===o.getBlob("application/zip").size}catch{r.blob=!1}}}try{r.nodestream=!!e("readable-stream").Readable}catch{r.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,r){for(var n=e("./utils"),o=e("./support"),i=e("./nodejsUtils"),s=e("./stream/GenericWorker"),a=new Array(256),l=0;l<256;l++)a[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function c(){s.call(this,"utf-8 decode"),this.leftOver=null}function d(){s.call(this,"utf-8 encode")}a[254]=a[254]=1,r.utf8encode=function(e){return o.nodebuffer?i.newBufferFrom(e,"utf-8"):function(e){var t,r,n,i,s,a=e.length,l=0;for(i=0;i<a;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),l
vendor: 8,758 bytes, line 2
2+=r<128?1:r<2048?2:r<65536?3:4;for(t=o.uint8array?new Uint8Array(l):new Array(l),i=s=0;s<l;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t}(e)},r.utf8decode=function(e){return o.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,o,i,s=e.length,l=new Array(2*s);for(t=r=0;t<s;)if((o=e[t++])<128)l[r++]=o;else if(4<(i=a[o]))l[r++]=65533,t+=i-1;else{for(o&=2===i?31:3===i?15:7;1<i&&t<s;)o=o<<6|63&e[t++],i--;1<i?l[r++]=65533:o<65536?l[r++]=o:(o-=65536,l[r++]=55296|o>>10&1023,l[r++]=56320|1023&o)}return l.length!==r&&(l.subarray?l=l.subarray(0,r):l.length=r),n.applyFromCharCode(l)}(e=n.transformTo(o.uint8array?"uint8array":"array",e))},n.inherits(c,s),c.prototype.processChunk=function(e){var t=n.transformTo(o.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var i=t;(t=new Uint8Array(i.length+this.leftOver.length)).set(this.leftOver,0),t.set(i,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var s=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+a[e[r]]>t?r:t}(t),l=t;s!==t.length&&(o.uint8array?(l=t.subarray(0,s),this.leftOver=t.subarray(s,t.length)):(l=t.slice(0,s),this.leftOver=t.slice(s,t.length))),this.push({data:r.utf8decode(l),meta:e.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=c,n.inherits(d,s),d.prototype.processChunk=function(e){this.push({data:r.utf8encode(e.data),meta:e.meta})},r.Utf8EncodeWorker=d},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,r){var n=e("./support"),o=e("./base64"),i=e("./nodejsUtils"),s=e("./external");function a(e){return e}function l(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}e("setimmediate"),r.newBlob=function(e,t){r.checkSupport("blob");try{return new Blob([e],{type:t})}catch{try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(e),n.getBlob(t)}catch{throw new Error("Bug : can't construct the Blob.")}}};var c={stringifyByChunk:function(e,t,r){var n=[],o=0,i=e.length;if(i<=r)return String.fromCharCode.apply(null,e);for(;o<i;)"array"===t||"nodebuffer"===t?n.push(String.fromCharCode.apply(null,e.slice(o,Math.min(o+r,i)))):n.push(String.fromCharCode.apply(null,e.subarray(o,Math.min(o+r,i)))),o+=r;return n.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch{return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&1===String.fromCharCode.apply(null,i.allocBuffer(1)).length}catch{return!1}}()}};function d(e){var t=65536,n=r.getTypeOf(e),o=!0;if("uint8array"===n?o=c.applyCanBeUsed.uint8array:"nodebuffer"===n&&(o=c.applyCanBeUsed.nodebuffer),o)for(;1<t;)try{return c.stringifyByChunk(e,n,t)}catch{t=Math.floor(t/2)}return c.stringifyByChar(e)}function u(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}r.applyFromCharCode=d;var h={};h.string={string:a,array:function(e){return l(e,new Array(e.length))},arraybuffer:function(e){return h.string.uint8array(e).buffer},uint8array:function(e){return l(e,new Uint8Array(e.length))},nodebuffer:function(e){return l(e,i.allocBuffer(e.length))}},h.array={string:d,array:a,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return i.newBufferFrom(e)}},h.arraybuffer={string:function(e){return d(new Uint8Array(e))},array:function(e){return u(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:a,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return i.newBufferFrom(new Uint8Array(e))}},h.uint8array={string:d,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:a,nodebuffer:function(e){return i.newBufferFrom(e)}},h.nodebuffer={string:d,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return h.nodebuffer.uint8array(e).buffer},uint8array:function(e){return u(e,new Uint8Array(e.length))},nodebuffer:a},r.transformTo=function(e,t){if(t=t||"",!e)return t;r.checkSupport(e);var n=r.getTypeOf(t);return h[n][e](t)},r.resolve=function(e){for(var t=e.split("/"),r=[],n=0;n<t.length;n++){var o=t[n];"."===o||""===o&&0!==n&&n!==t.length-1||(".."===o?r.pop():r.push(o))}return r.join("/")},r.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":n.nodebuffer&&i.isBuffer(e)?"nodebuffer":n.uint8array&&e instanceof Uint8Array?"uint8array":n.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(e){if(!n[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(e){var t,r,n="";for(r=0;r<(e||"").length;r++)n+="\\x"+((t=e.charCodeAt(r))<16?"0":"")+t.toString(16).toUpperCase();return n},r.delay=function(e,t,r){setImmediate(function(){e.apply(r||null,t||[])})},r.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r},r.extend=function(){var e,t,r={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===r[t]&&(r[t]=arguments[e][t]);return r},r.prepareContent=function(e,t,i,a,c){return s.Promise.resolve(t).then(function(e){return n.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&typeof FileReader<"u"?new s.Promise(function(t,r){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=function(e){r(e.target.error)},n.readAsArrayBuffer(e)}):e}).then(function(t){var d,u=r.getTypeOf(t);return u?("arraybuffer"===u?t=r.transformTo("uint8array",t):"string"===u&&(c?t=o.decode(t):i&&!0!==a&&(t=l(d=t,n.uint8array?new Uint8Array(d.length):new Array(d.length)))),t):s.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,r){var n=e("./reader/readerFor"),o=e("./utils"),i=e("./signature"),s=e("./zipEntry"),a=e("./support");function l(e){this.files=[],this.loadOptions=e}l.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(t)+", expected "+o.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4)===t;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=a.uint8array?"uint8array":"array",r=o.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,r,n=this.zip64EndOfCentralSize-44;0<n;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(i.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;
vendor: 4,643 bytes, line 2
2for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(i.CENTRAL_FILE_HEADER);)(e=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(i.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,i.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(i.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,i.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=t-r;if(0<n)this.isSignature(t,i.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=l},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,r){var n=e("./reader/readerFor"),o=e("./utils"),i=e("./compressedObject"),s=e("./crc32"),a=e("./utf8"),l=e("./compressions"),c=e("./support");function d(e,t){this.options=e,this.loadOptions=t}d.prototype={isEncrypted:function(){return!(1&~this.bitFlag)},useUTF8:function(){return!(2048&~this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in l)if(Object.prototype.hasOwnProperty.call(l,t)&&l[t].magic===e)return l[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new i(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=n(this.extraFields[1].value);
vendor: 2,524 bytes, line 2
2this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,r,n,o=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<o;)t=e.readInt(2),r=e.readInt(2),n=e.readData(r),this.extraFields[t]={id:t,length:r,value:n};e.setIndex(o)},handleUTF8:function(){var e=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var r=o.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var i=o.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(i)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=n(e.value);return 1!==t.readInt(1)||s(this.fileName)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=n(e.value);return 1!==t.readInt(1)||s(this.fileComment)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null}},t.exports=d},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,r){function n(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}}var o=e("./stream/StreamHelper"),i=e("./stream/DataWorker"),s=e("./utf8"),a=e("./compressedObject"),l=e("./stream/GenericWorker");n.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var n="string"===(r=e.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker();var i=!this._dataBinary;i&&!n&&(t=t.pipe(new s.Utf8EncodeWorker)),!i&&n&&(t=t.pipe(new s.Utf8DecodeWorker))}catch(e){(t=new l("error")).error(e)}return new o(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)}
vendor: 11,192 bytes, line 2
2,nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof a&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new s.Utf8EncodeWorker)),a.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof l?this._data:new i(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],d=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},u=0;u<c.length;u++)n.prototype[c[u]]=d;t.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,r){(function(e){var r,n,o=e.MutationObserver||e.WebKitMutationObserver;if(o){var i=0,s=new o(d),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),r=function(){a.data=i=++i%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){d(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(d,0)};else{var l=new e.MessageChannel;l.port1.onmessage=d,r=function(){l.port2.postMessage(0)}}var c=[];function d(){var e,t;n=!0;for(var r=c.length;r;){for(t=c,c=[],e=-1;++e<r;)t[e]();r=c.length}n=!1}t.exports=function(e){1!==c.push(e)||n||r()}}).call(this,typeof n<"u"?n:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(e,t,r){var n=e("immediate");function o(){}var i={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==o&&p(this,e)}function d(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function u(e,t,r){n(function(){var n;try{n=t(r)}catch(t){return i.reject(e,t)}n===e?i.reject(e,new TypeError("Cannot resolve promise with itself")):i.resolve(e,n)})}function h(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function p(e,t){var r=!1;function n(t){r||(r=!0,i.reject(e,t))}function o(t){r||(r=!0,i.resolve(e,t))}var s=g(function(){t(o,n)});"error"===s.status&&n(s.value)}function g(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}(t.exports=c).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){throw r})})},c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var r=new this.constructor(o);return this.state!==l?u(r,this.state===a?e:t,this.outcome):this.queue.push(new d(r,e,t)),r},d.prototype.callFulfilled=function(e){i.resolve(this.promise,e)},d.prototype.otherCallFulfilled=function(e){u(this.promise,this.onFulfilled,e)},d.prototype.callRejected=function(e){i.reject(this.promise,e)},d.prototype.otherCallRejected=function(e){u(this.promise,this.onRejected,e)},i.resolve=function(e,t){var r=g(h,t);if("error"===r.status)return i.reject(e,r.value);var n=r.value;if(n)p(e,n);else{e.state=a,e.outcome=t;for(var o=-1,s=e.queue.length;++o<s;)e.queue[o].callFulfilled(t)}return e},i.reject=function(e,t){e.state=s,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:i.resolve(new this(o),e)},c.reject=function(e){var t=new this(o);return i.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var s=new Array(r),a=0,l=-1,c=new this(o);++l<r;)d(e[l],l);return c;function d(e,o){t.resolve(e).then(function(e){s[o]=e,++a!==r||n||(n=!0,i.resolve(c,s))},function(e){n||(n=!0,i.reject(c,e))})}},c.race=function(e){if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var t,r=e.length,n=!1;if(!r)return this.resolve([]);for(var s=-1,a=new this(o);++s<r;)t=e[s],this.resolve(t).then(function(e){n||(n=!0,i.resolve(a,e))},function(e){n||(n=!0,i.reject(a,e))});return a}},{immediate:36}],38:[function(e,t,r){var n={};(0,e("./lib/utils/common").assign)(n,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=n},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,r){var n=e("./zlib/deflate"),o=e("./utils/common"),i=e("./utils/strings"),s=e("./zlib/messages"),a=e("./zlib/zstream"),l=Object.prototype.toString;function c(e){if(!(this instanceof c))return new c(e);this.options=o.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==r)throw new Error(s[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var d;if(d="string"==typeof t.dictionary?i.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(r=n.deflateSetDictionary(this.strm,d)))throw new Error(s[r]);this._dict_set=!0}}function d(e,t){var r=new c(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}c.prototype.push=function(e,t){var r,s,a=this.strm,c=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=i.string2buf(e):"[object ArrayBuffer]"===l.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new o.Buf8(c),a.next_out=0,a.avail_out=c),1!==(r=n.deflate(a,s))&&0!==r)return this.onEnd(r),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(i.buf2binstring(o.shrinkBuf(a.output,a.next_out))):this.onData(o.shrinkBuf(a.output,a.next_out)))}while((0<a.avail_in||0===a.avail_out)&&1!==r);return 4===s?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==s||(this.onEnd(0),!(a.avail_out=0))},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Deflate=c,r.deflate=d,r.deflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},r.gzip=function(e,t){return(t=t||{}).gzip=!0,d(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,r){var n=e("./zlib/inflate"),o=e("./utils/common"),i=e("./utils/strings"),s=e("./zlib/constants"),a=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),d=Object.prototype.toString;function u(e){if(!(this instanceof u))return new u(e);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&!(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==s.Z_OK)throw new Error(a[r]);this.header=new c,n.inflateGetHeader(this.strm,this.header)}function h(e,t){var r=new u(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}u.prototype.push=function(e,t){var r,a,l,c,u,h,p=this.strm,g=this.options.chunkSize,f=this.options.dictionary,m=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof e?p.input=i.binstring2buf(e):"[object ArrayBuffer]"===d.call(e)?p.input=new Uint8Array(e):p.input=e,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new o.Buf8(g),p.next_out=0,p.avail_out=g),(r=n.inflate(p,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&f&&(h="string"==typeof f?i.string2buf(f):"[object ArrayBuffer]"===d.call(f)?new Uint8Array(f):f,r=n.inflateSetDictionary(this.strm,h)),r===s.Z_BUF_ERROR&&!0===m&&(r=s.Z_OK,m=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),!(this.ended=!0);p.next_out&&(0!==p.avail_out&&r!==s.Z_STREAM_END&&(0!==p.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(l=i.utf8border(p.output,p.next_out),c=p.next_out-l,u=i.buf2string(p.output,l),p.next_out=c,p.avail_out=g-c,c&&o.arraySet(p.output,p.output,l,c,0),this.onData(u)):this.onData(o.shrinkBuf(p.output,p.next_out)))),0===p.avail_in&&0===p.avail_out&&(m=!0)}while((0<p.avail_in||0===p.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(p.avail_out=0))},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){e===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=u,r.inflate=h,r.inflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},r.ungzip=h},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,r){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";r.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,r,n,o){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),o);else for(var i=0;i<n;i++)e[o+i]=t[r+i]},flattenChunks:function(e){var t,r,n,o,i,s;for(t=n=0,r=e.length;t<r;t++)n+=e[t].length;for(s=new Uint8Array(n),t=o=0,r=e.length;t<r;t++)i=e[t],s.set(i,o),o+=i.length;return s}},i={arraySet:function(e,t,r,n,o){for(var i=0;i<n;i++)e[o+i]=t[r+i]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,o)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,i))},r.setTyped(n)},{}],42:[function(e,t,r){var n=e("./common"),o=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}
vendor: 5,600 bytes, line 2
2try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{i=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function l(e,t){if(t<65537&&(e.subarray&&i||!e.subarray&&o))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",s=0;s<t;s++)r+=String.fromCharCode(e[s]);return r}s[254]=s[254]=1,r.string2buf=function(e){var t,r,o,i,s,a=e.length,l=0;for(i=0;i<a;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(o=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(o-56320),i++),l+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(l),i=s=0;s<l;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(o=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(o-56320),i++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t},r.buf2binstring=function(e){return l(e,e.length)},r.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,o=t.length;r<o;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,n,o,i,a=t||e.length,c=new Array(2*a);for(r=n=0;r<a;)if((o=e[r++])<128)c[n++]=o;else if(4<(i=s[o]))c[n++]=65533,r+=i-1;else{for(o&=2===i?31:3===i?15:7;1<i&&r<a;)o=o<<6|63&e[r++],i--;1<i?c[n++]=65533:o<65536?c[n++]=o:(o-=65536,c[n++]=55296|o>>10&1023,c[n++]=56320|1023&o)}return l(c,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){t.exports=function(e,t,r,n){for(var o=65535&e,i=e>>>16&65535,s=0;0!==r;){for(r-=s=2e3<r?2e3:r;i=i+(o=o+t[n++]|0)|0,--s;);o%=65521,i%=65521}return o|i<<16}},{}],44:[function(e,t,r){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,r){var n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,o){var i=n,s=o+r;e^=-1;for(var a=o;a<s;a++)e=e>>>8^i[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,r){var n,o=e("../utils/common"),i=e("./trees"),s=e("./adler32"),a=e("./crc32"),l=e("./messages"),c=-2,d=258,u=262,h=113;function p(e,t){return e.msg=l[t],t}function g(e){return(e<<1)-(4<e?9:0)}function f(e){for(var t=e.length;0<=--t;)e[t]=0}function m(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(o.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function v(e,t){i._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,m(e.strm)}function b(e,t){e.pending_buf[e.pending++]=t}function y(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function w(e,t){var r,n,o=e.max_chain_length,i=e.strstart,s=e.prev_length,a=e.nice_match,l=e.strstart>e.w_size-u?e.strstart-(e.w_size-u):0,c=e.window,h=e.w_mask,p=e.prev,g=e.strstart+d,f=c[i+s-1],m=c[i+s];e.prev_length>=e.good_match&&(o>>=2),a>e.lookahead&&(a=e.lookahead);do{if(c[(r=t)+s]===m&&c[r+s-1]===f&&c[r]===c[i]&&c[++r]===c[i+1]){i+=2,r++;do{}while(c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&i<g);if(n=d-(g-i),i=g-d,s<n){if(e.match_start=t,a<=(s=n))break;f=c[i+s-1],m=c[i+s]}}}while((t=p[t&h])>l&&0!=--o);return s<=e.lookahead?s:e.lookahead}function x(e){var t,r,n,i,l,c,d,h,p,g,f=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-u)){for(o.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=r=e.hash_size;n=e.head[--t],e.head[t]=f<=n?n-f:0,--r;);for(t=r=f;n=e.prev[--t],e.prev[t]=f<=n?n-f:0,--r;);i+=f}if(0===e.strm.avail_in)break;if(c=e.strm,d=e.window,h=e.strstart+e.lookahead,g=void 0,(p=i)<(g=c.avail_in)&&(g=p),r=0===g?0:(c.avail_in-=g,o.arraySet(d,c.input,c.next_in,g,h),1===c.state.wrap?c.adler=s(c.adler,d,g,h):2===c.state.wrap&&(c.adler=a(c.adler,d,g,h)),c.next_in+=g,c.total_in+=g,g),e.lookahead+=r,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+3-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<u&&0!==e.strm.avail_in)}function _(e,t){for(var r,n;;){if(e.lookahead<u){if(x(e),e.lookahead<u&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-u&&(e.match_length=w(e,r)),e.match_length>=3)if(n=i._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;
vendor: 8,064 bytes, line 2
2else n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}function k(e,t){for(var r,n,o;;){if(e.lookahead<u){if(x(e),e.lookahead<u&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-u&&(e.match_length=w(e,r),e.match_length<=5&&(1===e.strategy||3===e.match_length&&4096<e.strstart-e.match_start)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){for(o=e.strstart+e.lookahead-3,n=i._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(v(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=i._tr_tally(e,0,e.window[e.strstart-1]))&&v(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=i._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}function C(e,t,r,n,o){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=o}function S(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(1146),this.dyn_dtree=new o.Buf16(122),this.bl_tree=new o.Buf16(78),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(16),this.heap=new o.Buf16(573),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(573),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function E(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:h,e.adler=2===t.wrap?0:1,t.last_flush=0,i._tr_init(t),0):p(e,c)}function I(e){var t,r=E(e);return 0===r&&((t=e.state).window_size=2*t.w_size,f(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),r}function A(e,t,r,n,i,s){if(!e)return c;var a=1;if(-1===t&&(t=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),i<1||9<i||8!==r||n<8||15<n||t<0||9<t||s<0||4<s)return p(e,c);8===n&&(n=9);var l=new S;return(e.state=l).strm=e,l.wrap=a,l.gzhead=null,l.w_bits=n,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=i+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new o.Buf8(2*l.w_size),l.head=new o.Buf16(l.hash_size),l.prev=new o.Buf16(l.w_size),l.lit_bufsize=1<<i+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new o.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=s,l.method=r,I(e)}n=[new C(0,0,0,0,function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(x(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,v(e,!1),0===e.strm.avail_out)||e.strstart-e.block_start>=e.w_size-u&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(v(e,!1),e.strm.avail_out),1)}),new C(4,4,8,4,_),new C(4,5,16,8,_),new C(4,6,32,32,_),new C(4,4,16,16,k),new C(8,16,32,32,k),new C(8,16,128,128,k),new C(8,32,128,256,k),new C(32,128,258,1024,k),new C(32,258,258,4096,k)],r.deflateInit=function(e,t){return A(e,t,8,15,8,0)},r.deflateInit2=A,r.deflateReset=I,r.deflateResetKeep=E,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?c:(e.state.gzhead=t,0):c},r.deflate=function(e,t){var r,o,s,l;if(!e||!e.state||5<t||t<0)return e?p(e,c):c;if(o=e.state,!e.output||!e.input&&0!==e.avail_in||666===o.status&&4!==t)return p(e,0===e.avail_out?-5:c);if(o.strm=e,r=o.last_flush,o.last_flush=t,42===o.status)if(2===o.wrap)e.adler=0,b(o,31),b(o,139),b(o,8),o.gzhead?(b(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),b(o,255&o.gzhead.time),b(o,o.gzhead.time>>8&255),b(o,o.gzhead.time>>16&255),b(o,o.gzhead.time>>24&255),b(o,9===o.level?2:2<=o.strategy||o.level<2?4:0),b(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(b(o,255&o.gzhead.extra.length),b(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=a(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(b(o,0),b(o,0),b(o,0),b(o,0),b(o,0),b(o,9===o.level?2:2<=o.strategy||o.level<2?4:0),b(o,3),o.status=h);else{var u=8+(o.w_bits-8<<4)<<8;u|=(2<=o.strategy||o.level<2?0:o.level<6?1:6===o.level?2:3)<<6,0!==o.strstart&&(u|=32),u+=31-u%31,o.status=h,y(o,u),0!==o.strstart&&(y(o,e.adler>>>16),y(o,65535&e.adler)),e.adler=1}if(69===o.status)if(o.gzhead.extra){for(s=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),m(e),s=o.pending,o.pending!==o.pending_buf_size));)b(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){s=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),m(e),s=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,b(o,l)}while(0!==l);o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),0===l&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){s=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),m(e),s=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,b(o,l)}while(0!==l);o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),0===l&&(o.status=103)}else o.status=103;if(103===o.status&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&m(e),o.pending+2<=o.pending_buf_size&&(b(o,255&e.adler),b(o,e.adler>>8&255),e.adler=0,o.status=h)):o.status=h),0!==o.pending){if(m(e),0===e.avail_out)return o.last_flush=-1,0}else if(0===e.avail_in&&g(t)<=g(r)&&4!==t)return p(e,-5);if(666===o.status&&0!==e.avail_in)return p(e,-5);if(0!==e.avail_in||0!==o.lookahead||0!==t&&666!==o.status){var w=2===o.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(x(e),0===e.lookahead)){if(0===t)return 1;break}
vendor: 6,036 bytes, line 2
2if(e.match_length=0,r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}(o,t):3===o.strategy?function(e,t){for(var r,n,o,s,a=e.window;;){if(e.lookahead<=d){if(x(e),e.lookahead<=d&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&0<e.strstart&&(n=a[o=e.strstart-1])===a[++o]&&n===a[++o]&&n===a[++o]){s=e.strstart+d;do{}while(n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&o<s);e.match_length=d-(s-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=i._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}(o,t):n[o.level].func(o,t);if(3!==w&&4!==w||(o.status=666),1===w||3===w)return 0===e.avail_out&&(o.last_flush=-1),0;if(2===w&&(1===t?i._tr_align(o):5!==t&&(i._tr_stored_block(o,0,0,!1),3===t&&(f(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),m(e),0===e.avail_out))return o.last_flush=-1,0}return 4!==t?0:o.wrap<=0?1:(2===o.wrap?(b(o,255&e.adler),b(o,e.adler>>8&255),b(o,e.adler>>16&255),b(o,e.adler>>24&255),b(o,255&e.total_in),b(o,e.total_in>>8&255),b(o,e.total_in>>16&255),b(o,e.total_in>>24&255)):(y(o,e.adler>>>16),y(o,65535&e.adler)),m(e),0<o.wrap&&(o.wrap=-o.wrap),0!==o.pending?0:1)},r.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&t!==h&&666!==t?p(e,c):(e.state=null,t===h?p(e,-3):0):c},r.deflateSetDictionary=function(e,t){var r,n,i,a,l,d,u,h,p=t.length;if(!e||!e.state||2===(a=(r=e.state).wrap)||1===a&&42!==r.status||r.lookahead)return c;for(1===a&&(e.adler=s(e.adler,t,p,0)),r.wrap=0,p>=r.w_size&&(0===a&&(f(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new o.Buf8(r.w_size),o.arraySet(h,t,p-r.w_size,r.w_size,0),t=h,p=r.w_size),l=e.avail_in,d=e.next_in,u=e.input,e.avail_in=p,e.next_in=0,e.input=t,x(r);r.lookahead>=3;){for(n=r.strstart,i=r.lookahead-2;r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++,--i;);r.strstart=n,r.lookahead=2,x(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=d,e.input=u,e.avail_in=l,r.wrap=a,0},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,r){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,t,r){t.exports=function(e,t){var r,n,o,i,s,a,l,c,d,u,h,p,g,f,m,v,b,y,w,x,_,k,C,S,E;r=e.state,n=e.next_in,S=e.input,o=n+(e.avail_in-5),i=e.next_out,E=e.output,s=i-(t-e.avail_out),a=i+(e.avail_out-257),l=r.dmax,c=r.wsize,d=r.whave,u=r.wnext,h=r.window,p=r.hold,g=r.bits,f=r.lencode,m=r.distcode,v=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;e:do{g<15&&(p+=S[n++]<<g,g+=8,p+=S[n++]<<g,g+=8),y=f[p&v];t:for(;;){if(p>>>=w=y>>>24,g-=w,0==(w=y>>>16&255))E[i++]=65535&y;else{if(!(16&w)){if(!(64&w)){y=f[(65535&y)+(p&(1<<w)-1)];continue t}if(32&w){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}x=65535&y,(w&=15)&&(g<w&&(p+=S[n++]<<g,g+=8),x+=p&(1<<w)-1,p>>>=w,g-=w),g<15&&(p+=S[n++]<<g,g+=8,p+=S[n++]<<g,g+=8),y=m[p&b];r:for(;;){if(p>>>=w=y>>>24,g-=w,!(16&(w=y>>>16&255))){if(!(64&w)){y=m[(65535&y)+(p&(1<<w)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(_=65535&y,g<(w&=15)&&(p+=S[n++]<<g,(g+=8)<w&&(p+=S[n++]<<g,g+=8)),l<(_+=p&(1<<w)-1)){e.msg="invalid distance too far back",r.mode=30;break e}if(p>>>=w,g-=w,(w=i-s)<_){if(d<(w=_-w)&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(C=h,(k=0)===u){if(k+=c-w,w<x){for(x-=w;E[i++]=h[k++],--w;);k=i-_,C=E}}else if(u<w){if(k+=c+u-w,(w-=u)<x){for(x-=w;E[i++]=h[k++],--w;);if(k=0,u<x){for(x-=w=u;E[i++]=h[k++],--w;);k=i-_,C=E}}}else if(k+=u-w,w<x){for(x-=w;E[i++]=h[k++],--w;);k=i-_,C=E}for(;2<x;)E[i++]=C[k++],E[i++]=C[k++],E[i++]=C[k++],x-=3;x&&(E[i++]=C[k++],1<x&&(E[i++]=C[k++]))}else{for(k=i-_;E[i++]=E[k++],E[i++]=E[k++],E[i++]=E[k++],2<(x-=3););x&&(E[i++]=E[k++],1<x&&(E[i++]=E[k++]))}break}}break}}while(n<o&&i<a);n-=x=g>>3,p&=(1<<(g-=x<<3))-1,e.next_in=n,e.next_out=i,e.avail_in=n<o?o-n+5:5-(n-o),e.avail_out=i<a?a-i+257:257-(i-a),r.hold=p,r.bits=g}},{}],49:[function(e,t,r){var n=e("../utils/common"),o=e("./adler32"),i=e("./crc32"),s=e("./inffast"),a=e("./inftrees"),l=-2;function c(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function d(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function u(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):l}function h(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,u(e)):l}function p(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?l:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,h(e))):l}function g(e,t){var r,n;
vendor: 5,024 bytes, line 2
2return e?(n=new d,(e.state=n).window=null,0!==(r=p(e,t))&&(e.state=null),r):l}var f,m,v=!0;function b(e){if(v){var t;for(f=new n.Buf32(512),m=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,f,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,m,0,e.work,{bits:5}),v=!1}e.lencode=f,e.lenbits=9,e.distcode=m,e.distbits=5}function y(e,t,r,o){var i,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),o>=s.wsize?(n.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(o<(i=s.wsize-s.wnext)&&(i=o),n.arraySet(s.window,t,r-o,i,s.wnext),(o-=i)?(n.arraySet(s.window,t,r-o,o,0),s.wnext=o,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0}r.inflateReset=h,r.inflateReset2=p,r.inflateResetKeep=u,r.inflateInit=function(e){return g(e,15)},r.inflateInit2=g,r.inflate=function(e,t){var r,d,u,h,p,g,f,m,v,w,x,_,k,C,S,E,I,A,T,O,L,$,N,R,P=0,D=new n.Buf8(4),M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return l;12===(r=e.state).mode&&(r.mode=13),p=e.next_out,u=e.output,f=e.avail_out,h=e.next_in,d=e.input,g=e.avail_in,m=r.hold,v=r.bits,w=g,x=f,$=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;v<16;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(2&r.wrap&&35615===m){D[r.check=0]=255&m,D[1]=m>>>8&255,r.check=i(r.check,D,2,0),v=m=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&m)){e.msg="unknown compression method",r.mode=30;break}if(v-=4,L=8+(15&(m>>>=4)),0===r.wbits)r.wbits=L;else if(L>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<L,e.adler=r.check=1,r.mode=512&m?10:12,v=m=0;break;case 2:for(;v<16;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(r.flags=m,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=m>>8&1),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,r.check=i(r.check,D,2,0)),v=m=0,r.mode=3;case 3:for(;v<32;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.head&&(r.head.time=m),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,D[2]=m>>>16&255,D[3]=m>>>24&255,r.check=i(r.check,D,4,0)),v=m=0,r.mode=4;case 4:for(;v<16;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.head&&(r.head.xflags=255&m,r.head.os=m>>8),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,r.check=i(r.check,D,2,0)),v=m=0,r.mode=5;case 5:if(1024&r.flags){for(;v<16;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.length=m,r.head&&(r.head.extra_len=m),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,r.check=i(r.check,D,2,0)),v=m=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(g<(_=r.length)&&(_=g),_&&(r.head&&(L=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,d,h,_,L)),512&r.flags&&(r.check=i(r.check,d,_,h)),g-=_,h+=_,r.length-=_),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===g)break e;for(_=0;L=d[h+_++],r.head&&L&&r.length<65536&&(r.head.name+=String.fromCharCode(L)),L&&_<g;);if(512&r.flags&&(r.check=i(r.check,d,_,h)),g-=_,h+=_,L)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===g)break e;for(_=0;L=d[h+_++],r.head&&L&&r.length<65536&&(r.head.comment+=String.fromCharCode(L)),L&&_<g;);if(512&r.flags&&(r.check=i(r.check,d,_,h)),g-=_,h+=_,L)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;v<16;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(m!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}v=m=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;v<32;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}e.adler=r.check=c(m),v=m=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=p,e.avail_out=f,e.next_in=h,e.avail_in=g,r.hold=m,r.bits=v,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){m>>>=7&v,v-=7&v,r.mode=27;break}for(;v<3;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}switch(r.last=1&m,v-=1,3&(m>>>=1)){case 0:r.mode=14;break;case 1:if(b(r),r.mode=20,6!==t)break;m>>>=2,v-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}m>>>=2,v-=2;break;case 14:for(m>>>=7&v,v-=7&v;v<32;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if((65535&m)!=(m>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&m,v=m=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(_=r.length){if(g<_&&(_=g),f<_&&(_=f),0===_)break e;n.arraySet(u,d,h,_,p),g-=_,h+=_,f-=_,p+=_,r.length-=_;break}r.mode=12;break;case 17:for(;v<14;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(r.nlen=257+(31&m),m>>>=5,v-=5,r.ndist=1+(31&m),m>>>=5,v-=5,r.ncode=4+(15&m),m>>>=4,v-=4,286<r.nlen||30<r.ndist){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;
vendor: 10,092 bytes, line 2
2v<3;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.lens[M[r.have++]]=7&m,m>>>=3,v-=3}for(;r.have<19;)r.lens[M[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,N={bits:r.lenbits},$=a(0,r.lens,0,19,r.lencode,0,r.work,N),r.lenbits=N.bits,$){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;E=(P=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,I=65535&P,!((S=P>>>24)<=v);){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(I<16)m>>>=S,v-=S,r.lens[r.have++]=I;else{if(16===I){for(R=S+2;v<R;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(m>>>=S,v-=S,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}L=r.lens[r.have-1],_=3+(3&m),m>>>=2,v-=2}else if(17===I){for(R=S+3;v<R;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}v-=S,L=0,_=3+(7&(m>>>=S)),m>>>=3,v-=3}else{for(R=S+7;v<R;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}v-=S,L=0,_=11+(127&(m>>>=S)),m>>>=7,v-=7}if(r.have+_>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;_--;)r.lens[r.have++]=L}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,N={bits:r.lenbits},$=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,N),r.lenbits=N.bits,$){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,N={bits:r.distbits},$=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,N),r.distbits=N.bits,$){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=g&&258<=f){e.next_out=p,e.avail_out=f,e.next_in=h,e.avail_in=g,r.hold=m,r.bits=v,s(e,x),p=e.next_out,u=e.output,f=e.avail_out,h=e.next_in,d=e.input,g=e.avail_in,m=r.hold,v=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;E=(P=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,I=65535&P,!((S=P>>>24)<=v);){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(E&&!(240&E)){for(A=S,T=E,O=I;E=(P=r.lencode[O+((m&(1<<A+T)-1)>>A)])>>>16&255,I=65535&P,!(A+(S=P>>>24)<=v);){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}m>>>=A,v-=A,r.back+=A}if(m>>>=S,v-=S,r.back+=S,r.length=I,0===E){r.mode=26;break}if(32&E){r.back=-1,r.mode=12;break}if(64&E){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&E,r.mode=22;case 22:if(r.extra){for(R=r.extra;v<R;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.length+=m&(1<<r.extra)-1,m>>>=r.extra,v-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;E=(P=r.distcode[m&(1<<r.distbits)-1])>>>16&255,I=65535&P,!((S=P>>>24)<=v);){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(!(240&E)){for(A=S,T=E,O=I;E=(P=r.distcode[O+((m&(1<<A+T)-1)>>A)])>>>16&255,I=65535&P,!(A+(S=P>>>24)<=v);){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}m>>>=A,v-=A,r.back+=A}if(m>>>=S,v-=S,r.back+=S,64&E){e.msg="invalid distance code",r.mode=30;break}r.offset=I,r.extra=15&E,r.mode=24;case 24:if(r.extra){for(R=r.extra;v<R;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.offset+=m&(1<<r.extra)-1,m>>>=r.extra,v-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===f)break e;if(_=x-f,r.offset>_){if((_=r.offset-_)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}k=_>r.wnext?(_-=r.wnext,r.wsize-_):r.wnext-_,_>r.length&&(_=r.length),C=r.window}else C=u,k=p-r.offset,_=r.length;for(f<_&&(_=f),f-=_,r.length-=_;u[p++]=C[k++],--_;);0===r.length&&(r.mode=21);break;case 26:if(0===f)break e;u[p++]=r.length,f--,r.mode=21;break;case 27:if(r.wrap){for(;v<32;){if(0===g)break e;g--,m|=d[h++]<<v,v+=8}if(x-=f,e.total_out+=x,r.total+=x,x&&(e.adler=r.check=r.flags?i(r.check,u,x,p-x):o(r.check,u,x,p-x)),x=f,(r.flags?m:c(m))!==r.check){e.msg="incorrect data check",r.mode=30;break}v=m=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;v<32;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(m!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}v=m=0}r.mode=29;case 29:$=1;break e;case 30:$=-3;break e;case 31:return-4;default:return l}return e.next_out=p,e.avail_out=f,e.next_in=h,e.avail_in=g,r.hold=m,r.bits=v,(r.wsize||x!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&y(e,e.output,e.next_out,x-e.avail_out)?(r.mode=31,-4):(w-=e.avail_in,x-=e.avail_out,e.total_in+=w,e.total_out+=x,r.total+=x,r.wrap&&x&&(e.adler=r.check=r.flags?i(r.check,u,x,e.next_out-x):o(r.check,u,x,e.next_out-x)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==w&&0===x||4===t)&&0===$&&($=-5),$)},r.inflateEnd=function(e){if(!e||!e.state)return l;var t=e.state;return t.window&&(t.window=null),e.state=null,0},r.inflateGetHeader=function(e,t){var r;return e&&e.state&&2&(r=e.state).wrap?((r.head=t).done=!1,0):l},r.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?l:11===r.mode&&o(1,t,n,0)!==r.check?-3:y(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,0):l},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,r){var n=e("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],i=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,l,c,d,u,h){var p,g,f,m,v,b,y,w,x,_=h.bits,k=0,C=0,S=0,E=0,I=0,A=0,T=0,O=0,L=0,$=0,N=null,R=0,P=new n.Buf16(16),D=new n.Buf16(16),M=null,z=0;for(k=0;k<=15;k++)P[k]=0;for(C=0;C<l;C++)P[t[r+C]]++;for(I=_,E=15;1<=E&&0===P[E];E--);if(E<I&&(I=E),0===E)return c[d++]=20971520,c[d++]=20971520,h.bits=1,0;for(S=1;S<E&&0===P[S];S++);for(I<S&&(I=S),k=O=1;k<=15;k++)if(O<<=1,(O-=P[k])<0)return-1;if(0<O&&(0===e||1!==E))return-1;for(D[1]=0,k=1;k<15;k++)D[k+1]=D[k]+P[k];for(C=0;C<l;C++)0!==t[r+C]&&(u[D[t[r+C]]++]=C);if(b=0===e?(N=M=u,19):1===e?(N=o,R-=257,M=i,z-=257,256):(N=s,M=a,-1),k=S,v=d,T=C=$=0,f=-1,m=(L=1<<(A=I))-1,1===e&&852<L||2===e&&592<L)return 1;for(;;){for(y=k-T,x=u[C]<b?(w=0,u[C]):u[C]>b?(w=M[z+u[C]],N[R+u[C]]):(w=96,0),p=1<<k-T,S=g=1<<A;c[v+($>>T)+(g-=p)]=y<<24|w<<16|x,0!==g;);for(p=1<<k-1;$&p;)p>>=1;if(0!==p?($&=p-1,$+=p):$=0,C++,0==--P[k]){if(k===E)break;k=t[r+u[C]]}if(I<k&&($&m)!==f){for(0===T&&(T=I),v+=S,O=1<<(A=k-T);A+T<E&&!((O-=P[A+T])<=0);)A++,O<<=1;if(L+=1<<A,1===e&&852<L||2===e&&592<L)return 1;c[f=$&m]=I<<24|A<<16|v-d}}return 0!==$&&(c[v+$]=k-T<<24|64<<16),h.bits=I,0}},{"../utils/common":41}],51:[function(e,t,r){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,t,r){var n=e("../utils/common");function o(e){for(var t=e.length;0<=--t;)e[t]=0}var i=256,s=286,a=30,l=15,c=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],d=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=new Array(576);o(p);var g=new Array(60);o(g);var f=new Array(512);o(f);var m=new Array(256);o(m);var v=new Array(29);o(v);var b,y,w,x=new Array(a);function _(e,t,r,n,o){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}function k(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function C(e){return e<256?f[e]:f[256+(e>>>7)]}function S(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function E(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,S(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function I(e,t,r){E(e,r[2*t],r[2*t+1])}function A(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function T(e,t,r){var n,o,i=new Array(16),s=0;for(n=1;n<=l;n++)i[n]=s=s+r[n-1]<<1;for(o=0;o<=t;o++){var a=e[2*o+1];0!==a&&(e[2*o]=A(i[a]++,a))}}function O(e){var t;for(t=0;t<s;t++)e.dyn_ltree[2*t]=0;for(t=0;t<a;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function L(e){8<e.bi_valid?S(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function $(e,t,r,n){var o=2*t,i=2*r;return e[o]<e[i]||e[o]===e[i]&&n[t]<=n[r]}function N(e,t,r){for(var n=e.heap[r],o=r<<1;o<=e.heap_len&&(o<e.heap_len&&$(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!$(t,n,e.heap[o],e.depth));)e.heap[r]=e.heap[o],r=o,o<<=1;e.heap[r]=n}function R(e,t,r){var n,o,s,a,l=0;if(0!==e.last_lit)for(;n=e.pending_buf[e.d_buf+2*l]<<8|e.pending_buf[e.d_buf+2*l+1],o=e.pending_buf[e.l_buf+l],l++,0===n?I(e,o,t):(I(e,(s=m[o])+i+1,t),0!==(a=c[s])&&E(e,o-=v[s],a),I(e,s=C(--n),r),0!==(a=d[s])&&E(e,n-=x[s],a)),l<e.last_lit;);I(e,256,t)}function P(e,t){var r,n,o,i=t.dyn_tree,s=t.stat_desc.static_tree,a=t.stat_desc.has_stree,c=t.stat_desc.elems,d=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<c;r++)0!==i[2*r]?(e.heap[++e.heap_len]=d=r,e.depth[r]=0):i[2*r+1]=0;for(;e.heap_len<2;)i[2*(o=e.heap[++e.heap_len]=d<2?++d:0)]=1,e.depth[o]=0,e.opt_len--,a&&(e.static_len-=s[2*o+1]);for(t.max_code=d,r=e.heap_len>>1;1<=r;r--)N(e,i,r);for(o=c;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],N(e,i,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,i[2*o]=i[2*r]+i[2*n],e.depth[o]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,i[2*r+1]=i[2*n+1]=o,e.heap[1]=o++,N(e,i,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,o,i,s,a,c=t.dyn_tree,d=t.max_code,u=t.stat_desc.static_tree,h=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,g=t.stat_desc.extra_base,f=t.stat_desc.max_length,m=0;for(i=0;i<=l;i++)e.bl_count[i]=0;for(c[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)f<(i=c[2*c[2*(n=e.heap[r])+1]+1]+1)&&(i=f,m++),c[2*n+1]=i,d<n||(e.bl_count[i]++,s=0,g<=n&&(s=p[n-g]),a=c[2*n],e.opt_len+=a*(i+s),h&&(e.static_len+=a*(u[2*n+1]+s)));if(0!==m){do{for(i=f-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[f]--,m-=2}while(0<m);for(i=f;0!==i;i--)for(n=e.bl_count[i];0!==n;
vendor: 5,013 bytes, line 2
2)d<(o=e.heap[--r])||(c[2*o+1]!==i&&(e.opt_len+=(i-c[2*o+1])*c[2*o],c[2*o+1]=i),n--)}}(e,t),T(i,d,e.bl_count)}function D(e,t,r){var n,o,i=-1,s=t[1],a=0,l=7,c=4;for(0===s&&(l=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)o=s,s=t[2*(n+1)+1],++a<l&&o===s||(a<c?e.bl_tree[2*o]+=a:0!==o?(o!==i&&e.bl_tree[2*o]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,i=o,c=(a=0)===s?(l=138,3):o===s?(l=6,3):(l=7,4))}function M(e,t,r){var n,o,i=-1,s=t[1],a=0,l=7,c=4;for(0===s&&(l=138,c=3),n=0;n<=r;n++)if(o=s,s=t[2*(n+1)+1],!(++a<l&&o===s)){if(a<c)for(;I(e,o,e.bl_tree),0!=--a;);else 0!==o?(o!==i&&(I(e,o,e.bl_tree),a--),I(e,16,e.bl_tree),E(e,a-3,2)):a<=10?(I(e,17,e.bl_tree),E(e,a-3,3)):(I(e,18,e.bl_tree),E(e,a-11,7));i=o,c=(a=0)===s?(l=138,3):o===s?(l=6,3):(l=7,4)}}o(x);var z=!1;function F(e,t,r,o){var i,s,a;E(e,0+(o?1:0),3),s=t,a=r,L(i=e),S(i,a),S(i,~a),n.arraySet(i.pending_buf,i.window,s,a,i.pending),i.pending+=a}r._tr_init=function(e){z||(function(){var e,t,r,n,o,i=new Array(16);for(n=r=0;n<28;n++)for(v[n]=r,e=0;e<1<<c[n];e++)m[r++]=n;for(m[r-1]=n,n=o=0;n<16;n++)for(x[n]=o,e=0;e<1<<d[n];e++)f[o++]=n;for(o>>=7;n<a;n++)for(x[n]=o<<7,e=0;e<1<<d[n]-7;e++)f[256+o++]=n;for(t=0;t<=l;t++)i[t]=0;for(e=0;e<=143;)p[2*e+1]=8,e++,i[8]++;for(;e<=255;)p[2*e+1]=9,e++,i[9]++;for(;e<=279;)p[2*e+1]=7,e++,i[7]++;for(;e<=287;)p[2*e+1]=8,e++,i[8]++;for(T(p,287,i),e=0;e<a;e++)g[2*e+1]=5,g[2*e]=A(e,5);b=new _(p,c,257,s,l),y=new _(g,d,0,a,l),w=new _(new Array(0),u,0,19,7)}(),z=!0),e.l_desc=new k(e.dyn_ltree,b),e.d_desc=new k(e.dyn_dtree,y),e.bl_desc=new k(e.bl_tree,w),e.bi_buf=0,e.bi_valid=0,O(e)},r._tr_stored_block=F,r._tr_flush_block=function(e,t,r,n){var o,s,a=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<i;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),P(e,e.l_desc),P(e,e.d_desc),a=function(e){var t;for(D(e,e.dyn_ltree,e.l_desc.max_code),D(e,e.dyn_dtree,e.d_desc.max_code),P(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*h[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=r+5,r+4<=o&&-1!==t?F(e,t,r,n):4===e.strategy||s===o?(E(e,2+(n?1:0),3),R(e,p,g)):(E(e,4+(n?1:0),3),function(e,t,r,n){var o;for(E(e,t-257,5),E(e,r-1,5),E(e,n-4,4),o=0;o<n;o++)E(e,e.bl_tree[2*h[o]+1],3);M(e,e.dyn_ltree,t-1),M(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),R(e,e.dyn_ltree,e.dyn_dtree)),O(e),n&&L(e)},r._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(m[r]+i+1)]++,e.dyn_dtree[2*C(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){var t;E(e,2,3),I(e,256,p),16===(t=e).bi_valid?(S(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}},{"../utils/common":41}],53:[function(e,t,r){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,r){(function(e){!function(e){if(!e.setImmediate){var t,r,n,o,i=1,s={},a=!1,l=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,t="[object process]"==={}.toString.call(e.process)?function(e){process.nextTick(function(){u(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(o="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",h,!1):e.attachEvent("onmessage",h),function(t){e.postMessage(o+t,"*")}):e.MessageChannel?((n=new MessageChannel).port1.onmessage=function(e){u(e.data)},function(e){n.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(r=l.documentElement,function(e){var t=l.createElement("script");t.onreadystatechange=function(){u(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(u,0,e)},c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var r=new Array(arguments.length-1),n=0;n<r.length;n++)r[n]=arguments[n+1];var o={callback:e,args:r};return s[i]=o,t(i),i++},c.clearImmediate=d}function d(e){delete s[e]}function u(e){if(a)setTimeout(u,0,e);else{var t=s[e];if(t){a=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{d(e),a=!1}}}}function h(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&u(+t.data.slice(o.length))}}(typeof self>"u"?void 0===e?this:e:self)}).call(this,typeof n<"u"?n:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)}
2(F)),F.exports);const B=o(U),H={config:{name:"DiagnosticsReporter",platforms:["web"]},report:async(e,t,r=[])=>{if(!e.reportName)throw new TypeError('Missing required "reportName" from options');const n=await j(e,t,r);return e.environment&&W(e.environment,n.filename,n.archive),n}},j=async(e,t,r)=>({filename:q(e.reportName),archive:await V(t,r)}),V=async(e,t)=>{const r=new B;r.file("air.json",JSON.stringify(e));for(const e of t){const t=G(e.name),n=Z(e.data);r.file(t,n)}return await r.generateAsync({type:"uint8array",compression:"DEFLATE",compressionOptions:{level:9}})},W=async(e,t,r)=>{const n=await K(e,t);return fetch(n,{body:r,headers:{"Content-Type":"application/zip"},method:"PUT"})},K=async(e,t)=>{const r=`https://${Q[e]}/fileupload/tenants/gir/public/path/reports?url`,n=await fetch(r,{body:JSON.stringify({filename:t}),headers:{"Content-Type":"application/json"},method:"POST"}),{uploadUrl:o}=await n.json();return o},q=e=>`${Y(e)}.zip`,G=e=>{let t=Y(e);return J(t)||(t+=".json"),t},Z=e=>Array.isArray(e)?e.map(e=>(e=>{let t;try{return JSON.stringify(e,(e,t)=>{if(!(e=>/^_/.test(e))(e))return void 0===t?"undefined":t})}catch(e){e instanceof Error&&(t=e.message)}return JSON.stringify({exception:"UNABLE TO SERIALIZE DATA",errorMessage:t})})(e)).join("\n"):"string"!=typeof e?JSON.stringify(e):e,Y=e=>e.replace(/[^0-9a-z_.]+/gi,"-"),J=e=>e.slice((Math.max(0,e.lastIndexOf("."))||1/0)+1),Q={ed:"apied-int-fileupload.services-ed.goto.com",rc:"apirc-int-fileupload.services-rc.goto.com",stage:"apistage-int-fileupload.services-stage.goto.com",live:"api-fileupload.services.goto.com"},X=[];for(let e=0;e<256;++e)X.push((e+256).toString(16).slice(1));const ee=new Uint8Array(16);function te(e,t,r){return crypto.randomUUID?crypto.randomUUID():function(e){const t=(e=e||{}).random??e.rng?.()??crypto.getRandomValues(ee);if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(e,t=0){return(X[e[t+0]]+X[e[t+1]]+X[e[t+2]]+X[e[t+3]]+"-"+X[e[t+4]]+X[e[t+5]]+"-"+X[e[t+6]]+X[e[t+7]]+"-"+X[e[t+8]]+X[e[t+9]]+"-"+X[e[t+10]]+X[e[t+11]]+X[e[t+12]]+X[e[t+13]]+X[e[t+14]]+X[e[t+15]]).toLowerCase()}(t)}(e)}const re="GoToContainer.machineId",ne={config:{name:"ExecutionContext",platforms:["electron","web"]},getContext:()=>oe()??ie(),internalCache:{runId:te(),machineId:null}},oe=()=>window[Et]?.executionContext,ie=()=>{if(ne.internalCache.machineId)return{...ne.internalCache};if(ne.internalCache.machineId=localStorage.getItem(re),ne.internalCache.machineId)return{...ne.internalCache};ne.internalCache.machineId=te();try{localStorage.setItem(re,ne.internalCache.machineId)}catch{}return{...ne.internalCache}};var se;!function(e){e.MUTE="MUTE",e.ACCEPTCALL="ACCEPTCALL",e.REJECTCALL="REJECTCALL",e.HANGUP="HANGUP",e.RING="RING"}(se||(se={}));const ae="Hid is not available";var le,ce;!function(e){e[e.LED=8]="LED",e[e.TELEPHONY=11]="TELEPHONY",e[e.CONSUMER=12]="CONSUMER"}(le||(le={})),function(e){e[e.MUTED=0]="MUTED",e[e.IN_CALL=1]="IN_CALL",e[e.RINGING=2]="RINGING"}(ce||(ce={}));const de=(e,t)=>e<<16|t,ue=e=>{const t=(4294901760&e)>>16,r=Object.values(le).indexOf(parseInt(t.toString(16),16)),n=Object.values(pe).indexOf(e);return{usagePage:Object.keys(le)[r],headsetHIDUsages:Object.keys(pe)[n]}},he=(e,t)=>{const r=Math.floor(t/8);return!!(e.getUint8(r)>>>t%8&1)};var pe;!function(e){e[e.LED_MUTE=de(le.LED,9)]="LED_MUTE",e[e.LED_OFF_HOOK=de(le.LED,23)]="LED_OFF_HOOK",e[e.LED_RING=de(le.LED,24)]="LED_RING",e[e.LED_HOLD=de(le.LED,32)]="LED_HOLD",e[e.LED_MICROPHONE=de(le.LED,33)]="LED_MICROPHONE",e[e.LED_ONLINE=de(le.LED,42)]="LED_ONLINE",e[e.TELEPHONY_RINGER=de(le.TELEPHONY,158)]="TELEPHONY_RINGER",e[e.TELEPHONY_HOOK_SWITCH=de(le.TELEPHONY,32)]="TELEPHONY_HOOK_SWITCH",e[e.TELEPHONY_FLASH=de(le.TELEPHONY,33)]="TELEPHONY_FLASH",e[e.TELEPHONY_REDIAL=de(le.TELEPHONY,36)]="TELEPHONY_REDIAL",e[e.TELEPHONY_MUTE=de(le.TELEPHONY,47)]="TELEPHONY_MUTE",e[e.TELEPHONY_LINE_BUSY=de(le.TELEPHONY,151)]="TELEPHONY_LINE_BUSY",e[e.TELEPHONY_PROGRAMMABLE_BUTTON=de(le.TELEPHONY,7)]="TELEPHONY_PROGRAMMABLE_BUTTON"}(pe||(pe={}));const ge=()=>navigator.hid,fe=e=>{if(!e)return[];const t=new Array;for(const r of e){const e=r.items.map(e=>e.reportSize*e.reportCount).reduce((e,t)=>
2e+t),n={reportId:r.reportId,bitsUsage:new Array(e)};let o=0;for(const e of r.items)e.usages?.forEach((e,t)=>{e in pe&&(n.bitsUsage[o+t]=e)}),o+=e.reportSize*e.reportCount;n.bitsUsage.some(e=>!!e)&&t.push(n)}return t},me=e=>`0x${e.toString(16).padStart(4,"0")}`;class ve{constructor(e){const t=[],r=[];e.collections.forEach(({outputReports:e,inputReports:n})=>{r.push(...fe(e)),t.push(...fe(n))}),this.inputDescriptors=t,this.outputDescriptors=r}getInputDescriptors(){return this.inputDescriptors}getOutputDescriptors(){return this.outputDescriptors}findInputByReportId(e){return this.inputDescriptors.find(t=>t.reportId===e)}findOutputByReportId(e){return this.outputDescriptors.find(t=>t.reportId===e)}findOutputByUsage(e){return this.outputDescriptors.find(t=>t.bitsUsage.some(t=>t===e))}}let be;const ye=()=>(be||(be=C.createLogger("HID")),be);class we{constructor(e){this.device=e}logInitialization(){const e=me(this.device.vendorId),t=me(this.device.productId);ye().info(`Initializing HID device: ${this.device.productName} (vendorId=${e}, productId=${t})`)}logDeviceCapabilities(e,t){ye().info("=== Device Report Structure ==="),this.logCollections(),this.logRecognizedReports(e,t),this.logSupportedUsages(e,t),ye().info("=== End Device Report Structure ===")}logReport(e,t){const r=this.calculateTotalBits(t.items);ye().info(`  ${e} Report ${t.reportId}: ${t.items.length} items, ${r} bits total`),t.items.forEach((e,t)=>{const r=this.formatItemUsages(e);ye().info(`    Item ${t}: size=${e.reportSize} count=${e.reportCount} usages=[${r}]`)})}logCollections(){this.device.collections.forEach((e,t)=>{const r=me(e.usagePage),n=me(e.usage);ye().info(`Collection ${t}: usagePage=${r} usage=${n}`),e.inputReports.forEach(e=>{this.logReport("Input",e)}),e.outputReports.forEach(e=>{this.logReport("Output",e)})})}logRecognizedReports(e,t){const r=e.map(e=>e.reportId).join(", "),n=t.map(e=>e.reportId).join(", ");ye().info(`Recognized Input Reports: [${r}]`),ye().info(`Recognized Output Reports: [${n}]`)}logSupportedUsages(e,t){const r=this.collectSupportedUsages(e,t),n=this.formatUsageNames(r);ye().info(`Supported Usages: [${n}]`)}collectSupportedUsages(e,t){const r=new Set;return[...e,...t].forEach(e=>{e.bitsUsage.forEach(e=>{void 0!==e&&r.add(e)})}),r}formatUsageNames(e){return Array.from(e).map(e=>ue(e).headsetHIDUsages).join(", ")}calculateTotalBits(e){return e.reduce((e,t)=>e+t.reportSize*t.reportCount,0)}formatItemUsages(e){return e.usages?e.usages.map(e=>me(e)).join(", "):e.isRange?`range(${me(e.usageMinimum)}-${me(e.usageMaximum)})`:"none"}}class xe{evaluateLineBusy(e,t,r){const n=e&&!1===t;return n&&r.isRinging?{action:se.ACCEPTCALL,reason:"LINE_BUSY pressed while ringing, Yealink-style"}:n&&r.isInCall?{action:se.HANGUP,reason:"LINE_BUSY pressed while in call, Yealink-style"}:{action:null,reason:`LINE_BUSY ${e?"pressed":"released"} but no matching state (previousValue=${t})`}}shouldIgnoreLineBusyInHookSwitch(e,t){return e&&t.isRinging}}class _e{evaluateLineBusy(e,t,r){return{action:null,reason:"IGNORE LINE_BUSY (used as status flag by this vendor)"}}shouldIgnoreLineBusyInHookSwitch(e,t){return!1}}class ke{static createStrategy(e){return 27027===e?new xe:new _e}}class Ce{constructor(){this.lastMuteCommandTime=0,this.lastRingCommandTime=0,this.ignoreUntilTime=0,this.MUTE_ECHO_IGNORE_MS=500,this.RING_ECHO_SUPPRESS_MS=1e3,this.RING_REJECT_WINDOW_MS=3e4,this.IGNORE_AFTER_RING_MS=500}recordMuteCommand(){this.lastMuteCommandTime=performance.now()}recordRingCommand(){this.lastRingCommandTime=performance.now(),this.ignoreUntilTime=performance.now()+this.IGNORE_AFTER_RING_MS}shouldIgnoreMuteEcho(){return performance.now()-this.lastMuteCommandTime<this.MUTE_ECHO_IGNORE_MS}isWithinRejectWindow(){const e=performance.now()-this.lastRingCommandTime;return e>this.RING_ECHO_SUPPRESS_MS&&e<this.RING_REJECT_WINDOW_MS}getTimeSinceRing(){return performance.now()-this.lastRingCommandTime}getTimeSinceMute(){return performance.now()-this.lastMuteCommandTime}shouldIgnoreAllReports(){return performance.now()<this.ignoreUntilTime}}class Se{constructor(){this.inUseByAnotherApp=!1}isBlocked(){return this.inUseByAnotherApp}checkForRelease(e,t){this.inUseByAnotherApp&&this.isHookSwitchOff(e,t)&&this.releaseDevice()}checkForTakeover(e,t,r,n){this.inUseByAnotherApp||this.isIdle(r,n)&&this.isHookSwitchOn(e,t)&&this.blockDevice()}isHookSwitchOn(e,t){return e===pe.TELEPHONY_HOOK_SWITCH&&t}isHookSwitchOff(e,t){return e===pe.TELEPHONY_HOOK_SWITCH&&!t}isIdle(e,t){return!e&&!t}releaseDevice(){ye().info("Device released by other app (hook switch off detected)"),this.inUseByAnotherApp=!1}blockDevice(){ye().warn("Device appears to be controlled by another app (received HOOK_SWITCH=true while idle)"),this.inUseByAnotherApp=!0}}class Ee{constructor(e,t){this.timeWindowFilter=e,this.vendorStrategy=t}evaluate(e,t,r,n){return e&&r.isRinging?{action:se.ACCEPTCALL,reason:"hook pressed while ringing"}:!e||r.isInCall||r.isRinging?!e&&!0===t&&r.isInCall?{action:se.HANGUP,reason:"hook released while in call"}:!e&&r.isRinging?this.evaluateReject(t,r,n):{action:null,reason:`hook ${e?"pressed":"released"} but no matching state`}:{action:se.ACCEPTCALL,reason:"hook pressed, not in call"}}evaluateReject(e,t,r){const n=r?.find(({usage:e,value:t})=>e===pe.TELEPHONY_LINE_BUSY&&!0===t);if(this.vendorStrategy.shouldIgnoreLineBusyInHookSwitch(!!n,t))return{action:null,reason:"HOOK_SWITCH=false with LINE_BUSY=true, waiting for LINE_BUSY handler"};const o=this.timeWindowFilter.isWithinRejectWindow();return!0===e||o?{action:se.REJECTCALL,reason:`hook=false, previousValue=${e}, timeSinceRing=${this.timeWindowFilter.getTimeSinceRing().toFixed(0)}ms`}:{action:null,reason:`hook released but outside reject window, timeSinceRing=${this.timeWindowFilter.getTimeSinceRing().toFixed(0)}ms`}}}class Ie{constructor(e){this.vendorStrategy=e}evaluate(e,t,r,n){return this.vendorStrategy.evaluateLineBusy(e,t,r)}}class Ae{evaluate(e,t,r,n){return e&&r.isRinging?{action:se.REJECTCALL,reason:"programmable button pressed while ringing, Yealink-style"}:{action:null,reason:`programmable button ${e?"pressed":"released"} but no matching state`}}}class Te{constructor(e){this.timeWindowFilter=e}evaluate(e,t,r,n){return e?this.timeWindowFilter.shouldIgnoreMuteEcho()?{action:null,reason:`IGNORE MUTE (echo ${this.timeWindowFilter.getTimeSinceMute()}ms after app command)`}:{action:se.MUTE,reason:"MUTE/UNMUTE (physical button pressed)"}:{action:null,reason:"MUTE released (no action)"}}}class Oe{constructor(e){this.context=e}async execute(e=!0){const t=!0===this.context.deviceState.get(ce.MUTED);
2ye().info("Action: "+(t?"UNMUTE":"MUTE"));const r=new Set;this.context.updateUsageState(r,pe.LED_MUTE,!t),this.context.deviceState.set(ce.MUTED,!t),this.context.timeWindowFilter.recordMuteCommand(),await this.context.sendReports(r),e&&this.context.dispatchEvent(se.MUTE)}}class Le{constructor(e){this.context=e}async execute(){ye().info("Action: ACCEPT CALL");const e=new Set;this.context.updateUsageState(e,pe.LED_OFF_HOOK,!0),this.context.updateUsageState(e,pe.LED_ONLINE,!0),this.context.updateUsageState(e,pe.TELEPHONY_HOOK_SWITCH,!0),this.context.updateUsageState(e,pe.LED_RING,!1),this.context.updateUsageState(e,pe.TELEPHONY_RINGER,!1),this.context.deviceState.set(ce.IN_CALL,!0),this.context.deviceState.set(ce.RINGING,!1),await this.context.sendReports(e),this.context.dispatchEvent(se.ACCEPTCALL)}}class $e{constructor(e){this.context=e}async execute(){ye().info("Action: HANGUP");const e=new Set;this.context.updateUsageState(e,pe.LED_OFF_HOOK,!1),this.context.updateUsageState(e,pe.TELEPHONY_HOOK_SWITCH,!1),this.context.updateUsageState(e,pe.TELEPHONY_LINE_BUSY,!1),this.context.updateUsageState(e,pe.LED_ONLINE,!1),this.context.deviceState.set(ce.IN_CALL,!1),this.context.deviceState.set(ce.MUTED,!1),await this.context.sendReports(e),this.context.dispatchEvent(se.HANGUP)}}class Ne{constructor(e){this.context=e}async execute(){ye().info("Action: REJECT CALL");const e=new Set;this.context.updateUsageState(e,pe.LED_OFF_HOOK,!1),this.context.updateUsageState(e,pe.TELEPHONY_HOOK_SWITCH,!1),this.context.updateUsageState(e,pe.LED_RING,!1),this.context.updateUsageState(e,pe.TELEPHONY_RINGER,!1),this.context.updateUsageState(e,pe.LED_ONLINE,!1),this.context.deviceState.set(ce.RINGING,!1),await this.context.sendReports(e),this.context.dispatchEvent(se.REJECTCALL)}}class Re{constructor(e){this.context=e}async execute(){ye().info("Action: RING"),this.context.deviceState.get(ce.IN_CALL)&&(ye().info("Call in progress, resetting to initial state first"),await this.context.setToInitialState(),await new Promise(e=>setTimeout(e,500)));const e=new Set;this.context.updateUsageState(e,pe.LED_RING,!0),this.context.updateUsageState(e,pe.TELEPHONY_RINGER,!0),this.context.updateUsageState(e,pe.TELEPHONY_LINE_BUSY,!1),this.context.deviceState.set(ce.RINGING,!0),this.context.timeWindowFilter.recordRingCommand(),await this.context.sendReports(e),this.context.dispatchEvent(se.RING)}}class Pe{get eventTarget(){return this._eventTarget}get device(){return this._device}constructor(e){this._eventTarget=new EventTarget,this.timeWindowFilter=new Ce,this.externalAppDetector=new Se,this.programmableButtonHandler=new Ae,this.outputReportDescriptors=[],this.inputReportDescriptors=[],this.deviceState=new Map([[ce.MUTED,!1],[ce.IN_CALL,!1],[ce.RINGING,!1]]),this.states=new Map,this.handleInputReport=({data:e,reportId:t})=>{if(this.timeWindowFilter.shouldIgnoreAllReports())return void ye().info(`Ignoring input report (report ID: ${t}) - within post-RING ignore window`);const r=this.registry.findInputByReportId(t);if(!r)return void ye().warn(`Unknown input report ID ${t} from ${this._device.productName}. Known report IDs: [${this.inputReportDescriptors.map(e=>e.reportId).join(", ")}]`);if(!this.validateReportPayload(e,r,t))return;const n=((e,t)=>{const r=[];for(let n=0;n<t.bitsUsage.length;n++){const o=t.bitsUsage[n];if(void 0===o)continue;const i=he(e,n);r.push({usage:o,value:i})}return r})(e,r);0!==n.length&&this.processUsageValues(n)},this._device=e,this.registry=new ve(e),this.logger=new we(e),this.logger.logInitialization(),this.inputReportDescriptors.push(...this.registry.getInputDescriptors()),this.outputReportDescriptors.push(...this.registry.getOutputDescriptors()),this.vendorStrategy=ke.createStrategy(e.vendorId),this.hookSwitchHandler=new Ee(this.timeWindowFilter,this.vendorStrategy),this.lineBusyHandler=new Ie(this.vendorStrategy),this.muteHandler=new Te(this.timeWindowFilter),this.handlerRegistry=new Map([[pe.TELEPHONY_HOOK_SWITCH,this.hookSwitchHandler],[pe.TELEPHONY_LINE_BUSY,this.lineBusyHandler],[pe.TELEPHONY_PROGRAMMABLE_BUTTON,this.programmableButtonHandler],[pe.TELEPHONY_MUTE,this.muteHandler]]);const t=this.createActionContext();this.muteAction=new Oe(t),this.acceptCallAction=new Le(t),this.hangupAction=new $e(t),this.rejectCallAction=new Ne(t),this.ringAction=new Re(t),this.logger.logDeviceCapabilities(this.registry.getInputDescriptors(),this.registry.getOutputDescriptors()),this._device.addEventListener("inputreport",this.handleInputReport)}
2async setToInitialState(){if(this.externalAppDetector.isBlocked())return void ye().warn("Skipping reset: device in use by another app");ye().info("Action: RESET TO INITIAL STATE");const e=new Set;[pe.LED_OFF_HOOK,pe.LED_ONLINE,pe.LED_RING,pe.LED_MUTE,pe.TELEPHONY_HOOK_SWITCH,pe.TELEPHONY_RINGER,pe.TELEPHONY_LINE_BUSY,pe.TELEPHONY_PROGRAMMABLE_BUTTON].forEach(t=>{const r=this.registry.findOutputByUsage(t);r&&(e.add(r.reportId),this.states.set(t,!1))}),await this.sendReports(e),this.deviceState.set(ce.IN_CALL,!1),this.deviceState.set(ce.MUTED,!1),this.deviceState.set(ce.RINGING,!1)}async triggerAction(e){if(this.externalAppDetector.isBlocked())ye().warn(`Blocking action ${e}: device in use by another app`);else switch(e){case se.MUTE:await this.muteAction.execute(!1);break;case se.ACCEPTCALL:await this.acceptCallAction.execute();break;case se.HANGUP:await this.hangupAction.execute();break;case se.RING:await this.ringAction.execute();break;case se.REJECTCALL:await this.rejectCallAction.execute()}}validateReportPayload(e,t,r){const n=t.bitsUsage.length/8;return e.byteLength===n||(ye().warn(`Invalid payload size for report ${r}: expected ${n}, got ${e.byteLength}`),!1)}processUsageValues(e){const t=this.deviceState.get(ce.RINGING)??!1,r=this.deviceState.get(ce.IN_CALL)??!1;e.forEach(({usage:n,value:o})=>{const i=this.states.get(n);this.states.set(n,o),this.externalAppDetector.checkForRelease(n,o),this.externalAppDetector.checkForTakeover(n,o,t,r),i!==o&&this.handleUsageChange(n,o,i,e)});const n=e.find(({usage:e})=>e===pe.TELEPHONY_HOOK_SWITCH);if(n){const t=this.states.get(pe.TELEPHONY_HOOK_SWITCH);t!==n.value||this.handleUsageChange(n.usage,n.value,t,e)}}handleUsageChange(e,t,r,n){const o=this.createDeviceContext(),{action:i,reason:s}=this.evaluateUsageAction(e,t,r,n||[],o);i&&(ye().info(`DECISION: ${i} (${s})`),this.triggerAction(i))}createDeviceContext(){return{isRinging:this.deviceState.get(ce.RINGING)??!1,isInCall:this.deviceState.get(ce.IN_CALL)??!1,isMuted:this.deviceState.get(ce.MUTED)??!1,vendorId:this._device.vendorId}}createActionContext(){return{deviceState:this.deviceState,timeWindowFilter:this.timeWindowFilter,updateUsageState:this.updateUsageState.bind(this),sendReports:this.sendReports.bind(this),dispatchEvent:this.dispatchEvent.bind(this),setToInitialState:this.setToInitialState.bind(this)}}evaluateUsageAction(e,t,r,n,o){const i=this.handlerRegistry.get(e);if(!i){const{headsetHIDUsages:t}=ue(e);return{action:null,reason:`usage ${t} not handled`}}const s=i.evaluate(t,r,o,n);return e===pe.TELEPHONY_MUTE&&t&&s.action===se.MUTE?(this.muteAction.execute(!0),{action:null,reason:s.reason}):s}updateUsageState(e,t,r){const n=this.registry.findOutputByUsage(t);n&&(e.add(n.reportId),this.states.set(t,r))}async sendReports(e){const t=Array.from(e).map(e=>this.sendOutputReport(e));await Promise.all(t)}async sendOutputReport(e){const t=this.registry.findOutputByReportId(e);if(!t)return;const r=[];t.bitsUsage.forEach(e=>{if(void 0===e)return;const t=this.states.get(e)??!1,{headsetHIDUsages:n}=ue(e);r.push(`${n}=${t}`)}),ye().info(`Sending to headset (Report ID: ${e}): ${r.join(", ")}`);const n=((e,t)=>{const r=t.bitsUsage.length/8,n=new ArrayBuffer(r),o=new Uint8Array(n);return t.bitsUsage.forEach((t,r)=>{if(!t)return;const n=Math.floor(r/8),i=r%8;!0===e.get(t)&&(o[n]|=1<<i)}),o})(this.states,t);await this._device.sendReport(e,n)}dispatchEvent(e){this._eventTarget.dispatchEvent(new Event(e))}getUsagePageDescriptors(e,t,r=!1){const n={INPUT:[],OUTPUT:[]};return e.collections.forEach(({usagePage:e,inputReports:o,outputReports:i})=>{if(!t.includes(e))return;const s=this.extractUsages(o),a=this.extractUsages(i);n.INPUT.push(...this.formatDescriptors(s,r)),n.OUTPUT.push(...this.formatDescriptors(a,r))}),n}extractUsages(e){const t=[];for(const r of e)for(const e of r.items)Array.isArray(e.usages)&&t.push(...e.usages);return t}formatDescriptors(e,t){const r=[];for(const n of e){const{usagePage:e,headsetHIDUsages:o}=ue(n),i=n.toString(16),s=i.slice(0,1),a=i.slice(1,5),l=t?e:s,c=t?o?.toString()??a:a;let d=r.find(e=>e.usagePage===l);d||(d={usagePage:l,usages:[]},r.push(d)),c&&!d.usages.includes(c)&&d.usages.push(c)}return r}}const De=new Map,Me=e=>{const t=De.get(e);if(!t)throw Error("This device is not opened.");return t};let ze=[];const Fe={config:{name:"Hid",platforms:["web"]},getHid(){return navigator?.hid},async getDevices(){return navigator.hid?(await ge().getDevices()).filter(({vendorId:e,productId:t})=>!ze.some(r=>r.productId===t&&r.vendorId===e)):Promise.reject(ae)},async requestDeviceAccess(e){const[t]=await ge().requestDevice(e);return t},async openDevice(e){!e.opened&&await e.open(),(e=>{De.get(e)||De.set(e,new Pe(e))})(e)},async closeDevice(e){e.opened&&await e.close()},bindEvent(e){return Me(e).eventTarget},async triggerAction(e,t){await Me(e).triggerAction(t)},getDeviceState(e){return Me(e).deviceState},resetToInitialState(e){Me(e).setToInitialState()},isSupported(){return"hid"in navigator},setUnsupportedDevices:e=>{ze=e},getUsagePageDescriptors:(e,t,r=!1)=>Me(e).getUsagePageDescriptors(e,t,r)},Ue=(e,t)=>"object"==typeof e&&"object"==typeof t?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>Ue(e[r],t[r])):e===t,Be=(e,t)=>e.keyCombination.code>t.keyCombination.code?1:e.keyCombination.code<t.keyCombination.code?-1:((e,t)=>!e.global&&t.global?1:e.global&&!t.global?-1:0)(e,t),He=(e,t)=>{if(e.length!==t.length)return!1;const r=[...e].sort(Be),n=[...t].sort(Be);return Ue(n,r)},je=e=>"object"==typeof e&&"string"==typeof e.code&&"boolean"==typeof e.ctrlKey&&"boolean"==typeof e.altKey&&"boolean"==typeof e.metaKey&&"boolean"==typeof e.shiftKey,Ve=(e,t,r,n)=>`action=${e} ${(e=>`code=${e.code} altKey=${e.altKey.toString()} ctrlKey=${e.ctrlKey.toString()} metaKey=${e.metaKey.toString()} shiftKey=${e.shiftKey.toString()}`)(t)} global=${n.toString()} shortcutId=${r}`,We=(e,t,r)=>{let n=`action=updateConfiguration type=${e}`;return r&&(n+=` shortcutId=${r}`),t&&(n+=` ${(e=>{let t=`configurationCount=${e.length}"`;return e.length&&(t+=` configuration="${JSON.stringify(e)}`),t})(t)}`),n},Ke=(e,t,r)=>`failure=${e} type=${t} error=${r}`;var qe;!function(e){e[e.MetaLeft=0]="MetaLeft",e[e.MetaRight=1]="MetaRight",e[e.AltLeft=2]="AltLeft",e[e.AltRight=3]="AltRight",e[e.ControlLeft=4]="Control
2Left",e[e.ControlRight=5]="ControlRight",e[e.ShiftLeft=6]="ShiftLeft",e[e.ShiftRight=7]="ShiftRight"}(qe||(qe={}));class Ge{getCode(e){return e?.split("Key")?.pop()?.toLowerCase()}}class Ze extends Ge{constructor(){super(...arguments),this.listOfCommandMacOsCombinationUnavailable=["c","v","a","z","x","f","g","h","m","o","p","s","t","w","q"]}isValidKeyboardShortcutKeyCombination({altKey:e,metaKey:t,ctrlKey:r,shiftKey:n,code:o}){const i=[];let s=!1;const a=this.getCode(o);return a&&!Object.keys(qe).map(e=>e.toLowerCase()).includes(a)&&(e||t||r||n)?!t||e||r||n||!this.listOfCommandMacOsCombinationUnavailable.some(e=>e==a)?(t&&e&&"escape"===a||t&&r&&("space"===a||"f"===a))&&i.push("AlreadyUsedSystem"):i.push("AlreadyUsedGoTo"):s=!0,{errorCodes:i,isInvalid:s||i.length>0}}}class Ye extends Ge{constructor(){super(...arguments),this.listOfControlWindowsCombinationUnavailable=["x","c","v","z","f4","a","d","e","r","y","arrowleft","arrowright","arrowdown","arrowup","escape","space","f10","f13"]}isValidKeyboardShortcutKeyCombination({altKey:e,metaKey:t,ctrlKey:r,shiftKey:n,code:o}){const i=[];let s=!1;const a=this.getCode(o);return a&&!Object.keys(qe).map(e=>e.toLowerCase()).includes(a)&&(e||t||r||n)?r&&!e&&!t&&!n&&this.listOfControlWindowsCombinationUnavailable.some(e=>e==a)&&i.push("AlreadyUsedGoTo"):s=!0,{errorCodes:i,isInvalid:s||i.length>0}}}class Je{static getInstance(){return Je.instance||(Je.instance=window.navigator.userAgent.toLowerCase().indexOf("mac")>0?new Ze:new Ye),Je.instance}}let Qe={},Xe=0;const et=new Map;let tt=C.createLogger("KeyboardShortcuts");const rt={config:{name:"KeyboardShortcuts",platforms:["web"]},subscribe:async(e,t,r)=>{const n=Xe++,o=await nt(e,t,r),i={shortcutId:e,windowForLocalShortcuts:t,onShortcutPressedListener:r,internalUnsubscribeFn:o};return et.set(n,i),async()=>{const t=et.get(n);if(!t)throw new Error(`Keyboard shortcuts unsubscribe function for shortcut ${e} called more than once`);et.delete(n),await t.internalUnsubscribeFn()}},systemInterface:{initializeLogger:e=>{tt=e},updateConfiguration:async(e,t)=>{const r={...Qe};Qe[e]=t,await st(r,e),tt.log(We("updateConfiguration",t,e))},updateConfigurations:async e=>{const t=Qe;Qe=e,await st(t),tt.log(We("updateConfigurations"))},isValidConfiguration:e=>{if("object"!=typeof e)return!1;try{for(const t in e){const r=e[t];if(!Array.isArray(r))return!1;for(let e=0;e<r.length;e++)if(!je(r[e].keyCombination))return!1}return!0}catch(e){return console.error(e),!1}},isValidKeyboardShortcutKeyCombination:e=>Je.getInstance().isValidKeyboardShortcutKeyCombination(e)}},nt=async(e,t,r)=>{const n=Qe[e]??[],o=[];for(const i of n)if(i.global)try{const t=await ot(e,r,i.keyCombination);o.push(t)}catch(e){throw tt.error(Ke("subscribe","global",JSON.stringify(e))),new Error(`${e}`)}else{const n=it(e,t,r,i.keyCombination,i.useKeyUp);o.push(async()=>n())}return async()=>{for(const e of o)try{await e()}catch(e){tt.error(Ke("unsubscribe","global",JSON.stringify(e)))}}},ot=async(e,t,r)=>{const n=(()=>{const e=globalThis[Et];if(e)return e.plugins.GlobalKeyboardShortcuts})();return n?await n.subscribe(r,n=>{t(e),tt.log(Ve("press",r,e,!0))}):(tt.error(Ke("pluginNotAvailable","global")),async()=>{})},it=(e,t,r,n,o)=>{const i=o?"keyup":"keydown",s=t=>{if(!t.repeat&&((e,t)=>e.code===t.code&&e.altKey===t.altKey&&e.ctrlKey===t.ctrlKey&&e.metaKey===t.metaKey&&e.shiftKey===t.shiftKey)(t,n))return r(e),tt.log(Ve("press",n,e,!1)),t.preventDefault(),t.stopPropagation(),!1};return t.addEventListener(i,s),()=>t.removeEventListener(i,s)},st=async(e,t)=>{const r=[...et.keys()];for(const n of r){let r=et.get(n);if(!r||t&&r.shortcutId!==t)continue;const o=e[r.shortcutId]??[],i=Qe[r.shortcutId]??[];if(He(o,i))continue;const s=r.internalUnsubscribeFn;r.internalUnsubscribeFn=async()=>{},await s();const a=await nt(r.shortcutId,r.windowForLocalShortcuts,r.onShortcutPressedListener);r=et.get(n),r?r.internalUnsubscribeFn=a:await a()}},at=new Map,lt=new Map;let ct=0;const dt=new Map,ut={config:{name:"Notification",platforms:["web"]},isSupported:async()=>"Notification"in globalThis,show:async e=>{await ht();const{title:t,body:r}=pt(e.texts),{icon:n,image:o}=gt(e.images??[]),i=new globalThis.Notification(t,{body:r,icon:n,image:o,silent:e.silent});ft(i,e,mt),at.set(e.id,i)},close:async e=>{const t=at.get(e);if(!t)throw new Error(`Notification not found in map by ID ${e}`);t.close(),at.delete(e)},subscribeForEvents:async(e,t)=>{const r=ct++,n=dt.get(e);if(n)n.set(r,t);else{dt.set(e,new Map([[r,t]]));const n=lt.get(e);
2n&&(n.forEach(e=>t(e)),lt.delete(e))}return async()=>{const t=dt.get(e);if(!t)throw new Error(`Listener not found in map by source ${e}`);if(!t.delete(r))throw new Error(`Listener not found in map by ID ${r}`);0===t.size&&dt.delete(e)}}},ht=async()=>{if("denied"===globalThis.Notification.permission||"default"===globalThis.Notification.permission&&"granted"!==await globalThis.Notification.requestPermission())throw new Error("Permission not granted for notifications")},pt=e=>{let t,r="";return e.length>0&&(r=e[0].content,e.length>1&&(t=e.slice(1).map(e=>e.content).join("\n"))),{title:r,body:t}},gt=e=>{let t,r;return e.length>0&&(t=e[0].url,e.length>1&&(r=e[1].url)),{icon:t,image:r}},ft=(e,t,r)=>{const n=e=>r({notificationId:t.id,notificationSource:t.source,eventId:e});e.onshow=e=>n("show"),e.onclick=e=>n("click"),e.onclose=e=>n("close")},mt=e=>{const t=dt.get(e.notificationSource);if(t)t.forEach(t=>t(e));else{const t=lt.get(e.notificationSource);t?t.push(e):lt.set(e.notificationSource,[e])}},vt={config:{name:"WindowManager"},createWindow:(e,t,r)=>{const n=e||"about:blank",o=r?.groupId?`${r.groupId}-${t}`:t,i=o||n;let s;r?.saveSizeAndPosition&&(s=wt(i),s&&(r.features={...r.features,...s}));const a=r?.openAsSibling?window.opener:window;if(!a)return null;const l=a.open(n,o,bt(r?.features));if(!l)return null;if(r?.saveSizeAndPosition){if(s){const e=()=>{if(kt(l))return;const e=_t(l.screen),t=e.x+l.screen.availWidth/3,r=e.y+l.screen.availHeight/3,n=l.screen.availWidth/3,o=l.screen.availHeight/3;l.moveTo(t,r),l.resizeTo(n,o)};l.addEventListener("DOMContentLoaded",e,{once:!0})}const e=()=>{kt(l)&&xt(i,{left:l.screenLeft,top:l.screenTop,width:l.innerWidth,height:l.innerHeight})};l.addEventListener("blur",e)}return r?.store&&(l.window.ReduxStore=r.store),window.WindowManagerState||(window.WindowManagerState={}),l.window.WindowManagerState=window.WindowManagerState,l},getStore:()=>window.ReduxStore,getState:e=>window.WindowManagerState?.[e],addToState:(e,t)=>(window.WindowManagerState||(window.WindowManagerState={}),window.WindowManagerState[e]=t,t),removeFromState:e=>{window.WindowManagerState&&delete window.WindowManagerState[e]}},bt=(e={})=>Object.keys(e).reduce((t,r)=>{const n=e[r];return"boolean"==typeof n?t.push(`${r}=${n?"yes":"no"}`):"gotoWindowTitleBarColors"===r&&e.gotoWindowTitleBarColors?t.push(`${r}=${(e=>encodeURIComponent(JSON.stringify(e)))(e.gotoWindowTitleBarColors)}`):t.push(`${r}=${n}`),t},[]).join(",")||void 0,yt="goto.container.WindowManagerSizeAndPosition",wt=e=>{const t=localStorage.getItem(`${yt}${e}`);if(t)try{return JSON.parse(t)}catch{}},xt=(e,t)=>localStorage.setItem(`${yt}${e}`,JSON.stringify(t)),_t=e=>({x:e.availLeft??0,y:e.availTop??0}),kt=e=>{const t=_t(e.screen);return Ct(e.screenLeft,t.x,t.x+e.screen.availWidth)&&Ct(e.screenTop,t.y,t.y+e.screen.availHeight)&&e.innerWidth>
20&&e.innerHeight>0},Ct=(e,t,r)=>e>=t&&e<=r,St=Object.freeze(Object.defineProperty({__proto__:null,Badge:p,DesktopCompanion:D,DiagnosticsReporter:H,ExecutionContext:ne,Hid:Fe,KeyboardShortcuts:rt,Logger:C,Notification:ut,WindowManager:vt},Symbol.toStringTag,{value:"Module"})),Et="AppContainer",It=new class{constructor(e="web",t=!1){this.platform=e,this.isNative=t,this.plugins={},this.shouldMergePlugin=e=>!e.config?.platforms||e.config?.platforms.includes(this.platform),this.addPlugins(Object.values(St));const r=globalThis[Et];r&&(this.platform=r.platform,this.isNative=!!r.isNative,this.addPlugins(Object.values(r.plugins)),r.bridgeIncompatiblePluginsPromise&&(this.plugins.DisplayMedia={config:{name:"DisplayMedia",platforms:["electron"]},load:async()=>(await r.bridgeIncompatiblePluginsPromise,globalThis?.BridgeIncompatiblePlugins?.DisplayMedia)})),this.plugins=new Proxy(this.plugins,{get:(e,t)=>{if(typeof e[t]>"u"){let e=this;return new Proxy({},{get:(r,n)=>typeof r[n]>"u"?e.pluginMethodNoop.bind(e,r,n,t):r[n]})}return e[t]}})}pluginMethodNoop(e,t,r){return Promise.reject(`${r} plugin not found for ${this.platform}.`)}isPluginAvailable(e){return this.plugins.hasOwnProperty(e)}addPlugin(e){if(!this.plugins.hasOwnProperty(e.config.name)||this.shouldMergePlugin(e))if(this.isNative&&!0===e.config.isAsync){const t={config:e.config,load:async()=>{await(globalThis[Et].webContextPluginsPromise||Promise.reject(Error(`could not load async plugin ${e.config.name}, unsupported container version?`)));const t=globalThis.__LMIGoToContainerPrivate_WebContextPlugins__;return t&&t.hasOwnProperty(e.config.name)?t[e.config.name]:Promise.reject(Error(`${e.config.name} not found, async plugin failed to load in web context.`))}};this.plugins[e.config.name]=t}else this.plugins[e.config.name]=e}addPlugins(e){for(const t of e)this.addPlugin(t)}},At=It.plugins,Tt=["error","warn","info","debug","log"];class Ot{debug(e,...t){}error(e,...t){}info(e,...t){}log(e,...t){}warn(e,...t){}}const Lt=(()=>{let e=0;return function(){const t=e;return e=e+1>e?e+1:0,t}})();class $t{constructor(e=[]){this._originNamespaces=e,this._rootConsole=this._decideRootConsoleAndSetupLogging(),this._context=new Map,this._targetConsole=this._rootConsole,this._listeners={},this.logToConsole=$t._config.logToConsole,this.serializeConsoleLogs=$t._config.serializeConsoleLogs,this._setupConsoles()}static createRoot(e){const t=new $t;t.configure(e);const r=new $t;return r.setTarget(t),r.subscribe=(...e)=>t.subscribe(...e),r}debug(e,...t){this._trace("debug",[this._originNamespaces.join("."),e,...t])}error(e,...t){this._trace("error",[this._originNamespaces.join("."),e,...t])}log(e,...t){this._trace("log",[this._originNamespaces.join("."),e,...t])}info(e,...t){this._trace("info",[this._originNamespaces.join("."),e,...t])}warn(e,...t){this._trace("warn",[this._originNamespaces.join("."),e,...t])}logMessage(e){this._trace(e.category,e)}bind(...e){return this.create(e)}create(e){const t=new $t(this._originNamespaces.concat(e));return t.setParent(this),t.setTarget(this._targetConsole),t}setParent(e){this._parent=e}setContext(e,t){this._context.set(e,t)}deleteContext(e){this._context.has(e)&&this._context.delete(e)}getContext(e){let t;return void 0===e?this._getFullNodeContext():(this._context.has(e)?t=this._context.get(e):this._parent&&(t=this._parent.getContext(e)),t)}setTarget(e){this._targetConsole=e}getLocalLogRecord(){return $t._localLogRecord?$t._localLogRecord:[]}subscribe(e,t){var r;this._listeners[e]=this._listeners[e]||[],null===(r=this._listeners[e])||void 0===r||r.push(t)}configure(e){return e&&($t._config=Object.assign(Object.assign({},$t._config),e),"number"==typeof e.localLogRecordSize&&(0===e.localLogRecordSize?this._deactivateLocalLogRecording():e.localLogRecordSize>0&&this._activateLocalLogRecording()),"boolean"==typeof e.serializeConsoleLogs&&(this.serializeConsoleLogs=e.serializeConsoleLogs),this.logToConsole!==$t._config.logToConsole&&this._setupConsoles(),$t._config.mincategory=Tt.includes($t._config.mincategory)?$t._config.mincategory:Tt[0]),$t._config}_getFullNodeContext(){const e=[];let t=this;for(;t;)e.push(t._context),t=t._parent;return function(e){const t={};
2return e.reverse().forEach(e=>{e.forEach((e,r)=>{t[r]=e})}),t}(e)}_activateLocalLogRecording(){$t._localLogRecord=[],$t._localLogRecordIdx=0}_deactivateLocalLogRecording(){$t._localLogRecord=null}_addMessageToStaticLogRecords(e){$t._localLogRecord&&($t._localLogRecord[$t._localLogRecordIdx]=e,$t._localLogRecordIdx++,$t._localLogRecordIdx===$t._config.localLogRecordSize&&($t._localLogRecordIdx=0))}_publishLogToSubscribers(e,...t){for(const r of this._listeners[e]||[])try{r.apply(null,t)}catch{}}_trace(e,t){let r;if(Array.isArray(t)){r={ts:(new Date).toISOString(),seq:Lt(),category:e,origin:"",data:t},t.length>1&&"string"==typeof t[0]&&(r.origin=t.shift());const n=e=>e instanceof Error?{errorMessage:e.message,errorName:e.name,errorStack:e.stack}:e,o=e=>e instanceof Error?n(e):Array.isArray(e)?e.map(o):function(e){return"object"==typeof e&&null!==e&&void 0===e.length}(e)?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,n(t)])):e;r.data=r.data.map(o),this._addMessageToStaticLogRecords(r)}else r=function(e){return"ts"in e&&"seq"in e&&"origin"in e&&"category"in e&&"data"in e}(t)?t:{ts:t.ts,seq:Lt(),category:t.category,origin:t.origin,data:t.data};("log"===e||function(e,t){return Tt.indexOf(e)<=Tt.indexOf(t)}(e,this.configure().mincategory))&&this._passthru(r),Object.freeze(r),this._publishLogToSubscribers(e,r)}_passthru(e){const t=this._targetConsole||this._rootConsole;if(t instanceof $t)t.logMessage(e);else{const r=[e.ts,"["+e.category+"]"];if(e.origin&&r.push(e.origin),e.data){const t=this._serializeDataForConsole(e.data);Array.isArray(t)?r.push(...t):r.push(t||e)}(t[e.category]||t.log).apply(t,r)}}_serializeDataForConsole(e){if(!this.serializeConsoleLogs)return e;const t=e=>{if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}};return Array.isArray(e)?e.map(t):t(e)}_decideRootConsoleAndSetupLogging(){var e,t;const n=null===(e=globalThis?.localStorage)||void 0===e?void 0:e.getItem("gotoLoggerSettings");try{const e=n?JSON.parse(n):void 0;e&&"boolean"==typeof e?.logToConsole&&e?.logToConsole!==this.logToConsole&&(this.logToConsole=e?.logToConsole),e&&"boolean"==typeof e?.serializeConsoleLogs&&(this.serializeConsoleLogs=e.serializeConsoleLogs)}catch{null===(t=globalThis?.localStorage)||void 0===t||t.removeItem("gotoLoggerSettings")}return!0===this.logToConsole?function(){return"object"==typeof self&&self.self===self&&self||"object"==typeof r.g&&r.g.global===r.g&&r.g||this}().console:new Ot}_setupConsoles(){this._rootConsole=this._decideRootConsoleAndSetupLogging(),this._targetConsole=this._rootConsole}}$t._localLogRecord=null,$t._localLogRecordIdx=0,$t._config={localLogRecordSize:0,mincategory:"error",logToConsole:!0,serializeConsoleLogs:!1};var Nt=function(e,t){return(Nt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function Rt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Nt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function Pt(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Dt(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function Mt(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)(n||!(o in t))&&(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}const zt=2e3;class Ft{constructor(e={}){this.fields={},this.queue=[],this.sendErrors=0,this.url=e.loggingUrl||"",this.contentType=e.contentType||"application/json",this.maxMessages=e.maxMessages||10,this.fixed=Object.assign({},e.fixed),this.lastSendAt=Date.now(),this.agent=e.agent}
2async init(){const e=`${this.url}/init?clientTime=${Date.now()}`;return new Promise((t,r)=>{let n;this.agent&&(n={agent:this.agent}),fetch(e,n).then(t,r)})}async log(e){if(!this.url)return Promise.reject("No logging URL specified, remote-logging disabled!");const t=(Array.isArray(e)?e:[e]).map(Ht).filter(Ut);return t.length?(this.queue.push.apply(this.queue,t),this.scheduleSend()):Promise.reject("No messages to log")}field(e,t){typeof t>"u"?this.fields.hasOwnProperty(e)&&delete this.fields[e]:this.fields[e]=t}getFixedField(e){return this.fixed[e]}createFetchParameters(e){const t=function(e){let t;try{return JSON.stringify(e,(e,t)=>{if(!(e=>e.startsWith("_"))(e))return void 0===t?"undefined":t})}catch(e){e instanceof Error&&(t=e.message)}return JSON.stringify({exception:"UNABLE TO SERIALIZE DATA",errorMessage:t})}(Object.assign(Object.assign(Object.assign({},this.fields),{entries:e}),this.fixed));return{url:`${this.url}/log`,options:{method:"POST",headers:{"content-type":this.contentType},body:t,agent:this.agent}}}async scheduleSend(){let e=zt;return clearTimeout(this.sendTimeout),this.queue.length<1||this.sendPromise?Promise.resolve():(this.sendErrors>0?e=this.sendErrors*zt:(this.queue.length>=this.maxMessages||Date.now()-this.lastSendAt>zt)&&(e=0),e?new Promise((t,r)=>{this.sendTimeout=setTimeout(()=>{this.sendLog().then(t,r)},e)}):(this.sendTimeout=void 0,this.sendLog()))}async sendLog(){if(this.sendPromise)return Promise.reject("transferring logs is currently in process");const e=this.queue.splice(0,this.maxMessages);if(e.length<1)return Promise.reject("not enough entries");this.lastSendAt=Date.now();const t=this.createFetchParameters(e),r=new Promise((e,r)=>{fetch(t.url,t.options).then(e,r)}),n=()=>{let e=!1;return r==this.sendPromise&&(this.sendPromise=void 0,e=!0,this.scheduleSend()),e};return this.sendPromise=r,r.then(()=>{n()&&(this.sendErrors=0)},t=>{this.queue.unshift.apply(this.queue,e),this.sendErrors||console.error(t),this.sendErrors++,n()})}}function Ut(e){return e}function Bt(e){if("string"==typeof e&&(/^\[.*\]$/.test(e)||/^\{.*\}$/.test(e)))try{return JSON.parse(e)}catch{}return Array.isArray(e)?e.slice():function(e){return e&&"object"==typeof e&&!e.nodeType}(e)?Object.assign({},e):e}function Ht(e){if(void 0===e?.data)return e;const{data:t}=e,r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["data"]),n=Bt(t);if(Array.isArray(n)){if(1===n.length){const t=Bt(n[0]);if("object"==typeof t)try{const o=Object.keys(t);o.some(function(t){return!!e.hasOwnProperty(t)})||(o.forEach(function(e){r[e]=t[e]}),n.shift())}catch{}}n.length&&(r.data=n)}else r.data=t;return r}let jt=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&r[e]];return t};const Vt=()=>window,Wt="goto--content",Kt=`#${Wt}`,qt="goto-root",Gt=`#${qt}`,Zt="goto--topbar-container",Yt=`#${Zt}`,Jt="goto--navigation",Qt=`#${Jt}`,Xt="goto--critical-banner-container",er=`#${Xt}`,tr="goto--banner-notification",rr=`#${tr}`,nr="goto--snackbar-notification",or=`#${nr}`,ir="goto--modal-notification",sr=`#${ir}`,ar="goto--dialog-container",lr=`#${ar}`,cr="goto-settings #goto--settings-content",dr="chameleon-theme-provider",ur="chameleon-launch-screen",hr=e=>"string"==typeof e,pr=()=>{let e,t;const r=new Promise((r,n)=>{e=r,t=n});return r.resolve=e,r.reject=t,r},gr=e=>null==e?"":String(e),fr=/###/g,mr=e=>e&&e.includes("###")?e.replace(fr,"."):e,vr=e=>!e||hr(e),br=(e,t,r)=>{const n=hr(t)?t.split("."):t;let o=0;for(;o<n.length-1;){if(vr(e))return{};const t=mr(n[o]);!e[t]&&r&&(e[t]=new r),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return vr(e)?{}:{obj:e,k:mr(n[o])}},yr=(e,t,r)=>{const{obj:n,k:o}=br(e,t,Object);if(void 0!==n||1===t.length)return void(n[o]=r);let i=t[t.length-1],s=t.slice(0,t.length-1),a=br(e,s,Object);for(;void 0===a.obj&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),a=br(e,s,Object),a?.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=r},wr=(e,t)=>
vendor: 4,272 bytes, line 2
2{const{obj:r,k:n}=br(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},xr=(e,t,r)=>{for(const n in t)"__proto__"!==n&&"constructor"!==n&&(Object.prototype.hasOwnProperty.call(e,n)?hr(e[n])||e[n]instanceof String||hr(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):xr(e[n],t[n],r):e[n]=t[n]);return e},_r=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),kr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},Cr=e=>hr(e)?e.replace(/[&<>"'\/]/g,e=>kr[e]):e,Sr=[" ",",","?","!",";"],Er=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}(20),Ir=(e,t,r=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const n=t.split(r);let o=e;for(let e=0;e<n.length;){if(!o||"object"!=typeof o)return;let t,i="";for(let s=e;s<n.length;++s)if(s!==e&&(i+=r),i+=n[s],t=o[i],void 0!==t){if(["string","number","boolean"].includes(typeof t)&&s<n.length-1)continue;e+=s-e+1;break}o=t}return o},Ar=e=>e?.replace(/_/g,"-"),Tr={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Or{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Tr,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,n){return n&&!this.debug?null:(e=e.map(e=>hr(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g," "):e),hr(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Or(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Or(this.logger,e)}}var Lr=new Or;class $r{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const r=this.observers[e].get(t)||0;this.observers[e].set(t,r+1)}),this}off(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e].delete(t)}}once(e,t){const r=(...n)=>{t(...n),this.off(e,r)};return this.on(e,r),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,r])=>{for(let n=0;n<r;n++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([r,n])=>{for(let o=0;o<n;o++)r(e,...t)})}}class Nr extends $r{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r,n={}){const o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.includes(".")?s=e.split("."):(s=[e,t],r&&(Array.isArray(r)?s.push(...r):hr(r)&&o?s.push(...r.split(o)):s.push(r)));const a=wr(this.data,s);return!a&&!t&&!r&&e.includes(".")&&(e=s[0],t=s[1],r=s.slice(2).join(".")),!a&&i&&hr(r)?Ir(this.data?.[e]?.[t],r,o):a}addResource(e,t,r,n,o={silent:!1}){const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let s=[e,t];r&&(s=s.concat(i?r.split(i):r)),e.includes(".")&&(s=e.split("."),n=t,t=s[1]),this.addNamespaces(t),yr(this.data,s,n),o.silent||this.emit("added",e,t,r,n)}addResources(e,t,r,n={silent:!1}){for(const n in r)(hr(r[n])||Array.isArray(r[n]))&&this.addResource(e,t,n,r[n],{silent:!0});n.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,n,o,i={silent:!1,skipCopy:!1}){let s=[e,t];e.includes(".")&&(s=e.split("."),n=r,r=t,t=s[1]),this.addNamespaces(t);let a=wr(this.data,s)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),n?xr(a,r,o):a={...a,...r}
vendor: 1,424 bytes, line 2
2,yr(this.data,s,a),i.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var Rr={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,o){return e.forEach(e=>{t=this.processors[e]?.process(t,r,n,o)??t}),t}};const Pr=Symbol("i18next/PATH_KEY");function Dr(e,t){const{[Pr]:r}=e(function(){const e=[],t=Object.create(null);let r;return t.get=(n,o)=>(r?.revoke?.(),o===Pr?e:(e.push(o),r=Proxy.revocable(n,t),r.proxy)),Proxy.revocable(Object.create(null),t).proxy}()),n=t?.keySeparator??".",o=t?.nsSeparator??":",i="strict"===t?.enableSelector;if(r.length>1&&o){const e=t?.ns,s=i?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(s&&(i?s:s.length>1?s.slice(1):[]).includes(r[0]))return`${r[0]}${o}${r.slice(1).join(n)}`}return r.join(n)}const Mr=e=>!hr(e)&&"boolean"!=typeof e&&"number"!=typeof e;class zr extends $r{constructor(e,t={}){super(),((e,t,r)=>{["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
2i18nFormat","utils"].forEach(e=>{t[e]&&(r[e]=t[e])})})(0,e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Lr.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const r={...t};if(null==e)return!1;const n=this.resolve(e,r);if(void 0===n?.res)return!1;const o=Mr(n.res);return!(!1===r.returnObjects&&o)}extractFromKey(e,t){let r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");const n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=r&&e.includes(r),s=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,r)=>{t=t||"",r=r||"";const n=Sr.filter(e=>!t.includes(e)&&!r.includes(e));if(0===n.length)return!0;const o=Er.getRegExp(`(${n.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(r);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,r,n));if(i&&!s){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:hr(o)?[o]:o};const i=e.split(r);(r!==n||r===n&&this.options.ns.includes(i[0]))&&(o=i.shift()),e=i.join(n)}return{key:e,namespaces:hr(o)?[o]:o}}translate(e,t,r){let n="object"==typeof t?{...t}:t;if("object"!=typeof n&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof n&&(n={...n}),n||(n={}),null==e)return"";"function"==typeof e&&(e=Dr(e,{...this.options,...n})),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"==typeof e?Dr(e,{...this.options,...n}):String(e));const o=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(e[e.length-1],n),l=a[a.length-1];let c=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const d=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===d?.toLowerCase())return u?o?{res:`${l}${c}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${c}${s}`:o?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:s;const h=this.resolve(e,n);let p=h?.res;const g=h?.usedKey||s,f=h?.exactUsedKey||s,m=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==n.count&&!hr(n.count),y=zr.hasDefaultValue(n),w=b?this.pluralResolver.getSuffix(d,n.count,n):"",x=n.ordinal&&b?this.pluralResolver.getSuffix(d,n.count,{ordinal:!1}):"",_=b&&!n.ordinal&&0===n.count,k=_&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${w}`]||n[`defaultValue${x}`]||n.defaultValue;let C=p;v&&!p&&y&&(C=k);const S=Mr(C),E=Object.prototype.toString.apply(C);if(!(v&&C&&S)||["[object Number]","[object Function]","[object RegExp]"].includes(E)||hr(m)&&Array.isArray(C))if(v&&hr(m)&&Array.isArray(p))p=p.join(m),p&&(p=this.extendTranslation(p,e,n,r));else{let t=!1,o=!1;!this.isValidLookup(p)&&y&&(t=!0,p=k),this.isValidLookup(p)||(o=!0,p=s);const a=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:p,u=y&&k!==p&&this.options.updateMissing;if(o||t||u){if(this.logger.log(u?"updateKey":"missingKey",d,l,b&&!u?`${s}${this.pluralResolver.getSuffix(d,n.count,n)}`:s,u?k:p),i){const e=this.resolve(s,{...n,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let r=0;r<t.length;r++)e.push(t[r]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(n.lng||this.language):e.push(n.lng||this.language);const r=(e,t,r)=>{const o=y&&r!==p?r:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,o,u,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,o,u,n),this.emit
vendor: 3,346 bytes, line 2
2("missingKey",e,l,t,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,n);_&&n[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{r([e],s+t,n[`defaultValue${t}`]||k)})}):r(e,s,k))}p=this.extendTranslation(p,e,n,h,r),o&&p===s&&this.options.appendNamespaceToMissingKey&&(p=`${l}${c}${s}`),(o||t)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${s}`:s,t?p:void 0,n))}else{if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,C,{...n,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return o?(h.res=e,h.usedParams=this.getUsedParamsDetails(n),h):e}if(i){const e=Array.isArray(C),t=e?[]:{},r=e?f:g;for(const e in C)if(Object.prototype.hasOwnProperty.call(C,e)){const o=`${r}${i}${e}`;t[e]=y&&!p?this.translate(o,{...n,defaultValue:Mr(k)?k[e]:void 0,joinArrays:!1,ns:a}):this.translate(o,{...n,joinArrays:!1,ns:a}),t[e]===o&&(t[e]=C[e])}p=t}}return o?(h.res=p,h.usedParams=this.getUsedParamsDetails(n),h):p}extendTranslation(e,t,r,n,o){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const i=hr(e)&&(void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(i){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let a=r.replace&&!hr(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),e=this.interpolator.interpolate(e,a,r.lng||this.language||n.usedLng,r),i){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(r.nest=!1)}!r.lng&&n&&n.res&&(r.lng=this.language||n.usedLng),!1!==r.nest&&(e=this.interpolator.nest(e,(...e)=>o?.[0]!==e[0]||r.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),r)),r.interpolation&&this.interpolator.reset()}const i=r.postProcess||this.options.postProcess,s=hr(i)?[i]:i;return null!=e&&s?.length&&!1!==r.applyPostProcessor&&(e=Rr.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,t={}){let r,n,o,i,s;return hr(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>"function"==typeof e?Dr(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(r))return;const a=this.extractFromKey(e,t),l=a.key;n=l;let c=a.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const d=void 0!==t.count&&!hr(t.count),u=d&&!t.ordinal&&0===t.count,h=void 0!==t.context&&(hr(t.context)||"number"==typeof t.context)&&""!==t.context,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);
2c.forEach(e=>{this.isValidLookup(r)||(s=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(n=>{if(this.isValidLookup(r))return;i=n;const s=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(s,l,n,e,t);else{let e;d&&(e=this.pluralResolver.getSuffix(n,t.count,t));const r=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(t.ordinal&&e.startsWith(o)&&s.push(l+e.replace(o,this.options.pluralSeparator)),s.push(l+e),u&&s.push(l+r)),h){const n=`${l}${this.options.contextSeparator||"_"}${t.context}`;s.push(n),d&&(t.ordinal&&e.startsWith(o)&&s.push(n+e.replace(o,this.options.pluralSeparator)),s.push(n+e),u&&s.push(n+r))}}let a;for(;a=s.pop();)this.isValidLookup(r)||(o=a,r=this.getResource(n,e,a,t))}))})}),{res:r,usedKey:n,exactUsedKey:o,usedLng:i,usedNS:s}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,r,n={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!hr(e.replace);let n=r?e.replace:e;if(r&&typeof e.count<"u"&&(n={...n,count:e.count}),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!r){n={...n};for(const e of t)delete n[e]}return n}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith("defaultValue")&&void 0!==e[t])return!0;return!1}}class Fr{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Lr.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(!(e=Ar(e))||!e.includes("-"))return null;const t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=Ar(e))||!e.includes("-"))return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(hr(e)&&e.includes("-")){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const r=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(r))&&(t=r)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const r=this.getScriptPartFromCode(e);if(this.isSupportedCode(r))return t=r;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>e===n||!(!e.includes("-")&&!n.includes("-"))&&!!(e.includes("-")&&!n.includes("-")&&e.slice(0,e.indexOf("-"))===n||e.startsWith(n)&&n.length>1))}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),hr(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.options.fallbackLng,n=Array.isArray(r)?r.join("|"):r;n!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=n);const o=void 0===t||!1===t||hr(t),i=void 0===t&&"function"==typeof this.options.fallbackLng;let s=null;if(hr(e)&&o&&!i){let r;r=void 0===t?"undefined":!1===t?"boolean:false":`string:${t}`,s=`${e.length}:${e}|${r}`}if(null!==s){const e=this.resolveHierarchyCache[s];if(void 0!==e)return e.slice()}const a=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),l=[],c=e=>{e&&(this.isSupportedCode(e)?l.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return hr(e)&&(e.includes("-")||e.includes("_"))?("languageOnly"!==this.options.load&&c(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&c(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&c(this.getLanguagePartFromCode(e))):hr(e)&&c(this.formatLanguageCode(e)),a.forEach(e
vendor: 4,217 bytes, line 2
2=>{l.includes(e)||c(this.formatLanguageCode(e))}),null!==s?(this.resolveHierarchyCache[s]=l,l.slice()):l}}const Ur={zero:0,one:1,two:2,few:3,many:4,other:5},Br={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Hr{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Lr.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const r=Ar("dev"===e?"en":e),n=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:n});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(r,{type:n})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Br;if(!e.match(/-|_/))return Br;const r=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(r,t)}return this.pluralRulesCache[o]=i,i}needsPlural(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,r={}){return this.getSuffixes(e,r).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?r.resolvedOptions().pluralCategories.sort((e,t)=>Ur[e]-Ur[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,r={}){const n=this.getRule(e,r);return n?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}const jr=(e,t,r,n=".",o=!0)=>{let i=((e,t,r)=>{const n=wr(e,r);return void 0!==n?n:wr(t,r)})(e,t,r);return!i&&o&&hr(r)&&(i=Ir(e,r,n),void 0===i&&(i=Ir(t,r,n))),i},Vr=e=>e.replace(/\$/g,"$$$$");class Wr{constructor(e={}){this.logger=Lr.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:r,useRawValueToEscape:n,prefix:o,prefixEscaped:i,suffix:s,suffixEscaped:a,formatSeparator:l,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:u,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:Cr,this.escapeValue=void 0===r||r,this.useRawValueToEscape=void 0!==n&&n,this.prefix=o?_r(o):i||"{{",this.suffix=s?_r(s):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":d?_r(d):"-",this.unescapeSuffix=this.unescapePrefix?"":c?_r(c):"",this.nestingPrefix=u?_r(u):h||_r("$t("),this.nestingSuffix=p?_r(p):g||_r(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,r,n){let o,i,s;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(!e.includes(this.formatSeparator)){const o=jr(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,r,{...n,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),s=o.join(this.formatSeparator).trim();return this.format(jr(t,a,i,this.options.keySeparator,this.options.ignoreJSONStructure),s,r,{...n,...t,interpolationkey:i})};this.resetRegExp(),!this.escapeValue&&"string"==typeof e&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const c=n?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=void 0!==n?.interpolation?.ski
vendor: 4,550 bytes, line 2
2pOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(s=0;o=t.regex.exec(e);){const r=o[1].trim();if(i=l(r),void 0===i)if("function"==typeof c){const t=c(e,o,n);i=hr(t)?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,r))i="";else{if(d){i=o[0];continue}this.logger.warn(`missed to pass in variable ${r} for interpolating ${e}`),i=""}else!hr(i)&&!this.useRawValueToEscape&&(i=gr(i));const a=t.safeValue(i);if(e=e.replace(o[0],Vr(a)),d?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,t,r={}){let n,o,i;const s=(e,t)=>{const r=this.nestingOptionsSeparator;if(!e.includes(r))return e;const n=e.split(new RegExp(`${_r(r)}[ ]*{`));let o=`{${n[1]}`;e=n[0],o=this.interpolate(o,i);const s=o.match(/'/g),a=o.match(/"/g);((s?.length??0)%2==0&&!a||(a?.length??0)%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${r}${o}`}return i.defaultValue&&i.defaultValue.includes(this.prefix)&&delete i.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let a=[];i={...r},i=i.replace&&!hr(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const l=/{.*}/s.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==l&&(a=n[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),n[1]=n[1].slice(0,l)),o=t(s.call(this,n[1].trim(),i),i),o&&n[0]===e&&!hr(o))return o;hr(o)||(o=gr(o)),o||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),o=""),a.length&&(o=a.reduce((e,t)=>this.format(e,t,r.lng,{...r,interpolationkey:n[1].trim()}),o.trim())),e=e.replace(n[0],o),this.regexp.lastIndex=0}return e}}const Kr=e=>{const t={};return(r,n,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const s=n+JSON.stringify(i);let a=t[s];return a||(a=e(Ar(n),o),t[s]=a),a(r)}},qr=e=>(t,r,n)=>e(Ar(r),n)(t);class Gr{constructor(e={}){this.logger=Lr.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const r=t.cacheInBuiltFormats?Kr:qr;this.formats={number:r((e,t)=>{const r=new Intl.NumberFormat(e,{...t});return e=>r.format(e)}),currency:r((e,t)=>{const r=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>r.format(e)}),datetime:r((e,t)=>{const r=new Intl.DateTimeFormat(e,{...t});return e=>r.format(e)}),relativetime:r((e,t)=>{const r=new Intl.RelativeTimeFormat(e,{...t});return e=>r.format(e,t.range||"day")}),list:r((e,t)=>{const r=new Intl.ListFormat(e,{...t});return e=>r.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Kr(t)}format(e,t,r,n={}){if(!t||null==e)return e;const o=t.split(this.formatSeparator),i=[];for(let e=0;e<o.length;e++){let t=o[e];for(;t.indexOf("(")>-1&&!t.includes(")")&&e+1<o.length;)t=`${t}${this.formatSeparator}${o[++e]}`;i.push(t)}return i.reduce((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const r={};if(e.includes("(")){const n=e.split("(");t=n[0].toLowerCase().trim();const o=n[1].slice(0,-1);"currency"!==t||o.includes(":")?"relativetime"!==t||o.includes(":")?o.split(";").forEach(e=>{if(e){const[t,...n]=e.split(":"),o=n.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();r[i]||(r[i]=o),"false"===o&&(r[i]=!1),"true"===o&&(r[i]=!0),isNaN(o)||(r[i]=parseInt(o,10))}}):r.range||(r.range=o.trim()):r.currency||(r.currency=o.trim())}return{formatName:t,formatOptions:r}})(t);if(this.formats[o]){let t=e;try{const s=n?.formatParams?.[n.interpolationkey]||{},a=s.locale||s.lng||n.locale||n.lng||r;t=this.formats[o](e,a,{...i,...n,...s})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e)}}class Zr extends $r{constructor(e,t,r,n={}){super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=n,this.logger=Lr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,n.backend,n)}queueLoad(e,t,r,n){const o={},i={},s={},a={};
vendor: 4,204 bytes, line 2
2return e.forEach(e=>{let n=!0;t.forEach(t=>{const s=`${e}|${t}`;!r.reload&&this.store.hasResourceBundle(e,t)?this.state[s]=2:this.state[s]<0||(1===this.state[s]?void 0===i[s]&&(i[s]=!0):(this.state[s]=1,n=!1,void 0===i[s]&&(i[s]=!0),void 0===o[s]&&(o[s]=!0),void 0===a[t]&&(a[t]=!0)))}),n||(s[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(a)}}loaded(e,t,r){const n=e.split("|"),o=n[0],i=n[1];t&&this.emit("failedLoading",o,i,t),!t&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);const s={};this.queue.forEach(r=>{((e,t,r)=>{const{obj:n,k:o}=br(e,t,Object);n[o]=n[o]||[],n[o].push(r)})(r.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(r,e),t&&r.errors.push(t),0===r.pendingCount&&!r.done&&(Object.keys(r.loaded).forEach(e=>{s[e]||(s[e]={});const t=r.loaded[e];t.length&&t.forEach(t=>{void 0===s[e][t]&&(s[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(e=>!e.done)}read(e,t,r,n=0,o=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:n,wait:o,callback:i});this.readingCalls++;const s=(s,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}s&&a&&n<this.maxRetries?setTimeout(()=>{this.read(e,t,r,n+1,2*o,i)},o):i(s,a)},a=this.backend[r].bind(this.backend);if(2!==a.length)return a(e,t,s);try{const r=a(e,t);r&&"function"==typeof r.then?r.then(e=>s(null,e)).catch(s):s(null,r)}catch(e){s(e)}}prepareLoading(e,t,r={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();hr(e)&&(e=this.languageUtils.toResolveHierarchy(e)),hr(t)&&(t=[t]);const o=this.queueLoad(e,t,r,n);if(!o.toLoad.length)return o.pending.length||n(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e,t=""){const r=e.split("|"),n=r[0],o=r[1];this.read(n,o,"read",void 0,void 0,(r,i)=>{r&&this.logger.warn(`${t}loading namespace ${o} for language ${n} failed`,r),!r&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${n}`,i),this.loaded(e,r,i)})}saveMissing(e,t,r,n,o,i={},s=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=r&&""!==r){if(this.backend?.create){const a={...i,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;o=5===l.length?l(e,t,r,n,a):l(e,t,r,n),o&&"function"==typeof o.then?o.then(e=>s(null,e)).catch(s):s(null,o)}catch(e){s(e)}else l(e,t,r,n,s,a)}!e||!e[0]||this.store.addResource(e[0],t,r,n)}}else this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const Yr=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),hr(e[1])&&(t.defaultValue=e[1]),hr(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const r=e[3]||e[2];
2Object.keys(r).forEach(e=>{t[e]=r[e]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Jr=e=>(hr(e.ns)&&(e.ns=[e.ns]),hr(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),hr(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Qr=()=>{};class Xr extends $r{constructor(e={},t){if(super(),this.options=Jr(e),this.services={},this.logger=Lr,this.modules={external:[]},(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})})(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(hr(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));const r=Yr();this.options={...r,...this.options,...Jr(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation}
vendor: 4,821 bytes, line 2
2,void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const n=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?Lr.init(n(this.modules.logger),this.options):Lr.init(null,this.options),e=this.modules.formatter?this.modules.formatter:Gr;const t=new Fr(this.options);this.store=new Nr(this.options.resources,this.options);const r=this.services;r.logger=Lr,r.resourceStore=this.store,r.languageUtils=t,r.pluralResolver=new Hr(t,{prepend:this.options.pluralSeparator}),e&&(r.formatter=n(e),r.formatter.init&&r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new Wr(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new Zr(n(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(r.languageDetector=n(this.modules.languageDetector),r.languageDetector.init&&r.languageDetector.init(r,this.options.detection,this.options)),this.modules.i18nFormat&&(r.i18nFormat=n(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new zr(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Qr),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const o=pr(),i=()=>{const e=(e,r)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(r),t(e,r)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?i():setTimeout(i,0),o}loadResources(e,t=Qr){let r=t;const n=hr(e)?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===n?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return r();const e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&(e.includes(t)||e.push(t))})};n?t(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(e)})}else r(null)}reloadResources(e,t,r){const n=pr();return"function"==typeof e&&(r=e,e=void 0),"function"==typeof t&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=Qr),this.services.backendConnector.reload(e,t,e=>{n.resolve(),r(e)}),n}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Rr.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!["cimode","dev"].includes(e)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!["cimode","dev"].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const r=pr();
vendor: 2,180 bytes, line 2
2this.emit("languageChanging",e);const n=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,i)=>{i?this.isLanguageChangingTo===e&&(n(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve((...e)=>this.t(...e)),t&&t(o,(...e)=>this.t(...e))},i=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);const r=hr(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(r)?r:this.services.languageUtils.getBestMatchFromCodes(hr(t)?[t]:t);i&&(this.language||n(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheUserLanguage?.(i)),this.loadResources(i,e=>{o(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}getFixedT(e,t,r,n){const o=n?.scopeNs,i=(e,t,...n)=>{let s;s="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(n)):{...t},s.lng=s.lng||i.lng,s.lngs=s.lngs||i.lngs;const a=void 0!==s.ns&&null!==s.ns;s.ns=s.ns||i.ns,""!==s.keyPrefix&&(s.keyPrefix=s.keyPrefix||r||i.keyPrefix);const l={...this.options,...s};Array.isArray(o)&&!a&&(l.ns=o),"function"==typeof s.keyPrefix&&(s.keyPrefix=Dr(s.keyPrefix,l));const c=this.options.keySeparator||".";let d;return s.keyPrefix&&Array.isArray(e)?d=e.map(e=>("function"==typeof e&&(e=Dr(e,l)),`${s.keyPrefix}${c}${e}`)):("function"==typeof e&&(e=Dr(e,l)),d=s.keyPrefix?`${s.keyPrefix}${c}${e}`:e),this.t(d,s)};return hr(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=r,i}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
2if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;const i=(e,t)=>{const r=this.services.backendConnector.state[`${e}|${t}`];return-1===r||0===r||2===r};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,e)&&(!n||i(o,e)))}loadNamespaces(e,t){const r=pr();return this.options.ns?(hr(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=pr();hr(e)&&(e=[e]);const n=this.options.preload||[],o=e.filter(e=>!n.includes(e)&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=n.concat(o),this.loadResources(e=>{r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}const t=this.services?.languageUtils||new Fr(Yr());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].includes(t.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const r=new Xr(e,t);return r.createInstance=Xr.createInstance,r}cloneInstance(e={},t=Qr){const r=e.forkResourceStore;r&&delete e.forkResourceStore;const n={...this.options,...e,isClone:!0},o=new Xr(n);if((void 0!==e.debug||void 0!==e.prefix)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((r,n)=>(r[n]={...e[t][n]},r),e[t]),e),{});o.store=new Nr(e,n),o.services.resourceStore=o.store}if(e.interpolation){const t={...Yr().interpolation,...this.options.interpolation,...e.interpolation},r={...n,interpolation:t};o.services.interpolator=new Wr(r)}return o.translator=new zr(o.services,n),o.translator.on("*",(e,...t)=>{o.emit(e,...t)}),o.init(n,t),o.translator.options=n,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const en=Xr.createInstance();en.createInstance,en.dir,en.init,en.loadResources,en.reloadResources,en.use,en.changeLanguage,en.getFixedT;const tn=en.t;en.exists,en.setDefaultNamespace,en.hasLoadedNamespace,en.loadNamespaces,en.loadLanguages;const rn=(e,t)=>"string"==typeof e?e:e(t),nn=()=>oo()?en:l().i18n.instance,on=(e,t)=>"string"==typeof e?nn().t(e,t):rn(e),sn=(e,t,r)=>{const n=mn().createElement(e);return t&&(n.id=t),r&&n.classList.add(...r),n},an=(e,t,r=null)=>{for(;t!==r&&t;){const r=t.nextSibling;e.removeChild(t),t=r}},ln=()=>Vt().location.href,cn=()=>Vt().location.origin,dn=()=>Vt().location.pathname,un=()=>Vt().location.hash,hn=()=>Vt().location.search,pn=()=>Vt().location.hostname,gn=e=>{const t={"+":"-","/":"_","=":""};return e.replace(/[+/=]/g,e=>t[e])},fn=e=>{const t={"-":"+",_:"/"};return e.replace(/[-_]/g,e=>t[e])},mn=()=>document,vn=()=>Vt().navigator,bn=()=>vn().userAgent,yn=e=>{const t=Vt().location;try{const r=wn(e),n=t.origin===r.origin&&t.pathname===r.pathname&&!!r.hash;Vt().location.assign(e),n&&Vt().location.reload()}catch(t){eo().error(`Improper URL passed to the function: ${e}, ${t}`)}},wn=e=>{try{return new URL(e)}catch{if(e.startsWith("/"))return new URL(e,cn());throw new Error("Invalid URL")}},xn=()=>`${dn()??""}${hn()??""}${un()??""}`,_n=e=>Vt().localStorage.getItem(e),kn=(e,t)=>Vt().localStorage.setItem(e,t),Cn=e=>Vt().localStorage.removeItem(e),Sn=e=>{const t=_n(e);return Cn(e),t},En=(e,t)=>Vt().sessionStorage.setItem(e,t),In=e=>Vt().sessionStorage.getItem(e),An=(e,t)=>Vt().setTimeout(e,t),Tn=e=>Vt().clearTimeout(e),On=(e,t)=>Vt().setInterval(e,t),Ln=e=>Vt().clearInterval(e),$n=e=>Vt().open(e,"_blank","noreferrer"),Nn=()=>{Vt().location.reload()};var Rn=(e=>(e.ED="dev",e.RC="rc",e.STAGING="staging",e.NIGHTLY="nightly",e.PROD="prod",e))(Rn||{});const Pn="personal-info",Dn=Object.freeze({redirect:"/g2m-oauth"}),Mn={gtcBffServiceBaseUrl(){return`${this.jiveApiBaseUrl}/v5/gtc-bff/v2`},getShellBffServiceBaseUrl(){return`${this.jiveApiBaseUrl}/shell-bff/v1`},authRedirectUrl:`${window.location.origin}${Dn.redirect}`,authRedirectUrlContainerSignOut:"https://identity.goto.com/oauth/logout?client_id=a7717fe1-75ce-4f82-b477-2f6dabe3eed9&redirect_uri",calendarConnectedUrl:`${window.location.origin}/calendar-connected`,logoutRedirectUrl:`${window.location.origin}/`,supportUrl:"https://support.goto.com/connect/help/how-do-i-contact-customer-support",containerUpdateSupportUrl:"https://link.gotoconnect.com/update-fail-contact",userReportURL:"http://cdn.userreport.com/userreport.js",userReportUUID:"8300b634
2-3d8c-4d2f-8293-444677d35357",gotoConnectQuickStartGuideUrl:"https://link.goto.com/gtc-user-guide",helpUrl:"https://support.goto.com/products",tutorialsAndVideosUrl:"https://link.goto.com/EmbUserInProdUx",communityForumDefaultUrl:"https://community.goto.com/categories?utm_source=app",feedbackGoToMeetingUrl:"https://logmeinvoc.iad1.qualtrics.com/jfe/form/SV_39obCEnQHAKSR7g",myAccountPageUrl:"http://myaccount.logmeininc.com/",gotoResolveUrl:"https://ticketing-app.console.gotoresolve.com/api/v1/goto_connect",pendoScriptSrc:"pendo.js"},zn={...Mn,environment:"dev",apiGlobal:"https://apiglobaled1.g2m.test.expertcity.com",authClientId:"5add16df-e35f-4529-b84a-5f428fbb07b4",authUrl:"https://identity.ed1.goto.com",authRedirectUrlContainerSignOut:"https://identity.ed1.goto.com/oauth/logout?client_id=5add16df-e35f-4529-b84a-5f428fbb07b4&redirect_uri",iamBaseUrl:"https://iamed1.serversdev.getgo.com",avatarBaseUrl:"https://avatarsed1.serversdev.getgo.com",jiveApiBaseUrl:"https://api.dev.jive.com",unleashAccessToken:"GoToApp:ED.294379d0ffef202b408bc8ace2184d44bfbdc980d524bbc1d5234535",calendarServiceBaseUrl:"https://calendar-integration.services-ed.goto.com",logoutRedirectUrl:`${window.location.origin}/`,loggingServerUrl:"https://logginged1.getgo.test.expertcity.com",notificationChannelUrl:"https://webrtc.dev.jive.com/notification-channel/v1",profileUrl:`https://profileed.serversdev.getgo.com/${Pn}`,mixpanelToken:"9ecffe57d3b75b7081a3f5d970a93259",caPSBaseUrl:"https://xmpp-ed.serversdev.getgo.com",myAccountPageUrl:"http://myaccount.logmeininc.com/",presenceServiceUrl:"https://api.dev.jive.com/presence/v1",gotoResolveUrl:"https://ticketing-app.dev01-console.gotoresolve.com/api/v1/goto_connect",searchBaseUrl:"http://localhost:3000",pendoScriptSrc:"pendo-staging.js",externalInterfacePorts:[2001,2002,2003,2004,2005,2006,2007,2008,2009,2010],msTeamsManifestAppId:"fdb1dc12-90b2-4d37-9add-860f2f2e5a90",msTeamsManifestEntityId:"HomeTabED"},Fn={...Mn,getShellBffServiceBaseUrl(){return`${this.jiveApiBaseUrl}/shell-bff-rc/v1`},environment:"rc",apiGlobal:"https://apiglobalrc1.g2m.test.expertcity.com",authClientId:"43c6cbec-5ca5-4849-85d4-9872fd98eb67",authUrl:"https://identity.rc1.goto.com",authRedirectUrlContainerSignOut:"https://identity.rc1.goto.com/oauth/logout?client_id=43c6cbec-5ca5-4849-85d4-9872fd98eb67&redirect_uri",iamBaseUrl:"https://iamrc1.serversdev.getgo.com",avatarBaseUrl:"https://avatarsrc1.serversdev.getgo.com",jiveApiBaseUrl:"https://api.dev.jive.com",unleashAccessToken:"GoToApp:RC.4c1b2413d434409eeef423fd46cb9f9a1810435587e3c0a910559b1f",calendarServiceBaseUrl:"https://calendar-integration.services-rc.goto.com",logoutRedirectUrl:`${window.location.origin}`,loggingServerUrl:"https://loggingrc1.getgo.test.expertcity.com",notificationChannelUrl:"https://webrtc.dev.jive.com/notification-channel/v1",profileUrl:`https://profilerc.serversdev.getgo.com/${Pn}`,mixpanelToken:"9ecffe57d3b75b7081a3f5d970a93259",caPSBaseUrl:"https://xmpp-rc.serversdev.getgo.com",myAccountPageUrl:"http://myaccount.logmeininc.com/",presenceServiceUrl:"https://api.dev.jive.com/presence/v1",gotoResolveUrl:"https://ticketing-app.dev01-console.gotoresolve.com/api/v1/goto_connect",pendoScriptSrc:"pendo-staging.js",externalInterfacePorts:[3001,3002,3003,3004,3005,3006,3007,3008,3009,3010],msTeamsManifestAppId:"fdb1dc12-90b2-4d37-9add-860f2f2e5a90",msTeamsManifestEntityId:"HomeTabRC"},Un={...Mn,environment:"staging",apiGlobal:"https://apiglobalstage.gotomeeting.com",authClientId:"9463723b-68c6-4191-962a-37bb84a60b44",authUrl:"https://identity.stage.goto.com",authRedirectUrlContainerSignOut:"https://identity.stage.goto.com/oauth/logout?client_id=9463723b-68c6-4191-962a-37bb84a60b44&redirect_uri",iamBaseUrl:"https://iamstage.servers.getgo.com",avatarBaseUrl:"https://avatarsstage.servers.getgo.com",jiveApiBaseUrl:"https://api.staging.jive.com",unleashAccessToken:"GoToApp:Stage.9bed2b009ae272797d036759293a9548154e9556bc3ff024003cafe6",calendarServiceBaseUrl:"https://calendar-integration.services-stage.goto.com",logoutRedirectUrl:`${window.location.origin}`,loggingServerUrl:"https://loggingstage.getgo.com",notificationChannelUrl:"https://webrtc.staging.jive.com/notification-channel/v1",profileUrl:`https://profilestage.servers.getgo.com/${Pn}`,mixpanelToken:"9ecffe57d3b75b7081a3f5d970a93259",caPSBaseUrl:"https://xmpp-stage.servers.getgo.com/",myAccountPageUrl:"http://myaccount.logmeininc.com/",presenceServiceUrl:"https://api.staging.jive.com/presence/v1",gotoResolveUrl:"https://ticketing-app.stage-console.gotoresolve.com/api/v1/goto_connect",pendoScriptSrc:"pendo-staging.js",externalInterfacePorts:[4001,4002,4003,4004,4005,4006,4007,4008,4009,4010],msTeamsManifestAppId:"4b956fb6-b72c-48a6-b3e2-326693cc2881",msTeamsManifestEntityId:"HomeTab"}
2,Bn={...Mn,environment:"prod",apiGlobal:"https://apiglobal.gotomeeting.com",authClientId:"a7717fe1-75ce-4f82-b477-2f6dabe3eed9",authUrl:"https://identity.goto.com",authRedirectUrlContainerSignOut:"https://identity.goto.com/oauth/logout?client_id=a7717fe1-75ce-4f82-b477-2f6dabe3eed9&redirect_uri",iamBaseUrl:"https://iam.servers.getgo.com",avatarBaseUrl:"https://avatars.servers.getgo.com",jiveApiBaseUrl:"https://api.jive.com",unleashAccessToken:"GoToApp:Production.2fbaf303e2c84bd5e8a3877dc9d3a3c9480bf76ddfdeae36233704cf",calendarServiceBaseUrl:"https://calendar-integration.services.goto.com",logoutRedirectUrl:`${window.location.origin}`,loggingServerUrl:"https://logging.getgo.com",notificationChannelUrl:"https://webrtc.jive.com/notification-channel/v1",profileUrl:`https://profile.logmeininc.com/${Pn}`,mixpanelToken:"c5934d98a88971c01e14163bfa6b1ee2",caPSBaseUrl:"https://xmpp.servers.getgo.com",myAccountPageUrl:"http://myaccount.logmeininc.com/",presenceServiceUrl:"https://api.jive.com/presence/v1",gotoResolveUrl:"https://ticketing-app.console.gotoresolve.com/api/v1/goto_connect",pendoScriptSrc:"pendo.js",externalInterfacePorts:[11801,16756,22229,51535,52631,52656,54200,55493,59316,63592],msTeamsManifestAppId:"4b956fb6-b72c-48a6-b3e2-326693cc2881",msTeamsManifestEntityId:"HomeTab"},Hn={dev:zn,staging:Un,rc:Fn,nightly:{...Bn,environment:"prod",unleashAccessToken:"GoToApp:Nightly.73e08dcaba411ee6eccde30c2d2f0f4e5d299810a873e469195f2840",mixpanelToken:"9ecffe57d3b75b7081a3f5d970a93259",pendoScriptSrc:"pendo-staging.js",externalInterfacePorts:[5001,5002,5003,5004,5005,5006,5007,5008,5009,5010],msTeamsManifestAppId:"d96ad4b9-5b46-4672-b27e-b0987fc4df9c",msTeamsManifestEntityId:"HomeTabNightly"},prod:Bn},jn=()=>pn().includes(".nightly.")?"nightly":globalThis.shellEnvironmentConfig?.environment,Vn=()=>"prod"===jn(),Wn=()=>Hn[jn()];var Kn=(e=>(e.gotoAppFeatureFlags="goto-app-feature-flags",e.gotoAppFeatureFlagsOverride="goto-app-feature-flags-override",e.gotoNonce="goto-nonce",e.authLocalStorageKey="goto",e.refreshTokenLocalStorageKey="shell-fgqp489hadgnosugq49p7gwhe8agsdg",e.tokenExpirationDate="expiry",e.notificationSettings="notificationSettings",e.gotoExperiencesOverride="goto-experiences-override",e.gotoExtensionsOverride="goto-extensions-override",e.hasClosedDownloadDesktopAppBanner="promote-desktop-id",e.hasAcceptedTermsOfServiceInGTC="ngStorage-termsOfServiceAccepted",e.navigationLinkBadges="navigation-link-badges",e.gotoCurrentRoute="goto-current-route",e.gotoCurrentExtensionId="goto-current-extension-id",e.chameleonTheme="chameleon-theme",e.userPreferences="userPreferences",e.userAccountPreferences="userAccountPreferences",e.userCache="user-cache",e.teamsUsePlugin="teams-use-plugin",e.gotoAuthOutage="goto-auth-outage",e.outdatedVersionBannerDismissedAt="outdated-version-banner-dismissed-at",e.pendingContainerUpdate="pending-container-update",e))(Kn||{});const qn="inflightRequest",Gn="path-before-navigation-to-search-page",Zn=e=>{const t=new URL(e);return t.href.includes(Dn.redirect)&&t.searchParams.has("code")&&t.searchParams.set("code","**OBFUSCATED**"),t.toString()};let Yn=null;const Jn=["error","warn","info","log"],Qn=e=>{Jn.forEach(t=>{e.subscribe(t,t=>{try{const r={...e.getContext(),...t};(Yn||(Yn=(()=>{const e=jt(),t={loggingUrl:Wn().loggingServerUrl??"",fixed:{ls_source:"goto-app",shell_entry_url:Zn(ln())}},r=new Ft(t);return r.field("ls_component","shell"),r.field("ls_session_id",e),r})()),Yn).log(r)}catch(e){console.error("LoggingService error",e)}})})};let Xn=null;function eo(){return Xn||(Xn=to()),Xn}const to=()=>{if(oo())return ro();const e=Vt().opener?.shell?.logger;return e||ro()},ro=()=>{const e=$t.createRoot({mincategory:"debug"});if(It.isNative&&It.isPluginAvailable("Logger")){const t=It.plugins.Logger.createLogger("shell"),r=e.setContext,n=e.deleteContext;e.setContext=(t,n)=>{r.apply(e,[t,n]),It.plugins.Logger.setContext?.(t,n)},e.deleteContext=t=>{n.apply(e,[t]),It.plugins.Logger.deleteContext?.(t)},Tt.forEach(r=>{e.subscribe(r,e=>{t[r](e)})})}else Qn(e);return e},no=(e,t=window)=>{const r=()=>{t.removeEventListener("pagehide",n)},n=t=>{t.persisted||(r(),e(t))};return t.addEventListener("pagehide",n),()=>{r()}},oo=e=>{try{return!(e??globalThis).opener?.shell}catch{return!0}};It.isPluginAvailable("WindowGroup")&&oo()&&At.WindowGroup.create("NavigationWindows");const io={showTopBar:!0,showSideBar:!0,features:{resizable:!0,scrollbars:!0,titlebar:!1,status:!1,location:!1,toolbar:!1,menubar:!1,height:778,width:992}}
2;let so;const ao=()=>globalThis.opener.shell.container,lo=e=>({...io,...e,features:{...io.features,...e?.features}}),co=()=>{Array.from(so.values()).forEach(e=>{e.window.closed&&e.close()}),fo()},uo=()=>{globalThis.console.clear(),setTimeout(()=>{co()},1e3)},ho=e=>{const t=e??globalThis.window;if(!oo())return ao().getWindowOptions(t);const r=so.get(t);return r?lo(r.options):io},po=e=>{const t=e??globalThis.window;oo()?so.has(t)&&(t.close(),so.delete(t),fo()):ao().closeWindow(t)},go=()=>{oo()?(Array.from(so.values()).forEach(e=>e.close()),fo()):ao().closeAllWindows()},fo=()=>{eo().setContext("shell-windows",so.size)},mo=(e,t)=>(r,n)=>{e.then(e=>{e[t](r,n)})},vo=(e,t,r)=>n=>mo(e,t)(r,n),bo=(e,t)=>({on:vo(e,"on",t),once:vo(e,"once",t),addListener:vo(e,"addListener",t),removeListener:vo(e,"removeListener",t),prependListener:vo(e,"prependListener",t),prependOnceListener:vo(e,"prependOnceListener",t)}),yo=e=>{const t={on:mo(e,"on"),once:mo(e,"once"),addListener:mo(e,"addListener"),removeListener:mo(e,"removeListener"),prependListener:mo(e,"prependListener"),prependOnceListener:mo(e,"prependOnceListener")};return new Proxy(t,{get:(t,r)=>r in t?t[r]:bo(e,r)})};class wo{constructor(){this.eventBusRegistry=new Map,this.promiseResolveRegistry=new Map}setEventAdapter(e){this.eventAdapter=e}removeEventAdapter(){this.eventAdapter=void 0}emitEvent(e,t,r,n){const o=this.getEmitter(e);o&&o.emit&&o.emit[t](r,n)}register(e,t){return this.hasEmitter(e)||(this.createEmitter(e,t),this.processPendingPromises(e)),this.getEmitter(e)}subscribeTo(e){if(this.hasEmitter(e)){const t=this.getEmitter(e);return yo(Promise.resolve(t.emit))}const t=new Promise(t=>{const r=this.promiseResolveRegistry.get(e);r?r.push(t):this.promiseResolveRegistry.set(e,[t])});return yo(t)}processPendingPromises(e){const t=this.getEmitter(e),r=this.promiseResolveRegistry.get(e);r&&(r.forEach(e=>e(yo(Promise.resolve(t.emit)))),this.promiseResolveRegistry.delete(e))}createEmitter(e,t){const r=Object.keys(t).reduce((t,r)=>(Object.defineProperty(t,r,{value:this.createRegisteredEventEmitter(Promise.resolve(t),e,r)}),t.setMaxListeners(60),t),new a.EventEmitter);this.eventBusRegistry.set(e,r)}hasEmitter(e){return!!this.eventBusRegistry.get(e)}getEmitter(e){return{emit:this.eventBusRegistry.get(e),subscribeTo:e=>this.subscribeTo(e)}}createRegisteredEventEmitter(e,t,r){const n=(n,o)=>e.then(e=>(this.eventAdapter&&!o&&this.eventAdapter.handleEvent(t,r,n),("error"!==r||0!==e.listenerCount(r))&&e.emit(r,n,o)));return Object.assign(n,{eventName:r,emit:n,...bo(e,r)})}}const xo=()=>{throw"Event is not registered in the Event Bus"},_o=()=>Object.assign(async()=>xo(),{emit:async()=>xo(),on:xo,once:xo,addListener:xo,removeListener:xo,prependListener:xo,prependOnceListener:xo,eventName:"Not Registered"});let ko;const Co=()=>oo()?(ko||(ko=new wo),ko):l().eventBus,So={type:"iPhone",imageSrc:"assets/mobileDownload/app-store-badge.svg",downloadUrl:"https://apps.apple.com/us/app/goto/id1465614785"},Eo={type:"Android",imageSrc:"assets/mobileDownload/google-play-badge.png",downloadUrl:"https://play.google.com/store/apps/details?id=com.logmein.gotoconnect&pli=1"},Io=()=>(()=>{const e=bn(),t={"Mac OS":/Mac OS X ([0-9]\d*((\.|_)[0-9]\d*)*)/,Windows:/Windows NT ([0-9]\d*((\.|_)[0-9]\d*)*)/,Android:/Android ([0-9]\d*((\.|_)[0-9]\d*)*)/};for(const r in t){const n=t[r].exec(e);if(n){const e=n[1]?.replace(/_/g,".");return{name:r,version:e,major:e?.split(".")[0]}}}return{name:void 0,version:void 0,major:void 0}})(),Ao=()=>Io().name,To=()=>(()=>{const e=bn(),t={Firefox:/Firefox\/([0-9]\d*(\.[0-9]\d*)*)/,Edge:/Edg\/([0-9]\d*(\.[0-9]\d*)*)/,Safari:/Version\/([0-9]\d*(\.[0-9]\d*)*) Safari/,Chrome:/Chrome\/([0-9]\d*(\.[0-9]\d*)*) /};for(const r in t){const n=t[r].exec(e);if(n){const e=n[1]?.replace(/_/g,".");return{name:r,version:e,major:e?.split(".")[0]}}}return{name:void 0,version:void 0,major:void 0}})(),Oo=()=>{const e=bn();return/iPhone/i.test(e)},Lo=()=>{const e=bn();return/Android/i.test(e)},$o=()=>Oo()||Lo(),No="account",Ro={accountSwitchBegin:_o(),accountSwitch:_o(),accountSwitchCompleted:_o()},Po=async e=>{const{func:t,defaultReturn:r=null,logLevel:n="warn"}=e;try{return await t()}catch(e){return eo()[n](e),r}};var Do,Mo={},zo={},Fo={},Uo={};function Bo(){return Do||(Do=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.assert=void 0,Uo.assert=function(e,t){t.forEach(function(t){if(!e[t])throw new TypeError('Required "'.concat(t,'" not defined'))})}),Uo}var Ho,jo={};function Vo(){return Ho||(Ho=1,Object.defineProperty(jo,"__esModule",{value:!0}),jo.redirect=void 0,jo.redirect=function(e){return location.assign(e),new Promise(function(){})}),jo}var Wo,Ko={};function qo(){if(Wo)return Ko;Wo=1;var e=Ko&&Ko.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};return Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.stringify=function(e){if("object"!=typeof e)return encodeURIComponent(e);var t=[];return Object.keys(e||{}
2).forEach(function(r){var n=e[r];""!==n&&void 0!==n&&("object"==typeof n&&(n=JSON.stringify(n)),t.push([r,n].map(encodeURIComponent).join("=")))}),t.join("&")},Ko.parse=function(t){var r=t;return-1!==["?","#"].indexOf(r.substr(0,1))&&(r=r.substr(1)),-1===r.indexOf("=")?r:r.split("&").reduce(function(t,r){var n,o=e(r.split("=").map(decodeURIComponent),2),i=o[0],s=o[1];try{n=JSON.parse(s)}catch{n=s}return t[i]=n,t},{})},Ko}var Go,Zo,Yo,Jo={},Qo={};function Xo(){return Go||(Go=1,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.decode=Qo.encode=void 0,Qo.encode=function(e){return typeof btoa<"u"?btoa(e):typeof Buffer<"u"?Buffer.from(e).toString("base64"):e},Qo.decode=function(e){return typeof atob<"u"?atob(e):typeof Buffer<"u"?Buffer.from(e,"base64").toString("utf8"):e}),Qo}var ei,ti,ri,ni={},oi={},ii={};function si(){if(ti)return ii;ti=1,Object.defineProperty(ii,"__esModule",{value:!0});var e=qo(),t=["_expires_in","access_token","client_authorities","client_id","expires_in","expires","id_token","issued","loa","principal","refresh_token","scope","state","token_type","user_account_authorities","user_authorities","user_id"],r=function(){function r(n){var o,i=this;if(this.token_type="Bearer",n instanceof r)return n;"object"==typeof(o="string"==typeof n?(0,e.parse)(n):"object"==typeof n&&n?n:{})&&t.forEach(function(e){e in o&&(i[e]=o[e])}),["refresh","refreshPromise","refreshTimeout"].forEach(function(e){Object.defineProperty(i,e,{configurable:!1,enumerable:!1,writable:!0})})}return Object.defineProperty(r.prototype,"expires_in",{get:function(){return this._expires_in},set:function(e){e&&!Number.isNaN(Number(e))?(this._expires_in=Number(e),this.expires=Date.now()+1e3*this._expires_in,this.issued=Date.now()):(this._expires_in=void 0,this.expires=void 0)},enumerable:!1,configurable:!0}),r.prototype.isValid=function(e){return void 0===e&&(e=0),!!this.access_token&&Number(this.expires)>
2Date.now()+e},r.prototype.logout=function(){clearTimeout(this.refreshTimeout),this.refresh=void 0,this.refreshPromise=void 0,this.refreshTimeout=void 0},r.prototype.startRefreshTimer=function(e){var t=this;return clearTimeout(this.refreshTimeout),this.refresh="function"==typeof e?e(this):this.expires,this.refreshPromise=new Promise(function(e){t.needsToRefresh()&&e(t),t.refreshTimeout=setInterval(function(){t.needsToRefresh()&&(clearInterval(t.refreshTimeout),e(t))},5e3)}),this.refreshPromise},r.prototype.toString=function(){return(0,e.stringify)(this)},r.prototype.needsToRefresh=function(){return(this.refresh||0)-Date.now()<0},r}();return ii.default=r,ii}var ai,li,ci={};function di(){return li||(li=1,function(e){var t=zo&&zo.__assign||function(){return t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},t.apply(this,arguments)},r=zo&&zo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.defaultOptions=void 0;var n=(Yo||(Yo=1,function(e){var t=Fo&&Fo.__assign||function(){return t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.loginWithSSO=e.loginWithPKCE=e.login=void 0;var r=Bo(),n=Vo(),o=qo(),i=(Zo||(Zo=1,function(e){var t=Jo&&Jo.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):function(e){return e instanceof r?e:new r(function(t){t(e)})}(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())})},r=Jo&&Jo.__generator||function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}},n=Jo&&Jo.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},o=Jo&&Jo.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)(n||!(o in t))&&(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.getBase64UrlEncodedCodeVerifier=e.bufferToBase64UrlEncoded=e.urlEncodeBase64=e.sha256=void 0;var i=Xo();e.sha256=function(e){var t=(new TextEncoder).encode(e);return window.crypto.subtle.digest("SHA-256",t)},e.urlEncodeBase64=function(e){var t={"+":"-","/":"_","=":""};return e.replace(/[+/=]/g,function(e){return t[e]})},e.bufferToBase64UrlEncoded=function(t){var r=new Uint8Array(t);return(0,e.urlEncodeBase64)((0,i.encode)(String.fromCharCode.apply(String,o([],n(r),!1))))},e.getBase64UrlEncodedCodeVerifier=function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return t(void 0,o([],n(i),!1),void 0,function(t){var n;return void 0===t&&(t=""),r(this,function(r){switch(r.label){case 0:return[4,(0,e.sha256)(t)];case 1:return n=r.sent(),[2,(0,e.bufferToBase64UrlEncoded)(n)]}})})}}(Jo)),Jo);e.login=function(e){(0,r.assert)(e,["client_id","url","redirect_url"]);var t={client_id:e.client_id,gateway:e.gateway,login_theme:e.theme,redirect_uri:e.redirect_url,response_type:"token",scope:e.scope,state:e.state,minLoa:e.minLoa},i="".concat(e.url,"/oauth/authorize?").concat((0,o.stringify)(t));return(e.onLoginRedirect||n.redirect)(i)},e.loginWithPKCE=function(e){(0,r.assert)(e,["client_id","url","redirect_url","code_verifier"]);var t={client_id:e.client_id,gateway:e.gateway,login_theme:e.theme,redirect_uri:e.redirect_url,response_type:"code",code_challenge:"",code_challenge_method:"S256",scope:e.scope,state:e.state,minLoa:e.minLoa};return(0,i.getBase64UrlEncodedCodeVerifier)(e.code_verifier).then(function(r){if(!r)throw new Error("Code challenge is required");t.code_challenge=r;var i="".concat(e.url,"/oauth/authorize?").concat((0,o.stringify)(t));return(e.onLoginRedirect||n.redirect)(i)})},e.loginWithSSO=function(r){return(0,e.login)(t(t({},r),{gateway:!0}))}}(Fo)),Fo),o=function(){if(ei)return ni;ei=1,Object.defineProperty(ni,"__esModule",{value:!0}),ni.logout=void 0;var e=Bo(),t=Vo(),r=qo();return ni.logout=function(n){(0,e.assert)(n,["client_id","url","redirect_url"]);var o={client_id:n.client_id,redirect_uri:n.redirect_url},i="".concat(n.url,"/oauth/logout?").concat((0,r.stringify)(o));return(n.onLogoutRedirect||t.redirect)(i)},ni}(),i=function(){if(ri)return oi;ri=1;var e=oi&&oi.__assign||function(){return e=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},e.apply(this,arguments)}
2,t=oi&&oi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oi,"__esModule",{value:!0}),oi.requestPKCEToken=void 0;var r=t(si()),n=Xo(),o=qo();return oi.requestPKCEToken=function(t){return fetch("".concat(t.url,"/oauth/token"),{body:(0,o.stringify)({grant_type:"authorization_code",code:t.code,client_id:t.client_id,redirect_uri:t.redirect_url,state:t.state,code_verifier:t.code_verifier}),headers:e({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},t.client_secret&&{Authorization:"Basic ".concat((0,n.encode)("".concat(t.client_id,":").concat(t.client_secret)))}),method:"POST"}).then(function(e){return e.ok?e.json():e.json().then(function(t){throw new Error("".concat(e.status," ").concat(e.statusText,": ").concat(t.error_description))}).catch(function(){throw new Error("".concat(e.status," ").concat(e.statusText))})}).then(function(e){return new r.default(e)})},oi}(),s=r(si()),a=Bo(),l=Vo(),c=function(){if(ai)return ci;ai=1;var e=ci&&ci.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},t=ci&&ci.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)(n||!(o in t))&&(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};return Object.defineProperty(ci,"__esModule",{value:!0}),ci.randomString=void 0,ci.randomString=function(r){var n=new Uint8Array(r);return window.crypto.getRandomValues(n),String.fromCharCode.apply(String,t([],e(function(e){return e.map(function(e){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charCodeAt(e%62)})}(n)),!1))},ci}();e.defaultOptions={client_id:"",enableTokenRefresh:!1,onLoginRedirect:l.redirect,onLogoutRedirect:l.redirect,redirect_url:"",url:""};var d=function(){function r(r){(0,a.assert)(r,["client_id","url","redirect_url"]),this.options=t(t({},e.defaultOptions),r)}return r.prototype.init=function(e){var t=this.getRedirectResponse();if(t)return t;var r=e&&new s.default(e);return r&&r.isValid()?this.bindToken(r):void 0},r.prototype.getRedirectResponse=function(e){if(void 0===e&&(e=window.location.hash),e){var t=new s.default(e);if(t.isValid())return function(){if(window.history&&window.history.replaceState){var e=window.location.href.replace(window.location.hash,"");window.history.replaceState(null,"",e)}else window.location.hash=""}(),this.bindToken(t)}},r.prototype.login=function(e){return void 0===e&&(e={}),(0,n.login)(t(t({},this.options),e))},r.prototype.loginWithSSO=function(e){return void 0===e&&(e={}),(0,n.loginWithSSO)(t(t({},this.options),e))},r.prototype.loginWithPKCE=function(e){return void 0===e&&(e={}),(0,n.loginWithPKCE)(t(t({},this.options),e))},r.prototype.requestPKCEToken=function(e){return void 0===e&&(e={}),(0,i.requestPKCEToken)(t(t({},this.options),e))},r.prototype.storeTokenObject=function(e){if(e.isValid())return this.bindPKCEToken(e)},r.prototype.logout=function(e){return void 0===e&&(e={}),(0,o.logout)(t(t({},this.options),e))},r.prototype.bindToken=function(e){var t=this;return this.options.enableTokenRefresh&&e.startRefreshTimer(this.options.tokenRefreshTimestamp).then(this.options.onTokenRefresh).then(function(){return t.login()}),this.bindLogoutToToken(e),e},r.prototype.bindPKCEToken=function(e){var t=this;return this.options.enableTokenRefresh&&e.startRefreshTimer(this.options.tokenRefreshTimestamp).then(this.options.onTokenRefresh).then(function(){return t.loginWithPKCE()}),this.bindLogoutToToken(e),e},r.prototype.bindLogoutToToken=function(e){var t=this,r=e.logout;Object.defineProperty(e,"logout",{enumerable:!1,value:function(){r.call(e),t.logout()}})},r.prototype.randomString=function(e){return(0,c.randomString)(e)},r}();e.default=d}(zo)),zo}var ui,hi,pi={},gi=(hi||(hi=1,function(e){var t=Mo&&Mo.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);
2(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=Mo&&Mo.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)},n=Mo&&Mo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Token=void 0;var o=n(di()),i=n(si());e.Token=i.default,e.default=o.default,r(function(){if(ui)return pi;ui=1;var e=pi&&pi.__assign||function(){return e=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},e.apply(this,arguments)},t=pi&&pi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pi,"__esModule",{value:!0}),pi.removeTokenFromStorage=pi.setTokenInStorage=pi.getTokenFromStorage=void 0;var r=t(si()),n={key:"auth-client-token",logger:console};return pi.getTokenFromStorage=function(t){var o=e(e({},n),t);try{var i=localStorage.getItem(o.key);if(!i)return;var s=JSON.parse(i);return new r.default(s)}catch(e){o.logger.error("Token could not be retrieved: ".concat(e.message))}},pi.setTokenInStorage=function(t,r){if(t){var o=e(e({},n),r);try{var i=JSON.stringify(t);localStorage.setItem(o.key,i)}catch(e){o.logger.error("Token could not be stored: ".concat(e.message))}}},pi.removeTokenFromStorage=function(t){var r=e(e({},n),t);try{localStorage.removeItem(r.key)}catch(e){r.logger.error("Token could not be removed: ".concat(e.message))}},pi}(),e)}(Mo)),Mo);const fi=o(gi);function mi(e,t){if(!e)throw new vi(t)}class vi extends Error{constructor(e){super(e instanceof Error?e.message:`${e??""}`),this.name="AssertionError",Object.setPrototypeOf(this,vi.prototype)}}const bi=(e,t)=>{let r=t;if("string"==typeof e)try{r=JSON.parse(e)}catch{eo().error("SafeParseJSON: failed to parse JSON",e)}return r},yi=()=>({key:Kn.authLocalStorageKey,logger:eo()}),wi=()=>{const e=gi.getTokenFromStorage(yi());if(e?.isValid())return e},xi=()=>void 0!==wi(),_i=()=>{let e=_n(Kn.refreshTokenLocalStorageKey);const t=!!e&&Ii(e);return eo().info("getRefreshToken: retrieved refresh token from localStorage",{hasRefreshToken:!!e,isExpired:t}),(!e||t)&&(eo().info("getRefreshToken: refresh token is missing or expired, removing from localStorage"),Cn(Kn.refreshTokenLocalStorageKey),e=null),e},ki=e=>{e?gi.setTokenInStorage(new gi.Token(e),yi()):Si()},Ci=e=>{if(e)try{kn(Kn.refreshTokenLocalStorageKey,e)}catch(e){eo().error("setRefreshToken: failed to write refresh token to localStorage",e)}else eo().info("setRefreshToken: no refresh token provided, removing token from localStorage"),Si()},Si=()=>gi.removeTokenFromStorage(yi()),Ei=()=>{try{Cn(Kn.refreshTokenLocalStorageKey)}catch(e){eo().error("cannot remove token",e)}},Ii=e=>{try{const t=JSON.parse(atob(e.split(".")[1])),r=Date.now()/1e3,n=r>(t.exp??0);return n&&eo().warn("Refresh token expired",{exp:t.exp,now:r,expiredForSeconds:r-(t.exp??0)}),n}catch(e){return eo().error("cannot parse token",e),!1}},Ai=e=>{if(!e)return null;try{return bi(e,{}).principal||null}catch(e){eo().error("Failed to extract principal from token",e)}return null},Ti=e=>{const t=Object.entries(e).filter(([,e])=>null!=e);return new URLSearchParams(t).toString()},Oi=e=>{let t;try{t=new URL(e)}catch(e){const t=String(e);throw new TypeError(t)}return t},Li="app init",$i="shell start",Ni="shell done",Ri=(e,t,r)=>()=>{try{return performance.measure(e,t,r)}catch(t){eo().error(`${e} - error in the performance calculation for mixpanel`,t)}},Pi=Ri("shell_shellStartToDone",$i,Ni),Di=[{name:"shell_init",start:void 0,end:Li},{name:"shell_appToShell",start:Li,end:$i}],Mi="UnleashSetup",zi=`${Mi} start`,Fi=`${Mi} done`,Ui=Ri(`shell_${Mi}`,zi,Fi),Bi=(e=1)=>new Promise(t=>setTimeout(t,e)),Hi=()=>Bi(0);class ji{constructor(e=[]){this.listeners=[];const t=new AbortController;this.signal=t.signal,e.forEach(e=>{if(e.aborted)t.abort();else{const r=()=>(e=>t.abort(e.reason))(e);e.addEventListener("abort",r,{once:!0}),this.listeners.push({signal:e,listener:r})}})}
2cleanup(){this.listeners.forEach(({signal:e,listener:t})=>{e.removeEventListener("abort",t)}),this.listeners=[]}}const Vi=async e=>{try{return{value:await e()}}catch(e){return{error:e}}},Wi=({error:e})=>!!e,Ki=async(e,t={retryAfterInMilliseconds:1})=>{let r,n=0,o=!1,{maxRetryNumber:i=0,retryAfterInMilliseconds:s=0}=t;const{randomized:a=!1,exponential:l=!1}=t,{retryOn:c=Wi}=t;i<0&&(i=0),s<0&&(s=0),a&&(s=Math.floor(Math.random()*s)+s);do{n>0&&(await Bi(s),l&&(s*=n+1)),n+=1,r=await Vi(e),o=await c({attempt:n,error:r.error,value:r.value})}while(n<1+i&&o);const{value:d,error:u}=r;if(u)throw u;return d},qi=async e=>{const{error:t,value:r}=e;return!!t||!!r&&r.status>=500},Gi=(e,t)=>{const{maxRetryNumber:r=0,retryAfterInMilliseconds:n=0,retryOn:o=qi,exponential:i=!1,randomized:s=!1}=t?.retry??{},a={maxRetryNumber:r,retryAfterInMilliseconds:n,retryOn:o,exponential:i,randomized:s},l=t?.timeoutInMS;return Ki(l?()=>Yi(e,{...t,timeoutInMS:l}):()=>fetch(e,t),a)},Zi=(e,t)=>{clearTimeout(e),t.cleanup()},Yi=(e,t)=>new Promise((r,n)=>{const{timeoutInMS:o,signal:i}=t,s=new AbortController,a=[s.signal,i].filter(e=>e instanceof AbortSignal),l=new ji(a),c=setTimeout(()=>{s.abort("Timeout")},o);fetch(e,{...t,signal:l.signal}).then(e=>{Zi(c,l),r(e)}).catch(e=>{Zi(c,l),n(e)})});var Ji=(e=>(e.STRING="string",e.JSON="json",e))(Ji||{}),Qi=(e=>(e.PKCE_REFRESH_TOKENS="pkce-refresh-tokens",e.SHELL_APPLICATION_SWITCHER="shell-application-switcher",e.SHELL_NOTIFICATION_SETTINGS="shell-notification-settings",e.SHELL_SCHEDULE_SETTINGS="shell-schedule-settings",e.SHELL_HOTKEY_SETTINGS="shell-hotkey-settings",e.SHELL_LANGUAGE_SETTINGS="shell-language-settings",e.SHELL_ADVANCED_PRESENCE_BUSY="shell-advanced-presence-busy",e.SHELL_RESOLVE_USER_ACCESS_ATTACHMENT="shell-resolve-user-access-attachment",e.SHELL_APP_UPDATE_INTERVAL_OVERRIDE="shell-app-update-interval-override",e.SHELL_PAGES_OPTIMIZATION="shell-pages-optimization",e.SHELL_CALENDAR_GETEVENTS_USE_ID="shell-calendar-getevents-use-id",e.SHELL_CHATBOT="shell-chatbot",e.SHELL_BLOCKED_EXTENSION_IDS="shell-blocked-extension-ids",e.SHELL_CAN_SEE_TRIAL_BANNER="shell-can-see-trial-banner",e.SHELL_REMOVE_FRAMEWORK_CSS="shell-remove-framework-css",e.SHELL_LOAD_SINGLE_EXTENSION="goto-shell-load-single-extension",e.SHELL_LOAD_VIEWS_ON_APP_START="goto-shell-load-views-on-app-start",e.SHELL_MS_TEAM_NO_PLUGIN="shell-ms-team-no-plugin",e.SHELL_ENABLE_PRESENCE_AUTO_UPDATE="shell-enable-presence-auto-update",e.SHELL_SEARCH_CONTEXT_MENU="shell-search-context-menu",e.SHELL_DISABLE_SERVICE_WORKER="shell-disable-service-worker",e.SHELL_USER_PREFERENCES_V2_ENABLED="shell-user-preferences-v2-enabled",e.SHELL_SHOW_GTC_QUICK_START_GUIDE="shell-show-gtc-quick-start-guide",e.SHELL_PRESENCE_SELECTOR_SUBMENU="shell-presence-submenu",e.SHELL_BFF_OPTIMIZATION="shell-bff-optimization",e.SHELL_BFF_OPTIMIZATION_CALL="shell-bff-optimization-call",e.SHELL_RESPONSIVENESS="shell-responsiveness",e.SHELL_HIDDEN_FLOATING_NAVRAIL="shell-hidden-floating-navrail",e.SHELL_HIDDEN_FLOATING_SIDEBAR="shell-hidden-floating-sidebar",e.SHELL_GLOBAL_SEARCH_FEEDBACK="shell-global-search-feedback",e.SHELL_HIDE_TOPBAR_ACCOUNT_SWITCHER="shell-hide-topbar-account-switcher",e.SHELL_ENABLE_DND_TIMER="shell-enable-dnd-timer",e.SHELL_DISABLE_PRESENCE_SELECTOR="shell-disable-presence-selector",e.TOPBAR_PENDO_ICON="topbar-pendo-icon",e.SHELL_NAVRAIL_CUSTOMIZATION="shell-navrail-customization",e.SHELL_COMMUNITY_FORUM_URL="shell-community-forum-url",e.SHELL_AUTH_OUTAGE="shell-auth-outage",e.BLOCKED_VERSIONS="blocked-versions",e.SHELL_OUTDATED_VERSIONS="shell-outdated-versions",e))(Qi||{}),Xi=(e=>(e.CHAMELEON_THEME_PROVIDER_BRAND="chameleonThemeProvider",e.FAVICON_ID="faviconId",e.GOTO_BRAND_NAME="gotoBrandName",e.HOME_PAGE_LOGO_ID="homePageLogoId",e.LOADING_LOGO_ID="loadingLogoId",e.SHELL_BRAND_NAME="shellBrandName",e.TOPBAR_LOGO_ID="topBarLogoId",e.WELCOME_LOGO_ID="welcomeLogoId",e))(Xi||{});const es="https://api.jive.com/feature-flags-edge/v1/api/frontend",ts=`${es}/features`;let rs;const ns={[Xi.CHAMELEON_THEME_PROVIDER_BRAND]:"",[Xi.FAVICON_ID]:"goto/favicon.ico",[Xi.GOTO_BRAND_NAME]:"GoTo",[Xi.HOME_PAGE_LOGO_ID]:"goto/darkmode/gotoLogo.svg",[Xi.LOADING_LOGO_ID]:"goto/loadingLogo.png",[Xi.SHELL_BRAND_NAME]:"GoTo",[Xi.TOPBAR_LOGO_ID]:"goto/gotoLogo.svg",[Xi.WELCOME_LOGO_ID]:"goto/gotoLogo.svg"},os=(e,t)=>{const r={...e};if(t)for(const n in t)try{e&&"object"==typeof e[n]&&"object"==typeof t[n]?r[n]=os(r[n],t[n]):r[n]=t[n]}catch(e){eo().error("merge error",e)}return r},is=e=>{try{kn(Kn.gotoAppFeatureFlags,JSON.stringify(e??""))}catch(e){eo().error("setFeatureFlags: could not store the feature flags in the local storage",e)}},ss=e=>{const t=(e=>0===Object.keys(e).length)(e)?(()=>{const e=_n(Kn.gotoAppFeatureFlags);if(e)return bi(e,{})})():e;t&&is(t),rs=cs(t)},as=async e=>{const t=`${ts}/${e}`,r=new Headers({Authorization:Wn().unleashAccessToken});try{const n=await Yi(t,{headers:r,timeoutInMS:1e4});return n.ok?await n.json():void eo().error("fetchSingleUnleashFlag: request failed",{flagName:e,status:n.status})}catch(t){return void eo().error("fetchSingleUnleashFlag: fetch error",{flagName:e,error:t})}},ls=()=>
2{if(rs)return rs;const e=_n(Kn.gotoAppFeatureFlags);if(!e)return;const t=bi(e,{});return cs(t)},cs=e=>{const t=_n(Kn.gotoAppFeatureFlagsOverride);return((e,t)=>os(e,t))(e??{},bi(t,{}))},ds=(e,t)=>{const r=ls()?.[e];return void 0!==r?r:!0===t?void eo().error("Setting a feature flag default value to true is currently not supported"):t},us={getFeatureFlags:ls,getFeatureFlagValue:ds},hs="GOTO_CODE_VERIFICATION",ps="shell-69582fdb-c693-42cb-98a4-c1d36894d2f9",gs=()=>{let e="";return Array.from(globalThis.crypto.getRandomValues(new Uint8Array(43))).forEach(t=>e+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~."[t%66]),e},fs=()=>ds(Qi.PKCE_REFRESH_TOKENS,{enabled:!1,maxRefreshTokens:0})?.maxRefreshTokens??0,ms=()=>Number(_n(ps)??0),vs=e=>encodeURIComponent(JSON.stringify(e));const bs=()=>In(qn),ys=(e,t={})=>{try{return JSON.parse(e)??{}}catch{return t}},ws=(e,t)=>e,xs="IFRAME_ID",_s=!1,ks="ISLOGGEDIN_IFRAME_MESSAGE_TYPE",Cs="error",Ss="code",Es="/authentication";function Is(e){return"function"==typeof e}function As(e){var t=e(function(e){Error.call(e),e.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Ts=As(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n  "):"",this.name="UnsubscriptionError",this.errors=t}});function Os(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Ls=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,r,n,o;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var s=Pt(i),a=s.next();!a.done;a=s.next())a.value.remove(this)}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else i.remove(this);var l=this.initialTeardown;if(Is(l))try{l()}catch(e){o=e instanceof Ts?e.errors:[e]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var d=Pt(c),u=d.next();!u.done;u=d.next()){var h=u.value;try{Rs(h)}catch(e){o=o??[],e instanceof Ts?o=Mt(Mt([],Dt(o)),Dt(e.errors)):o.push(e)}}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}}if(o)throw new Ts(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Rs(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Os(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&Os(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e;var t}(),$s=Ls.EMPTY;function Ns(e){return e instanceof Ls||e&&"closed"in e&&Is(e.remove)&&Is(e.add)&&Is(e.unsubscribe)}function Rs(e){Is(e)?e():e.unsubscribe()}function Ps(){}function Ds(e){e()}var Ms=function(e){function t(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,Ns(t)&&t.add(r)):r.destination=Bs,r}return Rt(t,e),t.create=function(e,t,r){return new Fs(e,t,r)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Ls),zs=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){Us(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Us(e)}else Us(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Us(e)}},e}(),Fs=function(e){function t(t,r,n){var o,i=e.call(this)||this;return o=Is(t)||!t?{next:t??void 0,error:r??void 0,complete:n??void 0}:t,i.destination=new zs(o),i}return Rt(t,e),t}(Ms);function Us(e){!function(e){!function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];setTimeout.apply(void 0,Mt([e,t],Dt(r)))}(function(){throw e})}(e)}var Bs={closed:!0,next:Ps,error:function(e){throw e},complete:Ps},Hs="function"==typeof Symbol&&Symbol.observable||"@@observable";function js(e){return e}var Vs=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this,o=function(e){return e&&e instanceof Ms||function(e){return e&&Is(e.next)&&Is(e.error)&&Is(e.complete)}(e)&&Ns(e)}(e)?e:new Fs(e,t,r);return Ds(function(){var e=n,t=e.operator,r=e.source;o.add(t?t.call(o,r):r?n._subscribe(o):n._trySubscribe(o))}),o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=Ws(t))(function(t,n){var o=new Fs({next:function(t){try{e(t)}catch(e){n(e),o.unsubscribe()}},error:n,complete:t});r.subscribe(o)})},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[Hs]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(e){return 0===e.length?js:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Ws(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}();function Ws(e){var t;return null!==(t=e??void 0)&&void 0!==t?t:Promise}var Ks,qs=As(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Gs=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return Rt(t,e),t.prototype.lift=function(e){var t=new Zs(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new qs},t.prototype.next=function(e){var t=this;Ds(function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var o=Pt(t.currentObservers),i=o.next();!i.done;i=o.next())i.value.next(e)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}})},t.prototype.error=function(e){var t=this;Ds(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}})},t.prototype.complete=function(){var e=this;Ds(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0}
2,enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this,n=r.hasError,o=r.isStopped,i=r.observers;return n||o?$s:(this.currentObservers=null,i.push(e),new Ls(function(){t.currentObservers=null,Os(i,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,o=t.isStopped;r?e.error(n):o&&e.complete()},t.prototype.asObservable=function(){var e=new Vs;return e.source=this,e},t.create=function(e,t){return new Zs(e,t)},t}(Vs),Zs=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return Rt(t,e),t.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},t.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:$s},t}(Gs);let Ys=((Ks=class extends Gs{constructor(){super(),this.isLoggedIn=_s}static getInstance(){return this.instance||(this.instance=new Ks),this.instance}update(e){this.isLoggedIn=e,this.next(e)}getLastIsLoggedInState(){return this.isLoggedIn}}).instance=null,Ks);const Js="IsLoggedIn Iframe",Qs="about:blank",Xs=e=>e.src===Qs,ea=e=>!!e&&e instanceof HTMLIFrameElement,ta=e=>(e=>Vt().parent.postMessage(e,"*"))({type:ks,isLoggedIn:e}),ra=new class{isLoggedIn(){return this.loginCheckPromise||(this.loginCheckPromise=(new na).getPromise().finally(()=>{this.loginCheckPromise=void 0})),this.loginCheckPromise}};class na{constructor(){this.error=()=>{},this.complete=()=>{},this.resolve=()=>{}}getPromise(){return new Promise(e=>{this.resolve=e,this.subscription=Ys.getInstance().subscribe(this),this.timer=An(this.timeout.bind(this),15e3),(()=>{const e=mn().getElementById(xs);ea(e)?e.src=(()=>{const{authUrl:e,authClientId:t}=Wn();return`${e}/oauth/authorize?${new URLSearchParams({response_type:"code",client_id:t,redirect_uri:`${cn()}${Es}`,gateway:"true"})}`})():eo().debug(`${Js}: Iframe not found, iframe should be added to the dom before reloading`)})()})}next(e){this.unsubscribeAndClearTimeout(),this.resolve(e)}timeout(){this.unsubscribeAndClearTimeout(),this.resolve(_s)}unsubscribeAndClearTimeout(){"number"==typeof this.timer&&Tn(this.timer),this.subscription?.unsubscribe()}}const oa=()=>It.isNative,ia=()=>"Mac OS"===Ao(),sa="/error/unauthenticated",aa="/error",la="shell-settings",ca=`/${la}`,da=`${ca}/calendar`,ua=`${ca}/appearance`,ha=`${ca}/keyboard-shortcut`,pa=`${ca}/notifications`,ga=`${ca}/schedule`,fa=`${ca}/language`,ma=`${ca}/applaunch`,va="/calendar-connected",ba="/terms-of-service",ya="/landing",wa="/",xa="/newmessage",_a="/activity",ka="/activity?activityType=VOICEMAIL",Ca="/search",Sa="/start-goto-for-teams",Ea="/integration-redirect",Ia="/integration-auth-start",Aa="/integration-auth-end",Ta="/connect-to-desktop-app",Oa=[ya,ba,va,sa,aa,Sa,Ea,Ta],La={"/main":"@home","/call":"@call",[_a]:"@activity","/voice/callhistory":"@activity",[xa]:"@message","/messaging":"@messaging",[ka]:"@voicemail","/voice":"@voice","/voice/voicemails":"@voicemail","/contactssearch":"@contacts","/contacts":"@contacts","/analytics":"@analytics","/meetings":"oos-meeting-app","/trainings":"oos-training-app","/webinars":"oos-webinar-app","/engagements":"engagements","/contact-center":"contact-center","/contact-center-agent":"contact-center-agent","/contact-center-configuration":"contact-center-configuration","/contact-center-supervisor":"contact-center-supervisor","/inbox":"inbox"};class $a extends Error{constructor(e){super(e),this.name="RedirectError"}}class Na extends $a{constructor(e){super(e),this.name="UnauthenticatedError",this.url=sa}}const Ra=class e extends Gs{constructor(){super(),this.isLoggedIn=!1}static getInstance(){return this.instance||(this.instance=new e),this.instance}update(e){this.isLoggedIn=e,this.next(e)}waitIsLoggedInState(){return this.isLoggedIn?Promise.resolve(!0):Promise.resolve(!1)}};Ra.instance=null;let Pa=Ra;var Da=Object.freeze({__proto__:null,get start(){return bc},get ensureJQuerySupport(){return Kl},get setBootstrapMaxTime(){return El},get setMountMaxTime(){return Il},get setUnmountMaxTime(){return Al},get setUnloadMaxTime(){return Tl},get registerApplication(){return oc},get unregisterApplication(){return sc},get getMountedApps(){return ec},get getAppStatus(){return rc},get unloadApplication(){return ac},get checkActivityFunctions(){return ic},get getAppNames(){return tc},get pathToActiveWhen(){return dc},get navigateToUrl(){return Dl},get patchHistoryApi(){return jl},get triggerAppChange(){return gc},get addErrorHandler(){return Ba},get removeErrorHandler(){return Ha},get mountRootParcel(){return xl},get NOT_LOADED(){return Wa},get LOADING_SOURCE_CODE(){return Ka},get NOT_BOOTSTRAPPED(){return qa},get BOOTSTRAPPING(){return Ga},get NOT_MOUNTED(){return Za},get MOUNTING(){return Ya},get UPDATING(){return Qa},get LOAD_ERROR(){return tl},get MOUNTED(){return Ja},get UNLOADING(){return el},get UNMOUNTING(){return Xa},get SKIP_BECAUSE_BROKEN(){return rl}}),Ma=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof r.g<"u"?r.g:typeof self<"u"?self:{}).CustomEvent,za=function(){try{var e=new Ma("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch{}return!1}()?Ma:typeof document<"u"&&"function"==typeof document.createEvent?function(e,t){var r=document.createEvent("CustomEvent");return t?r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):r.initCustomEvent(e,!1,!1,void 0),r}:function(e,t){var r=document.createEventObject();return r.type=e,t?(r.bubbles=!!t.bubbles,r.cancelable=!!t.cancelable,r.detail=t.detail):(r.bubbles=!1,r.cancelable=!1,r.detail=void 0),r};let Fa=[];function Ua(e,t,r){const n=Va(e,t,r);
2Fa.length?Fa.forEach(e=>e(n)):setTimeout(()=>{throw n})}function Ba(e){if("function"!=typeof e)throw Error(ja(28));Fa.push(e)}function Ha(e){if("function"!=typeof e)throw Error(ja(29));let t=!1;return Fa=Fa.filter(r=>{const n=r===e;return t=t||n,!n}),t}function ja(e,t,...r){return`single-spa minified message #${e}: See https://single-spa.js.org/error/?code=${e}${r.length?`&arg=${r.join("&arg=")}`:""}`}function Va(e,t,r){const n=`${al(t)} '${il(t)}' died in status ${t.status}: `;let o;if(e instanceof Error){try{e.message=n+e.message}catch{}o=e}else{console.warn(ja(30,0,t.status,il(t)));try{o=Error(n+JSON.stringify(e))}catch{o=e}}return o.appOrParcelName=il(t),t.status=r,o}const Wa="NOT_LOADED",Ka="LOADING_SOURCE_CODE",qa="NOT_BOOTSTRAPPED",Ga="BOOTSTRAPPING",Za="NOT_MOUNTED",Ya="MOUNTING",Ja="MOUNTED",Qa="UPDATING",Xa="UNMOUNTING",el="UNLOADING",tl="LOAD_ERROR",rl="SKIP_BECAUSE_BROKEN";function nl(e){return e.status===Ja}function ol(e){try{return e.activeWhen(window.location)}catch(t){return Ua(t,e,rl),!1}}function il(e){return e.name}function sl(e){return!!e.unmountThisParcel}function al(e){return sl(e)?"parcel":"application"}function ll(){for(let e=arguments.length-1;e>0;e--)for(let t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function cl(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return e[r];return null}function dl(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!cl(t,e=>"function"!=typeof e)));var t}function ul(e,t){let r=e[t]||[];r=Array.isArray(r)?r:[r],0===r.length&&(r=[()=>Promise.resolve()]);const n=al(e),o=il(e);return function(e){return r.reduce((r,i,s)=>r.then(()=>{const r=i(e);return hl(r)?r:Promise.reject(ja(15,0,n,o,t,s))}),Promise.resolve())}}function hl(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let pl=[];function gl(e,t){return Promise.resolve().then(()=>e.status!==qa?e:(e.status=Ga,e.bootstrap?Ol(e,"bootstrap").then(r).catch(r=>{if(t)throw Va(r,e,rl);return Ua(r,e,rl),e}):Promise.resolve().then(r)));function r(){return e.status=Za,e}}function fl(e,t){return Promise.resolve().then(()=>{if(e.status!==Ja)return e;e.status=Xa;const r=Object.keys(e.parcels).map(t=>e.parcels[t].unmountThisParcel());return Promise.all(r).then(n,r=>n().then(()=>{const n=Error(r.message);if(t)throw Va(n,e,rl);Ua(n,e,rl)})).then(()=>e);function n(){return Ol(e,"unmount").then(()=>{e.status=Za},r=>{if(t)throw Va(r,e,rl);Ua(r,e,rl)})}})}let ml=!1,vl=!1;function bl(e,t){return Promise.resolve().then(()=>e.status!==Za?e:(ml||(window.dispatchEvent(new za("single-spa:before-first-mount")),ml=!0),e.status=Ya,Ol(e,"mount").then(()=>(e.status=Ja,vl||(window.dispatchEvent(new za("single-spa:first-mount")),vl=!0),e)).catch(r=>{return e.status=Ja,fl(e,!0).then(n,n);function n(){if(t)throw Va(r,e,rl);return Ua(r,e,rl),e}})))}let yl=0;const wl={parcels:{}};function xl(){return _l.apply(wl,arguments)}function _l(e,t){const r=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(ja(2));if(e.name&&"string"!=typeof e.name)throw Error(ja(3,0,typeof e.name));const n=yl++;let o=e.name||`parcel-${n}`;if("object"!=typeof t)throw Error(ja(4,0,o,typeof t));if(!t.domElement)throw Error(ja(5,0,o));const i="function"==typeof e,s=i?e:()=>Promise.resolve(e),a={id:n,parcels:{},status:i?Ka:qa,customProps:t,parentName:il(r),unmountThisParcel:()=>u.then(()=>{if(a.status!==Ja)throw Error(ja(6,0,o,a.status));return fl(a,!0)}).then(e=>(a.parentName&&delete r.parcels[a.id],e)).then(e=>(h(e),e)).catch(e=>{throw a.status=rl,p(e),e})};let l;r.parcels[n]=a;let c=s();if(!c||"function"!=typeof c.then)throw Error(ja(7));c=c.then(e=>{if(!e)throw Error(ja(8));if(o=e.name||`parcel-${n}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!dl(e.bootstrap))throw Error(ja(9,0,o));if(!dl(e.mount))throw Error(ja(10,0,o));if(!dl(e.unmount))throw Error(ja(11,0,o));if(e.update&&!dl(e.update))throw Error(ja(12,0,o));const t=ul(e,"bootstrap"),r=ul(e,"mount"),i=ul(e,"unmount");a.status=qa,a.name=o,a.bootstrap=t,a.mount=r,a.unmount=i,a.timeouts=Ll(e.timeouts),e.update&&(a.update=ul(e,"update"),l.update=function(e){return a.customProps=e,kl((t=a,Promise.resolve().then(()=>
2{if(t.status!==Ja)throw Error(ja(32,0,il(t)));return t.status=Qa,Ol(t,"update").then(()=>(t.status=Ja,t)).catch(e=>{throw Va(e,t,rl)})})));var t})});const d=c.then(()=>gl(a,!0)),u=d.then(()=>bl(a,!0));let h,p;const g=new Promise((e,t)=>{h=e,p=t});return l={mount:()=>kl(Promise.resolve().then(()=>{if(a.status!==Za)throw Error(ja(13,0,o,a.status));return r.parcels[n]=a,bl(a)})),unmount:()=>kl(a.unmountThisParcel()),getStatus:()=>a.status,loadPromise:kl(c),bootstrapPromise:kl(d),mountPromise:kl(u),unmountPromise:kl(g)},l}function kl(e){return e.then(()=>null)}function Cl(e){const t=il(e);let r="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof r||null===r||Array.isArray(r))&&(r={},console.warn(ja(40),t,r));const n=ll({},r,{name:t,mountParcel:_l.bind(e),singleSpa:Da});return sl(e)&&(n.unmountSelf=e.unmountThisParcel),n}const Sl={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function El(e,t,r){if("number"!=typeof e||e<=0)throw Error(ja(16));Sl.bootstrap={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function Il(e,t,r){if("number"!=typeof e||e<=0)throw Error(ja(17));Sl.mount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function Al(e,t,r){if("number"!=typeof e||e<=0)throw Error(ja(18));Sl.unmount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function Tl(e,t,r){if("number"!=typeof e||e<=0)throw Error(ja(19));Sl.unload={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function Ol(e,t){const r=e.timeouts[t],n=r.warningMillis,o=al(e);return new Promise((i,s)=>{let a=!1,l=!1;e[t](Cl(e)).then(e=>{a=!0,i(e)}).catch(e=>{a=!0,s(e)}),setTimeout(()=>d(1),n),setTimeout(()=>d(!0),r.millis);const c=ja(31,0,t,o,il(e),r.millis);function d(e){if(!a)if(!0===e)l=!0,r.dieOnTimeout?s(Error(c)):console.error(c);else if(!l){const t=e,o=t*n;console.warn(c),o+n<r.millis&&setTimeout(()=>d(t+1),n)}}})}function Ll(e){const t={};for(let r in Sl)t[r]=ll({},Sl[r],e&&e[r]||{});return t}function $l(e){return Promise.resolve().then(()=>{if(e.loadPromise)return e.loadPromise;if(e.status!==Wa&&e.status!==tl)return e;let t,r;return e.status=Ka,e.loadPromise=Promise.resolve().then(()=>{const n=e.loadApp(Cl(e));if(!hl(n))throw r=!0,Error(ja(33,0,il(e)));return n.then(r=>{let n;e.loadErrorTime=null,t=r,"object"!=typeof t&&(n=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!dl(t.bootstrap)&&(n=35),dl(t.mount)||(n=36),dl(t.unmount)||(n=37);const o=al(t);if(n){let r;try{r=JSON.stringify(t)}catch{}return console.error(ja(n,0,o,il(e),r),t),Ua(void 0,e,rl),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=ll({},e.devtools.overlays,t.devtools.overlays)),e.status=qa,e.bootstrap=ul(t,"bootstrap"),e.mount=ul(t,"mount"),e.unmount=ul(t,"unmount"),e.unload=ul(t,"unload"),e.timeouts=Ll(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let n;return delete e.loadPromise,r?n=rl:(n=tl,e.loadErrorTime=(new Date).getTime()),Ua(t,e,n),e})})}const Nl=typeof window<"u",Rl={hashchange:[],popstate:[]},Pl=["hashchange","popstate"];function Dl(e){let t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(ja(14));t=e.currentTarget.href,e.preventDefault()}const r=Vl(window.location.href),n=Vl(t);0===t.indexOf("#")?window.location.hash=n.hash:r.host!==n.host&&n.host?window.location.href=t:n.pathname===r.pathname&&n.search===r.search?window.location.hash=n.hash:window.history.pushState(null,null,t)}function Ml(e){if(e){const t=e[0].type;Pl.indexOf(t)>=0&&Rl[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}let zl;function Fl(){fc([],arguments)}function Ul(e,t){return function(){const r=window.location.href,n=e.apply(this,arguments),o=window.location.href;return zl&&r===o||window.dispatchEvent(function(e,t){let r;try{r=new PopStateEvent("popstate",{state:e})}catch{r=document.createEvent("PopStateEvent"),r.initPopStateEvent("popstate",!1,!1,e)}return r.singleSpa=!0,r.singleSpaTrigger=t,r}(window.history.state,t)),n}}let Bl=null,Hl=!1;function jl(e){if(Hl)throw Error(ja(43));zl=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,Hl=!0,Bl=window.history.replaceState,window.addEventListener("hashchange",Fl),window.addEventListener("popstate",Fl);const t=window.addEventListener,r=window.removeEventListener;window.addEventListener=function(e,r){if(!("function"==typeof r&&Pl.indexOf(e)>=0)||cl(Rl[e],e=>e===r))return t.apply(this,arguments);Rl[e].push(r)},window.removeEventListener=function(e,t){return"function"==typeof t&&Pl.indexOf(e)>
2=0&&(Rl[e]=Rl[e].filter(e=>e!==t)),r.apply(this,arguments)},window.history.pushState=Ul(window.history.pushState,"pushState"),window.history.replaceState=Ul(Bl,"replaceState")}function Vl(e){const t=document.createElement("a");return t.href=e,t}Nl&&(window.singleSpaNavigate?console.warn(ja(41)):window.singleSpaNavigate=Dl);let Wl=!1;function Kl(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!Wl){const t=e.fn.on,r=e.fn.off;e.fn.on=function(e,r){return ql.call(this,t,window.addEventListener,e,r,arguments)},e.fn.off=function(e,t){return ql.call(this,r,window.removeEventListener,e,t,arguments)},Wl=!0}}function ql(e,t,r,n,o){return"string"!=typeof r?e.apply(this,o):(r.split(/\s+/).forEach(e=>{Pl.indexOf(e)>=0&&(t(e,n),r=r.replace(e,""))}),""===r.trim()?this:e.apply(this,o))}const Gl={};function Zl(e){return Promise.resolve().then(()=>{const t=Gl[il(e)];if(!t)return e;if(e.status===Wa)return Yl(e,t),e;if(e.status===el)return t.promise.then(()=>e);if(e.status!==Za&&e.status!==tl)return e;const r=e.status===tl?Promise.resolve():Ol(e,"unload");return e.status=el,r.then(()=>(Yl(e,t),e)).catch(r=>{return o=t,i=r,delete Gl[il(n=e)],delete n.bootstrap,delete n.mount,delete n.unmount,delete n.unload,Ua(i,n,rl),o.reject(i),e;var n,o,i})})}function Yl(e,t){delete Gl[il(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=Wa,t.resolve()}function Jl(e,t,r,n){Gl[il(e)]={app:e,resolve:r,reject:n},Object.defineProperty(Gl[il(e)],"promise",{get:t})}function Ql(e){return Gl[e]}const Xl=[];function ec(){return Xl.filter(nl).map(il)}function tc(){return Xl.map(il)}function rc(e){const t=cl(Xl,t=>il(t)===e);return t?t.status:null}let nc=!1;function oc(e,t,r,n){const o=function(e,t,r,n){const o={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(ja(39));const t=["name","app","activeWhen","customProps"],r=Object.keys(e).reduce((e,r)=>t.indexOf(r)>=0?e:e.concat(r),[]);if(0!==r.length)throw Error(ja(38,0,t.join(", "),r.join(", ")));if("string"!=typeof e.name||0===e.name.length||"object"!=typeof e.app&&"function"!=typeof e.app)throw Error(ja(20));const n=e=>"string"==typeof e||"function"==typeof e;if(!(n(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(n)))throw Error(ja(24));if(!cc(e.customProps))throw Error(ja(22))}(e),o.name=e.name,o.loadApp=e.app,o.activeWhen=e.activeWhen,o.customProps=e.customProps):(function(e,t,r,n){if("string"!=typeof e||0===e.length)throw Error(ja(20));if(!t)throw Error(ja(23));if("function"!=typeof r)throw Error(ja(24));if(!cc(n))throw Error(ja(22))}(e,t,r,n),o.name=e,o.loadApp=t,o.activeWhen=r,o.customProps=n),o.loadApp="function"!=typeof(i=o.loadApp)?()=>Promise.resolve(i):i,o.customProps=function(e){return e||{}}(o.customProps),o.activeWhen=function(e){let t=Array.isArray(e)?e:[e];return t=t.map(e=>"function"==typeof e?e:dc(e)),e=>t.some(t=>t(e))}(o.activeWhen),o;var i}(e,t,r,n);if(yc()||nc||(nc=!0,setTimeout(()=>{yc()||console.warn(ja(1))},5e3)),-1!==tc().indexOf(o.name))throw Error(ja(21,0,o.name));Xl.push(ll({loadErrorTime:null,status:Wa,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),Nl&&(Kl(),fc())}function ic(e=window.location){return Xl.filter(t=>t.activeWhen(e)).map(il)}function sc(e){if(0===Xl.filter(t=>il(t)===e).length)throw Error(ja(25,0,e));return(Nl?ac(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{const t=Xl.map(il).indexOf(e);Xl.splice(t,1)})}function ac(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(ja(26));const r=cl(Xl,t=>il(t)===e);if(!r)throw Error(ja(27,0,e));const n=Ql(il(r));if(t&&t.waitForUnmount){if(n)return n.promise;{const e=new Promise((t,n)=>{Jl(r,()=>e,t,n)});return e}}{let e;return n?(e=n.promise,lc(r,n.resolve,n.reject)):e=new Promise((t,n)=>{Jl(r,()=>e,t,n),lc(r,t,n)}),e}}function lc(e,t,r){Promise.resolve().then(()=>{if(cl(ic(),t=>t===il(e)))return gc()}).then(()=>fl(e).then(Zl).then(()=>{t(),setTimeout(()=>{fc()})})).catch(r)}function cc(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function dc(e,t){const r=function(e,t){let r=0,n=!1,o="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){const r=e[t];(!n&&":"===r||n&&"/"===r)&&i(t)}return i(e.length),new RegExp(o,"i");function i(i){const s=e.slice(r,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=n?"[^/]+/?":s,i===e.length)if(n)t&&(o+="$");else{const e=t?"":".*";o="/"===o.charAt(o.length-1)?`${o}${e}$`:`${o}(/${e})?(#.*)?$`}n=!n,r=i}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);const n=e.href.replace(t,"").replace(e.search,"").split("?")[0];return r.test(n)}}let uc=!1,hc=[],pc=Nl&&window.location.href;function gc(){return fc()}function fc(e=[],t,r=!1){if(uc)return new Promise((e,r)=>{hc.push({resolve:e,reject:r,eventArguments:t})});const{appsToUnload:n,appsToUnmount:o,appsToLoad:i,appsToMount:s}=function(){const e=[],t=[],r=[],n=[],o=(new Date).getTime();return Xl.forEach(i=>
2{const s=i.status!==rl&&ol(i);switch(i.status){case tl:s&&o-i.loadErrorTime>=200&&r.push(i);break;case Wa:case Ka:s&&r.push(i);break;case qa:case Za:!s&&Ql(il(i))?e.push(i):s&&n.push(i);break;case Ja:s||t.push(i)}}),{appsToUnload:e,appsToUnmount:t,appsToLoad:r,appsToMount:n}}();let a,l=[],c=pc,d=pc=window.location.href;return yc()?(uc=!0,a=n.concat(i,o,s),Promise.resolve().then(()=>(f(0===a.length?"before-no-app-change":"before-app-change",g(!0)),f("before-routing-event",g(!0,{cancelNavigation:u})),Promise.all(l).then(r=>{if(r.some(e=>e))return Bl.call(window.history,history.state,"",c.substring(location.origin.length)),pc=location.href,uc=!1,fc(e,t,!0);const a=n.map(Zl),l=o.map(fl).map(e=>e.then(Zl)).concat(a),d=Promise.all(l);d.then(()=>{f("before-mount-routing-event",g(!0))},e=>{throw e});const u=i.map(e=>$l(e).then(e=>mc(e,d))),m=s.filter(e=>i.indexOf(e)<0).map(e=>mc(e,d));return d.catch(e=>{throw p(),e}).then(()=>(p(),Promise.all(u.concat(m)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(h).then(()=>{},e=>{throw e})))})))):(a=i,Promise.resolve().then(()=>{const e=i.map($l);return Promise.all(e).then(p).then(()=>[]).catch(e=>{throw p(),e}).finally(()=>{})}));function u(e=!0){const t="function"==typeof e?.then?e:Promise.resolve(e);l.push(t.catch(e=>(console.warn(Error(ja(42))),console.warn(e),!1)))}function h(){const t=ec();e.forEach(e=>e.resolve(t));try{f(0===a.length?"no-app-change":"app-change",g()),f("routing-event",g())}catch(e){setTimeout(()=>{throw e})}if(uc=!1,hc.length>0){const e=hc;hc=[],fc(e)}return t}function p(){r||(e.forEach(e=>{Ml(e.eventArguments)}),Ml(t))}function g(e=!1,r){const l={},u={[Ja]:[],[Za]:[],[Wa]:[],[rl]:[]};e?(i.concat(s).forEach((e,t)=>{p(e,Ja)}),n.forEach(e=>{p(e,Wa)}),o.forEach(e=>{p(e,Za)})):a.forEach(e=>{p(e)});const h={detail:{newAppStatuses:l,appsByNewStatus:u,totalAppChanges:a.length,originalEvent:t?.[0],oldUrl:c,newUrl:d}};return r&&ll(h.detail,r),h;function p(e,t){const r=il(e);t=t||rc(r),l[r]=t,(u[t]=u[t]||[]).push(r)}}function f(e,t){r||window.dispatchEvent(new za(`single-spa:${e}`,t))}}function mc(e,t){return ol(e)?gl(e).then(e=>t.then(()=>ol(e)?bl(e):e)):t.then(()=>e)}let vc=!1;function bc(e){vc=!0,Nl&&(jl(e),fc())}function yc(){return vc}var wc={getRawAppData:function(){return[...Xl]},reroute:fc,NOT_LOADED:Wa,toLoadPromise:$l,toBootstrapPromise:gl,unregisterApplication:sc,getProfilerData:function(){return pl}};Nl&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=wc);const xc="DisplayNotifications",_c={banner:_o(),removeBanner:_o(),snackbar:_o(),removeSnackbar:_o(),updateSnackbarProgress:_o(),modal:_o(),removeModal:_o()},{emit:kc}=Co().register(xc,_c),Cc=e=>{const t={id:jt(),...e};return kc.banner(t),{close:()=>{kc.removeBanner(t)}}},Sc=e=>{const t={...e,id:jt()};return kc.snackbar(t),{close:()=>{kc.removeSnackbar(t)},updateProgress:e=>kc.updateSnackbarProgress({...t,progress:e})}},Ec=e=>{const t={...e,id:jt()};return kc.modal(t),{close:()=>{kc.removeModal(t)}}},Ic={banner:Cc,snackbar:Sc,modal:Ec};var Ac,Tc;const Oc=o(function(){if(Tc)return Ac;Tc=1;var e,t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,r=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
27f]/g,o="\\ud800-\\udfff",i="\\u2700-\\u27bf",s="a-z\\xdf-\\xf6\\xf8-\\xff",a="A-Z\\xc0-\\xd6\\xd8-\\xde",l="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",c="["+l+"]",d="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",u="\\d+",h="["+i+"]",p="["+s+"]",g="[^"+o+l+u+i+s+a+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",v="["+a+"]",b="(?:"+p+"|"+g+")",y="(?:"+v+"|"+g+")",w="(?:['’](?:d|ll|m|re|s|t|ve))?",x="(?:['’](?:D|LL|M|RE|S|T|VE))?",_="(?:"+d+"|\\ud83c[\\udffb-\\udfff])?",k="[\\ufe0e\\ufe0f]?",C=k+_+"(?:\\u200d(?:"+["[^"+o+"]",f,m].join("|")+")"+k+_+")*",S="(?:"+[h,f,m].join("|")+")"+C,E=RegExp("['’]","g"),I=RegExp(d,"g"),A=RegExp([v+"?"+p+"+"+w+"(?="+[c,v,"$"].join("|")+")",y+"+"+x+"(?="+[c,v+b,"$"].join("|")+")",v+"?"+b+"+"+w,v+"+"+x,u,S].join("|"),"g"),T=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,O="object"==typeof n&&n&&n.Object===Object&&n,L="object"==typeof self&&self&&self.Object===Object&&self,$=O||L||Function("return this")(),N=(e={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"},function(t){return e?.[t]}),R=Object.prototype.toString,P=$.Symbol,D=P?P.prototype:void 0,M=D?D.toString:void 0;function z(e){return null==e?"":function(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==R.call(e)}(e))return M?M.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}var F=function(e){return function(n){return function(e,t,r){for(var n=-1,o=e?e.length:0;++n<o;)r=t(r,e[n],n,e);return r}(function(e){return function(e){return T.test(e)}(e=z(e))?function(e){return e.match(A)||[]}(e):function(e){return e.match(t)||[]}(e)}(function(e){return(e=z(e))&&e.replace(r,N).replace(I,"")}(n).replace(E,"")),e,"")}}(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()});return Ac=F}()),Lc={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Ấ":"A","Ắ":"A","Ẳ":"A","Ẵ":"A","Ặ":"A","Æ":"AE","Ầ":"A","Ằ":"A","Ȃ":"A","Ç":"C","Ḉ":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ế":"E","Ḗ":"E","Ề":"E","Ḕ":"E","Ḝ":"E","Ȇ":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ḯ":"I","Ȋ":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ố":"O","Ṍ":"O","Ṓ":"O","Ȏ":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","ấ":"a","ắ":"a","ẳ":"a","ẵ":"a","ặ":"a","æ":"ae","ầ":"a","ằ":"a","ȃ":"a","ç":"c","ḉ":"c","è":"e","é":"e","ê":"e","ë":"e","ế":"e","ḗ":"e","ề":"e","ḕ":"e","ḝ":"e","ȇ":"e","ì":"i","í":"i","î":"i","ï":"i","ḯ":"i","ȋ":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ố":"o","ṍ":"o","ṓ":"o","ȏ":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"
2c","Ĉ":"C","ĉ":"c","Ċ":"C","ċ":"c","Č":"C","č":"c","C̆":"C","c̆":"c","Ď":"D","ď":"d","Đ":"D","đ":"d","Ē":"E","ē":"e","Ĕ":"E","ĕ":"e","Ė":"E","ė":"e","Ę":"E","ę":"e","Ě":"E","ě":"e","Ĝ":"G","Ǵ":"G","ĝ":"g","ǵ":"g","Ğ":"G","ğ":"g","Ġ":"G","ġ":"g","Ģ":"G","ģ":"g","Ĥ":"H","ĥ":"h","Ħ":"H","ħ":"h","Ḫ":"H","ḫ":"h","Ĩ":"I","ĩ":"i","Ī":"I","ī":"i","Ĭ":"I","ĭ":"i","Į":"I","į":"i","İ":"I","ı":"i","IJ":"IJ","ij":"ij","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","Ḱ":"K","ḱ":"k","K̆":"K","k̆":"k","Ĺ":"L","ĺ":"l","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ŀ":"L","ŀ":"l","Ł":"l","ł":"l","Ḿ":"M","ḿ":"m","M̆":"M","m̆":"m","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","ʼn":"n","N̆":"N","n̆":"n","Ō":"O","ō":"o","Ŏ":"O","ŏ":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","P̆":"P","p̆":"p","Ŕ":"R","ŕ":"r","Ŗ":"R","ŗ":"r","Ř":"R","ř":"r","R̆":"R","r̆":"r","Ȓ":"R","ȓ":"r","Ś":"S","ś":"s","Ŝ":"S","ŝ":"s","Ş":"S","Ș":"S","ș":"s","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","ț":"t","Ț":"T","Ť":"T","ť":"t","Ŧ":"T","ŧ":"t","T̆":"T","t̆":"t","Ũ":"U","ũ":"u","Ū":"U","ū":"u","Ŭ":"U","ŭ":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ȗ":"U","ȗ":"u","V̆":"V","v̆":"v","Ŵ":"W","ŵ":"w","Ẃ":"W","ẃ":"w","X̆":"X","x̆":"x","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Y̆":"Y","y̆":"y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ſ":"s","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Ǎ":"A","ǎ":"a","Ǐ":"I","ǐ":"i","Ǒ":"O","ǒ":"o","Ǔ":"U","ǔ":"u","Ǖ":"U","ǖ":"u","Ǘ":"U","ǘ":"u","Ǚ":"U","ǚ":"u","Ǜ":"U","ǜ":"u","Ứ":"U","ứ":"u","Ṹ":"U","ṹ":"u","Ǻ":"A","ǻ":"a","Ǽ":"AE","ǽ":"ae","Ǿ":"O","ǿ":"o","Þ":"TH","þ":"th","Ṕ":"P","ṕ":"p","Ṥ":"S","ṥ":"s","X́":"X","x́":"x","Ѓ":"Г","ѓ":"г","Ќ":"К","ќ":"к","A̋":"A","a̋":"a","E̋":"E","e̋":"e","I̋":"I","i̋":"i","Ǹ":"N","ǹ":"n","Ồ":"O","ồ":"o","Ṑ":"O","ṑ":"o","Ừ":"U","ừ":"u","Ẁ":"W","ẁ":"w","Ỳ":"Y","ỳ":"y","Ȁ":"A","ȁ":"a","Ȅ":"E","ȅ":"e","Ȉ":"I","ȉ":"i","Ȍ":"O","ȍ":"o","Ȑ":"R","ȑ":"r","Ȕ":"U","ȕ":"u","B̌":"B","b̌":"b","Č̣":"C","č̣":"c","Ê̌":"E","ê̌":"e","F̌":"F","f̌":"f","Ǧ":"G","ǧ":"g","Ȟ":"H","ȟ":"h","J̌":"J","ǰ":"j","Ǩ":"K","ǩ":"k","M̌":"M","m̌":"m","P̌":"P","p̌":"p","Q̌":"Q","q̌":"q","Ř̩":"R","ř̩":"r","Ṧ":"S","ṧ":"s","V̌":"V","v̌":"v","W̌":"W","w̌":"w","X̌":"X","x̌":"x","Y̌":"Y","y̌":"y","A̧":"A","a̧":"a","B̧":"B","b̧":"b","Ḑ":"D","ḑ":"d","Ȩ":"E","ȩ":"e","Ɛ̧":"E","ɛ̧":"e","Ḩ":"H","ḩ":"h","I̧":"I","i̧":"i","Ɨ̧":"I","ɨ̧":"i","M̧":"M","m̧":"m","O̧":"O","o̧":"o","Q̧":"Q","q̧":"q","U̧":"U","u̧":"u","X̧":"X","x̧":"x","Z̧":"Z","z̧":"z"},$c=e=>""===e||null==e,Nc=(e,t)=>Oc(e),Rc=Object.keys(Lc).join("|"),Pc=new RegExp(Rc,"g");var Dc=(e=>(e.ALL="all",e.SOME="some",e.NONE="none",e.TRUE="true",e.POSSIBLE="possible",e.FALSE="false",e))(Dc||{});const Mc=e=>e.charAt(0).toUpperCase()+e.slice(1),zc=()=>Vt().navigator.onLine,Fc=()=>te(),Uc=e=>{Dl(e)},Bc=e=>()=>Promise.resolve(e);var Hc,jc,Vc=function(){if(jc)return Hc;jc=1;var e,t="__lodash_hash_undefined__",r=/^\[object .+?Constructor\]$/,o="object"==typeof n&&n&&n.Object===Object&&n,i="object"==typeof self&&self&&self.Object===Object&&self,s=o||i||Function("return this")(),a=Array.prototype,l=Function.prototype,c=Object.prototype,d=s["__core-js_shared__"],u=(e=/[^.]+$/.exec(d&&d.keys&&d.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"",h=l.toString,p=c.hasOwnProperty,g=c.toString,f=RegExp("^"+h.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),m=a.splice,v=C(s,"Map"),b=C(Object,"create");function y(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function w(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function x(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function _(e,t){for(var r=e.length;r--;)if(E(e[r][0],t))return r;return-1}function k(e,t){var r=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function C(e,t){var n=function(e,t){return e?.[t]}(e,t);return function(e){if(!I(e)||function(e){return!!u&&u in e}(e))return!1;var t=function(e){var t=I(e)?g.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch{}return t}(e)?f:r;return t.test(function(e){if(null!=e){try{return h.call(e)}catch{}try{return e+""}catch{}}return""}(e))}(n)?n:void 0}function S(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s),s};return r.cache=new(S.Cache||x),r}function E(e,t){return e===t||e!=e&&t!=t}function I(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}return y.prototype.clear=function(){this.__data__=b?b(null):{}},y.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},y.prototype.get=function(e){var r=this.__data__;if(b){var n=r[e];return n===t?void 0:n}return p.call(r,e)?r[e]:void 0},y.prototype.has=function(e){var t=this.__data__;return b?void 0!==t[e]:p.call(t,e)},y.prototype.set=function(e,r){return this.__data__[e]=b&&void 0===r?t:r,this},w.prototype.clear=function(){this.__data__=[]},w.prototype.delete=function(e){var t=this.__data__,r=_(t,e);return!(r<0||(r==t.length-1?t.pop():m.call(t,r,1),0))},w.prototype.get=function(e){var t=this.__data__,r=_(t,e);return r<0?void 0:t[r][1]},w.prototype.has=function(e){return _(this.__data__,e)>-1},w.prototype.set=function(e,t){var r=this.__data__,n=_(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},x.prototype.clear=function(){this.__data__={hash:new y,map:new(v||w),string:new y}},x.prototype.delete=function(e){return k(this,e).delete(e)},x.prototype.get=function(e){return k(this,e).get(e)},x.prototype.has=function(e){return k(this,e).has(e)},x.prototype.set=function(e,t){return k(this,e).set(e,t),this},S.Cache=x,Hc=S}();const Wc=o(Vc);var Kc=(e=>(e.MS_TEAMS="ms-teams",e.SIDE_PANEL="side-panel",e))(Kc||{}),qc=(e=>
2(e.DEFAULT="default",e.POPUP="popup",e.DESKTOP_APP="desktop-app",e))(qc||{}),Gc=(e=>(e.DEFAULT="default",e.DESKTOP_APP="desktop-app",e))(Gc||{});const Zc="/ms-teams",Yc=[Zc],Jc="shell-integration-id",Qc=[{detector:(e,t,r)=>t===Zc,integrationId:Kc.MS_TEAMS},{detector:(e,t,r)=>e.startsWith("sidepanel.")||new URLSearchParams(r).has("sidepanel"),integrationId:Kc.SIDE_PANEL}],Xc=Wc(()=>{const e=(()=>{const e=pn(),t=dn(),r=hn();for(const n of Qc)if(n.detector(e,t,r))return n.integrationId})();if(e)return e;return(()=>{switch(In(Jc)){case Kc.MS_TEAMS:return Kc.MS_TEAMS;case Kc.SIDE_PANEL:return Kc.SIDE_PANEL;default:return}})()||void 0}),ed=e=>(Yc.forEach(t=>{e.startsWith(t)&&(e="/")}),e),td="Shell";Event;const rd={reloadPage:_o(),appChanged:_o(),routeChanged:_o(),themeChanged:_o(),navrailOrderReset:_o(),extensionReady:_o(),applicationReady:_o(),onLogout:_o()},{emit:nd}=Co().register(td,rd);function od(e){nd.themeChanged(e)}const id=()=>nd.onLogout(),sd=new Set,ad=e=>sd.forEach(t=>t(e)),ld="AppState",cd={appStateChanged:_o()},dd=globalThis,ud=dd.ShadowRoot&&(void 0===dd.ShadyCSS||dd.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,hd=Symbol(),pd=new WeakMap;let gd=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==hd)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(ud&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=pd.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&pd.set(t,e))}return e}toString(){return this.cssText}};const fd=e=>new gd("string"==typeof e?e:e+"",void 0,hd),md=ud?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return fd(t)})(e):e,{is:vd,defineProperty:bd,getOwnPropertyDescriptor:yd,getOwnPropertyNames:wd,getOwnPropertySymbols:xd,getPrototypeOf:_d}=Object,kd=globalThis,Cd=kd.trustedTypes,Sd=Cd?Cd.emptyScript:"",Ed=kd.reactiveElementPolyfillSupport,Id=(e,t)=>e,Ad={toAttribute(e,t){switch(t){case Boolean:e=e?Sd:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},Td=(e,t)=>!vd(e,t),Od={attribute:!0,type:String,converter:Ad,reflect:!1,useDefault:!1,hasChanged:Td};Symbol.metadata??=Symbol("metadata"),kd.litPropertyMetadata??=new WeakMap;let Ld=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Od){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&bd(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:o}=yd(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:n,set(t){const i=n?.call(this);o?.call(this,t),this.requestUpdate(e,i,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Od}static _$Ei(){if(this.hasOwnProperty(Id("elementProperties")))return;const e=_d(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Id("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Id("properties"))){const e=this.properties,t=[...wd(e),...xd(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(md(e))}else void 0!==e&&t.push(md(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e
vendor: 9,825 bytes, line 2
2=>e(this))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(ud)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const r of t){const t=document.createElement("style"),n=dd.litNonce;void 0!==n&&t.setAttribute("nonce",n),t.textContent=r.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){const o=(void 0!==r.converter?.toAttribute?r.converter:Ad).toAttribute(t,r.type);this._$Em=e,null==o?this.removeAttribute(n):this.setAttribute(n,o),this._$Em=null}}_$AK(e,t){const r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){const e=r.getPropertyOptions(n),o="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:Ad;this._$Em=n;const i=o.fromAttribute(t,e.type);this[n]=i??this._$Ej?.get(n)??i,this._$Em=null}}requestUpdate(e,t,r,n=!1,o){if(void 0!==e){const i=this.constructor;if(!1===n&&(o=this[e]),r??=i.getPropertyOptions(e),!((r.hasChanged??Td)(o,t)||r.useDefault&&r.reflect&&o===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:n,wrapped:o},i){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,i??t??this[e]),!0!==o||void 0!==i)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),!0===n&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e){const{wrapped:e}=r,n=this[t];!0!==e||this._$AL.has(t)||void 0===n||this.C(t,void 0,r,n)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};Ld.elementStyles=[],Ld.shadowRootOptions={mode:"open"},Ld[Id("elementProperties")]=new Map,Ld[Id("finalized")]=new Map,Ed?.({ReactiveElement:Ld}),(kd.reactiveElementVersions??=[]).push("2.1.2");const $d=globalThis,Nd=e=>e,Rd=$d.trustedTypes,Pd=Rd?Rd.createPolicy("lit-html",{createHTML:e=>e}):void 0,Dd="$lit$",Md=`lit$${Math.random().toFixed(9).slice(2)}$`,zd="?"+Md,Fd=`<${zd}>`,Ud=document,Bd=()=>Ud.createComment(""),Hd=e=>null===e||"object"!=typeof e&&"function"!=typeof e,jd=Array.isArray,Vd="[ \t\n\f\r]",Wd=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Kd=/-->/g,qd=/>/g,Gd=RegExp(`>|${Vd}(?:([^\\s"'>=/]+)(${Vd}*=${Vd}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Zd=/'/g,Yd=/"/g,Jd=/^(?:script|style|textarea|title)$/i,Qd=(e,...t)=>({_$litType$:1,strings:e,values:t}),Xd=Symbol.for("lit-noChange"),eu=Symbol.for("lit-nothing"),tu=new WeakMap,ru=Ud.createTreeWalker(Ud,129);function nu(e,t){if(!jd(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Pd?Pd.createHTML(t):t}let ou=class e{constructor({strings:t,_$litType$:r},n){let o;this.parts=[];let i=0,s=0;const a=t.length-1,l=this.parts,[c,d]=((e,t)=>{const r=e.length-1,n=[];let o,i=2===t?"<svg>":3===t?"<math>":"",s=Wd;for(let t=0;t<r;t++){const r=e[t];let a,l,c=-1,d=0;for(;d<r.length&&(s.lastIndex=d,l=s.exec(r),null!==l);)d=s.lastIndex,s===Wd?"!--"===l[1]?s=Kd:void 0!==l[1]?s=qd:void 0!==l[2]?(Jd.test(l[2])&&(o=RegExp("</"+l[2],"g")),s=Gd):void 0!==l[3]&&(s=Gd):s===Gd?">"===l[0]?(s=o??Wd,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?Gd:'"'===l[3]?Yd:Zd):s===Yd||s===Zd?s=Gd:s===Kd||s===qd?s=Wd:(s=Gd,o=void 0);const u=s===Gd&&e[t+1].startsWith("/>")?" ":"";i+=s===Wd?r+Fd:c>=0?(n.push(a),r.slice(0,c)+Dd+r.slice(c)+Md+u):r+Md+(-2===c?t:u)}return[nu(e,i+(e[r]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),n]})(t,r);if(this.el=e.createElement(c,n),ru.currentNode=this.el.content,2===r||3===r){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(o=ru.nextNode())&&l.length<a;){if(1===o.nodeType){if(o.hasAttributes())for(const e of o.getAttributeNames())if(e.endsWith(Dd)){const t=d[s++],r=o.getAttribute(e).split(Md),n=/([.?@])?(.*)/.exec(t);l.push({type:1,index:i,name:n[2],strings:r,ctor:"."===n[1]?cu:"?"===n[1]?du:"@"===n[1]?uu:lu}),o.removeAttribute(e)}else e.startsWith(Md)&&(l.push({type:6,index:i}),o.removeAttribute(e));if(Jd.test(o.tagName)){const e=o.textContent.split(Md),t=e.length-1;if(t>0){o.textContent=Rd?Rd.emptyScript:"";for(let r=0;r<t;r++)o.append(e[r],Bd()),ru.nextNode(),l.push({type:2,index:++i});o.append(e[t],Bd())}}}else if(8===o.nodeType)if(o.data===zd)l.push({type:2,index:i});else{let e=-1;for(;-1!==(e=o.data.indexOf(Md,e+1));)l.push({type:7,index:i}),e+=Md.length-1}i++}}static createElement(e,t){const r=Ud.createElement("template");return r.innerHTML=e,r}};function iu(e,t,r=e,n){if(t===Xd)return t;let o=void 0!==n?r._$Co?.[n]:r._$Cl;const i=Hd(t)?void 0:t._$litDirective$;return o?.constructor!==i&&(o?._$AO?.(!1),void 0===i?o=void 0:(o=new i(e),o._$AT(e,r,n)),void 0!==n?(r._$Co??=[])[n]=o:r._$Cl=o),void 0!==o&&(t=iu(e,o._$AS(e,t.values),o,n)),t}let su=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,n=(e?.creationScope??Ud).importNode(t,!0);ru.currentNode=n;let o=ru.nextNode(),i=0,s=0,a=r[0];for(;void 0!==a;){if(i===a.index){let t;2===a.type?t=new au(o,o.nextSibling,this,e):1===a.type?t=new a.ctor(o,a.name,a.strings,this,e):6===a.type&&(t=new hu(o,this,e)),this._$AV.push(t),a=r[++s]}i!==a?.index&&(o=ru.nextNode(),i++)}return ru.currentNode=Ud,n}p(e){let t=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},au=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,n){this.type=2,this._$AH=eu,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=iu(this,e,t),Hd(e)?e===eu||null==e||""===e?(this._$AH!==eu&&this._$AR(),this._$AH=eu):e!==this._$AH&&e!==Xd&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>jd(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==eu&&Hd(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ud.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,n="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=ou.createElement(nu(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{const e=new su(n,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=tu.get(e.strings);return void 0===t&&tu.set(e.strings,t=new ou(e)),t}k(t){jd(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let n,o=0;for(const i of t)o===r.length?r.push(n=new e(this.O(Bd()),this.O(Bd()),this,this.options)):n=r[o],n._$AI(i),o++;o<r.length&&(this._$AR(n&&n._$AB.nextSibling,o),r.length=o)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const t=Nd(e).nextSibling;Nd(e).remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}},lu=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,n,o){this.type=1,this._$AH=eu,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=o,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=eu}_$AI(e,t=this,r,n){const o=this.strings;let i=!1;if(void 0===o)e=iu(this,e,t,0),i=!Hd(e)||e!==this._$AH&&e!==Xd,i&&(this._$AH=e);else{const n=e;let s,a;for(e=o[0],s=0;s<o.length-1;s++)a=iu(this,n[r+s],t,s),a===Xd&&(a=this._$AH[s]),i||=!Hd(a)||a!==this._$AH[s],a===eu?e=eu:e!==eu&&(e+=(a??"")+o[s+1]),this._$AH[s]=a}i&&!n&&this.j(e)}j(e){e===eu?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},cu=class extends lu{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===eu?void 0:e}},du=class extends lu{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==eu)}},uu=class extends lu{constructor(e,t,r,n,o){super(e,t,r,n,o),this.type=5}
2_$AI(e,t=this){if((e=iu(this,e,t,0)??eu)===Xd)return;const r=this._$AH,n=e===eu&&r!==eu||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,o=e!==eu&&(r===eu||n);n&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},hu=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){iu(this,e)}};const pu={I:au},gu=$d.litHtmlPolyfillSupport;gu?.(ou,au),($d.litHtmlVersions??=[]).push("3.3.2");const fu=(e,t,r)=>{const n=r?.renderBefore??t;let o=n._$litPart$;if(void 0===o){const e=r?.renderBefore??null;n._$litPart$=o=new au(t.insertBefore(Bd(),e),e,void 0,r??{})}return o._$AI(e),o},mu=globalThis;let vu=class extends Ld{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=fu(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Xd}};vu._$litElement$=!0,vu.finalized=!0,mu.litElementHydrateSupport?.({LitElement:vu});const bu=mu.litElementPolyfillSupport;function yu(e){return{bootstrap:()=>async function(){}(),mount:t=>async function(e,t){const r=wu(e,t);an(r,r.firstChild),function(e){const t=e._$litPart$;t&&t.startNode&&t.startNode.parentNode!==e&&e.appendChild(t.startNode)}(r),fu("function"==typeof e.template?e.template(t):e.template,r)}(e,t),unmount:t=>async function(e,t){const r=wu(e,t);fu(eu,r)}(e,t)}}function wu(e,t){const r=t?.appName??t?.name;if(!r)throw Error("single-spa-lit was not given an application name as a prop, so it can't make a unique dom element container for the lit application");const n=`single-spa-application:${r}`;let o;return e.domElement instanceof HTMLElement?o=e.domElement:e.domElement instanceof Function?o=e.domElement():e.domElement&&(o=document.querySelector(e.domElement)),o||(o=document.getElementById(n)),o||(o=document.createElement("div"),document.body.appendChild(o)),o.id||(o.id=n),o}bu?.({LitElement:vu}),(mu.litElementVersions??=[]).push("4.2.2");const xu={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",xxl:"xxl"},_u={[xu.xs]:0,[xu.sm]:700,[xu.md]:925,[xu.lg]:1225,[xu.xl]:1525,[xu.xxl]:1800},ku=[xu.xs,xu.sm,xu.md,xu.lg,xu.xl,xu.xxl];var Cu=(e=>(e.ENTITLEMENTS="entitlements",e.ROLES="roles",e.PBX_FLAGS="pbxFlags",e.CONTACT_CENTER_FLAGS="ccFlags",e.SHELL_FEATURE_FLAGS="shellFlags",e.ACCOUNT_SETTINGS="accountSettings",e.PDP_GOTO_APP_EXTENSION_ACCESS="goto_app_extension:access",e))(Cu||{});let Su=class extends CustomEvent{constructor(e){super("main-module-layout-sidebar-toggle",{detail:e,bubbles:!0,composed:!0})}};function Eu(e,t=document){if(!e.trim())throw new Error("Selector parameter cannot be empty");const r=e.split(">>>");let n=t;for(let e=0;e<r.length;++e){const t=r[e].trim();if(t&&(n=n?.querySelector(t)),n&&e<r.length-1&&(n="shadowRoot"in n?n.shadowRoot:null),!n)return null}return n??null}const Iu=(e,t=document)=>{if(!e.trim())throw new Error("Selector parameter cannot be empty");const r=Eu(e,t);if(r)return r;if("shadowRoot"in t&&t.shadowRoot){const r=Iu(e,t.shadowRoot);if(r)return r}const n=t.querySelectorAll("*");for(const t of n){const r=t.shadowRoot;if(r){const t=Iu(e,r);if(t)return t}}return null},Au=(e,t=document)=>e.includes(">>>")?Eu(e,t):Iu(e,t),Tu={attributes:!1,childList:!0,characterData:!0,subtree:!0},Ou=(e,t=document)=>"string"==typeof e?$u(e,t):Lu(e,t),Lu=(e,t)=>new Promise(r=>{const n=Array.from(t.childNodes).filter(t=>t.nodeType===Node.ELEMENT_NODE&&e(t));n.length?r(n[0]):new MutationObserver((t,n)=>{t.forEach(t=>{t.addedNodes.forEach(t=>{t.nodeType===Node.ELEMENT_NODE&&e(t)&&(n.disconnect(),r(t))})})}).observe(t,Tu)}),$u=(e,t)=>
2new Promise(r=>{const n=Au(e,t);n?r(n):new MutationObserver((n,o)=>{if(n.some(e=>e.addedNodes.length)){const n=Au(e,t);n&&(o.disconnect(),r(n))}}).observe(t,Tu)}),Nu=e=>{try{const t=new URL(e);return`${t.origin}${t.pathname}`}catch{return e.split("?")[0]}},Ru=e=>(e=>e.replace(/[!$%^&*()_+]/g,""))(e.replace(/(^|[0-9]+)\s*(extension:?=?|;?ext=?.?:?|x)\s*([0-9 ]+)/gi,(e,t,r,n)=>t||n?`${t}#${n}`:e).replace(/(^|\s)([0-9+()# -.]+)($|\s)/g,(e,t,r,n)=>`${t}${r.replace(/[+.() -]+/g,"")}${n}`));class Pu{searchString;constructor(e){this.searchString=e}withCombinedPhoneNumberParts(){return this.searchString=Ru(this.searchString),this}build(){return this.searchString}}const Du=(e,t)=>{const r=e.replace(/^\/+/gm,"");return t?`${ca}/${t}/${r}`:`${ca}/${r}`},Mu=async()=>{await Ou(cr,document.body),await Hi()},zu=e=>{if(e instanceof Error){const t={errorMessage:e.message,errorName:e.name,errorStack:e.stack};return void 0!==e.cause&&(t.errorCause=zu(e.cause)),t}return e},Fu={id:"",initialize:async()=>{},registerNamespaces:async()=>{},getString:()=>"",getComponentById:async()=>null,getModules:()=>[],getSettings:()=>[],getNavigationItems:()=>[],getMetadata:()=>({id:"",name:"",version:""})};class Uu extends Error{constructor(e,t,r,n=""){super(),this.key=e,this.actualType=t,this.expectedType=r,this.message=n}}const Bu=(e,t)=>{Object.keys(t).some(r=>{if(typeof e?.[r]!=typeof t[r])throw new Uu(r,typeof e?.[r],typeof t[r],"")})},Hu=(e,t)=>!Object.keys(t).some(r=>typeof e?.[r]!=typeof t[r]),ju=e=>{const t={...Fu,getModuleGroups:()=>[]};return Hu(e,t)},Vu=e=>Hu(e,{queryInterface:()=>{},supportsInterface:()=>!0}),Wu=e=>{const t={displayNameKey:"",componentId:"",route:""};return!Object.keys(t).some(r=>typeof e?.[r]!=typeof t[r])},Ku=(e,t)=>{if((e=>["string","function"].includes(typeof e))(e))return;const r={key:t,message:`The ${t} is not compliant with the GlobalSearchValueField interface. The property type should be string or function instead of ${typeof e}.`,expectedType:"String or Function",actualType:typeof e};throw new Uu(r.key,r.actualType,r.expectedType,r.message)},qu=e=>{const t={id:"",application:"",displayNameKey:"",columns:[],getResultDefaultAction:()=>({command:{commandName:"",namespace:""},displayNameKey:"",icon:"",id:""}),getQueryForSearchString:()=>({application:"",query:"",permissionParameters:{owner_id:[],subowner_id:[]}}),getPermissionParameters:()=>({})},r=e;try{Bu(r,t)}catch(t){const r=`The object is not compliant with the GlobalSearchCategory interface. The ${e.id}.${t.key} type should be ${t.expectedType} instead of ${t.actualType}.`;throw new Uu(t.key,t.actualType,t.expectedType,r)}((e,t,r)=>{if(e)Ku(e,"previewField");else{if(!t){const e={key:"previewField or subtitleField",message:`You must provide either the preview or subtitle information with your ${r} GlobalSearchCategory object`,expectedType:"GlobalSearchValueField",actualType:"none"};throw new Uu(e.key,e.actualType,e.expectedType,e.message)}Ku(t,"subtitleField")}})(r.previewField,r.subtitleField,r.id),Ku(r.titleField,"titleField"),((e,t,r)=>{if(e)(e=>{Ku(e?.userKey,"userKey"),Ku(e?.familyName,"familyName"),Ku(e?.givenName,"givenName")})(e);else{if(!t){const e={key:"avatarFields or iconField",message:`You must provide either the avatar information or an icon with your ${r} GlobalSearchCategory object`,expectedType:"GlobalSearchAvatar or GlobalSearchValueField",actualType:"none"};throw new Uu(e.key,e.actualType,e.expectedType,e.message)}Ku(t,"iconField")}})(r.avatarFields,r.iconField,r.id),r.columns?.forEach(e=>(e=>{const t={displayNameKey:"",id:""};try{Bu(e,t)}catch(t){const r=`The object is not compliant with the GlobalSearchCategoryColumn interface. The ${e.id}.${t.key} type should be ${t.expectedType} instead of ${t.actualType}.`;throw new Uu(t.key,t.actualType,t.expectedType,r)}Ku(e.valueField,"valueField")})(e)),(e=>{const t={messageKey:"",actions:[]};try{Bu(e,t)}catch(e){const t=`The object is not compliant with the GlobalSearchEmptyState interface. The ${e.key} type should be ${e.expectedType} instead of ${e.actualType}.`;throw new Uu(e.key,e.actualType,e.expectedType,t)}
2e.actions.forEach(e=>(e=>{const t={id:"",command:{commandName:"",namespace:""},displayNameKey:"",icon:""};try{Bu(e,t)}catch(t){const r=`The object is not compliant with the GlobalSearchAction interface. The ${e.id}.${t.key} type should be ${t.expectedType} instead of ${t.actualType}.`;throw new Uu(t.key,t.actualType,t.expectedType,r)}try{Bu(e.command,t.command)}catch(t){const r=`The object is not compliant with the GlobalSearchAction interface. The ${e.id}.command.${t.key} type should be ${t.expectedType} instead of ${t.actualType}.`;throw new Uu(t.key,t.actualType,t.expectedType,r)}})(e))})(r.emptyState)},Gu="loadExtensionScript",Zu=`${Gu} start`,Yu=`${Gu} done`,Ju=async e=>{try{const{measure:t,startMarker:r,doneMarker:n}=(e=>({measure:`shell_${e}_${Gu}`,startMarker:`shell_${e}_${Zu}`,doneMarker:`shell_${e}_${Yu}`}))(e.id);performance.mark(r);const o=await((e,t={})=>{const{esModule:r}=t;return r?((e,t={})=>new Promise((r,n)=>{const{crossOrigin:o=null,resolveWithGlobal:i="",parent:s=mn().body}=t,a=Fc(),l=`shell:module_loaded:${a}`,c=`shell:module_failed:${a}`,d=()=>{Vt().removeEventListener(c,h),Vt().removeEventListener(l,u)},u=e=>{const t=Vt(),{resolveWithGlobal:n}=e.detail;r(n?t[n]:void 0),d()},h=e=>{n(e.detail.error),d()};Vt().addEventListener(l,u,{once:!0}),Vt().addEventListener(c,h,{once:!0});const p=mn().createElement("script");p.type="module",p.innerHTML=`\n                       try {\n                         const moduleScript = await import('${e}');\n                         if ('${i}' !== '') {\n                           window['${i}'] = moduleScript;\n                         }\n                         window.dispatchEvent(new CustomEvent('${l}', {detail: {resolveWithGlobal: '${i}'}}));\n                       } catch(e) {\n                         window.dispatchEvent(new CustomEvent('${c}', {detail: {error: e}}));\n                       }\n                      `,p.crossOrigin=o,s.appendChild(p)}))(e,t):((e,t={})=>new Promise((r,n)=>{const{async:o=!0,crossOrigin:i=null,resolveWithGlobal:s="",parent:a=mn().body}=t,l=mn().createElement("script");l.src=e,l.async=!!o,l.crossOrigin=i,l.onload=()=>{const e=Vt();r(s?e[s]:void 0)},l.onerror=t=>{Cc({target:window,description:on("Looks like something went wrong while loading GoTo. Try refreshing the app."),closable:!1,variant:"danger",link:{text:on("Refresh now"),onClick:Nn},id:"shellUnrecoverableErrorBanner"});const r=new Error(`loadGlobalScript failed: ${e}`);eo().error(r),n(r)},a.appendChild(l)}))(e,t)})(e.url.href,{resolveWithGlobal:e.id,esModule:e.esModule});performance.mark(n),Ri(t,r,n)();const i=o.default||o;return(e=>{try{Bu(e,Fu)}catch(t){const r=`The extension is not compliant with the ShellExtension interface. The ${e.id}.${t.key} type should be ${t.expectedType} instead of ${t.actualType}.`;throw new Uu(t.key,t.actualType,t.expectedType,r)}})(i),i}catch(t){return eo().error(e.id,"extension failed to load",zu(t),{isOnline:zc()}),(e=>{let t=1;setInterval(()=>{eo().log("failed extension periodic stats",{extensionId:e,counter:t}),t++},6e4)})(e.id),null}},Qu=(e,t="")=>{let r=[];return!e||0===e.length||e.forEach(e=>{if(Wu(e)){const n=e.route,o={...e,route:Du(n,t)};r=r.concat(o)}else{const n=`${t?`${t}/`:""}${Nc(e.displayNameKey)}`;r=r.concat(Qu(e.children,n))}}),r},Xu=({componentId:e,displayNameKey:t,route:r,routes:n})=>({componentId:e,displayNameKey:t,routes:n??[r]}),eh=()=>l()?.context,th=()=>eh()?.account;function rh(e,t){return t instanceof RegExp?!!e.match(t):e===t}const nh=e=>"user-"+e,oh=e=>"account-"+e,ih=e=>{let t=[];try{t=e.getNavigationItems()}catch(t){eo().error(`${e.id} failed to get navigation items`,t)}return t},sh=(e,t)=>(r={})=>{try{const{raw:n}=r;return n?e:t.getString(e)}catch(r){eo().error(`${t.id} failed to get string with key "${e}"`,r)}return e},ah=()=>{const e=_n(Kn.userCache);if(e)try{return JSON.parse(e)}catch{return}};function lh(e){let t=[];return e.forEach(e=>{e.getSettings().filter(e=>!e.isGeneralSection).forEach(r=>{if(Wu(r)){const n=function(e,t){return{accordionName:sh(e.displayNameKey,t),settingsIcon:e.icon??"",isVisible:Bc(!0),settingsLinksInfo:[{name:sh(e.displayNameKey,t),href:Du(e.route)}]}}(r,e);return void(t=t.concat(n))}const n=function(e,t){return{accordionName:sh(e.displayNameKey,t),settingsIcon:e.icon??"",isVisible:Bc(!0),settingsLinksInfo:Qu(e.children,Nc(e.displayNameKey)).map(e=>({name:sh(e.displayNameKey,t),href:e.route}))}}(r,e);t=t.concat(n)})}),t}const ch=(e,t,r=new Set)=>{if(!e.dependencies)return!0;
2if(r.has(e.id))return eo().error(`Extension ${e.id} has circular dependencies`),!1;r.add(e.id);for(const n of e.dependencies){const e=t.find(e=>e.id===n);if(!e||!ch(e,t,r))return!1}return r.delete(e.id),!0},dh=(e,t,r)=>{e.has(r.id)||(ch(r,t)?([...r.dependencies??[],...r.optionalDependencies??[]].forEach(r=>{const n=t.find(e=>e.id===r);n&&dh(e,t,n)}),e.add(r.id)):eo().error(`Cannot add all dependencies of Extension ${r.id}`))},uh=e=>sg().isStandaloneRoute(e),hh=(e,t)=>e.find(e=>e.standaloneRoutes?.some(e=>((e,t)=>{let r;return r="string"==typeof t?new RegExp(t):t,r.test(e)})(t,e))),ph=(e,t)=>{const r=hh(e,t);if(r){const t=new Set;return dh(t,e,r),e.filter(e=>t.has(e.id))}return e},gh=["/"],fh=new Map,mh=(e,t,r,n)=>async o=>{n&&await n(),((e,t)=>{const r=fh.get(t)??[];r.push(e),fh.set(t,r)})(t,r);const{mount:i}=e;Array.isArray(i)?Promise.all([i.map(e=>e(o))]):i(o)},vh=(e,t,r)=>async n=>{((e,t)=>{const r=fh.get(t)??[],n=r.indexOf(e);n>-1&&r.splice(n,1),fh.set(t,r)})(t,r);const{unmount:o}=e;Array.isArray(o)?Promise.all([o.map(e=>e(n))]):o(n)},bh=(e,t,r,n)=>async o=>(e=>"function"==typeof e)(e)?await e(o).then(e=>({...e,mount:mh(e,t,r,n),unmount:vh(e,t,r)})):{...e,mount:mh(e,t,r,n),unmount:vh(e,t,r)},yh=e=>{let t;return()=>(t=Eu(e,mn())??t,t)},wh="settings-views",xh=(e,t,r)=>{const{domElementGetter:n,beforeMount:o,groupIdentifier:i}=r??{groupIdentifier:""},s=function(e,t){const r=`${e.id}/${t.displayNameKey}/${t.componentId}`,n=[...t.routes];return function(e,t){if(t.some(e=>rh("/",e)))throw new Error(`Route exception for ${e} - modules must not specify the root route`)}(r,n),{name:r,routes:n,activeWhen:e=>n.some(t=>rh(e.pathname,t)),app:()=>e.getComponentById(t.componentId),customProps:{shellConfig:t.shellConfig??{}}}}(e,t),a=`${e.id}/${t.componentId}`,l={activeWhen:s.activeWhen,app:bh(s.app,a,i,o),name:s.name,customProps:{...s.customProps,domElementGetter:n}};sg().registerApplication(l.name,l)},_h=new Map,kh=(e,t,r)=>{const n=r.groupId,o=(e=>{if("string"==typeof e.target){const t=e.target;return async()=>{await Ou(t,document.body)}}{const t=e.target;return async()=>{await Ou(()=>!!t(document),document.body)}}})(t),i=(e=>{if("string"==typeof e.target){const t=e.target;return yh(t)}{const t=e.target;return()=>t(document)}})(t);xh(e,r,{groupIdentifier:n,beforeMount:o,domElementGetter:i})},Ch=(e,t,r)=>{t.forEach(t=>{if(t.groupId){const r=t.groupId,n=(e=>{const t=sg().getExtensions();for(const r of t)if(ju(r)){const t=r.getModuleGroups().find(t=>t.id===e);if(t)return t}})(r);if(n)kh(e,n,t);else{const n=_h.get(r)||[];n.push({extension:e,module:t}),_h.set(r,n)}}else xh(e,t,r)})},Sh=()=>Wn().jiveApiBaseUrl,Eh=()=>`https://goto-desktop.goto.com/${Th().isCompanion?"gotoforteams/":""}web/auth/`,Ih=()=>`${Eh()}sign-in.html`;class Ah{constructor(){this.handlers=new Map,this.callerId=`external-interface-${Math.random()}`,this.pendingMessages=[],this.handleConnectionStatusChanged=e=>{e.connectionStatus===v.connected&&(this.pendingMessages.forEach(e=>{this.send(e)}),this.pendingMessages=[])},this.addConnectionCallback(this.handleConnectionStatusChanged)}get available(){return Ah.isMsTeamsIntegration&&At.DesktopCompanion.connectionStatus===v.connected}get isCompanion(){return Ah.isMsTeamsIntegration&&oa()}get isIntegration(){return Ah.isMsTeamsIntegration&&!oa()}get supportsCompanion(){return this.isIntegration&&!$o()}connect(){At.DesktopCompanion.startConnecting({ports:Wn().externalInterfacePorts})}disconnect(){At.DesktopCompanion.disconnect()}send(e){if(this.available)try{At.DesktopCompanion.send({...e,payload:{...e.payload,callerId:this.callerId}})}catch{eo().error(`Cannot send a message with the DesktopCompanion in external-interface-adapter, ignoring message of type: ${e.type}`)}else this.pendingMessages.push(e)}addCallback(e,t){const r=e=>{"callerId"in e.message.payload&&e.message.payload.callerId!==this.callerId&&t(e.message.payload)};this.handlers.set(t,r),At.DesktopCompanion.addMessageEventListener(e,r)}removeCallback(e,t){const r=this.handlers.get(t);r&&At.DesktopCompanion.removeMessageEventListener(e,r)}addConnectionCallback(e){At.DesktopCompanion.addEventListener("connectionStatusChanged",e)}
2removeConnectionCallback(e){At.DesktopCompanion.removeEventListener("connectionStatusChanged",e)}static get isMsTeamsIntegration(){return Xc()===Kc.MS_TEAMS}}const Th=()=>Vt().shellExternalInterface,Oh=e=>{if(Th().isCompanion){const t=new Set;return e.forEach(r=>{r.integrations?.msTeams?.shouldLoadInCompanion&&dh(t,e,r)}),e.filter(e=>t.has(e.id))}return e},Lh={id:"",url:""},$h=e=>!(!e||"object"!=typeof e)&&(e=>{const t=Object.keys(e);return e=>t.every(t=>t in e)})(Lh)(e);function Nh(e,t){return Array.isArray(e)?e.filter(t):null}const Rh=["__proto__","constructor","prototype"];function Ph(e){return!("string"!=typeof e||0===e.length||e.length>128||Rh.indexOf(e)>-1||e.indexOf("..")>-1||e.indexOf("\\")>-1||/[?#%\s@]/.test(e)||/[\x00-\x1F\x7F]/.test(e))}function Dh(e){return!(!Ph(e)||e.indexOf("/")>-1)}const Mh={lng:Dh,ns:function(e){return Ph(e)}};function zh(e){return"string"!=typeof e?e:e.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function Fh(){return"function"==typeof XMLHttpRequest||"object"==typeof XMLHttpRequest}const Uh=/\{\{(.+?)\}\}/g;function Bh(e,t){let r=!1;const n=e.replace(Uh,(e,n)=>{const o=n.trim();if(Rh.indexOf(o)>-1)return e;const i=t[o];if(null==i)return e;const s=Mh[o]||Dh,a=String(i).split("+");for(const t of a)if(!s(t))return r=!0,e;return a.join("+")});return r?null:n}const Hh=typeof globalThis<"u"?globalThis:typeof r.g<"u"?r.g:typeof window<"u"?window:void 0;let jh;"function"==typeof fetch?jh=fetch:Hh&&"function"==typeof Hh.fetch&&(jh=Hh.fetch);const Vh=Fh()&&Hh?Hh.XMLHttpRequest:void 0,Wh="function"==typeof ActiveXObject&&Hh?Hh.ActiveXObject:void 0,Kh=["__proto__","constructor","prototype"],qh=(e,t)=>{if(t&&"object"==typeof t){let r="";for(const e of Object.keys(t))Kh.indexOf(e)>-1||(r+="&"+encodeURIComponent(e)+"="+encodeURIComponent(t[e]));if(!r)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+r.slice(1)}return e},Gh=(e,t,r,n)=>{const o=e=>{if(!e.ok)return r(e.statusText||"Error",{status:e.status});e.text().then(t=>{r(null,{status:e.status,data:t})}).catch(r)};if(n){const i=n(e,t);if(i instanceof Promise)return void i.then(o).catch(r)}"function"==typeof fetch?fetch(e,t).then(o).catch(r):jh(e,t).then(o).catch(r)},Zh=(e,t,n,o)=>("function"==typeof n&&(o=n,n=void 0),o=o||(()=>{}),jh&&0!==t.indexOf("file:")?((e,t,n,o)=>{e.queryStringParams&&(t=qh(t,e.queryStringParams));const i={..."function"==typeof e.customHeaders?e.customHeaders():e.customHeaders};typeof window>"u"&&typeof r.g<"u"&&typeof r.g.process<"u"&&r.g.process.versions&&r.g.process.versions.node&&(i["User-Agent"]=`i18next-http-backend (node/${r.g.process.version}; ${r.g.process.platform} ${r.g.process.arch})`),n&&(i["Content-Type"]="application/json");const s="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,a={method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:i,...e._omitFetchOptions?{}:s},l="function"==typeof e.alternateFetch&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{Gh(t,a,o,l)}catch(r){if(!s||0===Object.keys(s).length||!r.message||r.message.indexOf("not implemented")<0)return o(r);try{Object.keys(s).forEach(e=>{delete a[e]}),Gh(t,a,o,l),e._omitFetchOptions=!0}catch(e){o(e)}}})(e,t,n,o):Fh()||"function"==typeof ActiveXObject?((e,t,r,n)=>{r&&"object"==typeof r&&(r=qh("",r).slice(1)),e.queryStringParams&&(t=qh(t,e.queryStringParams));try{const o=Vh?new Vh:new Wh("MSXML2.XMLHTTP.3.0");o.open(r?"POST":"GET",t,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,r&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");let i=e.customHeaders;if(i="function"==typeof i?i():i,i)for(const e of Object.keys(i))Kh.indexOf(e)>-1||o.setRequestHeader(e,i[e]);o.onreadystatechange=()=>{o.readyState>3&&n(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(r)}catch(e){console&&console.log(e)}})(e,t,n,o):void o(new Error("No fetch and no xhr implementation found!")));var Yh=class{constructor(e,t={},r={}){this.services=e,this.options=t,this.allOptions=r,this.type="backend",this.init(e,t,r)}init(e,t={},r={}){if(this.services=e,this.options={loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:e=>JSON.parse(e),stringify:JSON.stringify,parsePayload:(e,t,r)=>({[t]:r||""}),parseLoadPayload:(e,t)=>{},request:Zh,reloadInterval:!(typeof window<"u")&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"},...this.options||{},...t},this.allOptions=r,this.services&&this.options.reloadInterval){const e=setInterval(()=>this.reload(),this.options.reloadInterval);"object"==typeof e&&"function"==typeof e.unref&&e.unref()}}readMulti(e,t,r){this._readAny(e,e,t,t,r)}read(e,t,r){this._readAny([e],e,[t],t,r)}_readAny(e,t,r,n,o){let i=this.options.loadPath;"function"==typeof this.options.loadPath&&(i=this.options.loadPath(e,r)),i=function(e){return function(e){return!!e&&"function"==typeof e.then}(e)?e:Promise.resolve(e)}(i),i.then(i=>{if(!i)return o(null,{});const s=Bh(i,{lng:e.join("+"),ns:r.join("+")});if(null==s){const t=e.map(zh).join(", "),n=r.map(zh).join(", ");return o(new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+t+"] namespaces=["+n+"]"),!1)}this.loadUrl(s,o,t,n)})}loadUrl(e,t,r,n){const o="string"==typeof r?[r]:r,i="string"==typeof n?[n]:n,s=this.options.parseLoadPayload(o,i),a=zh(function(e){if("string"!=typeof e||0===e.length)return e;try{const t=new URL(e);return t.username||t.password?(t.username="",t.password="",t.toString()):e}catch{return e.replace(/(\/\/)[^/@\s]+@/g,"$1")}}(e));this.options.request(this.options,e,s,(e,o)=>{if(o&&(o.status>=500&&o.status<600||!o.status))return t("failed loading "+a+"; status code: "+o.status,!0);if(o&&o.status>=400&&o.status<500)return t("failed loading "+a+"; status code: "+o.status,!1);if(!o&&e&&e.message){const r=e.message.toLowerCase();if(["failed","fetch","network","load"].find(e=>r.indexOf(e)>-1))return t("failed loading "+a+": "+zh(e.message),!0)}if(e)return t(e,!1);let i,s;try{i="string"==typeof o.data?this.options.parse(o.data,r,n):o.data}catch{s="failed parsing "+a+" to json"}if(s)return t(s,!1);t(null,i)})}create(e,t,r,n,o){if(!this.options.addPath)return;"string"==typeof e&&(e=[e]);const i=this.options.parsePayload(t,r,n);let s=0;const a=[],l=[];e.forEach(r=>{let n=this.options.addPath;"function"==typeof this.options.addPath&&(n=this.options.addPath(r,t));const c=Bh(n,{lng:r,ns:t});if(null==c)return s+=1,void(o&&s===e.length&&o(a,l));this.options.request(this.options,c,i,(t,r)=>{s+=1,a.push(t),l.push(r),s===e.length&&"function"==typeof o&&o(a,l)})})}reload(){const{backendConnector:e,languageUtils:t,logger:r}=this.services,n=e.language;if(n&&"cimode"===n.toLowerCase())return;const o=[],i=e=>
2{t.toResolveHierarchy(e).forEach(e=>{o.indexOf(e)<0&&o.push(e)})};i(n),this.allOptions.preload&&this.allOptions.preload.forEach(e=>i(e)),o.forEach(t=>{this.allOptions.ns.forEach(n=>{e.read(t,n,"read",null,null,(o,i)=>{o&&r.warn(`loading namespace ${n} for language ${t} failed`,o),!o&&i&&r.log(`loaded namespace ${n} for language ${t}`,i),e.loaded(`${t}|${n}`,o,i)})})})}};Yh.type="backend";const Jh=ws("personNameFormat-MEDIUM"),Qh=e=>on(Jh,{...e,defaultValue:"{{givenName}} {{familyName}}"}),Xh=["en_US","en_AU","en_CA","en_GB","en_IE","fr_CA","fr_FR","de_DE","it_IT","pt_BR","es_MX","es_ES","ja_JP","zh_CN","ko_KR"],ep=Xh.slice(),tp=e=>!!ep.slice().includes(String(e)),rp={en_US:ws("English (USA)"),en_AU:ws("English (Australia)"),en_CA:ws("English (Canada)"),en_GB:ws("English (Great Britain)"),en_IE:ws("English (Ireland)"),fr_CA:ws("Français (Canada)"),fr_FR:ws("Français (France)"),de_DE:ws("Deutsch (Deutschland)"),it_IT:ws("Italiano (Italia)"),pt_BR:ws("Português (Brasil)"),es_MX:ws("Español (México)"),es_ES:ws("Español (Spain)"),ja_JP:ws("日本語 (Japan)"),zh_CN:ws("普通话 (China)"),ko_KR:ws("한국어 (Korea)")},np="I18N",op={localeChangeBegin:_o(),localeChanged:_o()},{emit:ip}=Co().register(np,op),sp=e=>{globalThis.shell.i18n.selectedLocale=e,en.changeLanguage(e),ip.localeChanged(e)},ap="en_US",lp={month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0},cp=(e,t)=>e.replace(/[-_]/g,t),dp=()=>(navigator.languages.length>0?navigator.languages:[navigator.language]).map(e=>cp(e,"_")).find(e=>(e=>Xh.some(t=>e===t))(e))??ap,up=e=>{const{locale:t,...r}=e??{},n=t??_p();return[cp(n,"-"),r]},hp=e=>{const[t,r]=up(e);return new Intl.DateTimeFormat(t,r)},pp=(e,t)=>(e=>{const[t,r]=up(e);return new Intl.NumberFormat(t,r)})(t).format(e),gp=(e,t)=>hp(t).format(e),fp=(e,t,r)=>hp(r).formatRange(e,t),mp=(e,t=lp)=>{const[r]=up(),n=new Date,o=new Date(n.getFullYear(),n.getMonth(),n.getDate()),i=new Date(o);if(i.setDate(i.getDate()-1),Math.abs(n.getTime()-e.getTime())<=6e4)return vp(r);const s=new Date(e.getFullYear(),e.getMonth(),e.getDate()),a=new Intl.DateTimeFormat(r,{hour:"numeric",minute:"2-digit"}).format(e);return s.getTime()===o.getTime()?bp(r,a):s.getTime()===i.getTime()?yp(r,a):wp(r,e,t)},vp=e=>Mc(new Intl.RelativeTimeFormat(e,{numeric:"auto"}).format(0,"seconds")),bp=(e,t)=>{const r=new Intl.RelativeTimeFormat(e,{numeric:"auto"}).format(0,"day");return`${Mc(r)} ${t}`},yp=(e,t)=>{const r=new Intl.RelativeTimeFormat(e,{numeric:"auto"}).format(-1,"day");return`${Mc(r)} ${t}`},wp=(e,t,r)=>((new Date).getFullYear()!==t.getFullYear()&&(r.year="numeric"),new Intl.DateTimeFormat(e,r).format(t));function xp(e=null){return{instance:en,selectedLocale:e||dp(),setCurrentLocale:sp,formatPersonName:Qh,formatNumber:pp,formatDateTime:gp,formatDateTimeRange:fp,formatRelativeTime:mp}}const _p=()=>l()?.i18n?.selectedLocale??dp(),kp=e=>{let t=e;switch(e){case"fr_CA":t="fr_FR";break;case"es_MX":t="es_ES"}return t};class Cp{constructor(){this.launchHandlers=[],this.currentLaunchRequest=null}static getInstance(){return Cp.instance||(Cp.instance=new Cp),Cp.instance}static getLaunchRequestForLogging(e){return{url:e.url,params:e.params}}static executeLaunchHandlerSafe(e,t){try{return e(t)}catch(e){return eo().warn("executeLaunchHandlerSafe","Launch handler from an extension threw an error",Cp.getLaunchRequestForLogging(t),e),!1}}registerLauncherHandler(e){const t=Cp.getInstance();if(t.launchHandlers.push(e),t.currentLaunchRequest){const r=Cp.executeLaunchHandlerSafe(e,t.currentLaunchRequest);eo().log("registerLauncherHandler",{requestHandledSuccessfully:r}),r&&(t.currentLaunchRequest=null)}}appLauncher(e){eo().log("appLauncher",Cp.getLaunchRequestForLogging(e));const t=Cp.getInstance(),r=t.launchHandlers.some(t=>Cp.executeLaunchHandlerSafe(t,e));eo().log("appLauncher",{requestHandledSuccessfully:r}),r||(t.currentLaunchRequest=e)}setupLauncherCommands(){const e=Cp.getInstance();l_().retrieve("shell").commands.registerLauncherHandler.addHandler(e.registerLauncherHandler)}}const Sp={isMainWindow:e=>oo(e),openWindow:(e,t,r)=>{let n,o;return"string"==typeof t||typeof t>"u"?(n=t,o=r):(n=e,o=((e={})=>(e=>JSON.parse(JSON.stringify(e)))({groupId:e.groupId,showTopBar:e.showTopBar,showSideBar:e.showSideBar,features:{resizable:e.resizable,scrollbars:e.showScrollbars,titlebar:e.showTitlebar,status:e.showStatus,location:e.showLocation,toolbar:e.showToolbar,menubar:e.showMenubar,height:e.height,width:e.width}}))(t)),((e,t,r)=>{if(!oo())return ao().openWindow(e,t,r);
2const n=lo(r),o=At.WindowManager.createWindow(e,t,n);if(!o)return void eo().error("Could not create a window");const i={window:o,options:r,close:()=>po(o),navigateTo:e=>o.location.assign(e)};return o.addEventListener("load",()=>{co(),so.set(o,i),fo(),no(uo,o)}),i})(e,n,o)},getWindowOptions:ho,closeWindow:po,closeAllWindows:go,isShellWindowActive:e=>oo()?so.has(e.window):ao().isShellWindowActive(e),getActiveWindowsCount:()=>oo()?so.size:ao().getActiveWindowsCount(),currentWindow:At.CurrentWindow,windowManager:At.WindowManager,containerSettings:At.ContainerSettings,keyboardShortcut:At.KeyboardShortcuts,notification:At.Notification},Ep="single-spa:app-change",Ip="single-spa:routing-event";function Ap(e){if(!(e instanceof CustomEvent&&e.detail.appsByNewStatus))throw new Error("incorrect type")}const Tp=e=>e?.detail?.appsByNewStatus?.MOUNTED??[],Op="goto/snackbar-notification",Lp={closable:!0,description:"To use master branch, delete the goto-experiences-override/goto-extensions-override key from localstorage. For more information see",variant:"neutral",link:{text:"documentation",href:"https://github.com/jive/goto-shell/blob/master/README.md#override-experience-or-extension"},target:window,id:"overrideBanner"},$p=()=>{Cc(Lp)},Np=(e,t)=>(void 0===e.enabled||e.enabled)&&e.id===t,Rp=e=>{if(Vn())return e;const t=function(e,t){const r=(e=>new URLSearchParams(hn()).get(e))(e);if(!r)return null;let n;try{n=(e=>JSON.parse(decodeURIComponent(atob(e))))(r)}catch{return null}return Nh(n,t)}("ox",$h)??function(e,t){const r=_n(e);if(!r)return null;let n;try{n=JSON.parse(r)}catch{return null}return Nh(n,t)}(Kn.gotoExtensionsOverride,$h);if(t){const r=((e,t)=>e.map(e=>{const r=((e,t)=>{for(const r of t)if(Np(r,e))return r})(e.id,t);if(r)try{return{...e,...r,url:new URL(r.url)}}catch{return e}return e}))(e,t);return function(e){const t=e.filter(e=>$h(e)),r=JSON.stringify(t);kn(Kn.gotoExtensionsOverride,r)}(t),(e=>{const t=r=>{Ap(r),(e=>-1!==e.indexOf("goto/banner-notification"))(Tp(r))&&(e(),window.removeEventListener(Ep,t))};window.addEventListener(Ep,t,{once:!0})})($p),r}return e},Pp=e=>{if(Th().isIntegration){const t=new Set;return e.forEach(r=>{r.integrations?.msTeams?.shouldLoadInIntegration&&dh(t,e,r)}),e.filter(e=>t.has(e.id))}return e},Dp=e=>{if(Mp()){const t=new Set;return e.forEach(r=>{r.integrations?.msTeams?.shouldLoadOnMobile&&dh(t,e,r)}),e.filter(e=>t.has(e.id))}return e},Mp=()=>{const{isCompanion:e,isIntegration:t}=Th();return $o()&&(t||e)},zp=e=>{if(Xc()===Kc.SIDE_PANEL){const t=new Set;return e.forEach(r=>{r.integrations?.sidePanel?.shouldLoad&&dh(t,e,r)}),e.filter(e=>t.has(e.id))}return e};class Fp{constructor(e,t,r=!0,n="="){this.valueResolver=e,this.name=t,this.value=r,this.operator=n}static createFromString(e,t){const r=/^([a-zA-Z0-9.\-_]*)( *)(>|<|>=|={1,3}|<=|!={1,2}|)( *)([^=!<>]*)$/gim.exec(e)??[];try{const e=r[1].trim();let n=r[3].trim();"==="===n||"=="===n?n="=":"!=="===n&&(n="!=");const o=r[5].trim(),i=Fp.evaluateValueString(o);return new Fp(t,e,i,n)}catch{throw new Error(`Invalid expression: ${e}`)}}static evaluateValueString(e){return(e=>"true"===e.toLowerCase()||"false"===e.toLowerCase())(e)?(e=>"true"===e.toLowerCase())(e):(e=>!isNaN(+e))(e)?(e=>+e)(e):(e=>e.replace(/^(['"])(.*)(\1)$/gm,(e,t,r)=>r))(e)}isValid(){let e,t,r=this.valueResolver(this.name);if(this.operator?(e=this.operator,t=this.value):(e="=",t=!0,r=!!r),"="!==e&&"!="!==e&&"number"!=typeof r)throw new Error(`Cannot use operator ${e} with value of type ${typeof r} (${r})`);switch(e){case"=":return r===t;case"!=":return r!==t;case">":return r>t;case"<":return r<t;case">=":return r>=t;case"<=":return r<=t}return!1}getNames(){return[this.name]}}class Up{constructor(e){this.rule=e}isValid(){return!this.rule.isValid()}getNames(){return this.rule.getNames()}}class Bp{constructor(e,t,r){this.rule1=e,this.rule2=t,this.operator=r}isValid(){return"&&"===this.operator?this.rule1.isValid()&&this.rule2.isValid():this.rule1.isValid()||this.rule2.isValid()}getNames(){const e=this.rule1,t=this.rule2;return[...e.getNames(),...t.getNames()]}}const Hp=(e,t)=>jp(e,t).isValid(),jp=(e,t)=>{const r=/\(([^)(]+)\)/g,n=[],o=e=>r.test(e),i=e=>e.replace(r,(e,r)=>`%%rule-${n.push(Vp(r.trim(),n,t))-1}%%`);let s=e;for(;o(s);)s=i(s).trim();if(s.indexOf("(")>=0||s.indexOf(")")>=0)throw console.debug(s),new Error(`Error with group balancing for: ${e}`);return Vp(s,n,t)},Vp=(e,t,r)=>{const n=/^([^|&]*)(\|\||&&)(.*)$/gm.exec(e);if(n){const e=n[1].trim(),o=n[2].trim(),i=n[3].trim();return new Bp(Vp(e,t,r),Vp(i,t,r),o)}if(e.startsWith("!"))return new Up(Vp(e.substring(1),t,r));const o=/^%%rule-([0-9]*)%%$/gm.exec(e);return o?.[1]?t[+o[1]]:Fp.createFromString(e,r)},Wp=e=>structuredClone(e),Kp=e=>l().user.entitlements.includes(e)??!1,qp=e=>l().user.roles.includes(e)??!1,Gp=e=>l().context.pbx?.flags?.[e]??!1,Zp=e=>l().user.hasPermissions([e])??!1,Yp=e=>{let t;const r=ds(e);return"string"==typeof r||"number"==typeof r||"boolean"==typeof r?t=r:"object"==typeof r&&(t=!0),t??!1},Jp=e=>{const[t,...r]=e.split("."),n=r.join("."),o=Vx();if(Xp(o,t,n))return!!o[t][n];let i=!1;return i=Wx().some(e=>{if(Xp(e.settings,t,n))return!0===e.settings[t][n]}),i},Qp=e=>l().access.policyDecisionPoint.evaluateFromCache({resourcePath:Cu.PDP_GOTO_APP_EXTENSION_ACCESS,predicate:t=>t.resourceFilters.some(t=>t.extensions.includes(e))});function Xp(e,t,r){return!(!e?.[t]||null===e[t][r])}const eg=e=>{let t;for(t in e){const r=e[t],n=tg(t);if(r&&!Hp(r,n))return!1}return!0},tg=e=>{switch(e){case Cu.ENTITLEMENTS:return Kp;case Cu.ROLES:return qp;case Cu.PBX_FLAGS:return Gp;case Cu.CONTACT_CENTER_FLAGS:return Zp;case Cu.SHELL_FEATURE_FLAGS:return Yp;case Cu.ACCOUNT_SETTINGS:return Jp;case Cu.PDP_GOTO_APP_EXTENSION_ACCESS:return Qp}},rg=e=>e.filter(e=>e.prerequisites?eg(e.prerequisites):e),ng=e=>{let t=[];const r=sg().getBlockedExtensionIds();return r.size>0?(eo().error(`The following extensions are being blocked by the ${Qi.SHELL_BLOCKED_EXTENSION_IDS} feature flag: ${Array.from(r).join(", ")}`),t=e.filter(e=>!r.has(e.id))):t=e,t},og={resolves:[],rejects:[]},ig=new class{constructor(){this.extensionConfigs=new Array,this.extensions=new Map,this.onExtensionReadyResolvers=new Map,this.registeredApplications=new Map}getExtensionConfigs(){return this.extensionConfigs}getBlockedExtensionIds(){const e=new Set,t=ds(Qi.SHELL_BLOCKED_EXTENSION_IDS)??{block:[]};
2return this.extensionConfigs.forEach(r=>{t.block.includes(r.id)&&e.add(r.id)}),e}getModules(e){return this.getExtensions().reduce((t,r)=>(r.getModules().forEach(n=>{n.groupId===e&&t.push({module:n,extension:r})}),t),[])}initializeExtensions(e){const t=[];return e.forEach((e,r)=>t.push(this.initializeExtension(e,r))),new Promise((e,r)=>{Promise.allSettled(t).then(()=>{e()}).catch(e=>r(e))})}addExtensions(e){this.extensionConfigs.push(...e)}removeExtensionConfig(e){const t=this.extensionConfigs.findIndex(t=>t.id===e);t>-1&&this.extensionConfigs.splice(t,1)}async loadAndInitializeExtensions(e){let t=[];t=e?.length?this.getExtensionConfigsFromIds(e):this.getExtensionConfigs();const r=(e=>[ph,rg,Oh,Pp,Dp,zp,ng,Rp].reduce((e,t)=>t(e,dn()),e))(t),n=await this.internalLoadExtensions(r);await this.initializeExtensions(n)}getExtensionConfigsFromIds(e){const t=this.getExtensionConfigs().filter(t=>e.some(e=>e===t.id)),r=new Set;return t.forEach(e=>{dh(r,this.getExtensionConfigs(),e)}),this.getExtensionConfigs().filter(e=>r.has(e.id))}getExtensions(){return Array.from(this.extensions.values())}getExtensionById(e){return this.getExtensions().find(t=>t.id===e)}getLoadedExtensionConfigs(){return Array.from(this.extensions.keys())}getUnguardedRoutes(){return(e=>{const t=new Set;return e.forEach(e=>{e&&e?.unguardedRoutes?.forEach(e=>{(e=>gh.some(t=>t===e))(e)?eo().error(`${e} is a protected route and cannot be added to unguarded routes`):t.add(e)})}),Array.from(t)})(this.extensionConfigs)}registerApplication(e,t){try{oc(t),this.registeredApplications.set(e,t)}catch(t){eo().error(`Cannot register the ${e} extension`,t)}}getRegisteredApplications(){return this.registeredApplications}isExtensionReady(e){return!!this.getExtensions().find(t=>t.id===e)}onExtensionReady(e){return new Promise((t,r)=>{if(this.isExtensionReady(e))t();else{const n=this.onExtensionReadyResolvers.get(e)??og;n.resolves.push(t),n.rejects.push(r),this.onExtensionReadyResolvers.set(e,n)}})}isStandaloneRoute(e){return!!hh(this.extensionConfigs,e)}isValidShellModuleRoute(e){return Array.from(this.extensions.values()).some(t=>t.getModules().some(t=>t.routes.some(t=>rh(e,t))))}getExtensionUrls(){return this.extensionConfigs.map(e=>e.url.toString())}resolveExtensionReadyResolvers(e){(this.onExtensionReadyResolvers.get(e)??og).resolves.forEach(e=>e()),this.onExtensionReadyResolvers.delete(e)}resolveExtensionReadyRejecters(e){(this.onExtensionReadyResolvers.get(e)??og).rejects.forEach(e=>e()),this.onExtensionReadyResolvers.delete(e)}initializeExtension(e,t){return new Promise((r,n)=>{const o=(e,r)=>{this.extensions.delete(t),eo().error(r,e),n(e)};e.initialize(t).then(()=>e.registerNamespaces().catch(t=>{o(t,`${e.id} failed when registering namespace`)})).then(()=>{if((e=>{const t={...Fu,registerCustomElements:()=>{}};return Hu(e,t)})(e))try{e.registerCustomElements()}catch(t){o(t,`${e.id} failed when registering custom elements`)}}).then(()=>{this.resolveExtensionReadyResolvers(e.id),(e=>{nd.extensionReady(e)})({extensionId:e.id}),r()}).catch(t=>{this.resolveExtensionReadyRejecters(e.id),o(t,`${e.id} failed to initialize`)})})}async internalLoadExtensions(e){const t=new Map,r=async e=>{if(this.extensions.has(e))return!0;const r=await Ju(e);return!!r&&(this.extensions.set(e,r),t.set(e,r),r.id!==e.id&&eo().warn(`The ${e.id} id from the extension config does not match the ${r.id} id provided by the extension script`),!0)};for(const t of e){const n=t.dependencies??[],o=t.optionalDependencies??[];(await Promise.allSettled(n.map(async t=>{const n=e.find(e=>e.id===t);return!!n&&await r(n)}))).some(e=>"rejected"===e.status||"fulfilled"===e.status&&!e.value)?eo().error(`Failed to load mandatory dependencies for ${t.id}`):(await Promise.allSettled(o.map(async t=>{const n=e.find(e=>e.id===t);n&&await r(n)})),await r(t))}return t}},sg=()=>ig,ag=Object.freeze(["idle","busy","ask"]);class lg{constructor(){this.state=new Map;const{emit:{appStateChanged:e}}=Co().register(ld,cd);this.appStateChanged=e}getAppState(){return this.getReducedState()}setCheckPointState(e,t){(function(e){mi(ag.includes(e),`${e} is not a valid BusyState value`)})(t),this.state.set(e,t),this.emitNewStateAndLog(e,t)}emitNewStateAndLog(e,t){const r=this.getReducedState();this.appStateChanged?.(r),d().track("Goto > AppStateService",{appState:r,state:t,checkpointName:e}),eo().info(`AppStateService: ${e} set to ${t}. Reduced State is ${r}`)}getReducedState(){return this.isIdle()?"idle":this.shouldAsk()?"ask":"busy"}isIdle(){return Array.from(this.state.values()).every(e=>"idle"===e)}shouldAsk(){const e=Array.from(this.state.values()),t=e.every(e=>"idle"===e||"ask"===e);return e.length>0&&t&&!this.isIdle()}}let cg,dg;const ug=()=>(cg||(cg=new lg),cg),hg=e=>ns[e];class pg{#e=!1;set(){this.#e=!0}get(){return this.#e}}let gg;const fg=()=>(gg||(gg=new pg),gg),mg=e=>new Promise(t=>{"idle"===e?t(!0):"ask"===e?(fg().set(),vg({accept:()=>t(!0),refuse:()=>t(!1)})):(eo().warn("isIdleOrGetUserResponse: unexpected BusyState, resolving false",{state:e}),t(!1))}),vg=({accept:e,refuse:t})=>{const r=hg(Xi.SHELL_BRAND_NAME)??"GoTo",n={id:"can-reload-modal",title:on("Something went wrong"),content:on("For the best experience, {{brand}} needs to be restarted.",{brand:r})},o=[{label:on("Reload now"),handler:e},{label:on("Cancel"),handler:()=>{t(),i()}}],{close:i}=Ec({...n,actions:o})},bg=()=>{if(fg().get())return eo().warn("canReloadApplication: reload prompt already seen this session, resolving false"),Promise.resolve(!1);try{const e=ug().getAppState();return"busy"===e?new Promise(e=>{const{appStateChanged:t}=Co().subscribeTo(ld),r=t=>{"busy"!==t&&(n(),mg(t).then(t=>{e(t)}))},n=()=>{t.removeListener(r),o()};t.on(r);const o=no(n)}):mg(e)}catch(e){return eo().error("failed to get busy state",e),Promise.resolve(!0)}},yg=new class{show(){this.authOutageBannerElement||(this.authOutageBannerElement=sn("goto-auth-outage-banner"),mn().querySelector(er)?.appendChild(this.authOutageBannerElement))}hide(){this.authOutageBannerElement&&(this.authOutageBannerElement.remove(),this.authOutageBannerElement=void 0)}};let wg,xg=!1;const _g=new Set,kg=e=>_g.forEach(t=>t(e)),Cg=()=>"true"===_n(Kn.gotoAuthOutage),Sg=()=>ds(Qi.SHELL_AUTH_OUTAGE,!1)??!1,Eg=()=>{Cn(Kn.gotoAuthOutage),$g(),xg&&(xg=!1,yg.hide(),kg(!1))},Ig=()=>!!Sg()||((Cg()||xg)&&Eg(),!1),Ag=async()=>{const e=await as(Qi.SHELL_AUTH_OUTAGE);if(void 0!==e){const t=ls()??{};ss({...t,[Qi.SHELL_AUTH_OUTAGE]:e.enabled})}},Tg=async e=>(ls()||await Ag(),!!Sg()&&(eo().warn("auth-outage: AuthService 5xx with shell-auth-outage on; entering guest outage mode"),kn(Kn.gotoAuthOutage,"true"),e(),oo()&&Og(),!0)),Og=()=>{xg||(xg=!0,yg.show(),kg(!0),Lg())},Lg=()=>{void 0===wg&&(wg=On(()=>{Ng().catch(e=>{eo().error("auth-outage: pollForRecovery failed",e)})},6e4))},$g=()=>{void 0!==wg&&(Ln(wg),wg=void 0)},Ng=async()=>{await Ag(),!Sg()&&(eo().log("auth-outage: shell-auth-outage cleared; recovering"),Eg(),await bg()&&Nn())};class Rg{constructor(){this.unguardedRoutes=[]}setUnguardedRoutes(e){this.unguardedRoutes=e}navigateToLandingPage(){const e=cn(),t=dn();this.setInflightRequest(e+t),Uc(ya)}shouldNavigateToLandingPage(){return!1}async auth(){try{if(Cg()&&Ig())return void(this.isAuthenticationRequired()&&Uc(ya));if(this.init(),this.shouldNavigateToLandingPage()&&this.navigateToLandingPage(),this.isRedirectedAuthPage())return await this.completeAuthProcess();if(xi()||null===_i()){if(this.isAuthenticationRequired()&&!xi()){const e=new URL(cn()),t=ed(dn()),r
2=hn(),n=un(),o=new URL(`${t}${r}${n}`,e).href;this.setInflightRequest(o),t!==wa&&await ax(),xi()?Uc(o):this.navigateToLandingPage()}}else await ax();return xi()&&Pa.getInstance().update(!0),wi()}catch(e){eo().error("shell authentication flow encountered an error",e),this.authErrorHandler(e,()=>{throw e})}}init(){this.getAuthClientInstance().init(wi())}async login({inflightPathname:e}={}){this.authProcess(Wn(),!1,e)}async loginOnce(){this.authProcess(Wn(),!0)}async logout(){eo().info("AuthBase: logout flow started"),id();const e=this.getLogoutURL(Wn());this.removeTokens(),It.isPluginAvailable("Badge")&&(At.Badge.setBadgeCount(0),"setBadgeStatus"in At.Badge&&At.Badge.setBadgeStatus(u.Offline)),ad(void 0),yn(e)}async getLoginConfig(e,t,r){const{authClientId:n}=Wn();return{response_type:"code",client_id:n,state:e,redirect_uri:t,code_challenge:await this.getCodeChallenge(),code_challenge_method:"S256",url:r}}getAuthClientInstance(){const{authUrl:e,authRedirectUrl:t,authClientId:r}=Wn();return new fi({redirect_url:t,client_id:r,url:e})}async completeAuthProcess(e){const{nonce:t,inflightRequest:r}=this.getStateFromSearch(e);let n;this.validateNonce(t);try{n=await this.requestToken()}catch(e){if(await Tg(()=>this.removeTokens())){const e=new Na("AuthService outage");throw e.url=ya,e}throw e}return this.initializeToken(n),this.setInflightRequest(r),n}setInflightRequest(e=""){(e=>{try{(e=>{try{Oi(e)}catch(e){const t=String(e);throw new TypeError(t)}})(e),En(qn,e)}catch{}})(e),history.replaceState(null,"",e)}initializeToken(e){kn(ps,"0"),Ci(e.refresh_token),ki(e),cx(e)}validateNonce(e){const t=Sn(Kn.gotoNonce);if(!t||e!==t)throw new Na("Nonce is invalid.")}getStateFromSearch(e=new URLSearchParams(hn())){return ys(decodeURIComponent(e.get("state")??""),{inflightRequest:window.location.origin})}getState(e){return{inflightRequest:e||ln(),nonce:_n(Kn.gotoNonce)??""}}setLocalStorageEncodedNonce(){const e=btoa(gs());return kn(Kn.gotoNonce,e),e}async getCodeChallenge(){const e=await(e=>crypto.subtle.digest({name:"SHA-256"},(new TextEncoder).encode(e)))(this.setSessionStorageCodeVerifier());return(e=>(e=>{const t={"+":"-","/":"_","=":""};return e.replace(/[+/=]/g,e=>t[e])})(btoa(String.fromCharCode(...Array.from(new Uint8Array(e))))))(e)}setSessionStorageCodeVerifier(){const e=gs();return sessionStorage.setItem(hs,e),e}removeTokens(){Si(),Ei()}isRedirectedAuthPage(){return dn().startsWith(Dn.redirect)}isAuthenticationRequired(){return function(e){return!e?.some((e=>t=>new RegExp(`(^${t}$|${t}/|${t}$)`).test(e))(location.pathname))}(this.unguardedRoutes)}authErrorHandler(e,t){e instanceof Na?(eo().warn("authErrorHandler: UnauthenticatedError, redirecting",{url:e.url}),Uc(e.url)):(eo().warn("authErrorHandler: unhandled authentication error",e),t?.())}}class Pg extends Rg{constructor(){super(...arguments),this.isLoginInProgress=!1,this.requestAuthorizationCode=async e=>{eo().info("requestAuthorizationCode: opening browser for authorization");const t=await this.tryAndTimeout(At.BrowserAuth.authenticate(e));this.localServerUri=t.redirect_uri;const r=new URLSearchParams(t.query_string);return this.authorizationCode=r.get("code")??"",r}}async auth(){const e=await super.auth();return e&&cx(e),e}async authProcess({authUrl:e},t,r){if(this.isLoginInProgress&&t)return void eo().info("authProcess: login already in progress, skipping");eo().info("authProcess: starting container login flow",{loginOnce:t}),this.isLoginInProgress=!0,this.setLocalStorageEncodedNonce();const n=await this.getLoginConfig(this.getState(r),Ih(),`${e}/oauth/authorize`),o={...n,final_redirect_uri:Ih()};try{const e=await this.requestAuthorizationCode(o);eo().info("authProcess: authorization code received from browser");const t=await this.completeAuthProcess(e);ad(t),eo().info("authProcess: container login flow completed successfully"),yn(n?.state?.inflightRequest??wa),this.isLoginInProgress=!1}catch(e){eo().error("authProcess: container login flow failed",e);const t=()=>this.showAuthenticationFailedBanner(()=>{this.isLoginInProgress=!1});this.authErrorHandler(e,t)}}showAuthenticationFailedBanner(e){const t=l().display.banner({description:on("Authentication failed."),id:"retry-login-container",closable:!0,variant:"neutral",link:{text:on("Please retry"),onClick:()=>{t?.close(),e()}}})}tryAndTimeout(e){let t=0;return Promise.race([e,new Promise((e,r)=>t=window.setTimeout(()=>r(new Error("shell timeout - container authenticate didn't respond in time")),12e5))]).finally(()=>clearTimeout(t))}getLogoutURL(){return this.logoutContainerFlow()}logoutContainerFlow(){return It.isPluginAvailable("UserId")&&At.UserId.clearCurrAuthenticatedUserKey(),Vt().open(`${Eh()}sign-out.html?signOutUrl=${encodeURIComponent(`${Wn().authRedirectUrlContainerSignOut}=${encodeURIComponent(window.location.origin)}`)}`),Vt().location.origin}requestToken(){return this.getAuthClientInstance().requestPKCEToken({code_verifier:sessionStorage.getItem(hs)??"",code:this.authorizationCode,redirect_url:this.localServerUri})}}class Dg extends Rg{async auth(){const e=await super.auth();return(e=>{window.addEventListener("storage",t=>{t.key===Kn.authLocalStorageKey&&t.storageArea===localStorage&&(null===t.newValue&&null!==t.oldValue?(eo().info("Auth token removed in another tab."),e()):Ai(t.oldValue)!==Ai(t.newValue)&&e())})})(()=>yn(wa)),e}async authProcess({authRedirectUrl:e,authUrl:t},r,n){this.setLocalStorageEncodedNonce();const o=await this.getLoginConfig(vs(this.getState(n)),e,t),i=new URLSearchParams(o);yn(`${t}/oauth/authorize?${i}`)}getLogoutURL({authUrl:e,authClientId:t,logoutRedirectUrl:r}){return`${e}/oauth/logout?${new URLSearchParams({client_id:t,redirect_uri:`${r}`})}`}requestToken(){const e=new URLSearchParams(hn());return this.getAuthClientInstance().requestPKCEToken({code_verifier:sessionStorage.getItem(hs)??"",code:e.get("code")??"",redirect_url:Wn().authRedirectUrl})}}const Mg="goto",zg=yu({template:()=>Qd`<goto-banner-notification></goto-banner-notification>`,domElement:rr}),Fg=yu({template:()=>Qd`<goto-modal-notification></goto-modal-notification>`,domElement:sr}),Ug={name:`${Mg}/banner-notification`,app:zg,activeWhen:()=>!0},Bg={name:`${Mg}/snackbar-notification`,app:yu({template:()=>Qd`<goto-snackbar-notification></goto-snackbar-notification>`,domElement:or}),activeWhen:()=>!0},Hg={name:`${Mg}/modal-notification`,app:Fg,activeWhen:()=>!0},jg=Object.freeze(Object.defineProperty({__proto__:null,gotoBannerNotificationsConfig:Ug,gotoModalNotificationsConfig:Hg,gotoSnackbarNotificationsConfig:Bg},Symbol.toStringTag,{value:"Module"})),Vg=()=>(e=>{const t=Object.values(jg).map(e=>e.name);return e.filter(e=>!t.includes(e))})(ec()),Wg=()=>_n(Kn.gotoCurrentRoute);function Kg(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function qg(e,t,r,n){return new(r||(r=Promise))(function(t,o){function i(e){try{a(n.next(e))}catch(e){o(e)}}function s(e){try{a(n.throw(e))}catch(e){o(e)}}function a(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r(function(e){e(n)})).then(i,s)}a((n=n.apply(e,[])).next())})}var Gg,Zg,Yg,Jg,Qg,Xg,ef,tf,rf,nf,of,sf,af,lf,cf,df,uf,hf;(function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"})(Gg||(Gg={})),function(e){e.M365Content="m365content"}(Zg||(Zg={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(Yg||(Yg={})),function(e){e[e.NOT_SUPPORTED_ON_PLATFORM=100]="NOT_SUPPORTED_ON_PLATFORM",e[e.INTERNAL_ERROR=500]="INTERNAL_ERROR",e[e.NOT_SUPPORTED_IN_CURRENT_CONTEXT=501]="NOT_SUPPORTED_IN_CURRENT_CONTEXT",e[e.PERMISSION_DENIED=1e3]="PERMISSION_DENIED",e[e.NETWORK_E
2RROR=2e3]="NETWORK_ERROR",e[e.NO_HW_SUPPORT=3e3]="NO_HW_SUPPORT",e[e.INVALID_ARGUMENTS=4e3]="INVALID_ARGUMENTS",e[e.UNAUTHORIZED_USER_OPERATION=5e3]="UNAUTHORIZED_USER_OPERATION",e[e.INSUFFICIENT_RESOURCES=6e3]="INSUFFICIENT_RESOURCES",e[e.THROTTLE=7e3]="THROTTLE",e[e.USER_ABORT=8e3]="USER_ABORT",e[e.OPERATION_TIMED_OUT=8001]="OPERATION_TIMED_OUT",e[e.OLD_PLATFORM=9e3]="OLD_PLATFORM",e[e.FILE_NOT_FOUND=404]="FILE_NOT_FOUND",e[e.SIZE_EXCEEDED=1e4]="SIZE_EXCEEDED"}(Jg||(Jg={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Qg||(Qg={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Xg||(Xg={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(ef||(ef={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NotAdult="notAdult",e.NonAdult="notAdult"}(tf||(tf={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(rf||(rf={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(nf||(nf={})),function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.visionOS="visionOS",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(of||(of={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(sf||(sf={})),function(e){e.settings="settings",e.content="content",e.authentication="authentication",e.remove="remove",e.task="task",e.sidePanel="sidePanel",e.stage="stage",e.meetingStage="meetingStage"}(af||(af={})),function(e){e.copilotSidePanel="copilotSidePanel",e.copilotMainPane="copilotMainPane",e.copilotFullScreen="copilotFullScreen"}(lf||(lf={})),function(e){e[e.Standard=0]="Standard",e[e.Edu=1]="Edu",e[e.Class=2]="Class",e[e.Plc=3]="Plc",e[e.Staff=4]="Staff"}(cf||(cf={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(df||(df={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(uf||(uf={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(hf||(hf={}));const pf={errorCode:Jg.NOT_SUPPORTED_ON_PLATFORM},gf={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}};var ff={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let mf;const vf=new Uint8Array(16),bf=[];for(let e=0;e<256;++e)bf.push((e+256).toString(16).slice(1));var yf=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function wf(e,t){if("string"!=typeof e||"string"!=typeof t)return NaN;const r=e.split("."),n=t.split(".");function o(e){return/^\d+$/.test(e)}if(!r.every(o)||!n.every(o))return NaN;for(;r.length<n.length;)r.push("0");for(;n.length<r.length;)n.push("0");for(let e=0;e<r.length;++e)if(Number(r[e])!=Number(n[e]))return Number(r[e])>Number(n[e])?1:-1;return 0}function xf(e){return Object.keys(e).forEach(t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&xf(e[t])}),Object.freeze(e)}function _f(e){return"https:"===e.protocol}function kf(){return typeof window>"u"}function Cf(e){return new RegExp(`${/<script[^>]*>|&lt;script[^&]*&gt;|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|&lt;\/script[^&]*&gt;|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}const Sf=!!performance&&"now"in performance;function Ef(){return Sf?performance.now()+performance.timeOrigin:void 0}function If(e){var t,r;if(null===(r=null===(t=e.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)||void 0===r||!r.ageGroup)return e;const n=e.hostVersionsInfo.appEligibilityInformation.ageGroup;return"nonadult"!==n?.toLowerCase()?e:Object.assign(Object.assign({},e),{hostVersionsInfo:Object.assign(Object.assign({},e.hostVersionsInfo),{appEligibilityInformation:Object.assign(Object.assign({},e.hostVersionsInfo.appEligibilityInformation),{ageGroup:tf.NotAdult})})})}let Af=class{constructor(e=function(){return function(e){if(ff.randomUUID&&!e)return ff.randomUUID();const t=(e=e||{}).random??e.rng?.()??function(){if(!mf){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");mf=crypto.getRandomValues.bind(crypto)}return mf(vf)}();if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(e,t=0){return(bf[e[t+0]]+bf[e[t+1]]+bf[e[t+2]]+bf[e[t+3]]+"-"+bf[e[t+4]]+bf[e[t+5]]+"-"+bf[e[t+6]]+bf[e[t+7]]+"-"+bf[e[t+8]]+bf[e[t+9]]+"-"+bf[e[t+10]]+bf[e[t+11]]+bf[e[t+12]]+bf[e[t+13]]+bf[e[t+14]]+bf[e[t+15]]).toLowerCase()}(t)}()}()){this.uuid=e,function(e){if(!e)throw new Error("id must not be empty");if(!1===function(e){return"string"==typeof e&&yf.test(e)}(e))throw new Error("id must be a valid UUID")}(e)}toString(){return this.uuid}serialize(){return this.toString()}};const Tf=e=>{const{uuid:t}=e,r=Kg(e,["uuid"]),n=t?.toString();return Object.assign(Object.assign({},r),{uuidAsString:n})},Of=e=>{const{uuidAsString:t}=e,r=Kg(e,["uuidAsString"]);return Object.assign(Object.assign({},r),{uuid:t?new Af(t):void 0})};var Lf,$f,Nf={exports:{}};!function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))}),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch{}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!(!(typeof window<"u"&&window.process)||"renderer"!==window.process.type&&!window.process.__nwjs)||!(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&
2(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch{}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=function(e){function t(e){let n,o,i,s=null;function a(...e){if(!a.enabled)return;const r=a,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,o)=>{if("%%"===n)return"%";s++;const i=t.formatters[o];if("function"==typeof i){const t=e[s];n=i.call(r,t),e.splice(s,1),s--}return n}),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=function(){if($f)return Lf;$f=1;var e=1e3,t=60*e,r=60*t,n=24*r,o=7*n;function i(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}return Lf=function(s,a){a=a||{};var l,c,d=typeof s;if("string"===d&&s.length>0)return function(i){if(!((i=String(i)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(s){var a=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return a*o;case"days":case"day":case"d":return a*n;case"hours":case"hour":case"hrs":case"hr":case"h":return a*r;case"minutes":case"minute":case"mins":case"min":case"m":return a*t;case"seconds":case"second":case"secs":case"sec":case"s":return a*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(s);if("number"===d&&isFinite(s))return a.long?(l=s,(c=Math.abs(l))>=n?i(l,c,n,"day"):c>=r?i(l,c,r,"hour"):c>=t?i(l,c,t,"minute"):c>=e?i(l,c,e,"second"):l+" ms"):function(o){var i=Math.abs(o);return i>=n?Math.round(o/n)+"d":i>=r?Math.round(o/r)+"h":i>=t?Math.round(o/t)+"m":i>=e?Math.round(o/e)+"s":o+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))}}(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(r=>{t[r]=e[r]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Nf,Nf.exports);var Rf=Nf.exports;const Pf=new Af,Df=Rf.debug.formatArgs;Rf.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${Pf.toString()}]`,Df.call(this,e)};const Mf=Rf.debug("teamsJs");function zf(e){return Mf.extend(e)}function Ff(e,t){return`${e}_${t}`}function Uf(e){return/^v\d+_[\w.]+$/.test(e)}function Bf(e){return void 0!==e.uuidAsString?`${e.uuidAsString}
2 (legacy id: ${e.id})`:void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}const Hf=zf("flushMessageQueue");function jf(e,t,r,n){if(e&&t&&0!==r.length)for(;r.length>0;){const o=r.shift();if(o){const r=Tf(o);Hf("Flushing message %s from %s message queue via postMessage.",Bf(r),n),e.postMessage(r,t)}}}const Vf="2.0.1",Wf=["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.office365.us","outlook-dod.office365.us","webmail.apps.mil","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","*.outlook.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net","fa000000125.officeapps.live.com","fa000000129.officeapps.live.com","fa000000124.officeapps.live.com","fa000000128.officeapps.live.com","fa000000136.mro1cdnstorage.public.cdn.office.net","fa000000136.mro1cdnstorage.public.onecdn.static.microsoft","substrate-msb-bizchatvnext-service.sdf01.substrate-msb-bingatwork.eastus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2sdf1.office-home-m365copilotapp.westus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2test1.office-home-m365copilotapp.westus2-test.cosmic-int.office.net","m365copilotapp.svc.cloud.microsoft","m365copilotapp.svc.cloud.dev.microsoft","ffc-copilot.officeapps.live.com","m365.cloud.dev.microsoft","m365.cloud.dev.microsoft:3001","portal.officeppe.com","ignite.m365.admin.cloud.microsoft","ignite.admin.cloud.microsoft","sdf.m365.admin.cloud.microsoft","admin-sdf.microsoft.com","canary.m365.admin.cloud.microsoft","ring0.m365.admin.cloud.microsoft","portal.office365.us","portal.apps.mil","www.ohome.apps.mil","www.office365.us"],Kf=1500,qf=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),Gf="The library has not yet been initialized",Zf="The runtime has not yet been initialized",Yf="The runtime version is not supported";let Jf=class{};Jf.initializeCalled=!1,Jf.initializeCompleted=!1,Jf.additionalValidOrigins=[],Jf.initializePromise=void 0,Jf.isFramelessWindow=!1,Jf.frameContext=void 0,Jf.hostClientType=void 0,Jf.printCapabilityEnabled=!1,Jf.teamsJsInstanceId=(new Af).toString();const Qf=zf("runtime"),Xf=4;function em(e){return 4===e.apiVersion}let tm={apiVersion:-1,supports:{}};const rm={supports:{appInstallDialog:{},appEntity:{},call:{},chat:{},conversations:{},dialog:{card:{bot:{}},url:{bot:{},parentCommunication:{}},update:{}},interactive:{},logs:{},meetingRoom:{},menus:{},monetization:{},notifications:{},pages:{config:{},backStack:{},fullTrust:{}},remoteCamera:{},teams:{fullTrust:{}},teamsCore:{},video:{sharedFrame:{}}}},nm=[of.desktop,of.web,of.rigel,of.surfaceHub,of.teamsRoomsWindows,of.teamsRoomsAndroid,of.teamsPhones,of.teamsDisplays],om=[of.android,of.ios,of.ipados,of.visionOS],im=[...nm,...om],sm=[{versionToUpgradeFrom:1,upgradeToNextVersion:e=>{var t;return{apiVersion:2,hostVersionsInfo:void 0,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:void 0,url:e.supports.dialog,update:null===(t=e.supports.dialog)||void 0===t?void 0:t.update}:void 0})}}},{versionToUpgradeFrom:2,upgradeToNextVersion:e=>{const t=e.supports,{appNotification:r}=t,n=Kg(t,["appNotification"]);return Object.assign(Object.assign({},e),{apiVersion:3,supports:n})}},{versionToUpgradeFrom:3,upgradeToNextVersion:e=>{var t,r,n,o,i;return{apiVersion:4,hostVersionsInfo:e.hostVersionsInfo,isNAAChannelRecommended:e.isNAAChannelRecommended,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:null===(t=e.supports.dialog)||void 0===t?void 0:t.card,url:{bot:null===(n=null===(r=e.supports.dialog)||void 0===r?void 0:r.url)||void 0===n?void 0:n.bot,parentCommunication:null!==(o=e.supports.dialog)&&void 0!==o&&o.url?{}:void 0},update:null===(i=e.supports.dialog)||void 0===i?void 0:i.update}:void 0})}}}],am={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:nm}],"1.9.0":[{capability:{location:{}},hostClientTypes:im}],"2.0.0":[{capability:{people:{}},hostClientTypes:im},{capability:{sharing:{}},hostClientTypes:[of.desktop,of.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[of.android,of.desktop,of.ios,of.teamsRoomsAndroid,of.teamsPhones,of.teamsDisplays,of.web]},{capability:{webStorage:{}},hostClientTypes:[of.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[of.android,of.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[of.android,of.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[of.android,of.ios,of.ipados,of.visionOS]}],"2.1.2":[]},lm=Qf.extend("generateBackCompatRuntimeConfig");function cm(e,t){const r=Object.assign({},e);for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&("object"!=typeof t[n]||Array.isArray(t[n])?n in e||(r[n]=t[n]):r[n]=cm(e[n]||{},t[n]));return r}function dm(e,t,r){lm("generating back compat runtime config for %s",e);let n=Object.assign({},t.supports);lm("Supported capabilities in config before updating based on highestSupportedVersion: %o",n),Object.keys(r).forEach(t=>{wf(e,t)>
2=0&&r[t].forEach(e=>{void 0!==Jf.hostClientType&&e.hostClientTypes.includes(Jf.hostClientType)&&(n=cm(n,e.capability))})});const o={apiVersion:4,hostVersionsInfo:gf,isLegacyTeams:!0,supports:n};return lm("Runtime config after updating based on highestSupportedVersion: %o",o),o}const um=Qf.extend("applyRuntimeConfig");function hm(e){"string"==typeof e.apiVersion&&(um("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),um("Fast-forwarding runtime %o",e);const t=function(e){let t=e;if(t.apiVersion<4&&sm.forEach(e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))}),em(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}(e);um("Applying runtime %o",t),tm=xf(t)}const pm="2.55.0";let gm=class e{static storeCallbackInformation(t,r){e.callbackInformation.set(t,r)}static clearMessages(){e.callbackInformation.clear()}static deleteMessageInformation(t){e.callbackInformation.delete(t)}static handleOneWayPerformanceMetrics(e,t,r){const n=e.monotonicTimestamp;n&&r?Vv({actionName:e.func,messageDelay:r-n,requestStartedAt:n}):t("Unable to send performance metrics for event %s",e.func)}static handlePerformanceMetrics(t,r,n,o){const i=e.callbackInformation.get(t);i&&r.monotonicTimestamp&&o?(Vv({actionName:i.name,messageDelay:o-r.monotonicTimestamp,requestStartedAt:i.calledAt}),e.deleteMessageInformation(t)):n("Unable to send performance metrics for callback %s with arguments %o",t.toString(),r.args)}};gm.callbackInformation=new Map;const fm=zf("nestedAppAuthUtils"),mm=fm.extend("tryPolyfillWithNestedAppAuthBridge"),vm="v2",bm=fm.extend("createNestedAppAuthBridge"),ym=/^[A-Za-z][A-Za-z\d+.-]*:\/\//;function wm(e,t){const r=e.split("."),n=t.split(".");if(n.length!==r.length)return!1;let o=!1;for(let e=0;e<r.length;e++)if(r[e]!==n[e]){if("*"!==r[e]||e===r.length-1||o)return!1;o=!0}return!0}let xm=class e{constructor(e,t,r){this.protocol=e,this.host=t,this.logger=r}static canUse(e){return ym.test(e)}static create(t,r){const n=t.split("://");return new e(n[0],n[1],r.extend("InternalURLPattern"))}test(e){return this.logger("Testing URL %s against pattern protocol: %s, host: %s",e,this.protocol,this.host),e.protocol===`${this.protocol}:`&&(!e.host||wm(this.host,e.host))}},_m=[];const km=zf("validateOrigin");let Cm;function Sm(){return 0===_m.length}function Em(e=!1){return qg(this,0,void 0,function*(){if(!Sm()&&!e)return _m;if(Cm)return Cm;if(kf())return _m=Wf,Wf;{km("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout(()=>e.abort(),Kf);return Cm=fetch(qf,{signal:e.signal}).then(e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return km("Fetch call completed and retrieved valid origins list from CDN"),e.json().then(e=>{if(function(e){let t=JSON.parse(e);try{t=JSON.parse(e)}catch{return!1}if(!t.validOrigins)return!1;for(const e of t.validOrigins)try{new URL("https://"+e)}catch{return km("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}(JSON.stringify(e)))return _m=e.validOrigins,_m;throw new Error("Valid origins list retrieved from CDN is invalid")})}).catch(e=>("AbortError"===e.name?km(`validOrigins fetch call to CDN failed due to Timeout of ${Kf} ms. Defaulting to fallback list`):km("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),_m=Wf,_m)),Cm}})}function Im(e,t){let r;try{const t=function(e,t){if(xm.canUse(e))return xm.create(e,t);t("No URL verifier available for pattern: %s",e)}(e,km);if(!t)return!1;r=t}catch{return!1}return r.test(t)}function Am(e,t){for(const t of Jf.additionalValidOrigins)if(Im(t,e))return!0;const r=e.host;return _f(e)?!!t.some(e=>wm(e,r))||(km("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",e,t,Jf.additionalValidOrigins),!1):(km("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1)}!function(){qg(this,0,void 0,function*(){Cm||(yield Em())})}();const Tm=zf("communication");let Om=class{},Lm=class{};function $m(e,t,r=void 0){if(!Uf(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return new Promise(n=>{const o=Fm(e,t,r);var i;n((i=o.uuid,new Promise(e=>{Lm.promiseCallbacks.set(i,e)})))})}function Nm(e,t,r,n){let o;if(r instanceof Function?n=r:r instanceof Array&&(o=r),!Uf(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const i=Fm(e,t,o);n&&Lm.callbacks.set(i.uuid,n)}Lm.parentMessageQueue=[],Lm.topMessageQueue=[],Lm.nextMessageId=0,Lm.callbacks=new Map,Lm.promiseCallbacks=new Map,Lm.portCallbacks=new Map,Lm.legacyMessageIdsToUuidMap={};const Rm=Tm.extend("sendNestedAuthRequestToTopWindow");function Pm(e,t){const r=Rm,n=Om.topWindow,o=function(e,t){const r=Lm.nextMessageId++,n=new Af;return Lm.legacyMessageIdsToUuidMap[r]=n,{id:r,uuid:n,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:Ef(),apiVersionTag:t,args:[],data:e}}(e,t);return r("Message %s information: %o",Bf(o),{actionName:o.func}),Mm(n,o)}const Dm=Tm.extend("sendRequestToTargetWindowHelper");function Mm(e,t){const r=Dm,n=(i=e)===Om.topWindow&&Zm()?"top":i===Om.parentWindow?"parent":null,o=Tf(t);var i,s;if(Jf.isFramelessWindow)Om.currentWindow&&Om.currentWindow.nativeInterface&&(r("Sending message %s to %s via framelessPostMessage interface",Bf(o),n),Om.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=(s=e)===Om.topWindow&&Zm()?Om.topOrigin:s===Om.parentWindow?Om.parentOrigin:null;e&&i?(r("Sending message %s to %s via postMessage",Bf(o),n),e.postMessage(o,i)):(r("Adding message %s to %s message queue",Bf(
2o),n),Ym(e).push(t))}return t}const zm=Tm.extend("sendMessageToParentHelper");function Fm(e,t,r,n,o){const i=zm,s=Om.parentWindow,a=function(e,t,r,n){const o=Lm.nextMessageId++,i=new Af;Lm.legacyMessageIdsToUuidMap[o]=i;const s=Jf.teamsJsInstanceId;return{id:o,uuid:i,func:t,timestamp:Date.now(),monotonicTimestamp:Ef(),args:r||[],apiVersionTag:e,isProxiedFromChild:null!=n,teamsJsInstanceId:s}}(e,t,r,n);return gm.storeCallbackInformation(a.uuid,{name:t,calledAt:a.timestamp}),i("Message %s information: %o",Bf(a),{actionName:t,args:r}),Mm(s,a)}const Um=Tm.extend("processIncomingMessage"),Bm=Tm.extend("processAuthBridgeMessage");function Hm(e,t){var r,n;const o=Bm;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:i}=e.data,[,s]=i??[],a=(()=>{try{return JSON.parse(s)}catch{return null}})();if(!a||"object"!=typeof a||"NestedAppAuthResponse"!==a.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const l=e.source||(null===(r=e?.originalEvent)||void 0===r?void 0:r.source),c=e.origin||(null===(n=e?.originalEvent)||void 0===n?void 0:n.origin);l?Vm(l,c).then(e=>{e?(Om.topWindow&&!Om.topWindow.closed&&l!==Om.topWindow||(Om.topWindow=l,Om.topOrigin=c),Om.topWindow&&Om.topWindow.closed&&(Om.topWindow=null,Om.topOrigin=null),jf(Om.topWindow,Om.topOrigin,Lm.topMessageQueue,"top"),t(s)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin")}).catch(e=>{o("Unexpected error verifying message origin: %o",e)}):o("Message being ignored by app because it is coming for a target that is null")}const jm=Tm.extend("verifyIncomingMessageOrigin");function Vm(e,t){return qg(this,0,void 0,function*(){if(Om.currentWindow&&e===Om.currentWindow)return jm("Should not process message because it is coming from the current window"),!1;if(Om.currentWindow&&Om.currentWindow.location&&t&&t===Om.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch{return jm("Message has an invalid origin of %s",t),!1}const r=yield function(e){const t=Sm()?Wf:_m;return Am(e,t)?Promise.resolve(!0):(km("Origin %s is not in the local valid origins list, fetching from CDN",e),Em(void 0).then(t=>Am(e,t)))}(e);return r||jm("Message has an invalid origin of %s",t),r}})}const Wm=Tm.extend("handleIncomingMessageFromParent");function Km(e,t){if(t){const r=[...e].find(([e,r])=>e.toString()===t.toString());if(r)return r[0]}}function qm(e,t){const r=Km(t,e.uuid);r&&t.delete(r),e.uuid?Lm.legacyMessageIdsToUuidMap={}:delete Lm.legacyMessageIdsToUuidMap[e.id]}function Gm(e){const t=Wm,r=Ef();if("id"in e.data&&"number"==typeof e.data.id){const n=e.data,o=Of(n),i=function(e){const t=Wm;if(!e.uuid)return Lm.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,r=Km(Lm.callbacks,t);if(r)return r;const n=Km(Lm.promiseCallbacks,t);if(n)return n;const o=Km(Lm.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Bf(e))}(o);if(i){const n=Lm.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),gm.handlePerformanceMetrics(i,o,t,r),n&&(t("Invoking the registered callback for message %s with arguments %o",i.toString(),o.args),n.apply(null,[...o.args,o.isPartialResponse]),!0===e.data.isPartialResponse||(t("Removing registered callback for message %s",i.toString()),qm(o,Lm.callbacks)));const s=Lm.promiseCallbacks.get(i);s&&(t("Invoking the registered promise callback for message %s with arguments %o",i.toString(),o.args),s(o.args),t("Removing registered promise callback for message %s",i.toString()),qm(o,Lm.promiseCallbacks));const a=Lm.portCallbacks.get(i);if(a){let r;t("Invoking the registered port callback for message %s with arguments %o",i.toString(),o.args),e.ports&&e.ports[0]instanceof MessagePort&&(r=e.ports[0]),a(r,o.args),t("Removing registered port callback for message %s",i.toString()),qm(o,Lm.portCallbacks)}o.uuid&&(Lm.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const n=e.data;gm.handleOneWayPerformanceMetrics(n,t,r),t('Received a message from parent %s, action: "%s"',Bf(n),n.func),function(e,t){const r=Fv.handlers[e];r?(Uv("Invoking the registered handler for message %s with arguments %o",e,t),r.apply(this,t)):Uv("Handler for action message %s not found.",e)}(n.func,n.args)}else t("Received an unknown message: %O",e)}function Zm(){return Om.topWindow!==Om.parentWindow}function Ym(e){return e===Om.topWindow&&Zm()?Lm.topMessageQueue:e===Om.parentWindow?Lm.parentMessageQueue:[]}const Jm=zf("internal"),Qm=Jm.extend("ensureInitializeCalled"),Xm=Jm.extend("ensureInitialized");function ev(){if(!Jf.initializeCalled)throw Qm(Gf),new Error(Gf)}function tv(e,...t){if(!Jf.initializeCompleted)throw Xm("%s. initializeCalled: %s",Gf,Jf.initializeCalled.toString()),new Error(Gf);if(t&&t.length>0){let e=!1;for(let r=0;r<t.length;r++)if(t[r]===Jf.frameContext){e=!0;break}if(!e){const e=`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Jf.frameContext}".`;throw Xm(e),new Error(e)}}return function(e){if(em(e))return!0;throw-1===e.apiVersion?new Error(Zf):new Error(Yf)}(e)}
2const rv=4,nv=256;let ov=class{constructor(e){this.idAsString=e,function(e){if(Cf(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(function(e){return[...e].some(e=>{const t=e.charCodeAt(0);return t<32||t>126})}(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}(e)}serialize(){return this.toString()}toString(){return this.idAsString}},iv=class extends ov{constructor(e){super(e),function(e){if(!function(e){return e.length<nv&&e.length>rv}(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${rv}-${nv}).`)}(e)}toJSON(){return{appIdAsString:this.toString()}}};function sv(e){return null==e}const av=Object.freeze(Object.defineProperty({__proto__:null,registerBeforeSuspendOrTerminateHandler:function(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");tv(tm),function(e){Fv.beforeSuspendOrTerminateHandler=e,!sv(e)&&Nm(Ff("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}(e)},registerOnResumeHandler:function(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");tv(tm),function(e){Fv.resumeHandler=e,!sv(e)&&Nm(Ff("v2","registerOnResumeHandler"),"registerHandler",["load"])}(e)}},Symbol.toStringTag,{value:"Module"})),lv="v2",cv=zf("app"),dv={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var uv,hv;function pv(){return Jf.initializeCompleted}function gv(e){return function(e,t){return kf()?(Nv.extend("initialize")("window object undefined at initialization"),Promise.resolve()):function(e,t,r){return new Promise((t,n)=>{const o=setTimeout(n,6e4,r);e().then(e=>{clearTimeout(o),t(e)}).catch(e=>{clearTimeout(o),n(e)})})}(()=>{return r=e,n=t,new Promise(e=>{Jf.initializeCalled||(Jf.initializeCalled=!0,Fv.initializeHandlers(),Jf.initializePromise=function(e,t){if(Lm.messageListener=e=>function(e){return qg(this,0,void 0,function*(){if(!e||!e.data||"object"!=typeof e.data)return void Um("Unrecognized message format received by app, message being ignored. Message: %o",e);const t=e.source||e.originalEvent&&e.originalEvent.source,r=e.origin||e.originalEvent&&e.originalEvent.origin;return Vm(t,r).then(n=>{var o,i;n?(o=t,i=r,Jf.isFramelessWindow||Om.parentWindow&&!Om.parentWindow.closed&&o!==Om.parentWindow||(Om.parentWindow=o,Om.parentOrigin=i),Om.parentWindow&&Om.parentWindow.closed&&(Om.parentWindow=null,Om.parentOrigin=null),jf(Om.parentWindow,Om.parentOrigin,Lm.parentMessageQueue,"parent"),t===Om.parentWindow&&Gm(e)):Um("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin, message: %o, source: %o, origin: %o",e,t,r)})})}(e),Om.currentWindow=Om.currentWindow||function(){if(kf())throw new Error("window object undefined at SSR check");return window}(),Om.parentWindow=Om.currentWindow.parent!==Om.currentWindow.self?Om.currentWindow.parent:Om.currentWindow.opener,Om.topWindow=Om.currentWindow.top,(Om.parentWindow||e)&&Om.currentWindow.addEventListener("message",Lm.messageListener,!1),!Om.parentWindow){const e=Om.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Jf.isFramelessWindow=!0,e.onNativeMessage=Gm}try{return Om.parentOrigin="*",$m(t,"initialize",[pm,Xf,e]).then(([e,t,r,n])=>(function(e,t,r){var n;const o=mm;if(Jf.isFramelessWindow)return void o("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void o("Cannot polyfill nestedAppAuthBridge as current window does not exist");if(t.parent!==t.top)return void o("Default NAA bridge injection not supported in nested iframe. Use standalone NAA bridge instead.");const i=(()=>{try{return JSON.parse(e)}catch{return null}})();if(!i||null===(n=i.supports)||void 0===n||!n.nestedAppAuth)return void o("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const s=t;if(s.nestedAppAuthBridge)return void o("nestedAppAuthBridge already exists on current window, skipping pol
2yfill");const a=function(e,t){const r=bm;if(!e)return r("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:n,sendPostMessage:o}=t,i=e=>t=>n(t,e);return{addEventListener:(t,n)=>{"message"===t?e.addEventListener(t,i(n)):r(`Event ${t} is not supported by nestedAppAuthBridge`)},postMessage:e=>{const t=(()=>{try{return JSON.parse(e)}catch{return null}})();if(!t||"object"!=typeof t||"NestedAppAuthRequest"!==t.messageType)return void r("Unrecognized data format received by app, message being ignored. Message: %o",e);const n=Ff(vm,"nestedAppAuth.execute");o(e,n)},removeEventListener:(t,r)=>{e.removeEventListener(t,i(r))}}}(s,r);a&&(s.nestedAppAuthBridge=a)}(n,Om.currentWindow,{onMessage:Hm,sendPostMessage:Pm}),{context:e,clientType:t,runtimeConfig:r,clientSupportedSDKVersion:n}))}finally{Om.parentOrigin=null}}(n,r).then(({context:e,clientType:t,runtimeConfig:r,clientSupportedSDKVersion:n=Vf})=>{Jf.frameContext=e,Jf.hostClientType=t,Jf.clientSupportedSDKVersion=n;try{Pv("Parsing %s",r);let e=JSON.parse(r);if(Pv("Checking if %o is a valid runtime object",e??"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");e=If(e),r&&hm(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{Pv("Attempting to parse %s as an SDK version",r),isNaN(wf(r,Vf))||(Jf.clientSupportedSDKVersion=r);let e=JSON.parse(n);if(Pv("givenRuntimeConfig parsed to %o",e??"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");e=If(e),hm(e)}catch(e){if(!(e instanceof SyntaxError))throw e;hm(dm(Jf.clientSupportedSDKVersion,rm,am))}}Jf.initializeCompleted=!0}),Bv(Ff(xv,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Sv,!1),Bv(Ff(xv,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Ev,!1),Bv(Ff(xv,"menus.registerSetModuleViewHandler"),"setModuleView",Cv,!1),Bv(Ff(Dv,"pages.config.registerSettingsSaveHandler"),"settings.save",Tv,!1),Bv(Ff(Dv,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Lv,!1),Bv(Ff(bv,"dialog.registerMessageForChildHandler"),"messageForChild",wv,!1)),Array.isArray(n)&&function(e){let t=Jf.additionalValidOrigins.concat(e.filter(e=>"string"==typeof e&&function(e){return xm.canUse(e)}(e)));const r={};t=t.filter(e=>!r[e]&&(r[e]=!0,!0)),Jf.additionalValidOrigins=t}(n),void 0!==Jf.initializePromise?e(Jf.initializePromise):Pv("GlobalVars.initializePromise is unexpectedly undefined")});var r,n},0,new Error("SDK initialization timed out."))}(Ff(lv,"app.initialize"),e)}function fv(){return new Promise(e=>{ev(),e(function(e,t,...r){return $m(e,"getContext",r).then(([e])=>e)}(Ff(lv,"app.getContext")))}).then(e=>{return{actionInfo:(t=e).actionInfo,app:{locale:t.locale,sessionId:t.appSessionId?t.appSessionId:"",theme:t.theme?t.theme:"default",iconPositionVertical:t.appIconPosition,osLocaleInfo:t.osLocaleInfo,messageId:t.messageId,parentMessageId:t.parentMessageId,userClickTime:t.userClickTime,userClickTimeV2:t.userClickTimeV2,userFileOpenPreference:t.userFileOpenPreference,host:{name:t.hostName?t.hostName:sf.teams,clientType:t.hostClientType?t.hostClientType:of.web,features:t.hostFeatures,sessionId:t.sessionId?t.sessionId:"",ringId:t.ringId,ancestors:t.hostAncestors},appLaunchId:t.appLaunchId,appId:t.appId?new iv(t.appId):void 0,manifestVersion:t.manifestVersion},page:{id:t.entityId,frameContext:t.frameContext?t.frameContext:Jf.frameContext,renderingSurface:t.renderingSurface?t.renderingSurface:void 0,subPageId:t.subEntityId,isFullScreen:t.isFullScreen,isMultiWindow:t.isMultiWindow,isBackgroundLoad:t.isBackgroundLoad,sourceOrigin:t.sourceOrigin},user:{id:null!==(r=t.userObjectId)&&void 0!==r?r:"",displayName:t.userDisplayName,isCallingAllowed:t.isCallingAllowed,isPSTNCallingAllowed:t.isPSTNCallingAllowed,licenseType:t.userLicenseType,loginHint:t.loginHint,userPrincipalName:t.userPrincipalName,tenant:t.tid?{id:t.tid,teamsSku:t.tenantSKU}:void 0},channel:t.channelId?{id:t.channelId,displayName:t.channelName,relativeUrl:t.channelRelativeUrl,membershipType:t.channelType,defaultOneNoteSectionId:t.defaultOneNoteSectionId,ownerGroupId:t.hostTeamGroupId,ownerTenantId:t.hostTeamTenantId}:void 0,chat:t.chatId?{id:t.chatId}:void 0,meeting:t.meetingId?{id:t.meetingId}
2:void 0,sharepoint:t.sharepoint,team:t.teamId?{internalId:t.teamId,displayName:t.teamName,type:t.teamType,groupId:t.groupId,templateId:t.teamTemplateId,isArchived:t.isTeamArchived,userRole:t.userTeamRole}:void 0,sharePointSite:t.teamSiteUrl||t.teamSiteDomain||t.teamSitePath||t.mySitePath||t.mySiteDomain?{teamSiteUrl:t.teamSiteUrl,teamSiteDomain:t.teamSiteDomain,teamSitePath:t.teamSitePath,teamSiteId:t.teamSiteId,mySitePath:t.mySitePath,mySiteDomain:t.mySiteDomain}:void 0,dialogParameters:t.dialogParameters||{}};var t,r})}function mv(e){return function(e,t){return new Promise(r=>{tv(tm,af.content,af.sidePanel,af.settings,af.task,af.stage,af.meetingStage),r(function(e,t,...r){return $m(e,"executeDeepLink",r).then(([e,t])=>{if(!e)throw new Error(t)})}(e,0,t))})}(Ff(lv,"app.openLink"),e)}(function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"})(uv||(uv={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(hv||(hv={})),cv("teamsjs instance is version %s, starting at %s UTC (%s local)",pm,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(kf())return;const e=document.getElementsByTagName("script"),t=e&&e[e.length-1]&&e[e.length-1].src,r="Today, teamsjs can only be used from a single script or you may see undefined behavior. This log line is used to help detect cases where teamsjs is loaded multiple times -- it is always written. The presence of the log itself does not indicate a multi-load situation, but multiples of these log lines will. If you would like to use teamjs from more than one script at the same time, please open an issue at https://github.com/OfficeDev/microsoft-teams-library-js/issues";t&&0!==t.length?cv("teamsjs is being used from %s. %s",t,r):cv("teamsjs is being used from a script tag embedded directly in your html. %s",r)}();const vv=Object.freeze(Object.defineProperty({__proto__:null,get ExpectedFailureReason(){return hv},get FailedReason(){return uv},Messages:dv,_initialize:function(e){Om.currentWindow=e},_uninitialize:function(){Jf.initializeCalled&&(Fv.uninitializeHandlers(),Jf.initializeCalled=!1,Jf.initializeCompleted=!1,Jf.initializePromise=void 0,Jf.additionalValidOrigins=[],Jf.frameContext=void 0,Jf.hostClientType=void 0,Jf.isFramelessWindow=!1,Om.currentWindow&&Om.currentWindow.removeEventListener("message",Lm.messageListener,!1),Om.currentWindow=null,Om.parentWindow=null,Om.parentOrigin=null,Lm.parentMessageQueue=[],Lm.nextMessageId=0,Lm.callbacks.clear(),Lm.promiseCallbacks.clear(),Lm.portCallbacks.clear(),Lm.legacyMessageIdsToUuidMap={},gm.clearMessages())},getContext:fv,getFrameContext:function(){return Jf.frameContext},getImmediateParentOrigin:function(){var e,t;if(kf())return null;const r=null!==(e=Om.currentWindow)&&void 0!==e?e:window;if(r.parent===r)return null;const n=r.location.ancestorOrigins,o=n?.item(0);if(o)return o;const i=null===(t=r.document)||void 0===t?void 0:t.referrer;if(!i)return null;try{const e=new URL(i).origin;return e===r.location.origin?null:e}catch{return null}},initialize:gv,isInitialized:pv,lifecycle:av,notifyAppLoaded:function(){ev(),function(e){Nm(e,dv.AppLoaded,[pm])}(Ff(lv,"app.notifyAppLoaded"))},notifyExpectedFailure:function(e){ev(),function(e,t){Nm(e,dv.ExpectedFailure,[t.reason,t.message])}(Ff(lv,"app.notifyExpectedFailure"),e)},notifyFailure:function(e){ev(),function(e,t){Nm(e,dv.Failure,[t.reason,t.message,t.authHeader])}(Ff(lv,"app.notifyFailure"),e)},notifySuccess:function(){return function(e){return qg(this,0,void 0,function*(){if(Jf.initializeCompleted)return Rv(e);if(!Jf.initializePromise)throw new Error(Gf);return Jf.initializePromise.then(()=>Rv(e))})}(Ff(lv,"app.notifySuccess"))},openLink:mv,registerHostToAppPerformanceMetricsHandler:function(e){!function(e){Fv.hostToAppPerformanceMetricsHandler=e}(e)},registerOnContextChangeHandler:function(e){!function(e,t){!sv(t)&&ev(),function(e,t){Fv.contextChangeHandler=t,!sv(t)&&Nm(e,"registerHandler",["contextChange"])}(e,t)}(Ff(lv,"app.registerOnContextChangeHandler"),e)},registerOnThemeChangeHandler:function(e){!function(e,t){!sv(t)&&ev(),function(e,t){Fv.themeChangeHandler=t,!sv(t)&&Nm(e,"registerHandler",["themeChange"])}(e,t)}(Ff(lv,"app.registerOnThemeChangeHandler"),e)}},Symbol.toStringTag,{value:"Module"})),bv="v2",yv=[];function wv(e){Jf.frameContext&&(Jf.frameContext===af.task?yv.push(e):delete Fv.handlers.messageForChild)}const xv="v2";var _v,kv;function Cv(e){tv(tm),Nm(Ff(xv,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e])}function Sv(e){tv(tm),Nm(Ff(xv,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e])}function Ev(e){tv(tm),Nm(Ff(xv,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e])}!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(_v||(_v={})),function(e){e.dropDown="dropDown",e.popOver="popOver"}(kv||(kv={}));let Iv=class{},Av=class extends Iv{validate(e){return!0}deserialize(e){return e}};function Tv(e){new Ov(e).notifySuccess()}let Ov=class{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Nm(Ff(Dv,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Nm(Ff(Dv,"pages.saveEvent.notifyFailure"),"settings.save.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")}};function Lv(){(new $v).notifySuccess()}let $v=class{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Nm(Ff(Dv,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Nm(Ff(Dv,"pages.removeEvent.notifyFailure"),"settings.remove.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The removeEventType may only notify success or failure once.")}};const Nv=zf("app");function Rv(e){return qg(this,0,void 0,function*(){return tv(tm)&&null!==(t=tm.supports.app)&&void 0!==t&&t.notifySuccessResponse?function(e,t,r,n){var o;return qg(this,0,void 0,function*(){const i=function(e){return e.map(e=>function(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}(e)?e.serialize():e)}(t),[s]=yield $m(n,e,i);if(function(e){return void 0!==e?.errorCode}(s))throw new Error(`${s.errorCode}, message: ${null!==(o=s.message)&&void 0!==o?o:"None"}`);if(r.validate(s))return r.deserialize(s);throw new Error(`${Jg.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)})}(dv.Success,[pm],new Av,e).then(()=>({hasFinishedSuccessfully:!0})):(Nm(e,dv.Success,[pm]),{hasFinishedSuccessfully:"unknown"});var t})}const Pv=Nv.extend("initializeHelper");const Dv="v2";function Mv(){!function(e){new Promise(t=>{if(tv(tm),!(tv(tm)&&tm.supports.pages&&tm.supports.pages.backStack))throw pf;t(function(e,t,r){return $m(e,"navigateBack",[]).then(([e,t])=>
2{if(!e)throw new Error(t||r)})}(e,0,"Back navigation is not supported in the current client or context."))})}(Ff(Dv,"pages.backStack.navigateBack"))}const zv=zf("handlers");let Fv=class e{static initializeHandlers(){e.handlers.themeChange=Hv,e.handlers.contextChange=jv,e.handlers.load=Wv,e.handlers.beforeUnload=Kv,Bv(Ff("v2","pages.backStack.registerBackButtonPressHandler"),"backButtonPress",Mv,!1)}static uninitializeHandlers(){e.handlers={},e.themeChangeHandler=null,e.beforeUnloadHandler=null,e.beforeSuspendOrTerminateHandler=null,e.resumeHandler=null,e.contextChangeHandler=null}};Fv.handlers={},Fv.themeChangeHandler=null,Fv.loadHandler=null,Fv.beforeUnloadHandler=null,Fv.beforeSuspendOrTerminateHandler=null,Fv.resumeHandler=null,Fv.hostToAppPerformanceMetricsHandler=null,Fv.contextChangeHandler=null;const Uv=zv.extend("callHandler");function Bv(e,t,r,n=!0,o=[]){r?(Fv.handlers[t]=r,n&&Nm(e,"registerHandler",[t,...o])):delete Fv.handlers[t]}function Hv(e){Fv.themeChangeHandler&&Fv.themeChangeHandler(e)}function jv(e){Fv.contextChangeHandler&&Fv.contextChangeHandler(e)}function Vv(e){Fv.hostToAppPerformanceMetricsHandler&&Fv.hostToAppPerformanceMetricsHandler(e)}function Wv(e){const t={entityId:(r=e).entityId,contentUrl:new URL(r.contentUrl)};var r;Fv.resumeHandler?Fv.resumeHandler(t):Fv.loadHandler&&Fv.loadHandler(e)}function Kv(){return qg(this,0,void 0,function*(){const e=()=>{Nm(Ff("v2","handleBeforeUnload"),"readyToUnload",[])};Fv.beforeSuspendOrTerminateHandler?(yield Fv.beforeSuspendOrTerminateHandler(),e()):Fv.beforeUnloadHandler&&Fv.beforeUnloadHandler(e)||e()})}zf("childProxyingCommunication").extend("handleIncomingMessageFromChild");const qv="v2";let Gv;function Zv(e,t){tv(tm,af.authentication),Nm(Ff(qv,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),function(e){let t;t=Om.currentWindow.setInterval(()=>{0===Ym(e).length&&(clearInterval(t),setTimeout(()=>Om.currentWindow.close(),200))},100)}(Om.parentWindow)}var Yv;!function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(Yv||(Yv={}));const Jv=Object.freeze(Object.defineProperty({__proto__:null,get ActionObjectType(){return Zg},AppId:iv,get ChannelType(){return hf},get DialogDimension(){return uf},get EduType(){return rf},get ErrorCode(){return Jg},get FileOpenPreference(){return Gg},get FrameContexts(){return af},get HostClientType(){return of},get HostName(){return sf},get RenderingSurfaces(){return lf},get SecondaryM365ContentIdName(){return Yg},get TaskModuleDimension(){return uf},get TeamType(){return cf},UUID:Af,get UserTeamRole(){return df},ValidatedSafeString:ov,app:vv,version:pm},Symbol.toStringTag,{value:"Module"})),Qv=()=>"false"!==_n(Kn.teamsUsePlugin);var Xv=(e=>(e.PostLogout="post-logout",e.AuthLogout="auth-logout",e.RequestAuthToken="request-auth-token",e.AuthToken="auth-token",e))(Xv||{});class eb extends Dg{constructor(){if(super(),Qv()){this.addListeners();const e=e=>{if(e&&wi()){const e=bs()??Wg()??wa;Uc(e)}};e(Th().available),Th().addConnectionCallback(t=>e(t.connectionStatus===v.connected))}}async getAuthenticateParameters(){const e=(await fv()).app.host.clientType,{authUrl:t,authClientId:r}=Wn(),n=await this.getCodeChallenge();return{url:cn()+Ia+`?oauthRedirectMethod={oauthRedirectMethod}&authId={authId}&hostRedirectUrl={hostRedirectUrl}&authClientId=${encodeURIComponent(r)}&authUrl=${encodeURIComponent(t)}&codeChallenge=${encodeURIComponent(n)}`,isExternal:"web"===e}}async launchAuthenticationFromMsTeamInExternalWindow(){if(pv()){const e=await this.getAuthenticateParameters(),t=this.setLocalStorageEncodedNonce();(function(e){const t=void 0!==e,r=t?e:Gv;if(!r)throw new Error("No parameters are provided for authentication");return tv(tm,af.content,af.sidePanel,af.settings,af.remove,af.task,af.stage,af.meetingStage),function(e,t){return qg(this,0,void 0,function*(){const r=function(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}(t.url);return function(e){const t=e.toString().toLocaleLowerCase();if(Cf(t))throw new Error("Invalid Url");if(t.length>2048)throw new Error("Url exceeds the maximum size of 2048 characters");if(!_f(e))throw new Error("Url should be a valid https url")}(r),$m(e,"authentication.authenticate",[r.href,t.width,t.height,t.isExternal]).then(([e,t])=>
2{if(e)return t;throw new Error(t)})})}(r.successCallback||r.failureCallback?Ff("v1","authentication.authenticate"):Ff(qv,"authentication.authenticate"),r).then(e=>{try{return r&&r.successCallback?(r.successCallback(e),""):e}finally{t||(Gv=void 0)}}).catch(e=>{try{if(r&&r.failureCallback)return r.failureCallback(e.message),"";throw e}finally{t||(Gv=void 0)}})})(e).then(e=>{yn(Wn().authRedirectUrl+`?code=${e}&state=${encodeURIComponent(JSON.stringify({nonce:t,inflightRequest:cn(),redirectUri:cn()+Aa}))}`)}).catch(e=>{eo().error("Authentication for ms-teams without plugin failed: "+e)})}else eo().error("try to authentication without plugin outside of ms teams application")}requestTokenInMsTeams(){const e=new URLSearchParams(hn());return this.getAuthClientInstance().requestPKCEToken({code_verifier:sessionStorage.getItem(hs)??"",code:e.get("code")??"",redirect_url:Xx()})}shouldNavigateToLandingPage(){return Qv()&&Th().supportsCompanion&&!Th().available&&this.isAuthenticationRequired()}addListeners(){const e=()=>{this.doPostLogout()};Th().addCallback(Xv.PostLogout,e),no(()=>{Th().removeCallback(Xv.PostLogout,e)})}doPostLogout(){eo().info("AuthIntegration: doPostLogout removing tokens via external interface callback"),this.removeTokens(),this.navigateToLandingPage()}async logout(){Qv()&&Th().send({type:Xv.AuthLogout,payload:{}}),Cn(Kn.teamsUsePlugin),super.logout()}async login(){Qv()?Th().send({type:Xv.RequestAuthToken,payload:{}}):this.launchAuthenticationFromMsTeamInExternalWindow()}async authProcess(){this.navigateToLandingPage()}requestToken(){return Qv()?super.requestToken():this.requestTokenInMsTeams()}}class tb extends Pg{constructor(){super(),this.addListeners()}addListeners(){const e=()=>{eo().info("logout: auth-logout received from companion external interface"),this.logout()};Th().addCallback("auth-logout",e),no(()=>{Th().removeCallback("auth-logout",e)})}async logout(){return super.logout().then(()=>{Th().send({type:"post-logout",payload:{}}),this.navigateToLandingPage()})}async completeAuthProcess(e){const t=await super.completeAuthProcess(e);return Th().send({type:Xv.AuthToken,payload:t}),t}}const rb="popup-auth-complete",nb="[AuthWebPopup]",ob="AUTH-POPUP-15b18627-96cc-4165-937c-bc1568094b00";class ib extends Dg{constructor(){super(),this.completeAuthPromise=null,this.authPopupWindow=null,this.addListeners(),this.checkIfPopupShouldLogin()}async checkIfPopupShouldLogin(){if(!xi()){if(this.isRedirectedAuthPage())try{return void await this.auth()}catch(e){eo().error(`${nb} Error during auth in popup`,e)}oo(window)||super.login()}}addListeners(){const e=e=>{e.data?.type!==rb||!e.data?.token||this.isTrustedAuthMessage(e)&&this.handleAuthTokenReceived(e.data.token)};window.addEventListener("message",e),no(()=>{window.removeEventListener("message",e)})}isTrustedAuthMessage(e){return e.origin!==cn()?(eo().warn(`${nb} Ignoring auth message from untrusted origin: ${e.origin}`),!1):!this.authPopupWindow||e.source===this.authPopupWindow||(eo().warn(`${nb} Ignoring auth message from unexpected source window`),!1)}handleAuthTokenReceived(e){try{this.initializeToken(e);const t=bs()??wa;yn(t)}catch(e){throw eo().error(`${nb} Error handling received token`,e),e}}async login(){const e=cn()+wa;this.openPopup(e)}async loginOnce(){eo().info("AuthWebPopup: loginOnce removing tokens and redirecting"),this.removeTokens(),yn(wa)}async logout(){eo().info("AuthWebPopup: logout flow started."),id(),this.removeTokens();const e=this.buildLogoutUrl();this.openPopup(e),yn(wa)}buildLogoutUrl(){const{authUrl:e,authClientId:t,logoutRedirectUrl:r}=Wn();return`${e}/oauth/logout?${new URLSearchParams({client_id:t,redirect_uri:r})}`}openPopup(e){const t=this.calculatePopupOptions(),r=`rel=noreferrer,height=${t.height},width=${t.width},left=${t.left},top=${t.top}`;this.authPopupWindow=window.open(e,ob,r)}calculatePopupOptions(){const e=Math.round(window.screenX+(window.outerWidth-700)/2),t=Math.round(window.screenY+(window.outerHeight-800)/2);return{width:"700",height:"800",left:e.toString(),top:t.toString()}}async completeAuthProcess(e){return this.completeAuthPromise||(this.completeAuthPromise=this.executeAuthProcess(e).finally(()=>{this.completeAuthPromise=null})),this.completeAuthPromise}async executeAuthProcess(e){try{const t=await super.completeAuthProcess(e);return this.isAuthPopupWindow()&&(this.sendAuthCompleteToOpener(t),window.close()),t}catch(e){throw eo().error(`${nb} Error in completeAuthProcess`,e),e}}isAuthPopupWindow(){return window.name===ob}sendAuthCompleteToOpener(e){try{window.opener.postMessage({type:rb,token:e},cn())}catch(e){throw eo().error(`${nb} Failed to send auth complete message`,e),e}}}const sb=(e,t,r)=>new Promise((n,o)=>{const i=Vt(),s=i.top;let a=null;if(!s)return void o(new Error(`window.top is not available; cannot obtain ${e}.`));const l=()=>{null!==a&&(clearTimeout(a),a=null),i.removeEventListener("message",c)},c=e=>{e.source!==s||e.data?.type!==t||(l(),n(r(e.data)))};i.addEventListener("message",c),a=setTimeout(()=>{l(),o(new Error(`Timed out waiting for ${e} response from host.`))},5e3);const d={type:e};s.postMessage(d,"*")}),ab=Wc(()=>sb("RequestExtensionFlagsFromGoToBrowserExtension","ResponseExtensionFlagsFromGoToBrowserExtension",e=>e.flags)),lb=async()=>oo()?Xc()===Kc.SIDE_PANEL?(await ab()).backedByDesktopApp?qc.DESKTOP_APP:qc.POPUP:qc.DEFAULT:await l().integration.flags().authenticationMode(),cb=async()=>oo()?Xc()===Kc.SIDE_PANEL&&(await ab()).backedByDesktopApp?Gc.DESKTOP_APP:Gc.DEFAULT:await l().integration.flags().voiceCallsMode();var db;!function(e){e.Available="available",e.Away="away",e.Busy="busy",e.Disconnected="disconnected",e.DoNotDisturb="dnd",e.Initial="initial",e.Offline="offline"}(db||(db={}));const ub={config:{name:"Badge",platforms:["web"]},setBadgeCount:e=>navigator.setAppBadge?.(e),setBadgeStatus:()=>{}};var hb,pb,gb,fb,mb,vb,bb,yb;!function(e){e.PermissionDeniedMac="Cannot update: mac permission denied",e.CheckFailed="Check for updates failed",e.AnotherCheckInProgress="Another check for updates is currently in progress",e.UpdatesAreDisabled="Updates are disabled"}(hb||(hb={})),function(e){e.iAmInContainer="I am in container",e.iAmOutside="I am outside"}(pb||(pb={})),function(e){e.confirmed="confirmed",e.newNetworkClientVersion="new_network_client_version"}(gb||(gb={})),function(e){e.disconnected="disconnected",e.connecting="connecting",e.connected="connected"}(fb||(fb={})),function(e){e.attribution="attribution"}(mb||(mb={})),function(e){e.appLogoOverride="appLogoOverride",e.hero="hero"}(vb||(vb={})),function(e){e.circle="circle"}(bb||(bb={})),function(e){e.reminder="reminder",e.alarm="alarm",e.incomingCall="incomingCall"}(yb||(yb={}));const wb={nativeContainer:()=>globalThis[Ew],connectionPort(e){try{const t=new URL(e.url);return parseInt(t.port)}catch{return Number.NaN}}},xb=console,_b={config:{name:"Logger",platforms:["web"]},createLogger:()=>xb,debug:xb.debug,log:xb.log,info:xb.info,warn:xb.warn,error:xb.error},kb=_b.createLogger("DesktopCompanion"),Cb=e=>{let t="";for(let r=e.length-1;r>=0;--r)t+=e[r];return t},Sb=new class{constructor(){this._clientLocalVersion="0.0.2",this._clientNetworkVersion=this._clientLocalVersion}getEncodingFunc(){switch(this._clientNetworkVersion){case"0.0.1":return e=>Cb(btoa(e)).replace(/=/g,"");case"0.0.2":return e=>Cb(btoa(encodeURIComponent(e))).replace(/=/g,"");default:return e=>e}}getDecodingFunc(){switch(this._clientNetworkVersion){case"0.0.1":return e=>atob(Cb(e));case"0.0.2":return e=>decodeURIComponent(atob(Cb(e)));default:return e=>e}}getEncodedMessage(e){try{return{success:!0,message:this.getEncodingFunc()(e)}}catch{return kb.error("Cannot encode a message, ignoring"),{success:!1,message:e}}}getDecodedMessage(e){try{return{success:!0,message:this.getDecodingFunc()(e)}}catch{return kb.error("Cannot decode a message, ignoring"),{success:!1,message:e}}}getClientNetworkVersion(){return this._clientNetworkVersion}getClientLocalVersion(){return this._clientLocalVersion}setClientNetworkVersion(e){this._clientNetworkVersion=e}},Eb=_b.createLogger("DesktopCompanionHandshake"),Ib=new class{async newConfirmedConnectionWithConfig(e){const t=e.ports.map(e=>this._newConfirmedConnectionToPort(e));try{return await Promise.any(t)}catch{throw new Error("Failed to establish connection")}}async _newConfirmedConnectionToPort(e){const t=await this._newConnectionToPort(e);return await this._confirmConnection(t),t}_newConnectionToPort(e){return new Promise((t,r)=>{const n=new WebSocket(`ws://127.0.0.1:${e}`),o=()=>{s(),t(n)},i=()=>{s(),n.close(),r()},s=()=>{n.removeEventListener("open",o),n.removeEventListener("error",i)};n.addEventListener("open",o),n.addEventListener("error",i)})}_confirmConnection(e){return new Promise((t,r)=>{const n=()=>{o(),e.close(),r()},o=()=>{clearTimeout(i),e.removeEventListener("message",s),e.removeEventListener("close",a),e.removeEventListener("error",l)},i=setTimeout(()=>{const t=wb.connectionPort(e);Eb.error(`Connected to port ${t} but server did not respond on time`),n()},2e3),s=r=>{const i=wb.connectionPort(e);if("string"==typeof r.data)try{const e=JSON.parse(r.data);e.message===gb.confirmed?(Sb.setClientNetworkVersion(e.clientVersion),o(),t()):(Eb.error(`Connected to port ${i} but received unexpected response from server`),n())}catch(e){Eb.error(`Connected to port ${i} but received error trying to parse the data: ${JSON.stringify(e)}`),n()}else Eb.error(`Connected to port ${i} but received a data with a type different than a string: ${typeof r.data}`),n()},a=t=>{const r=wb.connectionPort(e);Eb.error(`Connected to port ${r} but connection closed before server response`),n()},l=t=>{const r=wb.connectionPort(e);Eb.error(`Connected to port ${r} but connection error before server response`),n()};e.addEventListener("message",s,{once:!0}),e.addEventListener("close",a,{once:!0}),e.addEventListener("error",l,{once:!0});const c={message:wb.nativeContainer()?pb.iAmInContainer:pb.iAmOutside,clientVersion:Sb.getClientLocalVersion()};e.send(JSON.stringify(c))})}},Ab=_b.createLogger("DesktopCompanion"),Tb=()=>wb.nativeContainer()?.plugins.DesktopCompanionServer;
2class Ob extends Event{constructor(e){super("connectionStatusChanged"),this.connectionStatus=e}}const Lb=e=>`message-${e}`;class $b extends Event{constructor(e){super(Lb(e.type)),this.message=e}}class Nb{constructor(){this.config={name:"DesktopCompanion",platforms:["web"]},this._eventTarget=new EventTarget,this._connectionStatus=fb.disconnected,this._ws=void 0,this._currentConfig=void 0,this._tryConnectTimerId=void 0}_setConnectionStatus(e){this._connectionStatus!==e&&(this._connectionStatus=e,Ab.log(`Connection status changed: ${e}`),this._eventTarget.dispatchEvent(new Ob(e)))}_connectedWithCompatibleConfig(e){if(!this._ws)return!1;const t=wb.connectionPort(this._ws);return e.ports.includes(t)}_closeConnection(){this._tryConnectTimerId&&(clearTimeout(this._tryConnectTimerId),this._tryConnectTimerId=void 0),this._currentConfig=void 0,this._ws?.close(),this._ws=void 0,this._setConnectionStatus(fb.disconnected)}async _tryConnectTimerHandler(){if(this._currentConfig)try{if(this._ws=await Ib.newConfirmedConnectionWithConfig(this._currentConfig),Ab.log(`Connected to port ${wb.connectionPort(this._ws)}`),this._tryConnectTimerId=void 0,!this._currentConfig)return void this._closeConnection();this._ws.addEventListener("close",()=>this._closeHandler()),this._ws.addEventListener("message",e=>this._messageHandler(e)),this._setConnectionStatus(fb.connected)}catch{this._tryConnectTimerId=setTimeout(this._tryConnectTimerHandler.bind(this),1e3)}}_closeHandler(){this._ws=void 0,this._currentConfig?.autoReconnect?(Ab.log("Connection closed but reconnecting due to autoReconnect being enabled"),this._setConnectionStatus(fb.connecting),this._tryConnectTimerHandler()):this._setConnectionStatus(fb.disconnected)}static _isDesktopCompanionMessage(e){return e&&"object"==typeof e&&"string"==typeof e.type&&"object"==typeof e.payload}static _isDesktopCompanionHandshakeMessage(e){return e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.clientVersion}_messageHandler(e){const t=e.data;if("string"==typeof t)try{const e=Sb.getDecodedMessage(t.toString());if(e.success){const t=JSON.parse(e.message);if(Nb._isDesktopCompanionMessage(t))return void this._eventTarget.dispatchEvent(new $b(t));Ab.error("Failed to parse a decoded message as DesktopCompanionMessage, ignoring")}const r=JSON.parse(t.toString());Nb._isDesktopCompanionHandshakeMessage(r)?r.message===gb.newNetworkClientVersion&&Sb.setClientNetworkVersion(r.clientVersion):Ab.error("Failed to parse a message as DesktopCompanionHandshakeMessage, ignoring")}catch(e){Ab.error("Failed to parse message, ignoring, error: "+JSON.stringify(e))}else Ab.error(`Received message with non-string type (${typeof t}), ignoring`)}get connectionStatus(){return this._connectionStatus}startConnecting(e){this._connectedWithCompatibleConfig(e)?Ab.log("Already connected with compatible config"):(this._closeConnection(),this._currentConfig=e,Ab.log("Starting connecting",this._currentConfig),this._setConnectionStatus(fb.connecting),Tb()?.startListening(e),this._tryConnectTimerHandler())}disconnect(){Tb()?.stop(),this._closeConnection()}send(e){if(this._ws&&this._ws.readyState===WebSocket.OPEN)try{const t=Sb.getEncodedMessage(JSON.stringify(e));t.success?this._ws.send(t.message):Ab.error("We cannot send a message because the encoding is failing, ignoring")}catch(e){const t="We cannot send this message because the JSON.stringify is failing, ignoring, error: "+JSON.stringify(e);throw Ab.error(t),new Error(t)}}addEventListener(e,t,r){this._eventTarget.addEventListener(e,t,r)}addMessageEventListener(e,t,r){this._eventTarget.addEventListener(Lb(e),t,r)}removeEventListener(e,t,r){this._eventTarget.removeEventListener(e,t,r)}removeMessageEventListener(e,t,r){this._eventTarget.removeEventListener(Lb(e),t,r)}}const Rb=new Nb;var Pb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof r.g<"u"?r.g:typeof self<"u"?self:{};function Db(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Mb(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var zb,Fb={exports:{}},Ub=(zb||(zb=1,function(e){e.exports=function e(t,r,n){function o(s,a){if(!r[s]){if(!t[s]){if(!a&&Mb)return Mb(s);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){return o(t[s][1][e]||e)},c,c.exports,e,t,r,n)}return r[s].exports}for(var i=Mb,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,t,r){var n=e("./utils"),o=e("./support"),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
vendor: 5,998 bytes, line 2
2+/=";r.encode=function(e){for(var t,r,o,s,a,l,c,d=[],u=0,h=e.length,p=h,g="string"!==n.getTypeOf(e);u<e.length;)p=h-u,o=g?(t=e[u++],r=u<h?e[u++]:0,u<h?e[u++]:0):(t=e.charCodeAt(u++),r=u<h?e.charCodeAt(u++):0,u<h?e.charCodeAt(u++):0),s=t>>2,a=(3&t)<<4|r>>4,l=1<p?(15&r)<<2|o>>6:64,c=2<p?63&o:64,d.push(i.charAt(s)+i.charAt(a)+i.charAt(l)+i.charAt(c));return d.join("")},r.decode=function(e){var t,r,n,s,a,l,c=0,d=0,u="data:";if(e.substr(0,5)===u)throw new Error("Invalid base64 input, it looks like a data url.");var h,p=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===i.charAt(64)&&p--,e.charAt(e.length-2)===i.charAt(64)&&p--,p%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=o.uint8array?new Uint8Array(0|p):new Array(0|p);c<e.length;)t=i.indexOf(e.charAt(c++))<<2|(s=i.indexOf(e.charAt(c++)))>>4,r=(15&s)<<4|(a=i.indexOf(e.charAt(c++)))>>2,n=(3&a)<<6|(l=i.indexOf(e.charAt(c++))),h[d++]=t,64!==a&&(h[d++]=r),64!==l&&(h[d++]=n);return h}},{"./support":30,"./utils":32}],2:[function(e,t,r){var n=e("./external"),o=e("./stream/DataWorker"),i=e("./stream/Crc32Probe"),s=e("./stream/DataLengthProbe");function a(e,t,r,n,o){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=o}a.prototype={getContentWorker:function(){var e=new o(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new o(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(e,t,r){return e.pipe(new i).pipe(new s("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new s("compressedSize")).withStreamInfo("compression",t)},t.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){var n=e("./utils"),o=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r){var n=o,i=0+r;e^=-1;for(var s=0;s<i;s++)e=e>>>8^n[255&(e^t[s])];return-1^e}(0|t,e,e.length):function(e,t,r){var n=o,i=0+r;e^=-1;for(var s=0;s<i;s++)e=e>>>8^n[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){var n;n=typeof Promise<"u"?Promise:e("lie"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,r){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=e("pako"),i=e("./utils"),s=e("./stream/GenericWorker"),a=n?"uint8array":"array";function l(e,t){s.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",i.inherits(l,s),l.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(i.transformTo(a,e.data),!1)},l.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},r.compressWorker=function(e){return new l("Deflate",e)},r.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){function n(e,t){var r,n="";for(r=0;r<t;r++)n+=String.fromCharCode(255&e),e>>>=8;return n}function o(e,t,r,o,s,d){var u,h,p=e.file,g=e.compression,f=d!==a.utf8encode,m=i.transformTo("string",d(p.name)),v=i.transformTo("string",a.utf8encode(p.name)),b=p.comment,y=i.transformTo("string",d(b)),w=i.transformTo("string",a.utf8encode(b)),x=v.length!==p.name.length,_=w.length!==b.length,k="",C="",S="",E=p.dir,I=p.date,A={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(A.crc32=e.crc32,A.compressedSize=e.compressedSize,A.uncompressedSize=e.uncompressedSize);var T=0;t&&(T|=8),f||!x&&!_||(T|=2048);var O,L,$=0,N=0;E&&($|=16),"UNIX"===s?(N=798,$|=(L=O=p.unixPermissions,O||(L=E?16893:33204),(65535&L)<<16)):(N=20,$|=function(e){return 63&(e||0)}(p.dosPermissions)),u=I.getUTCHours(),u<<=6,u|=I.getUTCMinutes(),u<<=5,u|=I.getUTCSeconds()/2,h=I.getUTCFullYear()-1980,h<<=4,h|=I.getUTCMonth()+1,h<<=5,h|=I.getUTCDate(),x&&(C=n(1,1)+n(l(m),4)+v,k+="up"+n(C.length,2)+C),_&&(S=n(1,1)+n(l(y),4)+w,k+="uc"+n(S.length,2)+S);var R="";return R+="\n\0",R+=n(T,2),R+=g.magic,R+=n(u,2),R+=n(h,2),R+=n(A.crc32,4),R+=n(A.compressedSize,4),R+=n(A.uncompressedSize,4),R+=n(m.length,2),R+=n(k.length,2),{fileRecord:c.LOCAL_FILE_HEADER+R+m+k,dirRecord:c.CENTRAL_FILE_HEADER+n(N,2)+R+n(y.length,2)+"\0\0\0\0"+n($,4)+n(o,4)+m+k+y}}var i=e("../utils"),s=e("../stream/GenericWorker"),a=e("../utf8"),l=e("../crc32"),c=e("../signature");function d(e,t,r,n){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}i.inherits(d,s),d.prototype.push=function(e){var t=e.meta.percent||0,r
vendor: 4,499 bytes, line 2
2=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,s.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},d.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=o(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d.prototype.closedSource=function(e){this.accumulate=!1;var t,r=this.streamFiles&&!e.file.dir,i=o(e,r,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(i.dirRecord),r)this.push({data:(t=e,c.DATA_DESCRIPTOR+n(t.crc32,4)+n(t.compressedSize,4)+n(t.uncompressedSize,4)),meta:{percent:100}});else for(this.push({data:i.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},d.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r,o,s,a,l,d,u=this.bytesWritten-e,h=(r=this.dirRecords.length,o=u,s=e,a=this.zipComment,l=this.encodeFileName,d=i.transformTo("string",l(a)),c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(r,2)+n(r,2)+n(o,4)+n(s,4)+n(d.length,2)+d);this.push({data:h,meta:{percent:100}})},d.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},d.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(e){t.error(e)}),this},d.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},d.prototype.error=function(e){var t=this._sources;if(!s.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch{}return!0},d.prototype.lock=function(){s.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=d},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){var n=e("../compressions"),o=e("./ZipFileWorker");r.generateWorker=function(e,t,r){var i=new o(t.streamFiles,r,t.platform,t.encodeFileName),s=0;try{e.forEach(function(e,r){s++;var o=function(e,t){var r=e||t,o=n[r];if(!o)throw new Error(r+" is not a valid compression method !");return o}(r.options.compression,t.compression),a=r.options.compressionOptions||t.compressionOptions||{},l=r.dir,c=r.date;r._compressWorker(o,a).withStreamInfo("file",{name:e,dir:l,date:c,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(i)}),i.entriesCount=s}catch(e){i.error(e)}return i}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new n;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(n.prototype=e("./object")).loadAsync=e("./load"),n.support=e("./support"),n.defaults=e("./defaults"),n.version="3.10.1",n.loadAsync=function(e,t){return(new n).loadAsync(e,t)},n.external=e("./external"),t.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,r){var n=e("./utils"),o=e("./external"),i=e("./utf8"),s=e("./zipEntries"),a=e("./stream/Crc32Probe"),l=e("./nodejsUtils");function c(e){return new o.Promise(function(t,r){var n=e.decompressed.getContentWorker().pipe(new a);n.on("error",function(e){r(e)}).on("end",function(){n.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t()}).resume()})}t.exports=function(e,t){var r=this;return t=n.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:i.utf8decode}),l.isNode&&l.isStream(e)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):n.prepareContent("the loaded zip f
2ile",e,!0,t.optimizedBinaryString,t.base64).then(function(e){var r=new s(t);return r.load(e),r}).then(function(e){var r=[o.Promise.resolve(e)],n=e.files;if(t.checkCRC32)for(var i=0;i<n.length;i++)r.push(c(n[i]));return o.Promise.all(r)}).then(function(e){for(var o=e.shift(),i=o.files,s=0;s<i.length;s++){var a=i[s],l=a.fileNameStr,c=n.resolve(a.fileNameStr);r.file(c,a.decompressed,{binary:!0,optimizedBinaryString:!0,date:a.date,dir:a.dir,comment:a.fileCommentStr.length?a.fileCommentStr:null,unixPermissions:a.unixPermissions,dosPermissions:a.dosPermissions,createFolders:t.createFolders}),a.dir||(r.file(c).unsafeOriginalName=l)}return o.zipComment.length&&(r.comment=o.zipComment),r})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,r){var n=e("../utils"),o=e("../stream/GenericWorker");function i(e,t){o.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}n.inherits(i,o),i.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",function(e){t.push({data:e,meta:{percent:0}})}).on("error",function(e){t.isPaused?this.generatedError=e:t.error(e)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})},i.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},i.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=i},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,r){var n=e("readable-stream").Readable;function o(e,t,r){n.call(this,t),this._helper=e;var o=this;e.on("data",function(e,t){o.push(e)||o._helper.pause(),r&&r(t)}).on("error",function(e){o.emit("error",e)}).on("end",function(){o.push(null)})}e("../utils").inherits(o,n),o.prototype._read=function(){this._helper.resume()},t.exports=o},{"../utils":32,"readable-stream":16}],14:[function(e,t,r){t.exports={isNode:typeof Buffer<"u",newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,r){function n(e,t,r){var n,o=i.getTypeOf(t),a=i.extend(r||{},l);a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),"string"==typeof a.unixPermissions&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&16384&a.unixPermissions&&(a.dir=!0),a.dosPermissions&&16&a.dosPermissions&&(a.dir=!0),a.dir&&(e=f(e)),a.createFolders&&(n=g(e))&&m.call(this,n,!0);var u="string"===o&&!1===a.binary&&!1===a.base64;r&&void 0!==r.binary||(a.binary=!u),(t instanceof c&&0===t.uncompressedSize||a.dir||!t||0===t.length)&&(a.base64=!1,a.binary=!0,t="",a.compression="STORE",o="string");var v;v=t instanceof c||t instanceof s?t:h.isNode&&h.isStream(t)?new p(e,t):i.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var b=new d(e,v,a);this.files[e]=b}var o=e("./utf8"),i=e("./utils"),s=e("./stream/GenericWorker"),a=e("./stream/StreamHelper"),l=e("./defaults"),c=e("./compressedObject"),d=e("./zipObject"),u=e("./generate"),h=e("./nodejsUtils"),p=e("./nodejs/NodejsStreamInputAdapter"),g=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},f=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},m=function(e,t){return t=void 0!==t?t:l.createFolders,e=f(e),this.files[e]||n.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function v(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var b={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)n=this.files[t],(r=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(r,n)},filter:function(e){var t=[];
vendor: 4,100 bytes, line 2
2return this.forEach(function(r,n){e(r,n)&&t.push(n)}),t},file:function(e,t,r){if(1!==arguments.length)return e=this.root+e,n.call(this,e,t,r),this;if(v(e)){var o=e;return this.filter(function(e,t){return!t.dir&&o.test(e)})}var i=this.files[this.root+e];return i&&!i.dir?i:null},folder:function(e){if(!e)return this;if(v(e))return this.filter(function(t,r){return r.dir&&e.test(t)});var t=this.root+e,r=m.call(this,t),n=this.clone();return n.root=r.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter(function(t,r){return r.name.slice(0,e.length)===e}),n=0;n<r.length;n++)delete this.files[r[n].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if((r=i.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");i.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var n=r.comment||this.comment||"";t=u.generateWorker(this,r,n)}catch(e){(t=new s("error")).error(e)}return new a(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=b},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,r){t.exports=e("stream")},{stream:void 0}],17:[function(e,t,r){var n=e("./DataReader");function o(e){n.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(o,n),o.prototype.byteAt=function(e){return this.data[this.zero+e]},o.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),o=e.charCodeAt(3),i=this.length-4;0<=i;--i)if(this.data[i]===t&&this.data[i+1]===r&&this.data[i+2]===n&&this.data[i+3]===o)return i-this.zero;return-1},o.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),o=e.charCodeAt(3),i=this.readData(4);return t===i[0]&&r===i[1]&&n===i[2]&&o===i[3]},o.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=o},{"../utils":32,"./DataReader":18}],18:[function(e,t,r){var n=e("../utils");function o(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,r=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=o},{"../utils":32}],19:[function(e,t,r){var n=e("./Uint8ArrayReader");function o(e){n.call(this,e)}e("../utils").inherits(o,n),o.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t}
vendor: 2,314 bytes, line 2
2,t.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){var n=e("./DataReader");function o(e){n.call(this,e)}e("../utils").inherits(o,n),o.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},o.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},o.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},o.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=o},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){var n=e("./ArrayReader");function o(e){n.call(this,e)}e("../utils").inherits(o,n),o.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){var n=e("../utils"),o=e("../support"),i=e("./ArrayReader"),s=e("./StringReader"),a=e("./NodeBufferReader"),l=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||o.uint8array?"nodebuffer"===t?new a(e):o.uint8array?new l(n.transformTo("uint8array",e)):new i(n.transformTo("array",e)):new s(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){r.LOCAL_FILE_HEADER="PK��",r.CENTRAL_FILE_HEADER="PK��",r.CENTRAL_DIRECTORY_END="PK��",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK��",r.ZIP64_CENTRAL_DIRECTORY_END="PK��",r.DATA_DESCRIPTOR="PK�\b"},{}],24:[function(e,t,r){var n=e("./GenericWorker"),o=e("../utils");function i(e){n.call(this,"ConvertWorker to "+e),this.destType=e}o.inherits(i,n),i.prototype.processChunk=function(e){this.push({data:o.transformTo(this.destType,e.data),meta:e.meta})},t.exports=i},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){var n=e("./GenericWorker"),o=e("../crc32");function i(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(i,n),i.prototype.processChunk=function(e){this.streamInfo.crc32=o(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=i},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){var n=e("../utils"),o=e("./GenericWorker");
vendor: 6,959 bytes, line 2
2function i(e){o.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(i,o),i.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}o.prototype.processChunk.call(this,e)},t.exports=i},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){var n=e("../utils"),o=e("./GenericWorker");function i(e){o.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}n.inherits(i,o),i.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},i.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},i.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},i.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=i},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.end()}),e.on("error",function(e){t.error(e)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=n},{}],29:[function(e,t,r){var n=e("../utils"),o=e("./ConvertWorker"),i=e("./GenericWorker"),s=e("../base64"),a=e("../support"),l=e("../external"),c=null;if(a.nodestream)try{c=e("../nodejs/NodejsStreamOutputAdapter")}catch{}function d(e,t,r){var s=t;switch(t){case"blob":case"arraybuffer":s="uint8array";break;case"base64":s="string"}try{this._internalType=s,this._outputType=t,this._mimeType=r,n.checkSupport(s),this._worker=e.pipe(new o(s)),e.lock()}catch(e){this._worker=new i("error"),this._worker.error(e)}}d.prototype={accumulate:function(e){return function(e,t){return new l.Promise(function(r,o){var i=[],a=e._internalType,l=e._outputType,c=e._mimeType;e.on("data",function(e,r){i.push(e),t&&t(r)}).on("error",function(e){i=[],o(e)}).on("end",function(){try{var e=function(e,t,r){switch(e){case"blob":return n.newBlob(n.transformTo("arraybuffer",t),r);case"base64":return s.encode(t);default:return n.transformTo(e,t)}}(l,function(e,t){var r,n=0,o=null,i=0;for(r=0;r<t.length;r++)i+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(o=new Uint8Array(i),r=0;r<t.length;r++)o.set(t[r],n),n+=t[r].length;return o;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(a,i),c);r(e)}catch(e){o(e)}i=[]}).resume()})}(this,e)},on:function(e,t){var r=this;return"data"===e?this._worker.on(e,function(e){t.call(r,e.data,e.meta)}):this._worker.on(e,function(){n.delay(t,arguments,r)}),this},resume:function(){return n.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(n.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new c(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=d},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,r){if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",r.nodebuffer=typeof Buffer<"u",r.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")r.blob=!1;else{var n=new ArrayBuffer(0);try{r.blob=0===new Blob([n],{type:"application/zip"}).size}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(n),r.blob=0===o.getBlob("application/zip").size}catch{r.blob=!1}}}try{r.nodestream=!!e("readable-stream").Readable}catch{r.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,r){for(var n=e("./utils"),o=e("./support"),i=e("./nodejsUtils"),s=e("./stream/GenericWorker"),a=new Array(256),l=0;l<256;l++)a[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function c(){s.call(this,"utf-8 decode"),this.leftOver=null}function d(){s.call(this,"utf-8 encode")}a[254]=a[254]=1,r.utf8encode=function(e){return o.nodebuffer?i.newBufferFrom(e,"utf-8"):function(e){var t,r,n,i,s,a=e.length,l=0;for(i=0;i<a;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),l
vendor: 8,758 bytes, line 2
2+=r<128?1:r<2048?2:r<65536?3:4;for(t=o.uint8array?new Uint8Array(l):new Array(l),i=s=0;s<l;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t}(e)},r.utf8decode=function(e){return o.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,o,i,s=e.length,l=new Array(2*s);for(t=r=0;t<s;)if((o=e[t++])<128)l[r++]=o;else if(4<(i=a[o]))l[r++]=65533,t+=i-1;else{for(o&=2===i?31:3===i?15:7;1<i&&t<s;)o=o<<6|63&e[t++],i--;1<i?l[r++]=65533:o<65536?l[r++]=o:(o-=65536,l[r++]=55296|o>>10&1023,l[r++]=56320|1023&o)}return l.length!==r&&(l.subarray?l=l.subarray(0,r):l.length=r),n.applyFromCharCode(l)}(e=n.transformTo(o.uint8array?"uint8array":"array",e))},n.inherits(c,s),c.prototype.processChunk=function(e){var t=n.transformTo(o.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var i=t;(t=new Uint8Array(i.length+this.leftOver.length)).set(this.leftOver,0),t.set(i,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var s=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+a[e[r]]>t?r:t}(t),l=t;s!==t.length&&(o.uint8array?(l=t.subarray(0,s),this.leftOver=t.subarray(s,t.length)):(l=t.slice(0,s),this.leftOver=t.slice(s,t.length))),this.push({data:r.utf8decode(l),meta:e.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=c,n.inherits(d,s),d.prototype.processChunk=function(e){this.push({data:r.utf8encode(e.data),meta:e.meta})},r.Utf8EncodeWorker=d},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,r){var n=e("./support"),o=e("./base64"),i=e("./nodejsUtils"),s=e("./external");function a(e){return e}function l(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}e("setimmediate"),r.newBlob=function(e,t){r.checkSupport("blob");try{return new Blob([e],{type:t})}catch{try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(e),n.getBlob(t)}catch{throw new Error("Bug : can't construct the Blob.")}}};var c={stringifyByChunk:function(e,t,r){var n=[],o=0,i=e.length;if(i<=r)return String.fromCharCode.apply(null,e);for(;o<i;)"array"===t||"nodebuffer"===t?n.push(String.fromCharCode.apply(null,e.slice(o,Math.min(o+r,i)))):n.push(String.fromCharCode.apply(null,e.subarray(o,Math.min(o+r,i)))),o+=r;return n.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch{return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&1===String.fromCharCode.apply(null,i.allocBuffer(1)).length}catch{return!1}}()}};function d(e){var t=65536,n=r.getTypeOf(e),o=!0;if("uint8array"===n?o=c.applyCanBeUsed.uint8array:"nodebuffer"===n&&(o=c.applyCanBeUsed.nodebuffer),o)for(;1<t;)try{return c.stringifyByChunk(e,n,t)}catch{t=Math.floor(t/2)}return c.stringifyByChar(e)}function u(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}r.applyFromCharCode=d;var h={};h.string={string:a,array:function(e){return l(e,new Array(e.length))},arraybuffer:function(e){return h.string.uint8array(e).buffer},uint8array:function(e){return l(e,new Uint8Array(e.length))},nodebuffer:function(e){return l(e,i.allocBuffer(e.length))}},h.array={string:d,array:a,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return i.newBufferFrom(e)}},h.arraybuffer={string:function(e){return d(new Uint8Array(e))},array:function(e){return u(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:a,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return i.newBufferFrom(new Uint8Array(e))}},h.uint8array={string:d,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:a,nodebuffer:function(e){return i.newBufferFrom(e)}},h.nodebuffer={string:d,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return h.nodebuffer.uint8array(e).buffer},uint8array:function(e){return u(e,new Uint8Array(e.length))},nodebuffer:a},r.transformTo=function(e,t){if(t=t||"",!e)return t;r.checkSupport(e);var n=r.getTypeOf(t);return h[n][e](t)},r.resolve=function(e){for(var t=e.split("/"),r=[],n=0;n<t.length;n++){var o=t[n];"."===o||""===o&&0!==n&&n!==t.length-1||(".."===o?r.pop():r.push(o))}return r.join("/")},r.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":n.nodebuffer&&i.isBuffer(e)?"nodebuffer":n.uint8array&&e instanceof Uint8Array?"uint8array":n.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(e){if(!n[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(e){var t,r,n="";for(r=0;r<(e||"").length;r++)n+="\\x"+((t=e.charCodeAt(r))<16?"0":"")+t.toString(16).toUpperCase();return n},r.delay=function(e,t,r){setImmediate(function(){e.apply(r||null,t||[])})},r.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r},r.extend=function(){var e,t,r={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===r[t]&&(r[t]=arguments[e][t]);return r},r.prepareContent=function(e,t,i,a,c){return s.Promise.resolve(t).then(function(e){return n.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&typeof FileReader<"u"?new s.Promise(function(t,r){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=function(e){r(e.target.error)},n.readAsArrayBuffer(e)}):e}).then(function(t){var d,u=r.getTypeOf(t);return u?("arraybuffer"===u?t=r.transformTo("uint8array",t):"string"===u&&(c?t=o.decode(t):i&&!0!==a&&(t=l(d=t,n.uint8array?new Uint8Array(d.length):new Array(d.length)))),t):s.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,r){var n=e("./reader/readerFor"),o=e("./utils"),i=e("./signature"),s=e("./zipEntry"),a=e("./support");function l(e){this.files=[],this.loadOptions=e}l.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(t)+", expected "+o.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4)===t;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=a.uint8array?"uint8array":"array",r=o.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,r,n=this.zip64EndOfCentralSize-44;0<n;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(i.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;
vendor: 4,643 bytes, line 2
2for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(i.CENTRAL_FILE_HEADER);)(e=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(i.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,i.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(i.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,i.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=t-r;if(0<n)this.isSignature(t,i.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=l},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,r){var n=e("./reader/readerFor"),o=e("./utils"),i=e("./compressedObject"),s=e("./crc32"),a=e("./utf8"),l=e("./compressions"),c=e("./support");function d(e,t){this.options=e,this.loadOptions=t}d.prototype={isEncrypted:function(){return!(1&~this.bitFlag)},useUTF8:function(){return!(2048&~this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in l)if(Object.prototype.hasOwnProperty.call(l,t)&&l[t].magic===e)return l[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new i(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=n(this.extraFields[1].value);
vendor: 2,524 bytes, line 2
2this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,r,n,o=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<o;)t=e.readInt(2),r=e.readInt(2),n=e.readData(r),this.extraFields[t]={id:t,length:r,value:n};e.setIndex(o)},handleUTF8:function(){var e=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var r=o.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var i=o.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(i)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=n(e.value);return 1!==t.readInt(1)||s(this.fileName)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=n(e.value);return 1!==t.readInt(1)||s(this.fileComment)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null}},t.exports=d},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,r){function n(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}}var o=e("./stream/StreamHelper"),i=e("./stream/DataWorker"),s=e("./utf8"),a=e("./compressedObject"),l=e("./stream/GenericWorker");n.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var n="string"===(r=e.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker();var i=!this._dataBinary;i&&!n&&(t=t.pipe(new s.Utf8EncodeWorker)),!i&&n&&(t=t.pipe(new s.Utf8DecodeWorker))}catch(e){(t=new l("error")).error(e)}return new o(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)}
vendor: 11,194 bytes, line 2
2,nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof a&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new s.Utf8EncodeWorker)),a.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof l?this._data:new i(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],d=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},u=0;u<c.length;u++)n.prototype[c[u]]=d;t.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,r){(function(e){var r,n,o=e.MutationObserver||e.WebKitMutationObserver;if(o){var i=0,s=new o(d),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),r=function(){a.data=i=++i%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){d(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(d,0)};else{var l=new e.MessageChannel;l.port1.onmessage=d,r=function(){l.port2.postMessage(0)}}var c=[];function d(){var e,t;n=!0;for(var r=c.length;r;){for(t=c,c=[],e=-1;++e<r;)t[e]();r=c.length}n=!1}t.exports=function(e){1!==c.push(e)||n||r()}}).call(this,typeof Pb<"u"?Pb:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(e,t,r){var n=e("immediate");function o(){}var i={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==o&&p(this,e)}function d(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function u(e,t,r){n(function(){var n;try{n=t(r)}catch(t){return i.reject(e,t)}n===e?i.reject(e,new TypeError("Cannot resolve promise with itself")):i.resolve(e,n)})}function h(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function p(e,t){var r=!1;function n(t){r||(r=!0,i.reject(e,t))}function o(t){r||(r=!0,i.resolve(e,t))}var s=g(function(){t(o,n)});"error"===s.status&&n(s.value)}function g(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}(t.exports=c).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){throw r})})},c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var r=new this.constructor(o);return this.state!==l?u(r,this.state===a?e:t,this.outcome):this.queue.push(new d(r,e,t)),r},d.prototype.callFulfilled=function(e){i.resolve(this.promise,e)},d.prototype.otherCallFulfilled=function(e){u(this.promise,this.onFulfilled,e)},d.prototype.callRejected=function(e){i.reject(this.promise,e)},d.prototype.otherCallRejected=function(e){u(this.promise,this.onRejected,e)},i.resolve=function(e,t){var r=g(h,t);if("error"===r.status)return i.reject(e,r.value);var n=r.value;if(n)p(e,n);else{e.state=a,e.outcome=t;for(var o=-1,s=e.queue.length;++o<s;)e.queue[o].callFulfilled(t)}return e},i.reject=function(e,t){e.state=s,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:i.resolve(new this(o),e)},c.reject=function(e){var t=new this(o);return i.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var s=new Array(r),a=0,l=-1,c=new this(o);++l<r;)d(e[l],l);return c;function d(e,o){t.resolve(e).then(function(e){s[o]=e,++a!==r||n||(n=!0,i.resolve(c,s))},function(e){n||(n=!0,i.reject(c,e))})}},c.race=function(e){if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var t,r=e.length,n=!1;if(!r)return this.resolve([]);for(var s=-1,a=new this(o);++s<r;)t=e[s],this.resolve(t).then(function(e){n||(n=!0,i.resolve(a,e))},function(e){n||(n=!0,i.reject(a,e))});return a}},{immediate:36}],38:[function(e,t,r){var n={};(0,e("./lib/utils/common").assign)(n,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=n},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,r){var n=e("./zlib/deflate"),o=e("./utils/common"),i=e("./utils/strings"),s=e("./zlib/messages"),a=e("./zlib/zstream"),l=Object.prototype.toString;function c(e){if(!(this instanceof c))return new c(e);this.options=o.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==r)throw new Error(s[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var d;if(d="string"==typeof t.dictionary?i.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(r=n.deflateSetDictionary(this.strm,d)))throw new Error(s[r]);this._dict_set=!0}}function d(e,t){var r=new c(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}c.prototype.push=function(e,t){var r,s,a=this.strm,c=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=i.string2buf(e):"[object ArrayBuffer]"===l.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new o.Buf8(c),a.next_out=0,a.avail_out=c),1!==(r=n.deflate(a,s))&&0!==r)return this.onEnd(r),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(i.buf2binstring(o.shrinkBuf(a.output,a.next_out))):this.onData(o.shrinkBuf(a.output,a.next_out)))}while((0<a.avail_in||0===a.avail_out)&&1!==r);return 4===s?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==s||(this.onEnd(0),!(a.avail_out=0))},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Deflate=c,r.deflate=d,r.deflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},r.gzip=function(e,t){return(t=t||{}).gzip=!0,d(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,r){var n=e("./zlib/inflate"),o=e("./utils/common"),i=e("./utils/strings"),s=e("./zlib/constants"),a=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),d=Object.prototype.toString;function u(e){if(!(this instanceof u))return new u(e);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&!(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==s.Z_OK)throw new Error(a[r]);this.header=new c,n.inflateGetHeader(this.strm,this.header)}function h(e,t){var r=new u(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}u.prototype.push=function(e,t){var r,a,l,c,u,h,p=this.strm,g=this.options.chunkSize,f=this.options.dictionary,m=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof e?p.input=i.binstring2buf(e):"[object ArrayBuffer]"===d.call(e)?p.input=new Uint8Array(e):p.input=e,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new o.Buf8(g),p.next_out=0,p.avail_out=g),(r=n.inflate(p,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&f&&(h="string"==typeof f?i.string2buf(f):"[object ArrayBuffer]"===d.call(f)?new Uint8Array(f):f,r=n.inflateSetDictionary(this.strm,h)),r===s.Z_BUF_ERROR&&!0===m&&(r=s.Z_OK,m=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),!(this.ended=!0);p.next_out&&(0!==p.avail_out&&r!==s.Z_STREAM_END&&(0!==p.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(l=i.utf8border(p.output,p.next_out),c=p.next_out-l,u=i.buf2string(p.output,l),p.next_out=c,p.avail_out=g-c,c&&o.arraySet(p.output,p.output,l,c,0),this.onData(u)):this.onData(o.shrinkBuf(p.output,p.next_out)))),0===p.avail_in&&0===p.avail_out&&(m=!0)}while((0<p.avail_in||0===p.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(p.avail_out=0))},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){e===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=u,r.inflate=h,r.inflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},r.ungzip=h},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,r){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";r.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,r,n,o){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),o);else for(var i=0;i<n;i++)e[o+i]=t[r+i]},flattenChunks:function(e){var t,r,n,o,i,s;for(t=n=0,r=e.length;t<r;t++)n+=e[t].length;for(s=new Uint8Array(n),t=o=0,r=e.length;t<r;t++)i=e[t],s.set(i,o),o+=i.length;return s}},i={arraySet:function(e,t,r,n,o){for(var i=0;i<n;i++)e[o+i]=t[r+i]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,o)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,i))},r.setTyped(n)},{}],42:[function(e,t,r){var n=e("./common"),o=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}
vendor: 5,600 bytes, line 2
2try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{i=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function l(e,t){if(t<65537&&(e.subarray&&i||!e.subarray&&o))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",s=0;s<t;s++)r+=String.fromCharCode(e[s]);return r}s[254]=s[254]=1,r.string2buf=function(e){var t,r,o,i,s,a=e.length,l=0;for(i=0;i<a;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(o=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(o-56320),i++),l+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(l),i=s=0;s<l;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(o=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(o-56320),i++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t},r.buf2binstring=function(e){return l(e,e.length)},r.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,o=t.length;r<o;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,n,o,i,a=t||e.length,c=new Array(2*a);for(r=n=0;r<a;)if((o=e[r++])<128)c[n++]=o;else if(4<(i=s[o]))c[n++]=65533,r+=i-1;else{for(o&=2===i?31:3===i?15:7;1<i&&r<a;)o=o<<6|63&e[r++],i--;1<i?c[n++]=65533:o<65536?c[n++]=o:(o-=65536,c[n++]=55296|o>>10&1023,c[n++]=56320|1023&o)}return l(c,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){t.exports=function(e,t,r,n){for(var o=65535&e,i=e>>>16&65535,s=0;0!==r;){for(r-=s=2e3<r?2e3:r;i=i+(o=o+t[n++]|0)|0,--s;);o%=65521,i%=65521}return o|i<<16}},{}],44:[function(e,t,r){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,r){var n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,o){var i=n,s=o+r;e^=-1;for(var a=o;a<s;a++)e=e>>>8^i[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,r){var n,o=e("../utils/common"),i=e("./trees"),s=e("./adler32"),a=e("./crc32"),l=e("./messages"),c=-2,d=258,u=262,h=113;function p(e,t){return e.msg=l[t],t}function g(e){return(e<<1)-(4<e?9:0)}function f(e){for(var t=e.length;0<=--t;)e[t]=0}function m(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(o.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function v(e,t){i._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,m(e.strm)}function b(e,t){e.pending_buf[e.pending++]=t}function y(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function w(e,t){var r,n,o=e.max_chain_length,i=e.strstart,s=e.prev_length,a=e.nice_match,l=e.strstart>e.w_size-u?e.strstart-(e.w_size-u):0,c=e.window,h=e.w_mask,p=e.prev,g=e.strstart+d,f=c[i+s-1],m=c[i+s];e.prev_length>=e.good_match&&(o>>=2),a>e.lookahead&&(a=e.lookahead);do{if(c[(r=t)+s]===m&&c[r+s-1]===f&&c[r]===c[i]&&c[++r]===c[i+1]){i+=2,r++;do{}while(c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&i<g);if(n=d-(g-i),i=g-d,s<n){if(e.match_start=t,a<=(s=n))break;f=c[i+s-1],m=c[i+s]}}}while((t=p[t&h])>l&&0!=--o);return s<=e.lookahead?s:e.lookahead}function x(e){var t,r,n,i,l,c,d,h,p,g,f=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-u)){for(o.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=r=e.hash_size;n=e.head[--t],e.head[t]=f<=n?n-f:0,--r;);for(t=r=f;n=e.prev[--t],e.prev[t]=f<=n?n-f:0,--r;);i+=f}if(0===e.strm.avail_in)break;if(c=e.strm,d=e.window,h=e.strstart+e.lookahead,g=void 0,(p=i)<(g=c.avail_in)&&(g=p),r=0===g?0:(c.avail_in-=g,o.arraySet(d,c.input,c.next_in,g,h),1===c.state.wrap?c.adler=s(c.adler,d,g,h):2===c.state.wrap&&(c.adler=a(c.adler,d,g,h)),c.next_in+=g,c.total_in+=g,g),e.lookahead+=r,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+3-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<u&&0!==e.strm.avail_in)}function _(e,t){for(var r,n;;){if(e.lookahead<u){if(x(e),e.lookahead<u&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-u&&(e.match_length=w(e,r)),e.match_length>=3)if(n=i._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;
vendor: 8,064 bytes, line 2
2else n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}function k(e,t){for(var r,n,o;;){if(e.lookahead<u){if(x(e),e.lookahead<u&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-u&&(e.match_length=w(e,r),e.match_length<=5&&(1===e.strategy||3===e.match_length&&4096<e.strstart-e.match_start)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){for(o=e.strstart+e.lookahead-3,n=i._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(v(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=i._tr_tally(e,0,e.window[e.strstart-1]))&&v(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=i._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}function C(e,t,r,n,o){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=o}function S(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(1146),this.dyn_dtree=new o.Buf16(122),this.bl_tree=new o.Buf16(78),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(16),this.heap=new o.Buf16(573),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(573),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function E(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:h,e.adler=2===t.wrap?0:1,t.last_flush=0,i._tr_init(t),0):p(e,c)}function I(e){var t,r=E(e);return 0===r&&((t=e.state).window_size=2*t.w_size,f(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),r}function A(e,t,r,n,i,s){if(!e)return c;var a=1;if(-1===t&&(t=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),i<1||9<i||8!==r||n<8||15<n||t<0||9<t||s<0||4<s)return p(e,c);8===n&&(n=9);var l=new S;return(e.state=l).strm=e,l.wrap=a,l.gzhead=null,l.w_bits=n,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=i+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new o.Buf8(2*l.w_size),l.head=new o.Buf16(l.hash_size),l.prev=new o.Buf16(l.w_size),l.lit_bufsize=1<<i+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new o.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=s,l.method=r,I(e)}n=[new C(0,0,0,0,function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(x(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,v(e,!1),0===e.strm.avail_out)||e.strstart-e.block_start>=e.w_size-u&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(v(e,!1),e.strm.avail_out),1)}),new C(4,4,8,4,_),new C(4,5,16,8,_),new C(4,6,32,32,_),new C(4,4,16,16,k),new C(8,16,32,32,k),new C(8,16,128,128,k),new C(8,32,128,256,k),new C(32,128,258,1024,k),new C(32,258,258,4096,k)],r.deflateInit=function(e,t){return A(e,t,8,15,8,0)},r.deflateInit2=A,r.deflateReset=I,r.deflateResetKeep=E,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?c:(e.state.gzhead=t,0):c},r.deflate=function(e,t){var r,o,s,l;if(!e||!e.state||5<t||t<0)return e?p(e,c):c;if(o=e.state,!e.output||!e.input&&0!==e.avail_in||666===o.status&&4!==t)return p(e,0===e.avail_out?-5:c);if(o.strm=e,r=o.last_flush,o.last_flush=t,42===o.status)if(2===o.wrap)e.adler=0,b(o,31),b(o,139),b(o,8),o.gzhead?(b(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),b(o,255&o.gzhead.time),b(o,o.gzhead.time>>8&255),b(o,o.gzhead.time>>16&255),b(o,o.gzhead.time>>24&255),b(o,9===o.level?2:2<=o.strategy||o.level<2?4:0),b(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(b(o,255&o.gzhead.extra.length),b(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=a(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(b(o,0),b(o,0),b(o,0),b(o,0),b(o,0),b(o,9===o.level?2:2<=o.strategy||o.level<2?4:0),b(o,3),o.status=h);else{var u=8+(o.w_bits-8<<4)<<8;u|=(2<=o.strategy||o.level<2?0:o.level<6?1:6===o.level?2:3)<<6,0!==o.strstart&&(u|=32),u+=31-u%31,o.status=h,y(o,u),0!==o.strstart&&(y(o,e.adler>>>16),y(o,65535&e.adler)),e.adler=1}if(69===o.status)if(o.gzhead.extra){for(s=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),m(e),s=o.pending,o.pending!==o.pending_buf_size));)b(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){s=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),m(e),s=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,b(o,l)}while(0!==l);o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),0===l&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){s=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),m(e),s=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,b(o,l)}while(0!==l);o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),0===l&&(o.status=103)}else o.status=103;if(103===o.status&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&m(e),o.pending+2<=o.pending_buf_size&&(b(o,255&e.adler),b(o,e.adler>>8&255),e.adler=0,o.status=h)):o.status=h),0!==o.pending){if(m(e),0===e.avail_out)return o.last_flush=-1,0}else if(0===e.avail_in&&g(t)<=g(r)&&4!==t)return p(e,-5);if(666===o.status&&0!==e.avail_in)return p(e,-5);if(0!==e.avail_in||0!==o.lookahead||0!==t&&666!==o.status){var w=2===o.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(x(e),0===e.lookahead)){if(0===t)return 1;break}
vendor: 6,036 bytes, line 2
2if(e.match_length=0,r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}(o,t):3===o.strategy?function(e,t){for(var r,n,o,s,a=e.window;;){if(e.lookahead<=d){if(x(e),e.lookahead<=d&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&0<e.strstart&&(n=a[o=e.strstart-1])===a[++o]&&n===a[++o]&&n===a[++o]){s=e.strstart+d;do{}while(n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&o<s);e.match_length=d-(s-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=i._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}(o,t):n[o.level].func(o,t);if(3!==w&&4!==w||(o.status=666),1===w||3===w)return 0===e.avail_out&&(o.last_flush=-1),0;if(2===w&&(1===t?i._tr_align(o):5!==t&&(i._tr_stored_block(o,0,0,!1),3===t&&(f(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),m(e),0===e.avail_out))return o.last_flush=-1,0}return 4!==t?0:o.wrap<=0?1:(2===o.wrap?(b(o,255&e.adler),b(o,e.adler>>8&255),b(o,e.adler>>16&255),b(o,e.adler>>24&255),b(o,255&e.total_in),b(o,e.total_in>>8&255),b(o,e.total_in>>16&255),b(o,e.total_in>>24&255)):(y(o,e.adler>>>16),y(o,65535&e.adler)),m(e),0<o.wrap&&(o.wrap=-o.wrap),0!==o.pending?0:1)},r.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&t!==h&&666!==t?p(e,c):(e.state=null,t===h?p(e,-3):0):c},r.deflateSetDictionary=function(e,t){var r,n,i,a,l,d,u,h,p=t.length;if(!e||!e.state||2===(a=(r=e.state).wrap)||1===a&&42!==r.status||r.lookahead)return c;for(1===a&&(e.adler=s(e.adler,t,p,0)),r.wrap=0,p>=r.w_size&&(0===a&&(f(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new o.Buf8(r.w_size),o.arraySet(h,t,p-r.w_size,r.w_size,0),t=h,p=r.w_size),l=e.avail_in,d=e.next_in,u=e.input,e.avail_in=p,e.next_in=0,e.input=t,x(r);r.lookahead>=3;){for(n=r.strstart,i=r.lookahead-2;r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++,--i;);r.strstart=n,r.lookahead=2,x(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=d,e.input=u,e.avail_in=l,r.wrap=a,0},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,r){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,t,r){t.exports=function(e,t){var r,n,o,i,s,a,l,c,d,u,h,p,g,f,m,v,b,y,w,x,_,k,C,S,E;r=e.state,n=e.next_in,S=e.input,o=n+(e.avail_in-5),i=e.next_out,E=e.output,s=i-(t-e.avail_out),a=i+(e.avail_out-257),l=r.dmax,c=r.wsize,d=r.whave,u=r.wnext,h=r.window,p=r.hold,g=r.bits,f=r.lencode,m=r.distcode,v=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;e:do{g<15&&(p+=S[n++]<<g,g+=8,p+=S[n++]<<g,g+=8),y=f[p&v];t:for(;;){if(p>>>=w=y>>>24,g-=w,0==(w=y>>>16&255))E[i++]=65535&y;else{if(!(16&w)){if(!(64&w)){y=f[(65535&y)+(p&(1<<w)-1)];continue t}if(32&w){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}x=65535&y,(w&=15)&&(g<w&&(p+=S[n++]<<g,g+=8),x+=p&(1<<w)-1,p>>>=w,g-=w),g<15&&(p+=S[n++]<<g,g+=8,p+=S[n++]<<g,g+=8),y=m[p&b];r:for(;;){if(p>>>=w=y>>>24,g-=w,!(16&(w=y>>>16&255))){if(!(64&w)){y=m[(65535&y)+(p&(1<<w)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(_=65535&y,g<(w&=15)&&(p+=S[n++]<<g,(g+=8)<w&&(p+=S[n++]<<g,g+=8)),l<(_+=p&(1<<w)-1)){e.msg="invalid distance too far back",r.mode=30;break e}if(p>>>=w,g-=w,(w=i-s)<_){if(d<(w=_-w)&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(C=h,(k=0)===u){if(k+=c-w,w<x){for(x-=w;E[i++]=h[k++],--w;);k=i-_,C=E}}else if(u<w){if(k+=c+u-w,(w-=u)<x){for(x-=w;E[i++]=h[k++],--w;);if(k=0,u<x){for(x-=w=u;E[i++]=h[k++],--w;);k=i-_,C=E}}}else if(k+=u-w,w<x){for(x-=w;E[i++]=h[k++],--w;);k=i-_,C=E}for(;2<x;)E[i++]=C[k++],E[i++]=C[k++],E[i++]=C[k++],x-=3;x&&(E[i++]=C[k++],1<x&&(E[i++]=C[k++]))}else{for(k=i-_;E[i++]=E[k++],E[i++]=E[k++],E[i++]=E[k++],2<(x-=3););x&&(E[i++]=E[k++],1<x&&(E[i++]=E[k++]))}break}}break}}while(n<o&&i<a);n-=x=g>>3,p&=(1<<(g-=x<<3))-1,e.next_in=n,e.next_out=i,e.avail_in=n<o?o-n+5:5-(n-o),e.avail_out=i<a?a-i+257:257-(i-a),r.hold=p,r.bits=g}},{}],49:[function(e,t,r){var n=e("../utils/common"),o=e("./adler32"),i=e("./crc32"),s=e("./inffast"),a=e("./inftrees"),l=-2;function c(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function d(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function u(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):l}function h(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,u(e)):l}function p(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?l:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,h(e))):l}function g(e,t){var r,n;
vendor: 5,024 bytes, line 2
2return e?(n=new d,(e.state=n).window=null,0!==(r=p(e,t))&&(e.state=null),r):l}var f,m,v=!0;function b(e){if(v){var t;for(f=new n.Buf32(512),m=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,f,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,m,0,e.work,{bits:5}),v=!1}e.lencode=f,e.lenbits=9,e.distcode=m,e.distbits=5}function y(e,t,r,o){var i,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),o>=s.wsize?(n.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(o<(i=s.wsize-s.wnext)&&(i=o),n.arraySet(s.window,t,r-o,i,s.wnext),(o-=i)?(n.arraySet(s.window,t,r-o,o,0),s.wnext=o,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0}r.inflateReset=h,r.inflateReset2=p,r.inflateResetKeep=u,r.inflateInit=function(e){return g(e,15)},r.inflateInit2=g,r.inflate=function(e,t){var r,d,u,h,p,g,f,m,v,w,x,_,k,C,S,E,I,A,T,O,L,$,N,R,P=0,D=new n.Buf8(4),M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return l;12===(r=e.state).mode&&(r.mode=13),p=e.next_out,u=e.output,f=e.avail_out,h=e.next_in,d=e.input,g=e.avail_in,m=r.hold,v=r.bits,w=g,x=f,$=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;v<16;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(2&r.wrap&&35615===m){D[r.check=0]=255&m,D[1]=m>>>8&255,r.check=i(r.check,D,2,0),v=m=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&m)){e.msg="unknown compression method",r.mode=30;break}if(v-=4,L=8+(15&(m>>>=4)),0===r.wbits)r.wbits=L;else if(L>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<L,e.adler=r.check=1,r.mode=512&m?10:12,v=m=0;break;case 2:for(;v<16;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(r.flags=m,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=m>>8&1),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,r.check=i(r.check,D,2,0)),v=m=0,r.mode=3;case 3:for(;v<32;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.head&&(r.head.time=m),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,D[2]=m>>>16&255,D[3]=m>>>24&255,r.check=i(r.check,D,4,0)),v=m=0,r.mode=4;case 4:for(;v<16;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.head&&(r.head.xflags=255&m,r.head.os=m>>8),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,r.check=i(r.check,D,2,0)),v=m=0,r.mode=5;case 5:if(1024&r.flags){for(;v<16;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.length=m,r.head&&(r.head.extra_len=m),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,r.check=i(r.check,D,2,0)),v=m=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(g<(_=r.length)&&(_=g),_&&(r.head&&(L=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,d,h,_,L)),512&r.flags&&(r.check=i(r.check,d,_,h)),g-=_,h+=_,r.length-=_),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===g)break e;for(_=0;L=d[h+_++],r.head&&L&&r.length<65536&&(r.head.name+=String.fromCharCode(L)),L&&_<g;);if(512&r.flags&&(r.check=i(r.check,d,_,h)),g-=_,h+=_,L)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===g)break e;for(_=0;L=d[h+_++],r.head&&L&&r.length<65536&&(r.head.comment+=String.fromCharCode(L)),L&&_<g;);if(512&r.flags&&(r.check=i(r.check,d,_,h)),g-=_,h+=_,L)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;v<16;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(m!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}v=m=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;v<32;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}e.adler=r.check=c(m),v=m=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=p,e.avail_out=f,e.next_in=h,e.avail_in=g,r.hold=m,r.bits=v,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){m>>>=7&v,v-=7&v,r.mode=27;break}for(;v<3;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}switch(r.last=1&m,v-=1,3&(m>>>=1)){case 0:r.mode=14;break;case 1:if(b(r),r.mode=20,6!==t)break;m>>>=2,v-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}m>>>=2,v-=2;break;case 14:for(m>>>=7&v,v-=7&v;v<32;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if((65535&m)!=(m>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&m,v=m=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(_=r.length){if(g<_&&(_=g),f<_&&(_=f),0===_)break e;n.arraySet(u,d,h,_,p),g-=_,h+=_,f-=_,p+=_,r.length-=_;break}r.mode=12;break;case 17:for(;v<14;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(r.nlen=257+(31&m),m>>>=5,v-=5,r.ndist=1+(31&m),m>>>=5,v-=5,r.ncode=4+(15&m),m>>>=4,v-=4,286<r.nlen||30<r.ndist){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;
vendor: 10,092 bytes, line 2
2v<3;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.lens[M[r.have++]]=7&m,m>>>=3,v-=3}for(;r.have<19;)r.lens[M[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,N={bits:r.lenbits},$=a(0,r.lens,0,19,r.lencode,0,r.work,N),r.lenbits=N.bits,$){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;E=(P=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,I=65535&P,!((S=P>>>24)<=v);){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(I<16)m>>>=S,v-=S,r.lens[r.have++]=I;else{if(16===I){for(R=S+2;v<R;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(m>>>=S,v-=S,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}L=r.lens[r.have-1],_=3+(3&m),m>>>=2,v-=2}else if(17===I){for(R=S+3;v<R;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}v-=S,L=0,_=3+(7&(m>>>=S)),m>>>=3,v-=3}else{for(R=S+7;v<R;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}v-=S,L=0,_=11+(127&(m>>>=S)),m>>>=7,v-=7}if(r.have+_>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;_--;)r.lens[r.have++]=L}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,N={bits:r.lenbits},$=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,N),r.lenbits=N.bits,$){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,N={bits:r.distbits},$=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,N),r.distbits=N.bits,$){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=g&&258<=f){e.next_out=p,e.avail_out=f,e.next_in=h,e.avail_in=g,r.hold=m,r.bits=v,s(e,x),p=e.next_out,u=e.output,f=e.avail_out,h=e.next_in,d=e.input,g=e.avail_in,m=r.hold,v=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;E=(P=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,I=65535&P,!((S=P>>>24)<=v);){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(E&&!(240&E)){for(A=S,T=E,O=I;E=(P=r.lencode[O+((m&(1<<A+T)-1)>>A)])>>>16&255,I=65535&P,!(A+(S=P>>>24)<=v);){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}m>>>=A,v-=A,r.back+=A}if(m>>>=S,v-=S,r.back+=S,r.length=I,0===E){r.mode=26;break}if(32&E){r.back=-1,r.mode=12;break}if(64&E){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&E,r.mode=22;case 22:if(r.extra){for(R=r.extra;v<R;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.length+=m&(1<<r.extra)-1,m>>>=r.extra,v-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;E=(P=r.distcode[m&(1<<r.distbits)-1])>>>16&255,I=65535&P,!((S=P>>>24)<=v);){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(!(240&E)){for(A=S,T=E,O=I;E=(P=r.distcode[O+((m&(1<<A+T)-1)>>A)])>>>16&255,I=65535&P,!(A+(S=P>>>24)<=v);){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}m>>>=A,v-=A,r.back+=A}if(m>>>=S,v-=S,r.back+=S,64&E){e.msg="invalid distance code",r.mode=30;break}r.offset=I,r.extra=15&E,r.mode=24;case 24:if(r.extra){for(R=r.extra;v<R;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.offset+=m&(1<<r.extra)-1,m>>>=r.extra,v-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===f)break e;if(_=x-f,r.offset>_){if((_=r.offset-_)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}k=_>r.wnext?(_-=r.wnext,r.wsize-_):r.wnext-_,_>r.length&&(_=r.length),C=r.window}else C=u,k=p-r.offset,_=r.length;for(f<_&&(_=f),f-=_,r.length-=_;u[p++]=C[k++],--_;);0===r.length&&(r.mode=21);break;case 26:if(0===f)break e;u[p++]=r.length,f--,r.mode=21;break;case 27:if(r.wrap){for(;v<32;){if(0===g)break e;g--,m|=d[h++]<<v,v+=8}if(x-=f,e.total_out+=x,r.total+=x,x&&(e.adler=r.check=r.flags?i(r.check,u,x,p-x):o(r.check,u,x,p-x)),x=f,(r.flags?m:c(m))!==r.check){e.msg="incorrect data check",r.mode=30;break}v=m=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;v<32;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(m!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}v=m=0}r.mode=29;case 29:$=1;break e;case 30:$=-3;break e;case 31:return-4;default:return l}return e.next_out=p,e.avail_out=f,e.next_in=h,e.avail_in=g,r.hold=m,r.bits=v,(r.wsize||x!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&y(e,e.output,e.next_out,x-e.avail_out)?(r.mode=31,-4):(w-=e.avail_in,x-=e.avail_out,e.total_in+=w,e.total_out+=x,r.total+=x,r.wrap&&x&&(e.adler=r.check=r.flags?i(r.check,u,x,e.next_out-x):o(r.check,u,x,e.next_out-x)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==w&&0===x||4===t)&&0===$&&($=-5),$)},r.inflateEnd=function(e){if(!e||!e.state)return l;var t=e.state;return t.window&&(t.window=null),e.state=null,0},r.inflateGetHeader=function(e,t){var r;return e&&e.state&&2&(r=e.state).wrap?((r.head=t).done=!1,0):l},r.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?l:11===r.mode&&o(1,t,n,0)!==r.check?-3:y(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,0):l},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,r){var n=e("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],i=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,l,c,d,u,h){var p,g,f,m,v,b,y,w,x,_=h.bits,k=0,C=0,S=0,E=0,I=0,A=0,T=0,O=0,L=0,$=0,N=null,R=0,P=new n.Buf16(16),D=new n.Buf16(16),M=null,z=0;for(k=0;k<=15;k++)P[k]=0;for(C=0;C<l;C++)P[t[r+C]]++;for(I=_,E=15;1<=E&&0===P[E];E--);if(E<I&&(I=E),0===E)return c[d++]=20971520,c[d++]=20971520,h.bits=1,0;for(S=1;S<E&&0===P[S];S++);for(I<S&&(I=S),k=O=1;k<=15;k++)if(O<<=1,(O-=P[k])<0)return-1;if(0<O&&(0===e||1!==E))return-1;for(D[1]=0,k=1;k<15;k++)D[k+1]=D[k]+P[k];for(C=0;C<l;C++)0!==t[r+C]&&(u[D[t[r+C]]++]=C);if(b=0===e?(N=M=u,19):1===e?(N=o,R-=257,M=i,z-=257,256):(N=s,M=a,-1),k=S,v=d,T=C=$=0,f=-1,m=(L=1<<(A=I))-1,1===e&&852<L||2===e&&592<L)return 1;for(;;){for(y=k-T,x=u[C]<b?(w=0,u[C]):u[C]>b?(w=M[z+u[C]],N[R+u[C]]):(w=96,0),p=1<<k-T,S=g=1<<A;c[v+($>>T)+(g-=p)]=y<<24|w<<16|x,0!==g;);for(p=1<<k-1;$&p;)p>>=1;if(0!==p?($&=p-1,$+=p):$=0,C++,0==--P[k]){if(k===E)break;k=t[r+u[C]]}if(I<k&&($&m)!==f){for(0===T&&(T=I),v+=S,O=1<<(A=k-T);A+T<E&&!((O-=P[A+T])<=0);)A++,O<<=1;if(L+=1<<A,1===e&&852<L||2===e&&592<L)return 1;c[f=$&m]=I<<24|A<<16|v-d}}return 0!==$&&(c[v+$]=k-T<<24|64<<16),h.bits=I,0}},{"../utils/common":41}],51:[function(e,t,r){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,t,r){var n=e("../utils/common");function o(e){for(var t=e.length;0<=--t;)e[t]=0}var i=256,s=286,a=30,l=15,c=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],d=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=new Array(576);o(p);var g=new Array(60);o(g);var f=new Array(512);o(f);var m=new Array(256);o(m);var v=new Array(29);o(v);var b,y,w,x=new Array(a);function _(e,t,r,n,o){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}function k(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function C(e){return e<256?f[e]:f[256+(e>>>7)]}function S(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function E(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,S(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function I(e,t,r){E(e,r[2*t],r[2*t+1])}function A(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function T(e,t,r){var n,o,i=new Array(16),s=0;for(n=1;n<=l;n++)i[n]=s=s+r[n-1]<<1;for(o=0;o<=t;o++){var a=e[2*o+1];0!==a&&(e[2*o]=A(i[a]++,a))}}function O(e){var t;for(t=0;t<s;t++)e.dyn_ltree[2*t]=0;for(t=0;t<a;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function L(e){8<e.bi_valid?S(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function $(e,t,r,n){var o=2*t,i=2*r;return e[o]<e[i]||e[o]===e[i]&&n[t]<=n[r]}function N(e,t,r){for(var n=e.heap[r],o=r<<1;o<=e.heap_len&&(o<e.heap_len&&$(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!$(t,n,e.heap[o],e.depth));)e.heap[r]=e.heap[o],r=o,o<<=1;e.heap[r]=n}function R(e,t,r){var n,o,s,a,l=0;if(0!==e.last_lit)for(;n=e.pending_buf[e.d_buf+2*l]<<8|e.pending_buf[e.d_buf+2*l+1],o=e.pending_buf[e.l_buf+l],l++,0===n?I(e,o,t):(I(e,(s=m[o])+i+1,t),0!==(a=c[s])&&E(e,o-=v[s],a),I(e,s=C(--n),r),0!==(a=d[s])&&E(e,n-=x[s],a)),l<e.last_lit;);I(e,256,t)}function P(e,t){var r,n,o,i=t.dyn_tree,s=t.stat_desc.static_tree,a=t.stat_desc.has_stree,c=t.stat_desc.elems,d=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<c;r++)0!==i[2*r]?(e.heap[++e.heap_len]=d=r,e.depth[r]=0):i[2*r+1]=0;for(;e.heap_len<2;)i[2*(o=e.heap[++e.heap_len]=d<2?++d:0)]=1,e.depth[o]=0,e.opt_len--,a&&(e.static_len-=s[2*o+1]);for(t.max_code=d,r=e.heap_len>>1;1<=r;r--)N(e,i,r);for(o=c;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],N(e,i,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,i[2*o]=i[2*r]+i[2*n],e.depth[o]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,i[2*r+1]=i[2*n+1]=o,e.heap[1]=o++,N(e,i,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,o,i,s,a,c=t.dyn_tree,d=t.max_code,u=t.stat_desc.static_tree,h=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,g=t.stat_desc.extra_base,f=t.stat_desc.max_length,m=0;for(i=0;i<=l;i++)e.bl_count[i]=0;for(c[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)f<(i=c[2*c[2*(n=e.heap[r])+1]+1]+1)&&(i=f,m++),c[2*n+1]=i,d<n||(e.bl_count[i]++,s=0,g<=n&&(s=p[n-g]),a=c[2*n],e.opt_len+=a*(i+s),h&&(e.static_len+=a*(u[2*n+1]+s)));if(0!==m){do{for(i=f-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[f]--,m-=2}while(0<m);for(i=f;0!==i;i--)for(n=e.bl_count[i];0!==n;
2)d<(o=e.heap[--r])||(c[2*o+1]!==i&&(e.opt_len+=(i-c[2*o+1])*c[2*o],c[2*o+1]=i),n--)}}(e,t),T(i,d,e.bl_count)}function D(e,t,r){var n,o,i=-1,s=t[1],a=0,l=7,c=4;for(0===s&&(l=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)o=s,s=t[2*(n+1)+1],++a<l&&o===s||(a<c?e.bl_tree[2*o]+=a:0!==o?(o!==i&&e.bl_tree[2*o]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,i=o,c=(a=0)===s?(l=138,3):o===s?(l=6,3):(l=7,4))}function M(e,t,r){var n,o,i=-1,s=t[1],a=0,l=7,c=4;for(0===s&&(l=138,c=3),n=0;n<=r;n++)if(o=s,s=t[2*(n+1)+1],!(++a<l&&o===s)){if(a<c)for(;I(e,o,e.bl_tree),0!=--a;);else 0!==o?(o!==i&&(I(e,o,e.bl_tree),a--),I(e,16,e.bl_tree),E(e,a-3,2)):a<=10?(I(e,17,e.bl_tree),E(e,a-3,3)):(I(e,18,e.bl_tree),E(e,a-11,7));i=o,c=(a=0)===s?(l=138,3):o===s?(l=6,3):(l=7,4)}}o(x);var z=!1;function F(e,t,r,o){var i,s,a;E(e,0+(o?1:0),3),s=t,a=r,L(i=e),S(i,a),S(i,~a),n.arraySet(i.pending_buf,i.window,s,a,i.pending),i.pending+=a}r._tr_init=function(e){z||(function(){var e,t,r,n,o,i=new Array(16);for(n=r=0;n<28;n++)for(v[n]=r,e=0;e<1<<c[n];e++)m[r++]=n;for(m[r-1]=n,n=o=0;n<16;n++)for(x[n]=o,e=0;e<1<<d[n];e++)f[o++]=n;for(o>>=7;n<a;n++)for(x[n]=o<<7,e=0;e<1<<d[n]-7;e++)f[256+o++]=n;for(t=0;t<=l;t++)i[t]=0;for(e=0;e<=143;)p[2*e+1]=8,e++,i[8]++;for(;e<=255;)p[2*e+1]=9,e++,i[9]++;for(;e<=279;)p[2*e+1]=7,e++,i[7]++;for(;e<=287;)p[2*e+1]=8,e++,i[8]++;for(T(p,287,i),e=0;e<a;e++)g[2*e+1]=5,g[2*e]=A(e,5);b=new _(p,c,257,s,l),y=new _(g,d,0,a,l),w=new _(new Array(0),u,0,19,7)}(),z=!0),e.l_desc=new k(e.dyn_ltree,b),e.d_desc=new k(e.dyn_dtree,y),e.bl_desc=new k(e.bl_tree,w),e.bi_buf=0,e.bi_valid=0,O(e)},r._tr_stored_block=F,r._tr_flush_block=function(e,t,r,n){var o,s,a=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<i;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),P(e,e.l_desc),P(e,e.d_desc),a=function(e){var t;for(D(e,e.dyn_ltree,e.l_desc.max_code),D(e,e.dyn_dtree,e.d_desc.max_code),P(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*h[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=r+5,r+4<=o&&-1!==t?F(e,t,r,n):4===e.strategy||s===o?(E(e,2+(n?1:0),3),R(e,p,g)):(E(e,4+(n?1:0),3),function(e,t,r,n){var o;for(E(e,t-257,5),E(e,r-1,5),E(e,n-4,4),o=0;o<n;o++)E(e,e.bl_tree[2*h[o]+1],3);M(e,e.dyn_ltree,t-1),M(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),R(e,e.dyn_ltree,e.dyn_dtree)),O(e),n&&L(e)},r._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(m[r]+i+1)]++,e.dyn_dtree[2*C(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){var t;E(e,2,3),I(e,256,p),16===(t=e).bi_valid?(S(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}},{"../utils/common":41}],53:[function(e,t,r){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,r){(function(e){!function(e){if(!e.setImmediate){var t,r,n,o,i=1,s={},a=!1,l=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,t="[object process]"==={}.toString.call(e.process)?function(e){process.nextTick(function(){u(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(o="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",h,!1):e.attachEvent("onmessage",h),function(t){e.postMessage(o+t,"*")}):e.MessageChannel?((n=new MessageChannel).port1.onmessage=function(e){u(e.data)},function(e){n.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(r=l.documentElement,function(e){var t=l.createElement("script");t.onreadystatechange=function(){u(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(u,0,e)},c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var r=new Array(arguments.length-1),n=0;n<r.length;n++)r[n]=arguments[n+1];var o={callback:e,args:r};return s[i]=o,t(i),i++},c.clearImmediate=d}function d(e){delete s[e]}function u(e){if(a)setTimeout(u,0,e);else{var t=s[e];if(t){a=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{d(e),a=!1}}}}function h(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&u(+t.data.slice(o.length))}}(typeof self>"u"?void 0===e?this:e:self)}).call(this,typeof Pb<"u"?Pb:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)}(Fb)),Fb.exports);const Bb=Db(Ub),Hb={config:{name:"DiagnosticsReporter",platforms:["web"]},report:async(e,t,r=[])=>{if(!e.reportName)throw new TypeError('Missing required "reportName" from options');const n=await jb(e,t,r);return e.environment&&Wb(e.environment,n.filename,n.archive),n}},jb=async(e,t,r)=>({filename:qb(e.reportName),archive:await Vb(t,r)}),Vb=async(e,t)=>{const r=new Bb;r.file("air.json",JSON.stringify(e));for(const e of t){const t=Gb(e.name),n=Zb(e.data);r.file(t,n)}return await r.generateAsync({type:"uint8array",compression:"DEFLATE",compressionOptions:{level:9}})},Wb=async(e,t,r)=>{const n=await Kb(e,t);return fetch(n,{body:r,headers:{"Content-Type":"application/zip"},method:"PUT"})},Kb=async(e,t)=>{const r=`https://${Qb[e]}/fileupload/tenants/gir/public/path/reports?url`,n=await fetch(r,{body:JSON.stringify({filename:t}),headers:{"Content-Type":"application/json"},method:"POST"}),{uploadUrl:o}=await n.json();return o},qb=e=>`${Yb(e)}.zip`,Gb=e=>{let t=Yb(e);return Jb(t)||(t+=".json"),t},Zb=e=>Array.isArray(e)?e.map(e=>(e=>{let t;try{return JSON.stringify(e,(e,t)=>{if(!(e=>/^_/.test(e))(e))return void 0===t?"undefined":t})}catch(e){e instanceof Error&&(t=e.message)}return JSON.stringify({exception:"UNABLE TO SERIALIZE DATA",errorMessage:t})})(e)).join("\n"):"string"!=typeof e?JSON.stringify(e):e,Yb=e=>e.replace(/[^0-9a-z_.]+/gi,"-"),Jb=e=>e.slice((Math.max(0,e.lastIndexOf("."))||1/0)+1),Qb={ed:"apied-int-fileupload.services-ed.goto.com",rc:"apirc-int-fileupload.services-rc.goto.com",stage:"apistage-int-fileupload.services-stage.goto.com",live:"api-fileupload.services.goto.com"},Xb=[];for(let e=0;e<256;++e)Xb.push((e+256).toString(16).slice(1));const ey=new Uint8Array(16);function ty(e,t,r){return crypto.randomUUID?crypto.randomUUID():function(e){const t=(e=e||{}
2).random??e.rng?.()??crypto.getRandomValues(ey);if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(e,t=0){return(Xb[e[t+0]]+Xb[e[t+1]]+Xb[e[t+2]]+Xb[e[t+3]]+"-"+Xb[e[t+4]]+Xb[e[t+5]]+"-"+Xb[e[t+6]]+Xb[e[t+7]]+"-"+Xb[e[t+8]]+Xb[e[t+9]]+"-"+Xb[e[t+10]]+Xb[e[t+11]]+Xb[e[t+12]]+Xb[e[t+13]]+Xb[e[t+14]]+Xb[e[t+15]]).toLowerCase()}(t)}(e)}const ry="GoToContainer.machineId",ny={config:{name:"ExecutionContext",platforms:["electron","web"]},getContext:()=>oy()??iy(),internalCache:{runId:ty(),machineId:null}},oy=()=>window[Ew]?.executionContext,iy=()=>{if(ny.internalCache.machineId)return{...ny.internalCache};if(ny.internalCache.machineId=localStorage.getItem(ry),ny.internalCache.machineId)return{...ny.internalCache};ny.internalCache.machineId=ty();try{localStorage.setItem(ry,ny.internalCache.machineId)}catch{}return{...ny.internalCache}};var sy;!function(e){e.MUTE="MUTE",e.ACCEPTCALL="ACCEPTCALL",e.REJECTCALL="REJECTCALL",e.HANGUP="HANGUP",e.RING="RING"}(sy||(sy={}));const ay="Hid is not available";var ly,cy;!function(e){e[e.LED=8]="LED",e[e.TELEPHONY=11]="TELEPHONY",e[e.CONSUMER=12]="CONSUMER"}(ly||(ly={})),function(e){e[e.MUTED=0]="MUTED",e[e.IN_CALL=1]="IN_CALL",e[e.RINGING=2]="RINGING"}(cy||(cy={}));const dy=(e,t)=>e<<16|t,uy=e=>{const t=(4294901760&e)>>16,r=Object.values(ly).indexOf(parseInt(t.toString(16),16)),n=Object.values(py).indexOf(e);return{usagePage:Object.keys(ly)[r],headsetHIDUsages:Object.keys(py)[n]}},hy=(e,t)=>{const r=Math.floor(t/8);return!!(e.getUint8(r)>>>t%8&1)};var py;!function(e){e[e.LED_MUTE=dy(ly.LED,9)]="LED_MUTE",e[e.LED_OFF_HOOK=dy(ly.LED,23)]="LED_OFF_HOOK",e[e.LED_RING=dy(ly.LED,24)]="LED_RING",e[e.LED_HOLD=dy(ly.LED,32)]="LED_HOLD",e[e.LED_MICROPHONE=dy(ly.LED,33)]="LED_MICROPHONE",e[e.LED_ONLINE=dy(ly.LED,42)]="LED_ONLINE",e[e.TELEPHONY_RINGER=dy(ly.TELEPHONY,158)]="TELEPHONY_RINGER",e[e.TELEPHONY_HOOK_SWITCH=dy(ly.TELEPHONY,32)]="TELEPHONY_HOOK_SWITCH",e[e.TELEPHONY_FLASH=dy(ly.TELEPHONY,33)]="TELEPHONY_FLASH",e[e.TELEPHONY_REDIAL=dy(ly.TELEPHONY,36)]="TELEPHONY_REDIAL",e[e.TELEPHONY_MUTE=dy(ly.TELEPHONY,47)]="TELEPHONY_MUTE",e[e.TELEPHONY_LINE_BUSY=dy(ly.TELEPHONY,151)]="TELEPHONY_LINE_BUSY",e[e.TELEPHONY_PROGRAMMABLE_BUTTON=dy(ly.TELEPHONY,7)]="TELEPHONY_PROGRAMMABLE_BUTTON"}(py||(py={}));const gy=()=>navigator.hid,fy=e=>{if(!e)return[];const t=new Array;for(const r of e){const e=r.items.map(e=>e.reportSize*e.reportCount).reduce((e,t)=>e+t),n={reportId:r.reportId,bitsUsage:new Array(e)};let o=0;for(const e of r.items)e.usages?.forEach((e,t)=>{e in py&&(n.bitsUsage[o+t]=e)}),o+=e.reportSize*e.reportCount;n.bitsUsage.some(e=>!!e)&&t.push(n)}return t},my=e=>`0x${e.toString(16).padStart(4,"0")}`;class vy{constructor(e){const t=[],r=[];e.collections.forEach(({outputReports:e,inputReports:n})=>{r.push(...fy(e)),t.push(...fy(n))}),this.inputDescriptors=t,this.outputDescriptors=r}getInputDescriptors(){return this.inputDescriptors}getOutputDescriptors(){return this.outputDescriptors}findInputByReportId(e){return this.inputDescriptors.find(t=>t.reportId===e)}findOutputByReportId(e){return this.outputDescriptors.find(t=>t.reportId===e)}findOutputByUsage(e){return this.outputDescriptors.find(t=>t.bitsUsage.some(t=>t===e))}}let by;const yy=()=>(by||(by=_b.createLogger("HID")),by);class wy{constructor(e){this.device=e}logInitialization(){const e=my(this.device.vendorId),t=my(this.device.productId);yy().info(`Initializing HID device: ${this.device.productName} (vendorId=${e}, productId=${t})`)}logDeviceCapabilities(e,t){yy().info("=== Device Report Structure ==="),this.logCollections(),this.logRecognizedReports(e,t),this.logSupportedUsages(e,t),yy().info("=== End Device Report Structure ===")}logReport(e,t){const r=this.calculateTotalBits(t.items);yy().info(`  ${e} Report ${t.reportId}: ${t.items.length} items, ${r} bits total`),t.items.forEach((e,t)=>{const r=this.formatItemUsages(e);yy().info(`    Item ${t}: size=${e.reportSize} count=${e.reportCount} usages=[${r}]`)})}logCollections(){this.device.collections.forEach((e,t)=>{const r=my(e.usagePage),n=my(e.usage);yy().info(`Collection ${t}: usagePage=${r} usage=${n}
2`),e.inputReports.forEach(e=>{this.logReport("Input",e)}),e.outputReports.forEach(e=>{this.logReport("Output",e)})})}logRecognizedReports(e,t){const r=e.map(e=>e.reportId).join(", "),n=t.map(e=>e.reportId).join(", ");yy().info(`Recognized Input Reports: [${r}]`),yy().info(`Recognized Output Reports: [${n}]`)}logSupportedUsages(e,t){const r=this.collectSupportedUsages(e,t),n=this.formatUsageNames(r);yy().info(`Supported Usages: [${n}]`)}collectSupportedUsages(e,t){const r=new Set;return[...e,...t].forEach(e=>{e.bitsUsage.forEach(e=>{void 0!==e&&r.add(e)})}),r}formatUsageNames(e){return Array.from(e).map(e=>uy(e).headsetHIDUsages).join(", ")}calculateTotalBits(e){return e.reduce((e,t)=>e+t.reportSize*t.reportCount,0)}formatItemUsages(e){return e.usages?e.usages.map(e=>my(e)).join(", "):e.isRange?`range(${my(e.usageMinimum)}-${my(e.usageMaximum)})`:"none"}}class xy{evaluateLineBusy(e,t,r){const n=e&&!1===t;return n&&r.isRinging?{action:sy.ACCEPTCALL,reason:"LINE_BUSY pressed while ringing, Yealink-style"}:n&&r.isInCall?{action:sy.HANGUP,reason:"LINE_BUSY pressed while in call, Yealink-style"}:{action:null,reason:`LINE_BUSY ${e?"pressed":"released"} but no matching state (previousValue=${t})`}}shouldIgnoreLineBusyInHookSwitch(e,t){return e&&t.isRinging}}class _y{evaluateLineBusy(e,t,r){return{action:null,reason:"IGNORE LINE_BUSY (used as status flag by this vendor)"}}shouldIgnoreLineBusyInHookSwitch(e,t){return!1}}class ky{static createStrategy(e){return 27027===e?new xy:new _y}}class Cy{constructor(){this.lastMuteCommandTime=0,this.lastRingCommandTime=0,this.ignoreUntilTime=0,this.MUTE_ECHO_IGNORE_MS=500,this.RING_ECHO_SUPPRESS_MS=1e3,this.RING_REJECT_WINDOW_MS=3e4,this.IGNORE_AFTER_RING_MS=500}recordMuteCommand(){this.lastMuteCommandTime=performance.now()}recordRingCommand(){this.lastRingCommandTime=performance.now(),this.ignoreUntilTime=performance.now()+this.IGNORE_AFTER_RING_MS}shouldIgnoreMuteEcho(){return performance.now()-this.lastMuteCommandTime<this.MUTE_ECHO_IGNORE_MS}isWithinRejectWindow(){const e=performance.now()-this.lastRingCommandTime;return e>this.RING_ECHO_SUPPRESS_MS&&e<this.RING_REJECT_WINDOW_MS}getTimeSinceRing(){return performance.now()-this.lastRingCommandTime}getTimeSinceMute(){return performance.now()-this.lastMuteCommandTime}shouldIgnoreAllReports(){return performance.now()<this.ignoreUntilTime}}class Sy{constructor(){this.inUseByAnotherApp=!1}isBlocked(){return this.inUseByAnotherApp}checkForRelease(e,t){this.inUseByAnotherApp&&this.isHookSwitchOff(e,t)&&this.releaseDevice()}checkForTakeover(e,t,r,n){this.inUseByAnotherApp||this.isIdle(r,n)&&this.isHookSwitchOn(e,t)&&this.blockDevice()}isHookSwitchOn(e,t){return e===py.TELEPHONY_HOOK_SWITCH&&t}isHookSwitchOff(e,t){return e===py.TELEPHONY_HOOK_SWITCH&&!t}isIdle(e,t){return!e&&!t}releaseDevice(){yy().info("Device released by other app (hook switch off detected)"),this.inUseByAnotherApp=!1}blockDevice(){yy().warn("Device appears to be controlled by another app (received HOOK_SWITCH=true while idle)"),this.inUseByAnotherApp=!0}}class Ey{constructor(e,t){this.timeWindowFilter=e,this.vendorStrategy=t}evaluate(e,t,r,n){return e&&r.isRinging?{action:sy.ACCEPTCALL,reason:"hook pressed while ringing"}:!e||r.isInCall||r.isRinging?!e&&!0===t&&r.isInCall?{action:sy.HANGUP,reason:"hook released while in call"}:!e&&r.isRinging?this.evaluateReject(t,r,n):{action:null,reason:`hook ${e?"pressed":"released"} but no matching state`}:{action:sy.ACCEPTCALL,reason:"hook pressed, not in call"}}evaluateReject(e,t,r){const n=r?.find(({usage:e,value:t})=>e===py.TELEPHONY_LINE_BUSY&&!0===t);if(this.vendorStrategy.shouldIgnoreLineBusyInHookSwitch(!!n,t))return{action:null,reason:"HOOK_SWITCH=false with LINE_BUSY=true, waiting for LINE_BUSY handler"};const o=this.timeWindowFilter.isWithinRejectWindow();return!0===e||o?{action:sy.REJECTCALL,reason:`hook=false, previousValue=${e}, timeSinceRing=${this.timeWindowFilter.getTimeSinceRing().toFixed(0)}ms`}:{action:null,reason:`hook released but outside reject window, timeSinceRing=${this.timeWindowFilter.getTimeSinceRing().toFixed(0)}ms`}}}class Iy{constructor(e){this.vendorStrategy=e}evaluate(e,t,r,n){return this.vendorStrategy.evaluateLineBusy(e,t,r)}}class Ay{evaluate(e,t,r,n){return e&&r.isRinging?{action:sy.REJECTCALL,reason:"programmable button pressed while ringing, Yealink-style"}:{action:null,reason:`programmable button ${e?"pressed":"released"} but no matching state`}}}class Ty{constructor(e){this.timeWindowFilter=e}evaluate(e,t,r,n){return e?this.timeWindowFilter.shouldIgnoreMuteEcho()?{action:null,reason:`IGNORE MUTE (echo ${this.timeWindowFilter.getTimeSinceMute()}ms after app command)`}:{action:sy.MUTE,reason:"MUTE/UNMUTE (physical button pressed)"}:{action:null,reason:"MUTE released (no action)"}}}class Oy{constructor(e){this.context=e}async execute(e=!0){const t=!0===this.context.deviceState.get(cy.MUT
2ED);yy().info("Action: "+(t?"UNMUTE":"MUTE"));const r=new Set;this.context.updateUsageState(r,py.LED_MUTE,!t),this.context.deviceState.set(cy.MUTED,!t),this.context.timeWindowFilter.recordMuteCommand(),await this.context.sendReports(r),e&&this.context.dispatchEvent(sy.MUTE)}}class Ly{constructor(e){this.context=e}async execute(){yy().info("Action: ACCEPT CALL");const e=new Set;this.context.updateUsageState(e,py.LED_OFF_HOOK,!0),this.context.updateUsageState(e,py.LED_ONLINE,!0),this.context.updateUsageState(e,py.TELEPHONY_HOOK_SWITCH,!0),this.context.updateUsageState(e,py.LED_RING,!1),this.context.updateUsageState(e,py.TELEPHONY_RINGER,!1),this.context.deviceState.set(cy.IN_CALL,!0),this.context.deviceState.set(cy.RINGING,!1),await this.context.sendReports(e),this.context.dispatchEvent(sy.ACCEPTCALL)}}class $y{constructor(e){this.context=e}async execute(){yy().info("Action: HANGUP");const e=new Set;this.context.updateUsageState(e,py.LED_OFF_HOOK,!1),this.context.updateUsageState(e,py.TELEPHONY_HOOK_SWITCH,!1),this.context.updateUsageState(e,py.TELEPHONY_LINE_BUSY,!1),this.context.updateUsageState(e,py.LED_ONLINE,!1),this.context.deviceState.set(cy.IN_CALL,!1),this.context.deviceState.set(cy.MUTED,!1),await this.context.sendReports(e),this.context.dispatchEvent(sy.HANGUP)}}class Ny{constructor(e){this.context=e}async execute(){yy().info("Action: REJECT CALL");const e=new Set;this.context.updateUsageState(e,py.LED_OFF_HOOK,!1),this.context.updateUsageState(e,py.TELEPHONY_HOOK_SWITCH,!1),this.context.updateUsageState(e,py.LED_RING,!1),this.context.updateUsageState(e,py.TELEPHONY_RINGER,!1),this.context.updateUsageState(e,py.LED_ONLINE,!1),this.context.deviceState.set(cy.RINGING,!1),await this.context.sendReports(e),this.context.dispatchEvent(sy.REJECTCALL)}}class Ry{constructor(e){this.context=e}async execute(){yy().info("Action: RING"),this.context.deviceState.get(cy.IN_CALL)&&(yy().info("Call in progress, resetting to initial state first"),await this.context.setToInitialState(),await new Promise(e=>setTimeout(e,500)));const e=new Set;this.context.updateUsageState(e,py.LED_RING,!0),this.context.updateUsageState(e,py.TELEPHONY_RINGER,!0),this.context.updateUsageState(e,py.TELEPHONY_LINE_BUSY,!1),this.context.deviceState.set(cy.RINGING,!0),this.context.timeWindowFilter.recordRingCommand(),await this.context.sendReports(e),this.context.dispatchEvent(sy.RING)}}class Py{get eventTarget(){return this._eventTarget}get device(){return this._device}constructor(e){this._eventTarget=new EventTarget,this.timeWindowFilter=new Cy,this.externalAppDetector=new Sy,this.programmableButtonHandler=new Ay,this.outputReportDescriptors=[],this.inputReportDescriptors=[],this.deviceState=new Map([[cy.MUTED,!1],[cy.IN_CALL,!1],[cy.RINGING,!1]]),this.states=new Map,this.handleInputReport=({data:e,reportId:t})=>{if(this.timeWindowFilter.shouldIgnoreAllReports())return void yy().info(`Ignoring input report (report ID: ${t}) - within post-RING ignore window`);const r=this.registry.findInputByReportId(t);if(!r)return void yy().warn(`Unknown input report ID ${t} from ${this._device.productName}. Known report IDs: [${this.inputReportDescriptors.map(e=>e.reportId).join(", ")}]`);if(!this.validateReportPayload(e,r,t))return;const n=((e,t)=>{const r=[];for(let n=0;n<t.bitsUsage.length;n++){const o=t.bitsUsage[n];if(void 0===o)continue;const i=hy(e,n);r.push({usage:o,value:i})}return r})(e,r);0!==n.length&&this.processUsageValues(n)},this._device=e,this.registry=new vy(e),this.logger=new wy(e),this.logger.logInitialization(),this.inputReportDescriptors.push(...this.registry.getInputDescriptors()),this.outputReportDescriptors.push(...this.registry.getOutputDescriptors()),this.vendorStrategy=ky.createStrategy(e.vendorId),this.hookSwitchHandler=new Ey(this.timeWindowFilter,this.vendorStrategy),this.lineBusyHandler=new Iy(this.vendorStrategy),this.muteHandler=new Ty(this.timeWindowFilter),this.handlerRegistry=new Map([[py.TELEPHONY_HOOK_SWITCH,this.hookSwitchHandler],[py.TELEPHONY_LINE_BUSY,this.lineBusyHandler],[py.TELEPHONY_PROGRAMMABLE_BUTTON,this.programmableButtonHandler],[py.TELEPHONY_MUTE,this.muteHandler]]);const t=this.createActionContext();this.muteAction=new Oy(t),this.acceptCallAction=new Ly(t),this.hangupAction=new $y(t),this.rejectCallAction=new Ny(t),this.ringAction=new Ry(t),this.logger.logDeviceCapabilities(this.registry.getInputDescriptors(),this.registry.getOutputDescriptors()),this._device.addEventListener("inputreport",this.handleInputReport)}
2async setToInitialState(){if(this.externalAppDetector.isBlocked())return void yy().warn("Skipping reset: device in use by another app");yy().info("Action: RESET TO INITIAL STATE");const e=new Set;[py.LED_OFF_HOOK,py.LED_ONLINE,py.LED_RING,py.LED_MUTE,py.TELEPHONY_HOOK_SWITCH,py.TELEPHONY_RINGER,py.TELEPHONY_LINE_BUSY,py.TELEPHONY_PROGRAMMABLE_BUTTON].forEach(t=>{const r=this.registry.findOutputByUsage(t);r&&(e.add(r.reportId),this.states.set(t,!1))}),await this.sendReports(e),this.deviceState.set(cy.IN_CALL,!1),this.deviceState.set(cy.MUTED,!1),this.deviceState.set(cy.RINGING,!1)}async triggerAction(e){if(this.externalAppDetector.isBlocked())yy().warn(`Blocking action ${e}: device in use by another app`);else switch(e){case sy.MUTE:await this.muteAction.execute(!1);break;case sy.ACCEPTCALL:await this.acceptCallAction.execute();break;case sy.HANGUP:await this.hangupAction.execute();break;case sy.RING:await this.ringAction.execute();break;case sy.REJECTCALL:await this.rejectCallAction.execute()}}validateReportPayload(e,t,r){const n=t.bitsUsage.length/8;return e.byteLength===n||(yy().warn(`Invalid payload size for report ${r}: expected ${n}, got ${e.byteLength}`),!1)}processUsageValues(e){const t=this.deviceState.get(cy.RINGING)??!1,r=this.deviceState.get(cy.IN_CALL)??!1;e.forEach(({usage:n,value:o})=>{const i=this.states.get(n);this.states.set(n,o),this.externalAppDetector.checkForRelease(n,o),this.externalAppDetector.checkForTakeover(n,o,t,r),i!==o&&this.handleUsageChange(n,o,i,e)});const n=e.find(({usage:e})=>e===py.TELEPHONY_HOOK_SWITCH);if(n){const t=this.states.get(py.TELEPHONY_HOOK_SWITCH);t!==n.value||this.handleUsageChange(n.usage,n.value,t,e)}}handleUsageChange(e,t,r,n){const o=this.createDeviceContext(),{action:i,reason:s}=this.evaluateUsageAction(e,t,r,n||[],o);i&&(yy().info(`DECISION: ${i} (${s})`),this.triggerAction(i))}createDeviceContext(){return{isRinging:this.deviceState.get(cy.RINGING)??!1,isInCall:this.deviceState.get(cy.IN_CALL)??!1,isMuted:this.deviceState.get(cy.MUTED)??!1,vendorId:this._device.vendorId}}createActionContext(){return{deviceState:this.deviceState,timeWindowFilter:this.timeWindowFilter,updateUsageState:this.updateUsageState.bind(this),sendReports:this.sendReports.bind(this),dispatchEvent:this.dispatchEvent.bind(this),setToInitialState:this.setToInitialState.bind(this)}}evaluateUsageAction(e,t,r,n,o){const i=this.handlerRegistry.get(e);if(!i){const{headsetHIDUsages:t}=uy(e);return{action:null,reason:`usage ${t} not handled`}}const s=i.evaluate(t,r,o,n);return e===py.TELEPHONY_MUTE&&t&&s.action===sy.MUTE?(this.muteAction.execute(!0),{action:null,reason:s.reason}):s}updateUsageState(e,t,r){const n=this.registry.findOutputByUsage(t);n&&(e.add(n.reportId),this.states.set(t,r))}async sendReports(e){const t=Array.from(e).map(e=>this.sendOutputReport(e));await Promise.all(t)}async sendOutputReport(e){const t=this.registry.findOutputByReportId(e);if(!t)return;const r=[];t.bitsUsage.forEach(e=>{if(void 0===e)return;const t=this.states.get(e)??!1,{headsetHIDUsages:n}=uy(e);r.push(`${n}=${t}`)}),yy().info(`Sending to headset (Report ID: ${e}): ${r.join(", ")}`);const n=((e,t)=>{const r=t.bitsUsage.length/8,n=new ArrayBuffer(r),o=new Uint8Array(n);return t.bitsUsage.forEach((t,r)=>{if(!t)return;const n=Math.floor(r/8),i=r%8;!0===e.get(t)&&(o[n]|=1<<i)}),o})(this.states,t);await this._device.sendReport(e,n)}dispatchEvent(e){this._eventTarget.dispatchEvent(new Event(e))}getUsagePageDescriptors(e,t,r=!1){const n={INPUT:[],OUTPUT:[]};return e.collections.forEach(({usagePage:e,inputReports:o,outputReports:i})=>{if(!t.includes(e))return;const s=this.extractUsages(o),a=this.extractUsages(i);n.INPUT.push(...this.formatDescriptors(s,r)),n.OUTPUT.push(...this.formatDescriptors(a,r))}),n}extractUsages(e){const t=[];for(const r of e)for(const e of r.items)Array.isArray(e.usages)&&t.push(...e.usages);return t}formatDescriptors(e,t){const r=[];for(const n of e){const{usagePage:e,headsetHIDUsages:o}=uy(n),i=n.toString(16),s=i.slice(0,1),a=i.slice(1,5),l=t?e:s,c=t?o?.toString()??a:a;let d=r.find(e=>e.usagePage===l);d||(d={usagePage:l,usages:[]},r.push(d)),c&&!d.usages.includes(c)&&d.usages.push(c)}return r}}const Dy=new Map,My=e=>{const t=Dy.get(e);if(!t)throw Error("This device is not opened.");return t};let zy=[];const Fy={config:{name:"Hid",platforms:["web"]},getHid(){return navigator?.hid},async getDevices(){return navigator.hid?(await gy().getDevices()).filter(({vendorId:e,productId:t})=>!zy.some(r=>r.productId===t&&r.vendorId===e)):Promise.reject(ay)},async requestDeviceAccess(e){const[t]=await gy().requestDevice(e);return t},async openDevice(e){!e.opened&&await e.open(),(e=>{Dy.get(e)||Dy.set(e,new Py(e))})(e)},async closeDevice(e){e.opened&&await e.close()},bindEvent(e){return My(e).eventTarget},async triggerAction(e,t){await My(e).triggerAction(t)},getDeviceState(e){return My(e).deviceState},resetToInitialState(e){My(e).setToInitialState()},isSupported(){return"hid"in navigator},setUnsupportedDevices:e=>{zy=e},getUsagePageDescriptors:(e,t,r=!1)=>My(e).getUsagePageDescriptors(e,t,r)},Uy=(e,t)=>"object"==typeof e&&"object"==typeof t?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>Uy(e[r],t[r])):e===t,By=(e,t)=>e.keyCombination.code>t.keyCombination.code?1:e.keyCombination.code<t.keyCombination.code?-1:((e,t)=>!e.global&&t.global?1:e.global&&!t.global?-1:0)(e,t),Hy=(e,t)=>{if(e.length!==t.length)return!1;const r=[...e].sort(By),n=[...t].sort(By);return Uy(n,r)},jy=e=>"object"==typeof e&&"string"==typeof e.code&&"boolean"==typeof e.ctrlKey&&"boolean"==typeof e.altKey&&"boolean"==typeof e.metaKey&&"boolean"==typeof e.shiftKey,Vy=(e,t,r,n)=>`action=${e} ${(e=>`code=${e.code} altKey=${e.altKey.toString()} ctrlKey=${e.ctrlKey.toString()} metaKey=${e.metaKey.toString()} shiftKey=${e.shiftKey.toString()}`)(t)} global=${n.toString()} shortcutId=${r}`,Wy=(e,t,r)=>{let n=`action=updateConfiguration type=${e}`;return r&&(n+=` shortcutId=${r}`),t&&(n+=` ${(e=>{let t=`configurationCount=${e.length}"`;return e.length&&(t+=` configuration="${JSON.stringify(e)}`),t})(t)}`),n},Ky=(e,t,r)=>`failure=${e} type=${t} error=${r}`;var qy;!function(e){e[e.MetaLeft=0]="MetaLeft",e[e.MetaRight=1]="MetaRight",e[e.AltLeft=2]="AltLeft",e[e.AltRight=3]="AltRight",e[e.ControlLeft=4]="Control
2Left",e[e.ControlRight=5]="ControlRight",e[e.ShiftLeft=6]="ShiftLeft",e[e.ShiftRight=7]="ShiftRight"}(qy||(qy={}));class Gy{getCode(e){return e?.split("Key")?.pop()?.toLowerCase()}}class Zy extends Gy{constructor(){super(...arguments),this.listOfCommandMacOsCombinationUnavailable=["c","v","a","z","x","f","g","h","m","o","p","s","t","w","q"]}isValidKeyboardShortcutKeyCombination({altKey:e,metaKey:t,ctrlKey:r,shiftKey:n,code:o}){const i=[];let s=!1;const a=this.getCode(o);return a&&!Object.keys(qy).map(e=>e.toLowerCase()).includes(a)&&(e||t||r||n)?!t||e||r||n||!this.listOfCommandMacOsCombinationUnavailable.some(e=>e==a)?(t&&e&&"escape"===a||t&&r&&("space"===a||"f"===a))&&i.push("AlreadyUsedSystem"):i.push("AlreadyUsedGoTo"):s=!0,{errorCodes:i,isInvalid:s||i.length>0}}}class Yy extends Gy{constructor(){super(...arguments),this.listOfControlWindowsCombinationUnavailable=["x","c","v","z","f4","a","d","e","r","y","arrowleft","arrowright","arrowdown","arrowup","escape","space","f10","f13"]}isValidKeyboardShortcutKeyCombination({altKey:e,metaKey:t,ctrlKey:r,shiftKey:n,code:o}){const i=[];let s=!1;const a=this.getCode(o);return a&&!Object.keys(qy).map(e=>e.toLowerCase()).includes(a)&&(e||t||r||n)?r&&!e&&!t&&!n&&this.listOfControlWindowsCombinationUnavailable.some(e=>e==a)&&i.push("AlreadyUsedGoTo"):s=!0,{errorCodes:i,isInvalid:s||i.length>0}}}class Jy{static getInstance(){return Jy.instance||(Jy.instance=window.navigator.userAgent.toLowerCase().indexOf("mac")>0?new Zy:new Yy),Jy.instance}}let Qy={},Xy=0;const ew=new Map;let tw=_b.createLogger("KeyboardShortcuts");const rw={config:{name:"KeyboardShortcuts",platforms:["web"]},subscribe:async(e,t,r)=>{const n=Xy++,o=await nw(e,t,r),i={shortcutId:e,windowForLocalShortcuts:t,onShortcutPressedListener:r,internalUnsubscribeFn:o};return ew.set(n,i),async()=>{const t=ew.get(n);if(!t)throw new Error(`Keyboard shortcuts unsubscribe function for shortcut ${e} called more than once`);ew.delete(n),await t.internalUnsubscribeFn()}},systemInterface:{initializeLogger:e=>{tw=e},updateConfiguration:async(e,t)=>{const r={...Qy};Qy[e]=t,await sw(r,e),tw.log(Wy("updateConfiguration",t,e))},updateConfigurations:async e=>{const t=Qy;Qy=e,await sw(t),tw.log(Wy("updateConfigurations"))},isValidConfiguration:e=>{if("object"!=typeof e)return!1;try{for(const t in e){const r=e[t];if(!Array.isArray(r))return!1;for(let e=0;e<r.length;e++)if(!jy(r[e].keyCombination))return!1}return!0}catch(e){return console.error(e),!1}},isValidKeyboardShortcutKeyCombination:e=>Jy.getInstance().isValidKeyboardShortcutKeyCombination(e)}},nw=async(e,t,r)=>{const n=Qy[e]??[],o=[];for(const i of n)if(i.global)try{const t=await ow(e,r,i.keyCombination);o.push(t)}catch(e){throw tw.error(Ky("subscribe","global",JSON.stringify(e))),new Error(`${e}`)}else{const n=iw(e,t,r,i.keyCombination,i.useKeyUp);o.push(async()=>n())}return async()=>{for(const e of o)try{await e()}catch(e){tw.error(Ky("unsubscribe","global",JSON.stringify(e)))}}},ow=async(e,t,r)=>{const n=(()=>{const e=globalThis[Ew];if(e)return e.plugins.GlobalKeyboardShortcuts})();return n?await n.subscribe(r,n=>{t(e),tw.log(Vy("press",r,e,!0))}):(tw.error(Ky("pluginNotAvailable","global")),async()=>{})},iw=(e,t,r,n,o)=>{const i=o?"keyup":"keydown",s=t=>{if(!t.repeat&&((e,t)=>e.code===t.code&&e.altKey===t.altKey&&e.ctrlKey===t.ctrlKey&&e.metaKey===t.metaKey&&e.shiftKey===t.shiftKey)(t,n))return r(e),tw.log(Vy("press",n,e,!1)),t.preventDefault(),t.stopPropagation(),!1};return t.addEventListener(i,s),()=>t.removeEventListener(i,s)},sw=async(e,t)=>{const r=[...ew.keys()];for(const n of r){let r=ew.get(n);if(!r||t&&r.shortcutId!==t)continue;const o=e[r.shortcutId]??[],i=Qy[r.shortcutId]??[];if(Hy(o,i))continue;const s=r.internalUnsubscribeFn;r.internalUnsubscribeFn=async()=>{},await s();const a=await nw(r.shortcutId,r.windowForLocalShortcuts,r.onShortcutPressedListener);r=ew.get(n),r?r.internalUnsubscribeFn=a:await a()}},aw=new Map,lw=new Map;let cw=0;const dw=new Map,uw={config:{name:"Notification",platforms:["web"]},isSupported:async()=>"Notification"in globalThis,show:async e=>{await hw();const{title:t,body:r}=pw(e.texts),{icon:n,image:o}=gw(e.images??[]),i=new globalThis.Notification(t,{body:r,icon:n,image:o,silent:e.silent});fw(i,e,mw),aw.set(e.id,i)},close:async e=>{const t=aw.get(e);if(!t)throw new Error(`Notification not found in map by ID ${e}`);t.close(),aw.delete(e)},subscribeForEvents:async(e,t)=>{const r=cw++,n=dw.get(e);if(n)n.set(r,t);else{dw.set(e,new Map([[r,t]]));const n=lw.get(e);
2n&&(n.forEach(e=>t(e)),lw.delete(e))}return async()=>{const t=dw.get(e);if(!t)throw new Error(`Listener not found in map by source ${e}`);if(!t.delete(r))throw new Error(`Listener not found in map by ID ${r}`);0===t.size&&dw.delete(e)}}},hw=async()=>{if("denied"===globalThis.Notification.permission||"default"===globalThis.Notification.permission&&"granted"!==await globalThis.Notification.requestPermission())throw new Error("Permission not granted for notifications")},pw=e=>{let t,r="";return e.length>0&&(r=e[0].content,e.length>1&&(t=e.slice(1).map(e=>e.content).join("\n"))),{title:r,body:t}},gw=e=>{let t,r;return e.length>0&&(t=e[0].url,e.length>1&&(r=e[1].url)),{icon:t,image:r}},fw=(e,t,r)=>{const n=e=>r({notificationId:t.id,notificationSource:t.source,eventId:e});e.onshow=e=>n("show"),e.onclick=e=>n("click"),e.onclose=e=>n("close")},mw=e=>{const t=dw.get(e.notificationSource);if(t)t.forEach(t=>t(e));else{const t=lw.get(e.notificationSource);t?t.push(e):lw.set(e.notificationSource,[e])}},vw={config:{name:"WindowManager"},createWindow:(e,t,r)=>{const n=e||"about:blank",o=r?.groupId?`${r.groupId}-${t}`:t,i=o||n;let s;r?.saveSizeAndPosition&&(s=ww(i),s&&(r.features={...r.features,...s}));const a=r?.openAsSibling?window.opener:window;if(!a)return null;const l=a.open(n,o,bw(r?.features));if(!l)return null;if(r?.saveSizeAndPosition){if(s){const e=()=>{if(kw(l))return;const e=_w(l.screen),t=e.x+l.screen.availWidth/3,r=e.y+l.screen.availHeight/3,n=l.screen.availWidth/3,o=l.screen.availHeight/3;l.moveTo(t,r),l.resizeTo(n,o)};l.addEventListener("DOMContentLoaded",e,{once:!0})}const e=()=>{kw(l)&&xw(i,{left:l.screenLeft,top:l.screenTop,width:l.innerWidth,height:l.innerHeight})};l.addEventListener("blur",e)}return r?.store&&(l.window.ReduxStore=r.store),window.WindowManagerState||(window.WindowManagerState={}),l.window.WindowManagerState=window.WindowManagerState,l},getStore:()=>window.ReduxStore,getState:e=>window.WindowManagerState?.[e],addToState:(e,t)=>(window.WindowManagerState||(window.WindowManagerState={}),window.WindowManagerState[e]=t,t),removeFromState:e=>{window.WindowManagerState&&delete window.WindowManagerState[e]}},bw=(e={})=>Object.keys(e).reduce((t,r)=>{const n=e[r];return"boolean"==typeof n?t.push(`${r}=${n?"yes":"no"}`):"gotoWindowTitleBarColors"===r&&e.gotoWindowTitleBarColors?t.push(`${r}=${(e=>encodeURIComponent(JSON.stringify(e)))(e.gotoWindowTitleBarColors)}`):t.push(`${r}=${n}`),t},[]).join(",")||void 0,yw="goto.container.WindowManagerSizeAndPosition",ww=e=>{const t=localStorage.getItem(`${yw}${e}`);if(t)try{return JSON.parse(t)}catch{}},xw=(e,t)=>localStorage.setItem(`${yw}${e}`,JSON.stringify(t)),_w=e=>({x:e.availLeft??0,y:e.availTop??0}),kw=e=>{const t=_w(e.screen);return Cw(e.screenLeft,t.x,t.x+e.screen.availWidth)&&Cw(e.screenTop,t.y,t.y+e.screen.availHeight)&&e.innerWidth>
20&&e.innerHeight>0},Cw=(e,t,r)=>e>=t&&e<=r,Sw=Object.freeze(Object.defineProperty({__proto__:null,Badge:ub,DesktopCompanion:Rb,DiagnosticsReporter:Hb,ExecutionContext:ny,Hid:Fy,KeyboardShortcuts:rw,Logger:_b,Notification:uw,WindowManager:vw},Symbol.toStringTag,{value:"Module"})),Ew="AppContainer",Iw=(new class{constructor(e="web",t=!1){this.platform=e,this.isNative=t,this.plugins={},this.shouldMergePlugin=e=>!e.config?.platforms||e.config?.platforms.includes(this.platform),this.addPlugins(Object.values(Sw));const r=globalThis[Ew];r&&(this.platform=r.platform,this.isNative=!!r.isNative,this.addPlugins(Object.values(r.plugins)),r.bridgeIncompatiblePluginsPromise&&(this.plugins.DisplayMedia={config:{name:"DisplayMedia",platforms:["electron"]},load:async()=>(await r.bridgeIncompatiblePluginsPromise,globalThis?.BridgeIncompatiblePlugins?.DisplayMedia)})),this.plugins=new Proxy(this.plugins,{get:(e,t)=>{if(typeof e[t]>"u"){let e=this;return new Proxy({},{get:(r,n)=>typeof r[n]>"u"?e.pluginMethodNoop.bind(e,r,n,t):r[n]})}return e[t]}})}pluginMethodNoop(e,t,r){return Promise.reject(`${r} plugin not found for ${this.platform}.`)}isPluginAvailable(e){return this.plugins.hasOwnProperty(e)}addPlugin(e){if(!this.plugins.hasOwnProperty(e.config.name)||this.shouldMergePlugin(e))if(this.isNative&&!0===e.config.isAsync){const t={config:e.config,load:async()=>{await(globalThis[Ew].webContextPluginsPromise||Promise.reject(Error(`could not load async plugin ${e.config.name}, unsupported container version?`)));const t=globalThis.__LMIGoToContainerPrivate_WebContextPlugins__;return t&&t.hasOwnProperty(e.config.name)?t[e.config.name]:Promise.reject(Error(`${e.config.name} not found, async plugin failed to load in web context.`))}};this.plugins[e.config.name]=t}else this.plugins[e.config.name]=e}addPlugins(e){for(const t of e)this.addPlugin(t)}}).plugins,Aw=[];for(let e=0;e<256;++e)Aw.push((e+256).toString(16).slice(1));const Tw=new Uint8Array(16);function Ow(e,t,r){return crypto.randomUUID?crypto.randomUUID():function(e){const t=(e=e||{}).random??e.rng?.()??crypto.getRandomValues(Tw);if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(e,t=0){return(Aw[e[t+0]]+Aw[e[t+1]]+Aw[e[t+2]]+Aw[e[t+3]]+"-"+Aw[e[t+4]]+Aw[e[t+5]]+"-"+Aw[e[t+6]]+Aw[e[t+7]]+"-"+Aw[e[t+8]]+Aw[e[t+9]]+"-"+Aw[e[t+10]]+Aw[e[t+11]]+Aw[e[t+12]]+Aw[e[t+13]]+Aw[e[t+14]]+Aw[e[t+15]]).toLowerCase()}(t)}(e)}const Lw=(e,t,r,n,o,i)=>new Promise((s,a)=>{const l=i.timeoutMs??5e3,c=setTimeout(()=>{e.removeMessageEventListener(r,d),a(new Error("Request timed out"))},l),d=t=>{const n=t.message.payload;o(n)&&(clearTimeout(c),e.removeMessageEventListener(r,d),s(n))};e.addMessageEventListener(r,d),e.send({type:t,payload:n})}),$w=async(e,t,r,n,o,i,s,a,l,c)=>{const d=e=>{const t=e.message.payload;a(t)};e.addMessageEventListener(n,d);try{await Lw(e,t,r,i,s,c)}catch(t){throw e.removeMessageEventListener(n,d),t}return()=>{e.removeMessageEventListener(n,d),e.send({type:o,payload:l})}};class Nw{constructor(e){this.plugin=e}connectionStatus(){return this.plugin.connectionStatus}async startConnecting(e,t){const r=await(async e=>{const t=await fetch(e);if(!t.ok)throw new Error(`Response status from url ${e}: ${t.status}`);const r=await t.json();if(!(e=>!!e&&"object"==typeof e&&"ports"in e&&Array.isArray(e.ports)&&e.ports.every(e=>"number"==typeof e))(r))throw new Error(`Invalid desktop companion config format at url ${e}`);return r})(e);this.plugin.startConnecting({ports:r.ports,autoReconnect:t})}disconnect(){this.plugin.disconnect()}addEventListener(e,t,r){this.plugin.addEventListener(e,t,r)}removeEventListener(e,t,r){this.plugin.removeEventListener(e,t,r)}waitForConnectionStatus(e,t){return new Promise((r,n)=>{if(this.connectionStatus()===e)return void r();let o;const i=()=>{this.removeEventListener("connectionStatusChanged",s),void 0!==o&&(clearTimeout(o),o=void 0)},s=t=>{t.connectionStatus===e&&(i(),r())};this.addEventListener("connectionStatusChanged",s),o=setTimeout(()=>{o=void 0,i(),n(new Error(`Timeout waiting ${t} ms for connection status ${e}`))},t)})}}var Rw=(e=>(e.isApiSupportedRequest="desktop-companion-is-api-supported-request",e.isApiSupportedResponse="desktop-companion-is-api-supported-response",e.apiSupportedChangedSubscriptionRequest="desktop-companion-api-supported-changed-subscription-request",e.apiSupportedChangedSubscriptionResponse="desktop-companion-api-supported-changed-subscription-response",e.apiSupportedChangedSubscriptionEvent="desktop-companion-api-supported-changed-subscription-event",e.apiSupportedChangedSubscriptionCancellation="desktop-companion-api-supported-changed-subscription-cancellation",e.request="desktop-companion-request",e.response="desktop-companion-response",e.subscriptionRequest="desktop-companion-subscription-request",e.subscriptionResponse="desktop-companion-subscription-response",e.subscriptionEvent="desktop-companion-subscription-event",e.subscriptionCancellation="desktop-companion-subscription-cancellation",e))(Rw||{});const Pw=new class extends Nw{async isApiSupported(e,t){const r={requestUuid:Ow(),apiId:e};return(await Lw(this.plugin,Rw.isApiSupportedRequest,Rw.isApiSupportedResponse,r,e=>e.requestUuid===r.requestUuid,t)).result}async subscribeForApiSupportedChanged(e,t,r){const n={subscriptionUuid:Ow(),apiId:t},o={subscriptionUuid:n.subscriptionUuid};return await $w(this.plugin,Rw.apiSupportedChangedSubscriptionRequest,Rw.apiSupportedChangedSubscriptionResponse,Rw.apiSupportedChangedSubscriptionEvent,Rw.apiSupportedChangedSubscriptionCancellation,n,e=>e.subscriptionUuid===n.subscriptionUuid,t=>{t.subscriptionUuid===n.subscriptionUuid&&e(t.eventData)},o,r)}waitForApiSupportedStatus(e,t,r){return new Promise(async(n,o)=>{let i,s;const a=()=>
2{i&&(i(),i=void 0),void 0!==s&&(clearTimeout(s),s=void 0)},l=e=>{e===t&&(a(),n())};i=await this.subscribeForApiSupportedChanged(l,e,{}),s=setTimeout(()=>{s=void 0,a(),o(new Error(`Timeout waiting ${r} ms for supported status ${t} of API ${e}`))},r),l(await this.isApiSupported(e,{}))})}async request(e,t,r){const n={apiId:e,requestUuid:Ow(),request:t};return(await Lw(this.plugin,Rw.request,Rw.response,n,e=>e.requestUuid===n.requestUuid,r)).response}async requestSubscription(e,t,r,n){const o={apiId:e,subscriptionUuid:Ow(),subscriptionRequest:t},i={subscriptionUuid:o.subscriptionUuid};return await $w(this.plugin,Rw.subscriptionRequest,Rw.subscriptionResponse,Rw.subscriptionEvent,Rw.subscriptionCancellation,o,e=>e.subscriptionUuid===o.subscriptionUuid,e=>{e.subscriptionUuid===o.subscriptionUuid&&r(e.eventData)},i,n)}}(Iw.DesktopCompanion),Dw=class e{constructor(e){this.desktopCompanionClient=e}isUserSignedIn(){return this.desktopCompanionClient.request(e.apiId,{msg:"is-user-signed-in",payload:void 0},{})}getUserAvatar(){return this.desktopCompanionClient.request(e.apiId,{msg:"get-user-avatar",payload:void 0},{})}getUserName(){return this.desktopCompanionClient.request(e.apiId,{msg:"get-user-name",payload:void 0},{})}getUserPresence(){return this.desktopCompanionClient.request(e.apiId,{msg:"get-user-presence",payload:void 0},{})}subscribeForUserPresenceChanged(t){return this.desktopCompanionClient.requestSubscription(e.apiId,{event:"user-presence-changed",subscriptionOptions:void 0},t,{})}getPbxInfo(){return this.desktopCompanionClient.request(e.apiId,{msg:"get-pbx-info",payload:void 0},{})}changeToPbx(t){return this.desktopCompanionClient.request(e.apiId,{msg:"change-to-pbx",payload:t},{})}subscribeForPbxChanged(t){return this.desktopCompanionClient.requestSubscription(e.apiId,{event:"pbx-changed",subscriptionOptions:void 0},t,{})}login(t){return this.desktopCompanionClient.request(e.apiId,{msg:"login",payload:t},{})}logout(){return this.desktopCompanionClient.request(e.apiId,{msg:"logout",payload:void 0},{})}getToken(){return this.desktopCompanionClient.request(e.apiId,{msg:"get-token",payload:void 0},{})}subscribeForAuthTokenChanged(t){return this.desktopCompanionClient.requestSubscription(e.apiId,{event:"auth-token-changed",subscriptionOptions:void 0},t,{})}};Dw.apiId="shell-desktop-client-api-id-421CEDC9-6EC4-4A37-A975-A48E373E8B15";const Mw=new Dw(Pw),zw=Object.freeze(Object.defineProperty({__proto__:null,core:Mw},Symbol.toStringTag,{value:"Module"})),Fw=()=>Pw.connectionStatus(),Uw=e=>Pw.startConnecting(`${(()=>{if(typeof window<"u"&&window.location?.origin)return window.location.origin})()??"https://app.goto.com"}/assets/desktopCompanion.json`,e),Bw=(e,t)=>Pw.addEventListener("connectionStatusChanged",e,t),Hw=(e,t)=>Pw.removeEventListener("connectionStatusChanged",e,t),jw=Object.freeze(Object.defineProperty({__proto__:null,addConnectionStatusChangedEventListener:Bw,connectionStatus:Fw,disconnect:()=>Pw.disconnect(),isApiSupported:e=>Pw.isApiSupported(e,{}),removeConnectionStatusChangedEventListener:Hw,startConnecting:Uw,subscribeForApiSupportedChanged:(e,t)=>Pw.subscribeForApiSupportedChanged(e,t,{}),waitForApiSupportedStatus:(e,t,r)=>Pw.waitForApiSupportedStatus(e,t,r),waitForConnectionStatus:(e,t)=>Pw.waitForConnectionStatus(e,t)},Symbol.toStringTag,{value:"Module"}));class Vw extends Event{constructor(e,t){super("authTokenChanged"),this.currentAuthToken=e,this.previousAuthToken=t}}var Ww=(e=>(e.validToken="validToken",e.undefined="undefined",e))(Ww||{});class Kw{constructor(){this.eventTarget=new EventTarget,this.onConnectionStatusChanged=e=>{e.connectionStatus===v.connected?this.onConnected():this.onDisconnected()},this.onAuthTokenChanged=e=>{this.updateAuthToken(e)}}async start(){this.stop(),Bw(this.onConnectionStatusChanged),Fw()===v.connected?await this.onConnected():this.onDisconnected()}stop(){this.unsubscribeFromTokenChanges&&(this.unsubscribeFromTokenChanges(),this.unsubscribeFromTokenChanges=void 0),Hw(this.onConnectionStatusChanged)}getAuthToken(){return this.authToken}getAuthTokenStatus(){return this.authToken?"validToken":"undefined"}async waitForAuthTokenStatus(e,t){return new Promise((r,n)=>{if(this.getAuthTokenStatus()===e)return void r();let o;const i=()=>{this.removeEventListener("authTokenChanged",s),void 0!==o&&(clearTimeout(o),o=void 0)},s=()=>{this.getAuthTokenStatus()===e&&(i(),r())};this.addEventListener("authTokenChanged",s),o=setTimeout(()=>{o=void 0,i(),n(new Error(`Timeout waiting ${t} ms for auth token status ${e}`))},t)})}addEventListener(e,t,r){this.eventTarget.addEventListener(e,t,r)}removeEventListener(e,t,r){this.eventTarget.removeEventListener(e,t,r)}async onConnected(){this.unsubscribeFromTokenChanges&&(this.unsubscribeFromTokenChanges(),this.unsubscribeFromTokenChanges=void 0),this.unsubscribeFromTokenChanges=await Mw.subscribeForAuthTokenChanged(this.onAuthTokenChanged),this.updateAuthToken(await Mw.getToken())}onDisconnected(){this.updateAuthToken(void 0)}updateAuthToken(e){const t=this.authToken;(void 0!==t&&void 0===e||void 0===t&&void 0!==e||void 0!==t&&void 0!==e&&t.access_token!==e.access_token)&&(this.authToken=e,this.eventTarget.dispatchEvent(new Vw(e,t)))}}const qw=class e extends Rg{constructor(){super(...arguments),this.desktopAppAuthTokenObserver=new Kw,this.onDesktopAppAuthTokenChanged=t=>{if(!t.previousAuthToken&&t.currentAuthToken){const r=e.appTokenFromSdkToken(t.currentAuthToken);ki(r);const n=Wg()??wa;yn(n)}else if(t.previousAuthToken&&!t.currentAuthToken)Si(),yn(wa);else if(t.previousAuthToken&&t.currentAuthToken){const r=e.appTokenFromSdkToken(t.currentAuthToken);ki(r)}}}async auth(){if(!this.isAuthenticationRequired())return;await this.desktopAppAuthTokenObserver.start();try{await this.desktopAppAuthTokenObserver.waitForAuthTokenStatus(Ww.val
2idToken,e.WAIT_FOR_VALID_TOKEN_TIMEOUT_MS)}catch{}this.desktopAppAuthTokenObserver.addEventListener("authTokenChanged",this.onDesktopAppAuthTokenChanged);const t=this.desktopAppAuthTokenObserver.getAuthToken(),r=e.appTokenFromSdkToken(t);return r?ki(r):(Si(),this.navigateToLandingPage()),r}authProcess(e,t,r){Mw.login()}async logout(){await Mw.logout()}getLogoutURL(e){throw new Error("Method not needed")}requestToken(){throw new Error("Method not needed")}static appTokenFromSdkToken(e){if(e)return new gi.Token(e)}};qw.WAIT_FOR_VALID_TOKEN_TIMEOUT_MS=6e3;let Gw,Zw=qw;const Yw=async()=>(Gw||(Gw=await Jw()),Gw),Jw=async()=>{let e;if(oa()&&It.isPluginAvailable("BrowserAuth"))e=Th().isCompanion?new tb:new Pg;else{const t=await lb();e=t===qc.POPUP?new ib:t===qc.DESKTOP_APP?new Zw:Th().supportsCompanion?new eb:new Dg}return e},Qw=async e=>await(await Yw()).login(e),Xw=async()=>await(await Yw()).loginOnce();class ex extends Error{constructor(e){const{message:t,response:r,status:n,statusText:o,body:i}=e;super(t),this.response=r,this.status=n,this.statusText=o,this.body=i??null,this.name="HttpResponseError",Object.setPrototypeOf(this,ex.prototype)}toString(){return`${this.name}: ${this.message}\nStatus: ${this.status}\nStatus Text: ${this.statusText}\nMessage: ${this.message}`}}const tx=()=>(e=>Gi(e,{timeoutInMS:5e3}).then(()=>!0).catch(()=>!1))(`${Sh()}/shell-bff/v1/health/healthcheck`),rx=()=>{Si(),Ei()};let nx,ox,ix=!1;const sx={modalTitle:ws("Your session expired"),modalContent:ws("You were inactive a while. To continue where you left off, refresh your session."),modalSignOutActionLabel:ws("Sign out"),modalRefreshActionLabel:ws("Refresh session")},ax=()=>(ix||(ix=!0,nx=dx().then(()=>{ix=!1})),nx),lx=e=>{e&&(Ln(e),e=void 0)},cx=e=>{const t=(e=>{const{issued:t,expires:r}=e;return t+.6*(r-t)})(e);lx(ox);const r=()=>{ox=On(()=>{const e=Date.now();e>t&&(eo().info("refreshTokenInterval: token refresh time reached",{tokenRefreshTime:t,currentTime:e,overdueByMs:e-t}),lx(ox),tx().then(e=>{e?ax():(eo().warn("refreshTokenInterval: backend not reachable, retrying"),r())}))},5e3)};r()},dx=async()=>{const e=ms()<fs(),t=oa(),r=!!e&&(t||await ra.isLoggedIn());return eo().info("refreshAuth decision",{isContainer:t,canQueryNewRefreshToken:e,shouldRefreshPKCETokens:r,refreshTokenCounter:ms(),refreshTokenLimit:fs()}),r?await ux():await hx()},ux=async()=>{const e=_i();if(!e)return eo().warn("refreshPKCETokens: no valid refresh token available, falling back to refreshLogin"),await hx();try{const{authUrl:t,authClientId:r}=Wn(),n=new URLSearchParams({grant_type:"refresh_token",client_id:r,refresh_token:e}),o=await Gi(`${t}/oauth/token`,{method:"POST",body:n,retry:{maxRetryNumber:3,exponential:!0,randomized:!0,retryAfterInMilliseconds:1e3,retryOn:async({value:e,error:t})=>!!t||e.status>=400&&401!==e.status}}),{status:i,statusText:s}=o;if(i>=400)throw new ex({message:s,response:o,status:i,statusText:s});const a=new gi.Token(await o.json());ad(a),a.refresh_token&&(Ci(a.refresh_token),delete a.refresh_token),ki(a),cx(a),(()=>{const e=ms()+1;kn(ps,JSON.stringify(e))})(),eo().info("refreshPKCETokens: token refreshed successfully",{refreshTokenCounter:ms()})}catch(e){const t="shell encountered an error while refreshing the token";if(e instanceof ex?eo().error(t,e,{httpStatus:e.status,httpStatusText:e.statusText}):eo().error(t,e),await Tg(rx))return void await(async()=>{l()&&await bg()&&Nn()})();
2const r=l()?.display;if(r){const e=r.modal({target:window,title:on(sx.modalTitle),actions:[{label:on(sx.modalRefreshActionLabel),handler(){e.close(),Qw()}},{label:on(sx.modalSignOutActionLabel),variant:"neutral",handler(){e.close(),l().auth.logout()}}],id:"shellSessionExpiredModal",content:on(sx.modalContent)})}else await hx()}},hx=()=>bg().then(px),px=e=>{if(e)return Ei(),Xw();eo().warn("tryContinueToLogin: canReloadApplication resolved false, login skipped")};class gx{constructor(e,t){this.limit=e,this.intervalMs=t,this.requestTimestampsMsWithinInterval=[]}isAllowed(){return 0===this.timeMsUntilAllowed()}timeMsUntilAllowed(){const e=Date.now();if(this.removeOldRequests(e),this.requestTimestampsMsWithinInterval.length<this.limit)return 0;const t=this.requestTimestampsMsWithinInterval.length-this.limit,r=this.requestTimestampsMsWithinInterval[t]+this.intervalMs;return Math.max(0,r-e)}recordRequest(){const e=Date.now();this.requestTimestampsMsWithinInterval.push(e)}removeOldRequests(e){const t=e-this.intervalMs+1,r=this.requestTimestampsMsWithinInterval.findIndex(e=>e>=t);r>=0?this.requestTimestampsMsWithinInterval.splice(0,r):this.requestTimestampsMsWithinInterval.splice(0,1/0)}}class fx extends Error{constructor(e){super(e),this.name="SessionEndedError",Object.setPrototypeOf(this,fx.prototype)}}const mx=new class{constructor(e,t,r){this.name=e,this.limit=t,this.intervalMs=r,this.map=new Map}waitUntilAllowed(e){const t=this.getOrCreateRateLimiter(e).timeMsUntilAllowed();return 0===t?Promise.resolve():(eo().warn("Rate limit reached",{name:this.name,key:e,timeToWaitMs:t}),new Promise(e=>An(e,t)))}recordRequest(e){this.getOrCreateRateLimiter(e).recordRequest()}getOrCreateRateLimiter(e){let t=this.map.get(e);return t||(this.cleanupRateLimitersIfNeeded(),t=new gx(this.limit,this.intervalMs),this.map.set(e,t)),t}cleanupRateLimitersIfNeeded(){this.map.size>200&&(eo().log("Clearing rate limit map",{name:this.name}),this.map.clear())}}("authenticatedFetch",10,3e3),vx=async()=>{let e=wi(),t=0;for(;!e&&t<2;)t++,await ax(),e=wi();return e},bx=async(e,t)=>{const r="string"==typeof e?e:e.url,n=t?.method||("string"==typeof e?"GET":e.method),o={url:Nu(r),method:n};eo().log("AuthenticatedFetch: Request started",o),await(async(e,t)=>{const r="string"==typeof e?e:e.url,n=`${o=e,i=t,i?.method?i.method:"string"==typeof o?"GET":o.method} ${r}`;var o,i;await mx.waitUntilAllowed(n),mx.recordRequest(n)})(e,t);const i=await vx();if(!i?.access_token||!i.token_type)throw eo().warn("AuthenticatedFetch: no valid token after retries, triggering logout",o),await l().auth.logout(),new fx("shell encountered an error while trying to get a new token.");const s=t?.timeoutInMS??3e4,a=await(async(e,t,r)=>{const{token_type:n,access_token:o}=e,i=new Headers(r?.headers);return i.set("Authorization",`${n} ${o}`),await Gi(t,{credentials:"include",...r,headers:i})})(i,e,{...t,timeoutInMS:s}),{body:c,status:d,statusText:u}=a;if(401===d)eo().log("AuthenticatedFetch: 401 Unauthorized, refreshing authentication",{...o,status:d}),await ax();else if(d>=400){const e=yx(a);throw eo().log("AuthenticatedFetch: Request failed",{...o,status:d,statusText:u,requestId:e}),new ex({message:`${d}: ${u}${e?` (Request ID: ${e})`:""}`,response:a,status:d,statusText:u,body:c})}return eo().log("AuthenticatedFetch: Request successful",{...o,status:d}),a},yx=e=>e.headers?.get("J-Request-Id");var wx=(e=>(e.GoToMeeting="g2m",e.GoToWebinar="g2w",e.Concierge="concierge",e.Grasshopper="grasshopper",e.OpenVoice="openvoice",e.GoToMyPC="g2p",e.GoToTraining="g2t",e.GoToAssist="g2a",e.GoToAssistSeeit="g2aseeit",e.GoToAssistServiceDesk="g2asd",e.GoToAssistRemoteSupport="g2ars",e.PromptAI="prompt",e.Jive="jive",e.HVoice="hvoice",e.RescueAssist="rescueAssist",e.GoToConnect="gotoconnect",e))(wx||{});class xx extends Error{constructor(e){super(),this.errors=e}toString(){return this.errors.map(e=>`Code: ${e.code}, Message: ${e.message}`).join("\n")}}const _x=()=>sg(),kx=()=>{const e=new Map;return _x().getExtensionConfigs().forEach(t=>{t?.prerequisites?.accountSettings&&(e=>jp(e,()=>
2"").getNames())(t?.prerequisites?.accountSettings).forEach(t=>{const[r,n]=t.split(".");e.has(r)||e.set(r,new Set),e.get(r)?.add(n)})}),e},Cx=()=>{const e=(()=>{const e=kx();return e.has("phone")||e.set("phone",new Set),e.get("phone")?.add("engagePlgOptOut"),e.get("phone")?.add("inboxPlgOptOut"),e.get("phone")?.add("textAssistantTermsOfServiceAccepted"),e.get("phone")?.add("textAssistantTermsOfServiceAcceptedByAdmin"),e.get("phone")?.add("goToAdminIntegrations"),e.has("meeting")||e.set("meeting",new Set),e.get("meeting")?.add("gotoAppEnabled"),e.get("meeting")?.add("gotoAppEntitled"),e.get("meeting")?.add("gotoAppProvisioned"),e})();return`{\n  user {\n    email\n    createTime\n    firstName\n    key\n    lastName\n    locale\n    timeZone\n    location\n  }\n  accounts {\n    name\n    key\n    unifiedAdmin\n    slowChannelEnabled\n    partnerAccountKey\n    licenses {\n      accountKey\n      description\n      roles\n      channel\n      enabled\n      key\n      type\n      sku\n    }\n    settings {\n      ${Array.from(e).map(([e,t])=>`${e} {\n        ${Array.from(t).map(e=>e).join("\n        ")}\n      }`).join("\n      ")}\n    }\n  }\n}`};var Sx=(e=>(e.RESOLVE="admin.helpdesk-management.dashboard",e))(Sx||{}),Ex=(e=>(e.ENABLED="ENABLED",e.DISABLED="DISABLED",e))(Ex||{});let Ix;const Ax=async e=>(e=>Ix&&Ix[e]?Ix[e]:void 0)(e)??await(async e=>{const t=`${Sh()}/features/v1/${e}`,r={headers:{accept:"application/json"},credentials:void 0};try{const n=await(await bx(t,r)).json();return Ix=Object.assign(Ix??{},{[e]:n}),n}catch(e){return void eo().error(`error in API call for ${t}`,e)}})(e),Tx=async(e,t)=>(await Ax(e))?.[t],Ox={getPbxFeatureFlags:Ax,getPbxFeatureFlagValue:Tx};var Lx=(e=>(e.ACTIVE="ACTIVE",e.INACTIVE="INACTIVE",e))(Lx||{});class $x{constructor(e="",t="",r={},n,o,i){this.updateId(e),this.updateUserId(t),this.updateFlags(r),this.updateInfo(n),this._pbxes=o,this._location=i}get id(){return this._id}get info(){return this._info}get userId(){return this._userId}get flags(){return this._flags}get pbxes(){return this._pbxes}get location(){return this._location}updateId(e){this._id=e}updateInfo(e){this._info=e}updateUserId(e){this._userId=e}updateFlags(e){this._flags=e}}class Nx{constructor(e=""){this.updateAccountKey(e)}get key(){return this._key}updateAccountKey(e){this._key=e}}const Rx=e=>`goto-context_${e}`,Px=async e=>(await(async e=>await(async(e,t)=>{try{return await(await bx(e,t)).json()}catch{return await{}}})(`${Sh()}/jif/v4/user/jiveId/${e}`))(e))?.data?.tenants?.pbxes??[],Dx=(e,t)=>((e,t)=>e.find(e=>e.id===t)?.state===Lx.ACTIVE)(t,e)&&((e,t)=>!!e.find(e=>e.id===t)?.extensions?.length)(t,e),Mx=e=>{const t=Rx(e),r=_n(t);let n;try{n=JSON.parse(r??""),(!n||"object"!=typeof n)&&(n={})}catch{n={}}return n},zx=e=>Mx(e)?.account?.key,Fx=e=>Mx(e)?.pbx?.id,Ux=(e,t)=>{const r=Rx(e),n=Mx(e);kn(r,JSON.stringify({...n,account:{key:t}}))},Bx=e=>{const t=Mx(e),r=jx(e);return{accountKey:t?.account?.key??"",accountName:"",externalUserKey:e,pbxId:r?.pbx?.id??"",pbxUserId:r?.pbx?.userId??""}},Hx=e=>{const t=Rx(e.externalUserKey),r=Mx(e.externalUserKey);kn(t,JSON.stringify({...r,pbx:{id:e.pbxId,userId:e.pbxUserId}}))},jx=e=>{const t=Rx(e),r=_n(t);return r?JSON.parse(r):null},Vx=()=>{const e=l().user,t=th()?.key??null;let r;return t&&(r=e.getAccountByKey(t)),r?.settings},Wx=()=>l().user.accounts,Kx=e=>Bx(e),qx=()=>{const e=_n("productTrial");if(e)try{return JSON.parse(e)}catch{return}},Gx=()=>l().context.pbx?.pbxes??[],{emit:Zx}=Co().register(No,Ro);let Yx=!1;const Jx=e=>(e=>{const t=Wc(e);return(...r)=>Yx?t(...r):e(...r)})(e),Qx=[{namespace:np},{namespace:No},{namespace:td,eventNames:["reloadPage","appChanged","routeChanged","themeChanged"]}],Xx=()=>cn()+Aa,e_=Jx(()=>_x().getLoadedExtensionConfigs().reduce((e,t)=>(t.integrations?.msTeams?.commandsToForwardToCompanion&&e.push(...t.integrations.msTeams.commandsToForwardToCompanion),e),[])),t_=Jx(()=>_x().getLoadedExtensionConfigs().reduce((e,t)=>(t.integrations?.msTeams?.eventsToForwardToCompanion&&e.push(...t.integrations.msTeams.eventsToForwardToCompanion),e),[...Qx])),r_=()=>Xc()===Kc.MS_TEAMS;let n_;const o_=e=>!Array.isArray(e),i_=()=>{},s_=e=>"symbol"==typeof e?e.toString():e;class a_{constructor(){this.namespaceRegistry=new Map}static getInstance(){return a_.instance||(a_.instance=new a_),a_.instance}retrieve(e){return this.namespaceRegistry.has(e)||this.namespaceRegistry.set(e,{commands:this.createCommands(s_(e))}),this.namespaceRegistry.get(e)}createCommands(e){return new Proxy({},{get:(t,r)=>(t[r]||(t[r]=((e,t)=>{let r=[],n=i_,o=!1,i=!1;const s=(...r)=>{const o=Th();if(!(e=>!!e?.available&&!e.isCompanion)(o)||!i&&!((e,t)=>(n_=n_||e_(),n_.some(r=>r.namespace===e&&(void 0===r.commandNames||-1!==r.commandNames.indexOf(t)))))(e,t)||((...e)=>e.reduce((e,t)=>
2("object"==typeof t&&"callerId"in t&&(e=!0),e),!1))(...r))return n(...r);o.send({type:"command",payload:{namespace:e,commandName:t,args:r}})};return Object.assign(s,{execute:s,isHandled:(e=[])=>o&&(0===e.length||((e,t)=>e.length===t.length&&e.every((e,r)=>e===t[r]))(r,e)),addHandler:(e,t={capabilities:[],preferCompanion:!1})=>{n_=void 0,r=(e=>o_(e)?[...e.capabilities??[]]:[...e])(t),i=(e=>!!o_(e)&&!!e.preferCompanion)(t),n=(...t)=>e(...t),o=!!e},removeHandler:()=>{r=[],i=!1,n=i_,o=!1}})})(s_(e),r)),t[r])})}}const l_=()=>oo()?a_.getInstance():l().namespaces,c_=e=>{const t=l_().retrieve(e.namespace);if(t)return t.commands[e.commandName]},d_=(e,...t)=>{const r=c_(e);r?.isHandled()&&r.execute.apply(r,[...t])},u_=e=>{const t=[];return e.forEach(e=>{e.includes(wx.GoToMeeting.toUpperCase())&&t.push(wx.GoToMeeting),e.includes(wx.GoToWebinar.toUpperCase())&&t.push(wx.GoToWebinar),e.includes(wx.GoToTraining.toUpperCase())&&t.push(wx.GoToTraining),e.includes(wx.GoToConnect.toUpperCase())&&t.push(wx.GoToConnect),e.includes(wx.Jive.toUpperCase())&&t.push(wx.Jive),e.includes(wx.HVoice.toUpperCase())&&t.push(wx.HVoice),e.includes(wx.Grasshopper.toUpperCase())&&t.push(wx.Grasshopper),e.includes(wx.OpenVoice.toUpperCase())&&t.push(wx.OpenVoice)}),[...new Set(t)]};class h_{constructor(e){this.key=e.key,this.channel=e.channel,this.enabled=e.enabled,this.description=e.description,this.entitlements=p_(e.roles??[]),this.roles=this.entitlements.concat(e.roles??[]),this.sku=e.sku}}const p_=(e=[])=>u_(e);class g_{constructor(e){this.key=e.key,this.name=e.name,this.unifiedAdmin=e.unifiedAdmin,this.licenses=f_(e.licenses??[]),this.settings=e.settings,this.slowChannelEnabled=e.slowChannelEnabled,this.partnerAccountKey=e.partnerAccountKey}}const f_=(e=[])=>e.reduce((e,t)=>[...e,new h_(t)],[]);class m_{constructor(e){this.free=e?.free,this.trial=e?.trial,this.product=e?.product,this.endDate=e?.endDate,this.active=e?.active}}class v_{constructor(e){this.userInfo=e.userInfo,this.permissions=[...e.permissions??[]],this._userContextLicenses=[...e.licenses??[]],this._avatar=e.avatar,this.productTrial=new m_(e.productTrial)}get key(){return this.userInfo?.user?.key??null}get name(){return{givenName:this.userInfo?.user?.firstName??"",lastName:this.userInfo?.user?.lastName??""}}get meta(){return{createdDate:b_(this.userInfo)}}get locale(){return this.userInfo?.user?.locale??null}get emails(){return this.userInfo?.user?.email?[{value:this.userInfo.user.email,type:"primary",primary:!0}]:[]}get location(){return{city:this.userInfo?.user?.location??"",timeZone:this.userInfo?.user?.timeZone??""}}get accounts(){return y_(this.userInfo?.accounts)}get avatar(){return this._avatar}get entitlements(){const e=new Set;return this.accounts.forEach(t=>t.licenses.forEach(t=>{t.enabled&&t.entitlements.forEach(t=>e.add(t))})),Array.from(e.values())}get roles(){const e=new Set;return this.accounts.forEach(t=>t.licenses.forEach(t=>t.roles.forEach(t=>e.add(t)))),Array.from(e.values())}getAccountByKey(e){return y_(this.userInfo?.accounts??[]).find(t=>t.key===e)}hasPermissions(e){return!e.find(e=>!this.permissions.includes(e))}hasLicenses(e){const t=th(),r=this.getAccountByKey(t?.key??""),n=[...this._userContextLicenses,...r?.licenses.map(e=>e.channel).flat(1/0)??[]];return!e.find(e=>!n.includes(e))}getUserContextLicenses(){return this._userContextLicenses}}const b_=e=>e?.user?.createTime?new Date(+e.user.createTime):null,y_=(e=[])=>e.reduce((e,t)=>[...e,new g_(t)],[]);class w_{constructor(){this.user=new v_({}),this.permissions=[]}}var x_=(e=>(e.GOOGLE_CRONOFY="google",e.OFFICE365_CRONOFY="office365",e.EXCHANGE_CRONOFY="exchange",e.GOOGLE_DIRECT="google_direct",e.OFFICE365_DIRECT="office365_direct",e.EXCHANGE_ONLINE="exchange_online",e.EXCHANGE_DIRECT="exchange_direct",e.CHOOSE="CHOOSE",e))(x_||{});const __={badgeNumberUpdated:_o()},{emit:k_}=Co().register("badge",__),C_={message:_o(),error:_o(),connected:_o(),disconnected:_o()},S_={attribute:!0,type:String,converter:Ad,reflect:!1,hasChanged:Td},E_=(e=S_,t,r)=>{const{kind:n,metadata:o}=r;let i=globalThis.litPropertyMetadata.get(o);if(void 0===i&&globalThis.litPropertyMetadata.set(o,i=new Map),"setter"===n&&((e=Object.create(e)).wrapped=!0),i.set(r.name,e),"accessor"===n){const{name:n}=r;return{set(r){const o=t.get.call(this);t.set.call(this,r),this.requestUpdate(n,o,e,!0,r)},init(t){return void 0!==t&&this.C(n,void 0,e,t),t}}}if("setter"===n){const{name:n}=r;return function(r){const o=this[n];t.call(this,r),this.requestUpdate(n,o,e,!0,r)}}throw Error("Unsupported decorator location: "+n)};function I_(e){return(t,r)=>"object"==typeof r?E_(e,t,r):((e,t,r)=>{const n=t.hasOwnProperty(r);return t.constructor.createProperty(r,e),n?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}function A_(e){return I_({...e,state:!0,attribute:!1})}const T_=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,r),r);function O_(e,t){return(t,r,n)=>T_(t,r,{get(){return this.renderRoot?.querySelector(e)??null}})}const{I:L_}=pu,$_=e=>e,N_=()=>document.createComment(""),R_={},P_={ATTRIBUTE:1,CHILD:2,PROPERTY:3},D_=e=>(...t)=>({_$litDirective$:e,values:t});let M_=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};const z_=(e,t)=>
2{const r=e._$AN;if(void 0===r)return!1;for(const e of r)e._$AO?.(t,!1),z_(e,t);return!0},F_=e=>{let t,r;do{if(void 0===(t=e._$AM))break;r=t._$AN,r.delete(e),e=t}while(0===r?.size)},U_=e=>{for(let t;t=e._$AM;e=t){let r=t._$AN;if(void 0===r)t._$AN=r=new Set;else if(r.has(e))break;r.add(e),j_(t)}};function B_(e){void 0!==this._$AN?(F_(this),this._$AM=e,U_(this)):this._$AM=e}function H_(e,t=!1,r=0){const n=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(t)if(Array.isArray(n))for(let e=r;e<n.length;e++)z_(n[e],!1),F_(n[e]);else null!=n&&(z_(n,!1),F_(n));else z_(this,e)}const j_=e=>{e.type==P_.CHILD&&(e._$AP??=H_,e._$AQ??=B_)};let V_=class extends M_{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),U_(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(z_(this,e),F_(this))}setValue(e){if((()=>void 0===this._$Ct.strings)())this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};class W_ extends M_{constructor(e){if(super(e),this.it=eu,e.type!==P_.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===eu||null==e)return this._t=void 0,this.it=e;if(e===Xd)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}W_.directiveName="unsafeHTML",W_.resultType=1;const K_=D_(W_);let q_=class extends W_{};q_.directiveName="unsafeSVG",q_.resultType=2;const G_=D_(q_),Z_=e=>e??eu,Y_=(e,t)=>{if("object"==typeof e&&"object"==typeof t){const r=e,n=t,o=Object.keys(r),i=Object.keys(n);return o.length===i.length&&o.every(e=>
2Y_(r[e],n[e]))}return e===t},J_="PresenceService",Q_={presenceUpdate:_o(),userPresenceUpdate:_o(),userAppearanceAndDNDUpdate:_o()},{emit:X_}=Co().register(J_,Q_);let ek={};const tk={pageSize:25,pageMarker:0},rk=[25,50,100],nk=rk[0]+1,ok=e=>{const t=(e=>{const t={q:"",c:""};return e.query&&(t.q=e.query),e.categoryFilterApplicationNames?.length&&(t.c=JSON.stringify(e.categoryFilterApplicationNames)),t})(e),r=JSON.stringify(t);return btoa(encodeURIComponent(r))},ik=()=>(e=>{const t={query:"",categoryFilterApplicationNames:[]};if(e.q&&(t.query=e.q),e.c)try{const r=JSON.parse(e.c);t.categoryFilterApplicationNames=r}catch(e){eo().error("Cannot parse search history category filter application names",e)}return t})((()=>{try{const e=(e=>{try{const t=dn().split("/");if(e){const r=t.indexOf(e);return r>=0?t[r+1]??"":""}return t[t.length-1]??""}catch{return""}})("search"),t=fn(e),r=decodeURIComponent(atob(t));return JSON.parse(r)}catch{return}})()??{q:"",c:""}),sk=async e=>{if(e?.ok)return e;{const{status:t=412,statusText:r="Precondition Failed",body:n=null}=e??{},o=(await(e?.json()))?.message??"Precondition Failed";throw new ex({message:o,response:e,status:t,statusText:r,body:n})}},ak=(e,t,r)=>{d_(e,t,r)};let lk="";function ck(e){const t=new RegExp("<em>|</em>","g");return Array.isArray(e)&&e.length?e.join("[...] ").replaceAll(t," "):"string"==typeof e?e.replaceAll(t," "):""}function dk(e,t){const r={query:e,categoryFilterApplicationNames:t?[t.application]:[]};return{base64SearchQuery:ok(r),query:r}}function uk(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e?.length===t?.length&&e?.every(e=>t?.some(t=>t===e))}const hk=()=>l().userPreferences,pk="search-history",gk="search-record-history",fk=async()=>{const e=await(hk()?.getPreference(pk,[]))??[],t=[];return e.forEach(e=>{const r=_k(e);r&&t.push(r)}),t},mk=async()=>{const e=await(hk()?.getPreference(gk,[]))??[],t=[],r=new Map;e.forEach(e=>{const n=_k(e);if(n&&n?.resultItem){const e=n.resultItem.id;t.push(e);const o=r.get(n.resultItem.application)??[];o.push(n?.resultItem.id),r.set(n?.resultItem.application,o)}});const n=await Ok().getSearchRecords(r,!1),o=n&&n[0]?.items?n[0].items:[],i=new Map(o.map(e=>[e.id,e]));return t.map(e=>{const t=i.get(e);return t?{resultItem:t}:null}).filter(Boolean)},vk=async()=>{const e=await fk();return[...await mk(),...e]},bk=async e=>{let t="",r=[];return e.resultItem?(t=gk,r=[...await mk()]):e.query&&(t=pk,r=[...await fk()]),{key:t,searchHistory:r}},yk=(e,t)=>{const r=t.findIndex(t=>kk(e,t));r>=0&&t.splice(r,1)},wk=async e=>{const t=hk(),{key:r,searchHistory:n}=await bk(e);yk(e,n);const o=[xk(e),...n.map(xk)];t?.setPreference(r,o)},xk=e=>{const t={};return e.query&&(t.q=e.query),e.resultItem&&(t.r=JSON.stringify({id:e.resultItem.id,application:e.resultItem.application})),e.categoryFilterApplicationNames?.length&&(t.c=JSON.stringify(e.categoryFilterApplicationNames)),t},_k=e=>{const t={};if(e.q&&(t.query=e.q),e.r)try{const r=JSON.parse(e.r);Bu(r,{application:"",id:""}),t.resultItem=r}catch(e){eo().error("Cannot parse search history result item",e)}if(e.c)try{const r=JSON.parse(e.c);t.categoryFilterApplicationNames=r}catch(e){eo().error("Cannot parse search history category filter application names",e)}if(t.query||t.resultItem)return t},kk=(e,t)=>e.query&&t.query?e.query===t.query:!(!e.resultItem||!t.resultItem)&&e.resultItem.application===t.resultItem.application&&e.resultItem.id===t.resultItem.id,Ck="GlobalSearch",Sk={searchFieldQueryChange:_o(),resultPageQueryChange:_o(),categoriesUpdated:_o()},{emit:Ek}=Co().register(Ck,Sk),Ik={uid:"70b6ef46-02f1-4303-a325-e1eb45afee99",getGlobalSearchCategories:()=>[],getGlobalSearchResultActions:()=>[],getActionsForSearchString:()=>[]};class Ak{constructor(){this.categoriesMapInstance=void 0,this.categoriesIntegrationsMap=void 0,this.globalSearchIntegrations=void 0,this.abortController=void 0,this.globalSearchHasCategories=!1,this.categoriesOrder=[],this.addListeners=()=>{const e=Vt();e.addEventListener("popstate",this.handleWindowPopstate);const{extensionReady:t}=Co().subscribeTo(td);t.addListener(this.handleExtensionReady),no(()=>{e.removeEventListener("popstate",this.handleWindowPopstate),t.removeListener(this.handleExtensionReady)})},this.handleExtensionReady=e=>{const t=sg().getExtensionById(e.extensionId);if(t&&Vu(t)&&t.supportsInterface(Ik)){const e=t.queryInterface(Ik);this.addGlobalSearchIntegration(e,t);let r=!1;try{r=!!e.getGlobalSearchCategories()?.length}catch(e){eo().error(e)}r&&(this.invalidateCategoriesMap(),this.invalidateCategoriesIntegrationsMap(),this.globalSearchHasCategories=!0,Ek.categoriesUpdated())}},this.invalidateCategoriesMap=()=>{this.categoriesMapInstance=void 0},this.invalidateCategoriesIntegrationsMap=()=>{this.categoriesIntegrationsMap=void 0},this.hasCategories=()=>this.globalSearchHasCategories,this.handleWindowPopstate=()=>{dn().startsWith(Ca)&&(e=>{Ek.resultPageQueryChange(e)}
2)({query:ik()})},this.getGlobalSearchIntegrations=()=>this.globalSearchIntegrations??[],this.getGlobalSearchIntegrationByApplication=e=>this.getCategoriesIntegrationsMap()?.get(e),this.getCategories=()=>{const e=this.getGlobalSearchCategoriesOrder(),t=Array.from(this.getCategoriesMap().values());if(e.length){const r=e.reduce((e,t,r)=>(e.set(t,r),e),new Map);t.sort((e,t)=>(r.get(e.id)||0)-(r.get(t.id)||0))}return t},this.getSuggestions=()=>this.globalSearchIntegrations?this.globalSearchIntegrations.flatMap(({impl:e,extension:t})=>{let r;try{r=e.getGlobalSearchCategories()}catch(e){return eo().error(e),[]}return r?r.filter(e=>e.suggestionIcon&&e.suggestionLabelKey).flatMap(e=>{try{return[this.createSuggestion(e,t)]}catch(e){return eo().error(e),[]}}):[]}):[],this.getCategoryByApplication=e=>this.getCategoriesMap().get(e),this.getCategory=e=>this.getCategoryByApplication(e.application),this.getGlobalSearchResultActions=(e,t)=>{const r=[];return this.getGlobalSearchIntegrations().forEach(n=>{let o;try{o=n.impl.getGlobalSearchResultActions(e,t)}catch(e){return void eo().error(e)}o?.forEach(e=>{try{this.canAddActionTo(e,r)&&r.push(this.convertActionToUI(e,n.extension))}catch(e){eo().error(e)}})}),r},this.convertActionToUI=({displayNameKey:e,...t},r)=>({...t,displayName:r.getString(e)}),this.convertResultToGlobalSearchResultUI=async(e,t)=>{const r=this.getGlobalSearchIntegrations();let n={title:"",preview:"",subtitle:"",actions:[],userKey:"",givenName:"",familyName:"",icon:"",detailInfo:"",detailIcon:"",originalResult:e,defaultAction:void 0};const o=this.getGlobalSearchIntegrationByApplication(e.application)?.extension,i=this.getCategoryByApplication(e.application);if(i){const r=await this.getResultFieldValue(e,i.titleField)??"",s=await this.getResultFieldValue(e,i.previewField)??"",a=await this.getResultFieldValue(e,i.subtitleField)??"",l=await this.getResultFieldValue(e,i.avatarFields?.userKey)??"",c=await this.getResultFieldValue(e,i.avatarFields?.givenName)??"",d=await this.getResultFieldValue(e,i.avatarFields?.familyName)??"",u=await this.getResultFieldValue(e,i.iconField)??"";let h;try{h=i.getResultDefaultAction(e,t)}catch(e){eo().error(e)}const p=await this.getResultFieldValue(e,i.detailInfoField)??"",g=await this.getResultFieldValue(e,i.detailIconField)??"";let f;try{f=i.participantsField?await Promise.resolve(i.participantsField(e)):void 0}catch(e){eo().error(e)}n={...n,title:r,preview:s,subtitle:a,userKey:l,givenName:c,familyName:d,icon:u,defaultAction:h?this.convertActionToUI(h,o):void 0,originalResult:n.originalResult,detailInfo:p,detailIcon:g,participants:f}}return r.reduce((r,n)=>{let o;try{o=n.impl.getGlobalSearchResultActions(e,t)}catch(e){return eo().error(e),r}if(o){const e=[];o.forEach(t=>{try{this.canAddActionTo(t,r.actions)&&e.push(this.convertActionToUI(t,n.extension))}catch(e){eo().error(e)}}),r={...r,actions:[...r.actions,...e]}}return r},n)},this.convertToGlobalSearchResultUI=(e,t)=>Promise.all(e.map(e=>this.convertResultToGlobalSearchResultUI(e,t))),this.searchFor=async(e,t)=>{const r=e.categoryFilterApplicationNames,n=this.getQueriesForSearchString(e.query,r);return n.length?await this.queryGlobalSearchAPI(n,t):await Promise.resolve(void 0)},this.getSearchRecords=async e=>{if(!e.size)return;const t=this.getCategories(),r=[];return Array.from(e.keys()).forEach(n=>{const o=e.get(n)??[];if(!o.length)return;const i=t.find(e=>e.application===n);if(!i)return;const s=this.getValidPermissionParameters(i);s&&(1===o.length&&o.push(o[0]),r.push({query:o.map(e=>"id:"+e).join(" OR "),application:n,permissionParameters:s}))}),r.length?await this.queryGlobalSearchAPI(r,tk):void 0},this.queryGlobalSearchAPI=async(e,t)=>{const r=t?"?"+Ti(t):"",n=`${Wn().getShellBffServiceBaseUrl()}/global-search/search${r}`;try{const t={requestKey:r+e[0].query+e[0].application,ttl:3e5},o={headers:{"Content-Type":"application/json"},method:"POST",credentials:void 0,signal:this.abortController?.signal,body:JSON.stringify({queries:e})};return await(async(e,t,r)=>{const n=(new Date).getTime(),o=r.ttl+1,i=await window.caches.open("globalSearch");if(lk===r.requestKey){const e=await i.match(r.requestKey),t=(n-o).toString(),s=e?.headers?.get("X-Cache-Meta")??t,a=parseInt(s,10);if(e&&n-a<r.ttl)return await e.json()}else await i.delete(lk);const s=await bx(e,t).then(sk);if(s){const e=s.clone(),t=new Response(e.body,{headers:{...e.headers,"X-Cache-Meta":n.toString()}});return i.put(r.requestKey,t),lk=r.requestKey,await s.json()}})(n,o,t)}catch(e){eo().error(`No search results could be found, ${e}`)}},this.getResultFieldValue=async(e,t)=>{if(t){if("string"==typeof t)return e.data[t];if("function"==typeof t)try{return await t(e)}catch(e){return void eo().error(e)}}},this.createCategoriesMaps=()=>{this.categoriesIntegrationsMap=new Map;const e=new Map;
2this.getGlobalSearchIntegrations().forEach(t=>{let r;try{r=t.impl.getGlobalSearchCategories()}catch(e){return void eo().error(e)}r.forEach(r=>{try{if(qu(r),!1===eg(r.prerequisites??{}))return;const n=r.columns.map(e=>this.convertColumnToUI(e,t.extension)),o={...r,displayName:t.extension.getString(r.displayNameKey),application:r.application,columns:n,emptyState:this.convertEmptyStateToUI(r.emptyState,t.extension)};e.set(r.application,o),this.categoriesIntegrationsMap?.set(r.application,t)}catch(e){eo().error(e)}})}),this.categoriesMapInstance=e},this.getCategoriesIntegrationsMap=()=>(this.categoriesIntegrationsMap||this.createCategoriesMaps(),this.categoriesIntegrationsMap||new Map),this.getCategoriesMap=()=>(this.categoriesMapInstance||this.createCategoriesMaps(),this.categoriesMapInstance||new Map),this.convertColumnToUI=({displayNameKey:e,...t},r)=>({...t,displayName:r.getString(e)}),this.convertEmptyStateToUI=({messageKey:e,actions:t},r)=>({message:r.getString(e),actions:t.map(e=>this.convertActionToUI(e,r))}),this.getActionsForSearchString=(e,t)=>this.getGlobalSearchIntegrations().reduce((r,n)=>{let o;try{o=n.impl.getActionsForSearchString(e,t)}catch(e){return eo().error(e),r}return o?.forEach(e=>{try{this.canAddActionTo(e,r)&&r.push(this.convertActionToUI(e,n.extension))}catch(e){eo().error(e)}}),r},[]),this.getQueriesForSearchString=(e,t)=>{let r=this.getCategories();return t?.length&&(r=this.getCategories().filter(e=>t.includes(e.application))),r.map(t=>{let r;try{r=t.getQueryForSearchString(e)}catch(e){return void eo().error(e)}if(!r)return;const n=this.getValidPermissionParameters(t);return n?{...r,application:t.application,permissionParameters:n}:void 0}).filter(e=>void 0!==e)},this.getValidPermissionParameters=e=>{let t;try{t=e.getPermissionParameters()}catch(e){return void eo().error(e)}if(t){if(!Object.values(t).some(e=>void 0===e||"undefined"===e))return t;eo().warn(`Skipping category ${e.application} due to invalid permission parameters`)}else eo().warn(`Skipping category ${e.application} due to missing permission parameters`)}}async initialize(){if((async()=>{l_().retrieve(Ck).commands.executeSearch.addHandler(({query:e,categoryFilterApplicationNames:t})=>{wk({query:e,categoryFilterApplicationNames:t}),(e=>{dn().startsWith(Ca)||En(Gn,xn()),Uc(`${Ca}/${gn(ok(e))}`)})({query:e,categoryFilterApplicationNames:t})})})(),this.addListeners(),!this.globalSearchIntegrations){const e=await l().extensions.queryInterface(Ik);this.globalSearchIntegrations=[...e]}}setGlobalSearchCategoriesOrder(e){this.categoriesOrder=[...e]}getGlobalSearchCategoriesOrder(){return[...this.categoriesOrder]}addGlobalSearchIntegration(e,t){this.globalSearchIntegrations?this.globalSearchIntegrations.push({impl:e,extension:t}):this.globalSearchIntegrations=[{impl:e,extension:t}]}createSuggestion(e,t){return{icon:e.suggestionIcon,label:t.getString(e.suggestionLabelKey),application:e.application}}canAddActionTo(e,t){return(e=>{const t=c_(e);return!!t&&t.isHandled()})(e.command)&&!t.find(t=>t.id===e.id)}}let Tk;const Ok=()=>(Tk||(Tk=new Ak),Tk),Lk=ws("DD/MM/YYYY"),$k=e=>Nk.test(e),Nk=new RegExp(/^((0)[1-9]|[1-2][0-9]|(3)[0-1])(\/)(((0)[1-9])|((1)[0-2]))(\/)\d{4}$/);var Rk=Object.defineProperty,Pk=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&Rk(t,r,i),i};const Dk=class extends vu{constructor(){super(...arguments),this.label="",this.requireFutureDate=!1,this.placeholder="",this.disabled=!1,this.date="",this.dateError=!1}static get styles(){return fd(".date-picker{width:290px}")}dateHasChanged(e){this.date=e.target.value,this.removeDateErrorIfValid()}removeDateErrorIfValid(){($k(this.date)&&!this.hasFutureDateError()||$c(this.date))&&(this.dateError=!1)}setDateErrorIfInvalid(){const e=!$k(this.date)||this.hasFutureDateError();!$c(this.date)&&e&&(this.dateError=!0)}hasFutureDateError(){return $k(this.date)&&this.requireFutureDate&&!(e=>{const t=(new Date).setHours(0,0,0,0);return new Date(e).setHours(0,0,0,0)>=t})(new Date((e=>`${(e=>e.substring(6,10))(e)}-${(e=>e.substring(3,5))(e)}-${(e=>e.substring(0,2))(e)}`)(this.date)))}formatDate(e){let t=e;return(2===t.length||5===t.length)&&(t=`${t}/`),t}getErrorText(){return $k(this.date)?this.hasFutureDateError()?on("A future date is required"):void 0:on("A date in the DD/MM/YYYY format is required")}getHelperText(){return this.dateError?this.getErrorText():on(Lk)}render(){return Qd`
3      <chameleon-text-field
4        class="date-picker"
5        value=${this.formatDate(this.date)??""}
6        current-value=${this.formatDate(this.date)}
7        aria-label=${Z_(this.label)}
8        type="text"
9        name="date"
10        placeholder=${Z_(this.placeholder)}
11        @input=${this.dateHasChanged}
12        @blur=${this.setDateErrorIfInvalid}
13        ?error=${!!this.dateError}
14        ?disabled=${this.disabled}
15        >${this.label}<span class="helper-text" slot="helpertext">${this.getHelperText()}</span></chameleon-text-field
16      >
17    `}};Dk.tagName="goto-date-picker";let Mk=Dk;Pk([I_({type:String})],Mk.prototype,"label"),Pk([I_({type:Boolean})],Mk.prototype,"requireFutureDate"),Pk([I_({type:String})],Mk.prototype,"placeholder"),Pk([I_({type:Boolean})],Mk.prototype,"disabled"),Pk([I_()],Mk.prototype,"date"),Pk([A_()],Mk.prototype,"dateError");const zk=D_(class extends V_{constructor(e){if(super(e),this.languageChangedHandler=()=>{this.lastRenderArgs&&this.setValue(this.calcRenderValue(this.lastRenderArgs.translatable,this.lastRenderArgs.optionsFn))},this.windowUnloadHandler=()=>{this.unsubscribeFromLanguageChanged()},e.type!==P_.CHILD&&e.type!==P_.ATTRIBUTE&&e.type!==P_.PROPERTY)throw new Error("Misplaced TranslateDirective?");this.subscribeToLanguageChanged(),this.subscribeToWindowUnload()}render(e,t){return this.lastRenderArgs={translatable:e,optionsFn:t},this.calcRenderValue(e,t)}disconnected(){this.unsubscribeFromLanguageChanged(),this.unsubscribeFromWindowUnload()}reconnected(){this.subscribeToLanguageChanged(),this.subscribeToWindowUnload()}calcRenderValue(e,t){const r=t?.()??{};return on(e,r)}subscribeToLanguageChanged(){nn().on("languageChanged",this.languageChangedHandler)}unsubscribeFromLanguageChanged(){nn().off("languageChanged",this.languageChangedHandler)}subscribeToWindowUnload(){this.unsubFromWindowUnload=no(this.windowUnloadHandler)}unsubscribeFromWindowUnload(){this.unsubFromWindowUnload&&(this.unsubFromWindowUnload(),this.unsubFromWindowUnload=void 0)}});var Fk=Object.defineProperty,Uk=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&Fk(t,r,i),i};const Bk=class extends vu{constructor(){super(...arguments),this.selectedFiles=[],this.fileTypes="",this.disabled=!1}static get styles(){return fd(".input-file{display:none}")}selectedFilesHandler(e){const t=e.target.files;t&&(this.selectedFiles=Array.from(t),this.dispatchEvent(new CustomEvent("change",{detail:{selectedFiles:this.selectedFiles}})))}handleFilePickerClick(e){e.target.value=""}attachFileClickHandler(){this.nativeFileInput.click()}render(){return Qd`
18      <input
19        type="file"
20        class="input-file"
21        accept=${this.fileTypes}
22        @change=${this.selectedFilesHandler}
23        @click=${this.handleFilePickerClick}
24      />
25      <chameleon-button
26        variant="neutral"
27        class="file-upload-button"
28        @click=${this.attachFileClickHandler}
29        ?disabled=${this.disabled}
30      >
31        <chameleon-svg slot="start">${G_('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M17.2929 4.7071C16.5788 3.99306 15.4211 3.99306 14.7071 4.7071L5.7071 13.7071C4.44077 14.9734 4.44077 17.0266 5.7071 18.2929C6.97343 19.5592 9.02656 19.5592 10.2929 18.2929L17.2929 11.2929L18.7071 12.7071L11.7071 19.7071C9.65972 21.7545 6.34027 21.7545 4.29289 19.7071C2.24551 17.6597 2.24551 14.3403 4.29289 12.2929L13.2929 3.29289C14.788 1.7978 17.212 1.7978 18.7071 3.29289C20.2022 4.78798 20.2022 7.21201 18.7071 8.7071L9.7071 17.7071C8.76429 18.6499 7.2357 18.6499 6.29289 17.7071C5.35008 16.7643 5.35008 15.2357 6.29289 14.2929L14.2929 6.29289L15.7071 7.7071L7.7071 15.7071C7.54534 15.8689 7.54534 16.1311 7.7071 16.2929C7.86886 16.4547 8.13113 16.4547 8.29289 16.2929L17.2929 7.29289C18.0069 6.57885 18.0069 5.42115 17.2929 4.7071Z" fill="currentColor"></path></svg>')}</chameleon-svg>${zk("Attach a file")}
32      </chameleon-button>
33    `}};Bk.tagName="goto-file-picker";let Hk=Bk;Uk([I_({type:String})],Hk.prototype,"fileTypes"),Uk([I_({type:Boolean})],Hk.prototype,"disabled"),Uk([O_("input")],Hk.prototype,"nativeFileInput");const jk=yu({template:Qd`<goto-error></goto-error>`,domElement:Gt}),Vk='<svg pictogram="pictogram" width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M26 4H4V44H44V21.98H42V42H6V6H26V4Z" fill="currentColor"/><path d="M23 20.74V29.58H25V20.74H23Z" fill="currentColor"/><path d="M23 33H25V31H23V33Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M9 37L24 10L39 37H9ZM12.399 35L24 14.1183L35.601 35H12.399Z" fill="currentColor"/><g clip-path="url(#alert-static_svg__a)"><path d="M42 6H28V4H44V20H42V6Z" class="alert-static_svg__brand-color"/></g><defs><clipPath id="alert-static_svg__a"><rect width="16" height="16" fill="white" transform="translate(28 4)"/></clipPath></defs></svg>';class Wk extends vu{constructor(){super(...arguments),this.unsubscribeFunctions=[],this.unsubscribe=()=>
33{this.unsubscribeFunctions.forEach(e=>e()),this.unsubscribeFunctions=[]}}connectedCallback(){super.connectedCallback(),this.unsubscribeFunctions.push(no(this.unsubscribe))}disconnectedCallback(){this.unsubscribe(),super.disconnectedCallback()}}var Kk=Object.defineProperty;const qk="shell-reload-attempts";var Gk;const Zk=(Gk=class extends Wk{constructor(){super(...arguments),this.userIsAuthenticated=!1,this.handleRestartReloadClick=()=>{this.userIsAuthenticated&&oo()?(Gk.reloadAttempts>=1?(Si(),Ei(),Cn(qk)):kn(qk,Gk.reloadAttempts+1),yn(window.origin)):(async()=>{await new Promise(e=>{const t=Vt();t.addEventListener("popstate",()=>e(),{once:!0}),t.history.length>1?t.history.back():Uc(wa)}),Nn()})()}}static get styles(){return fd(":host{background-color:var(--goto-background-color-default);display:flex}.drag-region{-webkit-app-region:drag;height:40px;left:0;position:fixed;top:0;width:100%}")}connectedCallback(){super.connectedCallback(),this.userIsAuthenticated=!!l()?.user.key,d().track("GoTo > Error page",{action:"page visited"})}render(){return Qd`${this.renderTopbarLogo()}<chameleon-empty-state>
34        <chameleon-svg slot="icon" class="error-pictogram">${Vk}</chameleon-svg>
35        <p slot="title">${zk("Something went wrong")}</p>
36        <span class="description"
37          >${zk("GoTo couldn't load correctly.")}${this.getDescription()}${zk("If that doesn't work, learn how to fix it by visiting GoTo Support.")}</span
38        >
39        <div slot="actions">
40          <chameleon-button @click=${this.handleRestartReloadClick} variant="secondary"
41            >${this.userIsAuthenticated?on("Restart GoTo"):on("Reload GoTo")}</chameleon-button
42          >
43          <chameleon-link
44            @click=${()=>$n("https://link.goto.com/fix-app-crashing-something-went-wrong-error")}
45            >${zk("Contact us")}</chameleon-link
46          >
47        </div></chameleon-empty-state
48      >`}renderTopbarLogo(){return oa()?document.querySelector(".container-after-titlebar")?eu:Qd`<div class="drag-region"></div>`:Qd` <topbar-logo class="standalone"></topbar-logo> `}getDescription(){return this.userIsAuthenticated?on(" Try restarting the app. "):oa()?on(" Try reloading the app. "):on(" Try reloading the window. ")}},Gk.tagName="goto-error",Gk.reloadAttempts=JSON.parse(_n(qk)??JSON.stringify(0)),Gk);((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&Kk(t,r,o)})([A_()],Zk.prototype,"userIsAuthenticated");let Yk=Zk;class Jk extends Event{constructor(e,t=0,r){super(e,r),this.value=t}}const Qk=(e,t)=>{const r=!t.exclude;for(const n in t)if(t[n]!==e[n])return!r;return r},Xk=e=>Object.keys(e).filter(e=>"value"!==e).sort().map(t=>e[t].toString()).reduce((e,t)=>e?`${e}.${t}`:`${t}`,"");class eC{constructor(){this.badges=new Map,this.listeners=new Map}doNotifyBadgeNumber(e,t){this.getListenersByType(e).forEach((r,n)=>{(!r.length||r.some(e=>Qk(t,e)))&&n(new Jk(e,this.getBadgeNumberValue(...r)))})}setBadgeNumber(e){const t=Xk(e);this.badges.set(t,e),this.doNotifyBadgeNumber("change",e)}removeBadgeNumber(e){const t=Xk(e);this.badges.has(t)&&(this.badges.delete(t),this.doNotifyBadgeNumber("change",e))}getBadgeNumberValue(...e){return Array.from(this.badges.values()).reduce((t,r)=>!e.length||e.some(e=>Qk(r,e))?t+r.value:t,0)}getListenersByType(e){let t=this.listeners.get(e);return t||(t=new Map,this.listeners.set(e,t)),t}addEventListener(e,t,...r){this.getListenersByType(e).set(t,r)}removeEventListener(e,t){const r=this.getListenersByType(e);r.has(t)&&r.delete(t)}}let tC;const rC=()=>(tC||(tC=new eC),tC),nC={opened:_o(),closed:_o()},{emit:oC}=Co().register("inspector-panel",nC);class iC{async searchFor(e,t){const r={pageSize:t?.pageSize??25,pageMarker:t?.pageMarker??0},n=await Ok().searchFor({query:e,categoryFilterApplicationNames:t?.categories},r);return await Ok().convertToGlobalSearchResultUI(n?.flatMap(e=>e.items)??[],t?.context??"preview")}createQueryBuilder(e){return new Pu(e)}}let sC,aC;const lC=()=>(aC||(aC=new iC),aC),cC={calendarUpdate:_o()},{emit:dC}=Co().register("Calendar",cC),uC=[];for(let e=0;e<256;++e)uC.push((e+256).toString(16).slice(1));let hC=class{constructor(e){this.plugin=e}connectionStatus(){return this.plugin.connectionStatus}async startConnecting(e,t){const r=await(async e=>{const t=await fetch(e);if(!t.ok)throw new Error(`Response status from url ${e}: ${t.status}`);const r=await t.json();if(!(e=>!!e&&"object"==typeof e&&"ports"in e&&Array.isArray(e.ports)&&e.ports.every(e=>"number"==typeof e))(r))throw new Error(`Invalid desktop companion config format at url ${e}`);return r})(e);this.plugin.startConnecting({ports:r.ports,autoReconnect:t})}disconnect(){this.plugin.disconnect()}addEventListener(e,t,r){this.plugin.addEventListener(e,t,r)}removeEventListener(e,t,r){this.plugin.removeEventListener(e,t,r)}waitForConnectionStatus(e,t){return new Promise((r,n)=>{if(this.connectionStatus()===e)return void r();let o;const i=()=>{this.removeEventListener("connectionStatusChanged",s),void 0!==o&&(clearTimeout(o),o=void 0)},s=t=>{t.connectionStatus===e&&(i(),r())};this.addEventListener("connectionStatusChanged",s),o=setTimeout(()=>{o=void 0,i(),n(new Error(`Timeout waiting ${t} ms for connection status ${e}`))},t)})}};var pC=(e=>(e.isApiSupportedRequest="desktop-companion-is-api-supported-request",e.isApiSupportedResponse="desktop-companion-is-api-supported-response",e.apiSupportedChangedSubscriptionRequest="desktop-companion-api-supported-changed-subscription-request",e.apiSupportedChangedSubscriptionResponse="desktop-companion-api-supported-changed-subscription-response",e.apiSupportedChangedSubscriptionEvent="desktop-companion-api-supported-changed-subscription-event",e.apiSupportedChangedSubscriptionCancellation="desktop-companion-api-supported-changed-subscription-cancellation",e.request="desktop-companion-request",e.response="desktop-companion-response",e.subscriptionRequest="desktop-companion-subscription-request",e.subscriptionResponse="desktop-companion-subscription-response",e.subscriptionEvent="desktop-companion-subscription-event",e.subscriptionCancellation="desktop-companion-subscription-cancellation",e))(pC||{});
48let gC=class extends Event{constructor(e,t){super("activeApisChanged"),this.apiId=e,this.isActive=t}},fC=class{constructor(){this._activeApis=new Set,this._eventTarget=new EventTarget}hasApi(e){return this._activeApis.has(e)}addApi(e){this._activeApis.add(e),this._eventTarget.dispatchEvent(new gC(e,!0))}deleteApi(e){this._activeApis.delete(e),this._eventTarget.dispatchEvent(new gC(e,!1))}addEventListener(e,t,r){this._eventTarget.addEventListener(e,t,r)}removeEventListener(e,t,r){this._eventTarget.removeEventListener(e,t,r)}},mC=class extends hC{constructor(){super(...arguments),this._activeApis=new fC}async startServer(e,t){await this.startConnecting(e,t);const r=this._startListeningForIsApiSupportedRequests(),n=this._startListeningForApiSupportedChangedSubscriptionRequests();return()=>{r(),n(),this.disconnect()}}startApi(e,t,r){if(this._activeApis.hasApi(e))throw new Error(`API with ID ${e} has already been started`);this._activeApis.addApi(e);const n=this._startListeningForApiRequests(e,t),o=this._startListeningForApiSubscriptionRequests(e,r);return()=>{n(),o(),this._activeApis.deleteApi(e)}}_startListeningForIsApiSupportedRequests(){const e=e=>{const t=e.message.payload,r=this._activeApis.hasApi(t.apiId),n={requestUuid:t.requestUuid,result:r};this.plugin.send({type:pC.isApiSupportedResponse,payload:n})};return this.plugin.addMessageEventListener(pC.isApiSupportedRequest,e),()=>{this.plugin.removeMessageEventListener(pC.isApiSupportedRequest,e)}}_startListeningForApiSupportedChangedSubscriptionRequests(){const e=async e=>{const t=e.message.payload,r=e=>{if(e.apiId===t.apiId){const r={subscriptionUuid:t.subscriptionUuid,eventData:e.isActive};this.plugin.send({type:pC.apiSupportedChangedSubscriptionEvent,payload:r})}};this._activeApis.addEventListener("activeApisChanged",r);const n={subscriptionUuid:t.subscriptionUuid};this.plugin.send({type:pC.apiSupportedChangedSubscriptionResponse,payload:n});const o=e=>{e.message.payload.subscriptionUuid===t.subscriptionUuid&&(this._activeApis.removeEventListener("activeApisChanged",r),this.plugin.removeMessageEventListener(pC.apiSupportedChangedSubscriptionCancellation,o))};this.plugin.addMessageEventListener(pC.apiSupportedChangedSubscriptionCancellation,o)};return this.plugin.addMessageEventListener(pC.apiSupportedChangedSubscriptionRequest,e),()=>{this.plugin.removeMessageEventListener(pC.apiSupportedChangedSubscriptionRequest,e)}}_startListeningForApiRequests(e,t){const r=async r=>{const n=r.message.payload;if(n.apiId!==e)return;const o=await t(n.request),i={requestUuid:n.requestUuid,response:o};this.plugin.send({type:pC.response,payload:i})};return this.plugin.addMessageEventListener(pC.request,r),()=>{this.plugin.removeMessageEventListener(pC.request,r)}}_startListeningForApiSubscriptionRequests(e,t){const r=async r=>{const n=r.message.payload;if(n.apiId!==e)return;const o=await t(n.subscriptionRequest,e=>{const t={subscriptionUuid:n.subscriptionUuid,eventData:e};this.plugin.send({type:pC.subscriptionEvent,payload:t})}),i={subscriptionUuid:n.subscriptionUuid};this.plugin.send({type:pC.subscriptionResponse,payload:i});const s=e=>{e.message.payload.subscriptionUuid===n.subscriptionUuid&&(o(),this.plugin.removeMessageEventListener(pC.subscriptionCancellation,s))};this.plugin.addMessageEventListener(pC.subscriptionCancellation,s)};return this.plugin.addMessageEventListener(pC.subscriptionRequest,r),()=>{this.plugin.removeMessageEventListener(pC.subscriptionRequest,r)}}};var vC;!function(e){e.Parked="Parked",e.Ringing="Ringing",e.Calling="Calling",e.Connecting="Connecting",e.Connected="Connected",e.OnHold="On hold",e.Transferring="Transferring",e.Voicemail="Voicemail",e.CallQueue="CallQueue",e.Unknown="Unknown"}(vC||(vC={}));const bC=class e{constructor(e){this.desktopCompanionClient=e}sendRequest(t,r){return this.desktopCompanionClient.request(e.apiId,{msg:t,payload:r},{})}dial(e){return this.sendRequest("DIAL_NUMBER",e)}accept(e){return this.sendRequest("ACCEPT_CALL",e)}acceptAndMerge(e){return this.sendRequest("ACCEPT_AND_MERGE_CALL",e)}acceptAndEnd(e){return this.sendRequest("ACCEPT_AND_END_CALL",e)}decline(e){return this.sendRequest("DECLINE_CALL",e)}declineToVoicemail(e){return this.sendRequest("DECLINE_TO_VOICEMAIL",e)}hangUp(e){return this.sendRequest("HANGUP_CALL",e)}hangUpConnection(e){return this.sendRequest("HANGUP_CONNECTION",e)}hangUpParticipant(e){return this.sendRequest("HANGUP_PARTICIPANT",e)}mute(e){return this.sendRequest("MUTE_CALL",e)}unmute(e){return this.sendRequest("UNMUTE_CALL",e)}hold(e){return this.sendRequest("HOLD_CALL",e)}resume(e){return this.sendRequest("RESUME_CALL",e)}sendDTMF(e){return this.sendRequest("SEND_DTMF",e)}split(e){return this.sendRequest("SPLIT_CALL",e)}beginParkCall(e){return this.sendRequest("BEGIN_PARK_CALL",e)}beginDialpad(e){return this.sendRequest("BEGIN_DIALPAD",e)}closeFlow(e){return this.sendRequest("CLOSE_FLOW",e)}park(e){return this.sendRequest("PARK_CALL",e)}unpark(e){return this.sendRequest("UNPARK_CALL",e)}startMerge(e){return this.sendRequest("START_MERGE",e)}cancelMerge(e){return this.sendRequest("CANCEL_MERGE",e)}dialMergeCall(e){return this.sendRequest("DIAL_MERGE_CALL",e)}mergeNow(e){return this.sendRequest("MERGE_NOW",e)}setMergeContact(e){return this.sendRequest("SET_MERGE_CONTACT",e)}mergeActiveCalls(e){return this.sendRequest("MERGE_ACTIVE_CALLS",e)}startTransfer(e){return this.sendRequest("START_TRANSFER",e)}finishTransfer(e){return this.sendRequest("FINISH_TRANSFER",e)}cancelTransfer(e){return this.sendRequest("CANCEL_TRANSFER",e)}setTransferContact(e){return this.sendRequest("SET_TRANSFER_CONTACT",e)}setTransferType(e){return this.sendRequest("SET_TRANSFER_TYPE",e)}initiatePlatformAttendedTransfer(e){return this.sendRequest("INITIATE_PLATFORM_ATTENDED_TRANSFER",e)}completePlatformAttendedTransfer(e){return this.sendRequest("COMPLETE_PLATFORM_ATTENDED_TRANSFER",e)}completeThreeWayPlatformAttendedTransfer(e){return this.sendRequest("COMPLETE_THREE_WAY_PLATFORM_ATTENDED_TRANSFER",e)}cancelPlatformAttendedTransfer(e){return this.sendRequest("CANCEL_PLATFORM_ATTENDED_TRANSFER",e)}swapPlatformAttendedTransfer(e){return this.sendRequest("SWAP_PLATFORM_ATTENDED_TRANSFER",e)}flip(e){return this.sendRequest("FLIP_CALL",e)}getCallState(){return this.sendRequest("GET_CALL_STATE",{})}
48subscribeForCallStateChanges(t){return this.desktopCompanionClient.requestSubscription(e.apiId,{event:"CALL_STATE_CHANGE",subscriptionOptions:{}},t,{})}getExtension(){return this.sendRequest("GET_EXTENSION",{})}changeToExtension(e){return this.sendRequest("CHANGE_TO_EXTENSION",e)}subscribeForExtensionChanged(t){return this.desktopCompanionClient.requestSubscription(e.apiId,{event:"EXTENSION_CHANGED",subscriptionOptions:{}},t,{})}getSetting(e){return this.sendRequest("GET_SETTING",e)}setSetting(e){return this.sendRequest("SET_SETTING",e)}getAllSettings(){return this.sendRequest("GET_ALL_SETTINGS",{})}subscribeForSettingsChanges(t){return this.desktopCompanionClient.requestSubscription(e.apiId,{event:"SETTINGS_CHANGED",subscriptionOptions:{}},t,{})}};bC.apiId="voice-desktop-client-api-id-124EADD4-6DA4-2A43-A975-A25D373A8B15";const yC=new bC(Pw),wC=Object.freeze(Object.defineProperty({__proto__:null,voice:yC},Symbol.toStringTag,{value:"Module"}));class xC{constructor(){this.flagsInstance={authenticationMode(){return lb()},voiceCallsMode(){return cb()}},this.gotoAppDesktopClientSdkInstance={connection:jw,core:zw,voice:wC}}id(){return Xc()}flags(){return this.flagsInstance}gotoAppDesktopClientSdk(){return this.gotoAppDesktopClientSdkInstance}}let _C;const kC=Kn.userPreferences,CC=Kn.userAccountPreferences;var SC=(e=>(e.LOCAL_STORAGE="localStorage",e.CLOUD_PER_ACCOUNT="cloud",e))(SC||{});r.d(t,["$",0,ku,"D",0,tk,"F",0,_o,"H",0,()=>({setBadgeNumber:e=>rC().setBadgeNumber(e),removeBadgeNumber:e=>rC().removeBadgeNumber(e),getBadgeNumberValue:(...e)=>rC().getBadgeNumberValue(...e),addEventListener:(e,t,...r)=>rC().addEventListener(e,t,...r),removeEventListener:(e,t)=>rC().removeEventListener(e,t)}),"J",0,To,"K",0,jn,"L",0,_p,"M",0,()=>l().desktopCompanionServer,"N",0,C_,"O",0,Th,"Q",0,Ok,"R",0,()=>(_C||(_C=new xC),_C),"T",0,Io,"V",0,()=>(sC||(sC=(()=>{const e=lC();return Object.freeze({searchFor:(t,r)=>e.searchFor(t,r),createQueryBuilder:t=>e.createQueryBuilder(t)})})()),sC),"a$",0,()=>sn("goto-shell-controller",qt),"a0",0,_u,"a1",0,xu,"a4",0,ax,"a5",0,async()=>await(await Yw()).logout(),"a6",0,()=>Sg(),"a7",0,Qw,"a8",0,async(e,t,r=250,n=2)=>await Ki(()=>bx(e,t),{maxRetryNumber:n,retryAfterInMilliseconds:r,randomized:!0,exponential:!0}),"aA",0,da,"aB",0,ha,"aC",0,fa,"aD",0,pa,"aE",0,ga,"aG",0,Kt,"aH",0,Qd,"aI",0,ca,"aJ",0,Gt,"aK",0,e=>{const t=new URLSearchParams(hn()).get(e);if(t)return(e=>{const t=fn(e),r=decodeURIComponent(atob(t));return JSON.parse(r)})(t)},"aL",0,va,"aM",0,sa,"aN",0,jk,"aO",0,Sa,"aP",0,Ea,"aQ",0,Ta,"aR",0,Ca,"aT",0,ba,"aU",0,ya,"aW",0,kn,"aZ",0,_n,"a_",0,Dn,"aa",0,wi,"ab",0,e=>Kx(e.externalUserKey).accountKey!==e.accountKey&&(Zx.accountSwitchBegin(e),Zx.accountSwitch({accountKey:e.accountKey,accountName:e.accountName}),Zx.accountSwitchCompleted({accountKey:e.accountKey,pbxId:e.pbxId,externalUserKey:e.externalUserKey}),!0),"ac",0,T_,"ad",0,D_,"af",0,P_,"ag",0,e=>e._$AH,"ah",0,(e,t,r=e)=>(e._$AI(t,r),e),"ai",0,(e,t,r)=>{const n=e._$AA.parentNode,o=void 0===t?e._$AB:t._$AA;if(void 0===r){const t=n.insertBefore(N_(),o),i=n.insertBefore(N_(),o);r=new L_(t,i,e,e.options)}else{const t=r._$AB.nextSibling,i=r._$AM,s=i!==e;if(s){let t;r._$AQ?.(e),r._$AM=e,void 0!==r._$AP&&(t=e._$AU)!==i._$AU&&r._$AP(t)}if(t!==o||s){let e=r._$AA;for(;e!==t;){const t=$_(e).nextSibling;$_(n).insertBefore(e,o),e=t}}}return r},"aj",0,e=>{e._$AR(),e._$AA.remove()},"ak",0,Xd,"al",0,(e,t=R_)=>e._$AH=t,"am",0,()=>{const e=wi();return e?.access_token?bi(atob(e.access_token.split(".")[1]),{sub:""}).sub:""},"an",0,Wn,"ao",0,Sh,"ap",0,Tn,"aq",0,An,"ar",0,e=>{X_.presenceUpdate(e)},"as",0,e=>{X_.userPresenceUpdate(e);const t=(e=>({userAppearance:e.userAppearance,userDoNotDisturb:e.userDoNotDisturb,userDoNotDisturbExpiration:e.userDoNotDisturbExpiration,doNotDisturbDetails:e.doNotDisturbDetails?{dndSources:e.doNotDisturbDetails?.dndSources}:void 0}))(e);((e,t)=>!Y_(e,t))(t,ek)&&X_.userAppearanceAndDNDUpdate(t),ek=Wp(t)},"at",0,yx,"au",0,Co,"av",0,no,"aw",0,"https://cdn.userreport.com/userreport.js","ax",0,ua,"az",0,ma,"b$",0,Nu,"b0",0,()=>sn("goto-topbar-container",Zt),"b1",0,()=>{const e=sn("goto-main-content","goto--main-container",["goto-container"]);return e.setAttribute("role","main"),e},"b2",0,()=>sn("goto-inspector-panel","goto--inspector-panel-container"),"b3",0,()=>sn("div",Wt),"b4",0,()=>sn(ur),"b5",0,()=>{const e=sn("div",Jt);return e.setAttribute("role","navigation"),e.setAttribute("aria-label",on("Main navigation")),e},"b6",0,()=>sn("div",Xt),"b7",0,()=>sn("div",tr),"b8",0,()=>sn("div",nr),"b9",0,()=>sn("div",ir),"bA",0,At,"bB",0,oa,"bC",0,()=>{const e=ug(),{setCheckPointState:t,getAppState:r}=e;return dg||(dg={setCheckPointState:t.bind(e),getAppState:r.bind(e)}),dg},"bE",0,_a,"bF",0,xa,"bG",0,ka,"bH",0,e=>La[e]??e,"bI",0,async()=>oa()&&It.isPluginAvailable("ContainerInfo")?(await At.ContainerInfo.getInfo()).appVersion:"N/A","bJ",0,sg,"bK",0,lr,"bL",0,mn,"bM",0,p_,"bN",0,th,"bO",0,y_,"bQ",0,zk,"bR",0,G_,"bT",0,()=>{oC.opened()},"bU",0,()=>{oC.closed()},"bV",0,CC,"bW",0,Cn,"bX",0,kC,"bY",0,bi,"b_",0,Qv,"ba",0,()=>sn("div",ar),"bb",0,()=>sn(dr),"bc",0,()=>window.self!==window.top&&dn()===Es,"bd",0,()=>{const e=mn().createElement("iframe");return e.id=xs,e.style.display="none",e.src=Qs,e.onload=()=>{Xs(e)||eo().info(`${Js}: Loaded`)},e.onerror=t=>{Xs(e)||(eo().error(t),Ys.getInstance().update(_s))},Vt().addEventListener("message",e=>{(({origin:e})=>e===cn())(e)&&(({data:e})=>e.type===ks)(e)&&Ys.getInstance().update(e.data.isLoggedIn)}),e}
48,"be",0,"8300b634-3d8c-4d2f-8293-444677d35357","bf",0,e=>{const{app:t,name:r,activeWhen:n,customProps:o,rootRoutes:i,rootRoute:s}=e;let a;if(n&&(a=e=>!e.pathname.includes(Dn.redirect)&&n()),i?.some(e=>e.includes(Dn.redirect))||s?.includes(Dn.redirect))throw new Error(`Experience ${r} tried to load on ${Dn.redirect}`);return{app:bh(t,`${la}/${r}`,wh,Mu),name:r,customProps:{...o,domElementGetter:yh(cr)},activeWhen:a??i??dc(s??"")}},"bg",0,dn,"bh",0,uh,"bi",0,ho,"bj",0,Uc,"bk",0,$n,"bm",0,()=>{const e=Wn();return`https://teams.microsoft.com/l/entity/${e.msTeamsManifestAppId}/${e.msTeamsManifestEntityId}`},"bp",0,Vt,"bq",0,Oi,"br",0,{office365:"office365",office365_direct:"office365",exchange:"office365",google:"google",google_direct:"google"},"bs",0,ds,"bu",0,e=>{const t=btoa(e),r=new RegExp(/\//,"g"),n=new RegExp(/\+/,"g"),o=new RegExp(/=/,"g");return t.replace(r,"_").replace(n,"-").replace(o,"")},"bv",0,Ti,"bw",0,e=>`assets/${e}`,"by",0,hg,"bz",0,It,"c1",0,vx,"c2",0,Vu,"c3",0,Bu,"c4",0,xc,"c5",0,oo,"c6",0,_c,"c7",0,t_,"c8",0,()=>new Promise(e=>{let t;const r=()=>{const r=l();r?.user.key&&(t&&Ln(t),e(r.user.key))};t=On(r,100),r()}),"c9",0,l_,"cA",0,Sc,"cB",0,on,"cC",0,async()=>await(async e=>{const t=l().context.pbx?.id;return!!t&&await Tx(t,e)===Ex.ENABLED})(Sx.RESOLVE),"cD",0,()=>r_()&&$o(),"cE",0,()=>ds(Qi.SHELL_COMMUNITY_FORUM_URL)??Wn().communityForumDefaultUrl,"cF",0,()=>{const e=l().user.entitlements;return e.includes(wx.GoToMeeting)&&!e.includes(wx.Jive)&&!e.includes(wx.GoToConnect)},"cI",0,(e,t)=>Vt().open(e,"_blank",`rel=noreferrer,height=${t.height},width=${t.width},left=${t.left},top=${t.top}`),"cJ",0,Nn,"cK",0,Ki,"cL",0,ia,"cM",0,tp,"cN",0,rp,"cO",0,e=>tp(e)?String(e):void 0,"cP",0,ep,"cQ",0,e=>ip.localeChangeBegin(e),"cR",0,d_,"cS",0,la,"cT",0,xn,"cU",0,cn,"cV",0,()=>{const e=ah(),t=l().user.key??"",r=Kx(t).accountKey;return e?.[nh(t)]?.[oh(r)]?.extensions??[]},"cW",0,Qt,"cX",0,r_,"cY",0,(e,t=(()=>window)())=>{const r=()=>{t.removeEventListener("pagehide",n)},n=t=>{t.persisted||(r(),e(t))};return t.addEventListener("pagehide",n),()=>{r()}},"cZ",0,Hi,"c_",0,ed,"cb",0,()=>{if(oa()&&!Xc())return new mC(At.DesktopCompanion)},"cc",0,Ox,"cd",0,us,"ce",0,Ic,"cf",0,Sp,"ci",0,eg,"cj",0,e=>{const t={...e},r=new Map,n=({resourcePath:e,predicate:r})=>{const n=t[e];return!(!n||"allow"!==n.verdict||r&&!r(Wp(n)))};return{evaluateFromCache:n,evaluate:async({check:e,predicate:o,invalidateCache:i})=>{const s=(e=>e.resourceId?`${e.resourceType}:${e.action}:${e.resourceId}`:`${e.resourceType}:${e.action}`)(e);return i&&delete t[s],t[s]||(r.has(s)||r.set(s,(async(e,n)=>{try{const r={accountKey:th()?.key??"",checks:[e]},n=await bx(`${Wn().getShellBffServiceBaseUrl()}/access/pdp/evaluate`,{method:"POST",body:JSON.stringify(r),headers:{"Content-Type":"application/json"},credentials:void 0});if(!n.ok)throw new Error(`PDP evaluate failed with status ${n.status}`);const o=await n.json();Object.assign(t,o)}catch(e){eo().log("PolicyDecisionPoint: evaluateAsync failed",{resourcePath:n,error:e})}finally{r.delete(n)}})(e,s)),await r.get(s)),n({resourcePath:s,predicate:o})}}},"ck",0,fd,"cl",0,wk,"cm",0,eu,"cp",0,Gx,"cq",0,Z_,"cr",0,d,"cs",0,Xc,"cu",0,ws,"cw",0,e=>l()?.user?.emails?.some(t=>t.value===e)??!1,"cx",0,()=>{},"cy",0,"goto-avatar","cz",0,Qh,"d$",0,e=>null===e||"object"!=typeof e&&"function"!=typeof e,"d0",0,()=>{const e=Wg();e&&Uc(e)},"d1",0,e=>kn(Kn.gotoCurrentRoute,e),"d2",0,()=>ia()&&oa(),"d4",0,"goto-presence-indicator","d6",0,rn,"d7",0,fp,"d8",0,gp,"d9",0,cp,"dA",0,"https://www.goto.com/fr/company/legal/terms-and-conditions","dB",0,"https://www.goto.com/pt/company/legal/terms-and-conditions","dC",0,(e,t)=>{if(!It.isPluginAvailable(e))return;const r=It.plugins[e];return r[t]?r[t]:void 0},"dD",0,e=>{if(ec().includes(Op))return void e();const t=r=>{Ap(r),(e=>-1!==e.indexOf(Op))(Tp(r))&&(e(),window.removeEventListener(Ep,t))};window.addEventListener(Ep,t)},"dE",0,Ou,"dF",0,()=>"Windows"===Ao()&&oa(),"dG",0,Vk,"dH",0,"goto-user-note-icon","dI",0,e=>{if(/^(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|;?ext\.?:?=?|extension:?)\s*(\d+))?$/i.test(e))return"true";const t=e.replace(/extension:?=?|;?ext=?.?:?\s*|[\sx*#.\-+()]*/gi,"");return/^\d+$/.test(t)?"possible":"false"},"dJ",0,e=>{const t=e.replace(/\s+/g,"");return/^\d+$/.test(t)?"all":/\d/g.test(t)?"some":"none"},"dK",0,e=>{const t=e.replace(/\s+/g,"");return/^[a-zA-Z]+$/g.test(t)?"all":/[a-zA-Z]/g.test(t)?"some":"none"},"dL",0,e=>{const t=e.replace(/\s+/g,"");return/^[`!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~]+$/g.test(t)?"all":/[`!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~]/g.test(t)?"some":"none"},"dM",0,e=>{const t=e.match(/\S+/g);return t?t.length:0},"dN",0,e=>/^\d{9}$/g.test(e)?"true":/^[0-9]+$/g.test(e)?"possible":"false","dO",0,e=>/^(https?:\/\/|)(www\.|)(meet\.goto\.com|gotomeet\.me|app\.goto\.com\/meeting|)\/?\/(\d{9})+$/g.test(e)?"true":/^(https?:\/\/|)(www\.|)(meet\.goto\.com|gotomeet\.me|app\.goto\.com\/meeting|)\/?\/[/a-zA-Z_\-\d]+$/g.test(e)?"possible":"false","dP",0,e=>/^([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)+$/g.test(e)?"all":/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/g.test(e)?"some":"none","dR",0,(e,t)=>{e.defaultAction?.command&&ak(e.defaultAction.command,t,e.originalResult.data)},"dU",0,e=>e===gk||e===pk,"dV",0,ik,"dW",0,e=>{Ek.searchFieldQueryChange(e)},"dX",0,Ck,"dY",0,async()=>await vk(),"dZ",0,e=>e?.querySelector("goto-search-history"),"d_",0,ak,"da",0,()=>l().user.location.timeZone,"db",0,Bx,"dc",0,Fc,"dd",0,vn,"de",0,"shell-clipboard","df",0,(e,t,r=!1)=>{const n=r?"...":"";return e.length>t?e.substring(0,t-n.length)+n:e},"dg",0,"shell-search","dh",0,e=>{l_().retrieve(Ck).commands.executeSearch.execute(e)},"di",0,(e,t)=>{t?.documentElement.setAttribute("lang",cp(e,"-"))},"dj",0,dr,"dk",0,{uid:"4bba1a62-3f73-41e2-ac00-c404854c1d09",getContextMenuActionsForContext:()=>[]},"dl",0,e=>(_g.add(e),()=>{_g.delete(e)}),"dm",0,bs,"dn",0,Wg,"dp",0,$o,"dq",0,()=>{const e=qx();return(e?.free&&e?.active)??!1},"dr",0,()=>{const e=qx();return(e?.trial&&e?.active)??!1},"ds",0,()=>{const e=qx();return e?.endDate?new Date(e.endDate):void 0},"dt",0,(e,t)=>{const r=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),n=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate());return Math.floor((n-r)/864e5)},"du",0,"https://www.goto.com/pricing/meeting?utm_campaign=gtm_trial_countdown&utm_source=goto-app&utm_medium=ipd&utm_content=buy-now&utm_term=global_trial","dv",0,Sn,"dw",0,yn,"dx",0,"https://www.goto.com/en/company/legal/terms-and-conditions","dy",0,"https://www.goto.com/es/company/legal/terms-and-conditions","dz",0,"https://www.goto.com/de/company/legal/terms-and-conditions","e$",0,e=>{if(!oo())return;const{applicationReady:t}=Co().subscribeTo(td),r=()=>(e=>{const t=dn(),{defaultRoute:r=wa}=e??{};t!==r&&(Vg().length>0||sg().isValidShellModuleRoute(t)||(e=>!!Oa.find(t=>t===e))(t)||(Cn(Kn.gotoCurrentRoute),eo().warn(`[URL]: "${t}" does not have a supported extension. Redirecting to [DEFAULT URL]: "${r}"`),Uc(r)))})(e);Vt().addEventListener(Ip,r),t.on(r),no(()=>{Vt().removeEventListener(Ip,r),t.removeListener(r)})},"e0",0,e=>Ru(e).split(" "),"e2",0,async()=>{const e=hk();e&&(await e.setPreference(pk,[]),await e.setPreference(gk,[]))},"e3",0,vk,"e4",0,async e=>{const t=hk(),{key:r,searchHistory:n}=await bk(e);yk(e,n),t?.setPreference(r,n.map(e=>xk(e)))},"e5",0,()=>sn("goto-trial-banner"),"e6",0,er,"e7",0,qx,"e8",0,()=>nd.navrailOrderReset(),"e9",0,"https://support.goto.com/connect/help/set-up-goto-for-microsoft-teams","eA",0,()=>{const e=In(Gn);e?((e=>{Vt().sessionStorage.removeItem(e)})(Gn),Uc(e)):(Uc(wa),Nn())},"eB",0,async()=>await(await Yw()).auth(),"eC",0,async()=>{const e=await bx(`${Wn().authUrl}/me/graphql`,{method:"POST",headers:[["Content-Type","application/json"]],body:JSON.stringify({query:Cx()}),credentials:"omit"}),{data:t,errors:r}=await e.json();if(r&&r.length>0){const{body:t,status:n,statusText:o}=await e;throw new ex({message:new xx(r).toString(),response:e,status:n,statusText:o,body:t})}return t},"eD",0,qk,"eE",0,async()=>(await Yw()).isAuthenticationRequired(),"eF",0,Si,"eG",0,Ei,"eH",0,Xw,"eI",0,Hx,"eJ",0,Ux,"eK",0,Po,"eL",0,async(e,t)=>{const r=[Po({func:()=>Px(e),defaultReturn:void 0})],n=Fx(t)??"";n&&r.push(Po({func:()=>Ax(n),defaultReturn:void 0}));let[o,i]=await Promise.all(r);if(!o)return;const s=o,a=((e,t)=>{const r=t.map(e=>e.id),n=Fx(e);return n&&(o=n,r.includes(o)&&Dx(o,t))?n:r.find(e=>Dx(e,t));var o}
48)(t,s)??"",l=((e,t)=>t.find(t=>t.id===e)?.userInfo?.userId)(a,s)??"",c=((e,t,r)=>{const n=t.find(e=>e.id===r)?.accountKey;return n||zx(e)||t[0]?.accountKey})(t,s,a)??"";return a!==n&&(i=await Ax(a)),i&&(i=Object.entries(i).reduce((e,[t,r])=>({...e,[t]:"ENABLED"===r}),{})),{accountKey:c,pbxId:a,pbxUserId:l,pbxFlags:i,pbxRegion:"",pbxes:s}},"eM",0,u_,"eN",0,e=>{const t=[];return e?.forEach(e=>{(e.licenses??[]).forEach(e=>{t.push(...e.roles??[])})}),t},"eO",0,ls,"eQ",0,Fx,"eR",0,Vx,"eS",0,()=>oa()?"Desktop":"Web","eT",0,()=>Io().version,"eU",0,Ao,"eW",0,()=>new Promise(e=>{if(Yx)e();else{const{applicationReady:t}=Co().subscribeTo(td);t.once(e)}}),"eX",0,Cc,"eY",0,async(e,t)=>await en.use(Yh).init({fallbackLng:ap,keySeparator:!1,nsSeparator:!1,interpolation:{escapeValue:!1},returnEmptyString:!1,lng:kp(e),load:"currentOnly",backend:{loadPath:"/i18n/{{lng}}.json"},supportedLngs:ep.slice()}).then(t=>(ip.localeChanged(e),t)),"ea",0,e=>kn(Kn.teamsUsePlugin,e.toString()),"eb",0,lb,"ec",0,Fw,"ed",0,Bw,"ee",0,Hw,"ef",0,"gotoforteams://open","eg",0,e=>{const t=JSON.stringify(e),r=btoa(encodeURIComponent(t));return gn(r)},"eh",0,()=>Oo()?So:Eo,"ei",0,Lo,"ej",0,tn,"ek",0,e=>((e,t)=>e.replace(Pc,e=>t(e)))(e,e=>(e=>Lc[e]??e)(e)),"el",0,e=>e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"):"","en",0,"goto-text-highlight","eo",0,K_,"ep",0,(e,...t)=>{const r=1===e.length?e[0]:t.reduce((t,r,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1],e[0]);return new gd(r,e,hd)},"eq",0,()=>eh()?.pbx,"er",0,Wp,"es",0,()=>Gx().length>1,"et",0,Y_,"ev",0,"main-module-layout-sidebar-close","ew",0,nk,"ex",0,rk,"f$",0,()=>{const e=Xc();if(e)try{En(Jc,e)}catch{}},"f0",0,ih,"f1",0,e=>{const t={...Fu,getQuickActions:()=>[]};try{return Bu(e,t),!0}catch{return!1}},"f2",0,Yt,"f3",0,"single-spa:before-mount-routing-event","f5",0,e=>{(()=>{const e=document.getElementById("dynamic-favicon");e&&document.head.removeChild(e)})(),(e=>{const t=mn(),r=t.createElement("link");r.rel="icon",r.type="image/x-icon",r.href=e,r.id="dynamic-favicon",t.head.prepend(r)})(e)},"f6",0,tx,"f7",0,bg,"f8",0,()=>sn("goto-macos-support"),"f9",0,()=>sn("goto-windows-support"),"fA",0,"https://chameleon.goto.com/themes","fB",0,Aa,"fC",0,Ia,"fD",0,()=>{const e=hn();return new URLSearchParams(e)},"fG",0,vs,"fH",0,e=>{if(e?.length)try{return JSON.parse(decodeURIComponent(e))}catch{throw eo().error("Cannot decode and parse this string",e),new Error("Cannot decode and parse a string")}throw new Error("Decode and parse an empty string")},"fI",0,()=>sn("goto-blocked-versions-banner"),"fJ",0,as,"fK",0,ys,"fL",0,()=>To().name,"fM",0,()=>To().version,"fN",0,pn,"fO",0,Gi,"fQ",0,async e=>await new Promise((t,r)=>{performance.mark(zi);const n=Object.entries(e).reduce((e,[t,r])=>void 0!==r&&"licenses"!==t?e+`properties[${t}]=${encodeURIComponent(r)}&`:e,""),o=new Headers({Authorization:Wn().unleashAccessToken}),i=`${es}?${n}`;let s=200,a="";Yi(i,{headers:o,timeoutInMS:1e4}).then(async e=>(performance.mark(Fi),Ui(),s=e.status,a=await e.text(),JSON.parse(a))).then(e=>{if(e){const t=(e=>e?.length?e.reduce((e,t)=>{const r=t.variant.payload;if(r){if(r.type===Ji.JSON)try{const n=JSON.parse(r.value);e[t.name]=n}catch(e){eo().error("Invalid json format, could not be parsed",e)}r.type===Ji.STRING&&(e[t.name]=r.value)}else e[t.name]=!0;return e},{}):void 0)(e.toggles);t&&(is(t),rs=cs(t))}t()}).catch(e=>{eo().error("Could not retrieve Unleash feature flags",{error:e,url:i,responseText:a,responseStatus:s}),r(e)})}),"fR",0,async e=>(eo().info("shell-desktop-server: logout requested via companion IPC"),l().auth.logout()),"fS",0,async e=>await l().auth.login({inflightPathname:e?.options?.inflightPathname??wa}),"fT",0,async e=>l().auth.getToken(),"fU",0,async(e,t)=>(sd.add(t),()=>sd.delete(t)),"fV",0,_x,"fW",0,Ug,"fX",0,Bg,"fY",0,Hg,"fZ",0,{hideSidebar:!1,hideTopbar:!1},"fa",0,Ip,"fb",0,()=>nd.routeChanged(),"fc",0,e=>Mx(e)?.currentApps??[],"fd",0,Vg,"fe",0,(e,t)=>e.length===t.length&&!e.some((e,r)=>t[r]!==e),"ff",0,(e,t)=>{const r=Rx(e),n=Mx(e);kn(r,JSON.stringify({...n,currentApps:t}))},"fg",0,e=>{nd.appChanged(e)},"fh",0,e=>{const t=l().user.key,r=th()?.key,n=ah();if(n&&t&&r){const o=n[nh(t)];if(o)return o[oh(r)]?.extensions.find(t=>t.navigationItems.some(({pathname:t})=>function(e,t){const r=e.replace(/^\/|\/$/g,""),n=(e=>e.startsWith("http://")||e.startsWith("https://"))(t)?new URL(t).pathname:t;return new RegExp(`^/${r}(/|$)`).test(n)}(t,e)))?.extensionId}},"fi",0,zc,"fj",0,()=>!!l().user?.key,"fk",0,Uw,"fl",0,cb,"fm",0,Wc,"fn",0,sb,"fo",0,Mw,"fp",0,No,"fq",0,Bi,"fr",0,()=>sn("goto-blocked-extensions-banner"),"ft",0,e=>{const t=wi();e?t?.access_token!==e.access_token&&(ki(e),yn(Vt().origin)):(Si(),Ei(),Uc(ya))},"fu",0,e=>{kn(Kn.userPreferences,JSON.stringify(e??{}))},"fv",0,()=>new Promise(e=>{let t;const r=()=>{const r=l();r&&(t&&Ln(t),e(r))};t=On(r,100),r()}),"fw",0,()=>l().userPreferences?.getPreferences().then(e=>e),"fx",0,Kx,"fy",0,e=>{Ux(e.externalUserKey,e.accountKey),Hx({externalUserKey:e.externalUserKey,pbxId:e.pbxId,pbxUserId:e.pbxUserId})},"fz",0,sp,"g0",0,()=>{if(dn()===Es){const e=hn()?new URLSearchParams(hn()):new URLSearchParams(un().replace(/#/,"?"));e.has(Cs)?ta(!1):e.has(Ss)?ta(!0):eo().error(`${Js}: Missing parameter ('${Ss}' or '${Cs}') from the URL `)}},"g1",0,()=>{const e=kx(),t=[];return e.forEach((e,r)=>{t.push({key:r,values:Array.from(e)})}),t},"g2",0,ss,"g3",0,zx,"g4",0,Vn,"g5",0,ln,"g6",0,{extended_prod:"extended.goto.com"},"g7",0,e=>{Vt().location.href=e},"g8",0,()=>{if(It.isPluginAvailable("ContainerSettings")){const{localeChanged:e}=Co().subscribeTo(np),t=e=>{At.ContainerSettings.setLocale(e)};e.on(t),no(()=>{e.removeListener(t)})}It.isPluginAvailable("LifeCycle")&&At.LifeCycle.appReady({launcher:e=>Cp.getInstance().appLauncher(e),quitter:()=>{}})},"g9",0,async e=>{await e.startServer(`${cn()}/assets/desktopCompanion.json`,!0)},"ga",0,async()=>{await Bi(2e4);const e=mn().getElementById(Wt),t=mn().querySelector(ur);e?.contains(t)&&(eo().error("App failed to load within timeout peri
48od",{currentUrl:Vt().location.href,documentReadyState:mn().readyState,loadedExtensions:sg()?.getExtensions()?.map(e=>e.id)??[]}),Uc(aa))},"gb",0,"single-spa:before-routing-event","gc",0,()=>{oo()&&!uh(dn())&&(e=>{const t=(e=>{const t={timestamp:Date.now(),extensions:[]};return e.forEach(e=>{const r=ih(e).map(t=>{const r=sh(t.displayNameKey,e);return{...t,dataTest:t.dataTest??`${e.id}/${t.id}`,displayName:r()}});t.extensions.push({extensionId:e.id,navigationItems:r})}),t})(e);(e=>{const t=l().user.key??"",r=Kx(t).accountKey,n=ah()??{},o={...n,[nh(t)]:{...n[nh(t)],[oh(r)]:e}};kn(Kn.userCache,JSON.stringify(o))})(t)})(sg().getExtensions())},"gd",0,async e=>(await Yw()).setUnguardedRoutes(e),"gf",0,$i,"gg",0,()=>{so=new Map,globalThis.addEventListener("beforeunload",()=>{go()})},"gh",0,()=>{let e=[];window.addEventListener(Ep,t=>{Ap(t);const r=(e=>e?.detail?.appsByNewStatus?.NOT_MOUNTED??[])(t),n=Tp(t);r.length&&(e=e.filter(e=>!r.includes(e))),n.length&&n.forEach(t=>{e.includes(t)||e.push(t)}),(r.length||n.length)&&(()=>{if(oo()){const t=["goto/banner-notification","goto/snackbar-notification","goto/modal-notification","goto/topbar","goto/navigation"],r=e.filter(e=>!t.includes(e)).join("|");eo().setContext("shell_experiences",r)}})()})},"gi",0,()=>{Ig()&&Og()},"gk",0,()=>{Yx||(Yx=!0,nd.applicationReady())},"gl",0,Ni,"gm",0,Pi,"gn",0,()=>{Di.forEach(({name:e,start:t,end:r})=>{try{performance.measure(e,t,r)}catch{eo().error(`Performance Marker ${t} does not exist. Performance measurements will not be correct.`)}});const e={};try{performance.getEntriesByType("measure").reduce((e,t)=>{const{name:r,duration:n,startTime:o}=t;return e[r]={duration:n,startTime:o},e},e),eo().log({msg:"GoTo Shell Performance Measurements",...e,startingURL:Zn(location.href)})}catch(e){eo().error({msg:`Error while measuring GoTo Shell Performance: ${e}`})}},"go",0,(e,t=2,r=10)=>{const n=`navigateToUrlWithRateLimit_${e}`,o=Date.now(),i=JSON.parse(localStorage.getItem(n)||JSON.stringify({count:0,lastTimeInMs:o}));if(o-i.lastTime>1e3*r&&(i.count=0,i.lastTime=o,localStorage.setItem(n,JSON.stringify(i))),!(i.count<t))throw localStorage.removeItem(n),new Error(`User has reached the maximum number of navigations to ${e} within ${r} seconds`);i.count++,localStorage.setItem(n,JSON.stringify(i)),yn(e)},"gp",0,e=>{(e=>{ju(e)&&e.getModuleGroups().forEach(e=>{_h.has(e.id)&&(_h.get(e.id)?.forEach(t=>{kh(t.extension,e,t.module)}),_h.delete(e.id))})})(e),((e,t)=>{const r=e.getModules();Ch(e,r,t)})(e,{groupIdentifier:"main-apps",domElementGetter:yh(`#${Wt}`)}),((e,t)=>{const r=Qu(e.getSettings()).map(Xu);Ch(e,r,t)})(e,{domElementGetter:yh(cr),groupIdentifier:wh,beforeMount:Mu})},"gr",0,Tp,"gs",0,Oa,"gt",0,Jv,"h",0,"5.291.8","r",0,"NotificationChannel","s",0,J_,"y",0,bx,"z",0,()=>{dC.calendarUpdate()}])}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}return r.d=function(e,t){if(Array.isArray(t))for(var n=0;n<t.length;){var o=t[n++],i=t[n++],s=0===i?{enumerable:!0,value:t[n++]}:{enumerable:!0,get:i};r.o(e,o)||Object.defineProperty(e,o,s)}else for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){"use strict";var e={};if(r.r(e),r.d(e,{Badge:function(){return aUe},DesktopCompanion:function(){return LUe},DiagnosticsReporter:function(){return NUe},ExecutionContext:function(){return GUe},Hid:function(){return OBe},KeyboardShortcuts:function(){return qBe},Logger:function(){return bUe},Notification:function(){return rHe},WindowManager:function(){return lHe}}),r(181),!customElements.getName){const e=new WeakMap,t=customElements.define;customElements.define=function(r,n,o){e.set(n,r),t.call(this,r,n,o)},customElements.getName=function(t){return e.get(t)}}const t=new Set(["value","role","class"]);function n(e){return class extends e{attributeChangedCallback(e,r,n){var o,i;super.attributeChangedCallback(e,r,n),(o=e).startsWith("aria-")||o.startsWith("data-")||t.has(o)||
48("true"===(i=n)||"false"===i)&&("true"===n?this.setAttribute(e,""):this.removeAttribute(e))}}}function o(e){return t=>class extends t{get chameleonVersion(){return e}}}const i=Symbol.for("chameleon.design-system.10.5.1");function s(e){return o("@getgo/chameleon-web 10.5.1")(n(e))}function a(e,t="[DEFAULT_NAME]"){return s(function(e){return t=>class extends t{constructor(){super(...arguments),this.baseName=e.toUpperCase()}}}(t)(e))}const l=globalThis;Object.getOwnPropertySymbols(l).includes(i)||Object.defineProperty(l,i,{writable:!1,value:new class{constructor(){this.elementMap=new Map}registerElement(e,t){this.elementMap.has(e)||this.elementMap.set(e,t.toUpperCase())}unregisterElement(e){this.elementMap.delete(e)}tagFor(e){return this.elementMap.get(e)}}});const c=l[i],d=(e,t)=>{if(l[i].tagFor(e))return;const r=`${t.prefix??"chameleon"}-${e.baseName}${t.suffix?`-${t.suffix}`:""}`;if(Object.defineProperty(e,"tagName",{writable:!1,value:r.toUpperCase()}),l[i].registerElement(e,r),customElements.get(r))console.warn(`CHAMELEON: ${r} is already defined.`);else if("getName"in customElements&&void 0!==customElements.getName(e))customElements.define(r,class extends e{});else try{customElements.define(r,e)}catch(t){t instanceof DOMException&&"NotSupportedError"===t.name&&customElements.define(r,class extends e{})}},u=(e,t={})=>{const r=l[i].tagFor(e);if(!r&&!t.optional){if(globalThis["chameleon-debug"])throw new Error(`Tag not found for element: ${"baseName"in e?e.baseName:e.name}`);console.error(`Tag not found for element: ${"baseName"in e?e.baseName:e.name}`)}return r??"TAG_NOT_FOUND"};function h(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}Object.create,Object.create;const p=globalThis,g=p.ShadowRoot&&(void 0===p.ShadyCSS||p.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,f=Symbol(),m=new WeakMap;class v{constructor(e,t,r){if(this._$cssResult$=!0,r!==f)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(g&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=m.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&m.set(t,e))}return e}toString(){return this.cssText}}const b=e=>new v("string"==typeof e?e:e+"",void 0,f),y=(e,t)=>{if(g)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const r of t){const t=document.createElement("style"),n=p.litNonce;void 0!==n&&t.setAttribute("nonce",n),t.textContent=r.cssText,e.appendChild(t)}},w=g?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return b(t)})(e):e,{is:x,defineProperty:_,getOwnPropertyDescriptor:k,getOwnPropertyNames:C,getOwnPropertySymbols:S,getPrototypeOf:E}=Object,I=globalThis,A=I.trustedTypes,T=A?A.emptyScript:"",O=I.reactiveElementPolyfillSupport,L=(e,t)=>e,$={toAttribute(e,t){switch(t){case Boolean:e=e?T:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},N=(e,t)=>!x(e,t),R={attribute:!0,type:String,converter:$,reflect:!1,useDefault:!1,hasChanged:N};Symbol.metadata??=Symbol("metadata"),I.litPropertyMetadata??=new WeakMap;class P extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=R){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&_(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:o}=k(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:n,set(t){const i=n?.call(this);o?.call(this,t),this.requestUpdate(e,i,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??R}static _$Ei(){if(this.hasOwnProperty(L("elementProperties")))return;const e=E(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(L("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(L("properties"))){const e=this.properties,t=[...C(e),...S(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(w(e))}else void 0!==e&&t.push(w(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e
vendor: 9,517 bytes, line 48
48=>e(this))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return y(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){const o=(void 0!==r.converter?.toAttribute?r.converter:$).toAttribute(t,r.type);this._$Em=e,null==o?this.removeAttribute(n):this.setAttribute(n,o),this._$Em=null}}_$AK(e,t){const r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){const e=r.getPropertyOptions(n),o="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:$;this._$Em=n;const i=o.fromAttribute(t,e.type);this[n]=i??this._$Ej?.get(n)??i,this._$Em=null}}requestUpdate(e,t,r,n=!1,o){if(void 0!==e){const i=this.constructor;if(!1===n&&(o=this[e]),r??=i.getPropertyOptions(e),!((r.hasChanged??N)(o,t)||r.useDefault&&r.reflect&&o===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:n,wrapped:o},i){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,i??t??this[e]),!0!==o||void 0!==i)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),!0===n&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e){const{wrapped:e}=r,n=this[t];!0!==e||this._$AL.has(t)||void 0===n||this.C(t,void 0,r,n)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}}P.elementStyles=[],P.shadowRootOptions={mode:"open"},P[L("elementProperties")]=new Map,P[L("finalized")]=new Map,O?.({ReactiveElement:P}),(I.reactiveElementVersions??=[]).push("2.1.2");const D=globalThis,M=e=>e,z=D.trustedTypes,F=z?z.createPolicy("lit-html",{createHTML:e=>e}):void 0,U="$lit$",B=`lit$${Math.random().toFixed(9).slice(2)}$`,H="?"+B,j=`<${H}>`,V=document,W=()=>V.createComment(""),K=e=>null===e||"object"!=typeof e&&"function"!=typeof e,q=Array.isArray,G=e=>q(e)||"function"==typeof e?.[Symbol.iterator],Z="[ \t\n\f\r]",Y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,J=/-->/g,Q=/>/g,X=RegExp(`>|${Z}(?:([^\\s"'>=/]+)(${Z}*=${Z}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ee=/'/g,te=/"/g,re=/^(?:script|style|textarea|title)$/i,ne=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),oe=ne(1),ie=ne(2),se=ne(3),ae=Symbol.for("lit-noChange"),le=Symbol.for("lit-nothing"),ce=new WeakMap,de=V.createTreeWalker(V,129);function ue(e,t){if(!q(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==F?F.createHTML(t):t}const he=(e,t)=>{const r=e.length-1,n=[];let o,i=2===t?"<svg>":3===t?"<math>":"",s=Y;for(let t=0;t<r;t++){const r=e[t];let a,l,c=-1,d=0;for(;d<r.length&&(s.lastIndex=d,l=s.exec(r),null!==l);)d=s.lastIndex,s===Y?"!--"===l[1]?s=J:void 0!==l[1]?s=Q:void 0!==l[2]?(re.test(l[2])&&(o=RegExp("</"+l[2],"g")),s=X):void 0!==l[3]&&(s=X):s===X?">"===l[0]?(s=o??Y,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?X:'"'===l[3]?te:ee):s===te||s===ee?s=X:s===J||s===Q?s=Y:(s=X,o=void 0);const u=s===X&&e[t+1].startsWith("/>")?" ":"";i+=s===Y?r+j:c>=0?(n.push(a),r.slice(0,c)+U+r.slice(c)+B+u):r+B+(-2===c?t:u)}return[ue(e,i+(e[r]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),n]};class pe{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let o=0,i=0;const s=e.length-1,a=this.parts,[l,c]=he(e,t);if(this.el=pe.createElement(l,r),de.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=de.nextNode())&&a.length<s;){if(1===n.nodeType){if(n.hasAttributes())for(const e of n.getAttributeNames())if(e.endsWith(U)){const t=c[i++],r=n.getAttribute(e).split(B),s=/([.?@])?(.*)/.exec(t);a.push({type:1,index:o,name:s[2],strings:r,ctor:"."===s[1]?be:"?"===s[1]?ye:"@"===s[1]?we:ve}),n.removeAttribute(e)}else e.startsWith(B)&&(a.push({type:6,index:o}),n.removeAttribute(e));if(re.test(n.tagName)){const e=n.textContent.split(B),t=e.length-1;if(t>0){n.textContent=z?z.emptyScript:"";for(let r=0;r<t;r++)n.append(e[r],W()),de.nextNode(),a.push({type:2,index:++o});n.append(e[t],W())}}}else if(8===n.nodeType)if(n.data===H)a.push({type:2,index:o});else{let e=-1;for(;-1!==(e=n.data.indexOf(B,e+1));)a.push({type:7,index:o}),e+=B.length-1}o++}}static createElement(e,t){const r=V.createElement("template");return r.innerHTML=e,r}}function ge(e,t,r=e,n){if(t===ae)return t;let o=void 0!==n?r._$Co?.[n]:r._$Cl;const i=K(t)?void 0:t._$litDirective$;return o?.constructor!==i&&(o?._$AO?.(!1),void 0===i?o=void 0:(o=new i(e),o._$AT(e,r,n)),void 0!==n?(r._$Co??=[])[n]=o:r._$Cl=o),void 0!==o&&(t=ge(e,o._$AS(e,t.values),o,n)),t}class fe{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,n=(e?.creationScope??V).importNode(t,!0);de.currentNode=n;let o=de.nextNode(),i=0,s=0,a=r[0];for(;void 0!==a;){if(i===a.index){let t;2===a.type?t=new me(o,o.nextSibling,this,e):1===a.type?t=new a.ctor(o,a.name,a.strings,this,e):6===a.type&&(t=new xe(o,this,e)),this._$AV.push(t),a=r[++s]}i!==a?.index&&(o=de.nextNode(),i++)}return de.currentNode=V,n}p(e){let t=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}}class me{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,n){this.type=2,this._$AH=le,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=ge(this,e,t),K(e)?e===le||null==e||""===e?(this._$AH!==le&&this._$AR(),this._$AH=le):e!==this._$AH&&e!==ae&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):G(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==le&&K(this._$AH)?this._$AA.nextSibling.data=e:this.T(V.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,n="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=pe.createElement(ue(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{const e=new fe(n,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=ce.get(e.strings);return void 0===t&&ce.set(e.strings,t=new pe(e)),t}k(e){q(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const o of e)n===t.length?t.push(r=new me(this.O(W()),this.O(W()),this,this.options)):r=t[n],r._$AI(o),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const t=M(e).nextSibling;M(e).remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class ve{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,n,o){this.type=1,this._$AH=le,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=o,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=le}_$AI(e,t=this,r,n){const o=this.strings;let i=!1;if(void 0===o)e=ge(this,e,t,0),i=!K(e)||e!==this._$AH&&e!==ae,i&&(this._$AH=e);else{const n=e;let s,a;for(e=o[0],s=0;s<o.length-1;s++)a=ge(this,n[r+s],t,s),a===ae&&(a=this._$AH[s]),i||=!K(a)||a!==this._$AH[s],a===le?e=le:e!==le&&(e+=(a??"")+o[s+1]),this._$AH[s]=a}i&&!n&&this.j(e)}j(e){e===le?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class be extends ve{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===le?void 0:e}}class ye extends ve{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==le)}}class we extends ve{constructor(e,t,r,n,o){super(e,t,r,n,o),this.type=5}
48_$AI(e,t=this){if((e=ge(this,e,t,0)??le)===ae)return;const r=this._$AH,n=e===le&&r!==le||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,o=e!==le&&(r===le||n);n&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class xe{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){ge(this,e)}}const _e={M:U,P:B,A:H,C:1,L:he,R:fe,D:G,V:ge,I:me,H:ve,N:ye,U:we,B:be,F:xe},ke=D.litHtmlPolyfillSupport;ke?.(pe,me),(D.litHtmlVersions??=[]).push("3.3.2");const Ce=globalThis;class Se extends P{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,r)=>{const n=r?.renderBefore??t;let o=n._$litPart$;if(void 0===o){const e=r?.renderBefore??null;n._$litPart$=o=new me(t.insertBefore(W(),e),e,void 0,r??{})}return o._$AI(e),o})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ae}}Se._$litElement$=!0,Se.finalized=!0,Ce.litElementHydrateSupport?.({LitElement:Se});const Ee=Ce.litElementPolyfillSupport;Ee?.({LitElement:Se}),(Ce.litElementVersions??=[]).push("4.2.2");const Ie={attribute:!0,type:String,converter:$,reflect:!1,hasChanged:N},Ae=(e=Ie,t,r)=>{const{kind:n,metadata:o}=r;let i=globalThis.litPropertyMetadata.get(o);if(void 0===i&&globalThis.litPropertyMetadata.set(o,i=new Map),"setter"===n&&((e=Object.create(e)).wrapped=!0),i.set(r.name,e),"accessor"===n){const{name:n}=r;return{set(r){const o=t.get.call(this);t.set.call(this,r),this.requestUpdate(n,o,e,!0,r)},init(t){return void 0!==t&&this.C(n,void 0,e,t),t}}}if("setter"===n){const{name:n}=r;return function(r){const o=this[n];t.call(this,r),this.requestUpdate(n,o,e,!0,r)}}throw Error("Unsupported decorator location: "+n)};function Te(e){return(t,r)=>"object"==typeof r?Ae(e,t,r):((e,t,r)=>{const n=t.hasOwnProperty(r);return t.constructor.createProperty(r,e),n?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}function Oe(e){return Te({...e,state:!0,attribute:!1})}const Le=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,r),r);function $e(e,t){return(r,n,o)=>{const i=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:t}="object"==typeof n?r:o??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return Le(r,n,{get(){let r=e.call(this);return void 0===r&&(r=i(this),(null!==r||this.hasUpdated)&&t.call(this,r)),r}})}return Le(r,n,{get(){return i(this)}})}}function Ne(e){return(t,r)=>{const{slot:n,selector:o}=e??{},i="slot"+(n?`[name=${n}]`:":not([name])");return Le(t,r,{get(){const t=this.renderRoot?.querySelector(i),r=t?.assignedElements(e)??[];return void 0===o?r:r.filter(e=>e.matches(o))}})}}function Re(e){return(t,r)=>{const{slot:n}=e??{},o="slot"+(n?`[name=${n}]`:":not([name])");return Le(t,r,{get(){const t=this.renderRoot?.querySelector(o);return t?.assignedNodes(e)??[]}})}}function Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function De(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,s,a=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t);else for(;!(l=(n=i.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Pe(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pe(e,t):void 0}}
vendor: 5,804 bytes, line 48
48(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Me=Object.entries,ze=Object.setPrototypeOf,Fe=Object.isFrozen,Ue=Object.getPrototypeOf,Be=Object.getOwnPropertyDescriptor;let He=Object.freeze,je=Object.seal,Ve=Object.create,We="undefined"!=typeof Reflect&&Reflect,Ke=We.apply,qe=We.construct;He||(He=function(e){return e}),je||(je=function(e){return e}),Ke||(Ke=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return e.apply(t,n)}),qe||(qe=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return new e(...r)});const Ge=ft(Array.prototype.forEach),Ze=ft(Array.prototype.lastIndexOf),Ye=ft(Array.prototype.pop),Je=ft(Array.prototype.push),Qe=ft(Array.prototype.splice),Xe=Array.isArray,et=ft(String.prototype.toLowerCase),tt=ft(String.prototype.toString),rt=ft(String.prototype.match),nt=ft(String.prototype.replace),ot=ft(String.prototype.indexOf),it=ft(String.prototype.trim),st=ft(Number.prototype.toString),at=ft(Boolean.prototype.toString),lt="undefined"==typeof BigInt?null:ft(BigInt.prototype.toString),ct="undefined"==typeof Symbol?null:ft(Symbol.prototype.toString),dt=ft(Object.prototype.hasOwnProperty),ut=ft(Object.prototype.toString),ht=ft(RegExp.prototype.test),pt=(gt=TypeError,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return qe(gt,t)});var gt;function ft(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return Ke(e,t,n)}}function mt(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:et;if(ze&&ze(e,null),!Xe(t))return e;let n=t.length;for(;n--;){let o=t[n];if("string"==typeof o){const e=r(o);e!==o&&(Fe(t)||(t[n]=e),o=e)}e[o]=!0}return e}function vt(e){for(let t=0;t<e.length;t++)dt(e,t)||(e[t]=null);return e}function bt(e){const t=Ve(null);for(const n of Me(e)){var r=De(n,2);const o=r[0],i=r[1];dt(e,o)&&(Xe(i)?t[o]=vt(i):i&&"object"==typeof i&&i.constructor===Object?t[o]=bt(i):t[o]=i)}return t}function yt(e,t){for(;null!==e;){const r=Be(e,t);if(r){if(r.get)return ft(r.get);if("function"==typeof r.value)return ft(r.value)}e=Ue(e)}return function(){return null}}const wt=He(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),xt=He(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),_t=He(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),kt=He(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ct=He(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),St=He(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Et=He(["#text"]),It=He(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
48spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),At=He(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Tt=He(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ot=He(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Lt=je(/{{[\w\W]*|^[\w\W]*}}/g),$t=je(/<%[\w\W]*|^[\w\W]*%>/g),Nt=je(/\${[\w\W]*/g),Rt=je(/^data-[\-\w.\u00B7-\uFFFF]+$/),Pt=je(/^aria-[\-\w]+$/),Dt=je(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Mt=je(/^(?:\w+script|data):/i),zt=je(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ft=je(/^html$/i),Ut=je(/^[a-z][.\w]*(-[.\w]+)+$/i),Bt=je(/<[/\w!]/g),Ht=je(/<[/\w]/g),jt=je(/<\/no(script|embed|frames)/i),Vt=je(/\/>/i),Wt=function(){return"undefined"==typeof window?null:window},Kt=function(e,t,r,n){return dt(e,t)&&Xe(e[t])?mt(n.base?bt(n.base):{},e[t],n.transform):r};var qt=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Wt();const r=t=>e(t);if(r.version="3.4.13",r.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return r.isSupported=!1,r;let n=t.document;const o=n,i=o.currentScript;t.DocumentFragment;const s=t.HTMLTemplateElement,a=t.Node,l=t.Element,c=t.NodeFilter;void 0===t.NamedNodeMap&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const d=t.DOMParser,u=t.trustedTypes,h=l.prototype,p=yt(h,"cloneNode"),g=yt(h,"remove"),f=yt(h,"nextSibling"),m=yt(h,"childNodes"),v=yt(h,"parentNode"),b=yt(h,"shadowRoot"),y=yt(h,"attributes"),w=a&&a.prototype?yt(a.prototype,"nodeType"):null,x=a&&a.prototype?yt(a.prototype,"nodeName"):null,_=a&&a.prototype?yt(a.prototype,"ownerDocument"):null;if("function"==typeof s){const e=n.createElement("template");e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let k,C,S="",E=!1,I=0;const A=function(){if(I>0)throw pt('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},T=function(e){A(),I++;try{return k.createHTML(e)}finally{I--}},O=n,L=O.implementation,$=O.createNodeIterator,N=O.createDocumentFragment,R=O.getElementsByTagName,P=o.importNode;let D={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof Me&&"function"==typeof v&&L&&void 0!==L.createHTMLDocument;const M=Lt,z=$t,F=Nt,U=Rt,B=Pt,H=Mt,j=zt,V=Ut;let W=Dt,K=null;const q=mt({},[...wt,...xt,..._t,...Ct,...Et]);let G=null;const Z=mt({},[...It,...At,...Tt,...Ot]);let Y=Object.seal(Ve(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),J=null,Q=null;
vendor: 18,048 bytes, line 48
48const X=Object.seal(Ve(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ee=!0,te=!0,re=!1,ne=!0,oe=!1,ie=!0,se=!1,ae=!1,le=null,ce=null,de=!1,ue=!1,he=!1,pe=!1,ge=!0,fe=!1;const me="user-content-";let ve=!0,be=!1,ye={},we=null;const xe=mt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let _e=null;const ke=mt({},["audio","video","img","source","image","track"]);let Ce=null;const Se=mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ee="http://www.w3.org/1998/Math/MathML",Ie="http://www.w3.org/2000/svg",Ae="http://www.w3.org/1999/xhtml";let Te=Ae,Oe=!1,Le=null;const $e=mt({},[Ee,Ie,Ae],tt),Ne=He(["mi","mo","mn","ms","mtext"]);let Re=mt({},Ne);const Pe=He(["annotation-xml"]);let De=mt({},Pe);const ze=mt({},["title","style","font","a","script"]);let Fe=null;const Ue=["application/xhtml+xml","text/html"];let Be=null,We=null;const Ke=n.createElement("form"),qe=function(e){return e instanceof RegExp||e instanceof Function},gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(We&&We===e)return;e&&"object"==typeof e||(e={}),e=bt(e),Fe=-1===Ue.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Be="application/xhtml+xml"===Fe?tt:et,K=Kt(e,"ALLOWED_TAGS",q,{transform:Be}),G=Kt(e,"ALLOWED_ATTR",Z,{transform:Be}),Le=Kt(e,"ALLOWED_NAMESPACES",$e,{transform:tt}),Ce=Kt(e,"ADD_URI_SAFE_ATTR",Se,{transform:Be,base:Se}),_e=Kt(e,"ADD_DATA_URI_TAGS",ke,{transform:Be,base:ke}),we=Kt(e,"FORBID_CONTENTS",xe,{transform:Be}),J=Kt(e,"FORBID_TAGS",bt({}),{transform:Be}),Q=Kt(e,"FORBID_ATTR",bt({}),{transform:Be}),ye=!!dt(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?bt(e.USE_PROFILES):e.USE_PROFILES),ee=!1!==e.ALLOW_ARIA_ATTR,te=!1!==e.ALLOW_DATA_ATTR,re=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ne=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,oe=e.SAFE_FOR_TEMPLATES||!1,ie=!1!==e.SAFE_FOR_XML,se=e.WHOLE_DOCUMENT||!1,ue=e.RETURN_DOM||!1,he=e.RETURN_DOM_FRAGMENT||!1,pe=e.RETURN_TRUSTED_TYPE||!1,de=e.FORCE_BODY||!1,ge=!1!==e.SANITIZE_DOM,fe=e.SANITIZE_NAMED_PROPS||!1,ve=!1!==e.KEEP_CONTENT,be=e.IN_PLACE||!1,W=function(e){try{return ht(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Dt,Te="string"==typeof e.NAMESPACE?e.NAMESPACE:Ae,Re=dt(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof e.MATHML_TEXT_INTEGRATION_POINTS?bt(e.MATHML_TEXT_INTEGRATION_POINTS):mt({},Ne),De=dt(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&"object"==typeof e.HTML_INTEGRATION_POINTS?bt(e.HTML_INTEGRATION_POINTS):mt({},Pe);const t=dt(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&"object"==typeof e.CUSTOM_ELEMENT_HANDLING?bt(e.CUSTOM_ELEMENT_HANDLING):Ve(null);if(Y=Ve(null),dt(t,"tagNameCheck")&&qe(t.tagNameCheck)&&(Y.tagNameCheck=t.tagNameCheck),dt(t,"attributeNameCheck")&&qe(t.attributeNameCheck)&&(Y.attributeNameCheck=t.attributeNameCheck),dt(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(Y.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),je(Y),oe&&(te=!1),he&&(ue=!0),ye&&(K=mt({},Et),G=Ve(null),!0===ye.html&&(mt(K,wt),mt(G,It)),!0===ye.svg&&(mt(K,xt),mt(G,At),mt(G,Ot)),!0===ye.svgFilters&&(mt(K,_t),mt(G,At),mt(G,Ot)),!0===ye.mathMl&&(mt(K,Ct),mt(G,Tt),mt(G,Ot))),X.tagCheck=null,X.attributeCheck=null,dt(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?X.tagCheck=e.ADD_TAGS:Xe(e.ADD_TAGS)&&(K===q&&(K=bt(K)),mt(K,e.ADD_TAGS,Be))),dt(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?X.attributeCheck=e.ADD_ATTR:Xe(e.ADD_ATTR)&&(G===Z&&(G=bt(G)),mt(G,e.ADD_ATTR,Be))),dt(e,"ADD_URI_SAFE_ATTR")&&Xe(e.ADD_URI_SAFE_ATTR)&&mt(Ce,e.ADD_URI_SAFE_ATTR,Be),dt(e,"FORBID_CONTENTS")&&Xe(e.FORBID_CONTENTS)&&(we===xe&&(we=bt(we)),mt(we,e.FORBID_CONTENTS,Be)),dt(e,"ADD_FORBID_CONTENTS")&&Xe(e.ADD_FORBID_CONTENTS)&&(we===xe&&(we=bt(we)),mt(we,e.ADD_FORBID_CONTENTS,Be)),ve&&(K["#text"]=!0),se&&mt(K,["html","head","body"]),K.table&&(mt(K,["tbody"]),delete J.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw pt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw pt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const t=k;k=e.TRUSTED_TYPES_POLICY;try{S=T("")}catch(e){throw k=t,e}}else null===e.TRUSTED_TYPES_POLICY?(k=void 0,S=""):(void 0===k&&(E||(C=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let r=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(r=t.getAttribute(n));const o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML(e){return e},createScriptURL(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(u,i),E=!0),k=C),k&&"string"==typeof S&&(S=T("")));He&&He(e),We=e},ft=mt({},[...xt,..._t,...kt]),vt=mt({},[...Ct,...St]),qt=function(e){Je(r.removed,{element:e});try{v(e).removeChild(e)}catch(t){if(g(e),!v(e))throw pt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Gt=function(e){Jt(e);const t=m(e);if(t){const e=[];Ge(t,t=>{Je(e,t)}),Ge(e,e=>{try{g(e)}catch(e){}})}const r=y(e);if(r)for(let t=r.length-1;t>=0;--t){const n=r[t],o=n&&n.name;if("string"==typeof o)try{e.removeAttribute(o)}catch(e){}}},Zt=function(e,t){try{Je(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Je(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ue||he)try{qt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Yt=function(e){const t=y(e);if(t)for(let r=t.length-1;r>=0;--r){const n=t[r],o=n&&n.name;if("string"==typeof o&&!G[Be(o)])try{e.removeAttribute(o)}catch(e){}}},Jt=function(e){const t=[e];for(;t.length>0;){const e=t.pop();1===(w?w(e):e.nodeType)&&Yt(e);const r=m(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},Qt=function(e){let t=null,r=null;if(de)e="<remove></remove>"+e;else{const t=rt(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===Fe&&Te===Ae&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=k?T(e):e;if(Te===Ae)try{t=(new d).parseFromString(o,Fe)}catch(e){}if(!t||!t.documentElement){t=L.createDocument(Te,"template",null);try{t.documentElement.innerHTML=Oe?S:o}catch(e){}}const i=t.body||t.documentElement;return e&&r&&i.insertBefore(n.createTextNode(r),i.childNodes[0]||null),Te===Ae?R.call(t,se?"html":"body")[0]:se?t.documentElement:i},Xt=function(e){const t=_?_(e):e.ownerDocument;return $.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},er=function(e){return e=nt(e,M," "),e=nt(e,z," "),nt(e,F," ")},tr=function(e){var t;e.normalize();const r=_?_(e):e.ownerDocument,n=$.call(r||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let o=n.nextNode();for(;o;)o.data=er(o.data),o=n.nextNode();const i=null===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");i&&Ge(i,e=>{nr(e.content)&&tr(e.content)})},rr=function(e){const t=x?x(e):null;return"string"==typeof t&&"form"===Be(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==y(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==w(e)||e.childNodes!==m(e))},nr=function(e){if(!w||"object"!=typeof e||null===e)return!1;try{return 11===w(e)}catch(e){return!1}},or=function(e){if(!w||"object"!=typeof e||null===e)return!1;try{return"number"==typeof w(e)}catch(e){return!1}};function ir(e,t,n){0!==e.length&&Ge(e,e=>{e.call(r,t,n,We)})}const sr=function(e,t,r,n){return 0===e.length?t:t===r||t===n?bt(t):t},ar=function(e,t){if(ir(D.beforeSanitizeElements,e,null),e!==t&&null===v(e))return be&&Jt(e),!0;if(rr(e))return qt(e),!0;const n=Be(x?x(e):e.nodeName);if(K=sr(D.uponSanitizeElement,K,q,le),ir(D.uponSanitizeElement,e,{tagName:n,allowedTags:K}),e!==t&&null===v(e))return be&&Jt(e),!0;if(function(e,t){return!!(ie&&e.hasChildNodes()&&!or(e.firstElementChild)&&ht(Bt,e.textContent)&&ht(Bt,e.innerHTML))||!(!ie||e.namespaceURI!==Ae||"style"!==t||!or(e.firstElementChild))||7===e.nodeType||!(!ie||8!==e.nodeType||!ht(Ht,e.data))}(e,n))return qt(e),!0;if(J[n]||!(X.tagCheck instanceof Function&&X.tagCheck(n))&&!K[n]){const r=function(e,t,r){if(!J[t]&&dr(t)){if(Y.tagNameCheck instanceof RegExp&&ht(Y.tagNameCheck,t))return!1;if(Y.tagNameCheck instanceof Function&&Y.tagNameCheck(t))return!1}if(ve&&!we[t]){const t=v(e),n=m(e);if(n&&t)for(let o=n.length-1;o>=0;--o){const i=e===r?p(n[o],!0):n[o];t.insertBefore(i,f(e))}}return qt(e),!0}(e,n,t);return!1===r&&ir(D.afterSanitizeElements,e,null),r}if(1===(w?w(e):e.nodeType)&&!function(e){let t=v(e);t&&t.tagName||(t={namespaceURI:Te,tagName:"template"});const r=et(e.tagName),n=et(t.tagName);return!!Le[e.namespaceURI]&&(e.namespaceURI===Ie?function(e,t,r){return t.namespaceURI===Ae?"svg"===e:t.namespaceURI===Ee?"svg"===e&&("annotation-xml"===r||Re[r]):Boolean(ft[e])}(r,t,n):e.namespaceURI===Ee?function(e,t,r){return t.namespaceURI===Ae?"math"===e:t.namespaceURI===Ie?"math"===e&&De[r]:Boolean(vt[e])}(r,t,n):e.namespaceURI===Ae?function(e,t,r){return!(t.namespaceURI===Ie&&!De[r])&&!(t.namespaceURI===Ee&&!Re[r])&&!vt[e]&&(ze[e]||!ft[e])}(r,t,n):!("application/xhtml+xml"!==Fe||!Le[e.namespaceURI]))}(e))return qt(e),!0;if(("noscript"===n||"noembed"===n||"noframes"===n)&&ht(jt,e.innerHTML))return qt(e),!0;if(oe&&3===e.nodeType){const t=er(e.textContent);e.textContent!==t&&(Je(r.removed,{element:e.cloneNode()}),e.textContent=t)}return ir(D.afterSanitizeElements,e,null),!1},lr=function(e,t,r){if(Q[t])return!1;if(ie&&"patchsrc"===t)return!1;if(ie&&"for"===t&&"label"!==e&&"output"!==e)return!1;if(ge&&("id"===t||"name"===t)&&(r in n||r in Ke))return!1;const o=G[t]||X.attributeCheck instanceof Function&&X.attributeCheck(t,e);if(te&&ht(U,t));else if(ee&&ht(B,t));else if(o){if(Ce[t]);else if(ht(W,nt(r,j,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==ot(r,"data:")||!_e[e])if(re&&!ht(H,nt(r,j,"")));else if(r)return!1}else if(!(dr(e)&&(Y.tagNameCheck instanceof RegExp&&ht(Y.tagNameCheck,e)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(e))&&(Y.attributeNameCheck instanceof RegExp&&ht(Y.attributeNameCheck,t)||Y.attributeNameCheck instanceof Function&&Y.attributeNameCheck(t,e))||"is"===t&&Y.allowCustomizedBuiltInElements&&(Y.tagNameCheck instanceof RegExp&&ht(Y.tagNameCheck,r)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(r))))return!1;return!0},cr=mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),dr=function(e){return!cr[et(e)]&&ht(V,e)},ur=function(e,t,r,n){if(k&&"object"==typeof u&&"function"==typeof u.getAttributeType&&!r)switch(u.getAttributeType(e,t)){case"TrustedHTML":return T(n);case"TrustedScriptURL":return function(e){A(),I++;try{return k.createScriptURL(e)}finally{I--}}(n)}return n},hr=function(e,t,n,o){try{n?e.setAttributeNS(n,t,o):e.setAttribute(t,o),rr(e)?qt(e):Ye(r.removed)}catch(r){Zt(t,e)}},pr=function(e){ir(D.beforeSanitizeAttributes,e,null);const t=e.attributes;if(!t||rr(e))return;G=sr(D.uponSanitizeAttribute,G,Z,ce);const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0};let n=t.length;const o=Be(e.nodeName);for(;n--;){const i=t[n],s=i.name,a=i.namespaceURI,l=i.value,c=Be(s),d=l;let u="value"===s?d:it(d);r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,ir(D.uponSanitizeAttribute,e,r),u=r.attrValue,!fe||"id"!==c&&"name"!==c||0===ot(u,me)||(Zt(s,e),u=me+u),ie&&ht(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)||"attributename"===c&&rt(u,"href")?Zt(s,e):r.forceKeepAttr||(!r.keepAttr||!ne&&ht(Vt,u)?Zt(s,e):(oe&&(u=er(u)),lr(o,c,u)?(u=ur(o,c,a,u),u!==d&&hr(e,s,a,u)):Zt(s,e)))}ir(D.afterSanitizeAttributes,e,null)},gr=function(e){let t=null;const r=Xt(e);for(ir(D.beforeSanitizeShadowDOM,e,null);t=r.nextNode();)if(ir(D.uponSanitizeShadowNode,t,null),ar(t,e),pr(t),nr(t.content)&&gr(t.content),1===(w?w(t):t.nodeType)){const e=b(t);nr(e)&&(fr(e),gr(e))}ir(D.afterSanitizeShadowDOM,e,null)},fr=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){gr(e.shadow);continue}const r=e.node,n=1===(w?w(r):r.nodeType),o=m(r);if(o)for(let e=o.length-1;e>=0;--e)t.push({node:o[e],shadow:null});if(n){const e=x?x(r):null;if("string"==typeof e&&"template"===Be(e)){const e=r.content;nr(e)&&t.push({node:e,shadow:null})}}if(n){const e=b(r);nr(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,i=null,s=null,a=null;if(Oe=!e,Oe&&(e="\x3c!--\x3e"),"string"!=typeof e&&!or(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return st(e);case"boolean":return at(e);case"bigint":return lt?lt(e):"0";case"symbol":return ct?ct(e):"Symbol()";case"undefined":default:return ut(e);case"function":case"object":{if(null===e)return ut(e);const t=e,r=yt(t,"toString");if("function"==typeof r){const e=r(t);return"string"==typeof e?e:ut(e)}return ut(e)}}}(e)))throw pt("dirty is not a string, aborting");if(!r.isSupported)return e;ae?(K=le,G=ce):gt(t),(D.uponSanitizeElement.length>0||D.uponSanitizeAttribute.length>0)&&(K=bt(K)),D.uponSanitizeAttribute.length>0&&(G=bt(G)),r.removed=[];const l=be&&"string"!=typeof e&&or(e);if(l){!function(e){if(!ie)return;const t=[e];for(;t.length>0;){const e=t.pop(),r=w?w(e):e.nodeType;if(7===r||8===r&&ht(Ht,e.data)){try{g(e)}catch(e){}continue}if(1===r){const t=e,r=Be(x?x(e):e.nodeName);try{t.hasAttribute&&t.hasAttribute("patchsrc")&&t.removeAttribute("patchsrc"),t.hasAttribute&&t.hasAttribute("for")&&"label"!==r&&"output"!==r&&t.removeAttribute("for")}catch(e){}}const n=m(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}}(e);const t=x?x(e):e.nodeName;if("string"==typeof t){const r=Be(t);if(!K[r]||J[r])throw Gt(e),pt("root node is forbidden and cannot be sanitized in-place")}if(rr(e))throw Gt(e),pt("root node is clobbered and cannot be sanitized in-place");try{fr(e)}catch(t){throw Gt(e),t}}else if(or(e))n=Qt("\x3c!----\x3e"),i=n.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?n=i:n.appendChild(i),fr(i);else{if(!ue&&!oe&&!se&&-1===e.indexOf("<"))return k&&pe?T(e):e;if(n=Qt(e),!n)return ue?null:pe?S:""}n&&de&&qt(n.firstChild);const c=l?e:n;try{const e=Xt(c);for(;s=e.nextNode();)ar(s,c),pr(s),nr(s.content)&&gr(s.content)}catch(t){throw l&&(Gt(e),Ge(r.removed,e=>{e.element&&Jt(e.element)})),t}if(l)return Ge(r.removed,e=>{e.element&&Jt(e.element)}),oe&&tr(e),e;if(ue){if(oe&&tr(n),he)for(a=N.call(n.ownerDocument);n.firstChild;)a.appendChild(n.firstChild);else a=n;return(G.shadowroot||G.shadowrootmode)&&(a=P.call(o,a,!0)),a}let d=se?n.outerHTML:n.innerHTML;return se&&K["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&ht(Ft,n.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+d),oe&&(d=er(d)),k&&pe?T(d):d},r.setConfig=function(){gt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ae=!0,le=K,ce=G},r.clearConfig=function(){We=null,ae=!1,le=null,ce=null,k=C,S=""},r.isValidAttribute=function(e,t,r){We||gt({});const n=Be(e),o=Be(t);return lr(n,o,r)},r.addHook=function(e,t){"function"==typeof t&&dt(D,e)&&Je(D[e],t)},r.removeHook=function(e,t){if(dt(D,e)){if(void 0!==t){const r=Ze(D[e],t);return-1===r?void 0:Qe(D[e],r,1)[0]}return Ye(D[e])}},r.removeHooks=function(e){dt(D,e)&&(D[e]=[])},r.removeAllHooks=function(){D={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}();function Gt(e){class t extends e{constructor(){super(...arguments),this.disabled=!1,this.required=!1,this.dirtyValue=!1}get validity(){return this.internals.validity}get form(){return this.internals.form}get validationMessage(){return this.internals.validationMessage}get willValidate(){return this.internals.willValidate}get labels(){return this.internals.labels}checkValidity(){return this.internals.checkValidity()}reportValidity(){return this.internals.reportValidity()}setValidity(e,t,r){this.internals.setValidity(e,t,r)}formResetCallback(){this.value=this.initialValue,this.dirtyValue=!1}formDisabledCallback(e){this.disabled=e}setFormValue(e){this.internals.setFormValue(e)}updated(e){super.updated(e),e.has("value")&&(this.dirtyValue=!0,this.currentValue=this.value,this.setFormValue(this.value??null)),e.has("currentValue")&&(this.value=this.currentValue),e.has("initialValue")&&(this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)),e.has("disabled")&&this.classList.toggle("disabled",this.disabled),e.has("required")&&this.classList.toggle("required",this.required)}}return h([Te({type:Boolean,reflect:!0})],t.prototype,"disabled",void 0),h([Te({reflect:!0,attribute:"value"})],t.prototype,"initialValue",void 0),h([Te({reflect:!0,attribute:"current-value"})],t.prototype,"currentValue",void 0),h([Te({reflect:!0})],t.prototype,"name",void 0),h([Te({type:Boolean,reflect:!0})],t.prototype,"required",void 0),h([Te({reflect:!1})],t.prototype,"value",void 0),t}class Zt extends(function(e){return o("@getgo/chameleon-web 10.5.1")(n(e))}(function(e){class t extends e{constructor(){super(...arguments),this.ariaAtomic=null,this.ariaBusy=null,this.ariaControl
48s=null,this.ariaCurrent=null,this.ariaDescribedby=null,this.ariaDetails=null,this.ariaDisabled=null,this.ariaErrormessage=null,this.ariaFlowto=null,this.ariaHaspopup=null,this.ariaHidden=null,this.ariaInvalid=null,this.ariaKeyShortcuts=null,this.ariaLabel=null,this.ariaLabelledby=null,this.ariaLive=null,this.ariaOwns=null,this.ariaRelevant=null,this.ariaRoleDescription=null}}return h([Te({reflect:!0,attribute:"aria-atomic"})],t.prototype,"ariaAtomic",void 0),h([Te({reflect:!0,attribute:"aria-busy"})],t.prototype,"ariaBusy",void 0),h([Te({reflect:!0,attribute:"aria-controls"})],t.prototype,"ariaControls",void 0),h([Te({reflect:!0,attribute:"aria-current"})],t.prototype,"ariaCurrent",void 0),h([Te({reflect:!0,attribute:"aria-describedby"})],t.prototype,"ariaDescribedby",void 0),h([Te({reflect:!0,attribute:"aria-details"})],t.prototype,"ariaDetails",void 0),h([Te({reflect:!0,attribute:"aria-disabled"})],t.prototype,"ariaDisabled",void 0),h([Te({reflect:!0,attribute:"aria-errormessage"})],t.prototype,"ariaErrormessage",void 0),h([Te({reflect:!0,attribute:"aria-flowto"})],t.prototype,"ariaFlowto",void 0),h([Te({reflect:!0,attribute:"aria-haspopup"})],t.prototype,"ariaHaspopup",void 0),h([Te({reflect:!0,attribute:"aria-hidden"})],t.prototype,"ariaHidden",void 0),h([Te({reflect:!0,attribute:"aria-invalid"})],t.prototype,"ariaInvalid",void 0),h([Te({reflect:!0,attribute:"aria-keyshortcuts"})],t.prototype,"ariaKeyShortcuts",void 0),h([Te({reflect:!0,attribute:"aria-label"})],t.prototype,"ariaLabel",void 0),h([Te({reflect:!0,attribute:"aria-labelledby"})],t.prototype,"ariaLabelledby",void 0),h([Te({reflect:!0,attribute:"aria-live"})],t.prototype,"ariaLive",void 0),h([Te({reflect:!0,attribute:"aria-owns"})],t.prototype,"ariaOwns",void 0),h([Te({reflect:!0,attribute:"aria-relevant"})],t.prototype,"ariaRelevant",void 0),h([Te({reflect:!0,attribute:"aria-roledescription"})],t.prototype,"ariaRoleDescription",void 0),t}(Se))){get baseName(){return this.constructor.baseName}}const{I:Yt}=_e,Jt=e=>e,Qt=()=>document.createComment(""),Xt=(e,t,r)=>{const n=e._$AA.parentNode,o=void 0===t?e._$AB:t._$AA;if(void 0===r){const t=n.insertBefore(Qt(),o),i=n.insertBefore(Qt(),o);r=new Yt(t,i,e,e.options)}else{const t=r._$AB.nextSibling,i=r._$AM,s=i!==e;if(s){let t;r._$AQ?.(e),r._$AM=e,void 0!==r._$AP&&(t=e._$AU)!==i._$AU&&r._$AP(t)}if(t!==o||s){let e=r._$AA;for(;e!==t;){const t=Jt(e).nextSibling;Jt(n).insertBefore(e,o),e=t}}}return r},er=(e,t,r=e)=>(e._$AI(t,r),e),tr={},rr=e=>{e._$AR(),e._$AA.remove()},nr=e=>(...t)=>({_$litDirective$:e,values:t});class or{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const ir=(e,t)=>
48{const r=e._$AN;if(void 0===r)return!1;for(const e of r)e._$AO?.(t,!1),ir(e,t);return!0},sr=e=>{let t,r;do{if(void 0===(t=e._$AM))break;r=t._$AN,r.delete(e),e=t}while(0===r?.size)},ar=e=>{for(let t;t=e._$AM;e=t){let r=t._$AN;if(void 0===r)t._$AN=r=new Set;else if(r.has(e))break;r.add(e),dr(t)}};function lr(e){void 0!==this._$AN?(sr(this),this._$AM=e,ar(this)):this._$AM=e}function cr(e,t=!1,r=0){const n=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(t)if(Array.isArray(n))for(let e=r;e<n.length;e++)ir(n[e],!1),sr(n[e]);else null!=n&&(ir(n,!1),sr(n));else ir(this,e)}const dr=e=>{2==e.type&&(e._$AP??=cr,e._$AQ??=lr)};class ur extends or{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),ar(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(ir(this,e),sr(this))}setValue(e){if((()=>void 0===this._$Ct.strings)())this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}const hr=()=>new pr;class pr{}const gr=new WeakMap,fr=nr(class extends ur{render(e){return le}update(e,[t]){const r=t!==this.G;return r&&void 0!==this.G&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),le}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){const t=this.ht??globalThis;let r=gr.get(t);void 0===r&&(r=new WeakMap,gr.set(t,r)),void 0!==r.get(this.G)&&this.G.call(this.ht,void 0),r.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return"function"==typeof this.G?gr.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});class mr extends Zt{constructor(){super(),this.role=null,this.width=null,this.height=null,this.resolvedIconContainerRef=hr(),this.handleContentMutation=e=>{this.updateIcon()},this.contentObserver=new MutationObserver(this.handleContentMutation)}connectedCallback(){super.connectedCallback(),this.updateIcon(),this.contentObserver.observe(this,{childList:!0,subtree:!0,characterData:!0})}firstUpdated(e){super.firstUpdated(e),this.updateIcon()}updated(e){super.updated(e);const t=this.resolvedIconContainerRef.value;t&&(e.has("role")&&(this.role?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")),e.has("width")&&(t.style.width=this.width?`var(--goto-icon-size, ${this.toCssLength(this.width)})`:""),e.has("height")&&(t.style.height=this.height?`var(--goto-icon-size, ${this.toCssLength(this.height)})`:""),e.has("gradient")&&this.updateIcon())}disconnectedCallback(){super.disconnectedCallback(),this.contentObserver.disconnect()}toCssLength(e){return/^\d+(\.\d+)?$/.test(e)?`${e}px`:e}render(){return oe`
49      <div class="icon-identifier hidden" aria-hidden="true">
50        <slot></slot>
51      </div>
52      <div ${fr(this.resolvedIconContainerRef)} class="resolved-icon"></div>
53    `}updateIcon(){const e=this.textContent?.trim()||"";if(e){const t=qt.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0}});this.resolvedIconContainerRef.value&&(this.resolvedIconContainerRef.value.innerHTML=t),e.includes("pictogram")&&this.classList.add("pictogram"),e.includes("background-pattern")&&this.classList.add("background-pattern")}else if(this.resolvedIconContainerRef.value&&"svg"===this.firstElementChild?.tagName.toLowerCase()){const e=this.firstElementChild;e.setAttribute("aria-hidden","true"),this.resolvedIconContainerRef.value.innerHTML="",this.resolvedIconContainerRef.value.appendChild(e.cloneNode(!0))}const t=this.resolvedIconContainerRef.value?.querySelector("svg");if(t&&(t.setAttribute("aria-hidden","true"),this.gradient)){const e=`--goto-${this.gradient}`,r=getComputedStyle(this).getPropertyValue(e).trim();if(!r)return void requestAnimationFrame(()=>{this.isConnected&&this.updateIcon()});const n=t.querySelector('linearGradient[data-autogen="true"]');n?.parentNode&&n.parentNode.removeChild(n);const o=this.parseGradientStops(r),i=this.createLinearGradient(o);let s=t.querySelector("defs");s||(s=document.createElementNS("http://www.w3.org/2000/svg","defs"),t.insertBefore(s,t.firstChild)),s.appendChild(i),this.overwriteShapeFills(t)}}parseGradientStops(e){return e.split(",").map(e=>{const t=e.trim().match(/(.+?\))\s*(\d+%)/);if(t)return{color:t[1].trim(),offset:t[2].trim()};const r=e.lastIndexOf(" ");return{color:e.slice(0,r).trim(),offset:e.slice(r+1).trim()}}).filter(e=>e.color&&e.offset)}createLinearGradient(e){const t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"linearGradient");return r.setAttribute("id","autogen-gradient"),r.setAttribute("x1","0%"),r.setAttribute("y1","0%"),r.setAttribute("x2","100%"),r.setAttribute("y2","100%"),r.setAttribute("data-autogen","true"),e.forEach(({color:e,offset:n})=>{const o=document.createElementNS(t,"stop");o.setAttribute("stop-color",e),o.setAttribute("offset",n),r.appendChild(o)}),r}overwriteShapeFills(e){const t=["path","rect","circle","ellipse","polygon","g"],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>t.includes(e.tagName.toLowerCase())?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let n=r.nextNode();for(;n;)n.setAttribute("fill","url(#autogen-gradient)"),n=r.nextNode()}}function vr(e={}){d(mr,e)}
53mr.baseName="svg",mr.styles=b(":host{height:var(--goto-icon-size,16px);width:var(--goto-icon-size,16px);pointer-events:none;display:flex}:host .icon-identifier{line-height:0}:host svg,:host ::slotted(svg),:host .resolved-icon{color:var(--goto-icon-color,var(--goto-icon-color-default));height:var(--goto-icon-size,16px);margin:var(--goto-icon-margin,0);user-select:none;width:var(--goto-icon-size,16px);display:flex}:host .hidden{display:none}:host(.pictogram){height:var(--goto-icon-size,var(--goto-spacing-09));width:var(--goto-icon-size,var(--goto-spacing-09));pointer-events:none;display:flex}:host(.pictogram) svg,:host(.pictogram) ::slotted(svg),:host(.pictogram) .resolved-icon{color:var(--goto-icon-color,var(--goto-icon-color-default));height:var(--goto-icon-size,var(--goto-spacing-09));margin:var(--goto-icon-margin,0);user-select:none;width:var(--goto-icon-size,var(--goto-spacing-09));display:flex}:host(.pictogram) [class$=brand-color] g,:host(.pictogram) path[class$=brand-color]{fill:var(--goto-type-color-brand-default)}:host(.pictogram) .hidden{display:none}:host(.background-pattern){height:var(--goto-icon-size);width:var(--goto-icon-size);pointer-events:none;display:flex}:host(.background-pattern) svg,:host(.background-pattern) ::slotted(svg),:host(.background-pattern) .resolved-icon{user-select:none;color:var(--goto-icon-color,var(--goto-icon-color-default));height:var(--goto-icon-size);margin:var(--goto-icon-margin,0);width:var(--goto-icon-size);display:flex}:host(.background-pattern) .hidden{display:none}"),h([Te({reflect:!0})],mr.prototype,"role",void 0),h([Te()],mr.prototype,"width",void 0),h([Te()],mr.prototype,"height",void 0),h([Te({reflect:!0})],mr.prototype,"gradient",void 0);const br=function(){if("undefined"!=typeof globalThis)return globalThis;if(void 0!==r.g)return r.g;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;try{return new Function("return this")()}catch(e){return{}}}();void 0===br.trustedTypes&&(br.trustedTypes={createPolicy:(e,t)=>t});const yr={configurable:!1,enumerable:!1,writable:!1};void 0===br.FAST&&Reflect.defineProperty(br,"FAST",Object.assign({value:Object.create(null)},yr));const wr=br.FAST;if(void 0===wr.getById){const e=Object.create(null);Reflect.defineProperty(wr,"getById",Object.assign({value(t,r){let n=e[t];return void 0===n&&(n=r?e[t]=r():null),n}},yr))}const xr=Object.freeze([]);function _r(){const e=new WeakMap;return function(t){let r=e.get(t);if(void 0===r){let n=Reflect.getPrototypeOf(t);for(;void 0===r&&null!==n;)r=e.get(n),n=Reflect.getPrototypeOf(n);r=void 0===r?[]:r.slice(0),e.set(t,r)}return r}}const kr=br.FAST.getById(1,()=>{const e=[],t=[];function r(){if(t.length)throw t.shift()}function n(e){try{e.call()}catch(e){t.push(e),setTimeout(r,0)}}function o(){let t=0;for(;t<e.length;)if(n(e[t]),t++,t>1024){for(let r=0,n=e.length-t;r<n;r++)e[r]=e[r+t];e.length-=t,t=0}e.length=0}return Object.freeze({enqueue:function(t){e.length<1&&br.requestAnimationFrame(o),e.push(t)},process:o})}),Cr=br.trustedTypes.createPolicy("fast-html",{createHTML:e=>e});let Sr=Cr;const Er=`fast-${Math.random().toString(36).substring(2,8)}`,Ir=`${Er}{`,Ar=`}${Er}`,Tr=Object.freeze({supportsAdoptedStyleSheets:Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype,setHTMLPolicy(e){if(Sr!==Cr)throw new Error("The HTML policy can only be set once.");Sr=e},createHTML(e){return Sr.createHTML(e)},isMarker(e){return e&&8===e.nodeType&&e.data.startsWith(Er)},extractDirectiveIndexFromMarker(e){return parseInt(e.data.replace(`${Er}:`,""))},createInterpolationPlaceholder(e){return`${Ir}${e}${Ar}`},createCustomAttributePlaceholder(e,t){return`${e}="${this.createInterpolationPlaceholder(t)}"`},createBlockPlaceholder(e){return`\x3c!--${Er}:${e}--\x3e`},queueUpdate:kr.enqueue,processUpdates:kr.process,nextUpdate(){return new Promise(kr.enqueue)},setAttribute(e,t,r){null==r?e.removeAttribute(t):e.setAttribute(t,r)},setBooleanAttribute(e,t,r){r?e.setAttribute(t,""):e.removeAttribute(t)},removeChildNodes(e){for(let t=e.firstChild;null!==t;t=e.firstChild)e.removeChild(t)},createTemplateWalker(e){return document.createTreeWalker(e,133,null,!1)}});class Or{constructor(e,t){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.source=e,this.sub1=t}has(e){return void 0===this.spillover?this.sub1===e||this.sub2===e:-1!==this.spillover.indexOf(e)}subscribe(e){const t=this.spillover;if(void 0===t){if(this.has(e))return;if(void 0===this.sub1)return void(this.sub1=e);if(void 0===this.sub2)return void(this.sub2=e);this.spillover=[this.sub1,this.sub2,e],this.sub1=void 0,this.sub2=void 0}else-1===t.indexOf(e)&&t.push(e)}unsubscribe(e){const t=this.spillover;if(void 0===t)this.sub1===e?this.sub1=void 0:this.sub2===e&&(this.sub2=void 0);else{const r=t.indexOf(e);-1!==r&&t.splice(r,1)}}notify(e){const t=this.spillover,r=this.source;if(void 0===t){const t=this.sub1,n=this.sub2;void 0!==t&&t.handleChange(r,e),void 0!==n&&n.handleChange(r,e)}else for(let n=0,o=t.length;n<o;++n)t[n].handleChange(r,e)}}class Lr{constructor(e){this.subscribers={},this.sourceSubscribers=null,this.source=e}notify(e){var t;const r=this.subscribers[e];void 0!==r&&r.notify(e),null===(t=this.sourceSubscribers)||void 0===t||t.notify(e)}subscribe(e,t){var r;if(t){let r=this.subscribers[t];void 0===r&&(this.subscribers[t]=r=new Or(this.source)),r.subscribe(e)}else this.sourceSubscribers=null!==(r=this.sourceSubscribers)&&void 0!==r?r:new Or(this.source),this.sourceSubscribers.subscribe(e)}unsubscribe(e,t){var r;if(t){const r=this.subscribers[t];void 0!==r&&r.unsubscribe(e)}else null===(r=this.sourceSubscribers)||void 0===r||r.unsubscribe(e)}}const $r=wr.getById(2,()=>{const e=/(:|&&|\|\||if)/,t=new WeakMap,r=Tr.queueUpdate;let n,o=e=>
53{throw new Error("Must call enableArrayObservation before observing arrays.")};function i(e){let r=e.$fastController||t.get(e);return void 0===r&&(Array.isArray(e)?r=o(e):t.set(e,r=new Lr(e))),r}const s=_r();class a{constructor(e){this.name=e,this.field=`_${e}`,this.callback=`${e}Changed`}getValue(e){return void 0!==n&&n.watch(e,this.name),e[this.field]}setValue(e,t){const r=this.field,n=e[r];if(n!==t){e[r]=t;const o=e[this.callback];"function"==typeof o&&o.call(e,n,t),i(e).notify(this.name)}}}class l extends Or{constructor(e,t,r=!1){super(e,t),this.binding=e,this.isVolatileBinding=r,this.needsRefresh=!0,this.needsQueue=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}observe(e,t){this.needsRefresh&&null!==this.last&&this.disconnect();const r=n;n=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;const o=this.binding(e,t);return n=r,o}disconnect(){if(null!==this.last){let e=this.first;for(;void 0!==e;)e.notifier.unsubscribe(this,e.propertyName),e=e.next;this.last=null,this.needsRefresh=this.needsQueue=!0}}watch(e,t){const r=this.last,o=i(e),s=null===r?this.first:{};if(s.propertySource=e,s.propertyName=t,s.notifier=o,o.subscribe(this,t),null!==r){if(!this.needsRefresh){let t;n=void 0,t=r.propertySource[r.propertyName],n=this,e===t&&(this.needsRefresh=!0)}r.next=s}this.last=s}handleChange(){this.needsQueue&&(this.needsQueue=!1,r(this))}call(){null!==this.last&&(this.needsQueue=!0,this.notify(this))}records(){let e=this.first;return{next:()=>{const t=e;return void 0===t?{value:void 0,done:!0}:(e=e.next,{value:t,done:!1})},[Symbol.iterator]:function(){return this}}}}return Object.freeze({setArrayObserverFactory(e){o=e},getNotifier:i,track(e,t){void 0!==n&&n.watch(e,t)},trackVolatile(){void 0!==n&&(n.needsRefresh=!0)},notify(e,t){i(e).notify(t)},defineProperty(e,t){"string"==typeof t&&(t=new a(t)),s(e).push(t),Reflect.defineProperty(e,t.name,{enumerable:!0,get:function(){return t.getValue(this)},set:function(e){t.setValue(this,e)}})},getAccessors:s,binding(e,t,r=this.isVolatileBinding(e)){return new l(e,t,r)},isVolatileBinding(t){return e.test(t.toString())}})});function Nr(e,t){$r.defineProperty(e,t)}function Rr(e,t,r){return Object.assign({},r,{get:function(){return $r.trackVolatile(),r.get.apply(this)}})}const Pr=wr.getById(3,()=>{let e=null;return{get(){return e},set(t){e=t}}});class Dr{constructor(){this.index=0,this.length=0,this.parent=null,this.parentContext=null}get event(){return Pr.get()}get isEven(){return this.index%2==0}get isOdd(){return this.index%2!=0}get isFirst(){return 0===this.index}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}static setEvent(e){Pr.set(e)}}$r.defineProperty(Dr.prototype,"index"),$r.defineProperty(Dr.prototype,"length");const Mr=Object.seal(new Dr);class zr{constructor(){this.targets=new WeakSet}addStylesTo(e){this.targets.add(e)}removeStylesFrom(e){this.targets.delete(e)}isAttachedTo(e){return this.targets.has(e)}withBehaviors(...e){return this.behaviors=null===this.behaviors?e:this.behaviors.concat(e),this}}function Fr(e){return e.map(e=>e instanceof zr?Fr(e.styles):[e]).reduce((e,t)=>e.concat(t),[])}function Ur(e){return e.map(e=>e instanceof zr?e.behaviors:null).reduce((e,t)=>null===t?e:(null===e&&(e=[]),e.concat(t)),null)}zr.create=(()=>{if(Tr.supportsAdoptedStyleSheets){const e=new Map;return t=>new Wr(t,e)}return e=>new qr(e)})();const Br=Symbol("prependToAdoptedStyleSheets");function Hr(e){const t=[],r=[];return e.forEach(e=>(e[Br]?t:r).push(e)),{prepend:t,append:r}}let jr=(e,t)=>{const{prepend:r,append:n}=Hr(t);e.adoptedStyleSheets=[...r,...e.adoptedStyleSheets,...n]},Vr=(e,t)=>{e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>-1===t.indexOf(e))};if(Tr.supportsAdoptedStyleSheets)try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),jr=(e,t)=>
53{const{prepend:r,append:n}=Hr(t);e.adoptedStyleSheets.splice(0,0,...r),e.adoptedStyleSheets.push(...n)},Vr=(e,t)=>{for(const r of t){const t=e.adoptedStyleSheets.indexOf(r);-1!==t&&e.adoptedStyleSheets.splice(t,1)}}}catch(g){}class Wr extends zr{constructor(e,t){super(),this.styles=e,this.styleSheetCache=t,this._styleSheets=void 0,this.behaviors=Ur(e)}get styleSheets(){if(void 0===this._styleSheets){const e=this.styles,t=this.styleSheetCache;this._styleSheets=Fr(e).map(e=>{if(e instanceof CSSStyleSheet)return e;let r=t.get(e);return void 0===r&&(r=new CSSStyleSheet,r.replaceSync(e),t.set(e,r)),r})}return this._styleSheets}addStylesTo(e){jr(e,this.styleSheets),super.addStylesTo(e)}removeStylesFrom(e){Vr(e,this.styleSheets),super.removeStylesFrom(e)}}let Kr=0;class qr extends zr{constructor(e){super(),this.styles=e,this.behaviors=null,this.behaviors=Ur(e),this.styleSheets=Fr(e),this.styleClass="fast-style-class-"+ ++Kr}addStylesTo(e){const t=this.styleSheets,r=this.styleClass;e=this.normalizeTarget(e);for(let n=0;n<t.length;n++){const o=document.createElement("style");o.innerHTML=t[n],o.className=r,e.append(o)}super.addStylesTo(e)}removeStylesFrom(e){const t=(e=this.normalizeTarget(e)).querySelectorAll(`.${this.styleClass}`);for(let r=0,n=t.length;r<n;++r)e.removeChild(t[r]);super.removeStylesFrom(e)}isAttachedTo(e){return super.isAttachedTo(this.normalizeTarget(e))}normalizeTarget(e){return e===document?document.body:e}}const Gr=Object.freeze({locate:_r()}),Zr={toView(e){return e?"true":"false"},fromView(e){return null!=e&&"false"!==e&&!1!==e&&0!==e}},Yr={toView(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t.toString()},fromView(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t}};class Jr{constructor(e,t,r=t.toLowerCase(),n="reflect",o){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=r,this.mode=n,this.converter=o,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,"boolean"===n&&void 0===o&&(this.converter=Zr)}setValue(e,t){const r=e[this.fieldName],n=this.converter;void 0!==n&&(t=n.fromView(t)),r!==t&&(e[this.fieldName]=t,this.tryReflectToAttribute(e),this.hasCallback&&e[this.callbackName](r,t),e.$fastController.notify(this.name))}getValue(e){return $r.track(e,this.name),e[this.fieldName]}onAttributeChangedCallback(e,t){this.guards.has(e)||(this.guards.add(e),this.setValue(e,t),this.guards.delete(e))}tryReflectToAttribute(e){const t=this.mode,r=this.guards;r.has(e)||"fromView"===t||Tr.queueUpdate(()=>{r.add(e);const n=e[this.fieldName];switch(t){case"reflect":const t=this.converter;Tr.setAttribute(e,this.attribute,void 0!==t?t.toView(n):n);break;case"boolean":Tr.setBooleanAttribute(e,this.attribute,n)}r.delete(e)})}static collect(e,...t){const r=[];t.push(Gr.locate(e));for(let n=0,o=t.length;n<o;++n){const o=t[n];if(void 0!==o)for(let t=0,n=o.length;t<n;++t){const n=o[t];"string"==typeof n?r.push(new Jr(e,n)):r.push(new Jr(e,n.property,n.attribute,n.mode,n.converter))}}return r}}function Qr(e,t){let r;function n(e,t){arguments.length>1&&(r.property=t),Gr.locate(e.constructor).push(r)}return arguments.length>1?(r={},void n(e,t)):(r=void 0===e?{}:e,n)}const Xr={mode:"open"},en={},tn=wr.getById(4,()=>{const e=new Map;return Object.freeze({register(t){return!e.has(t.type)&&(e.set(t.type,t),!0)},getByType(t){return e.get(t)}})});class rn{constructor(e,t=e.definition){"string"==typeof t&&(t={name:t}),this.type=e,this.name=t.name,this.template=t.template;const r=Jr.collect(e,t.attributes),n=new Array(r.length),o={},i={};for(let e=0,t=r.length;e<t;++e){const t=r[e];n[e]=t.attribute,o[t.name]=t,i[t.attribute]=t}this.attributes=r,this.observedAttributes=n,this.propertyLookup=o,this.attributeLookup=i,this.shadowOptions=void 0===t.shadowOptions?Xr:null===t.shadowOptions?void 0:Object.assign(Object.assign({},Xr),t.shadowOptions),this.elementOptions=void 0===t.elementOptions?en:Object.assign(Object.assign({},en),t.elementOptions),this.styles=void 0===t.styles?void 0:Array.isArray(t.styles)?zr.create(t.styles):t.styles instanceof zr?t.styles:zr.create([t.styles])}get isDefined(){return!!tn.getByType(this.type)}
53define(e=customElements){const t=this.type;if(tn.register(this)){const e=this.attributes,r=t.prototype;for(let t=0,n=e.length;t<n;++t)$r.defineProperty(r,e[t]);Reflect.defineProperty(t,"observedAttributes",{value:this.observedAttributes,enumerable:!0})}return e.get(this.name)||e.define(this.name,t,this.elementOptions),this}}function nn(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}rn.forType=tn.getByType;const on=new WeakMap,sn={bubbles:!0,composed:!0,cancelable:!0};function an(e){return e.shadowRoot||on.get(e)||null}class ln extends Lr{constructor(e,t){super(e),this.boundObservables=null,this.behaviors=null,this.needsInitialization=!0,this._template=null,this._styles=null,this._isConnected=!1,this.$fastController=this,this.view=null,this.element=e,this.definition=t;const r=t.shadowOptions;if(void 0!==r){const t=e.attachShadow(r);"closed"===r.mode&&on.set(e,t)}const n=$r.getAccessors(e);if(n.length>0){const t=this.boundObservables=Object.create(null);for(let r=0,o=n.length;r<o;++r){const o=n[r].name,i=e[o];void 0!==i&&(delete e[o],t[o]=i)}}}get isConnected(){return $r.track(this,"isConnected"),this._isConnected}setIsConnected(e){this._isConnected=e,$r.notify(this,"isConnected")}get template(){return this._template}set template(e){this._template!==e&&(this._template=e,this.needsInitialization||this.renderTemplate(e))}get styles(){return this._styles}set styles(e){this._styles!==e&&(null!==this._styles&&this.removeStyles(this._styles),this._styles=e,this.needsInitialization||null===e||this.addStyles(e))}addStyles(e){const t=an(this.element)||this.element.getRootNode();if(e instanceof HTMLStyleElement)t.append(e);else if(!e.isAttachedTo(t)){const r=e.behaviors;e.addStylesTo(t),null!==r&&this.addBehaviors(r)}}removeStyles(e){const t=an(this.element)||this.element.getRootNode();if(e instanceof HTMLStyleElement)t.removeChild(e);else if(e.isAttachedTo(t)){const r=e.behaviors;e.removeStylesFrom(t),null!==r&&this.removeBehaviors(r)}}addBehaviors(e){const t=this.behaviors||(this.behaviors=new Map),r=e.length,n=[];for(let o=0;o<r;++o){const r=e[o];t.has(r)?t.set(r,t.get(r)+1):(t.set(r,1),n.push(r))}if(this._isConnected){const e=this.element;for(let t=0;t<n.length;++t)n[t].bind(e,Mr)}}removeBehaviors(e,t=!1){const r=this.behaviors;if(null===r)return;const n=e.length,o=[];for(let i=0;i<n;++i){const n=e[i];if(r.has(n)){const e=r.get(n)-1;0===e||t?r.delete(n)&&o.push(n):r.set(n,e)}}if(this._isConnected){const e=this.element;for(let t=0;t<o.length;++t)o[t].unbind(e)}}onConnectedCallback(){if(this._isConnected)return;const e=this.element;this.needsInitialization?this.finishInitialization():null!==this.view&&this.view.bind(e,Mr);const t=this.behaviors;if(null!==t)for(const[r]of t)r.bind(e,Mr);this.setIsConnected(!0)}onDisconnectedCallback(){if(!this._isConnected)return;this.setIsConnected(!1);const e=this.view;null!==e&&e.unbind();const t=this.behaviors;if(null!==t){const e=this.element;for(const[r]of t)r.unbind(e)}}onAttributeChangedCallback(e,t,r){const n=this.definition.attributeLookup[e];void 0!==n&&n.onAttributeChangedCallback(this.element,r)}emit(e,t,r){return!!this._isConnected&&this.element.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign({detail:t},sn),r)))}finishInitialization(){const e=this.element,t=this.boundObservables;if(null!==t){const r=Object.keys(t);for(let n=0,o=r.length;n<o;++n){const o=r[n];e[o]=t[o]}this.boundObservables=null}const r=this.definition;null===this._template&&(this.element.resolveTemplate?this._template=this.element.resolveTemplate():r.template&&(this._template=r.template||null)),null!==this._template&&this.renderTemplate(this._template),null===this._styles&&(this.element.resolveStyles?this._styles=this.element.resolveStyles():r.styles&&(this._styles=r.styles||null)),null!==this._styles&&this.addStyles(this._styles),this.needsInitialization=!1}renderTemplate(e){const t=this.element,r=an(t)||t;null!==this.view?(this.view.dispose(),this.view=null):this.needsInitialization||Tr.removeChildNodes(r),e&&(this.view=e.render(t,r,t))}static forCustomElement(e){const t=e.$fastController;if(void 0!==t)return t;const r=rn.forType(e.constructor);if(void 0===r)throw new Error("Missing FASTElement definition.");return e.$fastController=new ln(e,r)}}function cn(e){return class extends e{constructor(){super(),ln.forCustomElement(this)}$emit(e,t,r){return this.$fastController.emit(e,t,r)}connectedCallback(){this.$fastController.onConnectedCallback()}disconnectedCallback(){this.$fastController.onDisconnectedCallback()}attributeChangedCallback(e,t,r){this.$fastController.onAttributeChangedCallback(e,t,r)}}}const dn=Object.assign(cn(HTMLElement),{from(e){return cn(e)},define(e,t){return new rn(e,t).define().type}}),un=new Map;"metadata"in Reflect||(Reflect.metadata=function(e,t){return function(r){Reflect.defineMetadata(e,t,r)}},Reflect.defineMetadata=function(e,t,r){let n=un.get(r);void 0===n&&un.set(r,n=new Map),n.set(e,t)},Reflect.getOwnMetadata=function(e,t){const r=un.get(t);if(void 0!==r)return r.get(e)});class hn{constructor(e,t){this.container=e,this.key=t}instance(e){return this.registerResolver(0,e)}singleton(e){return this.registerResolver(1,e)}transient(e){return this.registerResolver(2,e)}callback(e){return this.registerResolver(3,e)}cachedCallback(e){return this.registerResolver(3,zn(e))}aliasTo(e){return this.registerResolver(5,e)}registerResolver(e,t){const{container:r,key:n}=this;return this.container=this.key=void 0,r.registerResolver(n,new Sn(n,e,t))}}function pn(e){const t=e.slice(),r=Object.keys(e),n=r.length;let o;for(let i=0;i<n;
53++i)o=r[i],Kn(o)||(t[o]=e[o]);return t}const gn=Object.freeze({none(e){throw Error(`${e.toString()} not registered, did you forget to add @singleton()?`)},singleton(e){return new Sn(e,1,e)},transient(e){return new Sn(e,2,e)}}),fn=Object.freeze({default:Object.freeze({parentLocator:()=>null,responsibleForOwnerRequests:!1,defaultResolver:gn.singleton})}),mn=new Map;function vn(e){return t=>Reflect.getOwnMetadata(e,t)}let bn=null;const yn=Object.freeze({createContainer(e){return new Dn(null,Object.assign({},fn.default,e))},findResponsibleContainer(e){const t=e.$$container$$;return t&&t.responsibleForOwnerRequests?t:yn.findParentContainer(e)},findParentContainer(e){const t=new CustomEvent(Rn,{bubbles:!0,composed:!0,cancelable:!0,detail:{container:void 0}});return e.dispatchEvent(t),t.detail.container||yn.getOrCreateDOMContainer()},getOrCreateDOMContainer(e,t){return e?e.$$container$$||new Dn(e,Object.assign({},fn.default,t,{parentLocator:yn.findParentContainer})):bn||(bn=new Dn(null,Object.assign({},fn.default,t,{parentLocator:()=>null})))},getDesignParamtypes:vn("design:paramtypes"),getAnnotationParamtypes:vn("di:paramtypes"),getOrCreateAnnotationParamTypes(e){let t=this.getAnnotationParamtypes(e);return void 0===t&&Reflect.defineMetadata("di:paramtypes",t=[],e),t},getDependencies(e){let t=mn.get(e);if(void 0===t){const r=e.inject;if(void 0===r){const r=yn.getDesignParamtypes(e),n=yn.getAnnotationParamtypes(e);if(void 0===r)if(void 0===n){const r=Object.getPrototypeOf(e);t="function"==typeof r&&r!==Function.prototype?pn(yn.getDependencies(r)):[]}else t=pn(n);else if(void 0===n)t=pn(r);else{t=pn(r);let e,o=n.length;for(let r=0;r<o;++r)e=n[r],void 0!==e&&(t[r]=e);const i=Object.keys(n);let s;o=i.length;for(let e=0;e<o;++e)s=i[e],Kn(s)||(t[s]=n[s])}}else t=pn(r);mn.set(e,t)}return t},defineProperty(e,t,r,n=!1){const o=`$di_${t}`;Reflect.defineProperty(e,t,{get:function(){let e=this[o];if(void 0===e){const i=this instanceof HTMLElement?yn.findResponsibleContainer(this):yn.getOrCreateDOMContainer();if(e=i.get(r),this[o]=e,n&&this instanceof dn){const n=this.$fastController,i=()=>{yn.findResponsibleContainer(this).get(r)!==this[o]&&(this[o]=e,n.notify(t))};n.subscribe({handleChange:i},"isConnected")}}return e}})},createInterface(e,t){const r="function"==typeof e?e:t,n="string"==typeof e?e:e&&"friendlyName"in e&&e.friendlyName||Hn,o="string"!=typeof e&&(e&&"respectConnection"in e&&e.respectConnection||!1),i=function(e,t,r){if(null==e||void 0!==new.target)throw new Error(`No registration for interface: '${i.friendlyName}'`);t?yn.defineProperty(e,t,i,o):yn.getOrCreateAnnotationParamTypes(e)[r]=i};return i.$isInterface=!0,i.friendlyName=null==n?"(anonymous)":n,null!=r&&(i.register=function(e,t){return r(new hn(e,null!=t?t:i))}),i.toString=function(){return`InterfaceSymbol<${i.friendlyName}>`},i},inject(...e){return function(t,r,n){if("number"==typeof n){const r=yn.getOrCreateAnnotationParamTypes(t),o=e[0];void 0!==o&&(r[n]=o)}else if(r)yn.defineProperty(t,r,e[0]);else{const r=n?yn.getOrCreateAnnotationParamTypes(n.value):yn.getOrCreateAnnotationParamTypes(t);let o;for(let t=0;t<e.length;++t)o=e[t],void 0!==o&&(r[t]=o)}}},transient(e){return e.register=function(t){return Fn.transient(e,e).register(t)},e.registerInRequestor=!1,e},singleton(e,t=_n){return e.register=function(t){return Fn.singleton(e,e).register(t)},e.registerInRequestor=t.scoped,e}}),wn=yn.createInterface("Container");function xn(e){return function(t){const r=function(e,t,n){yn.inject(r)(e,t,n)};return r.$isResolver=!0,r.resolve=function(r,n){return e(t,r,n)},r}}yn.inject;const _n={scoped:!1};function kn(e,t,r){yn.inject(kn)(e,t,r)}function Cn(e,t){return t.getFactory(e).construct(t)}xn((e,t,r)=>()=>r.get(e)),xn((e,t,r)=>r.has(e,!0)?r.get(e):void 0),kn.$isResolver=!0,kn.resolve=()=>{},xn((e,t,r)=>{const n=Cn(e,t),o=new Sn(e,0,n);return r.registerResolver(e,o),n}),xn((e,t,r)=>Cn(e,t));class Sn{constructor(e,t,r){this.key=e,this.strategy=t,this.state=r,this.resolving=!1}get $isResolver(){return!0}register(e){return e.registerResolver(this.key,this)}resolve(e,t){switch(this.strategy){case 0:return this.state;case 1:if(this.resolving)throw new Error(`Cyclic dependency foun
53d: ${this.state.name}`);return this.resolving=!0,this.state=e.getFactory(this.state).construct(t),this.strategy=0,this.resolving=!1,this.state;case 2:{const r=e.getFactory(this.state);if(null===r)throw new Error(`Resolver for ${String(this.key)} returned a null factory`);return r.construct(t)}case 3:return this.state(e,t,this);case 4:return this.state[0].resolve(e,t);case 5:return t.get(this.state);default:throw new Error(`Invalid resolver strategy specified: ${this.strategy}.`)}}getFactory(e){var t,r,n;switch(this.strategy){case 1:case 2:return e.getFactory(this.state);case 5:return null!==(n=null===(r=null===(t=e.getResolver(this.state))||void 0===t?void 0:t.getFactory)||void 0===r?void 0:r.call(t,e))&&void 0!==n?n:null;default:return null}}}function En(e){return this.get(e)}function In(e,t){return t(e)}class An{constructor(e,t){this.Type=e,this.dependencies=t,this.transformers=null}construct(e,t){let r;return r=void 0===t?new this.Type(...this.dependencies.map(En,e)):new this.Type(...this.dependencies.map(En,e),...t),null==this.transformers?r:this.transformers.reduce(In,r)}registerTransformer(e){(this.transformers||(this.transformers=[])).push(e)}}const Tn={$isResolver:!0,resolve(e,t){return t}};function On(e){return"function"==typeof e.register}function Ln(e){return function(e){return On(e)&&"boolean"==typeof e.registerInRequestor}(e)&&e.registerInRequestor}function $n(e){return void 0!==e.prototype}const Nn=new Set(["Array","ArrayBuffer","Boolean","DataView","Date","Error","EvalError","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Number","Object","Promise","RangeError","ReferenceError","RegExp","Set","SharedArrayBuffer","String","SyntaxError","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakSet"]),Rn="__DI_LOCATE_PARENT__",Pn=new Map;class Dn{constructor(e,t){this.owner=e,this.config=t,this._parent=void 0,this.registerDepth=0,this.context=null,null!==e&&(e.$$container$$=this),this.resolvers=new Map,this.resolvers.set(wn,Tn),e instanceof Node&&e.addEventListener(Rn,e=>{e.composedPath()[0]!==this.owner&&(e.detail.container=this,e.stopImmediatePropagation())})}get parent(){return void 0===this._parent&&(this._parent=this.config.parentLocator(this.owner)),this._parent}get depth(){return null===this.parent?0:this.parent.depth+1}get responsibleForOwnerRequests(){return this.config.responsibleForOwnerRequests}registerWithContext(e,...t){return this.context=e,this.register(...t),this.context=null,this}register(...e){if(100===++this.registerDepth)throw new Error("Unable to autoregister dependency");let t,r,n,o,i;const s=this.context;for(let a=0,l=e.length;a<l;++a)if(t=e[a],jn(t))if(On(t))t.register(this,s);else if($n(t))Fn.singleton(t,t).register(this);else for(r=Object.keys(t),o=0,i=r.length;o<i;++o)n=t[r[o]],jn(n)&&(On(n)?n.register(this,s):this.register(n));return--this.registerDepth,this}registerResolver(e,t){Un(e);const r=this.resolvers,n=r.get(e);return null==n?r.set(e,t):n instanceof Sn&&4===n.strategy?n.state.push(t):r.set(e,new Sn(e,4,[n,t])),t}registerTransformer(e,t){const r=this.getResolver(e);if(null==r)return!1;if(r.getFactory){const e=r.getFactory(this);return null!=e&&(e.registerTransformer(t),!0)}return!1}getResolver(e,t=!0){if(Un(e),void 0!==e.resolve)return e;let r,n=this;for(;null!=n;){if(r=n.resolvers.get(e),null!=r)return r;if(null==n.parent){const r=Ln(e)?this:n;return t?this.jitRegister(e,r):null}n=n.parent}return null}has(e,t=!1){return!!this.resolvers.has(e)||!(!t||null==this.parent)&&this.parent.has(e,!0)}get(e){if(Un(e),e.$isResolver)return e.resolve(this,this);let t,r=this;for(;null!=r;){if(t=r.resolvers.get(e),null!=t)return t.resolve(r,this);if(null==r.parent){const n=Ln(e)?this:r;return t=this.jitRegister(e,n),t.resolve(r,this)}r=r.parent}throw new Error(`Unable to resolve key: ${String(e)}`)}getAll(e,t=!1){Un(e);const r=this;let n,o=r;if(t){let t=xr;for(;null!=o;)n=o.resolvers.get(e),null!=n&&(t=t.concat(Bn(n,o,r))),o=o.parent;return t}for(;null!=o;){if(n=o.resolvers.get(e),null!=n)return Bn(n,o,r);if(o=o.parent,null==o)return xr}return xr}getFactory(e){let t=Pn.get(e);if(void 0===t){if(Vn(e))throw new Error(`${e.name} is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.`);Pn.set(e,t=new An(e,yn.getDependencies(e)))}return t}registerFactory(e,t){Pn.set(e,t)}createChild(e){return new Dn(null,Object.assign({},this.config,e,{parentLocator:()=>this}))}jitRegister(e,t){if("function"!=typeof e)throw new Error(`Attempted to jitRegister something that is not a constructor: '${e}'. Did you forget to register this dependency?`);if(Nn.has(e.name))throw new Error(`Attempted to jitRegister an intrinsic type: ${e.name}. Did you forget to add @inject(Key)`);if(On(e)){const r=e.register(t);if(!(r instanceof Object)||null==r.resolve){const r=t.resolvers.get(e);if(null!=r)return r;throw new Error("A valid resolver was not returned from the static register method")}return r}if(e.$isInterface)throw new Error(`Attempted to jitRegister an interface: ${e.friendlyName}`);{const r=this.config.defaultResolver(e,t);return t.resolvers.set(e,r),r}}}const Mn=new WeakMap;function zn(e){return function(t,r,n){if(Mn.has(n))return Mn.get(n);const o=e(t,r,n);return Mn.set(n,o),o}}const Fn=Object.freeze({instance(e,t){return new Sn(e,0,t)},singleton(e,t){return new Sn(e,1,t)},transient(e,t){return new Sn(e,2,t)},callback(e,t){return new Sn(e,3,t)},cachedCallback(e,t){return new Sn(e,3,zn(t))},aliasTo(e,t){return new Sn(t,5,e)}});function Un(e){if(null==e)throw new Error("key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?")}function Bn(e,t,r){if(e instanceof Sn&&4===e.strategy){const n=e.state;let o=n.length;const i=new Array(o);for(;o--;)i[o]=n[o].resolve(t,r);return i}return[e.resolve(t,r)]}const Hn="(anonymous)";function jn(e){return"object"==typeof e&&null!==e||"function"==typeof e}const Vn=function(){const e=new WeakMap;let t=!1,r="",n=0;return function(o){return t=e.get(o),void 0===t&&(r=o.toString(),n=r.length,t=n>=29&&n<=100&&125===r.charCodeAt(n-1)&&r.charCodeAt(n-2)<=32&&93===r.charCodeAt(n-3)&&101===r.charCodeAt(n-4)&&
53100===r.charCodeAt(n-5)&&111===r.charCodeAt(n-6)&&99===r.charCodeAt(n-7)&&32===r.charCodeAt(n-8)&&101===r.charCodeAt(n-9)&&118===r.charCodeAt(n-10)&&105===r.charCodeAt(n-11)&&116===r.charCodeAt(n-12)&&97===r.charCodeAt(n-13)&&110===r.charCodeAt(n-14)&&88===r.charCodeAt(n-15),e.set(o,t)),t}}(),Wn={};function Kn(e){switch(typeof e){case"number":return e>=0&&(0|e)===e;case"string":{const t=Wn[e];if(void 0!==t)return t;const r=e.length;if(0===r)return Wn[e]=!1;let n=0;for(let t=0;t<r;++t)if(n=e.charCodeAt(t),0===t&&48===n&&r>1||n<48||n>57)return Wn[e]=!1;return Wn[e]=!0}default:return!1}}function qn(e){return`${e.toLowerCase()}:presentation`}const Gn=new Map,Zn=Object.freeze({define(e,t,r){const n=qn(e);void 0===Gn.get(n)?Gn.set(n,t):Gn.set(n,!1),r.register(Fn.instance(n,t))},forTag(e,t){const r=qn(e),n=Gn.get(r);return!1===n?yn.findResponsibleContainer(t).get(r):n||null}});class Yn{constructor(e,t){this.template=e||null,this.styles=void 0===t?null:Array.isArray(t)?zr.create(t):t instanceof zr?t:zr.create([t])}applyTo(e){const t=e.$fastController;null===t.template&&(t.template=this.template),null===t.styles&&(t.styles=this.styles)}}class Jn extends dn{constructor(){super(...arguments),this._presentation=void 0}get $presentation(){return void 0===this._presentation&&(this._presentation=Zn.forTag(this.tagName,this)),this._presentation}templateChanged(){void 0!==this.template&&(this.$fastController.template=this.template)}stylesChanged(){void 0!==this.styles&&(this.$fastController.styles=this.styles)}connectedCallback(){null!==this.$presentation&&this.$presentation.applyTo(this),super.connectedCallback()}static compose(e){return(t={})=>new Xn(this===Jn?class extends Jn{}:this,e,t)}}function Qn(e,t,r){return"function"==typeof e?e(t,r):e}nn([Nr],Jn.prototype,"template",void 0),nn([Nr],Jn.prototype,"styles",void 0);class Xn{constructor(e,t,r){this.type=e,this.elementDefinition=t,this.overrideDefinition=r,this.definition=Object.assign(Object.assign({},this.elementDefinition),this.overrideDefinition)}register(e,t){const r=this.definition,n=this.overrideDefinition,o=`${r.prefix||t.elementPrefix}-${r.baseName}`;
53t.tryDefineElement({name:o,type:this.type,baseClass:this.elementDefinition.baseClass,callback:e=>{const t=new Yn(Qn(r.template,e,r),Qn(r.styles,e,r));e.definePresentation(t);let o=Qn(r.shadowOptions,e,r);e.shadowRootMode&&(o?n.shadowOptions||(o.mode=e.shadowRootMode):null!==o&&(o={mode:e.shadowRootMode})),e.defineElement({elementOptions:Qn(r.elementOptions,e,r),shadowOptions:o,attributes:Qn(r.attributes,e,r)})}})}}class eo{createCSS(){return""}createBehavior(){}}function to(e){const t=e.parentElement;if(t)return t;{const t=e.getRootNode();if(t.host instanceof HTMLElement)return t.host}return null}const ro=document.createElement("div");class no{setProperty(e,t){Tr.queueUpdate(()=>this.target.setProperty(e,t))}removeProperty(e){Tr.queueUpdate(()=>this.target.removeProperty(e))}}class oo extends no{constructor(){super();const e=new CSSStyleSheet;this.target=e.cssRules[e.insertRule(":root{}")].style,document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]}}class io extends no{constructor(){super(),this.style=document.createElement("style"),document.head.appendChild(this.style);const{sheet:e}=this.style;if(e){const t=e.insertRule(":root{}",e.cssRules.length);this.target=e.cssRules[t].style}}}class so{constructor(e){this.store=new Map,this.target=null;const t=e.$fastController;this.style=document.createElement("style"),t.addStyles(this.style),$r.getNotifier(t).subscribe(this,"isConnected"),this.handleChange(t,"isConnected")}targetChanged(){if(null!==this.target)for(const[e,t]of this.store.entries())this.target.setProperty(e,t)}setProperty(e,t){this.store.set(e,t),Tr.queueUpdate(()=>{null!==this.target&&this.target.setProperty(e,t)})}removeProperty(e){this.store.delete(e),Tr.queueUpdate(()=>{null!==this.target&&this.target.removeProperty(e)})}handleChange(e,t){const{sheet:r}=this.style;if(r){const e=r.insertRule(":host{}",r.cssRules.length);this.target=r.cssRules[e].style}else this.target=null}}nn([Nr],so.prototype,"target",void 0);class ao{constructor(e){this.target=e.style}setProperty(e,t){Tr.queueUpdate(()=>this.target.setProperty(e,t))}removeProperty(e){Tr.queueUpdate(()=>this.target.removeProperty(e))}}class lo{setProperty(e,t){lo.properties[e]=t;for(const r of lo.roots.values())ho.getOrCreate(lo.normalizeRoot(r)).setProperty(e,t)}removeProperty(e){delete lo.properties[e];for(const t of lo.roots.values())ho.getOrCreate(lo.normalizeRoot(t)).removeProperty(e)}static registerRoot(e){const{roots:t}=lo;if(!t.has(e)){t.add(e);const r=ho.getOrCreate(this.normalizeRoot(e));for(const e in lo.properties)r.setProperty(e,lo.properties[e])}}static unregisterRoot(e){const{roots:t}=lo;if(t.has(e)){t.delete(e);const r=ho.getOrCreate(lo.normalizeRoot(e));for(const e in lo.properties)r.removeProperty(e)}}static normalizeRoot(e){return e===ro?document:e}}lo.roots=new Set,lo.properties={};const co=new WeakMap,uo=Tr.supportsAdoptedStyleSheets?class extends no{constructor(e){super();const t=new CSSStyleSheet;t[Br]=!0,this.target=t.cssRules[t.insertRule(":host{}")].style,e.$fastController.addStyles(zr.create([t]))}}:so,ho=Object.freeze({getOrCreate(e){if(co.has(e))return co.get(e);let t;return t=e===ro?new lo:e instanceof Document?Tr.supportsAdoptedStyleSheets?new oo:new io:e instanceof dn?new uo(e):new ao(e),co.set(e,t),t}});class po extends eo{constructor(e){super(),this.subscribers=new WeakMap,this._appliedTo=new Set,this.name=e.name,null!==e.cssCustomPropertyName&&(this.cssCustomProperty=`--${e.cssCustomPropertyName}`,this.cssVar=`var(${this.cssCustomProperty})`),this.id=po.uniqueId(),po.tokensById.set(this.id,this)}get appliedTo(){return[...this._appliedTo]}static from(e){return new po({name:"string"==typeof e?e:e.name,cssCustomPropertyName:"string"==typeof e?e:void 0===e.cssCustomPropertyName?e.name:e.cssCustomPropertyName})}static isCSSDesignToken(e){return"string"==typeof e.cssCustomProperty}static isDerivedDesignTokenValue(e){return"function"==typeof e}static getTokenById(e){return po.tokensById.get(e)}getOrCreateSubscriberSet(e=this){return this.subscribers.get(e)||this.subscribers.set(e,new Set)&&this.subscribers.get(e)}createCSS(){return this.cssVar||""}getValueFor(e){const t=bo.getOrCreate(e).get(this);if(void 0!==t)return t;throw new Error(`Value could not be retrieved for token named "${this.name}". Ensure the value is set for ${e} or an ancestor of ${e}.`)}setValueFor(e,t){return this._appliedTo.add(e),t instanceof po&&(t=this.alias(t)),bo.getOrCreate(e).set(this,t),this}deleteValueFor(e){return this._appliedTo.delete(e),bo.existsFor(e)&&bo.getOrCreate(e).delete(this),this}withDefault(e){return this.setValueFor(ro,e),this}subscribe(e,t){const r=this.getOrCreateSubscriberSet(t);t&&!bo.existsFor(t)&&bo.getOrCreate(t),r.has(e)||r.add(e)}unsubscribe(e,t){const r=this.subscribers.get(t||this);r&&r.has(e)&&r.delete(e)}notify(e){const t=Object.freeze({token:this,target:e});
53this.subscribers.has(this)&&this.subscribers.get(this).forEach(e=>e.handleChange(t)),this.subscribers.has(e)&&this.subscribers.get(e).forEach(e=>e.handleChange(t))}alias(e){return t=>e.getValueFor(t)}}po.uniqueId=(()=>{let e=0;return()=>(e++,e.toString(16))})(),po.tokensById=new Map;class go{constructor(e,t,r){this.source=e,this.token=t,this.node=r,this.dependencies=new Set,this.observer=$r.binding(e,this,!1),this.observer.handleChange=this.observer.call,this.handleChange()}disconnect(){this.observer.disconnect()}handleChange(){try{this.node.store.set(this.token,this.observer.observe(this.node.target,Mr))}catch(e){console.error(e)}}}class fo{constructor(){this.values=new Map}set(e,t){this.values.get(e)!==t&&(this.values.set(e,t),$r.getNotifier(this).notify(e.id))}get(e){return $r.track(this,e.id),this.values.get(e)}delete(e){this.values.delete(e),$r.getNotifier(this).notify(e.id)}all(){return this.values.entries()}}const mo=new WeakMap,vo=new WeakMap;class bo{constructor(e){this.target=e,this.store=new fo,this.children=[],this.assignedValues=new Map,this.reflecting=new Set,this.bindingObservers=new Map,this.tokenValueChangeHandler={handleChange:(e,t)=>
53{const r=po.getTokenById(t);r&&(r.notify(this.target),this.updateCSSTokenReflection(e,r))}},mo.set(e,this),$r.getNotifier(this.store).subscribe(this.tokenValueChangeHandler),e instanceof dn?e.$fastController.addBehaviors([this]):e.isConnected&&this.bind()}static getOrCreate(e){return mo.get(e)||new bo(e)}static existsFor(e){return mo.has(e)}static findParent(e){if(ro!==e.target){let t=to(e.target);for(;null!==t;){if(mo.has(t))return mo.get(t);t=to(t)}return bo.getOrCreate(ro)}return null}static findClosestAssignedNode(e,t){let r=t;do{if(r.has(e))return r;r=r.parent?r.parent:r.target!==ro?bo.getOrCreate(ro):null}while(null!==r);return null}get parent(){return vo.get(this)||null}updateCSSTokenReflection(e,t){if(po.isCSSDesignToken(t)){const r=this.parent,n=this.isReflecting(t);if(r){const o=r.get(t),i=e.get(t);o===i||n?o===i&&n&&this.stopReflectToCSS(t):this.reflectToCSS(t)}else n||this.reflectToCSS(t)}}has(e){return this.assignedValues.has(e)}get(e){const t=this.store.get(e);if(void 0!==t)return t;const r=this.getRaw(e);return void 0!==r?(this.hydrate(e,r),this.get(e)):void 0}getRaw(e){var t;return this.assignedValues.has(e)?this.assignedValues.get(e):null===(t=bo.findClosestAssignedNode(e,this))||void 0===t?void 0:t.getRaw(e)}set(e,t){po.isDerivedDesignTokenValue(this.assignedValues.get(e))&&this.tearDownBindingObserver(e),this.assignedValues.set(e,t),po.isDerivedDesignTokenValue(t)?this.setupBindingObserver(e,t):this.store.set(e,t)}delete(e){this.assignedValues.delete(e),this.tearDownBindingObserver(e);const t=this.getRaw(e);t?this.hydrate(e,t):this.store.delete(e)}bind(){const e=bo.findParent(this);e&&e.appendChild(this);for(const e of this.assignedValues.keys())e.notify(this.target)}unbind(){this.parent&&vo.get(this).removeChild(this);for(const e of this.bindingObservers.keys())this.tearDownBindingObserver(e)}appendChild(e){e.parent&&vo.get(e).removeChild(e);const t=this.children.filter(t=>e.contains(t));vo.set(e,this),this.children.push(e),t.forEach(t=>e.appendChild(t)),$r.getNotifier(this.store).subscribe(e);for(const[t,r]of this.store.all())e.hydrate(t,this.bindingObservers.has(t)?this.getRaw(t):r),e.updateCSSTokenReflection(e.store,t)}removeChild(e){const t=this.children.indexOf(e);if(-1!==t&&this.children.splice(t,1),$r.getNotifier(this.store).unsubscribe(e),e.parent!==this)return!1;const r=vo.delete(e);for(const[t]of this.store.all())e.hydrate(t,e.getRaw(t)),e.updateCSSTokenReflection(e.store,t);return r}contains(e){return function(e,t){let r=t;for(;null!==r;){if(r===e)return!0;r=to(r)}return!1}(this.target,e.target)}reflectToCSS(e){this.isReflecting(e)||(this.reflecting.add(e),bo.cssCustomPropertyReflector.startReflection(e,this.target))}stopReflectToCSS(e){this.isReflecting(e)&&(this.reflecting.delete(e),bo.cssCustomPropertyReflector.stopReflection(e,this.target))}isReflecting(e){return this.reflecting.has(e)}handleChange(e,t){const r=po.getTokenById(t);r&&(this.hydrate(r,this.getRaw(r)),this.updateCSSTokenReflection(this.store,r))}hydrate(e,t){if(!this.has(e)){const r=this.bindingObservers.get(e);po.isDerivedDesignTokenValue(t)?r?r.source!==t&&(this.tearDownBindingObserver(e),this.setupBindingObserver(e,t)):this.setupBindingObserver(e,t):(r&&this.tearDownBindingObserver(e),this.store.set(e,t))}}setupBindingObserver(e,t){const r=new go(t,e,this);return this.bindingObservers.set(e,r),r}tearDownBindingObserver(e){return!!this.bindingObservers.has(e)&&(this.bindingObservers.get(e).disconnect(),this.bindingObservers.delete(e),!0)}}bo.cssCustomPropertyReflector=new class{startReflection(e,t){e.subscribe(this,t),this.handleChange({token:e,target:t})}stopReflection(e,t){e.unsubscribe(this,t),this.remove(e,t)}handleChange(e){const{token:t,target:r}=e;this.add(t,r)}add(e,t){ho.getOrCreate(t).setProperty(e.cssCustomProperty,this.resolveCSSValue(bo.getOrCreate(t).get(e)))}remove(e,t){ho.getOrCreate(t).removeProperty(e.cssCustomProperty)}resolveCSSValue(e){return e&&"function"==typeof e.createCSS?e.createCSS():e}},nn([Nr],bo.prototype,"children",void 0);const yo=Object.freeze({create:function(e){return po.from(e)},notifyConnection(e){return!(!e.isConnected||!bo.existsFor(e)||(bo.getOrCreate(e).bind(),0))},notifyDisconnection(e){return!(e.isConnected||!bo.existsFor(e)||(bo.getOrCreate(e).unbind(),0))},registerRoot(e=ro){lo.registerRoot(e)},unregisterRoot(e=ro){lo.unregisterRoot(e)}}),wo=Object.freeze({definitionCallbackOnly:null,ignoreDuplicate:Symbol()}),xo=new Map,_o=new Map;let ko=null;const Co=yn.createInterface(e=>e.cachedCallback(e=>(null===ko&&(ko=new Eo(null,e)),ko))),So=Object.freeze({tagFor(e){return _o.get(e)},responsibleFor(e){const t=e.$$designSystem$$;return t||yn.findResponsibleContainer(e).get(Co)},getOrCreate(e){if(!e)return null===ko&&(ko=yn.getOrCreateDOMContainer().get(Co)),ko;const t=e.$$designSystem$$;if(t)return t;const r=yn.getOrCreateDOMContainer(e);if(r.has(Co,!1))return r.get(Co);{const t=new Eo(e,r);return r.register(Fn.instance(Co,t)),t}}});class Eo{constructor(e,t){this.owner=e,this.container=t,this.designTokensInitialized=!1,this.prefix="fast",this.shadowRootMode=void 0,this.disambiguate=()=>wo.definitionCallbackOnly,null!==e&&(e.$$designSystem$$=this)}withPrefix(e){return this.prefix=e,this}
53withShadowRootMode(e){return this.shadowRootMode=e,this}withElementDisambiguation(e){return this.disambiguate=e,this}withDesignTokenRoot(e){return this.designTokenRoot=e,this}register(...e){const t=this.container,r=[],n=this.disambiguate,o=this.shadowRootMode,i={elementPrefix:this.prefix,tryDefineElement(e,i,s){const a=function(e,t,r){return"string"==typeof e?{name:e,type:t,callback:r}:e}(e,i,s),{name:l,callback:c,baseClass:d}=a;let{type:u}=a,h=l,p=xo.get(h),g=!0;for(;p;){const e=n(h,u,p);switch(e){case wo.ignoreDuplicate:return;case wo.definitionCallbackOnly:g=!1,p=void 0;break;default:h=e,p=xo.get(h)}}g&&((_o.has(u)||u===Jn)&&(u=class extends u{}),xo.set(h,u),_o.set(u,h),d&&_o.set(d,h)),r.push(new Io(t,h,u,o,c,g))}};this.designTokensInitialized||(this.designTokensInitialized=!0,null!==this.designTokenRoot&&yo.registerRoot(this.designTokenRoot)),t.registerWithContext(i,...e);for(const e of r)e.callback(e),e.willDefine&&null!==e.definition&&e.definition.define();return this}}class Io{constructor(e,t,r,n,o,i){this.container=e,this.name=t,this.type=r,this.shadowRootMode=n,this.callback=o,this.willDefine=i,this.definition=null}definePresentation(e){Zn.define(this.name,e,this.container)}defineElement(e){this.definition=new rn(this.type,Object.assign(Object.assign({},e),{name:this.name}))}tagFor(e){return So.tagFor(e)}}const Ao="chameleon",To=(e,...t)=>{const r=(({prefix:e=Ao,node:t}={})=>So.getOrCreate(t).withPrefix(e))({prefix:e.prefix,node:e.node});for(const n of t){const t=n({prefix:e.prefix??Ao}),o=`${t.definition.prefix}-${t.definition.baseName}`;c.registerElement(t.type,o),r.register(t)}return r};class Oo{constructor(){this.targetIndex=0}}class Lo extends Oo{constructor(){super(...arguments),this.createPlaceholder=Tr.createInterpolationPlaceholder}}class $o extends Oo{constructor(e,t,r){super(),this.name=e,this.behavior=t,this.options=r}createPlaceholder(e){return Tr.createCustomAttributePlaceholder(this.name,e)}createBehavior(e){return new this.behavior(e,this.options)}}function No(e,t){this.source=e,this.context=t,null===this.bindingObserver&&(this.bindingObserver=$r.binding(this.binding,this,this.isBindingVolatile)),this.updateTarget(this.bindingObserver.observe(e,t))}function Ro(e,t){this.source=e,this.context=t,this.target.addEventListener(this.targetName,this)}function Po(){this.bindingObserver.disconnect(),this.source=null,this.context=null}function Do(){this.bindingObserver.disconnect(),this.source=null,this.context=null;const e=this.target.$fastView;void 0!==e&&e.isComposed&&(e.unbind(),e.needsBindOnly=!0)}function Mo(){this.target.removeEventListener(this.targetName,this),this.source=null,this.context=null}function zo(e){Tr.setAttribute(this.target,this.targetName,e)}function Fo(e){Tr.setBooleanAttribute(this.target,this.targetName,e)}function Uo(e){if(null==e&&(e=""),e.create){this.target.textContent="";let t=this.target.$fastView;void 0===t?t=e.create():this.target.$fastTemplate!==e&&(t.isComposed&&(t.remove(),t.unbind()),t=e.create()),t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(this.source,this.context)):(t.isComposed=!0,t.bind(this.source,this.context),t.insertBefore(this.target),this.target.$fastView=t,this.target.$fastTemplate=e)}else{const t=this.target.$fastView;void 0!==t&&t.isComposed&&(t.isComposed=!1,t.remove(),t.needsBindOnly?t.needsBindOnly=!1:t.unbind()),this.target.textContent=e}}function Bo(e){this.target[this.targetName]=e}function Ho(e){const t=this.classVersions||Object.create(null),r=this.target;let n=this.version||0;if(null!=e&&e.length){const o=e.split(/\s+/);for(let e=0,i=o.length;e<i;++e){const i=o[e];""!==i&&(t[i]=n,r.classList.add(i))}}if(this.classVersions=t,this.version=n+1,0!==n){n-=1;for(const e in t)t[e]===n&&r.classList.remove(e)}}class jo extends Lo{constructor(e){super(),this.binding=e,this.bind=No,this.unbind=Po,this.updateTarget=zo,this.isBindingVolatile=$r.isVolatileBinding(this.binding)}get targetName(){return this.originalTargetName}set targetName(e){if(this.originalTargetName=e,void 0!==e)switch(e[0]){case":":if(this.cleanedTargetName=e.substr(1),this.updateTarget=Bo,"innerHTML"===this.cleanedTargetName){const e=this.binding;this.binding=(t,r)=>Tr.createHTML(e(t,r))}break;case"?":this.cleanedTargetName=e.substr(1),this.updateTarget=Fo;break;case"@":this.cleanedTargetName=e.substr(1),this.bind=Ro,this.unbind=Mo;break;default:this.cleanedTargetName=e,"class"===e&&(this.updateTarget=Ho)}}targetAtContent(){this.updateTarget=Uo,this.unbind=Do}createBehavior(e){return new Vo(e,this.binding,this.isBindingVolatile,this.bind,this.unbind,this.updateTarget,this.cleanedTargetName)}}class Vo{constructor(e,t,r,n,o,i,s){this.source=null,this.context=null,this.bindingObserver=null,this.target=e,this.binding=t,this.isBindingVolatile=r,this.bind=n,this.unbind=o,this.updateTarget=i,this.targetName=s}handleChange(){this.updateTarget(this.bindingObserver.observe(this.source,this.context))}handleEvent(e){Dr.setEvent(e);const t=this.binding(this.source,this.context);Dr.setEvent(null),!0!==t&&e.preventDefault()}}let Wo=null;class Ko{addFactory(e){e.targetIndex=this.targetIndex,this.behaviorFactories.push(e)}captureContentBinding(e){e.targetAtContent(),this.addFactory(e)}reset(){this.behaviorFactories=[],this.targetIndex=-1}release(){Wo=this}static borrow(e){const t=Wo||new Ko;return t.directives=e,t.reset(),Wo=null,t}}function qo(e){if(1===e.length)return e[0];let t;const r=e.length,n=e.map(e=>"string"==typeof e?()=>e:(t=e.targetName||t,e.binding)),o=new jo((e,t)=>{let o="";for(let i=0;i<r;++i)o+=n[i](e,t);return o}
53);return o.targetName=t,o}const Go=Ar.length;function Zo(e,t){const r=t.split(Ir);if(1===r.length)return null;const n=[];for(let t=0,o=r.length;t<o;++t){const o=r[t],i=o.indexOf(Ar);let s;if(-1===i)s=o;else{const t=parseInt(o.substring(0,i));n.push(e.directives[t]),s=o.substring(i+Go)}""!==s&&n.push(s)}return n}function Yo(e,t,r=!1){const n=t.attributes;for(let o=0,i=n.length;o<i;++o){const s=n[o],a=s.value,l=Zo(e,a);let c=null;null===l?r&&(c=new jo(()=>a),c.targetName=s.name):c=qo(l),null!==c&&(t.removeAttributeNode(s),o--,i--,e.addFactory(c))}}function Jo(e,t,r){const n=Zo(e,t.textContent);if(null!==n){let o=t;for(let i=0,s=n.length;i<s;++i){const s=n[i],a=0===i?t:o.parentNode.insertBefore(document.createTextNode(""),o.nextSibling);"string"==typeof s?a.textContent=s:(a.textContent=" ",e.captureContentBinding(s)),o=a,e.targetIndex++,a!==t&&r.nextNode()}e.targetIndex--}}const Qo=document.createRange();class Xo{constructor(e,t){this.fragment=e,this.behaviors=t,this.source=null,this.context=null,this.firstChild=e.firstChild,this.lastChild=e.lastChild}appendTo(e){e.appendChild(this.fragment)}insertBefore(e){if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const r=e.parentNode;let n,o=this.firstChild;for(;o!==t;)n=o.nextSibling,r.insertBefore(o,e),o=n;r.insertBefore(t,e)}}remove(){const e=this.fragment,t=this.lastChild;let r,n=this.firstChild;for(;n!==t;)r=n.nextSibling,e.appendChild(n),n=r;e.appendChild(t)}dispose(){const e=this.firstChild.parentNode,t=this.lastChild;let r,n=this.firstChild;for(;n!==t;)r=n.nextSibling,e.removeChild(n),n=r;e.removeChild(t);const o=this.behaviors,i=this.source;for(let e=0,t=o.length;e<t;++e)o[e].unbind(i)}bind(e,t){const r=this.behaviors;if(this.source!==e)if(null!==this.source){const n=this.source;this.source=e,this.context=t;for(let o=0,i=r.length;o<i;++o){const i=r[o];i.unbind(n),i.bind(e,t)}}else{this.source=e,this.context=t;for(let n=0,o=r.length;n<o;++n)r[n].bind(e,t)}}unbind(){if(null===this.source)return;const e=this.behaviors,t=this.source;for(let r=0,n=e.length;r<n;++r)e[r].unbind(t);this.source=null}static disposeContiguousBatch(e){if(0!==e.length){Qo.setStartBefore(e[0].firstChild),Qo.setEndAfter(e[e.length-1].lastChild),Qo.deleteContents();for(let t=0,r=e.length;t<r;++t){const r=e[t],n=r.behaviors,o=r.source;for(let e=0,t=n.length;e<t;++e)n[e].unbind(o)}}}}class ei{constructor(e,t){this.behaviorCount=0,this.hasHostBehaviors=!1,this.fragment=null,this.targetOffset=0,this.viewBehaviorFactories=null,this.hostBehaviorFactories=null,this.html=e,this.directives=t}create(e){if(null===this.fragment){let e;const t=this.html;if("string"==typeof t){e=document.createElement("template"),e.innerHTML=Tr.createHTML(t);const r=e.content.firstElementChild;null!==r&&"TEMPLATE"===r.tagName&&(e=r)}else e=t;const r=function(e,t){const r=e.content;document.adoptNode(r);const n=Ko.borrow(t);Yo(n,e,!0);const o=n.behaviorFactories;n.reset();const i=Tr.createTemplateWalker(r);let s;for(;s=i.nextNode();)switch(n.targetIndex++,s.nodeType){case 1:Yo(n,s);break;case 3:Jo(n,s,i);break;case 8:Tr.isMarker(s)&&n.addFactory(t[Tr.extractDirectiveIndexFromMarker(s)])}let a=0;(Tr.isMarker(r.firstChild)||1===r.childNodes.length&&t.length)&&(r.insertBefore(document.createComment(""),r.firstChild),a=-1);const l=n.behaviorFactories;return n.release(),{fragment:r,viewBehaviorFactories:l,hostBehaviorFactories:o,targetOffset:a}}(e,this.directives);this.fragment=r.fragment,this.viewBehaviorFactories=r.viewBehaviorFactories,this.hostBehaviorFactories=r.hostBehaviorFactories,this.targetOffset=r.targetOffset,this.behaviorCount=this.viewBehaviorFactories.length+this.hostBehaviorFactories.length,this.hasHostBehaviors=this.hostBehaviorFactories.length>0}const t=this.fragment.cloneNode(!0),r=this.viewBehaviorFactories,n=new Array(this.behaviorCount),o=Tr.createTemplateWalker(t);let i=0,s=this.targetOffset,a=o.nextNode();for(let e=r.length;i<e;++i){const e=r[i],t=e.targetIndex;for(;null!==a;){if(s===t){n[i]=e.createBehavior(a);break}a=o.nextNode(),s++}}if(this.hasHostBehaviors){const t=this.hostBehaviorFactories;for(let r=0,o=t.length;r<o;++r,++i)n[i]=t[r].createBehavior(e)}return new Xo(t,n)}render(e,t,r){"string"==typeof t&&(t=document.getElementById(t)),void 0===r&&(r=t);const n=this.create(r);return n.bind(e,Mr),n.appendTo(t),n}}const ti=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function ri(e,...t){const r=[];let n="";for(let o=0,i=e.length-1;o<i;++o){const i=e[o];let s=t[o];if(n+=i,s instanceof ei){const e=s;s=()=>e}if("function"==typeof s&&(s=new jo(s)),s instanceof Lo){const e=ti.exec(i);null!==e&&(s.targetName=e[2])}s instanceof Oo?(n+=s.createPlaceholder(r.length),r.push(s)):n+=s}return n+=e[e.length-1],new ei(n,r)}function ni(e){return e?function(t,r,n){return 1===t.nodeType&&t.matches(e)}:function(e,t,r){return 1===e.nodeType}}class oi{constructor(e,t){this.target=e,this.options=t,this.source=null}bind(e){const t=this.options.property;this.shouldUpdate=$r.getAccessors(e).some(e=>
53e.name===t),this.source=e,this.updateTarget(this.computeNodes()),this.shouldUpdate&&this.observe()}unbind(){this.updateTarget(xr),this.source=null,this.shouldUpdate&&this.disconnect()}handleEvent(){this.updateTarget(this.computeNodes())}computeNodes(){let e=this.getNodes();return void 0!==this.options.filter&&(e=e.filter(this.options.filter)),e}updateTarget(e){this.source[this.options.property]=e}}class ii extends oi{constructor(e,t){super(e,t)}observe(){this.target.addEventListener("slotchange",this)}disconnect(){this.target.removeEventListener("slotchange",this)}getNodes(){return this.target.assignedNodes(this.options)}}function si(e){return"string"==typeof e&&(e={property:e}),new $o("fast-slotted",ii,e)}class ai{constructor(e,t){this.target=e,this.propertyName=t}bind(e){e[this.propertyName]=this.target}unbind(){}}function li(e){return new $o("fast-ref",ai,e)}var ci='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.29291 9.29291L6.70712 7.87869L12 13.1716L17.2929 7.87869L18.7071 9.29291L12 16L5.29291 9.29291Z" fill="currentColor"></path></svg>',di='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M18.7071 14.7071L17.2929 16.1213L12 10.8284L6.70709 16.1213L5.29288 14.7071L12 8L18.7071 14.7071Z" fill="currentColor"></path></svg>',ui='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.29288 18.7071L7.87866 17.2929L13.1716 12L7.87866 6.70711L9.29287 5.29289L16 12L9.29288 18.7071Z" fill="currentColor"></path></svg>';const hi=(e,t)=>ri`
54    <span
55        part="end"
56        ${li("endContainer")}
57        class=${e=>t.end?"end":void 0}
58    >
59        <slot name="end" ${li("end")} @slotchange="${e=>e.handleEndContentChange()}">
60            ${t.end||""}
61        </slot>
62    </span>
63`,pi=(e,t)=>ri`
64    <span
65        part="start"
66        ${li("startContainer")}
67        class="${e=>t.start?"start":void 0}"
68    >
69        <slot
70            name="start"
71            ${li("start")}
72            @slotchange="${e=>e.handleStartContentChange()}"
73        >
74            ${t.start||""}
75        </slot>
76    </span>
77`;class gi extends(a(Jn,"accordion-item")){constructor(){super(...arguments),this.chevronPosition="right",this.headinglevel=2,this.expanded=!1,this.clickHandler=e=>{e.target===this.expandbutton&&(this.expanded=!this.expanded,this.$emit("change"))}}handleStartContentChange(){this.startContainer.classList.toggle("start",this.start.assignedNodes().length>0)}handleEndContentChange(){this.endContainer.classList.toggle("end",this.end.assignedNodes().length>0)}expandedChanged(e,t){this.isConnected&&this.$emit("expanded")}setAccessibleLabel(){this.headingContent?.textContent?.length||this.label&&this.expandbutton.setAttribute("aria-label",this.label)}validateAccessibleLabel(){this.expandbutton.getAttribute("aria-label")?.length||console.error("CHAMELEON-A11Y: Accordion Item component must have an accessible label provided by either \n  1) text content in the heading slot \n  2) a non-empty label attribute to be used as aria-label.")}connectedCallback(){super.connectedCallback(),this.setAccessibleLabel()}}var fi;h([Qr({mode:"boolean"})],gi.prototype,"disabled",void 0),h([Qr({attribute:"chevron-position"})],gi.prototype,"chevronPosition",void 0),h([Qr({mode:"boolean",attribute:"full-width"})],gi.prototype,"fullWidth",void 0),h([Qr],gi.prototype,"divider",void 0),h([Qr],gi.prototype,"label",void 0),h([Qr({attribute:"heading-level",mode:"fromView",converter:Yr})],gi.prototype,"headinglevel",void 0),h([Qr({mode:"boolean"})],gi.prototype,"expanded",void 0),h([Qr],gi.prototype,"id",void 0),h([Nr],gi.prototype,"headingContent",void 0),function(e){e[e.alt=18]="alt",e[e.arrowDown=40]="arrowDown",e[e.arrowLeft=37]="arrowLeft",e[e.arrowRight=39]="arrowRight",e[e.arrowUp=38]="arrowUp",e[e.back=8]="back",e[e.backSlash=220]="backSlash",e[e.break=19]="break",e[e.capsLock=20]="capsLock",e[e.closeBracket=221]="closeBracket",e[e.colon=186]="colon",e[e.colon2=59]="colon2",e[e.comma=188]="comma",e[e.ctrl=17]="ctrl",e[e.delete=46]="delete",e[e.end=35]="end",e[e.enter
77=13]="enter",e[e.equals=187]="equals",e[e.equals2=61]="equals2",e[e.equals3=107]="equals3",e[e.escape=27]="escape",e[e.forwardSlash=191]="forwardSlash",e[e.function1=112]="function1",e[e.function10=121]="function10",e[e.function11=122]="function11",e[e.function12=123]="function12",e[e.function2=113]="function2",e[e.function3=114]="function3",e[e.function4=115]="function4",e[e.function5=116]="function5",e[e.function6=117]="function6",e[e.function7=118]="function7",e[e.function8=119]="function8",e[e.function9=120]="function9",e[e.home=36]="home",e[e.insert=45]="insert",e[e.menu=93]="menu",e[e.minus=189]="minus",e[e.minus2=109]="minus2",e[e.numLock=144]="numLock",e[e.numPad0=96]="numPad0",e[e.numPad1=97]="numPad1",e[e.numPad2=98]="numPad2",e[e.numPad3=99]="numPad3",e[e.numPad4=100]="numPad4",e[e.numPad5=101]="numPad5",e[e.numPad6=102]="numPad6",e[e.numPad7=103]="numPad7",e[e.numPad8=104]="numPad8",e[e.numPad9=105]="numPad9",e[e.numPadDivide=111]="numPadDivide",e[e.numPadDot=110]="numPadDot",e[e.numPadMinus=109]="numPadMinus",e[e.numPadMultiply=106]="numPadMultiply",e[e.numPadPlus=107]="numPadPlus",e[e.openBracket=219]="openBracket",e[e.pageDown=34]="pageDown",e[e.pageUp=33]="pageUp",e[e.period=190]="period",e[e.print=44]="print",e[e.quote=222]="quote",e[e.scrollLock=145]="scrollLock",e[e.shift=16]="shift",e[e.space=32]="space",e[e.tab=9]="tab",e[e.tilde=192]="tilde",e[e.windowsLeft=91]="windowsLeft",e[e.windowsOpera=219]="windowsOpera",e[e.windowsRight=92]="windowsRight"}(fi||(fi={}));const mi="ArrowDown",vi="ArrowLeft",bi="ArrowRight",yi="ArrowUp";function wi(e,t,r=0){return[t,r]=[t,r].sort((e,t)=>e-t),t<=e&&e<r}const xi="single";class _i extends Jn{constructor(){super(...arguments),this.expandmode="multi",this.activeItemIndex=0,this.change=()=>{this.$emit("change",this.activeid)},this.setItems=()=>{0!==this.accordionItems.length&&(this.accordionIds=this.getItemIds(),this.accordionItems.forEach((e,t)=>{e instanceof gi&&(e.addEventListener("change",this.activeItemChange),this.isSingleExpandMode()&&(e.expanded=!(this.activeItemIndex!==t)));const r=this.accordionIds[t];e.setAttribute("id","string"!=typeof r?`accordion-${t+1}`:r),this.activeid=this.accordionIds[this.activeItemIndex],e.addEventListener("keydown",this.handleItemKeyDown),e.addEventListener("focus",this.handleItemFocus)}),this.isSingleExpandMode())&&(this.findExpandedItem()??this.accordionItems[0]).setAttribute("aria-disabled","true")},this.removeItemListeners=e=>{e.forEach((e,t)=>{e.removeEventListener("change",this.activeItemChange),e.removeEventListener("keydown",this.handleItemKeyDown),e.removeEventListener("focus",this.handleItemFocus)})},this.activeItemChange=e=>{if(e.defaultPrevented||e.target!==e.currentTarget)return;e.preventDefault();const t=e.target;this.activeid=t.getAttribute("id"),this.isSingleExpandMode()&&(this.resetItems(),t.expanded=!0,t.setAttribute("aria-disabled","true"),this.accordionItems.forEach(e=>{e.hasAttribute("disabled")||e.id===this.activeid||e.removeAttribute("aria-disabled")})),this.activeItemIndex=Array.from(this.accordionItems).indexOf(t),this.change()},this.handleItemKeyDown=e=>{if(e.target===e.currentTarget)switch(this.accordionIds=this.getItemIds(),e.key){case yi:e.preventDefault(),this.adjust(-1);break;case mi:e.preventDefault(),this.adjust(1);break;case"Home":this.activeItemIndex=0,this.focusItem();break;case"End":this.activeItemIndex=this.accordionItems.length-1,this.focusItem()}},this.handleItemFocus=e=>{if(e.target===e.currentTarget){const t=e.target;this.activeItemIndex=Array.from(this.accordionItems).indexOf(t);const r=this.activeItemIndex;this.activeItemIndex!==r&&-1!==r&&(this.activeItemIndex=r,this.activeid=this.accordionIds[this.activeItemIndex])}}}accordionItemsChanged(e,t){this.$fastController.isConnected&&(this.removeItemListeners(e),this.setItems())}disconnectedCallback(){super.disconnectedCallback(),this.removeItemListeners(this.accordionItems)}findExpandedItem(){for(let e=0;e<this.accordionItems.length;e++)if("true"===this.accordionItems[e].getAttribute("expanded"))return this.accordionItems[e];return null}
77resetItems(){this.accordionItems.forEach((e,t)=>{e.expanded=!1})}getItemIds(){return this.accordionItems.map(e=>e.getAttribute("id"))}isSingleExpandMode(){return this.expandmode===xi}adjust(e){this.activeItemIndex=function(e,t,r){return r<0?t:r>t?0:r}(0,this.accordionItems.length-1,this.activeItemIndex+e),this.focusItem()}focusItem(){const e=this.accordionItems[this.activeItemIndex];e instanceof gi&&e.expandbutton.focus()}}h([Qr({attribute:"expand-mode"})],_i.prototype,"expandmode",void 0),h([Nr],_i.prototype,"accordionItems",void 0);class ki extends(s(_i)){constructor(){super(...arguments),this.chevronPosition="right"}getAccordionItems(){return this.querySelectorAll(`${this.tagName}-item`)}connectedCallback(){super.connectedCallback(),this.propagateSizeAttribute(this.getAttribute("size")),this.propagateChevronPositionAttribute(this.getAttribute("chevron-position")),this.propagateDividerAttribute(this.getAttribute("divider")),this.addEventListener("expanded",e=>{if(e.target instanceof gi&&this.expandmode===xi){const t=e.target;this.expandedItems.length>1&&(this.expandedItems.find(e=>e.id!==t.id).expanded=!1)}})}get expandedItems(){return this.accordionItems.filter(e=>e.hasAttribute("expanded"))}sizeChanged(e,t){this.propagateSizeAttribute(t)}chevronPositionChanged(e,t){this.propagateChevronPositionAttribute(t)}dividerChanged(e,t){this.propagateDividerAttribute(t)}propagateSizeAttribute(e){const t=this.getAccordionItems();t?.forEach(t=>{e?t.setAttribute("size",e):t.removeAttribute("size")})}propagateChevronPositionAttribute(e){const t=this.getAccordionItems();t?.forEach(t=>{e?t.setAttribute("chevron-position",e):t.removeAttribute("chevron-position")})}propagateDividerAttribute(e){const t=this.getAccordionItems();t?.forEach(t=>{e?t.setAttribute("divider",e):t.removeAttribute("divider")})}}h([Qr],ki.prototype,"size",void 0),h([Qr({attribute:"chevron-position"})],ki.prototype,"chevronPosition",void 0),h([Qr],ki.prototype,"divider",void 0);const Ci=e=>(t,r)=>r.prefix&&"chameleon"!==r.prefix&&e.includes("chameleon-")?`${e.replaceAll("chameleon-",`${r.prefix}-`)}\n${e}`:e,Si=ki.compose({baseName:"accordion",template:(e,t)=>
77ri`
78    <template>
79        <slot ${si({property:"accordionItems",filter:ni()})}></slot>
80        <slot name="item" part="item" ${si("accordionItems")}></slot>
81    </template>
82`,styles:Ci(":host{width:100%;font:var(--goto-body-small);background-color:var(--goto-interactive-color-secondary-default)}:host([size=small]){font:var(--goto-caption-medium)}:host([size=large]){font:var(--goto-body-medium)}")}),Ei=gi.compose({baseName:"accordion-item",template:(e,t)=>{const r=u(mr);return ri`
83    <template class="${e=>e.expanded?"expanded":""}">
84        <div
85            class="heading"
86            part="heading"
87            role="heading"
88            aria-level="${e=>e.headinglevel}"
89        >
90            <button
91                ?disabled="${e=>e.disabled}"
92                class="button"
93                part="button"
94                ${li("expandbutton")}
95                aria-expanded="${e=>e.expanded}"
96                aria-controls="${e=>e.id}-panel"
97                id="${e=>e.id}"
98                @click="${(e,t)=>e.clickHandler(t.event)}"
99            >
100                <span class="heading-content" part="heading-content">
101                    <slot ${li("headingContent")} name="heading"></slot>
102                </span>
103            </button>
104            ${pi(0,t)}
105            ${hi(0,t)}
106            <span class="icon" part="icon" aria-hidden="true">
107                <slot name="expanded-icon" part="expanded-icon">
108                    ${e=>"left"===e.chevronPosition?ri`<${r}>${ci}</${r}>`:ri`<${r}>${di}</${r}>`}
109                </slot>
110                <slot name="collapsed-icon" part="collapsed-icon">
111                    ${e=>"left"===e.chevronPosition?ri`<${r}>${ui}</${r}>`:ri`<${r}>${ci}</${r}>`}
112                </slot>
113            <span>
114        </div>
115        <div
116            class="region"
117            part="region"
118            id="${e=>e.id}-panel"
119            role="region"
120            aria-labelledby="${e=>e.id}"
121        >
122            <slot></slot>
123        </div>
124    </template>
125`},styles:(e,t)=>[Ci(':host([hidden]){display:none}.heading{grid-template:"start button end icon"/auto 1fr auto 40px;place-content:center;display:grid;position:relative}.icon{pointer-events:none;grid-area:icon;justify-content:center;align-items:center;padding-inline-end:var(--goto-spacing-04);display:flex;position:relative}slot[name=collapsed-icon]{display:flex}slot[name=expanded-icon]{display:none}:host([expanded]) .region{display:block}:host([expanded]) slot[name=collapsed-icon]{display:none}:host([expanded]) slot[name=expanded-icon]{display:flex}.start{grid-area:start;justify-content:center;align-items:center;padding-inline-start:4px;display:flex;position:relative}.end{grid-area:end;justify-content:center;align-items:center;display:flex;position:relative}:host{box-sizing:border-box;height:auto;font-size:12px;line-height:16px;font:inherit;flex-direction:column;display:flex}:host div[part=heading]{color:var(--goto-type-color-default);height:auto;font:inherit;gap:var(--goto-spacing-02);padding-inline-start:var(--goto-spacing-02);padding-block:var(--goto-spacing-01)}:host div[part=heading]:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host div[part=heading]:active{background-color:var(--goto-interactive-color-secondary-pressed)}:host .region{padding:6px;padding-inline:var(--goto-spacing-04);padding-block:var(--goto-spacing-02)var(--goto-spacing-06);display:none}:host .start,:host [name=expanded-icon],:host [name=collapsed-icon]{--goto-icon-size:20px}.button{appearance:none;text-align:left;cursor:pointer;color:inherit;font-family:inherit;font:inherit;height:inherit;padding:var(--goto-spacing-00);background:0 0;border:none;outline:none;grid-area:button}.button:before{content:"";cursor:pointer;position:absolute;inset:0}.button:focus-visible:before{border:2px solid var(--goto-focus-border-color-default);border-radius:var(--goto-radius-none);outline:none;outline:1px solid var(--goto-focus-color-highlight-default)}:host([chevron-position=left]) .heading{gap:var(--goto-spacing-01);grid-template:"icon start button end"/auto auto 1fr auto}:host([chevron-position=left]) div[part=heading]{font:var(--goto-body-small-strong);padding-inline-start:var(--goto-spacing-03)}:host([chevron-position=left]) .icon{padding-inline-end:var(--goto-spacing-00)}:host([divider=top]) div[part=heading]{border-top:1px solid var(--goto-border-color-default)}:host([divider=bottom]) div[part=heading]{border-bottom:1px solid var(--goto-border-color-default)}:host([divider=top-bottom]) div[part=heading]{border-top:1px solid var(--goto-border-color-default)}:host([divider=top-bottom]:last-of-type) div[part=heading]{border-bottom:1px solid var(--goto-border-color-default)}:host([divider=top-bottom]:last-of-type.expanded) div[part=heading],:host([divider=bottom].expanded) div[part=heading]{border-bottom:none}:host([divider=top-bottom]:last-of-type.expanded) .region,:host([divider=bottom].expanded) .region{border-bottom:1px solid var(--goto-border-color-default)}:host([size=small]) div[part=heading]{height:var(--goto-spacing-06);padding-block:var(--goto-spacing-00)}:host([size=small]) [name=expanded-icon],:host([size=small]) [name=collapsed-icon],:host([size=small]) .start{--goto-icon-size:var(--goto-spacing-04)}:host([size=large]) div[part=heading]{padding-block:var(--goto-spacing-02)}:host([full-width]) .region{padding:var(--goto-spacing-00)}:host([disabled]){cursor:not-allowed;color:var(--goto-type-color-disabled);--goto-icon-color:var(--goto-type-color-disabled)}:host([disabled]) div[part=heading]:hover,:host([disabled]) div[part=heading]:active{background-color:var(--goto-interactive-color-disabled)}:host([disabled]) button:before{cursor:not-allowed}:host([disabled]) div[part=heading]{color:var(--goto-type-color-disabled)}::slotted(chameleon-navigation-drawer-item){width:100%;padding-inline-start:var(--goto-spacing-09)}')(e,t)]});var Ii;vr({prefix:Ii}),To({prefix:Ii,node:void 0},Ei,Si);const Ai=Symbol.for(""),Ti=e=>{if(e?.r===Ai)return e?._$litStatic$},Oi=e=>({_$litStatic$:e,r:Ai}),Li=new Map,$i=e=>(t,...r)=>{const n=r.length;let o,i;const s=[],a=[];let l,c=0,d=!1;for(;c<n;){for(l=t[c];c<n&&void 0!==(i=r[c],o=Ti(i));)l+=o+t[++c],d=!0;c!==n&&a.push(i),s.push(l),c++}if(c===n&&s.push(t[n]),d){const e=s.join("$$lit$$");void 0===(t=Li.get(e))&&(s.raw=s,Li.set(e,t=s)),r=a}return e(t,...r)},Ni=$i(oe);$i(ie),$i(se);class Ri extends or{constructor(e){if(super(e),this.it=le,2!==e.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===le||null==e)return this._t=void 0,this.it=e;if(e===ae)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}Ri.directiveName="unsafeHTML",Ri.resultType=1;const Pi=nr(Ri);class Di extends Ri{}Di.directiveName="unsafeSVG",Di.resultType=2;const Mi=nr(Di);var zi='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 12C7 13.105 6.105 14 5 14C3.895 14 3 13.105 3 12C3 10.895 3.895 10 5 10C6.105 10 7 10.895 7 12ZM14 12C14 13.105 13.105 14 12 14C10.895 14 10 13.105 10 12C10 10.895 10.895 10 12 10C13.105 10 14 10.895 14 12ZM21 12C2
1251 13.105 20.105 14 19 14C17.895 14 17 13.105 17 12C17 10.895 17.895 10 19 10C20.105 10 21 10.895 21 12Z" fill="currentColor"></path></svg>';function Fi(e,t){return{guardedValue:function(r){const n=e[r];return{value:(void 0===n?{type:"missing",value:t.forMissing}:null===n?{type:"removed",value:t.forRemoved}:{type:"exists",value:n}).value,message:null}}}}Fi.defaultMessageFnForVariants=function(e){return({type:t,from:r,safeValue:n})=>"missing"===t?null:`${e} The variant \`${r}\` is deprecated. ${"exists"===t?`Using \`${n}\` as fallback. A codemod is available to migrate this automatically!`:`There is no recommended replacement, \`${n}\` is used as fallback.`}`};class Ui extends Zt{constructor(){super(),this.size="medium",this.variant="primary",this.border="none",this.isDot=!1,this.handleContentMutation=e=>{e.some(e=>"childList"===e.type||"characterData"===e.type)&&(this.normalizeValue(),this.updateDotState())},this.contentObserver=new MutationObserver(this.handleContentMutation)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","status"),this.hasAttribute("aria-live")||this.setAttribute("aria-live","polite"),this.hasAttribute("aria-atomic")||this.setAttribute("aria-atomic","true"),this.updateDotState(),this.normalizeValue(),this.setAccessibleLabel(),this.contentObserver.observe(this,{childList:!0,subtree:!0,characterData:!0})}disconnectedCallback(){super.disconnectedCallback(),this.contentObserver.disconnect()}updateDotState(){this.isDot=!this.textContent,this.classList.toggle("dot",this.isDot)}normalizeValue(){const e=this.textContent||"",t=Number.parseInt(e,10);this.value=Number.isNaN(t)?null:t}setAccessibleLabel(){this.label&&this.setAttribute("aria-label",`${this.label}`)}validateAccessibleLabel(){this.getAttribute("aria-label")?.length||console.error("CHAMELEON-A11Y: BadgeCounter component must have an accessible label provided by a non-empty label attribute to be used as aria-label.")}render(){const e=(this.value??0)>99;return oe`
126      <slot ?hidden=${e}></slot>
127      ${e?oe`<slot name="max">99+</slot>`:""}
128    `}}Ui.baseName="badge-counter",Ui.styles=b(':host{width:auto;height:var(--goto-spacing-05);min-width:var(--goto-spacing-05);background-color:var(--goto-surface-color-danger-default);border-radius:var(--goto-radius-circle);padding-inline:var(--goto-spacing-02);font:var(--goto-caption-medium-strong);color:var(--goto-type-color-inverted);box-sizing:border-box;box-shadow:none;flex-shrink:0;place-items:center;display:grid}:host([border=fill]){box-shadow:0 0 0 2px var(--badge-counter-border-color,var(--goto-surface-color-default))}:host([size=small]){min-width:var(--goto-spacing-04);height:var(--goto-spacing-04);font:var(--goto-caption-small-strong);padding-inline:var(--goto-spacing-01)}:host([variant=secondary]){background-color:var(--goto-surface-color-secondary);color:var(--goto-type-color-secondary)}:host([variant=tertiary]){background-color:var(--goto-surface-color-default);color:var(--goto-type-color-default)}:host(.dot){min-width:var(--goto-spacing-03);height:var(--goto-spacing-03);padding:var(--goto-spacing-00);background-color:var(--goto-surface-color-danger-default)!important}:host([size=small].dot){min-width:var(--goto-spacing-02);height:var(--goto-spacing-02)}:host([beacon]){--badge-counter-beacon-size:calc((var(--goto-spacing-03)*2.5 - var(--goto-spacing-03))/2);position:relative}:host([beacon]):after{content:"";border-radius:inherit;pointer-events:none;box-shadow:0 0 0 0 color-mix(in srgb,var(--goto-surface-color-danger-default)60%,transparent);
128animation-name:var(--badge-counter-beacon-animation-name,badge-counter-beacon-pulse);animation-duration:var(--goto-duration-sluggish);animation-iteration-count:infinite;animation-timing-function:var(--goto-standard-easing);animation-fill-mode:none;position:absolute;inset:0}:host([beacon]):host([size=small]){--badge-counter-beacon-size:calc((var(--goto-spacing-02)*2.5 - var(--goto-spacing-02))/2)}:host([beacon]):host(:hover):after{animation:none}@keyframes badge-counter-beacon-pulse{to{box-shadow:0 0 0 var(--badge-counter-beacon-size)color-mix(in srgb,var(--goto-surface-color-danger-default)0%,transparent)}}@keyframes badge-counter-beacon-pulse-half{0%,to{box-shadow:0 0 0 calc(var(--badge-counter-beacon-size)*.5)color-mix(in srgb,var(--goto-surface-color-danger-default)30%,transparent)}}'),h([Te({reflect:!0})],Ui.prototype,"size",void 0),h([Te({reflect:!0})],Ui.prototype,"variant",void 0),h([Te({reflect:!0})],Ui.prototype,"border",void 0),h([Te({type:Boolean,reflect:!0})],Ui.prototype,"beacon",void 0),h([Te({type:Number})],Ui.prototype,"value",void 0),h([Te()],Ui.prototype,"label",void 0),h([Oe()],Ui.prototype,"isDot",void 0);var Bi='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22V18.3636C8.48546 18.3636 5.63636 15.5145 5.63636 12C5.63636 8.48546 8.48546 5.63636 12 5.63636V2Z" fill="currentColor"></path></svg>';class Hi extends(Gt(function(e){class t extends e{constructor(){super(...arguments),this.ariaExpanded=null,this.ariaPressed=null}}return h([Te({reflect:!0,attribute:"aria-expanded"})],t.prototype,"ariaExpanded",void 0),h([Te({reflect:!0,attribute:"aria-pressed"})],t.prototype,"ariaPressed",void 0),t}(Zt))){constructor(){super(...arguments),this.type="button",this.autofocus=!1}}Hi.formAssociated=!0,Hi.shadowRootOptions={mode:"open",delegatesFocus:!0},h([Te({reflect:!0})],Hi.prototype,"type",void 0),h([Te({type:Boolean})],Hi.prototype,"autofocus",void 0),h([Te()],Hi.prototype,"formaction",void 0),h([Te()],Hi.prototype,"formenctype",void 0),h([Te()],Hi.prototype,"formmethod",void 0),h([Te({type:Boolean})],Hi.prototype,"formnovalidate",void 0),h([Te()],Hi.prototype,"formtarget",void 0);class ji{constructor(e){this.host=e,this.handleFormAction=()=>{if(this.host.disabled||this.host.isLoading)return;const e=this.host.internals.form;e&&("submit"===this.host.type?e.requestSubmit():"reset"===this.host.type&&e.reset())},this.host.addController(this),this.host.internals=this.host.attachInternals()}hostConnected(){this.host.addEventListener("click",this.handleFormAction)}hostDisconnected(){this.host.removeEventListener("click",this.handleFormAction)}hostUpdate(){this.host.name===this.previousName&&this.host.value===this.previousValue||(this.host.name&&this.host.value?this.host.internals.setFormValue(this.host.value):this.host.internals.setFormValue(null),this.previousName=this.host.name,this.previousValue=this.host.value)}}class Vi{constructor(e,t){this.host=e,this.shouldBlockActivation=t,this.activationListener=e=>{this.shouldBlockActivation(e)&&(e.preventDefault(),e.stopPropagation())},this.host.addController(this)}hostConnected(){this.host.addEventListener("click",this.activationListener,{capture:!0})}hostDisconnected(){this.host.removeEventListener("click",this.activationListener,{capture:!0})}}class Wi extends Hi{constructor(){super(),this.size="medium",this.variant="primary",this.badge=!1,this.beacon=!1,this.isLoading=!1,new ji(this),new Vi(this,()=>this.isAriaDisabled)}get isAriaDisabled(){return this.disabled||this.isLoading||"true"===this.ariaDisabled}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","presentation")}willUpdate(e){e.has("variant")&&this.handleFallback()}updated(e){super.updated(e),(e.has("label")||e.has("labelId"))&&this.setAccessibleLabel()}handleFallback(){const{guardedValue:e}=Fi({"brand-primary":"secondary","brand-tertiary":"secondary","neutral-secondary":"tertiary","neutral-tertiary":"primary","danger-primary":"danger","danger-tertiary":"danger","inverted-primary":"primary","inverted-secondary-bright":"primary","inverted-secondary-dim":"primary"},{forMissing:this.variant,forRemoved:"primary",message:Fi.defaultMessageFnForVariants("[Chameleon IconButton]")}),t=e(this.variant);this.variant=t.value,null!==t.message&&console.warn(t.message)}async setAccessibleLabel(){if(await this.updateComplete,this.labelId){this.setAttribute("aria-labelledby",this.labelId);const e=this.ownerDocument?.getElementById(this.labelId),t=e?.textContent?.trim();return void(t&&this.control?.setAttribute("aria-label",t))}this.label&&this.control?.setAttribute("aria-label",this.badge&&this.badgeLabel?`${this.label}, ${this.badgeLabel}`:this.label)}validateAccessibleBadgeLabel(){!this.badge||this.badgeLabel&&0!==this.badgeLabel.length&&"CHAMELEON_BYPASS_LABEL"!==this.badgeLabel||console.error("CHAMELEON-A11Y: Icon Button component must have an accessible label for the badge indicator provided by a non-empty badgeLabel/badge-label attribute to be used as aria-label.")}validateAccessibleLabel(){this.control?.getAttribute("aria-label")?.length||this.getAttribute("aria-labelledby")?.length||console.error("CHAMELEON-A11Y: Icon Button component must have an accessible label provided by either \n  1) a visible label whose id is given as the attribute labelId \n  2) a non-empty label attribute to be used as aria-label.\n")}get computedConfig(){return{badgeCounterSize:{xlarge:"medium",large:"medium",medium:"small",small:"small"}[this.size]}}render(){const e=Oi(u(mr)),t=Oi(u(Ui));return Ni`
129      <button
130        class="control icon-button-control"
131        part="control"
132        ?autofocus="${this.autofocus}"
133        form="${this.form??le}"
134        formaction="${this.formaction??le}"
135        formenctype="${this.formenctype??le}"
136        formmethod="${this.formmethod??le}"
137        ?formnovalidate="${this.formnovalidate}"
138        formtarget="${this.formtarget??le}"
139        name="${this.name??le}"
140        type="${this.type}"
141        value="${this.value??le}"
142        aria-atomic="${this.ariaAtomic??le}"
143        aria-busy="${this.ariaBusy??le}"
144        aria-current="${this.ariaCurrent??le}"
145        aria-disabled="${this.isAriaDisabled}"
146        aria-expanded="${this.ariaExpanded??le}"
147        aria-haspopup="${this.ariaHasPopup??le}"
148        aria-hidden="${this.ariaHidden??le}"
149        aria-invalid="${this.ariaInvalid??le}"
150        aria-keyshortcuts="${this.ariaKeyShortcuts??le}"
151        aria-label="${this.ariaLabel??le}"
152        aria-live="${this.ariaLive??le}"
153        aria-relevant="${this.ariaRelevant??le}"
154        aria-roledescription="${this.ariaRoleDescription??le}"
155      >
156        <span part="content" class="content">
157          ${this.isLoading?Ni`<${e} class="loading-icon" aria-label="Loading icon">${Mi(Bi)}</${e}>`:Ni`
158                ${le}
159                <slot>
160                  <slot name="start"></slot>
161                  <slot name="end"></slot>
162                </slot>
163              `}
164        </span>
165        ${this.badge?Ni`
166              <${t}
167                class="icon-button-badge"
168                label="${"CHAMELEON_BYPASS_LABEL"}"
169                size="${this.computedConfig.badgeCounterSize}"
170                aria-label="${this.badgeLabel||""}"
171                value="${this.count}"
172                ?beacon="${this.beacon}"
173              >${void 0!==this.count?this.maxCountLabel?Ni`
174                        ${this.count}
175                        <span slot="max">${this.maxCountLabel}</span>
176                      `:this.count:le}</${t}>
177            `:""}
178      </button>
179    `}}Wi.baseName="icon-button",Wi.styles=b(":host .control:focus-visible,:host:host(.selected-interactive-item) .control{outline-color:var(--goto-focus-color-highlight-default)}:host([variant=primary]) .control{color:var(--goto-type-color-inverted);background-color:var(--goto-interactive-color-primary-default);--goto-icon-color:var(--goto-icon-color-inverted)}:host([variant=primary]):host([disabled]) .control,:host([variant=primary]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=secondary]) .control{color:var(--goto-type-color-brand-default);--goto-icon-color:var(--goto-icon-color-brand-default);background-color:#0000}:host([variant=secondary]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-brand-default))}:host([variant=secondary]) .control:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host([variant=secondary]) .control:active,:host([variant=secondary]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-secondary-pressed)}:host([variant=secondary]):host([disabled]) .control,:host([variant=secondary]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=secondary-filled]) .control{color:var(--goto-type-color-brand-default);background-color:var(--goto-interactive-color-neutral-secondary-default);--goto-icon-color:var(--goto-icon-color-on-neutral-secondary-default)}:host([variant=secondary-filled]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-on-neutral-secondary-default))}:host([variant=secondary-filled]) .control:hover{background-color:var(--goto-interactive-color-neutral-secondary-hover)}:host([variant=secondary-filled]) .control:active,:host([variant=secondary-filled]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-neutral-secondary-pressed)}:host([variant=secondary-filled]):host([disabled]) .control,:host([variant=secondary-filled]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=tertiary]) .control{color:var(--goto-type-color-default);--goto-icon-color:var(--goto-icon-color-default);background-color:#0000}:host([variant=tertiary]) .control:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host([variant=tertiary]) .control:active,:host([variant=tertiary]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-secondary-pressed)}:host([variant=tertiary]):host([disabled]) .control,:host([variant=tertiary]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=neutral]) .control{color:var(--goto-type-color-default);--goto-icon-color:var(--goto-icon-color-default);background-color:#0000}:host([variant=neutral]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-default))}:host([variant=neutral]) .control:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host([variant=neutral]) .control:active,:host([variant=neutral]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-secondary-pressed)}:host([variant=neutral]):host([disabled]) .control,:host([variant=neutral]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=success]) .control{color:var(--goto-type-color-inverted);background-color:var(--goto-interactive-color-success-default);--goto-icon-color:var(--goto-icon-color-inverted)}:host([variant=success]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-inverted))}:host([variant=success]) .control:hover{background-color:var(--goto-interactive-color-success-hover)}:host([variant=success]) .control:active,:host([variant=success]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-success-pressed)}:host([variant=success]):host([disabled]) .control,:host([variant=success]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=danger]) .control{color:var(--goto-type-color-inverted);background-color:var(--goto-interactive-color-danger-default);--goto-icon-color:var(--goto-icon-color-inverted)}:host([variant=danger]):host([disabled]) .control,:host([variant=danger]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=inverted]) .control{color:var(--goto-type-color-inverted);--goto-icon-color:var(--goto-icon-color-inverted);background-color:#0000}:host([variant=inverted]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-inverted))}:host([variant=inverted]) .control:hover{background-color:var(--goto-interactive-color-primary-hover)}:host([variant=inverted]) .control:active,:host([variant=inverted]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-primary-pressed)}:host([variant=inverted]):host([disabled]) .control,:host([variant=inverted]):host([is-loading]) .control{color:var(--goto-type-color-inverted);--goto-icon-color:var(--goto-icon-color-inverted);background-color:#0000}:host([variant=inverted]) .control:focus-visible,:host([variant=inverted]):host(.selected-interactive-item) .control{outline-color:var(--goto-focus-border-color-default)}@keyframes button-loading{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes button-loading-half{0%,to{transform:rotate(180deg)}}:host{box-sizing:border-box;border-radius:var(--goto-radius-small);display:inline-flex}:host .control{border-radius:inherit;cursor:pointer;white-space:nowrap;border:none;justify-content:center;align-items:center;display:flex;position:relative}:host([is-loading]),:host([disabled]){cursor:not-allowed}:host([is-loading]) .control,:host([disabled]) .control{pointer-events:none}:host .control:focus-visible,:host(.selected-interactive-item) .control{outline-offset:2px;outline-width:1px;outline-style:solid}:host .loading-icon{display:none}:host([isloading]) .loading-icon,:host([is-loading]) .loading-icon{animation-direction:normal;animation-delay:0s;animation-duration:var(--goto-duration-sluggish);animation-iteration-count:infinite;animation-play-state:running;animation-fill-mode:forwards;animation-timing-function:var(--goto-standard-easing);
179animation-name:var(--button-loading-animation-name,button-loading);display:flex}:host([isloading]) .leading-icon,:host([isloading]) .trailing-icon,:host([is-loading]) .leading-icon,:host([is-loading]) .trailing-icon{display:none}:host{aspect-ratio:1;flex-shrink:0}:host .control{color:var(--goto-type-color-default);user-select:none;background-color:#0000;position:relative}:host .control .icon-button-badge{top:var(--badge-counter-element-top);left:calc(100% - var(--badge-counter-element-right) - var(--badge-counter-element-left-offset,0px));position:absolute}:host([size=xlarge]){height:var(--goto-spacing-09);width:var(--goto-spacing-09);max-width:var(--goto-spacing-09);--badge-counter-dot-radius:calc(var(--goto-spacing-03)/2)}:host([size=xlarge]):host([badge]){--badge-counter-element-top:6px;--badge-counter-element-right:6px;--badge-counter-element-left-offset:12px}:host([size=xlarge]):host([count]){--badge-counter-element-top:-2px;--badge-counter-element-right:4px;--badge-counter-element-left-offset:22px}:host([size=xlarge]) .control{padding:var(--goto-spacing-03);--goto-icon-size:var(--goto-spacing-06)}:host([size=large]){height:var(--goto-spacing-08);width:var(--goto-spacing-08);max-width:var(--goto-spacing-08);--badge-counter-dot-radius:calc(var(--goto-spacing-03)/2)}
179:host([size=large]):host([badge]){--badge-counter-element-top:2px;--badge-counter-element-right:2px;--badge-counter-element-left-offset:12px}:host([size=large]):host([count]){--badge-counter-element-top:-4px;--badge-counter-element-right:0px;--badge-counter-element-left-offset:22px}:host([size=large]) .control{padding:var(--goto-spacing-02);--goto-icon-size:var(--goto-spacing-06)}:host([size=medium]){height:var(--goto-spacing-07);width:var(--goto-spacing-07);max-width:var(--goto-spacing-07);--badge-counter-dot-radius:var(--goto-spacing-01)}:host([size=medium]):host([badge]){--badge-counter-element-top:4px;--badge-counter-element-right:4px;--badge-counter-element-left-offset:8px}:host([size=medium]):host([count]){--badge-counter-element-top:-2px;--badge-counter-element-right:0px;--badge-counter-element-left-offset:16px}:host([size=medium]) .control{padding:var(--goto-spacing-02);--goto-icon-size:var(--goto-spacing-04)}:host([size=small]){height:var(--goto-spacing-06);width:var(--goto-spacing-06);max-width:var(--goto-spacing-06);--badge-counter-dot-radius:var(--goto-spacing-01)}:host([size=small]):host([badge]){--badge-counter-element-top:0px;--badge-counter-element-right:0px;--badge-counter-element-left-offset:8px}:host([size=small]):host([count]){--badge-counter-element-top:-4px;--badge-counter-element-right:-4px;--badge-counter-element-left-offset:16px}:host([size=small]) .control{padding:var(--goto-spacing-01);--goto-icon-size:var(--goto-spacing-04)}:host(:hover),:host(:active),:host([is-loading]),:host([disabled]){--badge-counter-beacon-animation-name:none}:host([variant=primary]) .control{color:var(--goto-type-color-default);--goto-icon-color:var(--goto-icon-color-default);background-color:#0000}:host([variant=primary]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-default))}:host([variant=primary]) .control:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host([variant=primary]) .control:active,:host([variant=primary]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-secondary-pressed)}:host([variant=primary]):host([disabled]) .control,:host([variant=primary]):host([is-loading]) .control{color:var(--goto-type-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled);background-color:#0000}:host([variant=secondary]) .control{border:none}:host([variant=secondary]):host([disabled]) .control,:host([variant=secondary]):host([is-loading]) .control{background-color:#0000}:host([variant=tertiary]) .control{color:var(--goto-type-color-brand-default);--goto-icon-color:var(--goto-icon-color-brand-default);box-shadow:inset 0 0 0 1px var(--goto-border-color-default)}:host([variant=tertiary]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-brand-default))}:host([variant=tertiary]):host([disabled]) .control,:host([variant=tertiary]):host([is-loading]) .control{background-color:#0000}:host([variant=danger]) .control{color:var(--goto-type-color-default);--goto-icon-color:var(--goto-icon-color-danger);background-color:#0000}:host([variant=danger]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-danger))}:host([variant=danger]) .control:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host([variant=danger]) .control:active,:host([variant=danger]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-secondary-pressed)}:host([variant=danger]):host([disabled]) .control,:host([variant=danger]):host([is-loading]) .control{color:var(--goto-type-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled);background-color:#0000}"),h([Te({reflect:!0})],Wi.prototype,"size",void 0),h([Te({reflect:!0})],Wi.prototype,"variant",void 0),h([Te({type:Boolean,reflect:!0})],Wi.prototype,"badge",void 0),h([Te({type:Number})],Wi.prototype,"count",void 0),h([Te({attribute:"max-count-label"})],Wi.prototype,"maxCountLabel",void 0),h([Te({type:Boolean,reflect:!0})],Wi.prototype,"beacon",void 0),h([Te({type:Boolean,reflect:!0,attribute:"is-loading"})],Wi.prototype,"isLoading",void 0),h([Te({attribute:"label-id"})],Wi.prototype,"labelId",void 0),h([Te()],Wi.prototype,"label",void 0),h([Te({attribute:"badge-label"})],Wi.prototype,"badgeLabel",void 0),h([$e(".control")],Wi.prototype,"control",void 0);const Ki=(e,t)=>t.x>=e.left&&t.x<=e.left+e.width&&t.y>=e.top&&t.y<=e.top+e.height,qi=(e,t="chameleon")=>{const r=`chameleon-theme-provider, ${t}-theme-provider`;if(!e)return document.querySelector(r)??void 0;const n=e.closest(r);if(n)return n;const o=e.getRootNode();return o instanceof ShadowRoot?qi(o.host):qi(o.parentElement)};function Gi(e,t){let r=e;for(;r&&r!==document.body.parentElement;)if(r=r.parentElement,r&&t(r))return r;return null}function Zi(e,t){for(let r=0;r<(e?.children.length??0);r++){const n=e?.children.item(r);if(n){if(t(n))return n;const e=Zi(n,t);if(e)return e}}return null}function Yi(e){const t=e.tagName.toLowerCase().replace(e.baseName.toLowerCase(),"");return Array.from(e.getElementsByTagName("*")).filter(e=>e.tagName.toLowerCase().startsWith(t))}function Ji(e,t){return e.filter(e=>t in e)}function Qi(e,t){return(t.querySelector?t.querySelector(`#${CSS.escape(e)}`):null)||(t instanceof ShadowRoot?Qi(e,t.host):t.parentNode?Qi(e,t.parentNode):null)}function Xi(e,t,r,n=1e4){if(!e)return()=>{};const o=t.getRootNode();let i;const s=new MutationObserver(()=>{if(!t.isConnected)return void a();const n=Qi(e,t);n&&(a(),r(n))});function a(){s.disconnect(),void 0!==i&&(clearTimeout(i),i=void 0)}return s.observe(o,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["id"]}),n>0&&(i=setTimeout(()=>{console.warn(`[Chameleon] Could not find element with id "${e}" within ${n}ms. Ensure the trigger element is rendered in the same DOM scope as the component.`),a()},n)),()=>a()}const es=Math.min,ts=Math.max,rs=Math.round,ns=Math.floor,os=e=>({x:e,y:e}
vendor: 4,686 bytes, line 179
179),is={left:"right",right:"left",bottom:"top",top:"bottom"};function ss(e,t,r){return ts(e,es(t,r))}function as(e,t){return"function"==typeof e?e(t):e}function ls(e){return e.split("-")[0]}function cs(e){return e.split("-")[1]}function ds(e){return"x"===e?"y":"x"}function us(e){return"y"===e?"height":"width"}function hs(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function ps(e){return ds(hs(e))}function gs(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const fs=["left","right"],ms=["right","left"],vs=["top","bottom"],bs=["bottom","top"];function ys(e){const t=ls(e);return is[t]+e.slice(t.length)}function ws(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function xs(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function _s(e,t,r){let{reference:n,floating:o}=e;const i=hs(t),s=ps(t),a=us(s),l=ls(t),c="y"===i,d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,h=n[a]/2-o[a]/2;let p;switch(l){case"top":p={x:d,y:n.y-o.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:u};break;case"left":p={x:n.x-o.width,y:u};break;default:p={x:n.x,y:n.y}}switch(cs(t)){case"start":p[s]-=h*(r&&c?-1:1);break;case"end":p[s]+=h*(r&&c?-1:1)}return p}async function ks(e,t){var r;void 0===t&&(t={});const{x:n,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=as(t,e),g=ws(p),f=a[h?"floating"===u?"reference":"floating":u],m=xs(await i.getClippingRect({element:null==(r=await(null==i.isElement?void 0:i.isElement(f)))||r?f:f.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),v="floating"===u?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),y=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},w=xs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:b,strategy:l}):v);return{top:(m.top-w.top+g.top)/y.y,bottom:(w.bottom-m.bottom+g.bottom)/y.y,left:(m.left-w.left+g.left)/y.x,right:(w.right-m.right+g.right)/y.x}}function Cs(e){const t=es(...e.map(e=>e.left)),r=es(...e.map(e=>e.top));return{x:t,y:r,width:ts(...e.map(e=>e.right))-t,height:ts(...e.map(e=>e.bottom))-r}}function Ss(){return"undefined"!=typeof window}function Es(e){return Ts(e)?(e.nodeName||"").toLowerCase():"#document"}function Is(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function As(e){var t;return null==(t=(Ts(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Ts(e){return!!Ss()&&(e instanceof Node||e instanceof Is(e).Node)}function Os(e){return!!Ss()&&(e instanceof Element||e instanceof Is(e).Element)}function Ls(e){return!!Ss()&&(e instanceof HTMLElement||e instanceof Is(e).HTMLElement)}function $s(e){return!(!Ss()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Is(e).ShadowRoot)}function Ns(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=js(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&"inline"!==o&&"contents"!==o}function Rs(e){return/^(table|td|th)$/.test(Es(e))}function Ps(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const Ds=/transform|translate|scale|rotate|perspective|filter/,Ms=/paint|layout|strict|content/,zs=e=>!!e&&"none"!==e;let Fs;function Us(e){const t=Os(e)?js(e):e;return zs(t.transform)||zs(t.translate)||zs(t.scale)||zs(t.rotate)||zs(t.perspective)||!Bs()&&(zs(t.backdropFilter)||zs(t.filter))||Ds.test(t.willChange||"")||Ms.test(t.contain||"")}function Bs(){return null==Fs&&(Fs="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Fs}function Hs(e){return/^(html|body|#document)$/.test(Es(e))}function js(e){return Is(e).getComputedStyle(e)}function Vs(e){return Os(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ws(e){if("html"===Es(e))return e;const t=e.assignedSlot||e.parentNode||$s(e)&&e.host||As(e);return $s(t)?t.host:t}function Ks(e){const t=Ws(e);return Hs(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ls(t)&&Ns(t)?t:Ks(t)}function qs(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=Ks(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),s=Is(o);if(i){const e=Gs(s);
vendor: 5,949 bytes, line 179
179return t.concat(s,s.visualViewport||[],Ns(o)?o:[],e&&r?qs(e):[])}return t.concat(o,qs(o,[],r))}function Gs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zs(e){const t=js(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Ls(e),i=o?e.offsetWidth:r,s=o?e.offsetHeight:n,a=rs(r)!==i||rs(n)!==s;return a&&(r=i,n=s),{width:r,height:n,$:a}}function Ys(e){return Os(e)?e:e.contextElement}function Js(e){const t=Ys(e);if(!Ls(t))return os(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=Zs(t);let s=(i?rs(r.width):r.width)/n,a=(i?rs(r.height):r.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Qs=os(0);function Xs(e){const t=Is(e);return Bs()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Qs}function ea(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=Ys(e);let s=os(1);t&&(n?Os(n)&&(s=Js(n)):s=Js(e));const a=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==Is(e))&&t}(i,r,n)?Xs(i):os(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(i){const e=Is(i),t=n&&Os(n)?Is(n):n;let r=e,o=Gs(r);for(;o&&n&&t!==r;){const e=Js(o),t=o.getBoundingClientRect(),n=js(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=i,c+=s,r=Is(o),o=Gs(r)}}return xs({width:d,height:u,x:l,y:c})}function ta(e,t){const r=Vs(e).scrollLeft;return t?t.left+r:ea(As(e)).left+r}function ra(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-ta(e,r),y:r.top+t.scrollTop}}function na(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=Is(e),n=As(e),o=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=Bs();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}const c=ta(n);if(c<=0){const e=n.ownerDocument,t=e.body,r=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,s=Math.abs(n.clientWidth-t.clientWidth-o);s<=25&&(i-=s)}else c<=25&&(i+=c);return{width:i,height:s,x:a,y:l}}(e,r);else if("document"===t)n=function(e){const t=As(e),r=Vs(e),n=e.ownerDocument.body,o=ts(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=ts(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+ta(e);const a=-r.scrollTop;return"rtl"===js(n).direction&&(s+=ts(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}(As(e));else if(Os(t))n=function(e,t){const r=ea(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=Ls(e)?Js(e):os(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:n*i.y}}(t,r);else{const r=Xs(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return xs(n)}function oa(e,t){const r=Ws(e);return!(r===t||!Os(r)||Hs(r))&&("fixed"===js(r).position||oa(r,t))}function ia(e,t,r){const n=Ls(t),o=As(t),i="fixed"===r,s=ea(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=os(0);function c(){l.x=ta(o)}if(n||!n&&!i)if(("body"!==Es(t)||Ns(o))&&(a=Vs(t)),n){const e=ea(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!n&&o&&c();const d=!o||n||i?os(0):ra(o,a);return{x:s.left+a.scrollLeft-l.x-d.x,y:s.top+a.scrollTop-l.y-d.y,width:s.width,height:s.height}}function sa(e){return"static"===js(e).position}function aa(e,t){if(!Ls(e)||"fixed"===js(e).position)return null;if(t)return t(e);let r=e.offsetParent;return As(e)===r&&(r=r.ownerDocument.body),r}function la(e,t){const r=Is(e);if(Ps(e))return r;if(!Ls(e)){let t=Ws(e);for(;t&&!Hs(t);){if(Os(t)&&!sa(t))return t;t=Ws(t)}return r}let n=aa(e,t);for(;n&&Rs(n)&&sa(n);)n=aa(n,t);return n&&Hs(n)&&sa(n)&&!Us(n)?r:n||function(e){let t=Ws(e);for(;Ls(t)&&!Hs(t);){if(Us(t))return t;if(Ps(t))return null;t=Ws(t)}return null}(e)||r}const ca={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,s=As(n),a=!!t&&Ps(t.floating);if(n===s||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=os(1);const d=os(0),u=Ls(n);if((u||!u&&!i)&&(("body"!==Es(n)||Ns(s))&&(l=Vs(n)),u)){const e=ea(n);c=Js(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}const h=!s||u||i?os(0):ra(s,l);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:r.y*c.y-l.scrollTop*c.y+d.y+h.y}},getDocumentElement:As,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i="clippingAncestors"===r?Ps(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=qs(e,[],!1).filter(e=>Os(e)&&"body"!==Es(e)),o=null;const i="fixed"===js(e).position;let s=i?Ws(e):e;for(;Os(s)&&!Hs(s);){const t=js(s),r=Us(s);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||Ns(s)&&!r&&oa(e,s))?n=n.filter(e=>e!==s):o=t,s=Ws(s)}return t.set(e,n),n}(t,this._c):[].concat(r),s=[...i,n],a=na(t,s[0],o);let l=a.top,c=a.right,d=a.bottom,u=a.left;for(let e=1;e<s.length;e++){const r=na(t,s[e],o);l=ts(r.top,l),c=es(r.right,c),d=es(r.bottom,d),u=ts(r.left,u)}return{width:c-u,height:d-l,x:u,y:l}},getOffsetParent:la,getElementRects:async function(e){const t=this.getOffsetParent||la,r=this.getDimensions,n=await r(e.floating);return{reference:ia(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=Zs(e);return{width:t,height:r}},getScale:Js,isElement:Os,isRTL:function(e){return"rtl"===js(e).direction}};function da(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ua(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,c=Ys(e),d=o||i?[...c?qs(c):[],...t?qs(t):[]]:[];
vendor: 6,160 bytes, line 179
179d.forEach(e=>{o&&e.addEventListener("scroll",r,{passive:!0}),i&&e.addEventListener("resize",r)});const u=c&&a?function(e,t){let r,n=null;const o=As(e);function i(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:u,width:h,height:p}=c;if(a||t(),!h||!p)return;const g={rootMargin:-ns(u)+"px "+-ns(o.clientWidth-(d+h))+"px "+-ns(o.clientHeight-(u+p))+"px "+-ns(d)+"px",threshold:ts(0,es(1,l))||1};let f=!0;function m(t){const n=t[0].intersectionRatio;if(n!==l){if(!f)return s();n?s(!1,n):r=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==n||da(c,e.getBoundingClientRect())||s(),f=!1}try{n=new IntersectionObserver(m,{...g,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(m,g)}n.observe(e)}(!0),i}(c,r):null;let h,p=-1,g=null;s&&(g=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&g&&t&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),r()}),c&&!l&&g.observe(c),t&&g.observe(t));let f=l?ea(e):null;return l&&function t(){const n=ea(e);f&&!da(f,n)&&r(),f=n,h=requestAnimationFrame(t)}(),r(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",r),i&&e.removeEventListener("resize",r)}),null==u||u(),null==(e=g)||e.disconnect(),g=null,l&&cancelAnimationFrame(h)}}const ha=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...c}=as(e,t),d={x:r,y:n},u=await i.detectOverflow(t,c),h=hs(ls(o)),p=ds(h);let g=d[p],f=d[h];if(s){const e="y"===p?"bottom":"right";g=ss(g+u["y"===p?"top":"left"],g,g-u[e])}if(a){const e="y"===h?"bottom":"right";f=ss(f+u["y"===h?"top":"left"],f,f-u[e])}const m=l.fn({...t,[p]:g,[h]:f});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[p]:s,[h]:a}}}}}},pa=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:f=!0,...m}=as(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const v=ls(o),b=hs(a),y=ls(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=h||(y||!f?[ys(a)]:function(e){const t=ys(e);return[gs(e),t,gs(t)]}(a)),_="none"!==g;!h&&_&&x.push(...function(e,t,r,n){const o=cs(e);let i=function(e,t,r){switch(e){case"top":case"bottom":return r?t?ms:fs:t?fs:ms;case"left":case"right":return t?vs:bs;default:return[]}}(ls(e),"start"===r,n);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(gs)))),i}(a,f,g,w));const k=[a,...x],C=await l.detectOverflow(t,m),S=[];let E=(null==(n=i.flip)?void 0:n.overflows)||[];if(d&&S.push(C[v]),u){const e=function(e,t,r){void 0===r&&(r=!1);const n=cs(e),o=ps(e),i=us(o);let s="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ys(s)),[s,ys(s)]}(o,s,w);S.push(C[e[0]],C[e[1]])}if(E=[...E,{placement:o,overflows:S}],!S.every(e=>e<=0)){var I,A;const e=((null==(I=i.flip)?void 0:I.index)||0)+1,t=k[e];if(t&&("alignment"!==u||b===hs(t)||E.every(e=>hs(e.placement)!==b||e.overflows[0]>0)))return{data:{index:e,overflows:E},reset:{placement:t}};let r=null==(A=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:A.placement;if(!r)switch(p){case"bestFit":{var T;const e=null==(T=E.filter(e=>{if(_){const t=hs(e.placement);return t===b||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:T[0];e&&(r=e);break}case"initialPlacement":r=a}if(o!==r)return{reset:{placement:r}}}return{}}}},ga=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=as(e,t)||{};if(null==c)return{};const u=ws(d),h={x:r,y:n},p=ps(o),g=us(p),f=await s.getDimensions(c),m="y"===p,v=m?"top":"left",b=m?"bottom":"right",y=m?"clientHeight":"clientWidth",w=i.reference[g]+i.reference[p]-h[p]-i.floating[g],x=h[p]-i.reference[p],_=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let k=_?_[y]:0;k&&await(null==s.isElement?void 0:s.isElement(_))||(k=a.floating[y]||i.floating[g]);const C=w/2-x/2,S=k/2-f[g]/2-1,E=es(u[v],S),I=es(u[b],S),A=E,T=k-f[g]-I,O=k/2-f[g]/2+C,L=ss(A,O,T),$=!l.arrow&&null!=cs(o)&&O!==L&&i.reference[g]/2-(O<A?E:I)-f[g]/2<0,N=$?O<A?O-A:O-T:0;return{[p]:h[p]+N,data:{[p]:L,centerOffset:O-L-N,...$&&{alignmentOffset:N}},reset:$}}}),fa=(e,t,r)=>{const n=new Map,o={platform:ca,...r},i={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:ks},l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=_s(c,n,l),h=n,p=0;const g={};for(let r=0;r<i.length;r++){const f=i[r];if(!f)continue;const{name:m,fn:v}=f,{x:b,y:y,data:w,reset:x}=await v({x:d,y:u,initialPlacement:n,placement:h,strategy:o,middlewareData:g,rects:c,platform:a,elements:{reference:e,floating:t}});d=null!=b?b:d,u=null!=y?y:u,g[m]={...g[m],...w},x&&p<50&&(p++,"object"==typeof x&&(x.placement&&(h=x.placement),x.rects&&(c=!0===x.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):x.rects),({x:d,y:u}=_s(c,h,l))),r=-1)}return{x:d,y:u,placement:h,strategy:o,middlewareData:g}})(e,t,{...o,platform:i})};function ma(e,t){if(e&&t)return parseInt(e.getPropertyValue(t).substring(0,e.getPropertyValue(t).length-2),10)}function va(e){if(!e.includes("center"))return e;const[t]=e.split("-");return t}function ba(e,t,r,n){return new Promise(o=>{const i=ya(e.position),s=r.getBoundingClientRect();requestAnimationFrame(()=>{if(!e.isConnected)return void o(()=>{});const a=[(void 0===l&&(l={}),{name:"inline",options:l,async fn(e){const{placement:t,elements:r,rects:n,platform:o,strategy:i}=e,{padding:s=2,x:a,y:c}=as(l,e),d=Array.from(await(null==o.getClientRects?void 0:o.getClientRects(r.reference))||[]),u=function(e){const t=e.slice().sort((e,t)=>
179e.y-t.y),r=[];let n=null;for(let e=0;e<t.length;e++){const o=t[e];!n||o.y-n.y>n.height/2?r.push([o]):r[r.length-1].push(o),n=o}return r.map(e=>xs(Cs(e)))}(d),h=xs(Cs(d)),p=ws(s),g=await o.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=a&&null!=c)return u.find(e=>a>e.left-p.left&&a<e.right+p.right&&c>e.top-p.top&&c<e.bottom+p.bottom)||h;if(u.length>=2){if("y"===hs(t)){const e=u[0],r=u[u.length-1],n="top"===ls(t),o=e.top,i=r.bottom,s=n?e.left:r.left,a=n?e.right:r.right;return{top:o,bottom:i,left:s,right:a,width:a-s,height:i-o,x:s,y:o}}const e="left"===ls(t),r=ts(...u.map(e=>e.right)),n=es(...u.map(e=>e.left)),o=u.filter(t=>e?t.left===n:t.right===r),i=o[0].top,s=o[o.length-1].bottom;return{top:i,bottom:s,left:n,right:r,width:r-n,height:s-i,x:n,y:i}}return h}},floating:r.floating,strategy:i});return n.reference.x!==g.reference.x||n.reference.y!==g.reference.y||n.reference.width!==g.reference.width||n.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}),pa({fallbackPlacements:i}),ha({padding:8}),...n?[ga({element:n,padding:5})]:[]];var l;a.push((e=>{let t;return{name:"reactToPlacementChange",fn({x:r,y:n,initialPlacement:o,placement:i}){if(o!==i||i!==t){const t=function(e){return e.includes("-")?e:`${e}-center`}(i);e.setAttribute("data-rendered-position",t),e.$emit("position-changed")}return t=i,{x:r,y:n}}}})(e));const c=function(e,t){if(ma(getComputedStyle(t),"height")<=30&&(e.includes("left")||e.includes("right"))){const[t]=e.split("-");return`${t}-center`}return e}(e.position,t);c!==e.position&&(t.setAttribute("data-single-line","true"),t.setAttribute("data-rendered-position",c));const d=t.getBoundingClientRect();if(t.style.setProperty("--content-height",`${d.height}px`),t.style.setProperty("--content-width",`${d.width}px`),d.width>=300&&!t.hasAttribute("large"))return t.setAttribute("large",""),void ba(e,t,r,n).then(e=>o(e));t.style.setProperty("--trigger-width",`${s.width}px`),t.style.setProperty("--trigger-height",`${s.height}px`),e.zIndex&&t.style.setProperty("--z-index",`${e.zIndex}`);const u=getComputedStyle(t),h=parseFloat(u.getPropertyValue("--element-padding"))||10,p=parseFloat(u.getPropertyValue("--arrow-size"))||10,g=ua(r,t,()=>{fa(r,t,{placement:va(c),strategy:"fixed",middleware:a}).then(({x:r,y:o,placement:i,middlewareData:s})=>{const a=e.style.getPropertyValue("--additional-offset-x"),l=e.style.getPropertyValue("--additional-offset-y");if(a?t.style.setProperty("--trigger-x",`calc(${r}px + ${a})`):t.style.setProperty("--trigger-x",`${r}px`),l?t.style.setProperty("--trigger-y",`calc(${o}px + ${l})`):t.style.setProperty("--trigger-y",`${o}px`),n&&s.arrow){const{x:e,y:r}=s.arrow,[o,a]=i.split("-"),l="top"===o||"bottom"===o,c=l?e:r,d=l?"--arrow-offset-x":"--arrow-offset-y",u=l?"--arrow-offset-y":"--arrow-offset-x";if(null==c)return;n.style.removeProperty(u);let g=c;if("start"===a||"end"===a){const e="start"===a?h:-h;if(g=c+e,l){const r=(parseFloat(t.style.getPropertyValue("--content-width"))||0)/2-p/2;g=e>0?Math.min(r,g):Math.max(r,g)}else{const r=(parseFloat(t.style.getPropertyValue("--content-height"))||0)/2-p/2;g=e>0?Math.min(r,g):Math.max(r,g)}}n.style.setProperty(d,`${g}px`)}})});o(g)})})}function ya(e){const t={top:"bottom",bottom:"top",left:"right",right:"left"},[r,n]=e.split("-"),o=[`${r}`,`${r}-start`,`${r}-end`].filter(t=>t!==e),i=[`${t[r]}-${n}`,`${t[r]}`,`${t[r]}-${{end:"start",start:"end",center:"center"}[n]}`],s=["bottom","bottom-start","bottom-end","top","top-start","top-end","right","right-start","right-end","left","left-start","left-end"].filter(e=>!o.includes(e)||!i.includes(e));return[...o,...i,...s]}let wa=0;function xa(e=""){return`${e}${wa++}`}const _a=ri`
180  <template popover="${e=>e.popover}" role="tooltip">
181    <div ${li("contentEl")} class="content">
182      <div class="title"><slot name="title"></slot></div>
183      <div class="body"><slot></slot></div>
184    </div>
185    <div ${li("arrowEl")} class="arrow"></div>
186  </template>
187`;class ka extends(s(Jn)){}class Ca extends ka{constructor(){super(...arguments),this.position="bottom-center",this.inverted=!0,this.minWidth=30,this.maxWidth=224,this.triggerOn="mouseover",this.delay=400,this.hidden=!1,this.popover="manual",this.triggerId="",this.unsubscribeFn=()=>{},this.isOpen=!1,this.isNativePopoverVersion=!0,this.triggerEl=null,this.lastMousePosition=null,this.selectionKeepsOpen=!1,this.handleTriggerMouseover=e=>{if(!this.triggerEl)return;this.lastMousePosition={x:e.clientX,y:e.clientY};const t=e.composedPath(),r=t.indexOf(this.triggerEl);
187if(-1===r)return void(this.isOpen=!0);const n=t.slice(0,r).some(e=>e instanceof HTMLDialogElement&&e.open);n||(this.isOpen=!0)},this.handleTriggerMouseleave=()=>{this.isTriggerActive()||"true"!==this.dataset.displayed&&(this.isOpen=!1)},this.handleTriggerFocus=e=>{this.isOpen=!0},this.handleTriggerBlur=()=>{"true"===this.dataset.displayed&&this.isMouseOverTrigger()||(this.isOpen=!1)},this.handleTriggerKeydown=e=>{"Escape"===e.key&&this.isOpen&&(this.isOpen=!1)},this.handleDocumentMousemove=e=>{const t=e.clientX,r=e.clientY;this.lastMousePosition={x:t,y:r},this.checkMousePositionAndClose(t,r)},this.handleDocumentScroll=()=>{if(this.triggerEl&&this.isTriggerElementVisible()){if(this.lastMousePosition){const{x:e,y:t}=this.lastMousePosition;this.checkMousePositionAndClose(e,t)}}else this.isOpen=!1}}triggerIdChanged(e,t){this.unsubscribeFn?.(),this.cancelPendingTriggerObservation?.(),this.cancelPendingTriggerObservation=void 0,t&&""!==t&&Tr.queueUpdate(()=>{this.isConnected&&this.configureTriggerElement(t)})}configureTriggerElement(e){if(this.cancelPendingTriggerObservation?.(),this.cancelPendingTriggerObservation=void 0,this.triggerEl=Qi(e,this),!this.triggerEl)return void(this.cancelPendingTriggerObservation=Xi(e,this,()=>{this.configureTriggerElement(e)}));this.triggerEl.addEventListener("mouseover",this.handleTriggerMouseover),this.triggerEl.addEventListener("mouseleave",this.handleTriggerMouseleave),this.triggerEl.addEventListener("focus",this.handleTriggerFocus),this.triggerEl.addEventListener("blur",this.handleTriggerBlur),this.triggerEl.addEventListener("keydown",this.handleTriggerKeydown);const t=this.triggerEl.getAttribute("aria-describedby"),r=t?t.split(/\s+/).filter(Boolean):[];r.includes(this.id)||r.push(this.id),this.triggerEl.setAttribute("aria-describedby",r.join(" "));const n=this.triggerEl,o=this.id;this.unsubscribeFn=()=>{n.removeEventListener("mouseover",this.handleTriggerMouseover),n.removeEventListener("mouseleave",this.handleTriggerMouseleave),n.removeEventListener("focus",this.handleTriggerFocus),n.removeEventListener("blur",this.handleTriggerBlur),n.removeEventListener("keydown",this.handleTriggerKeydown);const e=n.getAttribute("aria-describedby");if(e){const t=e.split(/\s+/).filter(e=>e&&e!==o).join(" ");t?n.setAttribute("aria-describedby",t):n.removeAttribute("aria-describedby")}}}isOpenChanged(e,t){this.$fastController.isConnected&&!this.hidden&&this.triggerEl&&(t&&this.hidden&&(this.isOpen=!1),t?this.delay?this.timeoutId=setTimeout(()=>{this.openTooltip()},this.delay):this.openTooltip():this.closeTooltip())}widthChanged(e,t){this.isConnected&&t>30&&(this.style.setProperty("--tooltip-width",`${t.toString()}px`),"true"===this.dataset.displayed&&this.positionTooltip())}maxWidthChanged(e,t){this.isConnected&&t&&(this.style.setProperty("--tooltip-max-width",`${t.toString()}px`),"true"===this.dataset.displayed&&this.positionTooltip())}minWidthChanged(e,t){this.isConnected&&t&&(this.style.setProperty("--tooltip-min-width",`${t.toString()}px`),"true"===this.dataset.displayed&&this.positionTooltip())}zIndexChanged(e,t){this.isConnected&&void 0!==t&&this.style.setProperty("--tooltip-z-index",t.toString())}connectedCallback(){super.connectedCallback(),this.id||(this.id=xa("tooltip-")),this.isNativePopoverSupported()||this.setAttribute("data-not-native","true"),!this.triggerEl&&this.triggerId&&this.configureTriggerElement(this.triggerId),224!==this.maxWidth&&this.style.setProperty("--tooltip-max-width",`${this.maxWidth.toString()}px`),30!==this.minWidth&&this.style.setProperty("--tooltip-min-width",`${this.minWidth.toString()}px`),void 0!==this.width&&this.width>30&&this.style.setProperty("--tooltip-width",`${this.width.toString()}px`),void 0!==this.zIndex&&this.style.setProperty("--tooltip-z-index",this.zIndex.toString())}disconnectedCallback(){super.disconnectedCallback(),this.cleanupFn?.(),this.unsubscribeFn(),this.cancelPendingTriggerObservation?.(),this.cancelPendingTriggerObservation=void 0,this.triggerEl=null,document.removeEventListener("mousemove",this.handleDocumentMousemove),document.removeEventListener("scroll",this.handleDocumentScroll,!0)}isMouseOverTrigger(){return!(!this.triggerEl||!this.lastMousePosition)&&Ki(this.triggerEl.getBoundingClientRect(),this.lastMousePosition)}isTriggerActive(){if(!this.triggerEl)return!1;if(this.ownerDocument.activeElement===this.triggerEl)return!0;
187if(!this.selectionKeepsOpen)return!1;const e=this.ownerDocument.getSelection();return!(!e?.anchorNode||!this.triggerEl.contains(e.anchorNode))}checkMousePositionAndClose(e,t){if(this.isTriggerActive())return;const r=this.dataset.renderedPosition??this.position,n=r?.split("-")[0],o=ma(this.style,"--additional-offset-x")??0,i=ma(this.style,"--additional-offset-y")??0,s=Number.isNaN(o)?0:o,a=Number.isNaN(i)?0:i,l="top"===n||"bottom"===n?20+a:20+s;if(!this.triggerEl)return;const c=((e,t,r)=>{const n={bottom:e.bottom,left:e.left,right:e.right,width:e.width,x:e.x,y:e.y,top:e.top,height:e.height};switch(r){case"top":return{...n,left:e.left-2,width:e.width+2,top:e.top-t,height:e.height+t};case"bottom":return{...n,left:e.left-2,width:e.width+2,bottom:e.bottom+t,height:e.height+t};case"left":return{...n,left:e.left-t,width:e.width+t};case"right":return{...n,left:e.left-2,right:e.right+t,width:e.width+t+2};default:return{...n,top:e.top-t,left:e.left-t,width:e.width+2*t,height:e.height+2*t}}})(this.triggerEl.getBoundingClientRect(),l,n);Ki(c,{x:e,y:t})||Ki(this.contentEl.getBoundingClientRect(),{x:e,y:t})||(this.isOpen=!1)}isTriggerElementVisible(){if(!this.triggerEl)return!1;const e=this.triggerEl.getBoundingClientRect(),t=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;return e.top>=0&&e.left>=0&&e.bottom<=t&&e.right<=r}openTooltip(){this.isConnected&&(this.isNativePopoverSupported()&&this.togglePopover(),this.positionTooltip(),document.addEventListener("mousemove",this.handleDocumentMousemove),document.addEventListener("scroll",this.handleDocumentScroll,!0),this.setAttribute("data-displayed","true"))}closeTooltip(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=void 0),this.cleanupFn?.(),this.isConnected&&this.isNativePopoverSupported()&&this.hidePopover(),document.removeEventListener("mousemove",this.handleDocumentMousemove),document.removeEventListener("scroll",this.handleDocumentScroll,!0),this.lastMousePosition=null,this.removeAttribute("data-displayed")}isNativePopoverSupported(){return"showPopover"in this}positionTooltip(){this.cleanupFn?.(),this.triggerEl&&ba(this,this,this.triggerEl,this.arrowEl).then(e=>{this.isConnected?this.cleanupFn=e:e?.()})}}h([Qr()],Ca.prototype,"position",void 0),h([Qr({mode:"boolean"})],Ca.prototype,"inverted",void 0),h([Qr({converter:Yr})],Ca.prototype,"width",void 0),h([Qr({attribute:"min-width",converter:Yr})],Ca.prototype,"minWidth",void 0),h([Qr({attribute:"max-width",converter:Yr})],Ca.prototype,"maxWidth",void 0),h([Qr({attribute:"trigger-on"})],Ca.prototype,"triggerOn",void 0),h([Qr({attribute:"z-index",converter:Yr})],Ca.prototype,"zIndex",void 0),h([Qr({converter:Yr})],Ca.prototype,"delay",void 0),h([Qr({mode:"boolean"})],Ca.prototype,"hidden",void 0),h([Qr({attribute:"popover"})],Ca.prototype,"popover",void 0),h([Qr({attribute:"trigger-id"})],Ca.prototype,"triggerId",void 0),h([Qr({mode:"boolean",attribute:"is-open"})],Ca.prototype,"isOpen",void 0),h([Nr],Ca.prototype,"contentEl",void 0),h([Nr],Ca.prototype,"arrowEl",void 0);const Sa=e=>"function"==typeof e,Ea=()=>null;function Ia(e){return void 0===e?Ea:Sa(e)?e:()=>e}function Aa(e,t,r){const n=Sa(e)?e:()=>e,o=Ia(t),i=Ia(r);return(e,t)=>n(e,t)?o(e,t):i(e,t)}var Ta=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Oa=Ta.join(","),La="undefined"==typeof Element,$a=La?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Na=!La&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Ra=function(e,t){var r;void 0===t&&(t=!0);var n=null==e||null===(r=e.getAttribute)||void 0===r?void 0:r.call(e,"inert");return""===n||"true"===n||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):Ra(e.parentNode))},Pa=function(e,t,r){if(Ra(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(Oa));return t&&$a.call(e,Oa)&&n.unshift(e),n.filter(r)},Da=function(e,t,r){for(var n=[],o=Array.from(e);o.length;){var i=o.shift();if(!Ra(i,!1))if("SLOT"===i.tagName){var s=i.assignedElements(),a=s.length?s:i.children,l=Da(a,!0,r);r.flatten?n.push.apply(n,l):n.push({scopeParent:i,candidates:l})}else{$a.call(i,Oa)&&r.filter(i)&&(t||!e.includes(i))&&n.push(i);var c=i.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(i),d=!Ra(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(c&&d){var u=Da(!0===c?i.children:c.children,!0,r);r.flatten?n.push.apply(n,u):n.push({scopeParent:i,candidates:u})}else o.unshift.apply(o,i.children)}}return n},Ma=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},za=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,r=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===r||"true"===r}(e))&&!Ma(e)?0:e.tabIndex},Fa=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ua=function(e){return"INPUT"===e.tagName},Ba=function(e){var t=e.getBoundingClientRect(),r=t.width,n=t.height;return 0===r&&0===n},Ha=function(e,t){return!(t.disabled||function(e){return Ua(e)&&"hidden"===e.type}(t)||function(e,t){var r=t.displayCheck,n=t.getShadowRoot;if("full-native"===r&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var o=$a.call(e,"details>summary:first-of-type")?e.parentElement:e;if($a.call(o,"details:not([open]) *"))return!0;
187if(r&&"full"!==r&&"full-native"!==r&&"legacy-full"!==r){if("non-zero-area"===r)return Ba(e)}else{if("function"==typeof n){for(var i=e;e;){var s=e.parentElement,a=Na(e);if(s&&!s.shadowRoot&&!0===n(s))return Ba(e);e=e.assignedSlot?e.assignedSlot:s||a===e.ownerDocument?s:a.host}e=i}if(function(e){var t,r,n,o,i=e&&Na(e),s=null===(t=i)||void 0===t?void 0:t.host,a=!1;if(i&&i!==e)for(a=!!(null!==(r=s)&&void 0!==r&&null!==(n=r.ownerDocument)&&void 0!==n&&n.contains(s)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!a&&s;){var l,c,d;a=!(null===(c=s=null===(l=i=Na(s))||void 0===l?void 0:l.host)||void 0===c||null===(d=c.ownerDocument)||void 0===d||!d.contains(s))}return a}(e))return!e.getClientRects().length;if("legacy-full"!==r)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var r=0;r<t.children.length;r++){var n=t.children.item(r);if("LEGEND"===n.tagName)return!!$a.call(t,"fieldset[disabled] *")||!n.contains(e)}return!0}t=t.parentElement}return!1}(t))},ja=function(e,t){return!(function(e){return function(e){return Ua(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,r=e.form||Na(e),n=function(e){return r.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=n(window.CSS.escape(e.name));else try{t=n(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]}(t,e.form);return!o||o===e}(e)}(t)||za(t)<0||!Ha(e,t))},Va=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Wa=function(e){var t=[],r=[];return e.forEach(function(e,n){var o=!!e.scopeParent,i=o?e.scopeParent:e,s=function(e,t){var r=za(e);return r<0&&t&&!Ma(e)?0:r}(i,o),a=o?Wa(e.candidates):i;0===s?o?t.push.apply(t,a):t.push(i):r.push({documentOrder:n,tabIndex:s,item:e,isScope:o,content:a})}),r.sort(Fa).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},Ka=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==$a.call(e,Oa)&&ja(t,e)},qa=Ta.concat("iframe:not([inert]):not([inert] *)").join(","),Ga=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==$a.call(e,qa)&&Ha(t,e)};function Za(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Ya(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ja(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Qa(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ja(Object(r),!0).forEach(function(t){Ya(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ja(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Xa=function(e){return"Tab"===(null==e?void 0:e.key)||9===(null==e?void 0:e.keyCode)},el=function(e){return Xa(e)&&!e.shiftKey},tl=function(e){return Xa(e)&&e.shiftKey},rl=function(e){return setTimeout(e,0)},nl=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return"function"==typeof e?e.apply(void 0,r):e},ol=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},il=[],sl=function(e,t){var r,n=(null==t?void 0:t.document)||document,o=(null==t?void 0:t.trapStack)||il,i=
187Qa({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:el,isKeyBackward:tl},t),s={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},a=function(e,t,r){return e&&void 0!==e[t]?e[t]:i[r||t]},l=function(e,t){var r="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return s.containerGroups.findIndex(function(t){var n=t.container,o=t.tabbableNodes;return n.contains(e)||(null==r?void 0:r.includes(n))||o.find(function(t){return t===e})})},c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.hasFallback,o=void 0!==r&&r,s=t.params,a=void 0===s?[]:s,l=i[e];if("function"==typeof l&&(l=l.apply(void 0,function(e){return function(e){if(Array.isArray(e))return Za(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Za(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Za(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(a))),!0===l&&(l=void 0),!l){if(void 0===l||!1===l)return l;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var c=l;if("string"==typeof l){try{c=n.querySelector(l)}catch(t){throw new Error("`".concat(e,'` appears to be an invalid selector; error="').concat(t.message,'"'))}if(!c&&!o)throw new Error("`".concat(e,"` as selector refers to no known node"))}return c},d=function(){var e=c("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!Ga(e,i.tabbableOptions))if(l(n.activeElement)>=0)e=n.activeElement;else{var t=s.tabbableGroups[0];e=t&&t.firstTabbableNode||c("fallbackFocus")}else null===e&&(e=c("fallbackFocus"));if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},u=function(){if(s.containerGroups=s.containers.map(function(e){var t=function(e,t){var r;return r=(t=t||{}).getShadowRoot?Da([e],t.includeContainer,{filter:ja.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Va}):Pa(e,t.includeContainer,ja.bind(null,t)),Wa(r)}(e,i.tabbableOptions),r=function(e,t){return(t=t||{}).getShadowRoot?Da([e],t.includeContainer,{filter:Ha.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):Pa(e,t.includeContainer,Ha.bind(null,t))}(e,i.tabbableOptions),n=t.length>0?t[0]:void 0,o=t.length>0?t[t.length-1]:void 0,s=r.find(function(e){return Ka(e)}),a=r.slice().reverse().find(function(e){return Ka(e)}),l=!!t.find(function(e){return za(e)>0});return{container:e,tabbableNodes:t,focusableNodes:r,posTabIndexesFound:l,firstTabbableNode:n,lastTabbableNode:o,firstDomTabbableNode:s,lastDomTabbableNode:a,nextTabbableNode:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=t.indexOf(e);return o<0?n?r.slice(r.indexOf(e)+1).find(function(e){return Ka(e)}):r.slice(0,r.indexOf(e)).reverse().find(function(e){return Ka(e)}):t[o+(n?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(e){return e.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find(function(e){return e.posTabIndexesFound})&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},h=function(e){var t=e.activeElement;if(t)return t.shadowRoot&&null!==t.shadowRoot.activeElement?h(t.shadowRoot):t},p=function(e){!1!==e&&e!==h(document)&&(e&&e.focus?(e.focus({preventScroll:!!i.preventScroll}),s.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):p(d()))},g=function(e){var t=c("setReturnFocus",{params:[e]});return t||!1!==t&&e},f=function(e){var t=e.target,r=e.event,n=e.isBackward,o=void 0!==n&&n;t=t||ol(r),u();var a=null;if(s.tabbableGroups.length>0){var d=l(t,r),h=d>=0?s.containerGroups[d]:void 0;if(d<0)a=o?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(o){var p=s.tabbableGroups.findIndex(function(e){var r=e.firstTabbableNode;return t===r});if(p<0&&(h.container===t||Ga(t,i.tabbableOptions)&&!Ka(t,i.tabbableOptions)&&!h.nextTabbableNode(t,!1))&&(p=d),p>=0){var g=0===p?s.tabbableGroups.length-1:p-1,f=s.tabbableGroups[g];a=za(t)>=0?f.lastTabbableNode:f.lastDomTabbableNode}else Xa(r)||(a=h.nextTabbableNode(t,!1))}else{var m=s.tabbableGroups.findIndex(function(e){var r=e.lastTabbableNode;return t===r});if(m<0&&(h.container===t||Ga(t,i.tabbableOptions)&&!Ka(t,i.tabbableOptions)&&!h.nextTabbableNode(t))&&(m=d),m>=0){var v=m===s.tabbableGroups.length-1?0:m+1,b=s.tabbableGroups[v];a=za(t)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else Xa(r)||(a=h.nextTabbableNode(t))}}else a=c("fallbackFocus");return a},m=function(e){var t=ol(e);l(t,e)>=0||(nl(i.clickOutsideDeactivates,e)?r.deactivate({returnFocus:i.returnFocusOnDeactivate}):nl(i.allowOutsideClick,e)||e.preventDefault())},v=function(e){var t=ol(e),r=l(t,e)>=0;if(r||t instanceof Document)r&&(s.mostRecentlyFocusedNode=t);else{var n;e.stopImmediatePropagation();var o=!0;if(s.mostRecentlyFocusedNode)if(za(s.mostRecentlyFocusedNode)>0){var a=l(s.mostRecentlyFocusedNode),c=s.containerGroups[a].tabbableNodes;if(c.length>0){var u=c.findIndex(function(e){return e===s.mostRecentlyFocusedNode});u>=0&&(i.isKeyForward(s.recentNavEvent)?u+1<c.length&&(n=c[u+1],o=!1):u-1>=0&&(n=c[u-1],o=!1))}}else s.containerGroups.some(function(e){return e.tabbableNodes.some(function(e){return za(e)>0})})||(o=!1);else o=!1;o&&(n=f({target:s.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(s.recentNavEvent)})),p(n||s.mostRecentlyFocusedNode||d())}s.recentNavEvent=void 0},b=function(e){(i.isKeyForward(e)||i.isKeyBackward(e))&&function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];s.recentNavEvent=e;var r=f({event:e,isBackward:t});r&&(Xa(e)&&e.preventDefault(),p(r))}(e,i.isKeyBackward(e))},y=function(e){(function(e){return"Escape"===(null==e?void 0:e.key)||"Esc"===(null==e?void 0:e.key)||27===(null==e?void 0:e.keyCode)}
187)(e)&&!1!==nl(i.escapeDeactivates,e)&&(e.preventDefault(),r.deactivate())},w=function(e){var t=ol(e);l(t,e)>=0||nl(i.clickOutsideDeactivates,e)||nl(i.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},x=function(){if(s.active)return function(e,t){if(e.length>0){var r=e[e.length-1];r!==t&&r._setPausedState(!0)}var n=e.indexOf(t);-1===n||e.splice(n,1),e.push(t)}(o,r),s.delayInitialFocusTimer=i.delayInitialFocus?rl(function(){p(d())}):p(d()),n.addEventListener("focusin",v,!0),n.addEventListener("mousedown",m,{capture:!0,passive:!1}),n.addEventListener("touchstart",m,{capture:!0,passive:!1}),n.addEventListener("click",w,{capture:!0,passive:!1}),n.addEventListener("keydown",b,{capture:!0,passive:!1}),n.addEventListener("keydown",y),r},_=function(){if(s.active)return n.removeEventListener("focusin",v,!0),n.removeEventListener("mousedown",m,!0),n.removeEventListener("touchstart",m,!0),n.removeEventListener("click",w,!0),n.removeEventListener("keydown",b,!0),n.removeEventListener("keydown",y),r},k="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver(function(e){var t=e.some(function(e){return Array.from(e.removedNodes).some(function(e){return e===s.mostRecentlyFocusedNode})});t&&p(d())}):void 0,C=function(){k&&(k.disconnect(),s.active&&!s.paused&&s.containers.map(function(e){k.observe(e,{subtree:!0,childList:!0})}))};return r={get active(){return s.active},get paused(){return s.paused},activate:function(e){if(s.active)return this;var t=a(e,"onActivate"),r=a(e,"onPostActivate"),o=a(e,"checkCanFocusTrap");o||u(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=n.activeElement,null==t||t();var i=function(){o&&u(),x(),C(),null==r||r()};return o?(o(s.containers.concat()).then(i,i),this):(i(),this)},deactivate:function(e){if(!s.active)return this;var t=Qa({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},e);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,_(),s.active=!1,s.paused=!1,C(),function(e,t){var r=e.indexOf(t);-1!==r&&e.splice(r,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)}(o,r);var n=a(t,"onDeactivate"),l=a(t,"onPostDeactivate"),c=a(t,"checkCanReturnFocus"),d=a(t,"returnFocus","returnFocusOnDeactivate");null==n||n();var u=function(){rl(function(){d&&p(g(s.nodeFocusedBeforeActivation)),null==l||l()})};return d&&c?(c(g(s.nodeFocusedBeforeActivation)).then(u,u),this):(u(),this)},pause:function(e){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,e)):this},unpause:function(e){return s.active?(s.manuallyPaused=!1,o[o.length-1]!==this?this:this._setPausedState(!1,e)):this}
187,updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return s.containers=t.map(function(e){return"string"==typeof e?n.querySelector(e):e}),s.active&&u(),C(),this}},Object.defineProperties(r,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(e,t){if(s.paused===e)return this;if(s.paused=e,e){var r=a(t,"onPause"),n=a(t,"onPostPause");null==r||r(),_(),C(),null==n||n()}else{var o=a(t,"onUnpause"),i=a(t,"onPostUnpause");null==o||o(),u(),x(),C(),null==i||i()}return this}}}),r.updateContainerElements(e),r};const al=["chameleon-button","chameleon-round-button","chameleon-icon-button","chameleon-internal-navigation-rail-item","button"];class ll extends(a(Jn,"popover")){isOpenChanged(e,t){this.$fastController.isConnected&&!this.hidden&&this.triggerEl&&(t?this.openPopover():this.closePopover())}triggerIdChanged(e,t){Tr.queueUpdate(()=>{this.isConnected&&this.configureTriggerElement(t||"")})}widthChanged(e,t){const r="number"==typeof t?t:Number(t);if(Number.isNaN(r))this.style.setProperty("--popover-width",t);else{if(r<=56)return;this.style.setProperty("--popover-width",`${r}px`)}this.isConnected&&this.positionPopover()}maxWidthChanged(e,t){t&&(this.style.setProperty("--popover-max-width",`${t}px`),this.isConnected&&this.positionPopover())}minWidthChanged(e,t){t&&(this.style.setProperty("--popover-min-width",`${t}px`),this.isConnected&&this.positionPopover())}triggerElementChanged(e,t){if(this.isConnected)if(t)this.applyTriggerElement(t);else{if(this.triggerId){const e=this.getRootNode(),t=Qi(this.triggerId,e);if(t instanceof HTMLElement)return void this.applyTriggerElement(t)}this.applyTriggerElement(null)}}get anchor(){return this.anchorElement??this.triggerEl}get ariaHasPopupValue(){return this.menu?"menu":"dialog"}constructor(){super(),this.position="bottom-center",this.popoverMode=void 0,this.compact=!1,this.inverted=!1,this.hidden=!1,this.arrow=!1,this.menu=!1,this.triggerOn="click",this.isOpen=!1,this.triggerId="",this.isDialogVersion=!0,this.isTooltip=!1,this.delay=void 0,this.triggerEl=null,this.contentElId=xa("popover-content-"),this.handleMenuItemClick=e=>{!e.defaultPrevented&&this.menu&&this.close()},this.triggerClickHandler=()=>{this.toggle()},this.documentClickHandler=e=>{this.isOpen?this.triggerEl?.contains(e.target)||e.composedPath().includes(this.content)||(this.close(),this.dialog.removeEventListener("click",this.documentClickHandler)):document.removeEventListener("click",this.documentClickHandler)},this.isCustomTrigger=()=>{const e=this.triggerEl?.tagName.toLowerCase();return e&&(-1===al.indexOf(e)||this.triggerEl&&"chameleonVersion"in this.triggerEl&&al.some(t=>e.endsWith(t.replace("chameleon-",""))))},this.handleKeyDown=e=>{"Space"===e.code&&this.isCustomTrigger()&&e.preventDefault(),"Enter"!==e.key&&"Space"!==e.code||this.isCustomTrigger()&&(this.toggle(),document.addEventListener("click",this.documentClickHandler))},this.handleContentKeydownEvent=e=>{"Escape"===e.key&&this.close()},this.handleTriggerElementRemovedMutation=e=>{for(const t of e){const e=Array.from(t.removedNodes).some(e=>e===this.triggerEl);this.dialog.hasAttribute("open")&&"childList"===t.type&&e&&this.closePopover()}},this.handleTriggerElementIdChangedMutation=e=>{for(const t of e)"attributes"===t.type&&"id"===t.attributeName&&this.configureTriggerElement(this.triggerId)},this.triggerElementRemovedObserver=new MutationObserver(this.handleTriggerElementRemovedMutation),this.triggerElementIdChangedObserver=new MutationObserver(this.handleTriggerElementIdChangedMutation)}connectedCallback(){super.connectedCallback(),this.addEventListener("menuitemclick",this.handleMenuItemClick),!this.triggerEl&&this.triggerElement?this.applyTriggerElement(this.triggerElement):!this.triggerEl&&this.triggerId?this.configureTriggerElement(this.triggerId):this.triggerEl&&(this.triggerEl.addEventListener("click",this.triggerClickHandler),this.triggerEl.addEventListener("keydown",this.handleKeyDown)),this.focusTrap=sl(this.dialog,{onDeactivate:()=>{this.close()},allowOutsideClick:!0,setReturnFocus:()=>this.triggerEl??!1,initialFocus:()=>this.initialFocus?.(),fallbackFocus:this.content,tabbableOptions:{getShadowRoot:!0}}),this.isOpen&&Tr.queueUpdate(()=>{this.isConnected&&this.openPopover()})}disconnectedCallback(){super.disconnectedCallback(),this.cleanupFn?.(),this.triggerEl&&(this.triggerEl.removeEventListener("click",this.triggerClickHandler),this.triggerEl.removeEventListener("keydown",this.handleKeyDown),this.triggerEl.setAttribute("aria-expanded","fal
187se"),this.triggerEl=null),this.triggerElementRemovedObserver.disconnect(),this.triggerElementIdChangedObserver.disconnect(),this.cancelPendingTriggerObservation?.(),this.cancelPendingTriggerObservation=void 0,document.removeEventListener("click",this.documentClickHandler),this.dialog.removeEventListener("click",this.documentClickHandler),this.removeEventListener("menuitemclick",this.handleMenuItemClick),this.closePopover()}close(){this.isOpen=!1}open(){this.isOpen=!0}toggle(){this.isOpen=!this.isOpen}positionPopover(){const e=this.anchor,t=this.dialog,r=this.content;if(!e||!t||!r)return;this.cleanupFn?.();const n=e.getBoundingClientRect();this.style.setProperty("--trigger-width",`${n.width}px`),this.style.setProperty("--trigger-height",`${n.height}px`);const o=this.chameleonPositionToPlacement(this.position),i=()=>{var n;fa(e,t,{placement:o,strategy:"fixed",middleware:[pa({fallbackPlacements:ya(this.position)}),ha({padding:8}),(n={apply({availableHeight:e}){const t=Math.max(e-16,100);Object.assign(r.style,{maxHeight:`${t}px`})},padding:8},void 0===n&&(n={}),{name:"size",options:n,async fn(e){var t,r;const{placement:o,rects:i,platform:s,elements:a}=e,{apply:l=()=>{},...c}=as(n,e),d=await s.detectOverflow(e,c),u=ls(o),h=cs(o),p="y"===hs(o),{width:g,height:f}=i.floating;let m,v;"top"===u||"bottom"===u?(m=u,v=h===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=u,m="end"===h?"top":"bottom");const b=f-d.top-d.bottom,y=g-d.left-d.right,w=es(f-d[m],b),x=es(g-d[v],y),_=!e.middlewareData.shift;let k=w,C=x;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(C=y),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(k=b),_&&!h){const e=ts(d.left,0),t=ts(d.right,0),r=ts(d.top,0),n=ts(d.bottom,0);p?C=g-2*(0!==e||0!==t?e+t:ts(d.left,d.right)):k=f-2*(0!==r||0!==n?r+n:ts(d.top,d.bottom))}await l({...e,availableWidth:C,availableHeight:k});const S=await s.getDimensions(a.floating);return g!==S.width||f!==S.height?{reset:{rects:!0}}:{}}})]}).then(({x:e,y:t,placement:n})=>{this.isConnected&&(this.style.setProperty("--trigger-x",`${e}px`),this.style.setProperty("--trigger-y",`${t}px`),this.setAttribute("data-rendered-position",this.placementToChameleonPosition(n)),requestAnimationFrame(()=>{if(!this.isConnected)return;const e=r.getBoundingClientRect();this.style.setProperty("--content-height",`${e.height}px`),this.style.setProperty("--content-width",`${e.width}px`),this.$emit("position-changed")}))})};i(),this.cleanupFn=ua(e,t,i)}configureTriggerElement(e){if(this.cancelPendingTriggerObservation?.(),this.cancelPendingTriggerObservation=void 0,this.triggerElement)return;let t=null;e&&""!==e&&(t=Qi(e,this),t||(this.cancelPendingTriggerObservation=Xi(e,this,()=>{this.configureTriggerElement(e)}))),this.applyTriggerElement(t)}applyTriggerElement(e){const t=this.triggerEl;this.triggerEl=e,this.triggerEl!==t&&(t&&(t.removeEventListener("click",this.triggerClickHandler),t.removeEventListener("keydown",this.handleKeyDown),t.setAttribute("aria-expanded","false"),this.triggerElementRemovedObserver.disconnect(),this.triggerElementIdChangedObserver.disconnect()),this.triggerEl)&&(this.triggerEl.addEventListener("click",this.triggerClickHandler),this.triggerEl.addEventListener("keydown",this.handleKeyDown),al.includes(this.triggerEl.tagName.toLowerCase())||"button"===this.triggerEl.tagName.toLowerCase()||this.triggerEl.getAttribute("role")||this.triggerEl.setAttribute("role","button"),this.triggerEl.setAttribute("aria-haspopup",this.ariaHasPopupValue),this.triggerEl.setAttribute("aria-expanded",`${this.isOpen}`),this.triggerEl.setAttribute("aria-controls",this.contentElId),this.triggerEl.parentElement&&this.triggerElementRemovedObserver.observe(this.triggerEl.parentElement,{childList:!0}),this.triggerElementIdChangedObserver.observe(this.triggerEl,{attributes:!0,attributeFilter:["id"]}))}openPopover(){this.disableFocusTrap?this.dialog.showPopover():this.dialog.showModal(),this.positionPopover(),this.disableFocusTrap||this.focusTrap.activate(),this.triggerEl?.setAttribute("aria-expanded","true"),this.addEventListener("keydown",this.handleContentKeydownEvent),this.dialog.addEventListener("click",this.documentClickHandler),this.$emit("popoverchange",{isOpen:!0})}
187closePopover(){this.disableFocusTrap?this.dialog.hidePopover():this.dialog.close(),this.focusTrap.deactivate(),this.triggerEl?.setAttribute("aria-expanded","false"),this.removeEventListener("keydown",this.handleContentKeydownEvent),this.cleanupFn?.(),this.$emit("popoverchange",{isOpen:!1})}chameleonPositionToPlacement(e){if(!e.includes("center"))return e;const[t]=e.split("-");return t}placementToChameleonPosition(e){return e.includes("-")?e:`${e}-center`}}h([Qr()],ll.prototype,"position",void 0),h([Qr()],ll.prototype,"width",void 0),h([Qr({attribute:"min-width",converter:Yr})],ll.prototype,"minWidth",void 0),h([Qr({attribute:"max-width",converter:Yr})],ll.prototype,"maxWidth",void 0),h([Qr({attribute:"z-index",converter:Yr})],ll.prototype,"zIndex",void 0),h([Qr({attribute:"popover-mode"})],ll.prototype,"popoverMode",void 0),h([Qr({mode:"boolean"})],ll.prototype,"compact",void 0),h([Qr({mode:"boolean"})],ll.prototype,"inverted",void 0),h([Qr({mode:"boolean"})],ll.prototype,"hidden",void 0),h([Qr({mode:"boolean"})],ll.prototype,"arrow",void 0),h([Qr({mode:"boolean"})],ll.prototype,"menu",void 0),h([Qr({attribute:"trigger-on"})],ll.prototype,"triggerOn",void 0),h([Qr({mode:"boolean",attribute:"is-open"})],ll.prototype,"isOpen",void 0),h([Qr({attribute:"label-id"})],ll.prototype,"labelId",void 0),h([Qr],ll.prototype,"label",void 0),h([Qr({attribute:"disable-focus-trap",mode:"boolean"})],ll.prototype,"disableFocusTrap",void 0),h([Qr({attribute:"trigger-id"})],ll.prototype,"triggerId",void 0),h([Nr],ll.prototype,"dialog",void 0),h([Nr],ll.prototype,"content",void 0),h([Nr],ll.prototype,"triggerElement",void 0);class cl extends Zt{connectedCallback(){super.connectedCallback(),this.hasAttribute("aria-hidden")||this.setAttribute("aria-hidden","true")}render(){return oe``}}cl.baseName="contextual-action-separator",cl.styles=b(":host{border-right:1px solid;border-color:var(--goto-border-color-default);margin:var(--goto-spacing-00)var(--goto-spacing-01);align-self:stretch}");class dl extends Zt{render(){return oe`<slot></slot>`}}dl.baseName="action-group",dl.styles=b(":host{align-items:center;gap:var(--goto-spacing-02);flex-shrink:0;display:flex}");class ul extends Zt{render(){return oe`<slot></slot>`}}ul.baseName="action-set",ul.styles=b(":host{align-items:center;gap:var(--goto-spacing-02);flex-shrink:0;padding-inline-end:var(--goto-spacing-03);display:flex}");const hl="more";class pl extends Zt{constructor(){super(...arguments),this.label="",this.overflowLabel="More actions",this.background="surface-default",this.overflowItems=[],this.focusedItemIndex=0,this.isMoreOpen=!1,this.naturalWidths=new WeakMap,this.itemTooltips=new Map,this.tooltipIdCounter=0,this.isReconcilingOverflow=!1,this.handleFocusIn=e=>{const t=e.composedPath(),r=t.some(e=>e instanceof HTMLElement&&"overflow"===e.getAttribute("slot"));if(r)return;const n=this.getEnabledItems(),o=t.find(e=>e instanceof HTMLElement&&n.includes(e));o&&(this.focusedItemIndex=n.indexOf(o),this.setupRovingTabindex())},this.handleKeyDown=e=>{const t=e.composedPath().some(e=>e instanceof HTMLElement&&"overflow"===e.getAttribute("slot"));if(t)return void this.handleOverflowKeyDown(e);const r=this.getEnabledItems();if(0===r.length)return;const n=r[this.focusedItemIndex];if("ArrowRight"===e.key&&n?.id===hl&&!this.isMoreOpen){e.preventDefault();const t=this.shadowRoot?.querySelector(".overflow-popover");return void t?.open?.()}let o=!1;switch(e.key){case"ArrowRight":this.focusedItemIndex=(this.focusedItemIndex+1)%r.length,o=!0;break;case"ArrowLeft":this.focusedItemIndex=(this.focusedItemIndex-1+r.length)%r.length,o=!0;break;case"Home":this.focusedItemIndex=0,o=!0;break;case"End":this.focusedItemIndex=r.length-1,o=!0}o&&(e.preventDefault(),this.setupRovingTabindex(),r[this.focusedItemIndex]?.focus())},this.handlePopoverChange=e=>{const t=e.detail;this.isMoreOpen=!!(t?.isOpen??t?.open)},this.handleSlotChange=()=>{this.setupRovingTabindex(),this.isReconcilingOverflow||this.invalidateOverflow()}}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","toolbar"),this.syncAccessibleName(),this.resizeObserver=new ResizeObserver(()=>{this.invalidateOverflow()}),this.resizeObserver.observe(this),this.mutationObserver=new MutationObserver(e=>{e.some(e=>
187"childList"===e.type)&&this.invalidateOverflow()}),this.mutationObserver.observe(this,{childList:!0,subtree:!0}),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("focusin",this.handleFocusIn)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("focusin",this.handleFocusIn),this.resizeObserver?.disconnect(),this.mutationObserver?.disconnect()}updated(e){super.updated(e),e.has("label")&&this.syncAccessibleName(),e.has("overflowItems")&&(this.reconcileOverflowSlots(),this.updateComplete.then(()=>this.setupRovingTabindex()))}render(){const e=Oi(u(mr)),t=Oi(u(Wi)),r=Oi(u(Ca)),n=Oi(u(ll)),o=this.overflowItems.length>0;return Ni`
188      <slot @slotchange="${this.handleSlotChange}"></slot>
189      ${o?Ni`
190            <${t}
191              id="${hl}"
192              part="overflow-button"
193              size="small"
194              variant="tertiary"
195              label="${this.overflowLabel}"
196              aria-haspopup="true"
197              aria-expanded="${this.isMoreOpen?"true":"false"}"
198              @change="${e=>e.stopPropagation()}"
199            >
200              <${e} aria-hidden="true">${Mi(zi)}</${e}>
201            </${t}>
202            <${r} trigger-id="${hl}" position="top">${this.overflowLabel}</${r}>
203            <${n}
204              part="overflow-popover"
205              class="overflow-popover"
206              position="bottom-end"
207              trigger-id="${hl}"
208              menu
209              width="fit-content"
210              .initialFocus="${()=>this.getOverflowItems()[0]}"
211              @popoverchange="${this.handlePopoverChange}"
212            >
213              <div part="overflow-list" role="group" aria-label="${this.overflowLabel}">
214                <slot name="overflow"></slot>
215              </div>
216            </${n}>
217          `:le}
218      <slot name="primary"></slot>
219    `}syncAccessibleName(){this.label?this.setAttribute("aria-label",this.label):this.removeAttribute("aria-label")}validateAccessibleName(){this.label||console.error('CHAMELEON-A11Y: ActionBar component must have an accessible name provided by a non-empty `label` attribute describing the toolbar\'s purpose (e.g. "Formatting").')}isGroupingElement(e){const t=e.tagName.toLowerCase();return t===u(dl,{optional:!0}).toLowerCase()||t===u(ul,{optional:!0}).toLowerCase()}isDividerElement(e){return e.tagName.toLowerCase()===u(cl,{optional:!0}).toLowerCase()}isTooltipElement(e){return e.tagName.toLowerCase()===u(Ca,{optional:!0}).toLowerCase()}expandFocusableLeaves(e){const t=[];for(const r of e)if(this.isGroupingElement(r)){const e=Array.from(r.children).filter(e=>e instanceof HTMLElement);t.push(...this.expandFocusableLeaves(e))}else this.isDividerElement(r)||this.isTooltipElement(r)||t.push(r);return t}getEnabledItems(){const e=Array.from(this.children).filter(e=>e instanceof HTMLElement&&"overflow"!==e.getAttribute("slot")),t=this.expandFocusableLeaves(e),r=this.shadowRoot?.getElementById(hl);return r&&t.push(r),t}getPrimaryItem(){return this.querySelector(':scope > [slot="primary"]')}getOverflowItems(){const e=Array.from(this.querySelectorAll('[slot="overflow"]'));return this.expandFocusableLeaves(e)}handleOverflowKeyDown(e){const t=this.getOverflowItems();if(0===t.length)return;const r=e.composedPath().find(e=>e instanceof HTMLElement&&t.includes(e)),n=r?t.indexOf(r):-1;let o=n;switch(e.key){case"ArrowRight":o=n<t.length-1?n+1:0;break;case"ArrowLeft":o=n>0?n-1:t.length-1;break;case"Home":o=0;break;case"End":o=t.length-1;break;case"Escape":{e.preventDefault();const t=this.shadowRoot?.querySelector(".overflow-popover");return void t?.close?.()}default:return}o!==n&&(e.preventDefault(),t[o].focus())}setupRovingTabindex(){const e=this.getEnabledItems();if(0===e.length)return void(this.focusedItemIndex=0);this.focusedItemIndex>=e.length&&(this.focusedItemIndex=0);const t=this.getPrimaryItem();e.forEach((e,r)=>{const n=t?e===t:r===this.focusedItemIndex;e.tabIndex=n?0:-1})}invalidateOverflow(){this.mutationObserver?.disconnect();try{this.validateOverflow(),this.syncItemTooltips()}finally{this.mutationObserver?.observe(this,{childList:!0,subtree:!0})}}syncItemTooltips(){const e=Array.from(this.children).filter(e=>e instanceof HTMLElement&&"overflow"!==e.getAttribute("slot")),t=this.expandFocusableLeaves(e),r=new Set(t);for(const[e,t]of this.itemTooltips)r.has(e)||(t.remove(),this.itemTooltips.delete(e));const n=u(Ca);for(const e of t){const t=e.label;let r=this.itemTooltips.get(e);t?(e.id||(e.id="action-bar-item-"+this.tooltipIdCounter++),r||(r=this.ownerDocument.createElement(n),r.setAttribute("position","top"),r.setAttribute("data-action-bar-generated-tooltip",""),e.insertAdjacentElement("afterend",r),this.itemTooltips.set(e,r)),r.getAttribute("trigger-id")!==e.id&&r.setAttribute("trigger-id",e.id),r.textContent!==t&&(r.textContent=t)):r&&(r.remove(),this.itemTooltips.delete(e))}}validateOverflow(){if(!this.clientWidth)return;const e=this.getPrimaryItem(),t=Array.from(this.children).filter(t=>t instanceof HTMLElement&&t!==e&&!this.isTooltipElement(t));for(const e of t)if("overflow"!==e.getAttribute("slot")){const t=e.getBoundingClientRect().width;t>
2190&&this.naturalWidths.set(e,t)}const r=e=>this.naturalWidths.get(e)??e.getBoundingClientRect().width,n=e?e.getBoundingClientRect().width+8:0;if(t.reduce((e,t)=>e+r(t)+8,0)+n<=this.clientWidth)return void(this.overflowItems.length>0&&(this.overflowItems=[]));const o=this.clientWidth-32-8-n;let i=0;const s=t.reduce((e,t)=>(i+=r(t)+8,i>o&&e.push(t),e),[]);(function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0})(this.overflowItems,s)||(this.overflowItems=s)}reconcileOverflowSlots(){const e=new Set(this.overflowItems);let t=!1;const r=this.querySelectorAll('[slot="overflow"]');for(const n of Array.from(r))e.has(n)||(n.removeAttribute("slot"),t=!0);for(const e of this.overflowItems)"overflow"!==e.getAttribute("slot")&&(e.setAttribute("slot","overflow"),t=!0);t&&(this.isReconcilingOverflow=!0,queueMicrotask(()=>{this.isReconcilingOverflow=!1}))}}function gl(e={}){d(Ui,e)}function fl(e={}){return vr(e),gl(e),d(Wi,e)}function ml(e,...t){const{styles:r,behaviors:n}=function(e,t){const r=[];let n="";const o=[];for(let i=0,s=e.length-1;i<s;++i){n+=e[i];let s=t[i];if(s instanceof eo){const e=s.createBehavior();s=s.createCSS(),e&&o.push(e)}s instanceof zr||s instanceof CSSStyleSheet?(""!==n.trim()&&(r.push(n),n=""),r.push(s)):n+=s}return n+=e[e.length-1],""!==n.trim()&&r.push(n),{styles:r,behaviors:o}}(e,t),o=zr.create(r);return n.length&&o.withBehaviors(...n),o}pl.baseName="action-bar",pl.styles=b(":host{box-sizing:border-box;justify-content:flex-start;align-items:center;gap:var(--goto-spacing-01);padding:var(--goto-spacing-03);border-radius:var(--goto-radius-medium);display:flex}:host([background=surface-default]){background-color:var(--goto-surface-color-default)}:host([background=surface-secondary]){background-color:var(--goto-surface-color-secondary)}:host(:focus-visible){outline:1px solid var(--goto-focus-color-highlight-default)}::slotted(*){flex-shrink:0}::slotted([slot=primary]){margin-inline-start:auto}[part=overflow-button]{transition:opacity var(--goto-duration-modest-02)var(--goto-entrance-easing),transform var(--goto-duration-modest-02)var(--goto-entrance-easing);flex-shrink:0}@starting-style{[part=overflow-button]{opacity:0;transform:scale(.8)}}[part=overflow-list]{gap:var(--goto-spacing-01);margin:var(--goto-spacing-00);padding:var(--goto-spacing-02);flex-direction:row;list-style:none;display:flex}"),h([Te()],pl.prototype,"label",void 0),h([Te({attribute:"overflow-label"})],pl.prototype,"overflowLabel",void 0),h([Te({reflect:!0})],pl.prototype,"background",void 0),h([Oe()],pl.prototype,"overflowItems",void 0),h([Oe()],pl.prototype,"focusedItemIndex",void 0),h([Oe()],pl.prototype,"isMoreOpen",void 0);const vl={baseName:"tooltip",styles:ml`
220    ${':host{--arrow-size:10px;--element-padding:10px;--tooltip-width:max-content;--tooltip-max-width:max-content;--tooltip-min-width:min-content;--tooltip-z-index:unset;font:var(--goto-caption-medium);padding:var(--element-padding);margin:var(--goto-spacing-00);top:var(--trigger-y);left:var(--trigger-x);width:var(--tooltip-width,max-content);max-width:var(--tooltip-max-width,max-content);min-width:var(--tooltip-min-width,min-content);z-index:var(--tooltip-z-index,unset);pointer-events:none;background-color:#0000;border:none;position:fixed}:host .title>::slotted(*){background-color:var(--goto-surface-color-tertiary);border-radius:var(--goto-radius-small);padding:var(--goto-spacing-00)var(--goto-spacing-01);margin-bottom:var(--goto-spacing-01);display:block}:host .body{padding:var(--goto-spacing-00)var(--goto-spacing-01);display:block}:host .content{padding:var(--goto-spacing-01)var(--goto-spacing-01);border-radius:var(--goto-radius-medium);color:var(--goto-type-color-inverted);background-color:var(--goto-surface-color-inverted);white-space:normal;overflow-wrap:anywhere}:host .arrow{box-sizing:border-box;content:"";top:var(--goto-spacing-00);left:var(--goto-spacing-00);transform:translate(var(--arrow-offset-x),var(--arrow-offset-y))rotate(var(--arrow-rotation));width:var(--arrow-size);height:var(--arrow-size);border-right:inherit;border-bottom:inherit;box-shadow:var(--arrow-shadow);background-color:var(--goto-surface-color-inverted);z-index:-1;border-bottom-right-radius:2px;position:absolute}:host ::slotted(chameleon-typography){--goto-type-color-default:var(--goto-type-color-inverted)}:host([data-not-native]){display:none}:host([data-not-native][data-displayed]){display:block}:host([data-rendered-position^=top-]){--arrow-offset-y:calc(var(--content-height) - var(--element-padding) - var(--arrow-size)/2);--arrow-rotation:45deg;--arrow-shadow:#0000001f 4px 4px 4px -2px,#00000014 2px 2px 2px 0}:host([data-rendered-position^=bottom-]) .arrow{--arrow-offset-y:calc(var(--arrow-size)/2);--arrow-rotation:calc(-45deg - 90deg);--arrow-shadow:#0000000a 1px 1px 2px 0}:host([data-rendered-position^=right-]) .arrow{--arrow-rotation:calc(45deg + 90deg);--arrow-offset-x:5px;--arrow-shadow:#0000001f 2px 2px 2px 0}:host([data-rendered-position^=left-]) .arrow{--arrow-rotation:calc(45deg + 90deg + 180deg);--arrow-offset-x:calc(var(--content-width) - var(--element-padding) - calc(var(--arrow-size)/2));--arrow-shadow:#0000001f 2px 2px 2px 0}:host([data-rendered-position=top-start]),:host([data-rendered-position=bottom-start]){--arrow-offset-x:min(calc(var(--content-width)/2 - var(--arrow-size)/2),calc(var(--element-padding) + var(--trigger-width)/2 - var(--arrow-size)/2));left:calc(var(--trigger-x) - var(--element-padding))}:host([data-rendered-position=top-end]),:host([data-rendered-position=bottom-end]){--arrow-offset-x:max(calc(var(--content-width)/2 - var(--arrow-size)/2),calc(var(--content-width) - var(--element-padding) - var(--trigger-width)/2 - var(--arrow-size)/2));left:calc(var(--trigger-x) + var(--element-padding))}:host([data-rendered-position=top-center]) .arrow,:host([data-rendered-position=bottom-center]) .arrow{--arrow-offset-x:calc(var(--content-width)/2 - var(--arrow-size)/2)}:host([data-rendered-position=right-start]),:host([data-rendered-position=left-start]){--arrow-offset-y:calc(var(--trigger-height)/2 + var(--element-padding) - var(--arrow-size)/2);top:calc(var(--trigger-y) - var(--element-padding))}:host([data-rendered-position=right-center]),:host([data-rendered-position=left-center]){--arrow-offset-y:calc(var(--content-height)/2 - var(--arrow-size)/2)}:host([data-rendered-position=right-end]),:host([data-rendered-position=left-end]){--arrow-offset-y:calc(var(--content-height) - var(--element-padding) - var(--trigger-height)/2 - var(--arrow-size)/2);top:calc(var(--trigger-y) + var(--element-padding))}'}
221  `,template:_a},bl=Ca.compose(vl);function yl(e,t){return To({prefix:e,node:t},bl)}const wl=ll.compose({baseName:"popover",template:(e,t)=>
221ri`
222    <template>
223      ${Aa(e=>!e.disableFocusTrap,ri`
224          <dialog
225            ${li("dialog")}
226            aria-label="${e=>e.label}"
227            aria-labelledby="${e=>e.labelId}"
228          >
229            <div ${li("content")}
230              id="${e=>e.contentElId}"
231              class="content"
232              tabindex="-1"
233            >
234              <div class="inner">
235                <slot></slot>
236              </div>
237              <div class="arrow"></div>
238            </div>
239          </dialog>
240        `)}
241      ${Aa(e=>e.disableFocusTrap,ri`<div
242          popover="${e=>void 0===e.popoverMode?"auto":e.popoverMode}"
243          ${li("dialog")}
244          tabindex="-1"
245          aria-label="${e=>e.label}"
246          aria-labelledby="${e=>e.labelId}"
247          @toggle=${(e,t)=>{e.isOpen="open"===t.event.newState}}
248        >
249          <div ${li("content")} id="${e=>e.contentElId}" class="content" role="tooltip">
250            <div class="inner">
251              <slot></slot>
252            </div>
253            <div class="arrow"></div>
254          </div>
255        </div>`)}
256    </template>
257  `,styles:Ci(":host{--arrow-size:14px;--element-padding:12px;--padding-in-direction-of-trigger:12px;--popover-width:fit-content;--popover-min-width:auto;--popover-max-width:auto;font-size:14px;display:inline-flex;position:absolute}:host dialog,:host [popover]{margin:var(--goto-spacing-00);padding:var(--element-padding);top:var(--trigger-y,0);left:var(--trigger-x,0);width:var(--popover-width,fit-content);max-width:var(--popover-max-width);min-width:var(--popover-min-width);background:0 0;border:none;overflow:visible}:host .content{padding:var(--goto-spacing-00);border:1px solid var(--goto-border-color-secondary);border-radius:var(--goto-radius-medium);background:var(--goto-surface-color-default);box-shadow:var(--goto-elevation-medium);flex-direction:column;display:flex}:host .content:focus-visible{outline-offset:1px;outline:1px solid var(--goto-focus-color-highlight-default)}:host .inner{z-index:1;min-width:0;min-height:0;position:relative;overflow-y:auto}:host :is(dialog,[popover])::backdrop{background:0 0}:host ::slotted(:focus-visible){box-shadow:0 0 0 2px var(--goto-focus-color-highlight-default);outline:none}:host ::slotted{border-radius:var(--goto-radius-small);word-break:break-word}:host .hidden{display:none}:host([menu]){--popover-width:240px}:host([menu]) .content{width:var(--popover-width,fit-content)}:host(:not([menu])) .inner{padding:16px}:host([compact]) .inner{padding:var(--goto-spacing-00)}:host([inverted]) .content{--goto-icon-color:var(--goto-icon-color-inverted);--goto-icon-color-default:var(--goto-icon-color-inverted);--goto-type-color-default:var(--goto-type-color-inverted);--goto-type-color-secondary:var(--goto-type-color-inverted-secondary);background:var(--goto-surface-color-inverted);border-color:var(--goto-border-color-inverted);color:var(--goto-type-color-inverted)}:host([inverted][arrow]) .arrow{background-color:var(--goto-surface-color-inverted);border-right:1px solid var(--goto-border-color-inverted);border-bottom:1px solid var(--goto-border-color-inverted)}:host([arrow]){--padding-in-direction-of-trigger:12px}:host([arrow]) .arrow{box-sizing:border-box;top:var(--goto-spacing-00);left:var(--goto-spacing-00);transform:translate(var(--arrow-offset-x),var(--arrow-offset-y))rotate(var(--arrow-rotation));width:var(--arrow-size);aspect-ratio:1;border-bottom-right-radius:var(--goto-radius-small);border-right:inherit;border-bottom:inherit;background-color:var(--goto-surface-color-default);box-shadow:var(--arrow-shadow);position:absolute}:host(:not([arrow])){--padding-in-direction-of-trigger:6px}:host([data-rendered-position^=top-]) :is(dialog,[popover]){padding-bottom:var(--padding-in-direction-of-trigger)}:host([arrow][data-rendered-position^=top-]) :is(dialog,[popover]){--arrow-offset-y:calc(var(--content-height) + var(--padding-in-direction-of-trigger) - var(--arrow-size)/2);--arrow-rotation:45deg;--arrow-shadow:#0000001f 4px 4px 4px -2px,#00000014 2px 2px 2px 0;padding-bottom:var(--padding-in-direction-of-trigger)}:host([data-rendered-position^=bottom-]) :is(dialog,[popover]){padding-top:var(--padding-in-direction-of-trigger)}:host([arrow][data-rendered-position^=bottom-]) :is(dialog,[popover]){--arrow-offset-y:calc(var(--padding-in-direction-of-trigger) - var(--arrow-size)/2);--arrow-rotation:calc(-45deg - 90deg);--arrow-shadow:#0000000a 1px 1px 2px 0;padding-top:var(--padding-in-direction-of-trigger)}:host([data-rendered-position^=right-]) :is(dialog,[popover]){padding-left:var(--padding-in-direction-of-trigger)}:host([arrow][data-rendered-position^=right-]) :is(dialog,[popover]){--arrow-offset-x:calc(var(--padding-in-direction-of-trigger) - var(--arrow-size)/2);--arrow-rotation:calc(45deg + 90deg);--arrow-shadow:#0000001f 2px 2px 2px 0;padding-left:var(--padding-in-direction-of-trigger)}:host([data-rendered-position^=left-]) :is(dialog,[popover]){padding-right:var(--padding-in-direction-of-trigger)}:host([arrow][data-rendered-position^=left-]) :is(dialog,[popover]){--arrow-offset-x:calc(var(--content-width) + var(--padding-in-direction-of-trigger) - var(--arrow-size)/2);--arrow-rotation:calc(45deg + 90deg + 180deg);--arrow-shadow:#0000001f 2px 2px 2px 0;padding-right:var(--padding-in-direction-of-trigger)}:host([data-rendered-position=top-start]) :is(dialog,[popover]),:host([data-rendered-position=bottom-start]) :is(dialog,[popover]){--arrow-offset-x:min(calc(var(--element-padding) + var(--content-width)/2 - var(--arrow-size)/2),calc(var(--element-padding) + var(--trigger-width)/2 - var(--arrow-size)/2));left:calc(var(--trigger-x) - var(--element-padding))}:host([data-rendered-position=top-end]) :is(dialog,[popover]),:host([data-rendered-position=bottom-end]) :is(dialog,[popover]){--arrow-offset-x:max(calc(var(--element-padding) + var(--content-width)/2 - var(--arrow-size)/2),calc(var(--element-padding) + var(--content-width) - var(--trigger-width)/2 - var(--arrow-size)/2));left:calc(var(--trigger-x) + var(--element-padding))}:host([data-rendered-position=top-center]) :is(dialog,[popover]),:host([data-rendered-position=bottom-center]) :is(dialog,[popover]){--arrow-offset-x:calc(var(--element-padding) + var(--content-width)/2 - var(--arrow-size)/2)}:host([data-rendered-position=right-start]) :is(dialog,[popover]),:host([data-rendered-position=left-start]) :is(dialog,[popover]){--arrow-offset-y:calc(var(--padding-in-direction-of-trigger) + var(--trigger-height)/2 - var(--arrow-size)/2);top:calc(var(--trigger-y) - var(--element-padding))}:host([data-rendered-position=right-center]) :is(dialog,[popover]),:host([data-rendered-position=left-center]) :is(dialog,[popover]){--arrow-offset-y:calc(var(--element-padding) + var(--content-height)/2 - var(--arrow-size)/2)}:host([data-rendered-position=right-end]) :is(dialog,[popover]),:host([data-rendered-position=left-end]) :is(dialog,[popover]){--arrow-offset-y:calc(var(--element-padding) + var(--content-height) - var(--trigger-height)/2 - var(--arrow-size)/2);top:calc(var(--trigger-y) + var(--element-padding))}")});function xl(e,t){return To({prefix:e,node:t},wl)}function _l(e={}){const{prefix:t}=e;vr(e),fl(e),yl(t),xl(t),d(cl,e),d(dl,e),d(ul,e),d(pl,e)}_l();
257var kl='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M20.8726 6.59192L9.17452 18.29L3 12.1155L4.30192 10.8136L9.17452 15.6862L19.5707 5.29L20.8726 6.59192Z" fill="currentColor"></path></svg>',Cl='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 2L2 22H22L12 2ZM12 6.47214L5.23607 20H18.7639L12 6.47214ZM13 11V16H11V11H13ZM12 19C12.5523 19 13 18.5523 13 18C13 17.4477 12.5523 17 12 17C11.4477 17 11 17.4477 11 18C11 18.5523 11.4477 19 12 19Z" fill="currentColor"></path></svg>',Sl='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.1213 11.7071L19.4142 5.41421L18 4L11.7071 10.2929L5.41422 4L4 5.41421L10.2929 11.7071L4 18L5.41421 19.4142L11.7071 13.1213L18 19.4142L19.4142 18L13.1213 11.7071Z" fill="currentColor"></path></svg>';class El extends Zt{constructor(){super(...arguments),this.role="alert",this.ariaLive="assertive",this.closeLabel="Close"}close(){this.dispatchEvent(new Event("close",{bubbles:!1}))}}h([Te({reflect:!0})],El.prototype,"variant",void 0),h([Te({reflect:!0})],El.prototype,"role",void 0),h([Te({reflect:!0,attribute:"aria-live"})],El.prototype,"ariaLive",void 0),h([Te({type:Boolean,reflect:!0})],El.prototype,"closable",void 0),h([Te({attribute:"close-aria-label"})],El.prototype,"closeLabel",void 0);class Il extends El{constructor(){super(...arguments),this.variant="info",this._hasActions=!1}connectedCallback(){super.connectedCallback(),this._resizeObserver=new ResizeObserver(e=>{for(const t of e){const e=t.borderBoxSize?.[0]?.inlineSize??t.contentRect.width;this.toggleAttribute("narrow",e<480)}}),this._resizeObserver.observe(this)}firstUpdated(e){super.firstUpdated(e);const t=this.shadowRoot?.querySelector('slot[name="actions"]');t&&t.addEventListener("slotchange",()=>{this._hasActions=t.assignedElements().length>0})}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver?.disconnect()}render(){const e=Oi(u(Wi)),t=Oi(u(mr));return Ni`
258      <slot name="icon">
259        <${t} class="alert-leading-icon">
260          ${"info"===this.variant?Mi('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM12 9C12.8284 9 13.5 8.32843 13.5 7.5C13.5 6.67157 12.8284 6 12 6C11.1716 6 10.5 6.67157 10.5 7.5C10.5 8.32843 11.1716 9 12 9ZM13.5 16V10H9V12H10.5V16H9V18H15V16H13.5Z" fill="currentColor"></path></svg>'):""}
261          ${"success"===this.variant?Mi(kl):""}
262          ${"danger"===this.variant?Mi('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M18.9096 4.77109C18.9832 4.81149 19.0524 4.86282 19.1148 4.92509C19.1785 4.9889 19.2307 5.05981 19.2715 5.13526C20.963 6.92633 22 9.34209 22 12C22 17.5227 17.5227 22 12 22C6.47727 22 2 17.5227 2 12C2 6.47727 6.47727 2 12 2C14.6801 2 17.1141 3.05444 18.9096 4.77109ZM6.915 18.4104C8.31123 19.5194 10.0782 20.1818 12 20.1818C16.5191 20.1818 20.1818 16.5191 20.1818 12C20.1818 10.0784 19.5195 8.31161 18.4108 6.91545L6.915 18.4104ZM5.62506 17.1293L17.1289 5.62469C15.7259 4.49459 13.942 3.81818 12 3.81818C7.48091 3.81818 3.81818 7.48091 3.81818 12C3.81818 13.9422 4.49474 15.7263 5.62506 17.1293Z" fill="currentColor"></path></svg>'):""}
263          ${"warning"===this.variant?Mi(Cl):""}
264        </${t}>
265      </slot>
266      <div class="alert-content">
267        <slot></slot>
268        <slot name="action"></slot>
269      </div>
270      <slot name="actions"></slot>
271
272      ${this.closable?Ni`
273        <${e}
274          variant="${"primary"}"
275          part="close-icon"
276          size="${"small"}"
277          label="${this.closeLabel??"Close"}"
278          @click=${()=>this.close()}
279        >
280          <${t}>${Mi(Sl)}</${t}>
281        </${e}>
282      `:""}
283    `}}Il.baseName="alert",Il.styles=b(':host{min-height:var(--goto-spacing-08);border-radius:var(--goto-radius-medium);width:100%;padding:var(--goto-spacing-02)var(--goto-spacing-03);box-sizing:border-box;color:var(--goto-type-color-default);column-gap:var(--goto-spacing-03);--goto-icon-size:var(--goto-spacing-06);grid-template:"icon content"/auto 1fr;display:grid}:host .alert-content{color:var(--goto-type-color-default);font:var(--goto-body-small);flex-grow:1;grid-area:content;align-self:center}:host .alert-content ::slotted(p){margin:var(--goto-spacing-00)!important}:host ::slotted([slot=actions]){gap:var(--goto-spacing-01);grid-area:button-actions;grid-auto-flow:column;justify-content:start;display:grid}:host chameleon-icon-button[part=close-icon]{grid-area:closable}chameleon-link,:host ::slotted(chameleon-link){--goto-link-text-decoration:underline;--goto-link-color:var(--goto-type-color-default)!important;width:auto!important}:host([closable]){padding-right:var(--goto-spacing-02);grid-template-columns:auto 1fr auto;grid-template-areas:"icon content closable"}:host([has-actions]){grid-template-columns:auto 1fr auto;grid-template-areas:"icon content button-actions"}:host([has-actions]) .alert-content{margin-right:4px}:host([has-actions][closable]){grid-template-columns:auto 1fr auto auto;grid-template-areas:"icon content button-actions closable"}:host([narrow][closable]){grid-template-columns:auto 1fr auto;grid-template-areas:"icon content closable"}:host([narrow][has-actions]){row-gap:var(--goto-spacing-02);grid-template:"icon content"".button-actions"/auto 1fr}:host([narrow][has-actions]) .alert-content{margin-right:0}:host([narrow][has-actions][closable]){grid-template-columns:auto 1fr auto;grid-template-areas:"icon content closable"".button-actions."}
283:host([variant=info]){background-color:var(--goto-surface-color-secondary);box-shadow:inset 0 0 0 1px var(--goto-border-color-default);--goto-icon-color:var(--goto-icon-color-default)}:host([variant=success]){background-color:var(--goto-surface-color-success-secondary);box-shadow:inset 0 0 0 1px var(--goto-border-color-success);--goto-icon-color:var(--goto-icon-color-success)}:host([variant=warning]){background-color:var(--goto-surface-color-warning-secondary);box-shadow:inset 0 0 0 1px var(--goto-border-color-warning);--goto-icon-color:var(--goto-icon-color-warning)}:host([variant=danger]){background-color:var(--goto-surface-color-danger-secondary);box-shadow:inset 0 0 0 1px var(--goto-border-color-danger);--goto-icon-color:var(--goto-icon-color-danger)}'),h([Te({reflect:!0})],Il.prototype,"variant",void 0),h([Te({type:Boolean,reflect:!0,attribute:"has-actions"})],Il.prototype,"_hasActions",void 0),function(e={}){vr(e),gl(e),fl(e),d(Il,e)}();var Al='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M15 7C15 8.65685 13.6569 10 12 10C10.3431 10 9 8.65685 9 7C9 5.34315 10.3431 4 12 4C13.6569 4 15 5.34315 15 7ZM17 7C17 9.76142 14.7614 12 12 12C9.23858 12 7 9.76142 7 7C7 4.23858 9.23858 2 12 2C14.7614 2 17 4.23858 17 7ZM12 13C7.71683 13 4.13247 15.992 3.22302 20C3.07706 20.6432 3 21.3126 3 22H5C5 18.134 8.13401 15 12 15C15.866 15 19 18.134 19 22H21C21 21.3126 20.9229 20.6432 20.777 20C19.8675 15.992 16.2832 13 12 13Z" fill="currentColor"></path></svg>';const Tl=nr(class extends or{constructor(e){if(super(e),1!==e.type||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e)));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const r=e.element.classList;for(const e of this.st)e in t||(r.remove(e),this.st.delete(e));for(const e in t){const n=!!t[e];n===this.st.has(e)||this.nt?.has(e)||(n?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return ae}}),Ol=["xlarge"];class Ll extends Zt{constructor(){super(...arguments),this.size="medium",this.variant="primary",this.type="default",this.disabled=!1,this.hidden=!1,this.hasTextContent=!1,this.hasImageContent=!1,this.buttonRef=hr(),this.keyboardActive=!1,this.handleKeyDown=e=>{const{key:t}=e;" "!==t&&"Enter"!==t||(this.renderRoot.querySelector("button")&&(this.keyboardActive=!0,this.timeoutHandle=setTimeout(()=>this.keyboardActive=!1,200)),this.onAction(e),e.preventDefault())}}get computedColorStyle(){return"primary"===this.variant&&this.colorToken?`\n        --goto-avatar-bg-color: var(--${this.colorToken}); \n        --goto-avatar-fg-color: var(--${this.colorToken.replace("color","type")});\n      `:""}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.timeoutHandle&&clearTimeout(this.timeoutHandle),this.removeEventListener("keydown",this.handleKeyDown)}firstUpdated(){this.setAccessibleLabel(),this.updateContentState(),this.updateBadgeState()}updated(e){e.has("label")&&this.setAccessibleLabel(),e.has("size")&&this.updateBadgeState(),(e.has("type")||e.has("disabled"))&&this.updateContentState(),e.has("colorToken")&&"primary"===this.variant&&this.colorToken&&(this.style.setProperty("--goto-avatar-bg-color",`var(--${this.colorToken})`),this.style.setProperty("--goto-avatar-fg-color",`var(--${this.colorToken.replace("color","type")})`))}setAccessibleLabel(){const e=this.getChildImage();if(this.label)return e?e.setAttribute("alt",this.label):"button"!==this.type&&(this.setAttribute("aria-label",`${this.label}`),this.setAttribute("role","img")),void("button"===this.type&&this.buttonRef.value&&this.buttonRef.value.setAttribute("aria-label",`${this.label}`))}validateAccessibleLabel(){const e=this.getChildImage();this.getAttribute("aria-label")?.length||e?.getAttribute("alt")?.length||"true"===this.getAttribute("aria-hidden")||console.error("CHAMELEON-A11Y: Avatar component must have an accessible label provided by a non-empty label attribute to be used as \n  1) alt-text if the avatar has an image \n  2) aria-label if the avatar has initials or an icon")}updateContentState(){const e=this.slottedContent??[];this.hasTextContent=!!e.find(e=>e.nodeType===Node.TEXT_NODE),this.hasImageContent=!!e.find(e=>"IMG"===e.nodeName),this.classList.toggle("no-content",0===e.length),this.classList.toggle("text-content",this.hasTextContent),this.classList.toggle("img-content",this.hasImageContent)}getChildImage(){return this.querySelector("img")}updateBadgeState(){this.slottedBadge&&Ol.includes(this.size)&&this.slottedBadge.forEach(e
283=>{e.setAttribute("size","small")})}canHostABadge(){return Ol.includes(this.size)}isActiveButton(){return"button"===this.type&&!this.disabled}onAction(e){this.isActiveButton()&&this.dispatchEvent(new CustomEvent("avatar-action",{detail:e,bubbles:!0}))}render(){const e=Oi(u(mr));return"button"===this.type?Ni`
284        <button
285          class="${Tl({"keyboard-active":this.keyboardActive})}"
286          @click=${e=>this.onAction(e)}
287          aria-disabled=${this.disabled?"true":"false"}
288          ${fr(this.buttonRef)}
289        >
290          <slot @slotchange=${this.updateContentState}>
291            <${e}>${Al}</${e}>
292          </slot>
293          ${this.canHostABadge()?oe`<slot name="badge" @slotchange=${this.updateBadgeState}></slot>`:le}
294          ${"xxxxlarge"!==this.size?oe`<slot name="presence"></slot>`:le}
295        </button>
296      `:Ni`
297        <slot @slotchange=${this.updateContentState}>
298          <${e}>${Al}</${e}>
299        </slot>
300        ${this.canHostABadge()?oe`<slot name="badge" @slotchange=${this.updateBadgeState}></slot>`:le}
301        ${"xxxxlarge"!==this.size?oe`<slot name="presence"></slot>`:le}
302    `}}function $l(e={}){vr(e),d(Ll,e)}Ll.baseName="avatar",Ll.styles=b(':host{--goto-icon-color:color;width:var(--goto-spacing-08);font:var(--goto-avatar-medium);aspect-ratio:1;border-radius:var(--goto-radius-circle);--goto-icon-size:var(--goto-spacing-05);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex;position:relative}:host ::slotted(img){aspect-ratio:1;object-fit:cover;width:100%;top:var(--goto-spacing-00);left:var(--goto-spacing-00);border-radius:100vmax;position:absolute}:host ::slotted([slot=presence]){background-color:var(--goto-surface-color-default);border-radius:50%;padding:1px;line-height:1;display:inline-flex;position:absolute;bottom:-1px;right:-1px}:host button{padding:var(--goto-spacing-00);background:inherit;border-radius:inherit;width:100%;height:100%;color:inherit;--goto-icon-color:color;font:inherit;cursor:inherit;border:none;justify-content:center;align-items:center;display:flex}:host button:focus-visible{outline:1px solid var(--goto-focus-color-highlight-default);outline-offset:2px!important}:host button:after{content:"";opacity:0;pointer-events:none;border-radius:100%;position:absolute;inset:0}
302:host([type=button]:not([disabled])){cursor:pointer}:host([type=button]:not([disabled])) button:hover:after{background:var(--goto-avatar-interactive-color-overlay-hover);opacity:1}:host([type=button]:not([disabled])) button:active:after,:host([type=button]:not([disabled])) button.keyboard-active:after{background:var(--goto-avatar-interactive-color-overlay-pressed);opacity:1}:host(:focus-visible){outline:1px solid var(--goto-focus-color-highlight-default);outline-offset:2px!important}:host([size=xsmall]){width:var(--goto-spacing-05);font:var(--goto-avatar-xsmall);--goto-icon-size:var(--goto-spacing-04)}:host([size=xsmall]) ::slotted(svg){height:var(--goto-spacing-04);width:var(--goto-spacing-04)}:host([size=small]){width:var(--goto-spacing-06);font:var(--goto-avatar-xsmall);--goto-icon-size:var(--goto-spacing-04)}:host([size=small]) ::slotted(svg){height:var(--goto-spacing-04);width:var(--goto-spacing-04)}:host([size=medium]){width:var(--goto-spacing-07);font:var(--goto-avatar-small);--goto-icon-size:var(--goto-spacing-05)}:host([size=medium]) ::slotted(svg){height:var(--goto-spacing-05);width:var(--goto-spacing-05)}:host([size=large]){width:var(--goto-spacing-08);font:var(--goto-avatar-medium);--goto-icon-size:var(--goto-spacing-05)}:host([size=large]) ::slotted(svg){height:var(--goto-spacing-05);width:var(--goto-spacing-05)}:host([size=large]) ::slotted([slot=presence]){right:1px;bottom:var(--goto-spacing-00)}:host([size=xlarge]){width:var(--goto-spacing-09);font:var(--goto-avatar-large);--goto-icon-size:var(--goto-spacing-07)}:host([size=xlarge]) ::slotted(svg){height:var(--goto-spacing-07);width:var(--goto-spacing-07)}:host([size=xlarge]) ::slotted([slot=badge]){right:calc(var(--goto-spacing-06)*-1);bottom:var(--goto-spacing-00);position:absolute;transform:translate(-50%)}:host([size=xlarge]) ::slotted([slot=presence]){bottom:1px;right:1px}:host([size=xxlarge]){width:var(--goto-spacing-11);font:var(--goto-avatar-xlarge);--goto-icon-size:var(--goto-spacing-08)}:host([size=xxlarge]) ::slotted(svg){height:var(--goto-spacing-08);width:var(--goto-spacing-08)}:host([size=xxlarge]) ::slotted([slot=presence]){bottom:4px;right:4px}:host([size=xxxlarge]){width:5rem;font:var(--goto-avatar-xxlarge);--goto-icon-size:var(--goto-spacing-10)}:host([size=xxxlarge]) ::slotted(svg){height:var(--goto-spacing-10);width:var(--goto-spacing-10)}:host([size=xxxlarge]) ::slotted([slot=presence]){bottom:5px;right:5px}:host([size=xxxxlarge]){width:11.25rem;font:var(--goto-avatar-xxxlarge);--goto-icon-size:7.25rem}:host([size=xxxxlarge]) ::slotted(svg){width:7.25rem;height:7.25rem}:host([variant=primary]){background:var(--goto-avatar-bg-color,var(--goto-avatar-color-31));color:var(--goto-avatar-fg-color,var(--goto-avatar-type-31))}:host([variant=secondary]){color:var(--goto-type-color-secondary);background:var(--goto-avatar-color-secondary);--goto-icon-color:var(--goto-icon-color-secondary);--goto-avatar-bg-color:var(--goto-avatar-color-secondary)}:host([hint]){color:var(--goto-type-color-inverted);background:var(--goto-surface-color-inverted);--goto-icon-color:var(--goto-icon-color-inverted)}:host(.img-content){background:0 0}:host([disabled]){background-color:var(--goto-interactive-color-disabled);color:var(--goto-type-color-disabled);cursor:not-allowed;--goto-icon-color:var(--goto-icon-color-disabled)}:host([disabled]) ::slotted(img){filter:saturate(0)}'),h([Te({reflect:!0})],Ll.prototype,"size",void 0),h([Te({reflect:!0})],Ll.prototype,"variant",void 0),h([Te({reflect:!0})],Ll.prototype,"type",void 0),h([Te({type:Boolean,reflect:!0})],Ll.prototype,"disabled",void 0),h([Te({reflect:!0,attribute:"color-token"})],Ll.prototype,"colorToken",void 0),h([Te({type:Boolean,reflect:!0})],Ll.prototype,"hidden",void 0),h([Te()],Ll.prototype,"label",void 0),h([Re()],Ll.prototype,"slottedContent",void 0),h([Ne({slot:"badge"})],Ll.prototype,"slottedBadge",void 0),h([Ne({slot:"presence"})],Ll.prototype,"slottedPresence",void 0),h([Oe()],Ll.prototype,"hasTextContent",void 0),h([Oe()],Ll.prototype,"hasImageContent",void 0),h([Oe()],Ll.prototype,"keyboardActive",void 0);const Nl=ri`<slot></slot>`,Rl="medium";class Pl extends(a(Jn,"avatar-group")){constructor(){super(...arguments),this.max=4,this.size=Rl}connectedCallback(){super.connectedCallback(),this.render()}attributeChangedCallback(e,t,r){super.attributeChangedCallback(e,t,r),this.render()}getAvatars(){return this.querySelectorAll(`chameleon-avatar, ${u(Ll)}`)}render(){this.querySelector("[hint]")?.remove();const e=this.hasAttribute("max")?+(this.getAttribute("max")??4):this.max,t=this.hasAttribute("size")?this.getAttribute("size")??Rl:this.size,r=this.getAvatars();
302if(r.forEach(e=>{e.setAttribute("size",t)}),r?.length>e){r.forEach(e=>{e.hidden=!1});const n=this.getAvatars()?.length-e+1;if([...r].slice(e-1).forEach(e=>{e.setAttribute("hidden","")}),n>0){const e=document.createElement(u(Ll));e.setAttribute("size",t),e.setAttribute("hint",""),e.textContent=`+${n}`,e.setAttribute("label","Avatars"),this.appendChild(e)}}}}h([Qr],Pl.prototype,"max",void 0),h([Qr],Pl.prototype,"size",void 0);const Dl=Pl.compose({template:Nl,styles:Ci(":host{flex-direction:row;display:flex}:host ::slotted(chameleon-avatar){box-sizing:border-box;box-shadow:0 0 0 2px var(--goto-background-color-default);position:relative}:host ::slotted(chameleon-avatar:not(:first-child)[size=small]){margin-inline-start:-10px}:host ::slotted(chameleon-avatar:not(:first-child)[size=medium]){margin-inline-start:-12px}:host ::slotted(chameleon-avatar:not(:first-child)[size=large]){margin-inline-start:-14px}:host ::slotted(chameleon-avatar:not(:first-child)[size=xlarge]){margin-inline-start:-16px}:host ::slotted(chameleon-avatar[hidden]){display:none!important}:host ::slotted(chameleon-avatar:first-of-type:not([hint])){--goto-avatar-bg-color:var(--goto-avatar-color-01)!important;--goto-avatar-fg-color:var(--goto-avatar-type-01)!important}:host ::slotted(chameleon-avatar:nth-of-type(2):not([hint])){--goto-avatar-bg-color:var(--goto-avatar-color-02)!important;--goto-avatar-fg-color:var(--goto-avatar-type-02)!important}:host ::slotted(chameleon-avatar:nth-of-type(3):not([hint])){--goto-avatar-bg-color:var(--goto-avatar-color-10)!important;--goto-avatar-fg-color:var(--goto-avatar-type-10)!important}:host ::slotted(chameleon-avatar:nth-of-type(4):not([hint])){--goto-avatar-bg-color:var(--goto-avatar-color-11)!important;--goto-avatar-fg-color:var(--goto-avatar-type-11)!important}:host ::slotted(chameleon-avatar:nth-of-type(5):not([hint])){--goto-avatar-bg-color:var(--goto-avatar-color-12)!important;--goto-avatar-fg-color:var(--goto-avatar-type-12)!important}:host ::slotted(chameleon-avatar:nth-of-type(6):not([hint])){--goto-avatar-bg-color:var(--goto-avatar-color-20)!important;--goto-avatar-fg-color:var(--goto-avatar-type-20)!important}:host ::slotted(chameleon-avatar:nth-of-type(7):not([hint])){--goto-avatar-bg-color:var(--goto-avatar-color-21)!important;--goto-avatar-fg-color:var(--goto-avatar-type-21)!important}:host ::slotted(chameleon-avatar:nth-of-type(8):not([hint])){--goto-avatar-bg-color:var(--goto-avatar-color-22)!important;--goto-avatar-fg-color:var(--goto-avatar-type-22)!important}:host ::slotted(chameleon-avatar:nth-of-type(9):not([hint])){--goto-avatar-bg-color:var(--goto-avatar-color-30)!important;--goto-avatar-fg-color:var(--goto-avatar-type-30)!important}:host ::slotted(chameleon-avatar:nth-of-type(10):not([hint])){--goto-avatar-bg-color:var(--goto-avatar-color-31)!important;--goto-avatar-fg-color:var(--goto-avatar-type-31)!important}:host ::slotted(chameleon-avatar:nth-of-type(11):not([hint])){--goto-avatar-bg-color:var(--goto-avatar-color-32)!important;--goto-avatar-fg-color:var(--goto-avatar-type-32)!important}:host ::slotted(chameleon-avatar:nth-of-type(12):not([hint])){--goto-avatar-bg-color:var(--goto-avatar-color-40)!important;--goto-avatar-fg-color:var(--goto-avatar-type-40)!important}:host ::slotted(chameleon-avatar:nth-of-type(13):not([hint])){--goto-avatar-bg-color:var(--goto-avatar-color-41)!important;--goto-avatar-fg-color:var(--goto-avatar-type-41)!important}:host ::slotted(chameleon-avatar:nth-of-type(14):not([hint])){--goto-avatar-bg-color:var(--goto-avatar-color-42)!important;--goto-avatar-fg-color:var(--goto-avatar-type-42)!important}:host ::slotted(chameleon-avatar:nth-of-type(15):not([hint])){--goto-avatar-bg-color:var(--goto-avatar-color-50)!important;--goto-avatar-fg-color:var(--goto-avatar-type-50)!important}:host ::slotted(chameleon-avatar:nth-of-type(16):not([hint])){--goto-avatar-bg-color:var(--goto-avatar-color-51)!important;--goto-avatar-fg-color:var(--goto-avatar-type-51)!important}:host ::slotted(chameleon-avatar:nth-of-type(17):not([hint])){--goto-avatar-bg-color:var(--goto-avatar-color-52)!important;--goto-avatar-fg-color:var(--goto-avatar-type-52)!important}:host ::slotted(chameleon-avatar:nth-of-type(18):not([hint])){--goto-avatar-bg-color:var(--goto-avatar-color-00)!important;--goto-avatar-fg-color:var(--goto-avatar-type-00)!important}"),baseName:"avatar-group"});function Ml(e,t){const r=e.tagName?.toLowerCase(),n=`-${e.baseName}`,o=r?.endsWith(n)?r.slice(0,-n.length):void 0;return o&&"chameleon"!==o&&t.includes("chameleon-")?b(`${t.replaceAll("chameleon-",`${o}-`)}\n${t}`):b(t)}!function(e){vr({prefix:e}),$l({prefix:e}),To({prefix:e,node:void 0},Dl)}(),$l(),gl();class zl extends Zt{constructor(){super(...arguments),this.size="medium",this.border="none",this.variant="primary",this._autoAriaHidden=!1}
302static get styles(){return Ml(zl,":host{width:var(--goto-spacing-07);height:var(--goto-spacing-07);border-radius:var(--goto-radius-small);box-sizing:border-box;padding:var(--goto-spacing-01);background:var(--goto-badge-bg-color);--goto-icon-color:var(--goto-icon-color-inverted);--goto-icon-size:var(--goto-spacing-06);color:var(--goto-icon-color);place-items:center;display:grid}:host([size=small]){width:var(--goto-spacing-06);height:var(--goto-spacing-06);--goto-icon-size:var(--goto-spacing-04)}:host([size=small]) ::slotted(chameleon-svg){--goto-icon-size:var(--goto-spacing-04)}:host([size=xlarge]){width:var(--goto-spacing-09);height:var(--goto-spacing-09);border-radius:var(--goto-radius-medium);padding:var(--goto-spacing-02)}:host([size=xlarge]) ::slotted(chameleon-svg){--goto-icon-size:var(--goto-spacing-07)}:host([border=fill]){box-shadow:0 0 0 2px var(--goto-surface-color-default)}:host([disabled]){background-color:var(--goto-surface-color-secondary)!important;--goto-icon-color:var(--goto-icon-color-disabled)!important}:host([variant=primary]:not[disabled]){--goto-badge-bg-color:var(--goto-badge-color-black);--goto-icon-color:var(--goto-icon-color-inverted)}:host([variant=primary]:not[disabled]) ::slotted(chameleon-svg){--goto-icon-size:var(--goto-spacing-06);--goto-icon-color:var(--goto-icon-color-inverted);color:var(--goto-icon-color)}:host([variant=tertiary]){background-color:#0000!important}")}connectedCallback(){super.connectedCallback(),this.setAccessibleLabel()}updated(e){e.has("label")&&this.setAccessibleLabel(),e.has("colorToken")&&this.handleColorTokenChange(),e.has("size")&&this.handleSizeChange()}render(){return oe`<slot></slot>`}handleColorTokenChange(){this.colorToken?this.style.setProperty("--goto-badge-bg-color",`var(--${this.colorToken})`):this.style.setProperty("--goto-badge-bg-color","")}handleSizeChange(){this.style.setProperty("--goto-icon-size",this.getIconSize(this.size))}getIconSize(e){switch(e){case"small":return"16px";case"xlarge":return"32px";default:return"24px"}}setAccessibleLabel(){if(this.label)return this.setAttribute("aria-label",this.label),this.hasAttribute("role")||this.setAttribute("role","img"),void(this._autoAriaHidden&&"true"===this.getAttribute("aria-hidden")&&(this.removeAttribute("aria-hidden"),this._autoAriaHidden=!1));this.hasAttribute("aria-hidden")||this.hasAttribute("role")||(this.setAttribute("aria-hidden","true"),this._autoAriaHidden=!0)}validateAccessibleLabel(){this.getAttribute("aria-label")?.length||"true"===this.getAttribute("aria-hidden")||console.error("CHAMELEON-A11Y: IconBadge component must have an accessible label provided by a non-empty label attribute to be used as aria-label.")}}function Fl(e={}){vr(e),d(zl,e),d(zl,{...e,suffix:e.suffix?`${e.suffix}-v2`:"v2"})}zl.baseName="icon-badge",h([Te({reflect:!0})],zl.prototype,"size",void 0),h([Te({reflect:!0})],zl.prototype,"border",void 0),h([Te({reflect:!0})],zl.prototype,"variant",void 0),h([Te({type:Boolean,reflect:!0})],zl.prototype,"disabled",void 0),h([Te({attribute:"color-token"})],zl.prototype,"colorToken",void 0),h([Te()],zl.prototype,"label",void 0),Fl();class Ul extends Zt{constructor(){super(...arguments),this.variant="neutral",this.border="none"}render(){return oe`<slot></slot>`}}Ul.baseName="text-badge",Ul.styles=b(":host{height:var(--goto-spacing-05);background-color:var(--goto-surface-color-secondary);color:var(--goto-type-color-default);font:var(--goto-caption-medium-strong);padding-inline:var(--goto-spacing-02);border-radius:var(--goto-radius-circle)}:host([border=fill]){box-shadow:0 0 0 2px var(--goto-surface-color-default)}:host([variant=info]){background-color:var(--goto-surface-color-brand-secondary)}:host([variant=success]){background-color:var(--goto-surface-color-success-secondary)}:host([variant=danger]){background-color:var(--goto-surface-color-danger-secondary)}:host([variant=warning]){background-color:var(--goto-surface-color-warning-secondary)}"),h([Te({reflect:!0})],Ul.prototype,"variant",void 0),h([Te({reflect:!0})],Ul.prototype,"border",void 0),function(e={}){d(Ul,e)}();const Bl=e=>e??le;class Hl extends Zt{constructor(){super(...arguments),this.tag="p",this.color="type-color-default",this.variant="body-small",this.lineClamp=null}render(){const e="inherit"===this.color?"inherit":`var(--goto-${this.color})`,t=this.lineClamp?`${this.lineClamp} !important`:"inherit",r=["type-gradient-ai-primary","type-gradient-ai-secondary"].includes(this.color),n=Oi(this.tag),o=r?`\n        font: var(--goto-${this.variant});\n        background-image: linear-gradient(to bottom right, ${e});\n        color: transparent;\n        background-clip: text;\n        width: fit-content;\n        -webkit-line-clamp: ${t};\n      `:`\n        font: var(--goto-${this.variant});\n        color: ${e};\n        -webkit-line-clamp: ${t};\n      `;return Ni`<${n} part="text" style="${o}"><slot></slot></${n}>`}}Hl.baseName="typography",Hl.styles=b(":host{display:block}:host p,:host span,:host legend,:host label,:host h1,:host h2,:host h3,:host h4{margin:var(--goto-spacing-00);line-height:inherit}:host([tag=span]){display:inline}:host([line-clamp]){white-space:inherit;overflow:hidden}:host([line-clamp]) p,:host([line-clamp]) span,:host([line-clamp]) legend,:host([line-clamp]) label,:host([line-clamp]) h1,:host([line-clamp]) h2,:host([line-clamp]) h3,:host([line-clamp]) h4{text-overflow:ellipsis;line-clamp:inherit;-webkit-line-clamp:inherit;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:host([nowrap]){white-space:nowrap;overflow:hidden}:host([nowrap]) p,:host([nowrap]) span,:host([nowrap]) legend,:host([nowrap]) label,:host([nowrap]) h1,:host([nowrap]) h2,:host([nowrap]) h3,:host([nowrap]) h4{text-overflow:ellipsis;display:inherit;line-clamp:inherit;-webkit-line-clamp:inherit;-webkit-box-orient:inherit;overflow:hidden}:host([gutter-top][variant^=heading-]),:host([gutter-top][variant^=body-]),:host([gutter-top][variant^=caption-]){margin-top:var(--goto-layout-06)}:host([gutter-top][variant^=code-]){margin-top:var(--goto-spacing-00)}:host([gutter-bottom][variant^=heading-]){margin-bottom:var(--goto-spacing-06)}:host([gutter-bottom][variant^=body-]),:host([gutter-bottom][variant^=caption-]){margin-bottom:var(--goto-spacing-04)}:host([gutter-bottom][variant^=code-]){margin-bottom:var(--goto-spacing-00)}:host([gutter-top][variant^=heading-small]){margin-top:var(--goto-layout-05)}:host([gutter-top][variant^=body-large]){margin-top:var(--goto-layout-04)}:host([gutter-top][variant^=body-medium]){margin-top:var(--goto-layout-03)}"),h([Te()],Hl.prototype,"tag",void 0),h([Te()],Hl.prototype,"color",void 0),h([Te({reflect:!0})],Hl.prototype,"variant",void 0),h([Te({reflect:!0,attribute:"gutter-bottom",type:Boolean})],Hl.prototype,"gutterBottom",void 0),h([Te({reflect:!0,attribute:"gutter-top",type:Boolean})],Hl.prototype,"gutterTop",void 0),h([Te({reflect:!0,attribute:"line-clamp",type:Number})],Hl.prototype,"lineClamp",void 0),h([Te({reflect:!0,attribute:"nowrap",type:Boolean})],Hl.prototype,"nowrap",void 0);
302class jl extends Hi{constructor(){super(),this.size="medium",this.variant="primary",this.fullWidth=!1,this.fullwidth=!1,this.isLoading=!1,new ji(this),new Vi(this,()=>this.isAriaDisabled)}get isAriaDisabled(){return this.disabled||this.isLoading||"true"===this.ariaDisabled}connectedCallback(){super.connectedCallback()}willUpdate(e){e.has("variant")&&this.handleFallback(),e.has("fullwidth")}updated(e){super.updated(e),(e.has("label")||e.has("labelId"))&&this.setAccessibleLabel()}async setAccessibleLabel(){await this.updateComplete,this.labelId?this.setAttribute("aria-labelledby",this.labelId):this.label&&this.control?.setAttribute("aria-label",this.label)}validateAccessibleLabel(){this.control?.getAttribute("aria-label")?.length||this.getAttribute("aria-labelledby")?.length||console.error("CHAMELEON-A11Y: Button component must have an accessible label provided by either \n  1) text content \n  2) a visible label whose id is given as the attribute labelId \n  3) a non-empty label attribute to be used as aria-label.\n")}handleFallback(){const{checkDeprecatedSlot:e}={checkDeprecatedSlot:(e,t)=>{}};e("start","leading-icon"),e("end","trailing-icon");const{guardedValue:t}=Fi({"tertiary-neutral":"tertiary","neutral-inverse":"inverted","brand-primary":"primary","brand-tertiary":"secondary","neutral-secondary":"neutral","neutral-tertiary":"tertiary","danger-primary":"danger","danger-tertiary":"danger","inverted-primary":"inverted","inverted-secondary-bright":"inverted","inverted-secondary-dim":"inverted"},{forMissing:this.variant,forRemoved:"neutral",message:Fi.defaultMessageFnForVariants("[Chameleon Button]")}),r=t(this.variant);this.variant=r.value,null!==r.message&&console.warn(r.message)}render(){const e=Oi(u(mr));return Ni`
303      <button
304        class="control"
305        part="control"
306        ?autofocus="${this.autofocus}"
307        form="${this.form??le}"
308        formaction="${this.formaction??le}"
309        formenctype="${this.formenctype??le}"
310        formmethod="${this.formmethod??le}"
311        ?formnovalidate="${this.formnovalidate}"
312        formtarget="${this.formtarget??le}"
313        name="${this.name??le}"
314        type="${this.type}"
315        value="${this.value??le}"
316        aria-atomic="${this.ariaAtomic??le}"
317        aria-busy="${this.ariaBusy??le}"
318        aria-controls="${this.ariaControls??le}"
319        aria-current="${this.ariaCurrent??le}"
320        aria-disabled="${this.isAriaDisabled}"
321        aria-expanded="${this.ariaExpanded??le}"
322        aria-haspopup="${this.ariaHasPopup??le}"
323        aria-hidden="${this.ariaHidden??le}"
324        aria-invalid="${this.ariaInvalid??le}"
325        aria-keyshortcuts="${this.ariaKeyShortcuts??le}"
326        aria-label="${this.ariaLabel??le}"
327        aria-live="${this.ariaLive??le}"
328        aria-pressed="${this.ariaPressed??le}"
329        aria-relevant="${this.ariaRelevant??le}"
330        aria-roledescription="${this.ariaRoleDescription??le}"
331      >
332        <${e} class="loading-icon" aria-label="Loading icon" aria-hidden="true">${Mi(Bi)}</${e}>
333        <slot name="leading-icon" part="leading-icon" class="leading-icon">
334          <slot name="start"></slot>
335        </slot>
336        <slot part="content" class="content"></slot>
337        <slot name="trailing-icon" part="trailing-icon" class="trailing-icon">
338          <slot name="end"></slot>
339        </slot>
340      </button>
341    `}}jl.baseName="button",jl.styles=b(":host .control:focus-visible,:host:host(.selected-interactive-item) .control{outline-color:var(--goto-focus-color-highlight-default)}:host([variant=primary]) .control{color:var(--goto-type-color-inverted);background-color:var(--goto-interactive-color-primary-default);--goto-icon-color:var(--goto-icon-color-inverted)}:host([variant=primary]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-inverted))}:host([variant=primary]) .control:hover{background-color:var(--goto-interactive-color-primary-hover)}:host([variant=primary]) .control:active,:host([variant=primary]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-primary-pressed)}:host([variant=primary]):host([disabled]) .control,:host([variant=primary]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=secondary]) .control{color:var(--goto-type-color-brand-default);--goto-icon-color:var(--goto-icon-color-brand-default);background-color:#0000}:host([variant=secondary]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-brand-default))}:host([variant=secondary]) .control:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host([variant=secondary]) .control:active,:host([variant=secondary]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-secondary-pressed)}:host([variant=secondary]):host([disabled]) .control,:host([variant=secondary]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=secondary-filled]) .control{color:var(--goto-type-color-brand-default);background-color:var(--goto-interactive-color-neutral-secondary-default);--goto-icon-color:var(--goto-icon-color-on-neutral-secondary-default)}:host([variant=secondary-filled]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-on-neutral-secondary-default))}:host([variant=secondary-filled]) .control:hover{background-color:var(--goto-interactive-color-neutral-secondary-hover)}:host([variant=secondary-filled]) .control:active,:host([variant=secondary-filled]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-neutral-secondary-pressed)}:host([variant=secondary-filled]):host([disabled]) .control,:host([variant=secondary-filled]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=tertiary]) .control{color:var(--goto-type-color-default);--goto-icon-color:var(--goto-icon-color-default);background-color:#0000}:host([variant=tertiary]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-default))}:host([variant=tertiary]) .control:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host([variant=tertiary]) .control:active,:host([variant=tertiary]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-secondary-pressed)}:host([variant=tertiary]):host([disabled]) .control,:host([variant=tertiary]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=neutral]) .control{color:var(--goto-type-color-default);--goto-icon-color:var(--goto-icon-color-default);background-color:#0000}:host([variant=neutral]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-default))}:host([variant=neutral]) .control:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host([variant=neutral]) .control:active,:host([variant=neutral]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-secondary-pressed)}:host([variant=neutral]):host([disabled]) .control,:host([variant=neutral]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=success]) .control{color:var(--goto-type-color-inverted);background-color:var(--goto-interactive-color-success-default);--goto-icon-color:var(--goto-icon-color-inverted)}:host([variant=success]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-inverted))}:host([variant=success]) .control:hover{background-color:var(--goto-interactive-color-success-hover)}:host([variant=success]) .control:active,:host([variant=success]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-success-pressed)}:host([variant=success]):host([disabled]) .control,:host([variant=success]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=danger]) .control{color:var(--goto-type-color-inverted);background-color:var(--goto-interactive-color-danger-default);--goto-icon-color:var(--goto-icon-color-inverted)}:host([variant=danger]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-inverted))}:host([variant=danger]) .control:hover{background-color:var(--goto-interactive-color-danger-hover)}:host([variant=danger]) .control:active,:host([variant=danger]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-danger-pressed)}:host([variant=danger]):host([disabled]) .control,:host([variant=danger]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=inverted]) .control{color:var(--goto-type-color-inverted);--goto-icon-color:var(--goto-icon-color-inverted);background-color:#0000}:host([variant=inverted]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-inverted))}:host([variant=inverted]) .control:hover{background-color:var(--goto-interactive-color-primary-hover)}:host([variant=inverted]) .control:active,:host([variant=inverted]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-primary-pressed)}:host([variant=inverted]):host([disabled]) .control,:host([variant=inverted]):host([is-loading]) .control{color:var(--goto-type-color-inverted);--goto-icon-color:var(--goto-icon-color-inverted);background-color:#0000}:host([variant=inverted]) .control:focus-visible,:host([variant=inverted]):host(.selected-interactive-item) .control{outline-color:var(--goto-focus-border-color-default)}@keyframes button-loading{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes button-loading-half{0%,to{transform:rotate(180deg)}}:host{box-sizing:border-box;border-radius:var(--goto-radius-small);display:inline-flex}:host .control{border-radius:inherit;cursor:pointer;white-space:nowrap;border:none;justify-content:center;align-items:center;display:flex;position:relative}:host([is-loading]),:host([disabled]){cursor:not-allowed}:host([is-loading]) .control,:host([disabled]) .control{pointer-events:none}:host .control:focus-visible,:host(.selected-interactive-item) .control{outline-offset:2px;outline-width:1px;outline-style:solid}:host .loading-icon{display:none}:host([isloading]) .loading-icon,:host([is-loading]) .loading-icon{animation-direction:normal;animation-delay:0s;animation-duration:var(--goto-duration-sluggish);animation-iteration-count:infinite;animation-play-state:running;animation-fill-mode:forwards;animation-timing-function:var(--goto-standard-easing);
341animation-name:var(--button-loading-animation-name,button-loading);display:flex}:host([isloading]) .leading-icon,:host([isloading]) .trailing-icon,:host([is-loading]) .leading-icon,:host([is-loading]) .trailing-icon{display:none}:host([size=xlarge]) .control{gap:var(--goto-spacing-02);height:var(--goto-spacing-09);padding:var(--goto-spacing-03)var(--goto-spacing-05);font:var(--goto-button-xlarge);--goto-icon-size:var(--goto-spacing-06)}:host([size=large]) .control{gap:var(--goto-spacing-02);height:var(--goto-spacing-08);padding:var(--goto-spacing-02)var(--goto-spacing-04);font:var(--goto-button-large);--goto-icon-size:var(--goto-spacing-05)}:host([size=medium]) .control{gap:var(--goto-spacing-01);height:var(--goto-spacing-07);padding:var(--goto-spacing-01)var(--goto-spacing-03);font:var(--goto-button-medium);--goto-icon-size:var(--goto-spacing-04)}:host([size=small]) .control{gap:var(--goto-spacing-01);height:var(--goto-spacing-06);padding:calc(var(--goto-spacing-01)/2)var(--goto-spacing-02);font:var(--goto-button-small);--goto-icon-size:var(--goto-spacing-04)}:host([fullwidth]),:host([full-width]),.control{width:100%}:host([variant=secondary]) .control,:host([variant=neutral]) .control{box-shadow:inset 0 0 0 1px var(--goto-border-color-default)}:host([variant=inverted]) .control{box-shadow:inset 0 0 0 1px var(--goto-border-color-inverted)}:host([variant=primary]):host([size=medium]) .control,:host([variant=secondary]):host([size=medium]) .control,:host([variant=tertiary]):host([size=medium]) .control,:host([variant=neutral]):host([size=medium]) .control,:host([variant=success]):host([size=medium]) .control,:host([variant=danger]):host([size=medium]) .control,:host([variant=inverted]):host([size=medium]) .control{gap:var(--goto-spacing-02)}"),h([Te({reflect:!0})],jl.prototype,"size",void 0),h([Te({reflect:!0})],jl.prototype,"variant",void 0),h([Te({type:Boolean,reflect:!0,attribute:"full-width"})],jl.prototype,"fullWidth",void 0),h([Te({type:Boolean,reflect:!0,attribute:"fullwidth"})],jl.prototype,"fullwidth",void 0),h([Te({type:Boolean,reflect:!0,attribute:"is-loading"})],jl.prototype,"isLoading",void 0),h([Te({attribute:"label-id"})],jl.prototype,"labelId",void 0),h([Te()],jl.prototype,"label",void 0),h([$e(".control")],jl.prototype,"control",void 0);const Vl=["marketing"],Wl=["danger","success"];class Kl extends El{constructor(){super(...arguments),this.variant="neutral",this.role="status",this.ariaLive="polite"}firstUpdated(e){super.firstUpdated(e);const t=qi(this);t&&(this.toggleAttribute("data-high-contrast",t.classList.contains("enable-high-contrast")),new MutationObserver(()=>{this.toggleAttribute("data-high-contrast",t.classList.contains("enable-high-contrast"))}).observe(t,{attributes:!0,attributeFilter:["class"]}))}updated(e){if(super.updated(e),e.has("variant")){const e=Wl.includes(this.variant);this.role=e?"alert":"status",this.ariaLive=e?"assertive":"polite"}this.actionSlot?.length>0&&(this.hasAction=!!this.actionSlot[0]?.textContent),this.iconSlot?.length>0&&this.iconSlot[0].style.setProperty("--goto-icon-size","20px"),this.dismissText?.length>0&&(this.displayDismiss=this.dismissText.length>0)}actionClick(){const e=this.actionSlot[0],t=e?.href,r=e?.target;t?window.open(t,r):e.click(),this.dispatchEvent(new Event("action-click",{bubbles:!1}))}render(){const e=Oi(u(Hl)),t=Oi(u(jl)),r=Oi(u(Wi)),n=Oi(u(mr)),o=this.variant&&Vl.includes(this.variant)?"inherit":"type-color-inverted",i=this.closable?"true":"false",s=this.multiline?"true":"false";return Ni`
342      <div class="banner-main-content" data-closeable="${i}" data-multiline="${s}">
343        <${e} color="${o}">
344          <slot name="icon"></slot>
345        </${e}>
346        <${e} color="${o}">
347          <slot></slot>
348        </${e}>
349        <slot name="action"></slot>
350      </div>
351      ${this.multiline?Ni`
352        <div class="banner-actions" data-display-dismiss="${Bl(this.displayDismiss)}">
353          <slot name="dismiss" part="dismiss">
354            <${t}
355              class="dismiss-button"
356              variant="${"inverted"}"
357              size="small"
358              aria-label="${this.closeLabel}"
359              @click=${()=>this.close()}
360            >
361              <${e}
362                variant="button-small"
363                color="inherit"
364              >
365                <slot name="dismisstext"></slot>
366              </${e}>
367            </${t}>
368          </slot>
369        </div>
370      `:""}
371      ${this.closable&&!this.multiline?Ni`
372        <${r}
373          variant="${"primary"}"
374          size="small"
375          label="${this.closeLabel}"
376          @click=${()=>this.close()}
377        >
378          <${n}>${Mi(Sl)}</${n}>
379        </${r}>
380      `:""}
381    `}}function ql(e={}){return vr(e),d(jl,e)}function Gl(e={}){d(Hl,e)}function Zl(...e){return e.every(e=>e instanceof HTMLElement)}Kl.baseName="banner",Kl.styles=b(":host{font:var(--goto-body-small);color:var(--goto-type-color-inverted);background-color:var(--goto-surface-color-inverted);box-sizing:border-box;gap:var(--goto-spacing-02);padding-inline:var(--goto-spacing-03);padding-block:var(--goto-spacing-01);--goto-icon-size:var(--goto-spacing-05);--goto-icon-color:var(--goto-icon-color-inverted);justify-content:center;align-items:center;display:flex;position:relative}:host .banner-main-content{justify-content:center;align-items:center;gap:var(--goto-spacing-02);display:flex;position:relative}:host .banner-main-content[data-closeable=true]{margin-left:auto}:host .banner-main-content[data-multiline=true]{margin-left:var(--goto-spacing-00);margin-right:auto}:host .banner-actions{align-items:baseline;gap:var(--goto-spacing-02);display:flex}:host .banner-actions[data-display-dismiss=false] chameleon-button.dismiss-button{display:none}:host chameleon-icon-button{margin-left:auto}:host chameleon-svg{--goto-icon-size:var(--goto-spacing-05);--goto-icon-color:var(--goto-icon-color-inverted)!important}::slotted(p){margin:var(--goto-spacing-00)}:host([variant=success]){background-color:var(--goto-surface-color-success-default)}:host([variant=danger]){background-color:var(--goto-surface-color-danger-default)}:host([variant=marketing]){--goto-icon-color:var(--goto-type-color-inverted-persistent);background-color:var(--goto-brand-color-primary-yellow);color:var(--goto-type-color-inverted-persistent)}:host([variant=marketing]) ::slotted(a[slot=action]),:host([variant=marketing]) ::slotted(chameleon-link[slot=action]){--goto-link-color:var(--goto-type-color-inverted-persistent)}:host([variant=marketing]) chameleon-svg{--goto-icon-color:var(--goto-type-color-inverted-persistent)!important}:host([variant=marketing][data-high-contrast]){--goto-icon-color:var(--goto-icon-color-inverted);color:var(--goto-type-color-inverted)}:host([variant=marketing][data-high-contrast]) ::slotted(a[slot=action]),:host([variant=marketing][data-high-contrast]) ::slotted(chameleon-link[slot=action]){--goto-link-color:var(--goto-type-color-inverted)}:host([variant=marketing][data-high-contrast]) chameleon-svg{--goto-icon-color:var(--goto-icon-color-inverted)!important}::slotted(a[slot=action]),::slotted(chameleon-link[slot=action]){cursor:pointer;margin-left:-var(--goto-spacing-02);text-decoration:var(--goto-link-text-decoration);--goto-link-color:var(--goto-type-color-inverted);--goto-link-text-decoration:underline}:host([multiline]){gap:var(--goto-spacing-04);padding:var(--goto-spacing-04);flex-direction:column;justify-content:flex-start;align-items:flex-end}
381:host([multiline]) ::part(control){border-color:inherit}:host([multiline]) .banner-main-content{align-items:flex-start}@media (width<=48rem){:host{gap:var(--goto-spacing-04);padding:var(--goto-spacing-04);justify-content:flex-start}:host .banner-main-content{justify-content:flex-start;gap:var(--goto-spacing-02)}:host .banner-main-content[data-closeable=true]{margin-left:var(--goto-spacing-00)}}"),h([Te({type:Boolean,reflect:!0})],Kl.prototype,"multiline",void 0),h([Te({reflect:!0})],Kl.prototype,"variant",void 0),h([Te({type:Boolean,reflect:!0,attribute:"has-action"})],Kl.prototype,"hasAction",void 0),h([Te({type:Boolean,reflect:!0,attribute:"displaydismiss"})],Kl.prototype,"displayDismiss",void 0),h([Ne({slot:"action"})],Kl.prototype,"actionSlot",void 0),h([Ne({slot:"icon"})],Kl.prototype,"iconSlot",void 0),h([Ne({slot:"dismisstext"})],Kl.prototype,"dismissText",void 0),function(e={}){vr(e),Gl(e),gl(e),ql(e),fl(e),d(Kl,e)}(),ql();const Yl="menuitem",Jl="menuitemcheckbox",Ql="menuitemradio",Xl={[Yl]:"menuitem",[Jl]:"menuitemcheckbox",[Ql]:"menuitemradio"};var ec;!function(e){e.ltr="ltr",e.rtl="rtl"}(ec||(ec={}));class tc{handleStartContentChange(){this.startContainer.classList.toggle("start",this.start.assignedNodes().length>0)}handleEndContentChange(){this.endContainer.classList.toggle("end",this.end.assignedNodes().length>0)}}const rc=(e,t)=>ri`
382    <span
383        part="end"
384        ${li("endContainer")}
385        class=${e=>t.end?"end":void 0}
386    >
387        <slot name="end" ${li("end")} @slotchange="${e=>e.handleEndContentChange()}">
388            ${t.end||""}
389        </slot>
390    </span>
391`,nc=(e,t)=>ri`
392    <span
393        part="start"
394        ${li("startContainer")}
395        class="${e=>t.start?"start":void 0}"
396    >
397        <slot
398            name="start"
399            ${li("start")}
400            @slotchange="${e=>e.handleStartContentChange()}"
401        >
402            ${t.start||""}
403        </slot>
404    </span>
405`;function oc(e,...t){const r=Gr.locate(e);t.forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(r=>{"constructor"!==r&&Object.defineProperty(e.prototype,r,Object.getOwnPropertyDescriptor(t.prototype,r))}),Gr.locate(t).forEach(e=>r.push(e))})}ri`
406    <span part="end" ${li("endContainer")}>
407        <slot
408            name="end"
409            ${li("end")}
410            @slotchange="${e=>e.handleEndContentChange()}"
411        ></slot>
412    </span>
413`,ri`
414    <span part="start" ${li("startContainer")}>
415        <slot
416            name="start"
417            ${li("start")}
418            @slotchange="${e=>e.handleStartContentChange()}"
419        ></slot>
420    </span>
421`;class ic extends Jn{constructor(){super(...arguments),this.role=Yl,this.hasSubmenu=!1,this.currentDirection=ec.ltr,this.focusSubmenuOnLoad=!1,this.handleMenuItemKeyDown=e=>{if(e.defaultPrevented)return!1;switch(e.key){case"Enter":case" ":return this.invoke(),!1;case bi:return this.expandAndFocus(),!1;case vi:if(this.expanded)return this.expanded=!1,this.focus(),!1}return!0},this.handleMenuItemClick=e=>(e.defaultPrevented||this.disabled||this.invoke(),!1),this.submenuLoaded=()=>{this.focusSubmenuOnLoad&&(this.focusSubmenuOnLoad=!1,this.hasSubmenu&&(this.submenu.focus(),this.setAttribute("tabindex","-1")))},this.handleMouseOver=e=>(this.disabled||!this.hasSubmenu||this.expanded||(this.expanded=!0),!1),this.handleMouseOut=e=>(!this.expanded||this.contains(document.activeElement)||(this.expanded=!1),!1),this.expandAndFocus=()=>{this.hasSubmenu&&(this.focusSubmenuOnLoad=!0,this.expanded=!0)},this.invoke=()=>{if(!this.disabled)switch(this.role){case Jl:this.checked=!this.checked;break;case Yl:this.updateSubmenu(),this.hasSubmenu?this.expandAndFocus():this.$emit("change");break;case Ql:this.checked||(this.checked=!0)}},this.updateSubmenu=()=>{this.submenu=this.domChildren().find(e=>"menu"===e.getAttribute("role")),this.hasSubmenu=void 0!==this.submenu}}expandedChanged(e){if(this.$fastController.isConnected){if(void 0===this.submenu)return;!1===this.expanded?this.submenu.collapseExpandedItem():this.currentDirection=(()=>{const e=this.closest("[dir]");return null!==e&&"rtl"===e.dir?ec.rtl:ec.ltr})(),this.$emit("expanded-change",this,{bubbles:!1})}}checkedChanged(e,t){this.$fastController.isConnected&&this.$emit("change")}connectedCallback(){super.connectedCallback(),Tr.queueUpdate(()=>{this.updateSubmenu()}),this.startColumnCount||(this.startColumnCount=1),this.observer=new MutationObserver(this.updateSubmenu)}disconnectedCallback(){super.disconnectedCallback(),this.submenu=void 0,void 0!==this.observer&&(this.observer.disconnect(),this.observer=void 0)}domChildren(){return Array.from(this.children).filter(e=>!e.hasAttribute("hidden"))}}nn([Qr({mode:"boolean"})],ic.prototype,"disabled",void 0),nn([Qr({mode:"boolean"})],ic.prototype,"expanded",void 0),nn([Nr],ic.prototype,"startColumnCount",void 0),nn([Qr],ic.prototype,"role",void 0),nn([Qr({mode:"boolean"})],ic.prototype,"checked",void 0),nn([Nr],ic.prototype,"submenuRegion",void 0),nn([Nr],ic.prototype,"hasSubmenu",void 0),nn([Nr],ic.prototype,"currentDirection",void 0),nn([Nr],ic.prototype,"submenu",void 0),oc(ic,tc);class sc extends Jn{constructor(){super(...arguments),this.expandedItem=null,this.focusIndex=-1,this.isNestedMenu=()=>null!==this.parentElement&&Zl(this.parentElement)&&"menuitem"===this.parentElement.getAttribute("role"),this.handleFocusOut=e=>{if(!this.contains(e.relatedTarget)&&void 0!==this.menuItems){this.collapseExpandedItem();const e=this.menuItems.findIndex(this.isFocusableElement);this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.menuItems[e].setAttribute("tabindex","0"),this.focusIndex=e}},this.handleItemFocus=e=>{const t=e.target;void 0!==this.menuItems&&t!==this.menuItems[this.focusIndex]&&(this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.focusIndex=this.menuItems.indexOf(t),t.setAttribute("tabindex","0"))},this.handleExpandedChanged=e=>{if(e.defaultPrevented||null===e.target||void 0===this.menuItems||this.menuItems.indexOf(e.target)<0)return;e.preventDefault();const t=e.target;null===this.expandedItem||t!==this.expandedItem||!1!==t.expanded?t.expanded&&(null!==this.expandedItem&&this.expandedItem!==t&&(this.expandedItem.expanded=!1),this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.expandedItem=t,this.focusIndex=this.menuItems.indexOf(t),t.setAttribute("tabindex","0")):this.expandedItem=null},this.removeItemListeners=()=>
421{void 0!==this.menuItems&&this.menuItems.forEach(e=>{e.removeEventListener("expanded-change",this.handleExpandedChanged),e.removeEventListener("focus",this.handleItemFocus)})},this.setItems=()=>{const e=this.domChildren();this.removeItemListeners(),this.menuItems=e;const t=this.menuItems.filter(this.isMenuItemElement);t.length&&(this.focusIndex=0);const r=t.reduce((e,t)=>{const r=function(e){const t=e.getAttribute("role"),r=e.querySelector("[slot=start]");return t!==Yl&&null===r||t===Yl&&null!==r?1:t!==Yl&&null!==r?2:0}(t);return e>r?e:r},0);t.forEach((e,t)=>{e.setAttribute("tabindex",0===t?"0":"-1"),e.addEventListener("expanded-change",this.handleExpandedChanged),e.addEventListener("focus",this.handleItemFocus),(e instanceof ic||"startColumnCount"in e)&&(e.startColumnCount=r)})},this.changeHandler=e=>{if(void 0===this.menuItems)return;const t=e.target,r=this.menuItems.indexOf(t);if(-1!==r&&"menuitemradio"===t.role&&!0===t.checked){for(let e=r-1;e>=0;--e){const t=this.menuItems[e],r=t.getAttribute("role");if(r===Ql&&(t.checked=!1),"separator"===r)break}const e=this.menuItems.length-1;for(let t=r+1;t<=e;++t){const e=this.menuItems[t],r=e.getAttribute("role");if(r===Ql&&(e.checked=!1),"separator"===r)break}}},this.isMenuItemElement=e=>Zl(e)&&sc.focusableElementRoles.hasOwnProperty(e.getAttribute("role")),this.isFocusableElement=e=>this.isMenuItemElement(e)}itemsChanged(e,t){this.$fastController.isConnected&&void 0!==this.menuItems&&this.setItems()}connectedCallback(){super.connectedCallback(),Tr.queueUpdate(()=>{this.setItems()}),this.addEventListener("change",this.changeHandler)}disconnectedCallback(){super.disconnectedCallback(),this.removeItemListeners(),this.menuItems=void 0,this.removeEventListener("change",this.changeHandler)}focus(){this.setFocus(0,1)}collapseExpandedItem(){null!==this.expandedItem&&(this.expandedItem.expanded=!1,this.expandedItem=null)}handleMenuKeyDown(e){if(!e.defaultPrevented&&void 0!==this.menuItems)switch(e.key){case mi:return void this.setFocus(this.focusIndex+1,1);case yi:return void this.setFocus(this.focusIndex-1,-1);case"End":return void this.setFocus(this.menuItems.length-1,-1);case"Home":return void this.setFocus(0,1);default:return!0}}domChildren(){return Array.from(this.children).filter(e=>!e.hasAttribute("hidden"))}setFocus(e,t){if(void 0!==this.menuItems)for(;e>=0&&e<this.menuItems.length;){const r=this.menuItems[e];if(this.isFocusableElement(r)){this.focusIndex>-1&&this.menuItems.length>=this.focusIndex-1&&this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.focusIndex=e,r.setAttribute("tabindex","0"),r.focus();break}e+=t}}}sc.focusableElementRoles=Xl,nn([Nr],sc.prototype,"items",void 0);class ac extends(s(sc)){connectedCallback(){super.connectedCallback(),this.setAccessibleLabel()}labelChanged(){this.isConnected&&this.setAccessibleLabel()}labelIdChanged(){this.isConnected&&this.setAccessibleLabel()}isSubmenu(){return"submenu"===this.getAttribute("slot")}setAccessibleLabel(){this.labelId?this.setAttribute("aria-labelledby",this.labelId):this.label&&this.setAttribute("aria-label",this.label)}validateAccessibleLabel(){if(!this.getAttribute("aria-label")?.length&&!this.getAttribute("aria-labelledby")?.length){if(this.isSubmenu())return void console.error("CHAMELEON-A11Y: SubMenu component must have an accessible label provided by either \n    1) a visible label whose id is given as the attribute label-id/labelId\n    2) a non-empty label attribute to be used as aria-label.\n    ");console.error("CHAMELEON-A11Y: Menu component must have an accessible label provided by either \n    1) a visible label whose id is given as the attribute label-id/labelId\n    2) a non-empty label attribute to be used as aria-label.\n    ")}}}h([Qr],ac.prototype,"label",void 0),h([Qr({attribute:"label-id"})],ac.prototype,"labelId",void 0);class lc extends(a(ic,"menu-item")){constructor(){super(...arguments),this.size="medium",this.target="_self| _blank | _parent | _top",this.expandedViaKeyboard=!1,this.expandedByInvoke=!1,this.onResize=e=>{this.expanded&&this.pickAndApplySubmenuSide()},this.handleChangeEvent=e=>{this.$emit("menuitemclick",null,{bubbles:!0,cancelable:!0})},this.handleDescendantMenuItemClick=e=>{e.target!==this&&this.expanded&&this.collapseSubmenu()},this.handleMouseOut=e=>{if(!this.expanded)return!1;if(e.relatedTarget instanceof Node&&this.contains(e.relatedTarget))return this.clearCloseTimer(),!1;const t=document.activeElement;return t&&this.contains(t)&&["menuitem","menuitemradio","menuitemcheckbox"].includes(t.getAttribute("role")??"")?(this.clearCloseTimer(),!1):e.relatedTarget instanceof Element&&e.relatedTarget.parentElement===this.parentElement?(this.collapseSubmenu(),!1):(this.scheduleCollapse(),!1)},this.fastHandleMouseOver=this.handleMouseOver,this.handleMouseOver=e=>(this.clearCloseTimer(),this.fastHandleMouseOver(e)),this.fastHandleMenuItemKeyDown=this.handleMenuItemKeyDown,this.handleMenuItemKeyDown=e=>{if(this.checkForNestedButton(e))return!0;
421if("ArrowRight"!==e.key&&"Enter"!==e.key&&" "!==e.key||!this.hasSubmenu||this.expanded||(this.expandedViaKeyboard=!0),("Enter"===e.key||" "===e.key)&&this.hasSubmenu&&this.expanded&&this.expandedByInvoke)return this.collapseSubmenu(),!1;const t=this.fastHandleMenuItemKeyDown(e);return this.hasSubmenu&&(this.expandedByInvoke=this.expanded),"A"===this.parentElement?.tagName||t},this.handleMenuItemClick=e=>!e.defaultPrevented&&!this.disabled&&!(!this.checkForNestedButton(e)&&(this.href?(window.open(this.href,this.target||"_self"),0):"A"!==this.parentElement?.tagName&&(this.hasSubmenu&&this.expanded&&this.expandedByInvoke?(this.collapseSubmenu(),1):(this.invoke(),this.hasSubmenu&&(this.expandedByInvoke=this.expanded),1))))}clearCloseTimer(){void 0!==this.closeTimer&&(clearTimeout(this.closeTimer),this.closeTimer=void 0)}scheduleCollapse(){this.clearCloseTimer(),this.closeTimer=setTimeout(()=>{this.closeTimer=void 0;const e=document.activeElement;e&&this.contains(e)&&["menuitem","menuitemradio","menuitemcheckbox"].includes(e.getAttribute("role")??"")||this.collapseSubmenu()},400)}collapseSubmenu(){this.clearCloseTimer(),this.expanded=!1,this.expandedByInvoke=!1}connectedCallback(){super.connectedCallback(),this.setAccessibleLabel(),this.addEventListener("change",this.handleChangeEvent),this.addEventListener("menuitemclick",this.handleDescendantMenuItemClick),"small"===this.size&&this.setBadgeCounterSize(),window.addEventListener("resize",this.onResize)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",this.handleChangeEvent),this.removeEventListener("menuitemclick",this.handleDescendantMenuItemClick),window.removeEventListener("resize",this.onResize),this.clearCloseTimer()}attributeChangedCallback(e,t,r){super.attributeChangedCallback(e,t,r),"expanded"===e&&(null!==r?requestAnimationFrame(()=>{this.pickAndApplySubmenuSide(),this.focusFirstSubmenuItem()}):this.submenuSide=void 0)}pickAndApplySubmenuSide(){const e=this.shadowRoot?.querySelector(".submenu-region");if(!e)return;const t=this.getBoundingClientRect(),r=e.getBoundingClientRect(),n=window.innerWidth,o=window.innerHeight,i=o-t.top,s=t.bottom>i;e.style.top=s?`${Math.max(0,t.bottom-r.height)}px`:`${t.top}px`;const a=s?o-t.bottom:t.top;e.style.setProperty("--menu-top",`${a}px`);const l=n-t.right,c=t.left,d=r.width<=l,u=r.width<=c;l>
421=c?(this.submenuSide="end",e.style.left=d||u?`${t.right}px`:t.right-(t.right+r.width-n)+"px"):(this.submenuSide="start",e.style.left=d||u?t.left-r.width+"px":t.left-r.width+(r.width-t.left)+"px"),e.style.opacity="1"}focusFirstSubmenuItem(){if(!this.expandedViaKeyboard)return;this.expandedViaKeyboard=!1;const e=this.shadowRoot?.querySelector(".submenu-region");if(!e)return;const t=e.querySelector("slot");if(!t)return;const r=t.assignedElements();if(0===r.length)return;const n=r[0]?.querySelector('[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]');n&&requestAnimationFrame(()=>{n.focus()})}checkForNestedButton(e){const t=e.composedPath();for(const e of t){if(e===this)break;if(e instanceof HTMLElement&&"BUTTON"===e.tagName)return!0}return!1}setBadgeCounterSize(){const e=u(Ui,{optional:!0});if("TAG_NOT_FOUND"!==e){const t=this.end.assignedElements();if(0!==t.length)for(const r of t)r.tagName===e&&r.setAttribute("size",this.size)}}getInternalTextContent(){return this.textContent?.replaceAll(/<svg(.*?)<\\\/svg>/gi,"")}setAccessibleLabel(){this.getInternalTextContent()}}h([Qr],lc.prototype,"size",void 0),h([Qr],lc.prototype,"href",void 0),h([Qr],lc.prototype,"target",void 0),h([Qr({attribute:"submenu-side"})],lc.prototype,"submenuSide",void 0);class cc extends(s(Jn)){constructor(){super(...arguments),this.separator=!0}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","listitem")}activeChanged(e,t){t?this.setAttribute("aria-current","page"):this.removeAttribute("aria-current")}}h([Qr()],cc.prototype,"href",void 0),h([Qr()],cc.prototype,"target",void 0),h([Nr],cc.prototype,"separator",void 0),h([Qr({mode:"boolean"})],cc.prototype,"active",void 0);class dc extends(a(Jn,"breadcrumb")){variantChanged(e,t){if(!this.isConnected)return;const r=Array.from(this.children);"overflow-content"===t&&r.length>4&&this.distributeItemsToSlots()}constructor(){super(),this.variant="default",this.moreMenuLabel="More",this.label="Breadcrumb",this.items=[],this.childrenObserverCallback=e=>{if(this.isConnected)for(const t of e)this.items=Array.from(t.target.children),this.distributeItemsToSlots()},this.childrenObserver=new MutationObserver(this.childrenObserverCallback)}connectedCallback(){super.connectedCallback(),this.childrenObserver.observe(this,{childList:!0}),this.items=Array.from(this.children),this.distributeItemsToSlots()}disconnectedCallback(){super.disconnectedCallback(),this.childrenObserver.disconnect()}distributeItemsToSlots(){if(this.items.length<=4){this.menuBreadcrumbItem.classList.remove("visible");for(let e=0;e<this.items.length;e++){const t=this.items[e];t.separator=!0,t.removeAttribute("slot"),t.hasAttribute("data-href")&&(t.setAttribute("href",t.getAttribute("data-href")),t.removeAttribute("data-href")),e===this.items.length-1?(t.separator=!1,t.active=!0,t.hasAttribute("href")&&(t.setAttribute("data-href",t.getAttribute("href")),t.removeAttribute("href"))):t.active=!1}}else{for(this.menuBreadcrumbItem.classList.add("visible");this.menu.firstChild;)this.menu.removeChild(this.menu.firstChild);for(let e=0;e<this.items.length;e++){const t=this.items[e];if(e<this.items.length-2&&t.removeAttribute("slot"),e>0&&e<this.items.length-2){const r=u(lc),n=document.createElement(r),o=document.createElement("slot");o.setAttribute("name",`menu-item-${e}`),n.appendChild(o),this.menu.appendChild(n),t.setAttribute("slot",`menu-item-${e}`),t.separator=!1}e>=this.items.length-2&&(t.setAttribute("slot","after"),t.separator=!0,t.hasAttribute("data-href")&&(t.setAttribute("href",t.getAttribute("data-href")),t.removeAttribute("data-href"))),e===this.items.length-1?(t.separator=!1,t.active=!0,t.hasAttribute("href")&&(t.setAttribute("data-href",t.getAttribute("href")??""),t.removeAttribute("href"))):t.active=!1}}}}h([Qr()],dc.prototype,"variant",void 0),h([Qr({attribute:"more-menu-label"})],dc.prototype,"moreMenuLabel",void 0),h([Qr()],dc.prototype,"label",void 0),h([Nr],dc.prototype,"menuBreadcrumbItem",void 0),h([Nr],dc.prototype,"menu",void 0);const uc={baseName:"breadcrumb",template:(e,t)=>
421{const r=u(cc),n=u(ll),o=u(ac);return ri`
422    <nav aria-label="${e=>e.label}">
423      <div role="list" class="list" part="list">
424        <slot></slot>
425        <${r} ${li("menuBreadcrumbItem")} class="menu">
426          <span id="trigger">...</span>
427          <${n} trigger-id="trigger" menu>
428            <${o} ${li("menu")} aria-label="${e=>e.moreMenuLabel}"></${o}>
429          </${n}>
430        </${r}>
431        <slot name="after"></slot>
432      </div>
433    </nav>
434  `},styles:Ci(":host nav{display:contents}:host [part=list]{align-items:center;gap:var(--goto-spacing-03);color:var(--goto-type-color-default);font:var(--goto-body-medium);display:inline-flex}:host .menu{display:none}:host .menu.visible{display:block}")},hc=dc.compose(uc),pc={baseName:"breadcrumb-item",template:(e,t)=>ri`
435  <div class="listitem" part="listitem">
436    ${Aa(e=>e.href&&e.href.length>0,ri`
437        <a
438          class="control"
439          part="control"
440          href="${e=>e.href}"
441          target="${e=>e.target}"
442          ${li("control")}
443        >
444          <span class="content" part="content">
445            <slot></slot>
446          </span>
447        </a>
448      `)}
449    ${Aa(e=>!e.href,ri`
450        <slot></slot>
451      `)}
452    ${Aa(e=>e.separator,ri`
453        <span class="separator" part="separator" aria-hidden="true">
454          <slot name="separator">${t.separator||""}</slot>
455        </span>
456      `)}
457  </div>
458`,styles:Ci(":host .listitem{white-space:nowrap}:host .listitem .control{color:var(--goto-type-color-brand-default);border-radius:var(--goto-radius-small);text-decoration:none;display:inline-block}:host .listitem .control:hover{text-decoration:underline}:host .listitem .control:focus-visible{outline-offset:2px;outline:1px solid var(--goto-focus-color-highlight-default)}:host .listitem .separator{color:var(--goto-type-color-default);margin-inline-start:var(--goto-spacing-03)}:host(.menu-item) .listitem{width:100%;height:100%}:host(.menu-item) .listitem .control{color:var(--goto-type-color-default);box-sizing:border-box;width:100%;height:100%;padding:var(--goto-spacing-02)var(--goto-spacing-04);text-decoration:none;display:block}:host(.menu-item) .listitem .control:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host(.menu-item) .listitem .separator{display:none}"),shadowOptions:{delegatesFocus:!0},separator:"/"},gc=cc.compose(pc),fc=(e,t)=>ri`
459    <template
460        slot="${e=>e.slot?e.slot:e.isNestedMenu()?"submenu":void 0}"
461        role="menu"
462        @keydown="${(e,t)=>e.handleMenuKeyDown(t.event)}"
463        @focusout="${(e,t)=>e.handleFocusOut(t.event)}"
464    >
465        <slot ${si("items")}></slot>
466    </template>
467`,mc={baseName:"menu",template:fc,styles:Ci(":host{border-radius:var(--goto-radius-small);margin:var(--goto-spacing-00);padding:var(--goto-spacing-02)var(--goto-spacing-00);width:var(--popover-width,100%);word-break:break-word;background-color:var(--goto-surface-color-default);max-height:calc(100vh - var(--menu-top) - var(--goto-spacing-04));flex-direction:column;list-style:none;display:inline-flex;overflow:hidden auto;box-sizing:border-box!important}")},vc=ac.compose(mc),bc=(e,t)=>ri`
468    <template
469        role="${e=>e.role}"
470        aria-haspopup="${e=>e.hasSubmenu?"menu":void 0}"
471        aria-checked="${e=>"menuitemradio"===e.role?!!e.checked:void 0}"
472        aria-disabled="${e=>e.disabled}"
473        aria-expanded="${e=>e.expanded}"
474        @keydown="${(e,t)=>e.handleMenuItemKeyDown(t.event)}"
475        @click="${(e,t)=>e.handleMenuItemClick(t.event)}"
476        @mouseover="${(e,t)=>e.handleMouseOver(t.event)}"
477        @mouseout="${(e,t)=>e.handleMouseOut(t.event)}"
478        class="${e=>e.disabled?"disabled":""} ${e=>e.expanded?"expanded":""} ${e=>`indent-${e.startColumnCount}`}"
479    >
480            ${Aa(e=>"menuitemcheckbox"===e.role,ri`
481                    <div part="input-container" class="input-container">
482                        <span part="checkbox" class="checkbox">
483                            <slot name="checkbox-indicator">
484                                ${t.checkboxIndicator||""}
485                            </slot>
486                        </span>
487                    </div>
488                `)}
489            ${Aa(e=>"menuitemradio"===e.role,ri`
490                    <div part="input-container" class="input-container">
491                        <span part="radio" class="radio">
492                            <slot name="radio-indicator">
493                                ${t.radioIndicator||""}
494                            </slot>
495                        </span>
496                    </div>
497                `)}
498        </div>
499        ${pi(0,t)}
500        <span class="content" part="content">
501            <slot></slot>
502        </span>
503        ${hi(0,t)}
504        ${Aa(e=>e.hasSubmenu,ri`
505            <div
506              part="expand-collapse-glyph-container"
507              class="expand-collapse-glyph-container"
508            >
509              <span part="expand-collapse" class="expand-collapse">
510                <slot name="expand-collapse-indicator">
511                  ${t.expandCollapseGlyph||""}
512                </slot>
513              </span>
514            </div>
515          `)}
516        ${Aa(e=>e.expanded,ri`
517            <div
518              class="submenu-region"
519              part="submenu-region"
520              dir="${e=>e.currentDirection}"
521            >
522              <slot name="submenu"></slot>
523            </div>
524          `)}
525    </template>
526`,yc={baseName:"menu-item",template:bc,styles:Ci(':host{--goto-icon-color:var(--goto-icon-color-default);cursor:pointer;font:var(--goto-body-small);height:var(--goto-spacing-07);border-radius:var(--goto-radius-none);width:100%;padding:var(--goto-spacing-00)var(--goto-spacing-01);color:var(--goto-type-color-default);align-items:center;gap:var(--goto-spacing-03);border:1px solid #0000;outline:0;text-decoration:none;list-style:none;transition:unset;display:inline-flex;position:relative;box-sizing:border-box!important}:host .start,:host .end{color:var(--goto-type-color-secondary);--goto-icon-size:var(--goto-spacing-05);line-height:1;display:flex}:host .start{margin-left:var(--goto-spacing-03)}:host .end{margin-right:var(--goto-spacing-03)}:host ::slotted(a){color:inherit;text-decoration:none}:host ::slotted(svg){color:var(--goto-icon-color-default);width:1.25rem;height:1.25rem}:host ::slotted([slot=end]){font:var(--goto-caption-medium)}:host .content{text-overflow:ellipsis;white-space:nowrap;flex-grow:1;overflow:hidden}:host .expand-collapse-glyph-container{display:none}:host([toggleable]){--goto-icon-color:var(--goto-icon-color-default);padding:var(--goto-spacing-00)var(--goto-spacing-04)}:host([toggleable]) .start,:host([toggleable]) .end{margin:var(--goto-spacing-00)}:host([toggleable]) [part=start]{width:var(--goto-spacing-05);display:flex}:host([toggleable]) ::slotted(svg){color:var(--goto-icon-color-default);display:none}:host([role=menuitemradio]){padding:var(--goto-spacing-00)var(--goto-spacing-04);--goto-icon-size:var(--goto-spacing-05)}:host([role=menuitemradio]) [part=start],:host([role=menuitemradio]) [part=end]{display:none}:host([role=menuitemradio]) ::slotted(svg){color:var(--goto-icon-color-brand-default)}:host([role=menuitemradio]) .radio chameleon-svg{opacity:0;visibility:hidden}:host([role=menuitemradio][checked]) .radio chameleon-svg{opacity:1;visibility:visible}:host([variant=danger]){color:var(--goto-type-color-danger);--goto-icon-color:var(--goto-icon-color-danger)}:host([variant=danger]) ::slotted(svg){color:var(--goto-icon-color-danger)}:host([variant=danger]:hover:not([disabled])){color:var(--goto-type-color-danger);--goto-icon-color:var(--goto-icon-color-danger)}:host([variant=secondary]){--goto-icon-color:var(--goto-icon-color-default)}:host([variant=secondary]) ::slotted(svg){color:var(--goto-icon-color-secondary)}:host(:not([disabled]):focus-visible){outline-offset:2px;outline:1px solid var(--goto-focus-color-highlight-default);--goto-icon-color:var(--goto-icon-color-default);color:var(--goto-type-color-default)}:host(:not([disabled]):focus-visible) .content::slotted(*){color:var(--goto-type-color-default)}:host(:not([disabled]):focus-visible) ::slotted(svg){color:var(--goto-icon-color-default)}:host(:not([disabled]):hover){background-color:var(--goto-interactive-color-secondary-hover);color:var(--goto-type-color-default);--goto-icon-color:var(--goto-icon-color-default);--goto-presence-available:var(--goto-icon-color-success);--goto-presence-busy:var(--goto-icon-color-danger);--goto-presence-away:var(--goto-icon-color-warning);--goto-presence-dnd:var(--goto-icon-color-default);--goto-presence-offline:var(--goto-icon-color-default)}:host(:not([disabled]):hover) .content::slotted(*){color:var(--goto-type-color-default)}:host(:not([disabled]):hover) ::slotted(svg){color:var(--goto-icon-color-default)}:host([disabled]),:host([disabled]:hover){color:var(--goto-type-color-disabled);cursor:not-allowed;background:0 0;border-color:#0000}:host([disabled]) ::slotted(chameleon-svg),:host([disabled]:hover) ::slotted(chameleon-svg){--goto-icon-color:var(--goto-icon-color-disabled)}:host([size=small]){--goto-icon-size:var(--goto-spacing-04);padding:var(--goto-spacing-01);font:var(--goto-caption-medium);height:var(--goto-spacing-06);gap:12px}:host([size=small]) .start,:host([size=small]) .end{--goto-icon-size:var(--goto-spacing-04)}:host([size=small]) ::slotted(svg){height:var(--goto-spacing-04);width:var(--goto-spacing-04)}:host([size=large]){--goto-icon-size:var(--goto-spacing-06);padding:var(--goto-spacing-01);font:var(--goto-body-medium);height:var(--goto-spacing-08);gap:12px}:host([size=large]) .start,:host([size=large]) .end{--goto-icon-size:var(--goto-spacing-06)}:host([size=large]) ::slotted(svg){height:var(--goto-spacing-06);width:var(--goto-spacing-06)}:host([size=large][role=menuitemradio]){padding-left:var(--goto-spacing-04)}:host .submenu-region{z-index:var(--goto-menu-z-index,1000);box-shadow:var(--goto-elevation-medium);border-radius:var(--goto-radius-medium);background:var(--goto-surface-color-default);width:var(--popover-width,fit-content);display:none;position:fixed;top:0;left:0}:host([expanded]) .submenu-region{opacity:0;display:block}:host .submenu-region:before{content:"";top:calc(-1*var(--submenu-hover-cushion,8px));bottom:calc(-1*var(--submenu-hover-cushion,8px));width:var(--submenu-hover-cushion,8px);left:calc(-1*var(--submenu-hover-cushion,8px));pointer-events:auto;position:absolute}:host .submenu-region[dir=rtl]:before,:host([submenu-side=start]) .submenu-region:before{left:auto;right:calc(-1*var(--submenu-hover-cushion,8px))}
526:host([submenu-side=start]) .submenu-region[dir=rtl]:before{right:auto;left:calc(-1*var(--submenu-hover-cushion,8px))}:host([submenu-side=over]) .submenu-region:before{display:none}'),attributes:["disabled","size"],radioIndicator:()=>{const e=u(mr);return ri`<${e}>${kl}</${e}>`}},wc=lc.compose(yc);!function(e){vr({prefix:e}),Gl({prefix:e}),To({prefix:e,node:void 0},wc,vc,wl,gc,hc)}();var xc='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M14 6H16.5858L12.2929 10.2929L13.7071 11.7071L18 7.41421V10H20V4H14V6ZM12 6H4V20H18V12H16V18H6V8H12V6Z" fill="currentColor"></path></svg>';class _c extends Zt{get opensInNewTab(){return"_blank"===this.target?.toLowerCase()}constructor(){super(),this.size="medium",this.variant="primary",this.disabled=!1,this.fullWidth=!1,this.fullwidth=!1,this.isLoading=!1,this.externalLinkLabel="Opens in a new tab",new Vi(this,()=>this.isAriaDisabled)}get isAriaDisabled(){return this.disabled||this.isLoading||"true"===this.ariaDisabled}connectedCallback(){super.connectedCallback()}willUpdate(e){e.has("variant")&&this.handleFallback(),e.has("fullwidth")}handleFallback(){const{guardedValue:e}=Fi({"brand-primary":"primary","brand-tertiary":"tertiary","neutral-secondary":"secondary"},{forMissing:this.variant,forRemoved:"secondary",message:Fi.defaultMessageFnForVariants("[Chameleon ButtonLink]")}),t=e(this.variant);this.variant=t.value,null!==t.message&&console.warn(t.message)}render(){const e=Oi(u(mr));return Ni`
527      <a
528        class="control"
529        part="control"
530        ?download="${this.download}"
531        href="${this.href}"
532        hreflang="${this.hreflang}"
533        ping="${this.ping}"
534        referrerpolicy="${this.referrerpolicy}"
535        rel="${this.rel}"
536        target="${this.target}"
537        type="${this.type}"
538        aria-atomic="${this.ariaAtomic}"
539        aria-busy="${this.ariaBusy}"
540        aria-current="${this.ariaCurrent}"
541        aria-disabled="${this.isAriaDisabled}"
542        aria-expanded="${this.ariaExpanded}"
543        aria-haspopup="${this.ariaHasPopup}"
544        aria-hidden="${this.ariaHidden}"
545        aria-invalid="${this.ariaInvalid}"
546        aria-keyshortcuts="${this.ariaKeyShortcuts}"
547        aria-label="${this.ariaLabel}"
548        aria-live="${this.ariaLive}"
549        aria-relevant="${this.ariaRelevant}"
550        aria-roledescription="${this.ariaRoleDescription}"
551      >
552        <slot part="content" class="content"></slot>
553        ${this.isLoading?Ni`<${e} part="end" class="loading-icon" aria-label="Loading icon">${Mi(Bi)}</${e}>`:Ni`
554              ${le}
555              <span part="end" class="end">
556                <slot name="end">
557                  ${this.opensInNewTab?Ni`<${e} role="img" aria-label="${this.externalLinkLabel}">${Mi(xc)}</${e}>`:Ni`<${e} aria-hidden="true">${Mi(xc)}</${e}>`}
558                </slot>
559              </span>
560            `}
561      </a>
562    `}}_c.baseName="button-link",_c.styles=b(":host .control:focus-visible,:host:host(.selected-interactive-item) .control{outline-color:var(--goto-focus-color-highlight-default)}:host([variant=primary]) .control{color:var(--goto-type-color-inverted);background-color:var(--goto-interactive-color-primary-default);--goto-icon-color:var(--goto-icon-color-inverted)}:host([variant=primary]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-inverted))}:host([variant=primary]) .control:hover{background-color:var(--goto-interactive-color-primary-hover)}:host([variant=primary]) .control:active,:host([variant=primary]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-primary-pressed)}:host([variant=primary]):host([disabled]) .control,:host([variant=primary]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=secondary]) .control{color:var(--goto-type-color-brand-default);--goto-icon-color:var(--goto-icon-color-brand-default);background-color:#0000}:host([variant=secondary]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-brand-default))}:host([variant=secondary]) .control:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host([variant=secondary]) .control:active,:host([variant=secondary]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-secondary-pressed)}:host([variant=secondary]):host([disabled]) .control,:host([variant=secondary]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=secondary-filled]) .control{color:var(--goto-type-color-brand-default);background-color:var(--goto-interactive-color-neutral-secondary-default);--goto-icon-color:var(--goto-icon-color-on-neutral-secondary-default)}:host([variant=secondary-filled]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-on-neutral-secondary-default))}:host([variant=secondary-filled]) .control:hover{background-color:var(--goto-interactive-color-neutral-secondary-hover)}:host([variant=secondary-filled]) .control:active,:host([variant=secondary-filled]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-neutral-secondary-pressed)}:host([variant=secondary-filled]):host([disabled]) .control,:host([variant=secondary-filled]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=tertiary]) .control{color:var(--goto-type-color-default);--goto-icon-color:var(--goto-icon-color-default);background-color:#0000}:host([variant=tertiary]) .control:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host([variant=tertiary]) .control:active,:host([variant=tertiary]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-secondary-pressed)}:host([variant=tertiary]):host([disabled]) .control,:host([variant=tertiary]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=neutral]) .control{color:var(--goto-type-color-default);--goto-icon-color:var(--goto-icon-color-default);background-color:#0000}:host([variant=neutral]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-default))}:host([variant=neutral]) .control:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host([variant=neutral]) .control:active,:host([variant=neutral]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-secondary-pressed)}:host([variant=neutral]):host([disabled]) .control,:host([variant=neutral]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=success]) .control{color:var(--goto-type-color-inverted);background-color:var(--goto-interactive-color-success-default);--goto-icon-color:var(--goto-icon-color-inverted)}:host([variant=success]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-inverted))}:host([variant=success]) .control:hover{background-color:var(--goto-interactive-color-success-hover)}:host([variant=success]) .control:active,:host([variant=success]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-success-pressed)}:host([variant=success]):host([disabled]) .control,:host([variant=success]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=danger]) .control{color:var(--goto-type-color-inverted);background-color:var(--goto-interactive-color-danger-default);--goto-icon-color:var(--goto-icon-color-inverted)}:host([variant=danger]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-inverted))}:host([variant=danger]) .control:hover{background-color:var(--goto-interactive-color-danger-hover)}:host([variant=danger]) .control:active,:host([variant=danger]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-danger-pressed)}:host([variant=danger]):host([disabled]) .control,:host([variant=danger]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=inverted]) .control{color:var(--goto-type-color-inverted);--goto-icon-color:var(--goto-icon-color-inverted);background-color:#0000}:host([variant=inverted]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-inverted))}:host([variant=inverted]) .control:hover{background-color:var(--goto-interactive-color-primary-hover)}:host([variant=inverted]) .control:active,:host([variant=inverted]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-primary-pressed)}:host([variant=inverted]):host([disabled]) .control,:host([variant=inverted]):host([is-loading]) .control{color:var(--goto-type-color-inverted);--goto-icon-color:var(--goto-icon-color-inverted);background-color:#0000}:host([variant=inverted]) .control:focus-visible,:host([variant=inverted]):host(.selected-interactive-item) .control{outline-color:var(--goto-focus-border-color-default)}@keyframes button-loading{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes button-loading-half{0%,to{transform:rotate(180deg)}}:host{box-sizing:border-box;border-radius:var(--goto-radius-small);display:inline-flex}:host .control{border-radius:inherit;cursor:pointer;white-space:nowrap;border:none;justify-content:center;align-items:center;display:flex;position:relative}:host([is-loading]),:host([disabled]){cursor:not-allowed}:host([is-loading]) .control,:host([disabled]) .control{pointer-events:none}:host .control:focus-visible,:host(.selected-interactive-item) .control{outline-offset:2px;outline-width:1px;outline-style:solid}:host .loading-icon{display:none}:host([isloading]) .loading-icon,:host([is-loading]) .loading-icon{animation-direction:normal;animation-delay:0s;animation-duration:var(--goto-duration-sluggish);animation-iteration-count:infinite;animation-play-state:running;animation-fill-mode:forwards;animation-timing-function:var(--goto-standard-easing);
562animation-name:var(--button-loading-animation-name,button-loading);display:flex}:host([isloading]) .leading-icon,:host([isloading]) .trailing-icon,:host([is-loading]) .leading-icon,:host([is-loading]) .trailing-icon{display:none}:host .control{text-decoration:none}:host([size=xlarge]) .control{gap:var(--goto-spacing-02);padding:var(--goto-spacing-03)var(--goto-spacing-05);font:var(--goto-button-xlarge);--goto-icon-size:var(--goto-spacing-06)}:host([size=large]) .control{gap:var(--goto-spacing-02);padding:var(--goto-spacing-02)var(--goto-spacing-04);font:var(--goto-button-large);--goto-icon-size:var(--goto-spacing-05)}:host([size=medium]) .control{gap:var(--goto-spacing-01);padding:var(--goto-spacing-01)var(--goto-spacing-03);font:var(--goto-button-medium);--goto-icon-size:var(--goto-spacing-04)}:host([size=small]) .control{gap:var(--goto-spacing-01);padding:calc(var(--goto-spacing-01)/2)var(--goto-spacing-02);font:var(--goto-button-small);--goto-icon-size:var(--goto-spacing-04)}:host([fullwidth]),:host([full-width]),.control{width:100%}.start{display:contents}:host([variant=secondary]) .control,:host([variant=neutral]) .control{box-shadow:inset 0 0 0 1px var(--goto-border-color-default)}:host([variant=inverted]) .control{box-shadow:inset 0 0 0 1px var(--goto-border-color-inverted)}:host([variant=tertiary]) .control{color:var(--goto-type-color-brand-default);--goto-icon-color:var(--goto-icon-color-brand-default)}:host([variant=tertiary]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-brand-default))}"),h([Te({reflect:!0})],_c.prototype,"size",void 0),h([Te({reflect:!0})],_c.prototype,"variant",void 0),h([Te({type:Boolean,reflect:!0})],_c.prototype,"disabled",void 0),h([Te({type:Boolean,reflect:!0,attribute:"full-width"})],_c.prototype,"fullWidth",void 0),h([Te({type:Boolean,reflect:!0,attribute:"fullwidth"})],_c.prototype,"fullwidth",void 0),h([Te({type:Boolean,reflect:!0,attribute:"is-loading"})],_c.prototype,"isLoading",void 0),h([Te()],_c.prototype,"href",void 0),h([Te()],_c.prototype,"target",void 0),h([Te()],_c.prototype,"download",void 0),h([Te()],_c.prototype,"ping",void 0),h([Te()],_c.prototype,"rel",void 0),h([Te()],_c.prototype,"hreflang",void 0),h([Te()],_c.prototype,"type",void 0),h([Te()],_c.prototype,"referrerpolicy",void 0),h([Te({attribute:"external-link-label"})],_c.prototype,"externalLinkLabel",void 0),h([$e(".control")],_c.prototype,"control",void 0),function(e={}){vr(e),d(_c,e)}();const kc=(e,t,r)=>{const n=new Map;for(let o=t;o<=r;o++)n.set(e[o],o);return n},Cc=nr(class extends or{constructor(e){if(super(e),2!==e.type)throw Error("repeat() can only be used in text expressions")}dt(e,t,r){let n;void 0===r?r=t:void 0!==t&&(n=t);const o=[],i=[];let s=0;for(const t of e)o[s]=n?n(t,s):s,i[s]=r(t,s),s++;return{values:i,keys:o}}render(e,t,r){return this.dt(e,t,r).values}update(e,[t,r,n]){const o=(e=>e._$AH)(e),{values:i,keys:s}=this.dt(t,r,n);if(!Array.isArray(o))return this.ut=s,i;const a=this.ut??=[],l=[];let c,d,u=0,h=o.length-1,p=0,g=i.length-1;for(;u<=h&&p<=g;)if(null===o[u])u++;else if(null===o[h])h--;else if(a[u]===s[p])l[p]=er(o[u],i[p]),u++,p++;else if(a[h]===s[g])l[g]=er(o[h],i[g]),h--,g--;else if(a[u]===s[g])l[g]=er(o[u],i[g]),Xt(e,l[g+1],o[u]),u++,g--;else if(a[h]===s[p])l[p]=er(o[h],i[p]),Xt(e,o[u],o[h]),h--,p++;else if(void 0===c&&(c=kc(s,p,g),d=kc(a,u,h)),c.has(a[u]))if(c.has(a[h])){const t=d.get(s[p]),r=void 0!==t?o[t]:null;if(null===r){const t=Xt(e,o[u]);er(t,i[p]),l[p]=t}else l[p]=er(r,i[p]),Xt(e,o[u],r),o[t]=null;p++}else rr(o[h]),h--;else rr(o[u]),u++;for(;p<=g;){const t=Xt(e,l[g+1]);er(t,i[p]),l[p++]=t}for(;u<=h;){const e=o[u++];null!==e&&rr(e)}return this.ut=s,((e,t=tr)=>{e._$AH=t})(e,l),ae}});function Sc(e,t){return e-t*Math.floor(e/t)}function Ec(e,t,r,n){let o=(t=Ac(e,t))-1,i=-2;return r<=2?i=0:Ic(t)&&(i=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*r-362)/12+i+n)}function Ic(e){return e%4==0&&(e%100!=0||e%400==0)}function Ac(e,t){return"BC"===e?1-t:t}const Tc={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class Oc{fromJulianDay(e){let t=e,r=t-1721426,n=Math.floor(r/146097),o=Sc(r,146097),i=Math.floor(o/36524),s=Sc(o,36524),a=Math.floor(s/1461),l=Sc(s,1461),c=Math.floor(l/365),d=400*n+100*i+4*a+c+(4!==i&&4!==c?1:0),[u,h]=function(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}(d),p=t-Ec(u,h,1,1),g=2;t<Ec(u,h,3,1)?g=0:Ic(h)&&(g=1);let f=Math.floor((12*(p+g)+373)/367),m=t-Ec(u,h,f,1)+1;return new td(u,h,f,m)}toJulianDay(e){return Ec(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return Tc[Ic(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return Ic(e.year)?366:365}getMaximumMonthsInYear(){return 12}
562getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return"BC"===e.era}balanceDate(e){e.year<=0&&(e.era="BC"===e.era?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}const Lc=36e5;function $c(e,t){let r=e.copy(),n="hour"in r?function(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,function(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Bc(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Bc(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Bc(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Bc(e.hour,24),t}(e)}(r,t):0;Nc(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,Rc(r),Pc(r),r.day+=7*(t.weeks||0),r.day+=t.days||0,r.day+=n,function(e){for(;e.day<1;)e.month--,Rc(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Rc(e)}(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let o=r.calendar.getYearsInEra(r);if(r.year>o){var i,s;let e=null===(i=(s=r.calendar).isInverseEra)||void 0===i?void 0:i.call(s,r);r.year=o,r.month=e?1:r.calendar.getMonthsInYear(r),r.day=e?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let a=r.calendar.getMonthsInYear(r);return r.month>a&&(r.month=a,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function Nc(e,t){var r,n;(null===(r=(n=e.calendar).isInverseEra)||void 0===r?void 0:r.call(n,e))&&(t=-t),e.year+=t}function Rc(e){for(;e.month<1;)Nc(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Nc(e,1)}function Pc(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Dc(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),Pc(e)}function Mc(e){let t={};for(let r in e)"number"==typeof e[r]&&(t[r]=-e[r]);return t}function zc(e,t){return $c(e,Mc(t))}function Fc(e,t){let r=e.copy();return null!=t.era&&(r.era=t.era),null!=t.year&&(r.year=t.year),null!=t.month&&(r.month=t.month),null!=t.day&&(r.day=t.day),Dc(r),r}function Uc(e,t){let r=e.copy();var n;return null!=t.hour&&(r.hour=t.hour),null!=t.minute&&(r.minute=t.minute),null!=t.second&&(r.second=t.second),null!=t.millisecond&&(r.millisecond=t.millisecond),(n=r).millisecond=Math.max(0,Math.min(n.millisecond,1e3)),n.second=Math.max(0,Math.min(n.second,59)),n.minute=Math.max(0,Math.min(n.minute,59)),n.hour=Math.max(0,Math.min(n.hour,23)),r}function Bc(e,t){let r=e%t;return r<0&&(r+=t),r}function Hc(e,t,r,n){let o=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),i=t.indexOf(e.era);if(i<0)throw new Error("Invalid era: "+e.era);i=Vc(i,r,0,t.length-1,null==n?void 0:n.round),o.era=t[i],Dc(o);break}case"year":var i,s;(null===(i=(s=o.calendar).isInverseEra)||void 0===i?void 0:i.call(s,o))&&(r=-r),o.year=Vc(e.year,r,-1/0,9999,null==n?void 0:n.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=Vc(e.month,r,1,e.calendar.getMonthsInYear(e),null==n?void 0:n.round);break;case"day":o.day=Vc(e.day,r,1,e.calendar.getDaysInMonth(e),null==n?void 0:n.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),Dc(o),o}function jc(e,t,r,n){let o=e.copy();switch(t){case"hour":{let t=e.hour,i=0,s=23;if(12===(null==n?void 0:n.hourCycle)){let e=t>=12;i=e?12:0,s=e?23:11}o.hour=Vc(t,r,i,s,null==n?void 0:n.round);break}case"minute":o.minute=Vc(e.minute,r,0,59,null==n?void 0:n.round);break;case"second":o.second=Vc(e.second,r,0,59,null==n?void 0:n.round);break;case"millisecond":o.millisecond=Vc(e.millisecond,r,0,999,null==n?void 0:n.round);break;default:throw new Error("Unsupported field "+t)}return o}function Vc(e,t,r,n,o=!1){if(o){(e+=Math.sign(t))<r&&(e=n);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function Wc(e,t){let r;return r=null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?hd($c(md(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):sd(e)-e.offset,r+=t.milliseconds||0,r+=1e3*(t.seconds||0),r+=6e4*(t.minutes||0),r+=36e5*(t.hours||0),vd(gd(r,e.timeZone),e.calendar)}const Kc=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,qc=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function Gc(e){let t=e.match(Kc);if(!t){if(qc.test(e))throw new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`);throw new Error("Invalid ISO 8601 date string: "+e)}let r=new td(Zc(t[1],0,9999),Zc(t[2],1,12),1);return r.day=Zc(t[3],1,r.calendar.getDaysInMonth(r)),r}function Zc(e,t,r){let n=Number(e);if(n<t||n>r)throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);return n}function Yc(e){let t,r=vd(e,new Oc);return t="BC"===r.era?1===r.year?"0000":"-"+String(Math.abs(1-r.year)).padStart(6,"00"):String(r.year).padStart(4,"0"),`${t}-${String(r.month).padStart(2,"0")}-${String(r.day).padStart(2,"0")}`}
562function Jc(e){return`${Yc(e)}T${t=e,`${String(t.hour).padStart(2,"0")}:${String(t.minute).padStart(2,"0")}:${String(t.second).padStart(2,"0")}${t.millisecond?String(t.millisecond/1e3).slice(1):""}`}`;var t}function Qc(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function Xc(e){let t,r="object"==typeof e[0]?e.shift():new Oc;if("string"==typeof e[0])t=e.shift();else{let e=r.getEras();t=e[e.length-1]}return[r,t,e.shift(),e.shift(),e.shift()]}var ed=new WeakMap;class td{copy(){return this.era?new td(this.calendar,this.era,this.year,this.month,this.day):new td(this.calendar,this.year,this.month,this.day)}add(e){return $c(this,e)}subtract(e){return zc(this,e)}set(e){return Fc(this,e)}cycle(e,t,r){return Hc(this,e,t,r)}toDate(e){return pd(this,e)}toString(){return Yc(this)}compare(e){return Sd(this,e)}constructor(...e){Qc(this,ed,{writable:!0,value:void 0});let[t,r,n,o,i]=Xc(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,Dc(this)}}var rd=new WeakMap;class nd{copy(){return this.era?new nd(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new nd(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return $c(this,e)}subtract(e){return zc(this,e)}set(e){return Fc(Uc(this,e),e)}cycle(e,t,r){switch(e){case"era":case"year":case"month":case"day":return Hc(this,e,t,r);default:return jc(this,e,t,r)}}toDate(e,t){return pd(this,e,t)}toString(){return Jc(this)}compare(e){let t=Sd(this,e);return 0===t?function(e,t){return Ed(e)-Ed(t)}(this,md(e)):t}constructor(...e){Qc(this,rd,{writable:!0,value:void 0});let[t,r,n,o,i]=Xc(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Dc(this)}}var od=new WeakMap;class id{copy(){return this.era?new id(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new id(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return Wc(this,e)}subtract(e){return function(e,t){return Wc(e,Mc(t))}(this,e)}set(e,t){return function(e,t,r){let n=md(e),o=Uc(Fc(n,t),t);return 0===o.compare(n)?e:vd(gd(hd(o,e.timeZone,r),e.timeZone),e.calendar)}(this,e,t)}cycle(e,t,r){return function(e,t,r,n){switch(t){case"hour":{let t=0,o=23;if(12===(null==n?void 0:n.hourCycle)){let r=e.hour>=12;t=r?12:0,o=r?23:11}let i=md(e),s=vd(Uc(i,{hour:t}),new Oc),a=[hd(s,e.timeZone,"earlier"),hd(s,e.timeZone,"later")].filter(t=>gd(t,e.timeZone).day===s.day)[0],l=vd(Uc(i,{hour:o}),new Oc),c=[hd(l,e.timeZone,"earlier"),hd(l,e.timeZone,"later")].filter(t=>gd(t,e.timeZone).day===l.day).pop(),d=sd(e)-e.offset,u=Math.floor(d/Lc),h=d%Lc;return d=Vc(u,r,Math.floor(a/Lc),Math.floor(c/Lc),null==n?void 0:n.round)*Lc+h,vd(gd(d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return jc(e,t,r,n);case"era":case"year":case"month":case"day":return vd(gd(hd(Hc(md(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw new Error("Unsupported field "+t)}}(this,e,t,r)}toDate(){return function(e){let t=sd(e)-e.offset;return new Date(t)}(this)}toString(){return`${Jc(this)}${function(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let r=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),o=Math.floor(e%36e5%6e4/1e3),i=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return 0!==o&&(i+=`:${String(o).padStart(2,"0")}`),i}(this.offset)}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(t=e,r=this.timeZone,t instanceof id?t.timeZone===r?t:function(e,t){return vd(gd(sd(e)-e.offset,t),e.calendar)}(t,r):gd(hd(t,r,n),r)).toDate().getTime();var t,r,n}constructor(...e){Qc(this,od,{writable:!0,value:void 0});let[t,r,n,o,i]=Xc(e),s=e.shift(),a=e.shift();this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,this.timeZone=s,this.offset=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Dc(this)}}function sd(e){return ad(Ac((e=vd(e,new Oc)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function ad(e,t,r,n,o,i,s){let a=new Date;return a.setUTCHours(n,o,i,s),a.setUTCFullYear(e,t-1,r),a.getTime()}function ld(e,t){if("UTC"===t)return 0;if(e>0&&t===Td()&&!Od())return-6e4*new Date(e).getTimezoneOffset();let{year:r,month:n,day:o,hour:i,minute:s,second:a}=dd(e,t);return ad(r,n,o,i,s,a,0)-1e3*Math.floor(e/1e3)}const cd=new Map;function dd(e,t){let r=cd.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),cd.set(t,r));let n=r.formatToParts(new Date(e)),o={};for(let e of n)"literal"!==e.type&&(o[e.type]=e.value);return{year:"BC"===o.era||"B"===o.era?1-o.year:+o.year,month:+o.month,day:+o.day,hour:"24"===o.hour?0:+o.hour,minute:+o.minute,second:+o.second}}const ud=864e5;function hd(e,t,r="compatible"){let n=md(e);if("UTC"===t)return sd(n);if(t===Td()&&"compatible"===r&&!Od()){n=vd(n,new Oc);let e=new Date,t=Ac(n.era,n.year);return e.setFullYear(t,n.month-1,n.day),e.setHours(n.hour,n.minute,n.second,n.millisecond),e.getTime()}let o=sd(n),i=ld(o-ud,t),s=ld(o+ud,t),a=function(e,t,r,n){return(r===n?[r]:[r,n]).filter(r=>function(e,t,r){let n=dd(r,t);return e.year===n.year&&e.month===n.month&&e.day===n.day&&e.hour===n.hour&&e.minute===n.minute&&e.second===n.second}(e,t,r))}(n,t,o-i,o-s);if(1===a.length)return a[0];if(a.length>1)switch(r){case"compatible":case"earlier":return a[0];case"later":return a[a.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(o-i,o-s);case"compatible":case"later":return Math.max(o-i,o-s);case"reject":throw new RangeError("No such absolute time found")}}function pd(e,t,r="compatible"){return new Date(hd(e,t,r))}function gd(e,t){let r=ld(e,t),n=new Date(e+r),o=n.getUTCFullYear(),i=n.getUTCMonth()+1,s=n.getUTCDate(),a=n.getUTCHours(),l=n.getUTCMinutes(),c=n.getUTCSeconds(),d=n.getUTCMilliseconds();return new id(o<1?"BC":"AD",o<1?1-o:o,i,s,t,r,a,l,c,d)}function fd(e){return new td(e.calendar,e.era,e.year,e.month,e.day)}function md(e,t){let r=0,n=0,o=0,i=0;if("timeZone"in e)({hour:r,minute:n,second:o,millisecond:i}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:o,millisecond:i}=t),new nd(e.calendar,e.era,e.year,e.month,e.day,r,n,o,i)}function vd(e,t){if(function(e,t){var r,n,o,i;return null!==(i=null!==(o=null===(r=e.isEqual)||void 0===r?void 0:r.call(e,t))&&void 0!==o?o:null===(n=t.isEqual)||void 0===n?void 0:n.call(t,e))&&void 0!==i?i:e.identifier===t.identifier}(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,Dc(n),n}const bd={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function yd(e,t){return t=vd(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function wd(e,t){return t=vd(t,e.calendar),e=Ld(e),t=Ld(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function xd(e,t){return t=vd(t,e.calendar),e=$d(e),t=$d(t),e.era===t.era&&e.year===t.year}const _d={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function kd(e,t,r){let n=e.calendar.toJulianDay(e),o=r?_d[r]:function(e){let t=Md.get(e);if(!t){if(Intl.Locale){let r=new Intl.Locale(e);
562if("getWeekInfo"in r&&(t=r.getWeekInfo(),t))return Md.set(e,t),t.firstDay}let r=function(e){if(Intl.Locale){let t=Dd.get(e);return t||(t=new Intl.Locale(e).maximize().region,t&&Dd.set(e,t)),t}let t=e.split("-")[1];return"u"===t?void 0:t}(e);if(e.includes("-fw-")){let r=e.split("-fw-")[1].split("-")[0];t="mon"===r?{firstDay:1}:"tue"===r?{firstDay:2}:"wed"===r?{firstDay:3}:"thu"===r?{firstDay:4}:"fri"===r?{firstDay:5}:"sat"===r?{firstDay:6}:{firstDay:0}}else t=e.includes("-ca-iso8601")?{firstDay:1}:{firstDay:r&&bd[r]||0};Md.set(e,t)}return t.firstDay}(t),i=Math.ceil(n+1-o)%7;return i<0&&(i+=7),i}function Cd(e){return fd(function(e){return gd(Date.now(),e)}(e))}function Sd(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Ed(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let Id=null,Ad=!1;function Td(){return null==Id&&(Id=(new Intl.DateTimeFormat).resolvedOptions().timeZone),Id}function Od(){return Ad}function Ld(e){return e.subtract({days:e.day-1})}function $d(e){return Ld(e.subtract({months:e.month-1}))}function Nd(e){return e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1}function Rd(e){return e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1}function Pd(e,t,r){let n=kd(e,t,r);return e.subtract({days:n})}const Dd=new Map,Md=new Map;function zd(e,t,r){let n=e.calendar.getDaysInMonth(e);return Math.ceil((kd(Ld(e),t,r)+n)/7)}var Fd='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.7071 5.29289L16.1213 6.70711L10.8284 12L16.1213 17.2929L14.7071 18.7071L8 12L14.7071 5.29289Z" fill="currentColor"></path></svg>',Ud='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.29288 18.7071L7.87866 17.2929L13.1716 12L7.87866 6.70711L9.29287 5.29289L16 12L9.29288 18.7071Z" fill="currentColor"></path></svg>';const Bd=(e,t,r)=>{let n=r.add({weeks:t});const o=[];n=Pd(n,e);const i=kd(n,e);for(let e=0;e<i;e++)o.push(null);for(;o.length<7;){o.push(n);const e=n.add({days:1});if(yd(n,e))break;n=e}for(;o.length<7;)o.push(null);return o},Hd=(e,t)=>{const r=Pd(Cd(e),t);return[...new Array(7).keys()].map(n=>{const o=r.add({days:n}).toDate(e);return new Intl.DateTimeFormat(t,{weekday:"short"}).format(o)})},jd=(e,t)=>!!t&&Gc(t).compare(e)>0,Vd=(e,t)=>!!t&&Gc(t).compare(e)<0,Wd=(e,t)=>new Intl.NumberFormat(e,{style:"decimal"}).format(t),Kd=e=>{try{return Intl.getCanonicalLocales(e),!0}catch(e){return!1}},qd=e=>{try{return Intl.DateTimeFormat(void 0,{timeZone:e}),!0}catch(e){return!1}},Gd=e=>new Intl.RelativeTimeFormat(e,{numeric:"auto"}).format(0,"day"),Zd=(e,t)=>yd(e,t)?"0":"-1",Yd=(e,t,r)=>new Intl.DateTimeFormat(t,{weekday:"long",month:"long",day:"numeric",year:"numeric"}).format(e.toDate(r)),Jd=(e,t)=>!(!t||0===t.length)&&t.includes(e.toString()),Qd=(e,t,r,n)=>jd(e,r)||Vd(e,n)||!wd(e,t);function Xd(e,t,r){const n=Pd(e,t);if(!jd(n,r))return n}function eu(e,t,r){const n=function(e,t){return Pd(e,t,void 0).add({days:6})}(e,t);if(!Vd(n,r))return n}function tu(e,t){const r=e.subtract({months:1});if(!jd(r,t))return r}function ru(e,t){const r=e.add({months:1});if(!Vd(r,t))return r}function nu(e,t){const r=e.subtract({years:1});if(!jd(r,t))return r}function ou(e,t){const r=e.add({years:1});if(!Vd(r,t))return r}class iu extends Zt{constructor(){super(...arguments),this.locale=navigator.language,this.timezone=Td(),this.weeks=[],this.weekDays=[],this.month="",this.initialized=!1}render(){const e=Oi(u(Hl)),t=Oi(u(Wi)),r=Oi(u(mr)),n=Oi(u(jl));return Ni`
563      <${e} class="title" variant="heading-small">
564        <slot name="header"></slot>
565      </${e}>
566      <div class="header">
567        <${t}
568          variant="${"primary"}"
569          size="small"
570          label="${Kd(this.locale)?(o=this.locale,new Intl.RelativeTimeFormat(o,{numeric:"auto"}).format(-1,"month")):""}"
571          @click=${this.handlePreviousMonthClick}
572        >
573          <${r}>${Fd}</${r}>
574        </${t}>
575        <h2 role="status" aria-live="polite" aria-atomic="true">${this.month}</h2>
576        <${n}
577          size="small"
578          class="today-button"
579          variant="${"tertiary"}"
580          @click=${this.handleTodayButtonClick}
581        >
582          ${Kd(this.locale)?Gd(this.locale):""}
583        </${n}>
584        <${t}
585          variant="${"primary"}"
586          size="small"
587          label="${Kd(this.locale)?(e=>new Intl.RelativeTimeFormat(e,{numeric:"auto"}).format(1,"month"))(this.locale):""}"
588          @click=${this.handleNextMonthClick}
589        >
590          <${r}>${Ud}</${r}>
591        </${t}>
592      </div>
593      <div class="calendar">
594        <table>
595          <thead>
596            <tr>
597              ${Cc(this.weekDays,e=>e,e=>Ni`<td>${e}</td>`)}
598            </tr>
599          </thead>
600
601          <tbody>
602            ${Cc(this.weeks,(e,t)=>t,e=>Ni`
603                <tr>
604                  ${Cc(e,e=>e?.toString()??"",e=>e?Ni`
605                        <td role="gridcell" class="cell">
606                          <span
607                            tabindex="${Zd(e,this.focusedDate??Cd(this.timezone))}"
608                            role="button"
609                            aria-label="${Yd(e,this.locale,this.timezone)}"
610                            data-value="${e.toString()}"
611                            class="${this.getDayClasses(e)}"
612                            @click=${()=>this.handleDayClick(e)}
613                            @keydown=${t=>this.handleDayKeyDown(t,e)}
614                          >
615                            ${Wd(this.locale,e.day)}
616                          </span>
617                        </td>
618                      `:Ni`<td role="gridcell" class="cell"></td>`)}
619                </tr>
620              `)}
621          </tbody>
622        </table>
623      </div>
624    `;var o}willUpdate(e){if(!this.initialized&&Kd(this.locale)&&qd(this.timezone)){if(this.initialized=!0,this.value)try{const e=Gc(this.value),t=!!this.min&&Gc(this.min).compare(e)>0,r=!!this.max&&Gc(this.max).compare(e)<0;t||r||Jd(e,this.disabledDates)||(this.date=e)}catch{}this.focusedDate=this.date?this.date:Cd(this.timezone),this.month=this.getMonth(),this.weeks=this.getWeeks(),this.weekDays=Hd(this.timezone,this.locale)}if(this.initialized){if(e.has("value")&&this.value)try{const e=Gc(this.value),t=!!this.min&&Gc(this.min).compare(e)>0,r=!!this.max&&Gc(this.max).compare(e)<0;t||r||Jd(e,this.disabledDates)||(this.month=this.getMonth(),this.weeks=this.getWeeks(),this.weekDays=Hd(this.timezone,this.locale),this.date=e,this.focusedDate=this.date)}catch{}e.has("locale")&&Kd(this.locale)&&(this.weeks=this.getWeeks(),this.weekDays=Hd(this.timezone,this.locale)),e.has("timezone")&&qd(this.timezone)&&(this.weeks=this.getWeeks(),this.weekDays=Hd(this.timezone,this.locale))}}getDayClasses(e){return e?Tl({day:!0,selected:!!this.date&&yd(e,this.date),today:yd(e,Cd(this.timezone)),inactive:!!this.focusedDate&&Qd(e,this.focusedDate,this.min,this.max)||Jd(e,this.disabledDates)}):""}getWeeks(e){let t;if(e)t=e;else if(this.value)try{t=Gc(this.value)}catch{t=Cd(this.timezone)}else t=Cd(this.timezone);const r=t.set({hour:0,minute:0,second:0,millisecond:0});return[...new Array(zd(Ld(r),this.locale)).keys()].map(e=>Bd(this.locale,e,Ld(r)))}getMonth(e){let t;if(e)t=e;else if(this.value)try{t=Gc(this.value)}catch{t=Cd(this.timezone)}else t=Cd(this.timezone);return new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(t.toDate(this.timezone))}handleDayClick(e){this.selectDay(e)}handleNextMonthClick(){this.focusedDate||(this.focusedDate=Cd(this.timezone)),this.focusedDate=this.focusedDate.add({months:1}),this.refreshDaysInCalendar()}handlePreviousMonthClick(){this.focusedDate||(this.focusedDate=Cd(this.timezone)),this.focusedDate=this.focusedDate.subtract({months:1}),this.refreshDaysInCalendar()}handleTodayButtonClick(){const e=Cd(this.timezone),t=!!this.min&&Gc(this.min).compare(e)>0,r=!!this.max&&Gc(this.max).compare(e)<0;t||r||Jd(e,this.disabledDates)||(this.selectDay(Cd(this.timezone)),this.refreshDaysInCalendar())}handleDayKeyDown(e,t){switch(e.code){case"ArrowUp":e.preventDefault(),this.moveToPrevWeek(t);break;case"ArrowDown":e.preventDefault(),this.moveToNextWeek(t);break;case"ArrowLeft":this.moveToPrevDay(t);break;case"ArrowRight":this.moveToNextDay(t);break;case"Home":this.moveToStartOfWeek(t);break;case"End":this.moveToEndOfWeek(t);break;case"PageUp":e.preventDefault(),e.shiftKey?this.moveToPreviousYear(t):this.moveToPreviousMonth(t);break;case"PageDown":e.preventDefault(),e.shiftKey?this.moveToNextYear(t):this.moveToNextMonth(t);break;case"Enter":case"Space":this.selectDay(t)}}async moveToNextWeek(e){const t=this.focusedDate;let r=e.add({weeks:1});for(;Jd(r,this.disabledDates);)r=r.add({weeks:1});if(Vd(r,this.max))return;this.focusedDate=r,t&&!wd(t,this.focusedDate)&&this.refreshDaysInCalendar(),await this.updateComplete;const n=this.shadowRoot?.querySelector(`[data-value="${this.focusedDate.toString()}"]`);n?.focus()}async moveToPrevWeek(e){const t=this.focusedDate;let r=e.subtract({weeks:1});for(;Jd(r,this.disabledDates);)r=r.subtract({weeks:1});if(jd(r,this.min))return;this.focusedDate=r,t&&!wd(t,this.focusedDate)&&this.refreshDaysInCalendar(
624),await this.updateComplete;const n=this.shadowRoot?.querySelector(`[data-value="${this.focusedDate.toString()}"]`);n?.focus()}async moveToPrevDay(e){const t=this.focusedDate;let r=e.subtract({days:1});for(;Jd(r,this.disabledDates);){if(jd(r,this.min))return;r=r.subtract({days:1})}if(jd(r,this.min))return;this.focusedDate=r,t&&!wd(t,this.focusedDate)&&this.refreshDaysInCalendar(),await this.updateComplete;const n=this.shadowRoot?.querySelector(`[data-value="${this.focusedDate.toString()}"]`);n?.focus()}async moveToNextDay(e){const t=this.focusedDate;let r=e.add({days:1});for(;Jd(r,this.disabledDates);){if(Vd(r,this.max))return;r=r.add({days:1})}if(Vd(r,this.max))return;this.focusedDate=r,t&&!wd(t,this.focusedDate)&&this.refreshDaysInCalendar(),await this.updateComplete;const n=this.shadowRoot?.querySelector(`[data-value="${this.focusedDate.toString()}"]`);n?.focus()}async moveToStartOfWeek(e){const t=Xd(e,this.locale,this.min);if(!t||Jd(t,this.disabledDates))return;this.focusedDate=t,await this.updateComplete;const r=this.shadowRoot?.querySelector(`[data-value="${this.focusedDate.toString()}"]`);r?.focus()}async moveToEndOfWeek(e){const t=eu(e,this.locale,this.max);if(!t||Jd(t,this.disabledDates))return;this.focusedDate=t,await this.updateComplete;const r=this.shadowRoot?.querySelector(`[data-value="${this.focusedDate.toString()}"]`);r?.focus()}async moveToPreviousMonth(e){const t=this.focusedDate;let r=tu(e,this.min);for(;r&&Jd(r,this.disabledDates);)r=tu(r,this.min);if(!r)return;this.focusedDate=r,t&&!wd(t,this.focusedDate)&&this.refreshDaysInCalendar(),await this.updateComplete;const n=this.shadowRoot?.querySelector(`[data-value="${this.focusedDate.toString()}"]`);n?.focus()}async moveToNextMonth(e){const t=this.focusedDate;let r=ru(e,this.max);for(;r&&Jd(r,this.disabledDates);)r=ru(r,this.max);if(!r)return;this.focusedDate=r,t&&!wd(t,this.focusedDate)&&this.refreshDaysInCalendar(),await this.updateComplete;const n=this.shadowRoot?.querySelector(`[data-value="${this.focusedDate.toString()}"]`);n?.focus()}async moveToPreviousYear(e){const t=this.focusedDate;let r=nu(e,this.min);for(;r&&Jd(r,this.disabledDates);)r=nu(r,this.min);if(!r)return;this.focusedDate=r,t&&!wd(t,this.focusedDate)&&this.refreshDaysInCalendar(),await this.updateComplete;const n=this.shadowRoot?.querySelector(`[data-value="${this.focusedDate.toString()}"]`);n?.focus()}async moveToNextYear(e){const t=this.focusedDate;let r=ou(e,this.max);for(;r&&Jd(r,this.disabledDates);)r=ou(r,this.max);if(!r)return;this.focusedDate=r,t&&!wd(t,this.focusedDate)&&this.refreshDaysInCalendar(),await this.updateComplete;const n=this.shadowRoot?.querySelector(`[data-value="${this.focusedDate.toString()}"]`);n?.focus()}selectDay(e){Jd(e,this.disabledDates)||(this.date=e,this.focusedDate=e,this.value=e.toString(),this.dispatchEvent(new CustomEvent("ch-calendar-change",{detail:{date:e.toDate(this.timezone),customDate:e},bubbles:!0,composed:!0})))}refreshDaysInCalendar(){this.weeks=this.getWeeks(this.focusedDate),this.month=this.getMonth(this.focusedDate)}}function su(e={}){return ql(e),fl(e),Gl(e),vr(e),d(iu,e)}function au(e,t,r){return{index:e,removed:t,addedCount:r}}function lu(e,t,r,n){return t<r||n<e?-1:t===r||n===e?0:e<r?t<n?t-r:n-r:n<t?n-e:t-e}function cu(e,t,r,n,o,i){let s=0,a=0;const l=Math.min(r-t,i-o);if(0===t&&0===o&&(s=function(e,t,r){for(let n=0;n<r;++n)if(e[n]!==t[n])return n;return r}(e,n,l)),r===e.length&&i===n.length&&(a=function(e,t,r){let n=e.length,o=t.length,i=0;for(;i<r&&e[--n]===t[--o];)i++;return i}(e,n,l-s)),o+=s,i-=a,(r-=a)-(t+=s)===0&&i-o===0)return xr;if(t===r){const e=au(t,[],0);for(;o<i;)e.removed.push(n[o++]);return[e]}if(o===i)return[au(t,[],r-t)];const c=function(e){let t=e.length-1,r=e[0].length-1,n=e[t][r];const o=[];for(;t>0||r>0;){if(0===t){o.push(2),r--;continue}if(0===r){o.push(3),t--;continue}const i=e[t-1][r-1],s=e[t-1][r],a=e[t][r-1];let l;l=s<a?s<i?s:i:a<i?a:i,l===i?(i===n?o.push(0):(o.push(1),n=i),t--,r--):l===s?(o.push(3),t--,n=s):(o.push(2),r--,n=a)}return o.reverse(),o}(function(e,t,r,n,o,i){const s=i-o+1,a=r-t+1,l=new Array(s);let c,d;for(let e=0;e<s;++e)l[e]=new Array(a),l[e][0]=e;for(let e=0;e<a;++e)l[0][e]=e;for(let r=1;r<s;++r)for(let i=1;i<a;++i)e[t+i-1]===n[o+r-1]?l[r][i]=l[r-1][i-1]:(c=l[r-1][i]+1,d=l[r][i-1]+1,l[r][i]=c<d?c:d);return l}(e,t,r,n,o,i)),d=[];let u,h=t,p=o;for(let e=0;e<c.length;++e)switch(c[e]){case 0:void 0!==u&&(d.push(u),u=void 0),h++,p++;break;case 1:void 0===u&&(u=au(h,[],0)),u.addedCount++,h++,u.removed.push(n[p]),p++;break;case 2:void 0===u&&(u=au(h,[],0)),u.addedCount++,h++;break;case 3:void 0===u&&(u=au(h,[],0)),u.removed.push(n[p]),p++}return void 0!==u&&d.push(u),d}iu.baseName="calendar",iu.styles=b(":host{min-width:calc(var(--goto-spacing-11)*4);height:auto;padding:var(--goto-spacing-04);color:var(--goto-type-color-default);flex-direction:column;align-items:center;display:flex}:host chameleon-button.today-button::part(content){text-transform:capitalize}:host .title{margin:var(--goto-spacing-00);margin-bottom:var(--goto-spacing-02);align-self:flex-start}:host .header{grid-template-columns:30px auto auto 30px;justify-content:space-between;align-items:center;width:calc(100% + 16px);display:grid}:host .header h2{color:var(--goto-type-color-default);font:var(--goto-body-small);margin:var(--goto-spacing-00)}:host table{border-radius:var(--goto-radius-small)}:host table td{align-content:center;justify-items:center}:host table thead{color:var(--goto-type-color-secondary);font:var(--goto-caption-medium-strong)}:host table thead td{text-align:center;background:0 0;width:14.2857%}:host .day{background:var(--goto-surface-color-default);font:var(--goto-caption-medium);width:var(--goto-spacing-06);height:var(--goto-spacing-06);text-align:center;cursor:pointer;border-radius:50%;justify-content:center;align-items:center;display:flex}:host .day.inactive{pointer-events:none;opacity:.7;color:var(--goto-type-color-secondary);cursor:default}:host .day.today{color:var(--goto-type-color-default)}:host .day:hover{background:var(--goto-interactive-color-secondary-hover)}:host .day:active{background:var(--goto-interactive-color-secondary-pressed)}:host .day.selected{background:var(--goto-interactive-color-brand-primary-pressed);color:var(--goto-type-color-inverted);border:none;outline:none}:host .day.selected:focus-visible{background:var(--goto-interactive-color-brand-primary-pressed);color:var(--goto-type-color-inverted);outline-offset:2px;outline:var(--goto-interactive-color-brand-primary-pressed)solid 1px;border:none}:host .day:focus{outline-offset:2px;outline:var(--goto-interactive-color-brand-primary-pressed)solid 1px}
624:host .calendar{min-height:194px}"),h([Te()],iu.prototype,"locale",void 0),h([Te()],iu.prototype,"timezone",void 0),h([Te({reflect:!0})],iu.prototype,"value",void 0),h([Te()],iu.prototype,"min",void 0),h([Te()],iu.prototype,"max",void 0),h([Te()],iu.prototype,"disabledDates",void 0),h([Oe()],iu.prototype,"weeks",void 0),h([Oe()],iu.prototype,"weekDays",void 0),h([Oe()],iu.prototype,"month",void 0),h([Oe()],iu.prototype,"date",void 0),h([Oe()],iu.prototype,"focusedDate",void 0),su();const du=Array.prototype.push;function uu(e,t,r,n){const o=au(t,r,n);let i=!1,s=0;for(let t=0;t<e.length;t++){const r=e[t];if(r.index+=s,i)continue;const n=lu(o.index,o.index+o.removed.length,r.index,r.index+r.addedCount);if(n>=0){e.splice(t,1),t--,s-=r.addedCount-r.removed.length,o.addedCount+=r.addedCount-n;const a=o.removed.length+r.removed.length-n;if(o.addedCount||a){let e=r.removed;if(o.index<r.index){const t=o.removed.slice(0,r.index-o.index);du.apply(t,e),e=t}if(o.index+o.removed.length>r.index+r.addedCount){const t=o.removed.slice(r.index+r.addedCount-o.index);du.apply(e,t)}o.removed=e,r.index<o.index&&(o.index=r.index)}else i=!0}else if(o.index<r.index){i=!0,e.splice(t,0,o),t++;const n=o.addedCount-o.removed.length;r.index+=n,s+=n}}i||e.push(o)}let hu=!1;function pu(e,t){let r=e.index;const n=t.length;return r>n?r=n-e.addedCount:r<0&&(r=n+e.removed.length+r-e.addedCount),r<0&&(r=0),e.index=r,e}class gu extends Or{constructor(e){super(e),this.oldCollection=void 0,this.splices=void 0,this.needsQueue=!0,this.call=this.flush,Reflect.defineProperty(e,"$fastController",{value:this,enumerable:!1})}subscribe(e){this.flush(),super.subscribe(e)}addSplice(e){void 0===this.splices?this.splices=[e]:this.splices.push(e),this.needsQueue&&(this.needsQueue=!1,Tr.queueUpdate(this))}reset(e){this.oldCollection=e,this.needsQueue&&(this.needsQueue=!1,Tr.queueUpdate(this))}flush(){const e=this.splices,t=this.oldCollection;if(void 0===e&&void 0===t)return;this.needsQueue=!0,this.splices=void 0,this.oldCollection=void 0;const r=void 0===t?function(e,t){let r=[];const n=function(e){const t=[];for(let r=0,n=e.length;r<n;r++){const n=e[r];uu(t,n.index,n.removed,n.addedCount)}return t}(t);for(let t=0,o=n.length;t<o;++t){const o=n[t];1!==o.addedCount||1!==o.removed.length?r=r.concat(cu(e,o.index,o.index+o.addedCount,o.removed,0,o.removed.length)):o.removed[0]!==e[o.index]&&r.push(o)}return r}(this.source,e):cu(this.source,0,this.source.length,t,0,t.length);this.notify(r)}}const fu=Object.freeze({positioning:!1,recycle:!0});function mu(e,t,r,n){e.bind(t[r],n)}function vu(e,t,r,n){const o=Object.create(n);o.index=r,o.length=t.length,e.bind(t[r],o)}class bu{constructor(e,t,r,n,o,i){this.location=e,this.itemsBinding=t,this.templateBinding=n,this.options=i,this.source=null,this.views=[],this.items=null,this.itemsObserver=null,this.originalContext=void 0,this.childContext=void 0,this.bindView=mu,this.itemsBindingObserver=$r.binding(t,this,r),this.templateBindingObserver=$r.binding(n,this,o),i.positioning&&(this.bindView=vu)}bind(e,t){this.source=e,this.originalContext=t,this.childContext=Object.create(t),this.childContext.parent=e,this.childContext.parentContext=this.originalContext,this.items=this.itemsBindingObserver.observe(e,this.originalContext),this.template=this.templateBindingObserver.observe(e,this.originalContext),this.observeItems(!0),this.refreshAllViews()}unbind(){this.source=null,this.items=null,null!==this.itemsObserver&&this.itemsObserver.unsubscribe(this),this.unbindAllViews(),this.itemsBindingObserver.disconnect(),this.templateBindingObserver.disconnect()}handleChange(e,t){e===this.itemsBinding?(this.items=this.itemsBindingObserver.observe(this.source,this.originalContext),this.observeItems(),this.refreshAllViews()):e===this.templateBinding?(this.template=this.templateBindingObserver.observe(this.source,this.originalContext),this.refreshAllViews(!0)):this.updateViews(t)}observeItems(e=!1){if(!this.items)return void(this.items=xr);const t=this.itemsObserver,r=this.itemsObserver=$r.getNotifier(this.items),n=t!==r;n&&null!==t&&t.unsubscribe(this),(n||e)&&r.subscribe(this)}updateViews(e){const t=this.childContext,r=this.views,n=this.bindView,o=this.items,i=this.template,s=this.options.recycle,a=[];let l=0,c=0;for(let d=0,u=e.length;d<u;++d){const u=e[d],h=u.removed;let p=0,g=u.index;const f=g+u.addedCount,m=r.splice(u.index,h.length),v=c=a.length+m.length;for(;g<f;++g){const e=r[g],d=e?e.firstChild:this.location;let u;s&&c>0?(p<=v&&m.length>0?(u=m[p],p++):(u=a[l],l++),c--):u=i.create(),r.splice(g,0,u),n(u,o,g,t),u.insertBefore(d)}m[p]&&a.push(...m.slice(p))}for(let e=l,t=a.length;e<t;++e)a[e].dispose();if(this.options.positioning)for(let e=0,t=r.length;e<t;++e){const n=r[e].context;n.length=t,n.index=e}}refreshAllViews(e=!1){const t=this.items,r=this.childContext,n=this.template,o=this.location,i=this.bindView;let s=t.length,a=this.views,l=a.length;
624if(0!==s&&!e&&this.options.recycle||(Xo.disposeContiguousBatch(a),l=0),0===l){this.views=a=new Array(s);for(let e=0;e<s;++e){const s=n.create();i(s,t,e,r),a[e]=s,s.insertBefore(o)}}else{let e=0;for(;e<s;++e)if(e<l)i(a[e],t,e,r);else{const s=n.create();i(s,t,e,r),a.push(s),s.insertBefore(o)}const c=a.splice(e,l-e);for(e=0,s=c.length;e<s;++e)c[e].dispose()}}unbindAllViews(){const e=this.views;for(let t=0,r=e.length;t<r;++t)e[t].unbind()}}class yu extends Oo{constructor(e,t,r){super(),this.itemsBinding=e,this.templateBinding=t,this.options=r,this.createPlaceholder=Tr.createBlockPlaceholder,function(){if(hu)return;hu=!0,$r.setArrayObserverFactory(e=>new gu(e));const e=Array.prototype;if(e.$fastPatch)return;Reflect.defineProperty(e,"$fastPatch",{value:1,enumerable:!1});const t=e.pop,r=e.push,n=e.reverse,o=e.shift,i=e.sort,s=e.splice,a=e.unshift;e.pop=function(){const e=this.length>0,r=t.apply(this,arguments),n=this.$fastController;return void 0!==n&&e&&n.addSplice(au(this.length,[r],0)),r},e.push=function(){const e=r.apply(this,arguments),t=this.$fastController;return void 0!==t&&t.addSplice(pu(au(this.length-arguments.length,[],arguments.length),this)),e},e.reverse=function(){let e;const t=this.$fastController;void 0!==t&&(t.flush(),e=this.slice());const r=n.apply(this,arguments);return void 0!==t&&t.reset(e),r},e.shift=function(){const e=this.length>0,t=o.apply(this,arguments),r=this.$fastController;return void 0!==r&&e&&r.addSplice(au(0,[t],0)),t},e.sort=function(){let e;const t=this.$fastController;void 0!==t&&(t.flush(),e=this.slice());const r=i.apply(this,arguments);return void 0!==t&&t.reset(e),r},e.splice=function(){const e=s.apply(this,arguments),t=this.$fastController;return void 0!==t&&t.addSplice(pu(au(+arguments[0],e,arguments.length>2?arguments.length-2:0),this)),e},e.unshift=function(){const e=a.apply(this,arguments),t=this.$fastController;return void 0!==t&&t.addSplice(pu(au(0,[],arguments.length),this)),e}}(),this.isItemsBindingVolatile=$r.isVolatileBinding(e),this.isTemplateBindingVolatile=$r.isVolatileBinding(t)}createBehavior(e){return new bu(e,this.itemsBinding,this.isItemsBindingVolatile,this.templateBinding,this.isTemplateBindingVolatile,this.options)}}function wu(e,t,r=fu){return new yu(e,"function"==typeof t?t:()=>t,Object.assign(Object.assign({},fu),r))}class xu extends Zt{static get styles(){return Ml(xu,":host{display:inline-flex}::slotted(chameleon-toolbar-button){border-right:1px solid var(--goto-border-color-default)}::slotted(chameleon-toolbar-button:first-child){--goto-toolbar-button-left-radius:var(--goto-radius-small)}::slotted(chameleon-toolbar-button:last-child){--goto-toolbar-button-right-radius:var(--goto-radius-small);border-right:none}")}render(){return oe`<slot></slot>`}}xu.baseName="toolbar";class _u{}nn([Qr({attribute:"aria-atomic"})],_u.prototype,"ariaAtomic",void 0),nn([Qr({attribute:"aria-busy"})],_u.prototype,"ariaBusy",void 0),nn([Qr({attribute:"aria-controls"})],_u.prototype,"ariaControls",void 0),nn([Qr({attribute:"aria-current"})],_u.prototype,"ariaCurrent",void 0),nn([Qr({attribute:"aria-describedby"})],_u.prototype,"ariaDescribedby",void 0),nn([Qr({attribute:"aria-details"})],_u.prototype,"ariaDetails",void 0),nn([Qr({attribute:"aria-disabled"})],_u.prototype,"ariaDisabled",void 0),nn([Qr({attribute:"aria-errormessage"})],_u.prototype,"ariaErrormessage",void 0),nn([Qr({attribute:"aria-flowto"})],_u.prototype,"ariaFlowto",void 0),nn([Qr({attribute:"aria-haspopup"})],_u.prototype,"ariaHaspopup",void 0),nn([Qr({attribute:"aria-hidden"})],_u.prototype,"ariaHidden",void 0),nn([Qr({attribute:"aria-invalid"})],_u.prototype,"ariaInvalid",void 0),nn([Qr({attribute:"aria-keyshortcuts"})],_u.prototype,"ariaKeyshortcuts",void 0),nn([Qr({attribute:"aria-label"})],_u.prototype,"ariaLabel",void 0),nn([Qr({attribute:"aria-labelledby"})],_u.prototype,"ariaLabelledby",void 0),nn([Qr({attribute:"aria-live"})],_u.prototype,"ariaLive",void 0),nn([Qr({attribute:"aria-owns"})],_u.prototype,"ariaOwns",void 0),nn([Qr({attribute:"aria-relevant"})],_u.prototype,"ariaRelevant",void 0),nn([Qr({attribute:"aria-roledescription"})],_u.prototype,"ariaRoledescription",void 0);const ku="form-associated-proxy",Cu="ElementInternals",Su=Cu in window&&"setFormValue"in window[Cu].prototype,Eu=new WeakMap;function Iu(e){const t=class extends e{constructor(...e){super(...e),this.dirtyValue=!1,this.disabled=!1,this.proxyEventsToBlock=["change","click"],this.proxyInitialized=!1,this.required=!1,this.initialValue=this.initialValue||"",this.elementInternals||(this.formResetCallback=this.formResetCallback.bind(this))}static get formAssociated(){return Su}get validity(){return this.elementInternals?this.elementInternals.validity:this.proxy.validity}get form(){return this.elementInternals?this.elementInternals.form:this.proxy.form}get validationMessage(){return this.elementInternals?this.elementInternals.validationMessage:this.proxy.validationMessage}get willValidate(){return this.elementInternals?this.elementInternals.willValidate:this.proxy.willValidate}get labels(){if(this.elementInternals)return Object.freeze(Array.from(this.elementInternals.labels));if(this.proxy instanceof HTMLElement&&this.proxy.ownerDocument&&this.id){const e=this.proxy.labels,t=Array.from(this.proxy.getRootNode().querySelectorAll(`[for='${this.id}']`)),r=e?t.concat(Array.from(e)):t;return Object.freeze(r)}return xr}valueChanged(e,t){this.dirtyValue=!0,this.proxy instanceof HTMLElement&&(this.proxy.value=this.value),this.currentValue=this.value,this.setFormValue(this.value),this.validate()}currentValueChanged(){this.value=this.currentValue}initialValueChanged(e,t){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}disabledChanged(e,t){this.proxy instanceof HTMLElement&&(this.proxy.disabled=this.disabled),Tr.queueUpdate(()=>this.classList.toggle("disabled",this.disabled))}nameChanged(e,t){this.proxy instanceof HTMLElement&&(this.proxy.name=this.name)}requiredChanged(e,t){this.proxy instanceof HTMLElement&&(this.proxy.required=this.required),Tr.queueUpdate(()=>this.classList.toggle("required",this.required)),this.validate()}get elementInternals(){if(!Su)return null;let e=Eu.get(this);return e||(e=this.attachInternals(),Eu.set(this,e)),e}connectedCallback(){super.connectedCallback(),this.addEventListener("keypress",this._keypressHandler),this.value||(this.value=this.initialValue,this.dirtyValue=!1),this.elementInternals||(this.attachProxy(),this.form&&this.form.addEventListener("reset",this.formResetCallback))}disconnectedCallback(){super.disconnectedCallback(),this.proxyEventsToBlock.forEach(e
624=>this.proxy.removeEventListener(e,this.stopPropagation)),!this.elementInternals&&this.form&&this.form.removeEventListener("reset",this.formResetCallback)}checkValidity(){return this.elementInternals?this.elementInternals.checkValidity():this.proxy.checkValidity()}reportValidity(){return this.elementInternals?this.elementInternals.reportValidity():this.proxy.reportValidity()}setValidity(e,t,r){this.elementInternals?this.elementInternals.setValidity(e,t,r):"string"==typeof t&&this.proxy.setCustomValidity(t)}formDisabledCallback(e){this.disabled=e}formResetCallback(){this.value=this.initialValue,this.dirtyValue=!1}attachProxy(){var e;this.proxyInitialized||(this.proxyInitialized=!0,this.proxy.style.display="none",this.proxyEventsToBlock.forEach(e=>this.proxy.addEventListener(e,this.stopPropagation)),this.proxy.disabled=this.disabled,this.proxy.required=this.required,"string"==typeof this.name&&(this.proxy.name=this.name),"string"==typeof this.value&&(this.proxy.value=this.value),this.proxy.setAttribute("slot",ku),this.proxySlot=document.createElement("slot"),this.proxySlot.setAttribute("name",ku)),null===(e=this.shadowRoot)||void 0===e||e.appendChild(this.proxySlot),this.appendChild(this.proxy)}detachProxy(){var e;this.removeChild(this.proxy),null===(e=this.shadowRoot)||void 0===e||e.removeChild(this.proxySlot)}validate(e){this.proxy instanceof HTMLElement&&this.setValidity(this.proxy.validity,this.proxy.validationMessage,e)}setFormValue(e,t){this.elementInternals&&this.elementInternals.setFormValue(e,t||e)}_keypressHandler(e){if("Enter"===e.key&&this.form instanceof HTMLFormElement){const e=this.form.querySelector("[type=submit]");null==e||e.click()}}stopPropagation(e){e.stopPropagation()}};return Qr({mode:"boolean"})(t.prototype,"disabled"),Qr({mode:"fromView",attribute:"value"})(t.prototype,"initialValue"),Qr({attribute:"current-value"})(t.prototype,"currentValue"),Qr(t.prototype,"name"),Qr({mode:"boolean"})(t.prototype,"required"),Nr(t.prototype,"value"),t}class Au extends Jn{}class Tu extends(Iu(Au)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class Ou extends Tu{constructor(){super(...arguments),this.handleClick=e=>{var t;this.disabled&&(null===(t=this.defaultSlottedContent)||void 0===t?void 0:t.length)<=1&&e.stopPropagation()},this.handleSubmission=()=>{if(!this.form)return;const e=this.proxy.isConnected;e||this.attachProxy(),"function"==typeof this.form.requestSubmit?this.form.requestSubmit(this.proxy):this.proxy.click(),e||this.detachProxy()},this.handleFormReset=()=>{var e;null===(e=this.form)||void 0===e||e.reset()},this.handleUnsupportedDelegatesFocus=()=>{var e;window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&(null===(e=this.$fastController.definition.shadowOptions)||void 0===e?void 0:e.delegatesFocus)&&(this.focus=()=>{this.control.focus()})}}formactionChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formAction=this.formaction)}formenctypeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formEnctype=this.formenctype)}formmethodChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formMethod=this.formmethod)}formnovalidateChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formNoValidate=this.formnovalidate)}formtargetChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formTarget=this.formtarget)}typeChanged(e,t){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.t
624ype),"submit"===t&&this.addEventListener("click",this.handleSubmission),"submit"===e&&this.removeEventListener("click",this.handleSubmission),"reset"===t&&this.addEventListener("click",this.handleFormReset),"reset"===e&&this.removeEventListener("click",this.handleFormReset)}validate(){super.validate(this.control)}connectedCallback(){var e;super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.handleUnsupportedDelegatesFocus();const t=Array.from(null===(e=this.control)||void 0===e?void 0:e.children);t&&t.forEach(e=>{e.addEventListener("click",this.handleClick)})}disconnectedCallback(){var e;super.disconnectedCallback();const t=Array.from(null===(e=this.control)||void 0===e?void 0:e.children);t&&t.forEach(e=>{e.removeEventListener("click",this.handleClick)})}}nn([Qr({mode:"boolean"})],Ou.prototype,"autofocus",void 0),nn([Qr({attribute:"form"})],Ou.prototype,"formId",void 0),nn([Qr],Ou.prototype,"formaction",void 0),nn([Qr],Ou.prototype,"formenctype",void 0),nn([Qr],Ou.prototype,"formmethod",void 0),nn([Qr({mode:"boolean"})],Ou.prototype,"formnovalidate",void 0),nn([Qr],Ou.prototype,"formtarget",void 0),nn([Qr],Ou.prototype,"type",void 0),nn([Nr],Ou.prototype,"defaultSlottedContent",void 0);class Lu{}nn([Qr({attribute:"aria-expanded"})],Lu.prototype,"ariaExpanded",void 0),nn([Qr({attribute:"aria-pressed"})],Lu.prototype,"ariaPressed",void 0),oc(Lu,_u),oc(Ou,tc,Lu);class $u extends(s(Ou)){defaultSlottedContentChanged(){this.classList.toggle("empty-content",!this.defaultSlottedContent.length)}}h([Qr({mode:"boolean"})],$u.prototype,"selected",void 0);class Nu extends Zt{constructor(){super(...arguments),this.color=""}static get styles(){return Ml(Nu,":host{outline:none;display:inline-flex}:host .control{cursor:pointer;box-sizing:border-box;border-radius:var(--goto-radius-small);white-space:normal;color:var(--goto-link-color,var(--goto-type-color-on-brand-tertiary-default));--goto-icon-color:var(--goto-icon-color-on-brand-tertiary-default);padding:var(--goto-spacing-00)2px;margin:var(--goto-spacing-00)-2px;background-color:#0000;border:1px solid #0000;outline:none;text-decoration:underline}:host .control:hover{color:var(--goto-link-color,var(--goto-type-color-on-brand-tertiary-hover))}:host ::slotted(chameleon-svg){display:inline-flex}:host:has(.control:focus-visible){outline-offset:2px;outline:var(--goto-focus-color-highlight-default)solid 1px;border-radius:var(--goto-radius-small)}:host(.blockquote-source):has(.control:focus-visible){outline-offset:-1px}:host([variant=body-small]){font:var(--goto-body-small)}:host([variant=body-medium]){font:var(--goto-body-medium)}:host([variant=body-large]){font:var(--goto-body-large)}:host([variant=caption-medium]){font:var(--goto-caption-medium)}:host([variant=caption-medium-strong]){font:var(--goto-caption-medium-strong)}:host([variant=caption-small]){font:var(--goto-caption-small)}:host([variant=caption-small-strong]){font:var(--goto-caption-small-strong)}:host([disabled]) .control{pointer-events:none;color:var(--goto-type-color-disabled)}:host(.selected-interactive-item) .control{border-color:var(--goto-border-color-default);box-shadow:var(--goto-interactive-color-secondary-pressed)}")}updated(e){super.updated(e),e.has("color")&&(this.color?this.style.setProperty("--goto-link-color",this.color):this.style.removeProperty("--goto-link-color"))}connectedCallback(){super.connectedCallback(),this.color&&this.style.setProperty("--goto-link-color",this.color)}render(){const e="_blank"===this.target&&this.rel&&!this.rel.includes("noreferrer")?`${this.rel} noreferrer`:"_blank"!==this.target||this.rel?this.rel:"noreferrer";return oe`
625      <a
626        class="control"
627        part="control"
628        download="${Bl(this.download)}"
629        href="${Bl(this.disabled?void 0:this.href)}"
630        hreflang="${Bl(this.hreflang)}"
631        ping="${Bl(this.ping)}"
632        referrerpolicy="${Bl(this.referrerpolicy)}"
633        rel="${Bl(e)}"
634        target="${Bl(this.target)}"
635        type="${Bl(this.type)}"
636        tabindex="${this.disabled?"-1":"0"}"
637        aria-disabled="${Bl(this.disabled?"true":void 0)}"
638      >
639        <slot name="start"></slot>
640        <slot></slot>
641        <slot name="end"></slot>
642      </a>
643    `}}function Ru(e,t=!1){return e?"true":t?void 0:"false"}Nu.baseName="link",Nu.shadowRootOptions={...Zt.shadowRootOptions,delegatesFocus:!0},h([Te({reflect:!0})],Nu.prototype,"variant",void 0),h([Te({type:Boolean,reflect:!0})],Nu.prototype,"disabled",void 0),h([Te()],Nu.prototype,"color",void 0),h([Te()],Nu.prototype,"href",void 0),h([Te()],Nu.prototype,"target",void 0),h([Te()],Nu.prototype,"download",void 0),h([Te()],Nu.prototype,"ping",void 0),h([Te()],Nu.prototype,"rel",void 0),h([Te()],Nu.prototype,"hreflang",void 0),h([Te()],Nu.prototype,"type",void 0),h([Te()],Nu.prototype,"referrerpolicy",void 0);class Pu extends(s(Jn)){constructor(){super(...arguments),this.locale=navigator.language,this.timezone=Td(),this.presets=[],this.weeks=[],this.months=[],this.years=[],this.weekDays=[],this.tableSizeOfViewByYear=[4,3],this.tableWidthOfViewByMonth=3,this.viewByVariants=["week","month","year"],this._yearsViewFirstYear=void 0}get isViewByTablistVisible(){return"hidden"!==(this.viewBy??"hidden")}get usedViewByVariant(){const e=this.viewBy??"hidden";return"hidden"===e?"week":e}get presetsEnabled(){return this.validPresets.length>0&&this.presetsLabel}get validPresets(){return this.presets.filter(e=>{if(!e.start||!e.end)return!1;const t=Gc(e.start),r=Gc(e.end);return!(jd(t,this.min)||Vd(r,this.max))})}get isHeaderSlotEmpty(){return!(this.header??[]).flatMap(e=>e instanceof globalThis.HTMLSlotElement?e.assignedElements({flatten:!0}):e).length}get focusedDateSafe(){return this.focusedDate?this.focusedDate:this.start?Gc(this.start):this.end?Gc(this.end):Cd(this.timezone)}cellClassNames(e){$r.track(this,"selectedStartDate"),$r.track(this,"selectedEndDate"),$r.track(this,"selectedViewByVariant");const t=this.usedViewByVariant;return["cell",this.isDateInSelectionRange(t,e)?"in-range":"",this.selectedStartDate&&this.isSameDate(t,e,this.selectedStartDate)?"start-
643date":"",this.selectedEndDate&&this.isSameDate(t,e,this.selectedEndDate)?"end-date":""].join(" ")}spanClassNames(e){$r.track(this,"selectedStartDate"),$r.track(this,"selectedEndDate"),$r.track(this,"focusedDate"),$r.track(this,"min"),$r.track(this,"max"),$r.track(this,"timezone"),$r.track(this,"selectedViewByVariant");const t=this.usedViewByVariant,{classForCellButton:r,classForIsSameDate:n}={week:{classForCellButton:"day",classForIsSameDate:"today"},month:{classForCellButton:"month",classForIsSameDate:"this-month"},year:{classForCellButton:"year",classForIsSameDate:"this-year"}}[t];return[r,this.selectedStartDate&&this.isSameDate(t,e,this.selectedStartDate)||this.selectedEndDate&&this.isSameDate(t,e,this.selectedEndDate)?"selected":"",this.isSameDate(t,e,Cd(this.timezone))?n:"",this.isSpanDisabled(e)?"disabled":"","week"!==t||wd(e,this.focusedDateSafe)?"":"inactive"].join(" ")}isSpanDisabled(e){$r.track(this,"selectedViewByVariant");const t=this.usedViewByVariant;return!this.isDateInMinMaxRange(t,e)}connectedCallback(){super.connectedCallback(),Kd(this.locale)&&qd(this.timezone)&&(this.refreshDaysInCalendar(),this.start&&this.syncSelectedStart(Gc(this.start)),this.end&&this.syncSelectedEnd(Gc(this.end)))}startChanged(){const e=this.start??"";this.syncSelectedStart(e?Gc(e):void 0),this.focusedDate=this.selectedStartDate&&fd(this.selectedStartDate),this.refreshDaysInCalendar()}endChanged(){const e=this.end??"";this.syncSelectedEnd(e?Gc(e):void 0),this.focusedDate=this.selectedEndDate&&fd(this.selectedEndDate),this.refreshDaysInCalendar()}localeChanged(){Kd(this.locale)&&this.refreshDaysInCalendar()}timezoneChanged(){qd(this.timezone)&&this.refreshDaysInCalendar()}getInitialDate(e){return e||(this.start?Gc(this.start):this.end?Gc(this.end):Cd(this.timezone))}getWeeks(e){const t=this.normalizeDate("week",this.getInitialDate(e));return[...new Array(zd(Ld(t),this.locale)).keys()].map(e=>Bd(this.locale,e,Ld(t)))}getMonths(e){$r.track(this,"viewByMonthSize");const t=(e=>{const t=e.calendar.getMonthsInYear(e);return[...Array(t).keys()].map(t=>e.set({month:t+1}))})($d(this.normalizeDate("month",this.getInitialDate(e)))),r=this.tableWidthOfViewByMonth;if(!r)return[];const n=Math.ceil(t.length/this.tableWidthOfViewByMonth),o=[...Array(n)].map((e,n)=>[...Array(r)].map((e,o)=>t[n*r+o]??null));return o}getYearsNew(e){if($r.track(this,"tableSizeOfViewByYear"),!this.tableSizeOfViewByYear)return[];const[t,r]=this.tableSizeOfViewByYear,n=this.normalizeDate("year",this.getInitialDate(e)),o=function(e){const t=e.indexOfAnchorInRow%e.rowLength-e.anchor%e.rowLength;return{getRowFor:r=>{const n=r-(r+t)%e.rowLength;return[...new Array(e.rowLength).keys()].map(e=>n+e)}}}({rowLength:r,anchor:1,indexOfAnchorInRow:0});if(this._yearsViewFirstYear){const e=o.getRowFor(this._yearsViewFirstYear.year)[0],i=e+t*r-1;if(n.year<e){const e=o.getRowFor(n.year)[0];this._yearsViewFirstYear=this._yearsViewFirstYear.set({year:e})}else if(n.year>i){const e=o.getRowFor(n.year)[0];this._yearsViewFirstYear=this._yearsViewFirstYear.set({year:e-(t-1)*r})}}else{const e=Math.max(0,Math.floor(t/2)-1),i=n.subtract({years:e*r});this._yearsViewFirstYear=i.set({year:o.getRowFor(i.year)[0]})}const i=this._yearsViewFirstYear,s=[...new Array(t).keys()].map(e=>o.getRowFor(i.add({years:e*r}).year)),{era:a,month:l,day:c}=e;return s.map(e=>e.map(e=>i.set({era:a,year:e,month:l,day:c})))}getFormattedMonth(e){return Intl.DateTimeFormat(this.locale,{month:"short"}).format(e.toDate(this.timezone))}getFormattedYear(e){return Intl.DateTimeFormat(this.locale,{year:"numeric"}).format(e.toDate(this.timezone))}getLocalizedLabelForViewBy(e){const t="week"===e?"weekOfYear":e;return new Intl.DisplayNames(this.locale,{type:"dateTimeField",fallback:"none"}).of(t)??e}getAriaLabelForNav(e){if(!Kd(this.locale))return;const t="next"===e?1:-1;switch(this.usedViewByVariant){case"week":return new Intl.RelativeTimeFormat(this.locale,{numeric:"auto"}).format(t,"month");case"month":return new Intl.RelativeTimeFormat(this.locale,{numeric:"auto"}).format(t,"year");case"year":{if(!this.tableSizeOfViewByYear)return;const[,e]=this.tableSizeOfViewByYear;return new Intl.RelativeTimeFormat(this.locale,{numeric:"auto"}).format(e*t,"year")}default:this.usedViewByVariant}}formatNavDisplayDate(e){return e?new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(e.toDate(this.timezone)):""}
643selectDateRange(e,t){this.refreshDaysInCalendar();const r={start:e,end:t};this.$emit("ch-range-calendar-change",r)}handleDateClick(e){this.selectCalendarCell(this.usedViewByVariant,e)}handleDateNavigationClick(e){const t="next"===e?1:-1;switch(this.usedViewByVariant){case"week":this.focusedDate=this.focusedDateSafe.add({months:t});break;case"month":this.focusedDate=this.focusedDateSafe.add({years:t});break;case"year":{if(!this.tableSizeOfViewByYear||!this._yearsViewFirstYear)break;const[,e]=this.tableSizeOfViewByYear;this.focusedDate=this.focusedDateSafe.add({years:e*t}),this._yearsViewFirstYear=fd(this._yearsViewFirstYear.add({years:e*t}));break}default:this.usedViewByVariant}this.refreshDaysInCalendar()}handleTodayButtonClick(){this.focusedDate=Cd(this.timezone),this.viewBy="hidden"===(this.viewBy??"hidden")?void 0:"week",this._yearsViewFirstYear=void 0,this.refreshDaysInCalendar()}handlePresetKeyDown(e,t){switch(e.key){case" ":case"Enter":return e.preventDefault(),this.selectDateRange(t.start,t.end),!1;case"Tab":return!0}}handlePresetSelect(e){this.selectDateRange(e.start,e.end)}handleDateKeyDown(e,t){const r=this.usedViewByVariant,n=this.tableWidthOfViewByMonth??0,[,o=0]=this.tableSizeOfViewByYear??[],i={week:{ArrowUp:{direction:"prev",stepScale:"weeks",stepAmount:1},ArrowDown:{direction:"next",stepScale:"weeks",stepAmount:1},ArrowLeft:{direction:"prev",stepScale:"days",stepAmount:1},ArrowRight:{direction:"next",stepScale:"days",stepAmount:1}},month:{ArrowUp:{direction:"prev",stepScale:"months",stepAmount:n},ArrowDown:{direction:"next",stepScale:"months",stepAmount:n},ArrowLeft:{direction:"prev",stepScale:"months",stepAmount:1},ArrowRight:{direction:"next",stepScale:"months",stepAmount:1}},year:{ArrowUp:{direction:"prev",stepScale:"years",stepAmount:o},ArrowDown:{direction:"next",stepScale:"years",stepAmount:o},ArrowLeft:{direction:"prev",stepScale:"years",stepAmount:1},ArrowRight:{direction:"next",stepScale:"years",stepAmount:1}}};switch(e.code){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":{const{direction:n,stepScale:o,stepAmount:s}=i[r][e.code]??{};if(!(n&&o&&s))break;return this.handleFocusedDateKeyboardNavigation(t,n,o,s),!1}case"Home":return"week"===r&&this.moveToStartOfWeek(t),!1;case"End":return"week"===r&&this.moveToEndOfWeek(t),!1;case"PageUp":return e.shiftKey?this.moveToPreviousYear(t):this.moveToPreviousMonth(t),!1;case"PageDown":return e.shiftKey?this.moveToNextYear(t):this.moveToNextMonth(t),!1;case"Enter":case"Space":return this.selectCalendarCell(r,t),this.focusCalendarCell(),!1}return!0}handleFocusedDateKeyboardNavigation(e,t,r,n){const o=this.focusedDateSafe,i=n*("prev"===t?-1:1),s=e.add({[r]:i});this.isDateInMinMaxRange({days:"week",weeks:"week",months:"month",years:"year"}[r],s)&&(this.focusedDate=fd(s),wd(o,this.focusedDateSafe)||this.refreshDaysInCalendar(),Tr.queueUpdate(()=>{const e=this.shadowRoot?.querySelector(`[data-value="${this.focusedDateSafe.toString()}"]`);e?.focus()}))}focusCalendarCell(){Tr.queueUpdate(()=>{const e=this.shadowRoot?.querySelector('.calendar [tabindex="0"]');e?.focus()})}moveToStartOfWeek(e){const t=Xd(e,this.locale,this.min);t&&(this.focusedDate=fd(t),Tr.queueUpdate(()=>{const e=this.shadowRoot?.querySelector(`[data-value="${this.focusedDateSafe.toString()}"]`);e?.focus()}))}moveToEndOfWeek(e){const t=eu(e,this.locale,this.max);t&&(this.focusedDate=fd(t),Tr.queueUpdate(()=>{const e=this.shadowRoot?.querySelector(`[data-value="${this.focusedDateSafe.toString()}"]`);e?.focus()}))}moveToPreviousMonth(e){const t=this.focusedDateSafe,r=tu(e,this.min);r&&(this.focusedDate=fd(r),wd(t,this.focusedDateSafe)||this.refreshDaysInCalendar(),Tr.queueUpdate(()=>{const e=this.shadowRoot?.querySelector(`[data-value="${this.focusedDateSafe.toString()}"]`);e?.focus()}))}moveToNextMonth(e){const t=this.focusedDateSafe,r=ru(e,this.max);r&&(this.focusedDate=fd(r),wd(t,this.focusedDateSafe)||this.refreshDaysInCalendar(),Tr.queueUpdate(()=>{const e=this.shadowRoot?.querySelector(`[data-value="${this.focusedDateSafe.toString()}"]`);e?.focus()}))}moveToPreviousYear(e){const t=this.focusedDateSafe,r=nu(e,this.min);r&&(this.focusedDate=fd(r),wd(t,this.focusedDateSafe)||this.refreshDaysInCalendar(
643),Tr.queueUpdate(()=>{const e=this.shadowRoot?.querySelector(`[data-value="${this.focusedDateSafe.toString()}"]`);e?.focus()}))}moveToNextYear(e){const t=this.focusedDateSafe,r=ou(e,this.max);r&&(this.focusedDate=fd(r),wd(t,this.focusedDateSafe)||this.refreshDaysInCalendar(),Tr.queueUpdate(()=>{const e=this.shadowRoot?.querySelector(`[data-value="${this.focusedDateSafe.toString()}"]`);e?.focus()}))}selectCalendarCell(e,t){switch(e){case"week":this.selectDay(t);break;case"month":this.focusedDate=fd(this.clampBaseDateInMinMaxRange("week",t)),this.viewBy="week",this.refreshDaysInCalendar();break;case"year":this.focusedDate=fd(this.clampBaseDateInMinMaxRange("month",t)),this.viewBy="month",this.refreshDaysInCalendar()}}selectDay(e){const t={start:this.selectedStartDate?this.selectedStartDate.toString():void 0,end:this.selectedEndDate?this.selectedEndDate.toString():void 0},r=()=>this.focusCalendarCell();return!this.start||this.start&&this.end?this.selectedEndDate&&e.compare(this.selectedEndDate)>0&&!this.start?(this.syncSelectedStart(this.selectedEndDate),this.syncSelectedEnd(e),t.end=e.toString(),t.start=this.start,this.$emit("ch-range-calendar-change",t),void r()):(this.selectedStartDate&&(this.selectedEndDate=void 0,this.end=void 0,t.end=void 0),this.syncSelectedStart(e),t.start=e.toString(),this.$emit("ch-range-calendar-change",t),void r()):this.end?void 0:this.selectedStartDate&&e.compare(this.selectedStartDate)<0?(this.syncSelectedEnd(this.selectedStartDate),this.syncSelectedStart(e),t.start=e.toString(),t.end=this.end,this.$emit("ch-range-calendar-change",t),void r()):(this.syncSelectedEnd(e),t.end=e.toString(),this.$emit("ch-range-calendar-change",t),void r())}refreshDaysInCalendar(){const e=this.focusedDateSafe;this.navDisplayDate=this.getInitialDate(e),this.weekDays=Hd(this.timezone,this.locale),this.weeks=this.getWeeks(e),this.months=this.getMonths(e),this.years=this.getYearsNew(e)}syncSelectedStart(e){this.selectedStartDate=e,this.start=e?.toString()}syncSelectedEnd(e){this.selectedEndDate=e,this.end=e?.toString()}normalizeDate(e,t){switch(e){case"week":return t.set({hour:0,minute:0,second:0,millisecond:0});case"month":return t.set({day:1,hour:0,minute:0,second:0,millisecond:0});case"year":return t.set({month:1,day:1,hour:0,minute:0,second:0,millisecond:0});default:return t}}isSameDate(e,t,r){switch(e){case"year":return xd(t,r);case"month":return wd(t,r);case"week":return yd(t,r);default:return!1}}clampBaseDateInMinMaxRange(e,t){const r=this.normalizeDate(e,t),n=this.min?Gc(this.min):void 0,o=this.max?Gc(this.max):void 0,i=n&&this.normalizeDate(e,n),s=o&&this.normalizeDate(e,o);return i&&r.compare(i)<0?i:s&&s.compare(r)<0?s:r}isDateInMinMaxRange(e,t){const r=this.normalizeDate(e,t),n=this.min?Gc(this.min):void 0,o=this.max?Gc(this.max):void 0,i=n&&this.normalizeDate(e,n),s=o&&this.normalizeDate(e,o),a=!i||i.compare(r)<=0,l=!s||r.compare(s)<=0;return a&&l}isDateInSelectionRange(e,t){if(!this.selectedStartDate||!this.selectedEndDate)return!1;const r=this.normalizeDate(e,Gc(this.selectedStartDate.toString())),n=this.normalizeDate(e,Gc(this.selectedEndDate.toString())),o=this.normalizeDate(e,t),i=r.compare(o)<=0,s=n.compare(o)>=0;return i&&s}}h([Qr],Pu.prototype,"locale",void 0),h([Qr],Pu.prototype,"timezone",void 0),h([Qr],Pu.prototype,"value",void 0),h([Qr],Pu.prototype,"start",void 0),h([Qr],Pu.prototype,"end",void 0),h([Qr],Pu.prototype,"min",void 0),h([Qr],Pu.prototype,"max",void 0),h([Qr({attribute:"view-by"})],Pu.prototype,"viewBy",void 0),h([Qr({mode:"boolean"})],Pu.prototype,"footer",void 0),h([Qr({mode:"boolean",attribute:"auto-apply"})],Pu.prototype,"autoApply",void 0),h([Qr({attribute:"presets-label"})],Pu.prototype,"presetsLabel",void 0),h([Nr],Pu.prototype,"header",void 0),h([Nr],Pu.prototype,"presets",void 0),h([Nr],Pu.prototype,"weeks",void 0),h([Nr],Pu.prototype,"months",void 0),h([Nr],Pu.prototype,"years",void 0),h([Nr],Pu.prototype,"weekDays",void 0),h([Nr],Pu.prototype,"navDisplayDate",void 0),h([Nr],Pu.prototype,"tableSizeOfViewByYear",void 0),h([Rr],Pu.prototype,"isViewByTablistVisible",null),h([Rr],Pu.prototype,"usedViewByVariant",null),h([Rr],Pu.prototype,"presetsEnabled",null),h([Rr],Pu.prototype,"validPresets",null),h([Rr],Pu.prototype,"isHeaderSlotEmpty",null),h([Nr],Pu.prototype,"viewByVariants",void 0),h([Nr],Pu.prototype,"selectedStartDate",void 0),h([Nr],Pu.prototype,"selectedEndDate",void 0),h([Nr],Pu.prototype,"focusedDate",void 0),h([Rr],Pu.prototype,"focusedDateSafe",null);const Du=Pu.compose({baseName:"range-calendar",template:(e,t)=>
643{const r=u(Hl),n=u(Wi),o=u(jl),i=u(mr),s=u(Nu),a=u(xu),l=u($u),c={week:ri`
644      <div class="calendar calendar-week">
645        <table>
646          <thead>
647            <tr>
648              ${wu(e=>e.weekDays,ri`<th>${e=>e}</th>`)}
649            </tr>
650          </thead>
651          <tbody>
652            ${wu(e=>e.weeks,ri`
653                <tr>
654                  ${wu(e=>e,ri`
655                      <td role="gridcell" class="${(e,t)=>t.parentContext.parent.cellClassNames(e)}">
656                        <span
657                          class="${(e,t)=>t.parentContext.parent.spanClassNames(e)}"
658                          tabindex="${(e,t)=>Zd(e,t.parentContext.parent.focusedDateSafe)}"
659                          role="button"
660                          aria-disabled="${(e,t)=>Ru(t.parentContext.parent.isSpanDisabled(e))}"
661                          aria-label="${(e,t)=>Yd(e,t.parentContext.parent.locale,t.parentContext.parent.timezone)}"
662                          data-value="${e=>e.toString()}"
663                          @click="${(e,t)=>t.parentContext.parent.handleDateClick(e)}"
664                          @keydown="${(e,t)=>t.parentContext.parent.handleDateKeyDown(t.event,e)}"
665                        >
666                          ${(e,t)=>Wd(t.parentContext.parent.locale,e.day)}
667                        </span>
668                      </td>
669                    `)}
670                </tr>
671              `)}
672          </tbody>
673        </table>
674      </div>
675    `,month:ri`
676      <div class="calendar calendar-month">
677        <table>
678          <tbody>
679            ${wu(e=>e.months,ri`
680                <tr>
681                  ${wu(e=>e,ri`
682                      <td role="gridcell" class="${(e,t)=>t.parentContext.parent.cellClassNames(e)}">
683                        <span
684                          class="${(e,t)=>t.parentContext.parent.spanClassNames(e)}"
685                          tabindex="${(e,t)=>wd(e,t.parentContext.parent.focusedDateSafe)?"0":"-1"}"
686                          role="button"
687                          aria-disabled="${(e,t)=>Ru(t.parentContext.parent.isSpanDisabled(e))}"
688                          aria-label="${(e,t)=>{return r=e,n=t.parentContext.parent.locale,o=t.parentContext.parent.timezone,new Intl.DateTimeFormat(n,{month:"long",year:"numeric"}).format(r.toDate(o));var r,n,o}}"
689                          data-value="${e=>e.toString()}"
690                          @click="${(e,t)=>t.parentContext.parent.handleDateClick(e)}"
691                          @keydown="${(e,t)=>t.parentContext.parent.handleDateKeyDown(t.event,e)}"
692                        >
693                          ${(e,t)=>t.parentContext.parent.getFormattedMonth(e)}
694                        </span>
695                      </td>
696                    `)}
697                </tr>
698              `)}
699          </tbody>
700        </table>
701      </div>
702    `,year:ri`
703      <div class="calendar calendar-year">
704      <table>
705          <tbody>
706            ${wu(e=>e.years,ri`
707                <tr>
708                  ${wu(e=>e,ri`
709                      <td role="gridcell" class="${(e,t)=>t.parentContext.parent.cellClassNames(e)}">
710                        <span
711                          class="${(e,t)=>t.parentContext.parent.spanClassNames(e)}"
712                          tabindex="${(e,t)=>xd(e,t.parentContext.parent.focusedDateSafe)?"0":"-1"}"
713                          role="button"
714                          aria-disabled="${(e,t)=>Ru(t.parentContext.parent.isSpanDisabled(e))}"
715                          aria-label="${(e,t)=>{return r=e,n=t.parentContext.parent.locale,o=t.parentContext.parent.timezone,new Intl.DateTimeFormat(n,{year:"numeric"}).format(r.toDate(o));var r,n,o}}"
716                          data-value="${e=>e.toString()}"
717                          @click="${(e,t)=>t.parentContext.parent.handleDateClick(e)}"
718                          @keydown="${(e,t)=>t.parentContext.parent.handleDateKeyDown(t.event,e)}"
719                        >
720                          ${(e,t)=>t.parentContext.parent.getFormattedYear(e)}
721                        </span>
722                      </td>
723                    `)}
724                </tr>
725              `)}
726          </tbody>
727        <table>
728      </div>
729    `};return ri`
730    <div class="title-container ${e=>e.isHeaderSlotEmpty?"header-slot-empty":""}">
731      <${r} class="title" variant="heading-small">
732        <slot name="header" ${si("header")}></slot>
733      </${r}>
734    </div>
735    <div class="calendar-layout">
736      <div class="calendar-layout-main">
737        ${Aa(e=>e.presetsEnabled,ri`
738            <div class="presets">
739              <${r}
740                class="presets-header"
741                variant="caption-medium-strong"
742                color="type-color-secondary"
743              >
744                ${e=>e.presetsLabel}
745              </${r}>
746              ${wu(e=>e.validPresets,ri`
747                  <${s}
748                    class="preset-link"
749                    variant="${(e,t)=>e.start===t.parent.start&&e.end===t.parent.end?"caption-medium-strong":"caption-medium"}"
750                    color="var(--goto-type-color-default)"
751                    @click="${(e,t)=>{t.parent.handlePresetSelect(e)}}"
752                    @keydown="${(e,t)=>t.parent.handlePresetKeyDown(t.event,e)}"
753                  >
754                    ${e=>e.label}
755                  </${s}>
756                `)}
757            </div>
758          `)}
759        <div class="calendar-container">
760          ${Aa(e=>e.isViewByTablistVisible,ri`
761              <div class="view-by-selector">
762                <${a} class="view-by-selector-toolbar">
763                  ${wu(e=>e.viewByVariants,ri`
764                      <${l}
765                        class="view-by-variation-button"
766                        aria-label="${(e,t)=>t.parent.getLocalizedLabelForViewBy(e)}"
767                        selected="${(e,t)=>e===t.parent.usedViewByVariant}"
768                        tabindex="0"
769                        @click="${(e,t)=>{t.parent.viewBy=e}}"
770                      >
771                        ${(e,t)=>t.parent.getLocalizedLabelForViewBy(e)}
772                      </${l}>
773                    `)}
774                </${a}>
775              </div>
776            `)}
777          <div class="calendar-container-inner">
778            <div class="calendar-nav">
779              <${n}
780                variant="${"primary"}"
781                size="small"
782                aria-label="${e=>Kd(e.locale)&&e.getAriaLabelForNav("prev")}"
783                @click="${e=>e.handleDateNavigationClick("prev")}"
784              >
785                <${i}>${Fd}</${i}>
786              </${n}>
787              <div class="calendar-nav-center">
788                <h2>${e=>e.formatNavDisplayDate(e.navDisplayDate)}</h2>
789                <${o} size="small" class="today-button" variant="${"tertiary"}"
790                  @click="${e=>e.handleTodayButtonClick()}"
791                >
792                  ${e=>Kd(e.locale)&&Gd(e.locale)}
793                </${o}>
794              </div>
795              <${n}
796                variant="${"primary"}"
797                size="small"
798                aria-label="${e=>Kd(e.locale)&&e.getAriaLabelForNav("next")}"
799                @click="${e=>e.handleDateNavigationClick("next")}"
800              >
801                <${i}>${Ud}</${i}>
802              </${n}>
803            </div>
804            ${e=>c[e.usedViewByVariant]}
805          </div>
806        </div>
807      </div>
808      <slot name="footer"></slot>
809    </div>
810  `},styles:Ci(':host{--calendar-cell-selection-size:var(--goto-spacing-06);padding:var(--goto-spacing-04);color:var(--goto-type-color-default);flex-direction:column;align-items:center;display:flex}:host chameleon-button.today-button::part(content){text-transform:capitalize}:host .title-container{margin-bottom:var(--goto-spacing-03);align-self:flex-start}:host .title-container.header-slot-empty{display:none}:host .title-container>*{margin:var(--goto-spacing-00);margin-bottom:var(--goto-spacing-02)}:host .view-by-selector{margin-bottom:var(--goto-spacing-03);display:flex}:host .view-by-selector .view-by-selector-toolbar,:host .view-by-selector .view-by-variation-button{flex:1}:host .view-by-selector .view-by-variation-button[selected]{--goto-interactive-color-primary-default:var(--goto-interactive-color-brand-primary-pressed)}:host .view-by-selector .view-by-variation-button:focus-within{outline-offset:2px;outline:var(--goto-interactive-color-brand-primary-pressed)solid 1px;border-radius:var(--goto-radius-small)}:host .view-by-selector .view-by-variation-button::part(content){text-transform:capitalize}:host .calendar-nav{margin-bottom:var(--goto-spacing-01);justify-content:space-between;align-items:center;display:flex}:host .calendar-nav .calendar-nav-center{flex:1;justify-content:space-evenly;display:flex}:host .calendar-nav chameleon-icon-button{user-select:none}:host .calendar-nav h2{user-select:auto;color:var(--goto-type-color-default);font:var(--goto-body-small);margin:var(--goto-spacing-00)}:host .calendar{grid-area:calendar;justify-content:center;width:100%;
810min-width:200px;display:flex}:host .calendar.calendar-week td{padding:1px 2px}:host .calendar.calendar-week td:after,:host .calendar.calendar-week td .day{border-radius:var(--goto-radius-circle)}:host .calendar.calendar-month td{padding:var(--goto-spacing-02)var(--goto-spacing-02)}:host .calendar.calendar-month td:after,:host .calendar.calendar-month td .month{padding:var(--goto-spacing-00)var(--goto-spacing-02);border-radius:var(--goto-radius-large)}:host .calendar.calendar-year td{padding:var(--goto-spacing-02)var(--goto-spacing-01)}:host .calendar.calendar-year td:after,:host .calendar.calendar-year td .year{padding:var(--goto-spacing-00)var(--goto-spacing-03);border-radius:var(--goto-radius-large)}:host table{border-radius:var(--goto-radius-small);border-spacing:0}:host table td{align-content:center;justify-items:center}:host table thead{color:var(--goto-type-color-secondary);font:var(--goto-caption-medium-strong)}:host table thead td{text-align:center;background:0 0}:host table td.in-range{position:relative}:host table td.in-range:before{content:"";width:100%;height:calc(var(--calendar-cell-selection-size) - 2px);background:var(--goto-surface-color-brand-secondary);z-index:-1;position:absolute;top:50%;left:0;transform:translateY(-50%)}:host table td.in-range:last-child:before{width:100%}:host table td.in-range .day:not(.selected),:host table td.in-range .month:not(.selected),:host table td.in-range .year:not(.selected){background:0 0}:host table td.in-range:is(.start-date,.end-date):before{width:50%}:host table td.in-range:is(.start-date,.end-date):after{content:"";background:var(--goto-surface-color-default);width:var(--calendar-cell-selection-size);height:var(--calendar-cell-selection-size);z-index:-1;position:absolute;top:50%;left:50%;transform:translateY(-50%)translate(-50%)}:host table td.in-range.start-date.end-date:before{width:var(--goto-spacing-00)}:host table td.in-range.start-date:before{width:50%;right:0;left:unset}:host .day,:host .month,:host .year{background:var(--goto-surface-color-default);font:var(--goto-caption-medium);width:var(--calendar-cell-selection-size);height:var(--calendar-cell-selection-size);text-align:center;cursor:pointer;border-radius:50%;justify-content:center;align-items:center;display:flex}:host .day:is(.today,.this-month,.this-year),:host .month:is(.today,.this-month,.this-year),:host .year:is(.today,.this-month,.this-year){color:var(--goto-type-color-default);text-underline-position:from-font;text-decoration:underline}:host .day.inactive,:host .day.disabled,:host .month.inactive,:host .month.disabled,:host .year.inactive,:host .year.disabled{color:var(--goto-type-color-secondary)}:host .day.inactive,:host .month.inactive,:host .year.inactive{opacity:.7}:host .day.disabled,:host .month.disabled,:host .year.disabled{opacity:.3;pointer-events:none;cursor:default}:host .day:hover,:host .month:hover,:host .year:hover{background:var(--goto-interactive-color-secondary-hover)}:host .day:active,:host .month:active,:host .year:active{background:var(--goto-interactive-color-secondary-pressed)}:host .day.selected,:host .month.selected,:host .year.selected{background:var(--goto-interactive-color-brand-primary-pressed);color:var(--goto-type-color-inverted);border:none;outline:none}:host .day.selected:focus-visible,:host .month.selected:focus-visible,:host .year.selected:focus-visible{background:var(--goto-interactive-color-brand-primary-pressed);color:var(--goto-type-color-inverted);outline-offset:2px;outline:var(--goto-interactive-color-brand-primary-pressed)solid 1px;border:none}:host .day:focus,:host .month:focus,:host .year:focus{outline-offset:2px;outline:var(--goto-interactive-color-brand-primary-pressed)solid 1px}:host .calendar-layout{flex-direction:column;align-items:center;display:flex}:host .calendar-layout .calendar-layout-main{display:flex}:host .calendar-layout .calendar-layout-main .presets{flex-direction:column;min-width:90px;display:flex}:host .calendar-layout .calendar-layout-main .presets .presets-header{height:var(--goto-spacing-06);margin-bottom:var(--goto-spacing-03);align-content:center}:host .calendar-layout .calendar-layout-main .presets .preset-link{border-radius:var(--goto-radius-small)}:host .calendar-layout .calendar-layout-main .presets .preset-link:focus-visible{outline-offset:2px;outline:var(--goto-focus-color-highlight-default)solid 1px}
810:host .calendar-layout .calendar-layout-main .calendar-container .calendar-container-inner{grid-template-rows:min-content max-content;grid-template-columns:var(--goto-spacing-06)auto var(--goto-spacing-06);grid-template-areas:"header header header""left calendar right";min-height:206px;display:grid}:host .calendar-layout .calendar-layout-main .calendar-container .calendar-container-inner .calendar-nav{grid-area:header}:host ::slotted([slot=footer]){margin-top:var(--goto-spacing-04)}'),shadowOptions:{delegatesFocus:!0}});function Mu(e={}){return d(Nu,e)}const zu={baseName:"toolbar-button",template:(e,t)=>ri`
811    <button
812        class="control"
813        part="control"
814        ?autofocus="${e=>e.autofocus}"
815        ?disabled="${e=>e.disabled}"
816        form="${e=>e.formId}"
817        formaction="${e=>e.formaction}"
818        formenctype="${e=>e.formenctype}"
819        formmethod="${e=>e.formmethod}"
820        formnovalidate="${e=>e.formnovalidate}"
821        formtarget="${e=>e.formtarget}"
822        name="${e=>e.name}"
823        type="${e=>e.type}"
824        value="${e=>e.value}"
825        aria-atomic="${e=>e.ariaAtomic}"
826        aria-busy="${e=>e.ariaBusy}"
827        aria-controls="${e=>e.ariaControls}"
828        aria-current="${e=>e.ariaCurrent}"
829        aria-describedby="${e=>e.ariaDescribedby}"
830        aria-details="${e=>e.ariaDetails}"
831        aria-disabled="${e=>e.ariaDisabled}"
832        aria-errormessage="${e=>e.ariaErrormessage}"
833        aria-expanded="${e=>e.ariaExpanded}"
834        aria-flowto="${e=>e.ariaFlowto}"
835        aria-haspopup="${e=>e.ariaHaspopup}"
836        aria-hidden="${e=>e.ariaHidden}"
837        aria-invalid="${e=>e.ariaInvalid}"
838        aria-keyshortcuts="${e=>e.ariaKeyshortcuts}"
839        aria-label="${e=>e.ariaLabel}"
840        aria-labelledby="${e=>e.ariaLabelledby}"
841        aria-live="${e=>e.ariaLive}"
842        aria-owns="${e=>e.ariaOwns}"
843        aria-pressed="${e=>e.ariaPressed}"
844        aria-relevant="${e=>e.ariaRelevant}"
845        aria-roledescription="${e=>e.ariaRoledescription}"
846        ${li("control")}
847    >
848        ${nc(0,t)}
849        <span class="content" part="content">
850            <slot ${si("defaultSlottedContent")}></slot>
851        </span>
852        ${rc(0,t)}
853    </button>
854`,styles:Ci(":host{display:flex}:host .control{box-sizing:border-box;cursor:pointer;height:var(--goto-spacing-06);color:var(--goto-type-color-secondary);border-style:solid;border-width:1px;border-color:var(--goto-interactive-color-neutral-default);background-color:var(--goto-interactive-color-neutral-default);border-top-left-radius:var(--goto-toolbar-button-left-radius,0);border-bottom-left-radius:var(--goto-toolbar-button-left-radius,0);border-top-right-radius:var(--goto-toolbar-button-right-radius,0);border-bottom-right-radius:var(--goto-toolbar-button-right-radius,0);padding:var(--goto-spacing-00)var(--goto-spacing-03);outline:0;flex:1;justify-content:center;align-items:center;display:flex;position:relative}:host .control .start{--goto-icon-color:var(--goto-icon-color-secondary);margin:var(--goto-spacing-00);margin-right:var(--goto-spacing-02)}:host .control .end{margin-left:var(--goto-spacing-02)}:host(:hover) .control{border-color:var(--goto-interactive-color-neutral-hover);background-color:var(--goto-interactive-color-neutral-hover)}:host(:active) .control{border-color:var(--goto-interactive-color-neutral-pressed);background-color:var(--goto-interactive-color-neutral-pressed);box-shadow:none;color:var(--goto-type-color-inverted)}:host(:active) .control .start{--goto-icon-color:var(--goto-icon-color-inverted)}:host(:focus-visible) .control,:host(:-moz-focusring) .control{border-color:var(--goto-border-color-default);box-shadow:var(--goto-highlight)}:host(:hover),:host(:active){--badge-counter-beacon-animation-name:none}:host([selected]) .control{color:var(--goto-type-color-inverted);background-color:var(--goto-interactive-color-primary-default);border-color:var(--goto-interactive-color-primary-default)}:host([selected]) .control .start{--goto-icon-color:var(--goto-icon-color-inverted)}:host([disabled]){--badge-counter-beacon-animation-name:none}:host([disabled]) .control{pointer-events:none;background-color:var(--goto-interactive-color-disabled);color:var(--goto-type-color-disabled);border-color:#0000}:host([disabled]) .control .start{--goto-icon-color:var(--goto-icon-color-disabled)}:host(.empty-content) .start{margin-right:var(--goto-spacing-00)}:host(.empty-content) .end{margin-left:var(--goto-spacing-00)}:host(.empty-content) .start~.end{margin-left:var(--goto-spacing-02)}"),shadowOptions:{delegatesFocus:!0}},Fu=$u.compose(zu);function Uu(e={}){To({prefix:e.prefix},Fu),d(xu,e)}!function(e){vr({prefix:e}),ql({prefix:e}),fl({prefix:e}),Gl({prefix:e}),Uu({prefix:e}),gl({prefix:e}),Mu({prefix:e}),To({prefix:e,node:void 0},Fu,Du)}();class Bu extends Zt{constructor(){super(...arguments),this.value=null,this.min=0,this.max=100,this.size="large",this.inverse=!1,this.role="progressbar",this._circumference=2*Math.PI*7}get _isDeterminate(){return null!==this.value&&void 0!==this.value}_updateAriaAttributes(){this.label?this.setAttribute("aria-label",this.label):this.hasAttribute("aria-label")||this.setAttribute("aria-label","Progress 
854indicator"),this.setAttribute("aria-valuemin",String(this.min)),this.setAttribute("aria-valuemax",String(this.max)),this._isDeterminate&&null!==this.value&&void 0!==this.value?this.setAttribute("aria-valuenow",String(this.value)):this.removeAttribute("aria-valuenow")}updated(e){super.updated(e),(e.has("label")||e.has("min")||e.has("max")||e.has("value"))&&this._updateAriaAttributes()}connectedCallback(){super.connectedCallback(),this._updateAriaAttributes()}get _strokeDasharray(){if(!this._isDeterminate||null===this.value||void 0===this.value)return"21.99px, 21.99px";const e=Math.max(0,Math.min(100,(this.value-this.min)/(this.max-this.min)*100))/100*this._circumference;return`${e}px, ${this._circumference-e}px`}render(){const e=this._isDeterminate?"determinate":"indeterminate-indicator";return oe`
855      <svg class="progress" viewBox="0 0 16 16" aria-hidden="true">
856        <circle class="background" cx="8px" cy="8px" r="7px" />
857        <circle 
858          class="${e}" 
859          cx="8px" 
860          cy="8px" 
861          r="7px"
862          style="stroke-dasharray: ${this._strokeDasharray};" />
863      </svg>
864    `}}Bu.baseName="circular-progress",Bu.styles=b("@keyframes spin-infinite{0%{stroke-dasharray:.01 43.97;transform:rotate(0)}50%{stroke-dasharray:21.99 21.99;transform:rotate(450deg)}to{stroke-dasharray:.01 43.97;transform:rotate(1080deg)}}:host{height:var(--goto-spacing-07);width:var(--goto-spacing-07);margin:var(--goto-spacing-00);outline:none;align-items:center;display:inline-flex}:host .background{fill:none;stroke-width:2px}:host .determinate,:host .indeterminate-indicator{stroke:var(--goto-border-color-brand);fill:none;stroke-width:2px;stroke-linecap:round;transform-origin:50%;transform:rotate(-90deg)}:host .indeterminate-indicator{will-change:transform;animation:2s linear infinite spin-infinite}:host([inverse]) .background{stroke:var(--goto-border-color-inverted)}:host([inverse]) .determinate,:host([inverse]) .indeterminate-indicator{stroke:var(--goto-border-color-brand)}:host([size=small]){width:16px;height:16px}:host([size=medium]){width:24px;height:24px}"),h([Te({type:Number,reflect:!0})],Bu.prototype,"value",void 0),h([Te({type:Number,reflect:!0})],Bu.prototype,"min",void 0),h([Te({type:Number,reflect:!0})],Bu.prototype,"max",void 0),h([Te({reflect:!0})],Bu.prototype,"size",void 0),h([Te({type:Boolean,reflect:!0})],Bu.prototype,"inverse",void 0),h([Te()],Bu.prototype,"label",void 0),h([Te({reflect:!0})],Bu.prototype,"role",void 0);class Hu extends Zt{constructor(){super(...arguments),this.direction="vertical"}render(){return oe`<slot></slot>`}}Hu.baseName="scroll-box",Hu.styles=b(":host{box-sizing:border-box;--scrollbar-width-ff:auto;overscroll-behavior:contain;width:100%;height:100%;overflow:hidden}:host([direction=horizontal]),:host([direction=both]){--scrollbox-padding-bottom:var(--goto-spacing-04);--scrollbar-margin-bottom:var(--goto-spacing-01);--scrollbar-margin-top:var(--goto-spacing-01);--scrollbar-width:min(calc(var(--scrollbox-padding-bottom) - var(--scrollbar-margin-bottom) - var(--scrollbar-margin-top)),var(--goto-spacing-02))}:host([direction=vertical]),:host([direction=both]){--scrollbox-padding-right:var(--goto-spacing-04);--scrollbar-margin-left:var(--goto-spacing-01);--scrollbar-margin-right:var(--goto-spacing-01);--scrollbar-width:min(calc(var(--scrollbox-padding-right) - var(--scrollbar-margin-left) - var(--scrollbar-margin-right)),var(--goto-spacing-02))}@supports selector(:host::-webkit-scrollbar-track){:host::-webkit-scrollbar{background-color:#0000}:host([direction=horizontal])::-webkit-scrollbar{height:var(--scrollbar-width)}:host([direction=vertical])::-webkit-scrollbar{width:var(--scrollbar-width)}:host::-webkit-scrollbar-track{background-color:#0000}:host::-webkit-scrollbar-thumb{border-radius:calc(var(--scrollbar-width)/2);background-color:#0000}:host(:hover)::-webkit-scrollbar-thumb,:host(:focus)::-webkit-scrollbar-thumb,:host(:focus-within)::-webkit-scrollbar-thumb{background-color:var(--goto-icon-color-secondary)}:host([direction=horizontal]),:host([direction=both]){margin-bottom:var(--scrollbar-margin-top);height:calc(100% - var(--scrollbar-margin-top));padding-bottom:calc(var(--scrollbox-padding-bottom) - var(--scrollbar-width) - var(--scrollbar-margin-top))!important}:host([direction=vertical]),:host([direction=both]){margin-right:var(--scrollbar-margin-right);width:calc(100% - var(--scrollbar-margin-right));padding-right:calc(var(--scrollbox-padding-right) - var(--scrollbar-width) - var(--scrollbar-margin-right))!important}}@supports (scrollbar-color:black black) and (scrollbar-width:thin) and (not selector(:host::-webkit-scrollbar-track)){:host{scrollbar-color:transparent transparent;scrollbar-width:var(--scrollbar-width-ff);transition:scrollbar-color .3s ease-in-out;padding-bottom:var(--scrollbar-margin-bottom)!important}:host(:hover),:host(:focus),:host(:focus-within){scrollbar-color:var(--goto-icon-color-secondary)transparent}}@supports (scrollbar-gutter:stable){:host([direction=vertical]){scrollbar-gutter:stable}:host([direction=horizontal]),:host([direction=both]){overflow-x:scroll}:host([direction=vertical]),:host([direction=both]){overflow-y:auto}}@supports not (scrollbar-gutter:stable){:host([direction=horizontal]),:host([direction=both]){overflow-x:scroll}:host([direction=vertical]),:host([direction=both]){overflow-y:scroll}}"),h([Te({reflect:!0})],Hu.prototype,"direction",void 0);
864class ju extends(a(Jn,"chat-input")){constructor(){super(...arguments),this.placeholder="",this.disabled=!1,this.readOnly=!1,this.disableSendButton=!1,this.loadingState="none",this.loadingPlaceholder="Loading...",this.sendLabel="Send Message",this.error=!1,this.warning=!1,this.draggingState="empty",this.dragAndDropEnabled=!1,this._selectionStart=null,this._selectionEnd=null,this._isComposing=!1,this.handleSelectionEvent=()=>{this._isComposing||this.cacheSelectionOffsets()},this.handleCompositionStart=()=>{this._isComposing=!0},this.handleCompositionEnd=()=>{this._isComposing=!1},this.value=""}get selectionStart(){return this._selectionStart}get selectionEnd(){return this._selectionEnd}static isBlockOrBr(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;const t=e;if("BR"===t.tagName)return!0;const r=getComputedStyle(t).display;return"block"===r||"list-item"===r||"flex"===r}buildSegments(){if(!this.controlRef)return[];const e=[],t=this.controlRef.childNodes;for(let r=0;r<t.length;r++){const n=t[r];if(n.nodeType===Node.TEXT_NODE){const t=n;t.length>0&&e.push({type:"text",node:t,length:t.length})}else if(n.nodeType===Node.ELEMENT_NODE){if("BR"!==n.tagName){const t=document.createTreeWalker(n,NodeFilter.SHOW_TEXT);let r=t.nextNode();for(;null!==r;){const n=r;n.length>0&&e.push({type:"text",node:n,length:n.length}),r=t.nextNode()}}ju.isBlockOrBr(n)&&r<t.length-1&&e.push({type:"newline"})}}return e}getCharacterOffset(e,t,r){if(!this.controlRef)return 0;let n=0;for(const o of r)if("text"===o.type){if(e.nodeType===Node.TEXT_NODE&&o.node===e)return n+t;if(e.nodeType!==Node.TEXT_NODE&&e.contains(o.node)){const r=e.childNodes[t]??null;if(r){if(!(r.compareDocumentPosition(o.node)&Node.DOCUMENT_POSITION_PRECEDING))break;n+=o.length}else n+=o.length}else n+=o.length}else n+=1;return n}cacheSelectionOffsets(){const e=window.getSelection();if(!e||!this.controlRef)return;const t=this.buildSegments();if("getComposedRanges"in e)try{const r=this.shadowRoot?[this.shadowRoot]:[],n=e.getComposedRanges(...r);if(n.length>0){const e=n[0];if(this.controlRef.contains(e.startContainer)&&this.controlRef.contains(e.endContainer)){const r=this.getCharacterOffset(e.startContainer,e.startOffset,t),n=this.getCharacterOffset(e.endContainer,e.endOffset,t);return this._selectionStart=Math.min(r,n),void(this._selectionEnd=Math.max(r,n))}}}catch{}const{anchorNode:r,anchorOffset:n,focusNode:o,focusOffset:i}=e;if(r&&o)if(this.controlRef.contains(r)&&this.controlRef.contains(o)){const e=this.getCharacterOffset(r,n,t),s=this.getCharacterOffset(o,i,t);this._selectionStart=Math.min(e,s),this._selectionEnd=Math.max(e,s)}else{const r=this.shadowRoot?.getSelection?.();if(r?.anchorNode&&r.focusNode&&this.controlRef.contains(r.anchorNode)&&this.controlRef.contains(r.focusNode)){const e=this.getCharacterOffset(r.anchorNode,r.anchorOffset,t),n=this.getCharacterOffset(r.focusNode,r.focusOffset,t);this._selectionStart=Math.min(e,n),this._selectionEnd=Math.max(e,n)}else{const t=e.toString();if(t.length>0){const e=this.controlRef.innerText.indexOf(t);-1!==e&&(this._selectionStart=e,this._selectionEnd=e+t.length)}}}}setSelectionRange(e,t,r){if(!this.controlRef||this.disabled)return;document.activeElement!==this&&this.controlRef.focus();const n=window.getSelection();if(!n)return;const o=this.buildSegments(),i=o.reduce((e,t)=>e+("text"===t.type?t.length:1),0),s=Math.max(0,Math.min(e,i)),a=Math.max(s,Math.min(t,i)),l=this.resolveDomPosition(s,o),c=this.resolveDomPosition(a,o);if(!l&&!c)return n.setBaseAndExtent(this.controlRef,0,this.controlRef,0),this._selectionStart=0,void(this._selectionEnd=0);const d="backward"===r?c:l,u="backward"===r?l:c;d&&u&&(n.setBaseAndExtent(d.node,d.offset,u.node,u.offset),this._selectionStart=s,this._selectionEnd=a)}resolveDomPosition(e,t){let r=0,n=null,o=0;for(const i of t)if("text"===i.type){if(n=i.node,o=i.length,r+i.length>=e)return{node:i.node,offset:e-r};r+=i.length}else r+=1;return n?{node:n,offset:o}:null}actionsChanged(){this.isConnected&&(0===this.actions?.length?this.setAttribute("data-no-actions","true"):this.removeAttribute("data-no-actions"))}attachmentsChanged(){this.isConnected&&(0===this.attachments?.length?this.setAttribute("data-no-attachments","true"):this.removeAttribute("data-no-attachments"))}dragAndDropEnabledChanged(e,t){this.isConnected&&(t?(this.addEventListener("dragover",this.handleDragOver),this.addEventListener("drop",this.handleDrop),this.addEventListener("dragleave",this.handleDragLeave),this.addEventListener("dragend",this.handleDragLeave),this.addEventListener("dragstart",this.handleDragOver)):(this.removeEventListener("dragover",this.handleDragOver),this.removeEventListener("drop",this.handleDrop),this.removeEventListener("dragleave",this.handleDragLeave),this.removeEventListener("dragend",this.handleDragLeave),this.removeEventListener("dragstart",this.handleDragOver)))}connectedCallback(){super.connectedCallback(),this.controlRef&&(this.controlRef.innerText=this.value,this.controlRef.onfocus=()=>{const e=1===this.controlRef?.childNodes.length&&"BR"===this.controlRef?.childNodes[0].nodeName;this.controlRef?.matches(":hover")||e||this.controlRef&&window.getSelection()?.selectAllChildren(this.controlRef),this.cacheSelectionOffsets()},this.controlRef.onblur=()=>{window.getSelection()?.removeAllRanges(),this._selectionStart=null,this._selectionEnd=null},this.controlRef.addEventListener("mouseup",this.handleSelectionEvent),this.controlRef.addEventListener("keyup",this.handleSelectionEvent),this.controlRef.addEventListener("compositionstart",this.handleCompositionStart),this.controlRef.addEventListener("compositionend",this.handleCompositionEnd)),this.dragAndDropEnabledChanged(void 0,this.dragAndDropEnabled)}disconnectedCallback(){super.disconnectedCallback(),this.controlRef?.removeEventListener("mouseup",this.handleSelectionEvent),this.controlRef?.removeEventListener("keyup",this.handleSelectionEvent),this.controlRef?.removeEventListener("compositionstart",this.handleCompositionStart),this.controlRef?.removeEventListener("compositionend",this.handleCompositionEnd)}blur(){this.controlRef?.blur()}focus(){this.controlRef?.focus()}valueChanged(e,t){this.isConnected&&this.controlRef&&t!==this.controlRef.innerText&&(this.controlRef.innerText=t)}get isPlaceholderVisible(){return""===this.value.trim()||"pulsing"===this.loadingState}get placeholderText(){return"none"!==this.loadingState&&this.loadingPlaceholder?this.loadingPlaceholder:this.placeholder}get isSendButtonDisabled(){return""===this.value.trim()&&0===this.attachments?.length||this.disabled}handleInput(e){if(e.target!==this.controlRef)return!1;this.$emit("input",e);const t=this.value;this.value=this.controlRef?.innerText||"",this._isComposing||(this._selectionStart=null,this._selectionEnd=null,this.cacheSelectionOffsets(),null===this._selectionStart&&this.inferCursorFromInput(t,this.value))}inferCursorFromInput(e,t){const r=Math.min(e.length,t.length);let n=0;for(;n<r&&e[n]===t[n];)n++;let o=0;for(;o<r-n&&e[e.length-1-o]===t[t.length-1-o];)o++;let i=t.length-o;if(i>0&&i<t.length){const e=t.charCodeAt(i);e>=56320&&e<=57343&&i++}this._selectionStart=i,this._selectionEnd=i}handleChange(e){this.$emit("change",e)}handleKeyDown(e){return this.$emit("keyDown",e),!0}handleKeyUp(e){return this.$emit("keyUp",e),!0}handleKeyPress(e){return this.$emit("keyPress",e),!("Enter"===e.key&&!e.shiftKey&&(this.handleSend("enter"),e.preventDefault(),1))}handleSend(e){this.isSendButtonDisabled||this.$emit("send",{value:this.value,source:e,attachments:this.attachments})}handlePaste(e){if(e.clipboardData){e.preventDefault();const t=e.clipboardData.getData("text/plain");document.execCommand("insertText",!1,t)}return!0}handleDragOver(e){this.draggingState="dragging",e.dataTransfer&&Array.from(e.dataTransfer.types).includes("Files")&&(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect="copy")}handleDrop(e){this.draggingState="dropped",e.dataTransfer&&Array.from(e.dataTransfer.files).length>0&&e.preventDefault()}handleDragLeave(e){e.preventDefault(),e.stopPropagation(),this.draggingState="empty"}handleDragEnd(e){e.preventDefault(),e.stopPropagation(),this.draggingState="empty"}handleDragStart(e){e.preventDefault(),e.stopPropagation(),this.draggingState="dragging"}}h([Nr],ju.prototype,"attachments",void 0),h([Nr],ju.prototype,"actions",void 0),h([Nr],ju.prototype,"beforeInput",void 0),h([Nr],ju.prototype,"label",void 0),h([Nr],ju.prototype,"afterInput",void 0),h([Nr],ju.prototype,"helperText",void 0),h([Qr],ju.prototype,"placeholder",void 0),h([Qr({mode:"boolean"})],ju.prototype,"disabled",void 0),h([Qr({attribute:"read-only",mode:"boolean"})],ju.prototype,"readOnly",void 0),h([Qr({mode:"boolean",attribute:"disable-send-button"})],ju.prototype,"disableSendButton",void 0),h([Qr({attribute:"loading-state"})],ju.prototype,"loadingState",void 0),h([Qr({attribute:"loading-placeholder"})],ju.prototype,"loadingPlaceholder",void 0),h([Qr({attribute:"send-label"})],ju.prototype,"sendLabel",void 0),h([Qr({mode:"boolean"})],ju.prototype,"error",void 0),h([Qr({mode:"boolean"})],ju.prototype,"warning",void 0),h([Qr({attribute:"dragging-state"})],ju.prototype,"draggingState",void 0),h([Qr({mode:"boolean",attribute:"drag-and-drop-enabled"})],ju.prototype,"dragAndDropEnabled",void 0),h([Qr({attribute:"value"})],ju.prototype,"value",void 0),h([Rr],ju.prototype,"isPlaceholderVisible",null),h([Rr],ju.prototype,"placeholderText",null),h([Rr],ju.prototype,"isSendButtonDisabled",null);const Vu={baseName:"chat-input",template:(e,t)=>
864{const r=u(Bu),n=u(Hu),o=u(mr),i=u(Wi),s=u(Ca);return ri`<template class=" ${e=>e.readOnly?"readonly":""}">
865  <div part="label" class="${e=>e.label?.length?"label":"label hidden"}">
866    <slot name="label" ${si("label")}></slot>
867  </div>
868  <div class="container">
869    <div class="attachments ${e=>e.attachments&&0!==e.attachments.length?"":"no-attachments"}">
870      <slot name="attachments" ${si("attachments")}></slot>
871    </div>
872    <div class="control-with-actions">
873      ${Aa(e=>"spinner"===e.loadingState,ri`<${r} class="loading-placeholder"></${r}>`)}
874      <${n} class="control-wrapper">
875        <div class="before-input ${e=>e.beforeInput?.length?"":"hidden"}">
876          <slot name="beforeInput" ${si("beforeInput")}></slot>
877        </div>
878        <div class="placeholder ${e=>e.isPlaceholderVisible?"":"hidden"}">${e=>e.placeholderText}</div>
879        <div
880          contenteditable="${e=>e.readOnly||e.disabled?"false":"true"}"
881          role="textbox"
882          part="control"
883          class="control"
884          id="control"
885          ?autofocus="${e=>e.autofocus}"
886          ?disabled="${e=>e.disabled}"
887          tabindex="0"
888          aria-multiline="true"
889          ?spellcheck="${e=>e.spellcheck}"
890          aria-atomic="${e=>e.ariaAtomic}"
891          aria-busy="${e=>e.ariaBusy}"
892          aria-current="${e=>e.ariaCurrent}"
893          aria-disabled="${e=>e.disabled||e.ariaDisabled}"
894          aria-hidden="${e=>e.ariaHidden}"
895          aria-invalid="${e=>e.ariaInvalid}"
896          aria-label="${e=>e.ariaLabel}"
897          aria-live="${e=>e.ariaLive}"
898          @keydown="${(e,t)=>e.handleKeyDown(t.event)}"
899          @keypress="${(e,t)=>e.handleKeyPress(t.event)}"
900          @keyup="${(e,t)=>e.handleKeyUp(t.event)}"
901          @paste="${(e,t)=>e.handlePaste(t.event)}"
902          @change="${(e,t)=>e.handleChange(t.event)}"
903          @input="${(e,t)=>e.handleInput(t.event)}"
904          ${li("controlRef")}
905        ></div>
906        <div class="after-input ${e=>e.afterInput?.length?"":"hidden"}">
907          <slot name="afterInput" ${si("afterInput")}></slot>
908        </div>
909      </${n}>
910      <div class="control-actions">
911        <slot name="actions" ${si("actions")}></slot>
912        <div class="spacer"></div>
913        <${i}
914          part="send-button"
915          id="send-button"
916          variant="${"tertiary"}"
917          aria-label="${e=>e.sendLabel}"
918          ?disabled="${e=>e.isSendButtonDisabled||e.disableSendButton}"
919          @click="${e=>e.handleSend("button")}"
920          ><${o}>${'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M3 3V11L10 12L3 13V21L23 12L3 3Z" fill="currentColor"></path></svg>'}</${o}></${i}
921        >
922        <${s} trigger-id="send-button" position="top">${e=>e.sendLabel}</${s}>
923      </div>
924    </div>
925  </div>
926  <div
927    part="helper-text"
928    class="${e=>e.helperText?.length?"helper-text":"helper-text hidden"}"
929  >
930    <slot name="helperText" ${si("helperText")}></slot>
931  </div>
932</template>`},styles:Ci(":host{flex-direction:column;justify-content:stretch;display:flex}:host ::slotted(chameleon-icon-button[slot=actions]){--goto-icon-button-icon-color:var(--goto-icon-color-secondary)}:host>.label{font:var(--goto-caption-medium-strong);color:var(--goto-type-color-default);margin-bottom:var(--goto-spacing-01)}:host>.label.hidden{display:none}:host>.helper-text{font:var(--goto-caption-medium);color:var(--goto-type-color-secondary);margin-top:var(--goto-spacing-01);cursor:text}:host>.helper-text.hidden{display:none}:host>.container{border-radius:var(--goto-radius-medium);padding:var(--goto-spacing-01);border:1px solid var(--goto-border-color-default);flex-direction:column;display:flex}:host>.container>.control-with-actions{flex-direction:column;display:flex}:host>.container>.control-with-actions .loading-placeholder{height:var(--goto-spacing-04);width:var(--goto-spacing-04);margin-left:var(--goto-spacing-02);margin-top:var(--goto-spacing-01);position:absolute}:host>.container>.control-with-actions .control-actions{column-gap:var(--goto-spacing-01);padding-top:var(--goto-spacing-02);flex-direction:row;display:flex}:host>.container>.control-with-actions .control-actions>.spacer{flex:1}:host>.container>.attachments{gap:var(--goto-spacing-02);padding:var(--goto-spacing-02);max-height:var(--goto-chatinput-attachments-max-height,none);overflow-y:var(--goto-chatinput-attachments-overflow,visible);max-width:var(--goto-chatinput-attachments-max-width,calc(100% - var(--goto-spacing-07)));flex-flow:wrap;display:flex}:host>.container>.attachments.no-attachments{padding:var(--goto-spacing-00);margin-bottom:var(--goto-spacing-02)}:host>.container #send-button::part(control){--goto-icon-color:var(--goto-icon-color-inverted);background-color:var(--goto-interactive-color-brand-default)}:host>.container #send-button:hover::part(control){--goto-icon-color:var(--goto-icon-color-inverted);background-color:var(--goto-interactive-color-brand-hover)}:host>.container #send-button:active::part(control){--goto-icon-color:var(--goto-icon-color-inverted);background-color:var(--goto-interactive-color-brand-pressed)}:host>.container #send-button:disabled::part(control){--goto-icon-color:var(--goto-icon-color-disabled);background-color:var(--goto-interactive-color-secondary-default)}:host([read-only])>.container{background-color:var(--goto-surface-color-secondary)}:host .control-wrapper{padding-left:var(--goto-spacing-02);width:calc(100% - var(--goto-spacing-07));min-height:var(--goto-spacing-06);--scrollbox-max-height:var(--goto-chatinput-max-height,50vh);margin-top:-1px;position:relative}:host .control-wrapper .control{resize:none;width:100%;font:var(--goto-body-medium);color:var(--goto-type-color-default);word-break:break-word;min-width:var(--goto-chatinput-min-width,var(--goto-spacing-10));border:none}:host .control-wrapper .control:focus,:host .control-wrapper .control:focus-visible{outline:none}:host .control-wrapper .placeholder{text-overflow:ellipsis;color:var(--goto-type-color-secondary);font:var(--goto-body-medium);pointer-events:none;white-space:nowrap;width:100%;position:absolute;overflow:hidden}:host .control-wrapper .placeholder.hidden{display:none}:host .control-wrapper .before-input{margin-bottom:var(--goto-spacing-02)}:host .control-wrapper .before-input.hidden{display:none}:host .control-wrapper .after-input{margin-top:var(--goto-spacing-02)}:host .control-wrapper .after-input.hidden{display:none}:host([loading-state=spinner]) .control-wrapper{margin-left:var(--goto-spacing-06);width:calc(100% - var(--goto-spacing-10))}:host([loading-state=pulsing]) .placeholder{animation:pulse 1.3s var(--goto-standard-easing)infinite;position:static}:host([loading-state=pulsing]) .control{visibility:hidden;max-height:0}:host([loading-state=pulsing]) .control-wrapper{overflow:hidden}:host>.container:focus-within{outline:var(--goto-focus-color-highlight-default)solid 1px;outline-offset:2px}:host([error])>.container{border-color:var(--goto-border-color-danger)}:host([error])>.helper-text{color:var(--goto-type-color-danger)}:host([warning])>.container{border-color:var(--goto-border-color-warning)}:host([warning])>.helper-text{color:var(--goto-type-color-warning)}:host([disabled]) .control-wrapper>.control,:host([disabled])>.helper-text,:host([disabled])>.label{color:var(--goto-type-color-disabled)}:host([data-no-attachments]) .attachments{display:none}:host([data-no-attachments]:not([data-no-actions])) .attachments{display:block}:host([data-no-actions]) .control-wrapper{min-height:var(--goto-spacing-07);flex:1}:host([data-no-actions]) .control-with-actions{flex-direction:row}:host([data-no-actions]) .control-with-actions .control-wrapper{padding-top:var(--goto-spacing-01)}:host([data-no-actions]) .control-with-actions .control-actions{padding-top:var(--goto-spacing-00);align-items:flex-end}
932:host([data-no-actions]) .control-with-actions .loading-placeholder{margin-top:var(--goto-spacing-02)}:host([dragging-state=dragging]) .container{background-color:var(--goto-surface-color-secondary)}@keyframes pulse{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}")},Wu=ju.compose(Vu);function Ku(e={}){return d(Bu,e)}function qu(e={}){return d(Hu,e)}!function(e){vr({prefix:e}),fl({prefix:e}),gl({prefix:e}),Ku({prefix:e}),qu({prefix:e}),To({prefix:e,node:void 0},bl,Wu)}();class Gu extends Zt{constructor(){super(...arguments),this.orientation="vertical",this.alignment="left"}firstUpdated(){this.mediaSlot?.addEventListener("slotchange",()=>this.handleMediaSlotChange()),this.handleMediaSlotChange()}handleMediaSlotChange(){const e=this.mediaSlot?.assignedElements()||[];e.length>0&&!this.classList.contains("with-media")?this.classList.add("with-media"):0===e.length&&this.classList.remove("with-media")}render(){return oe`
933      <slot name="media"></slot>
934      <div class="card-content">
935        <slot></slot>
936      </div>
937    `}}function Zu(e,t,r){return e?t(e):r?.(e)}Gu.baseName="card",Gu.styles=b(':host{background:var(--goto-surface-color-default);border:1px solid var(--goto-border-color-default);border-radius:var(--goto-radius-medium);box-sizing:border-box;flex-direction:column;display:inline-flex;position:relative;overflow:hidden}:host .card-content{padding:var(--goto-spacing-06);gap:var(--goto-spacing-06);flex-direction:column;display:flex}:host ::slotted([slot=media]){width:100%}:host:after{border-bottom:var(--goto-surface-color-default);border-top-left-radius:var(--goto-radius-medium);border-top-right-radius:var(--goto-radius-medium);height:var(--goto-spacing-02);content:"";width:calc(100% + 2px);position:absolute}:host([orientation=horizontal]){flex-direction:row}:host([orientation=horizontal]) .card-content{padding:var(--goto-spacing-04)}:host([orientation=horizontal]) ::slotted([slot=media]){border-bottom-left-radius:7px;border-bottom-right-radius:var(--goto-radius-none)}:host([alignment=center]) *{text-align:center}:host([alignment=center]) .card-content{justify-content:center;align-items:center;display:inline-flex}:host([alignment=right]){flex-direction:row-reverse}:host([alignment=right]) *{text-align:right}:host([alignment=right]) .card-content{display:inline-flex}:host([alignment=right]) ::slotted([slot=media]){border-bottom-left-radius:var(--goto-radius-none);border-bottom-right-radius:7px}:host([indicator]){border-top:1px solid var(--goto-surface-color-default);border-top-left-radius:var(--goto-radius-none);border-top-right-radius:var(--goto-radius-none);overflow:visible}:host([indicator]):after{top:calc(var(--goto-spacing-02)*-1);background-color:var(--goto-surface-color-brand-default);border-bottom:var(--goto-surface-color-brand-default);left:-1px}:host([selected]){border:2px solid var(--goto-surface-color-brand-default)}:host([selected][indicator]){border-top:2px solid var(--goto-surface-color-default);border-top-left-radius:var(--goto-radius-none);border-top-right-radius:var(--goto-radius-none)}:host([selected][indicator]):after{left:-2px;top:calc(var(--goto-spacing-02)*-1);border-bottom:0;width:calc(100% + 4px)}:host(.with-media[alignment=right]) *{text-align:left}'),h([Te({type:Boolean,reflect:!0})],Gu.prototype,"indicator",void 0),h([Te({type:Boolean,reflect:!0})],Gu.prototype,"selected",void 0),h([Te({reflect:!0})],Gu.prototype,"orientation",void 0),h([Te({reflect:!0})],Gu.prototype,"alignment",void 0),h([$e('slot[name="media"]')],Gu.prototype,"mediaSlot",void 0),function(e={}){d(Gu,e)}();var Yu=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},Ju="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,Qu="object"==typeof self&&self&&self.Object===Object&&self,Xu=Ju||Qu||Function("return this")(),eh=function(){return Xu.Date.now()},th=/\s/,rh=/^\s+/,nh=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&th.test(e.charAt(t)););return t}(e)+1).replace(rh,""):e},oh=Xu.Symbol,ih=Object.prototype,sh=ih.hasOwnProperty,ah=ih.toString,lh=oh?oh.toStringTag:void 0,ch=Object.prototype.toString,dh=oh?oh.toStringTag:void 0,uh=function(e){return null==e?void 0===e?"[object Undef
937ined]":"[object Null]":dh&&dh in Object(e)?function(e){var t=sh.call(e,lh),r=e[lh];try{e[lh]=void 0;var n=!0}catch(e){}var o=ah.call(e);return n&&(t?e[lh]=r:delete e[lh]),o}(e):function(e){return ch.call(e)}(e)},hh=/^[-+]0x[0-9a-f]+$/i,ph=/^0b[01]+$/i,gh=/^0o[0-7]+$/i,fh=parseInt,mh=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&"[object Symbol]"==uh(e)}(e))return NaN;if(Yu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Yu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=nh(e);var r=ph.test(e);return r||gh.test(e)?fh(e.slice(2),r?2:8):hh.test(e)?NaN:+e},vh=Math.max,bh=Math.min,yh=function(e,t,r){var n,o,i,s,a,l,c=0,d=!1,u=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var r=n,i=o;return n=o=void 0,c=t,s=e.apply(i,r)}function g(e){var r=e-l;return void 0===l||r>=t||r<0||u&&e-c>=i}function f(){var e=eh();if(g(e))return m(e);a=setTimeout(f,function(e){var r=t-(e-l);return u?bh(r,i-(e-c)):r}(e))}function m(e){return a=void 0,h&&n?p(e):(n=o=void 0,s)}function v(){var e=eh(),r=g(e);if(n=arguments,o=this,l=e,r){if(void 0===a)return function(e){return c=e,a=setTimeout(f,t),d?p(e):s}(l);if(u)return clearTimeout(a),a=setTimeout(f,t),p(l)}return void 0===a&&(a=setTimeout(f,t)),s}return t=mh(t)||0,Yu(r)&&(d=!!r.leading,i=(u="maxWait"in r)?vh(mh(r.maxWait)||0,t):i,h="trailing"in r?!!r.trailing:h),v.cancel=function(){void 0!==a&&clearTimeout(a),c=0,n=l=o=a=void 0},v.flush=function(){return void 0===a?s:m(eh())},v},wh=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return Yu(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),yh(e,t,{leading:n,maxWait:t,trailing:o})};class xh{constructor(e,t){this.callback=wh(e,t),this.resizeObserver=new ResizeObserver(this.callback)}subscribe(e){this.resizeObserver.observe(e)}unsubscribe(){this.callback.cancel(),this.resizeObserver.disconnect()}}class _h extends Zt{constructor(){super(...arguments),this.variant="default",this.type="inbound",this.seeMore="Show more",this.seeLess="Show less",this.followUpsTitle="Follow ups",this.lineClamp=15,this.contentsRef=hr(),this.containerRef=hr(),this.followUpsMenuElement=null,this.handleFollowUpClick=e=>{const t=e.target.getAttribute("data-prompt-index");if(null!==t&&this.followUps){const e=parseInt(t,10),r=this.followUps[e];r&&this.handleMenuItemClick(r)}},this.observer=new xh(e=>{this.isConnected&&(this.updateShortMessageState(),e.forEach(e=>{this.handleShowTruncateAction(this.allTextNodes),this.reactionsContainer.style.setProperty("--reactive-width",`${Math.ceil(e.contentRect.width)}px`)}))},100),this.followUpMenuFocusHandler=()=>{this.renderRoot.querySelectorAll(".follow-up-prompt").forEach(e=>{e.tabIndex=0})},this.clickTruncateHandler=()=>{this.expanded=!this.expanded},this.handleKeyDown=e=>{const t=e.key,r=document.activeElement;if("Enter"!==t)return!0;this===r&&this.click(),e.stopPropagation()},this.handleMouseUp=e=>{this.removeAttribute("data-pressed"),e.stopPropagation()},this.handleMenuItemClick=e=>{this.dispatchEvent(new CustomEvent("promptclick",{detail:e,bubbles:!0,composed:!0}))}}render(){const e=Oi(u(jl)),t=Oi(u(Hl)),r=Oi(u(lc)),n=Oi(u(ac)),o=Oi(u(mr)),i="ai"===this.variant&&(this.followUps?.length??0)>0;return oe`
938      <div class="container" tabindex="0" ${fr(this.containerRef)}>
939        <slot name="contextual-actions"></slot>
940        <div class="contents" ${fr(this.contentsRef)}>
941          <slot name="header"></slot>
942          <slot name="attachments"></slot>
943          <span class="content-text"><slot @slotchange=${this.handleSlotChange}></slot></span>
944        </div>
945
946        ${Zu(!this.unclamp&&this.showTruncateAction,()=>Ni`<${e} @click=${this.clickTruncateHandler} class="truncate-action" variant="${"tertiary"}">
947            ${this.expanded?this.seeLess:this.seeMore}
948          </${e}>`)}
949        <slot name="footer"></slot>
950      </div>
951      <div class="reactionsContainer">
952        <div class="reactionsError">
953          <slot name="reactionsError" @slotchange=${this.handleReactionsErrorSlotChange}></slot>
954        </div>
955        <div class="reactions">
956          <slot name="reactions" @slotchange=${this.handleReactionsSlotChange}></slot>
957          <div class="reactionsDescription">
958            <slot name="reactionsDescription"></slot>
959          </div>
960        </div>
961      </div>
962      ${i?this.renderFollowUps(t,n,r,o):le}
963    `}renderFollowUps(e,t,r,n){return Ni`
964      <div class="followUpsContainer">
965        <div class="followUpsTitle">
966          ${this.followUpsTitle?Ni`<${e} variant="caption-medium" color="type-color-secondary">${this.followUpsTitle}</${e}>`:le}
967        </div>
968        <${t} class="follow-ups" aria-label=${this.followUpsTitle}>
969          ${this.followUps?.map((t,o)=>Ni`
970              <${r} 
971                class="follow-up-prompt" 
972                tabindex="0" 
973                label=${t.label} 
974                data-prompt-index=${o}
975                @menuitemclick=${this.handleFollowUpClick}
976              >
977                <${e} variant="body-small" color="type-gradient-ai-primary" lineClamp="1">${t.text}</${e}>
978                <${n} slot="start" gradient="icon-gradient-ai-primary">${'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M6 6H4V15H17.9599L14.7069 18.2928L16.1211 19.7071L21.8282 14L16.1211 8.29285L14.7069 9.70706L17.9997 12.9999H6V6Z" fill="currentColor"></path></svg>'}</${n}>
979              </${r}>`)}
980        </${t}>
981      </div>
982    `}checkForReactions(){0===this.reactions?.length?this.setAttribute("data-no-reactions","true"):this.removeAttribute("data-no-reactions")}handleReactionsSlotChange(){this.isConnected&&this.checkForReactions()}checkForReactionsError(){this.reactionsError?.length>0?this.setAttribute("data-has-error","true"):this.removeAttribute("data-has-error")}handleReactionsErrorSlotChange(){this.isConnected&&this.checkForReactionsError()}bindFollowUpMenuListeners(){const e=this.renderRoot.querySelector(".follow-ups");e?(this.followUpsMenuElement&&this.followUpsMenuElement!==e&&(this.followUpsMenuElement.removeEventListener("focusin",this.followUpMenuFocusHandler),this.followUpsMenuElement.removeEventListener("focusout",this.followUpMenuFocusHandler)),e.removeEventListener("focusin",this.followUpMenuFocusHandler),e.removeEventListener("focusout",this.followUpMenuFocusHandler),e.addEventListener("focusin",this.followUpMenuFocusHandler),e.addEventListener("focusout",this.followUpMenuFocusHandler),this.followUpsMenuElement=e):this.cleanupFollowUpMenuListeners()}updated(e){super.updated(e),e.has("clickable")&&(this.clickable?this.bindClickableEvents():this.unbindClickableEvents()),e.has("unclamp")&&this.unclamp&&this.handleShowTruncateAction(this.allTextNodes),this.checkForReactions(),this.checkForReactionsError(),"ai"===this.variant&&(this.followUps?.length??0)>0?(this.followUpMenuFocusRafId=requestAnimationFrame(()=>{this.isConnected&&this.followUpMenuFocusHandler()}),this.bindFollowUpMenuListeners()):this.cleanupFollowUpMenuListeners()}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","listitem"),this.updateComplete.then(()=>{this.isConnected&&this.contentsRef.value&&this.observer.subscribe(this.contentsRef.value)}
982).catch(e=>{console.error("ChatBubbleComponent: updateComplete rejected in connectedCallback",e)})}disconnectedCallback(){super.disconnectedCallback(),this.unbindClickableEvents(),this.observer.unsubscribe(),void 0!==this.followUpMenuFocusRafId&&(cancelAnimationFrame(this.followUpMenuFocusRafId),this.followUpMenuFocusRafId=void 0),this.cleanupFollowUpMenuListeners()}cleanupFollowUpMenuListeners(){this.followUpsMenuElement&&(this.followUpsMenuElement.removeEventListener("focusin",this.followUpMenuFocusHandler),this.followUpsMenuElement.removeEventListener("focusout",this.followUpMenuFocusHandler),this.followUpsMenuElement=null)}focus(e){this.containerRef.value?.focus(e)}get allTextNodes(){return this.defaultSlot.filter(e=>e.textContent?.trim().length)??[this.defaultSlot[0]]}handleShowTruncateAction(e){if(this.unclamp)return;const t=[],r=document?.createRange();e.forEach(e=>{r.selectNodeContents(e);const n=r?.getClientRects();for(let e=0;e<n.length;e++)-1===t.indexOf(n[e].top)&&t.push(n[e].top)}),this.showTruncateAction=t.length>this.lineClamp}updateShortMessageState(){this.shortMessage=(this.contentsRef.value?.offsetWidth??0)<100}handleSlotChange(){this.updateShortMessageState(),this.handleShowTruncateAction(this.allTextNodes)}bindClickableEvents(){this.addEventListener("mousedown",this.handleMouseDown),this.addEventListener("keydown",this.handleKeyDown)}unbindClickableEvents(){this.removeEventListener("mousedown",this.handleMouseDown),document.removeEventListener("mouseup",this.handleMouseUp),this.removeEventListener("keydown",this.handleKeyDown)}handleMouseDown(e){e.target===this&&(this.setAttribute("data-pressed","true"),document.addEventListener("mouseup",this.handleMouseUp,{once:!0})),e.stopPropagation()}}_h.baseName="chat-bubble",_h.styles=b(":host{font:var(--goto-body-medium);float:left;clear:both;color:var(--goto-type-color-default);flex-direction:column;align-items:flex-start;display:flex;position:relative}:host:host(:focus-visible){outline:none}:host .container{box-sizing:border-box;border-radius:var(--goto-chat-bubble-border-radius,var(--goto-radius-xlarge));min-width:60px;color:inherit;background-color:var(--goto-surface-color-brand-secondary);padding:var(--goto-spacing-03);position:relative}:host .reactionsContainer{display:flex}:host .reactionsContainer .reactionsError,:host .reactionsContainer .reactions{top:calc(-1*var(--goto-spacing-01) - var(--goto-spacing-02));margin-bottom:calc(-1*var(--goto-spacing-01) - var(--goto-spacing-02) - 2px);min-width:min(100%,var(--reactive-width,0) + 2*var(--goto-spacing-03));display:flex;position:relative}:host .reactionsContainer .reactions{flex-wrap:wrap;justify-content:right}:host:host([data-no-reactions=true]) .reactions{display:none}:host .followUpsContainer{margin-top:var(--goto-spacing-02)}:host .followUpsContainer chameleon-menu-item.follow-up-prompt{align-items:flex-start;height:auto}:host .followUpsContainer chameleon-menu-item.follow-up-prompt chameleon-typography{white-space:normal}:host ::slotted(chameleon-chip[slot=reactions]){box-sizing:content-box;border:2px solid var(--goto-surface-color-default);position:relative}:host:host(:hover) slot[name=contextual-actions],:host:host(:focus-within) slot[name=contextual-actions]{display:block}:host:host(:hover):host([short-message]) slot[name=contextual-actions],:host:host(:focus-within):host([short-message]) slot[name=contextual-actions]{top:var(--goto-spacing-01)}:host:host(:focus-within) .container{outline:var(--goto-focus-color-highlight-default)solid 1px}:host .truncate-action{margin-top:var(--goto-spacing-02)}:host:host(:not([unclamp])) .content-text{line-clamp:15;-webkit-line-clamp:15;white-space:pre-line;word-break:break-word;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:host:host([expanded]) .content-text{line-clamp:unset;-webkit-line-clamp:unset}slot[name=contextual-actions]{text-wrap:nowrap;top:calc(var(--goto-spacing-06)*-1);z-index:var(--goto-z-index-mask);display:none;position:absolute}.contents{gap:var(--goto-spacing-02);flex-direction:column;display:flex}slot[name=attachments]::slotted(*){gap:var(--goto-spacing-02);flex-flow:wrap;display:flex}slot[name=footer]::slotted(*){margin-bottom:var(--goto-spacing-01)}:host([type=outbound]){float:right;
982align-items:flex-end}:host([type=outbound]) .container{background-color:var(--goto-surface-color-brand-secondary)}:host([type=outbound]) .reactions{justify-content:left}:host([type=outbound]):host(:hover):host([short-message]) slot[name=contextual-actions],:host([type=outbound]):host(:focus-within):host([short-message]) slot[name=contextual-actions]{right:100%}:host([type=outbound]):host(:hover):host(:not([short-message])) slot[name=contextual-actions],:host([type=outbound]):host(:focus-within):host(:not([short-message])) slot[name=contextual-actions]{left:calc(var(--goto-spacing-01)*-1)}:host([type=outbound][variant=default]) .container{background-color:var(--goto-chat-bubble-background-color,var(--goto-surface-color-brand-secondary))}:host([type=inbound]) .container{background-color:var(--goto-surface-color-secondary)}:host([type=inbound]):host(:hover):host([short-message]) slot[name=contextual-actions],:host([type=inbound]):host(:focus-within):host([short-message]) slot[name=contextual-actions]{left:100%}:host([type=inbound]):host(:hover):host(:not([short-message])) slot[name=contextual-actions],:host([type=inbound]):host(:focus-within):host(:not([short-message])) slot[name=contextual-actions]{right:calc(var(--goto-spacing-01)*-1)}:host([type=inbound][variant=default]) .container{background-color:var(--goto-chat-bubble-background-color,var(--goto-surface-color-secondary))}:host([clickable]) .container{cursor:pointer}:host([clickable]):host([variant=default]) .container:hover{background-color:var(--goto-chat-bubble-hover-background-color,var(--goto-interactive-color-neutral-hover))}:host([clickable]):host([variant=default]):host(:focus) .container{background-color:var(--goto-chat-bubble-focus-background-color,var(--goto-interactive-color-neutral-hover))}:host([clickable]):host([variant=deleted]) .container:hover,:host([clickable]):host([variant=deleted]):host(:focus) .container{background-color:var(--goto-interactive-color-neutral-hover)}:host([clickable]):host([variant=secondary]) .container:hover,:host([clickable]):host([variant=secondary]):host(:focus) .container,:host([clickable]):host([variant=automated]) .container:hover,:host([clickable]):host([variant=automated]):host(:focus) .container{background-color:var(--goto-interactive-color-secondary-hover)}:host([clickable]):host([data-pressed]):host([variant=default]) .container{background-color:var(--goto-chat-bubble-pressed-background-color,var(--goto-interactive-color-neutral-pressed))}:host([clickable]):host([data-pressed]):host([variant=deleted]) .container{background-color:var(--goto-interactive-color-neutral-pressed)}:host([clickable]):host([data-pressed]):host([variant=secondary]) .container,:host([clickable]):host([data-pressed]):host([variant=automated]) .container{background-color:var(--goto-interactive-color-secondary-pressed)}:host([variant=secondary]) .container,:host([variant=automated]) .container{border:1px solid var(--goto-border-color-default);background-color:var(--goto-surface-color-default)}:host([variant=ai]) .container,:host([variant=emoji]) .container{background-color:var(--goto-surface-color-default)}:host([variant=deleted]){color:var(--goto-type-color-secondary);font-style:italic}slot[name=reactionsError]{align-self:center;display:flex}"),h([Ne({slot:"reactions"})],_h.prototype,"reactions",void 0),h([Ne({slot:"reactionsError"})],_h.prototype,"reactionsError",void 0),h([Ne({slot:"reactionsDescription"})],_h.prototype,"reactionsDescription",void 0),h([Te({reflect:!0})],_h.prototype,"variant",void 0),h([Te({reflect:!0})],_h.prototype,"type",void 0),h([Te({type:Boolean,reflect:!0})],_h.prototype,"clickable",void 0),h([Te({type:Boolean,reflect:!0,attribute:"short-message"})],_h.prototype,"shortMessage",void 0),h([Te({type:Boolean,reflect:!0})],_h.prototype,"expanded",void 0),h([Te({type:Boolean,reflect:!0})],_h.prototype,"unclamp",void 0),h([Oe()],_h.prototype,"showTruncateAction",void 0),h([Te({attribute:"see-more"})],_h.prototype,"seeMore",void 0),h([Te({attribute:"see-less"})],_h.prototype,"seeLess",void 0),h([Te({type:Object,reflect:!1})],_h.prototype,"followUps",void 0),h([Te({attribute:"follow-ups-title"})],_h.prototype,"followUpsTitle",void 0),h([$e(".reactions")],_h.prototype,"reactionsContainer",void 0),h([Re()],_h.prototype,"defaultSlot",void 0);class kh extends Zt{render(){const e=u(Hl);return Pi(`<${e} variant="caption-medium-strong" color="type-color-secondary">\n      <slot></slot>\n    </${e}>`)}}kh.baseName="menu-section",kh.styles=b(":host{margin:var(--goto-spacing-01)var(--goto-spacing-04);display:flex}");class Ch extends Jn{constructor(){super(...arguments),this.role="separator",this.orientation="horizontal"}}nn([Qr],Ch.prototype,"role",void 0),nn([Qr],Ch.prototype,"orientation",void 0);class Sh extends(s(Ch)){}const Eh={baseName:"menu-separator",baseClass:Ch,template:(e,t)=>
982ri`
983    <template role="${e=>e.role}" aria-orientation="${e=>e.orientation}"></template>
984`,styles:Ci(":host{border-top:1px solid;border-color:var(--goto-border-color-default);margin:var(--goto-spacing-02)var(--goto-spacing-00);height:1px;display:flex}")},Ih=Sh.compose(Eh);function Ah(e={}){return vr(e),Gl(e),d(kh,e),To({prefix:e.prefix,node:e.node},wc,Ih,vc)}class Th extends Zt{constructor(){super(...arguments),this.type="inbound"}static get styles(){return Ml(Th,":host{display:flex}:host>div.container{column-gap:var(--goto-spacing-02);flex-direction:row;max-width:min(80%,724px);display:flex}slot[name=author-name]{color:var(--goto-type-color-default);font:var(--goto-caption-small-strong);display:inline}:host([type=outbound]){justify-content:flex-end}:host([type=outbound])>div.container{flex-direction:row-reverse}:host([type=outbound])>div.container slot[name=author-name]{text-align:right}.chat-bubble-container{display:grid}.chat-bubble-container slot[name=end]{color:var(--goto-type-color-secondary);font:var(--goto-caption-small);display:flex}:host([type=outbound]) .chat-bubble-container slot[name=end]{color:var(--goto-type-color-secondary);font:var(--goto-caption-small);justify-content:flex-end}:host .chat-bubble-container slot[name=end]::slotted(*){column-gap:var(--goto-spacing-01);align-items:center;display:flex}:host .chat-bubble-container ::slotted(chameleon-chat-bubble){--goto-chat-bubble-border-radius:var(--goto-radius-xlarge)}:host .chat-bubble-container ::slotted(chameleon-chat-bubble:not(:last-of-type)){margin-bottom:var(--goto-spacing-01)}:host .chat-bubble-container ::slotted(chameleon-circular-progress){width:14px;height:14px}:host([type=outbound]) .chat-bubble-container ::slotted(chameleon-chat-bubble:first-of-type){--goto-chat-bubble-border-radius:var(--goto-radius-xlarge)var(--goto-radius-small)var(--goto-radius-xlarge)var(--goto-radius-xlarge)}:host([type=inbound]) .chat-bubble-container ::slotted(chameleon-chat-bubble:first-of-type){--goto-chat-bubble-border-radius:var(--goto-radius-small)var(--goto-radius-xlarge)var(--goto-radius-xlarge)}")}updated(e){super.updated(e),e.has("type")&&this.updateChatBubbles()}render(){return oe`
985      <div class="container">
986        <div>
987          <slot name="avatar"></slot>
988        </div>
989        <div class="chat-bubble-container">
990          <slot name="author-name"></slot>
991          <div role="list"><slot @slotchange=${()=>this.attachBubbleKeydownHandlers()}></slot></div>
992          <slot name="end"></slot>
993        </div>
994      </div>
995    `}updateChatBubbles(){this.chatBubbleElements&&this.chatBubbleElements.forEach(e=>{e.type=this.type;const t=e.getAttribute("variant");if(t&&"ai"===t){const e=this.shadowRoot?.querySelector('slot[name="avatar"]');(e?.assignedElements({flatten:!0})??[]).forEach(e=>{e instanceof HTMLElement&&e.style.setProperty("--goto-avatar-bg-color","var(--goto-surface-color-brand-secondary)")})}})}attachBubbleKeydownHandlers(){this.unsubscribeFnForPreviousChatBubbles?.forEach(e=>{e()}),this.unsubscribeFnForPreviousChatBubbles=this.chatBubbleElements?.map((e,t)=>{const r=e=>this.handleBubbleKeydown(e,t,this.chatBubbleElements??[]);return e.addEventListener("keydown",r),()=>e.removeEventListener("keydown",r)})}handleBubbleKeydown(e,t,r){if("ArrowUp"===e.key)if(e.preventDefault(),0===t){const e=this.getSiblingChatStack(-1);if(e){const t=e.chatBubbleElements??[];t.length&&t[t.length-1].focus()}}else r[t-1].focus();else if("ArrowDown"===e.key)if(e.preventDefault(),t===r.length-1){const e=this.getSiblingChatStack(1);if(e){const t=e.chatBubbleElements??[];t.length&&t[0].focus()}}else r[t+1].focus()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFnForPreviousChatBubbles?.forEach(e=>{e()}),this.unsubscribeFnForPreviousChatBubbles=void 0}getSiblingChatStack(e){const t=this[-1===e?"previousElementSibling":"nextElementSibling"];return t instanceof Th?t:null}}Th.baseName="chat-stack",h([Te({reflect:!0})],Th.prototype,"type",void 0),h([Ne({slot:"",flatten:!0})],Th.prototype,"chatBubbleElements",void 0),function(e={}){vr(e),function(e={}){vr(e),ql(e),Gl(e),Ah(e),d(_h,e)}(e),ql(e),d(Th,e)}();var Oh='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M18.7071 8.70711L10.5 16.9142L6.29289 12.7071L7.70711 11.2929L10.5 14.0858L17.2929 7.29289L18.7071 8.70711Z" fill="currentColor"></path></svg>';function Lh(e,t,r){if(!t||!e)return;if(!CSS.supports("selector(:state(g))"))return void e.shadowRoot.host.toggleAttribute(`state--${t}`,r);const n=`--${t}`;r??!e.states.has(n)?e.states.add(n):e.states.delete(n)}class $h extends Jn{constructor(){super(...arguments),this.disabled=!1,this.initialValue="on",this.dirtyChecked=!1,this.elementInternals=this.attachInternals(),this._val
995idationFallbackMessage="",this._value=this.initialValue}get checked(){return $r.track(this,"checked"),!!this._checked}set checked(e){this._checked=e,this.setFormValue(e?this.value:null),this.setValidity(),this.setAriaChecked(),Lh(this.elementInternals,"checked",e),$r.notify(this,"checked")}get currentChecked(){return this._checked??!1}set currentChecked(e){this.checked=e}disabledChanged(e,t){this.elementInternals&&(this.elementInternals.ariaDisabled=t?"true":"false",Lh(this.elementInternals,"disabled",t))}disabledAttributeChanged(e,t){this.disabled=!!t}initialCheckedChanged(e,t){this.dirtyChecked||(this.checked=!!t)}initialValueChanged(e,t){this._value=t}requiredChanged(e,t){this.$fastController.isConnected&&(this.setValidity(),this.elementInternals.ariaRequired=this.required?"true":"false")}get form(){return this.elementInternals.form}get labels(){return Object.freeze(Array.from(this.elementInternals.labels))}get validationMessage(){if(this.elementInternals.validationMessage)return this.elementInternals.validationMessage;if(!this._validationFallbackMessage){const e=document.createElement("input");e.type="checkbox",e.required=!0,e.checked=!1,this._validationFallbackMessage=e.validationMessage}return this._validationFallbackMessage}get validity(){return this.elementInternals.validity}get value(){return $r.track(this,"value"),this._value}set value(e){this._value=e,this.$fastController.isConnected&&(this.setFormValue(e),this.setValidity(),$r.notify(this,"value"))}get willValidate(){return this.elementInternals.willValidate}checkValidity(){return this.elementInternals.checkValidity()}clickHandler(e){if(this.disabled)return;this.dirtyChecked=!0;const t=this.checked;return this.toggleChecked(),t!==this.checked&&(this.$emit("change"),this.$emit("input")),!0}connectedCallback(){super.connectedCallback(),this.setAriaChecked(),this.setValidity()}inputHandler(e){return this.setFormValue(this.value),this.setValidity(),!0}keydownHandler(e){if(" "!==e.key)return!0}keyupHandler(e){if(" "!==e.key)return!0;this.click()}formResetCallback(){this.checked=this.initialChecked??!1,this.dirtyChecked=!1,this.setValidity()}reportValidity(){return this.elementInternals.reportValidity()}setAriaChecked(e=this.checked){this.elementInternals.ariaChecked=e?"true":"false"}setFormValue(e,t){this.elementInternals.setFormValue(e,e??t)}setCustomValidity(e){this.elementInternals.setValidity({customError:!0},e),this.setValidity()}setValidity(e,t,r){if(this.$fastController.isConnected){if(this.disabled||!this.required)return void this.elementInternals.setValidity({});this.elementInternals.setValidity({valueMissing:!!this.required&&!this.checked,...e},t??this.validationMessage,r)}}toggleChecked(e=!this.checked){this.checked=e}}$h.formAssociated=!0,h([Qr({mode:"boolean"})],$h.prototype,"autofocus",void 0),h([Qr({attribute:"current-checked",mode:"boolean"})],$h.prototype,"checked",null),h([Qr({mode:"boolean"})],$h.prototype,"disabled",void 0),h([Qr({attribute:"disabled",mode:"boolean"})],$h.prototype,"disabledAttribute",void 0),h([Qr({attribute:"form"})],$h.prototype,"formAttribute",void 0),h([Qr({attribute:"checked",mode:"boolean"})],$h.prototype,"initialChecked",void 0),h([Qr({attribute:"value",mode:"fromView"})],$h.prototype,"initialValue",void 0),h([Qr],$h.prototype,"name",void 0),h([Qr({mode:"boolean"})],$h.prototype,"required",void 0);class Nh extends(a($h,"checkbox")){indeterminateChanged(e,t){this.isConnected&&this.setAriaChecked(),Lh(this.elementInternals,"indeterminate",t)}connectedCallback(){super.connectedCallback(),this.setAriaChecked(),this.errorText?this.appendErrorState():this.helperText&&this.appendHelperText()}setAriaChecked(e=this.checked){this.indeterminate?this.elementInternals.ariaChecked="mixed":super.setAriaChecked(e)}toggleChecked(e=!this.checked){this.indeterminate=!1,super.toggleChecked(e)}constructor(){super(),this.indeterminate=!1,this.helperTextHtmlElement=document.createElement(u(Hl)),this.errIcon=document.createElement(u(mr)),this.msg=document.createElement(u(Hl)),this.partError=document.createElement("div"),this.elementInternals.role="checkbox"}helperTextChanged(e,t){e!==t&&(t?this.appendHelperText():this.removeHelperText())}appendHelperText(){this.helperText&&(this.classList.add("has-helper
995-text"),this.helperTextHtmlElement.classList.add("helper-text"),this.helperTextHtmlElement.setAttribute("variant","caption-medium"),this.helperTextHtmlElement.setAttribute("color","type-color-secondary"),this.helperTextHtmlElement.textContent=this.helperText,this.shadowRoot?.appendChild(this.helperTextHtmlElement))}removeHelperText(){this.classList.remove("has-helper-text"),this.helperTextHtmlElement.remove()}errorTextChanged(e,t){t&&e!==t?this.appendErrorState():this.partError&&e!==t&&this.removeErrorState()}appendErrorState(){this.removeHelperText(),this.errorText&&(this.classList.add("has-error"),this.partError.setAttribute("part","error"),this.errIcon.classList.add("error-icon"),this.errIcon.innerHTML=Cl,this.msg.classList.add("error-text"),this.msg.setAttribute("color","type-color-danger"),this.msg.setAttribute("variant","caption-medium"),this.msg.textContent=this.errorText,this.setAttribute("aria-invalid","true"),this.shadowRoot?.appendChild(this.errIcon),this.shadowRoot?.appendChild(this.msg))}removeErrorState(){this.classList.remove("has-error"),this.errIcon.remove(),this.msg.remove(),this.removeAttribute("aria-invalid"),this.helperText&&this.appendHelperText()}}h([Nr],Nh.prototype,"defaultSlottedNodes",void 0),h([Qr({mode:"boolean"})],Nh.prototype,"indeterminate",void 0),h([Qr({attribute:"helper-text"})],Nh.prototype,"helperText",void 0),h([Qr({attribute:"error-text"})],Nh.prototype,"errorText",void 0);const Rh={baseName:"checkbox",template:(e,t)=>
995ri`
996    <template
997      role="checkbox"
998      aria-checked="${e=>e.indeterminate?"mixed":e.checked?"true":"false"}"
999      aria-required="${e=>e.required}"
1000      aria-disabled="${e=>e.disabled}"
1001      tabindex="${e=>e.disabled?void 0:0}"
1002      @click="${(e,t)=>e.clickHandler(t.event)}"
1003      @input="${(e,t)=>e.inputHandler(t.event)}"
1004      @keydown="${(e,t)=>e.keydownHandler(t.event)}"
1005      @keyup="${(e,t)=>e.keyupHandler(t.event)}"
1006      class="${e=>e.checked?"checked":""} ${e=>e.indeterminate?"indeterminate":""}"
1007    >
1008      <div part="control" class="control">
1009        <slot name="checked-indicator">
1010          ${t.checkedIndicator||""}
1011        </slot>
1012        <slot name="indeterminate-indicator">
1013          ${t.indeterminateIndicator||""}
1014        </slot>
1015      </div>
1016      <label
1017        part="label"
1018        class="${e=>e.defaultSlottedNodes?.length?"label":"label label__hidden"}"
1019      >
1020        <slot ${si("defaultSlottedNodes")}></slot>
1021      </label>
1022    </template>
1023  `,styles:Ci(":host{--goto-icon-color:var(--goto-icon-color-inverted);--goto-icon-size:var(--goto-spacing-06);cursor:pointer;align-items:center;gap:var(--goto-spacing-03);min-height:var(--goto-spacing-06);font:var(--goto-body-medium);color:var(--goto-type-color-default);outline:none;display:inline-flex;position:relative}:host .control{box-sizing:border-box;box-shadow:0 0 0 1px var(--goto-border-color-strong);background-color:var(--goto-interactive-color-secondary-default);width:var(--goto-spacing-04);height:var(--goto-spacing-04);border-radius:2px;flex-shrink:0;align-self:flex-start;margin-top:4px;position:relative}:host .control:hover,:host .control:active{background-color:var(--goto-interactive-color-secondary-default)}:host .label{cursor:pointer}:host [name=checked-indicator],:host [name=indeterminate-indicator]{pointer-events:none;width:var(--goto-spacing-04);height:var(--goto-spacing-04);display:none}:host [name=checked-indicator] chameleon-svg,:host [name=indeterminate-indicator] chameleon-svg{position:absolute;top:-4px;left:-4px}:host(:focus-visible) .control{outline-offset:2px;outline:var(--goto-focus-color-highlight-default)solid 1px}:host(.checked) .control,:host(.indeterminate) .control{box-shadow:0 0 0 1px var(--goto-interactive-color-brand-default);background-color:var(--goto-interactive-color-brand-default)}@media print{:host(.checked) .control,:host(.indeterminate) .control{-webkit-print-color-adjust:exact;color-adjust:exact;print-color-adjust:exact}}:host(.checked) .control:hover,:host(.indeterminate) .control:hover,:host(.checked) .control:active,:host(.indeterminate) .control:active{box-shadow:0 0 0 1px var(--goto-interactive-color-brand-default);background-color:var(--goto-interactive-color-brand-default)}:host(.checked) [name=checked-indicator],:host(.indeterminate) [name=indeterminate-indicator]{display:block}:host(.indeterminate) [name=checked-indicator]{display:none}:host(:not(.indeterminate)[disabled]),:host(:not(.checked)[disabled]){cursor:not-allowed;--goto-icon-color:var(--goto-icon-color-disabled)}:host(:not(.indeterminate)[disabled]) .control,:host(:not(.checked)[disabled]) .control{background-color:var(--goto-interactive-color-disabled);box-shadow:0 0 0 1px var(--goto-interactive-color-disabled)}:host(:not(.indeterminate)[disabled]) .label,:host(:not(.checked)[disabled]) .label{cursor:not-allowed;color:var(--goto-type-color-disabled)}:host(.has-helper-text),:host(.has-error){align-items:start;row-gap:var(--goto-spacing-00);grid-template-rows:auto 1fr;grid-template-columns:auto 1fr;height:44px;display:grid}:host(.has-helper-text) .helper-text,:host(.has-helper-text) .error-text,:host(.has-error) .helper-text,:host(.has-error) .error-text{cursor:text}:host(.has-helper-text) .helper-text,:host(.has-error) .helper-text{grid-column:span 2;align-self:start}:host(.has-error) .error-icon{--goto-icon-color:var(--goto-icon-color-danger);--goto-icon-size:var(--goto-spacing-04);align-self:start;margin-top:1px}:host(.has-error) .error-text{align-self:center}:host(.has-error) .control{box-shadow:0 0 0 1px var(--goto-border-color-danger);margin-top:4px}:host(.has-error) .control:hover{box-shadow:0 0 0 1px var(--goto-border-color-danger)}"),checkedIndicator:e=>{const t=u(mr);return ri`<${t} class="checked-indicator">${Oh}</${t}>`},indeterminateIndicator:e=>{const t=u(mr);return ri`<${t} class="indeterminate-indicator">${'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M6 11H18V13H6V11Z" fill="currentColor"></path></svg>'}</${t}>`}},Ph=Nh.compose(Rh);!function(e){Gl({prefix:e}),vr({prefix:e}),To({prefix:e,node:void 0},Ph)}();class Dh extends Zt{constructor(){super(),this.size="default",this.variant="default",this.closeLabel="Close",new Vi(this,()=>this.isAriaDisabled)}get isAriaDisabled(){return!0===this.disabled||"true"===this.ariaDisabled}render(){return oe`
1024      <button
1025        class="control"
1026        part="control"
1027        type="button"
1028        aria-label="${this.closeLabel??"Close"}"
1029        aria-disabled="${this.isAriaDisabled}"
1030      >
1031        <slot></slot>
1032      </button>
1033    `}}Dh.baseName="chip-icon-button",Dh.styles=b(":host{justify-content:center;align-items:center;display:inline-flex}:host .control{all:unset;cursor:pointer;border-radius:var(--goto-radius-circle);box-sizing:border-box;justify-content:center;align-items:center;padding:0;display:flex}:host([size=default]) .control{width:var(--goto-spacing-06);height:var(--goto-spacing-06);--goto-icon-size:var(--goto-spacing-04)}:host([size=small]) .control{width:calc(var(--goto-spacing-06)*3/4);height:calc(var(--goto-spacing-06)*3/4);--goto-icon-size:var(--goto-spacing-03)}:host([variant=default]) .control{background-color:var(--goto-interactive-color-secondary-default);--goto-icon-color:var(--goto-icon-color-default)}:host([variant=default]) .control:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host([variant=default]) .control:active{background-color:var(--goto-interactive-color-secondary-pressed)}:host([variant=default]) .control:focus-visible{outline:1px solid var(--goto-focus-color-highlight-default);border:2px solid var(--goto-focus-border-color-default)}:host([variant=active]) .control{background-color:var(--goto-interactive-color-secondary-default);--goto-icon-color:var(--goto-icon-color-inverted)}:host([variant=active]) .control:hover{background-color:var(--goto-interactive-color-brand-hover)}:host([variant=active]) .control:active{background-color:var(--goto-interactive-color-brand-pressed)}:host([variant=active]) .control:focus-visible{outline:1px solid var(--goto-focus-color-highlight-default)}:host([variant=active][error]) .control:hover{background-color:var(--goto-interactive-color-danger-hover)}:host([variant=active][error]) .control:active{background-color:var(--goto-interactive-color-danger-pressed)}:host([variant=active][color-token]) .control{--goto-icon-color:var(--goto-icon-color-default)}:host([variant=active][color-token]) .control:hover,:host([variant=active][color-token]) .control:active{background-color:#0000}:host([disabled]) .control{cursor:not-allowed;background-color:var(--goto-interactive-color-secondary-default);--goto-icon-color:var(--goto-icon-color-disabled)}:host([disabled]) .control:hover,:host([disabled]) .control:active{background-color:var(--goto-interactive-color-secondary-default)}"),h([Te({reflect:!0})],Dh.prototype,"size",void 0),h([Te({reflect:!0})],Dh.prototype,"variant",void 0),h([Te({type:Boolean,reflect:!0})],Dh.prototype,"disabled",void 0),h([Te({reflect:!0,attribute:"close-label"})],Dh.prototype,"closeLabel",void 0);let Mh=0;class zh extends Zt{constructor(){super(...arguments),this._internals=this.attachInternals(),this.value="on",this.size="medium",this.type="default",this.role=null,this.uniqueId="chip-id-"+ ++Mh,this.keyActionMap={button:{keys:[" ","Enter"],action:()=>{this.action()},preventDefault:!0,stopPropagation:!0},checkbox:{keys:[" "],action:()=>{this.active=!this.active,this.action()},preventDefault:!0,stopPropagation:!0},radio:{keys:[" ","Enter"],action:()=>{this.active=!0,this.action()},preventDefault:!0,stopPropagation:!1}},this.closeKeys=["Enter"," ","Backspace"],this.handleKeyDown=e=>{const{key:t}=e;if(this.disabled)return;const r=this.getInternalCloseElement(),n=e.composedPath?.().includes(r);if(n&&this.closeKeys.includes(t))return e.stopImmediatePropagation(),e.preventDefault(),void this.close(e);
1033if(this.type&&this.type in this.keyActionMap){const r=this.keyActionMap[this.type];r.keys.includes(t)&&(r.preventDefault&&e.preventDefault(),r.stopPropagation&&e.stopPropagation(),r.action())}}}get checked(){return this.active??!1}set checked(e){this.active=e}get form(){return this._internals.form}get labels(){return this._internals.labels}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}setCustomValidity(e){e?this._internals.setValidity({customError:!0},e):this._internals.setValidity({})}formResetCallback(){this.active=this._initialChecked??!1,this.updateFormValue()}formDisabledCallback(e){this.disabled=e}updateFormValue(){"checkbox"===this.type||"radio"===this.type?(this._internals.setFormValue(this.active?this.value:null),Lh(this._internals,"checked",!!this.active)):this._internals.setFormValue(null)}get closeButtonSize(){return"xsmall"===this.size?"small":"default"}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown)}firstUpdated(){this._initialChecked=this.active??!1,this.setAccessibleLabel(),this.removeClosableForInteractiveTypes(),this.updateTypeRole(),this.updateFormValue()}updated(e){e.has("colorToken")&&this.changeColorToken(this.colorToken),e.has("size")&&this.handleSizeChange(),e.has("disabled")&&this.handleDisabledChange(),e.has("error")&&this.handleErrorChange(),(e.has("label")||e.has("labelId"))&&this.setAccessibleLabel(),(e.has("type")||e.has("role"))&&this.updateTypeRole(),e.has("type")&&(this.removeClosableForInteractiveTypes(),this.updateFormValue()),e.has("value")&&this.updateFormValue(),e.has("active")&&(this.handleActiveChange(e.get("active")),this.updateFormValue())}changeColorToken(e){if(e){const t=e.includes("goto-")?e:`goto-${e}`;this.style.setProperty("--goto-chip-bg-color",`var(--${t})`)}else this.style.removeProperty("--goto-chip-bg-color")}handleSizeChange(){this.slottedAvatar&&this.slottedAvatar.length>0&&this.slottedAvatar.forEach(e=>{e.setAttribute("size",this.size??"medium")})}handleDisabledChange(){requestAnimationFrame(()=>{this.isConnected&&(this.slottedAvatar&&this.slottedAvatar.length>0&&this.slottedAvatar.forEach(e=>{e.setAttribute("disabled",`${this.disabled??!1}`)}),"button"===this.type&&(this.getInternalButtonElement()?.removeAttribute("disabled"),this.getInternalButtonElement()?.setAttribute("aria-disabled",`${!!this.disabled}`)),"checkbox"!==this.type&&"radio"!==this.type||(this.getInternalInputElement()?.removeAttribute("disabled"),this.getInternalInputElement()?.setAttribute("aria-disabled",`${!!this.disabled}`)))})}handleErrorChange(){requestAnimationFrame(()=>{this.isConnected&&(!0===this.error?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid"))})}updateTypeRole(){this.type&&["checkbox","radio","button"].includes(this.type)?(this.setAttribute("role",this.type),this.tabIndex=0,"checkbox"!==this.type&&"radio"!==this.type||this.setAttribute("aria-checked",String(this.active??!1))):(this.role?this.setAttribute("role",this.role):this.removeAttribute("role"),this.removeAttribute("aria-checked"))}handleActiveChange(e){e===this.active||"checkbox"!==this.type&&"radio"!==this.type||(this.setAttribute("aria-checked",String(this.active??!1)),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))),"radio"===this.type&&this.active&&this.name&&this.deselectRadioSiblings()}deselectRadioSiblings(){this.getRootNode().querySelectorAll(`${u(zh)}[type="radio"][name="${this.name}"]`).forEach(e=>{e!==this&&e.active&&(e.active=!1)})}handleIconSlotChange(e){e.target.assignedElements().length>0?this.setAttribute("has-icon","true"):this.removeAttribute("has-icon")}handleAvatarSlotChange(e){const t=e.target.assignedElements();t.length>0&&t.some(e=>e.tagName.includes("AVATAR"))?(this.setAttribute("has-avatar","true"),t.forEach(e
1033=>{e.setAttribute("size",this.size??"medium"),this.disabled&&e.setAttribute("disabled","")})):this.removeAttribute("has-avatar")}action(){if(!this.disabled)return this.dispatchEvent(new CustomEvent("chip-action",{bubbles:!0})),"A"===this.parentElement?.tagName||void 0}close(e){this.disabled||(e.stopPropagation(),this.dispatchEvent(new CustomEvent("close",{bubbles:!1})),this.dispatchEvent(new CustomEvent("ch-chip-close",{bubbles:!0})))}getInternalButtonElement(){return this.shadowRoot?.querySelector(".button-chip")}getInternalInputElement(){return this.shadowRoot?.querySelector("input")}getInternalCloseElement(){const e=u(Dh);return this.shadowRoot?.querySelector(e)}removeClosableForInteractiveTypes(){this.closable&&["button","checkbox","radio"].includes(this.type??"")&&(console.warn(`CHAMELEON-WARNING: 'closable' attribute is not applicable for Chip type='${this.type}'. The attribute will be removed.`),this.closable=void 0,this.closeLabel=void 0,this.removeAttribute("closable"),this.removeAttribute("close-label"))}setAccessibleLabel(){this.closable,this.innerText?.length||(this.labelId?this.setAttribute("aria-labelledby",this.labelId):this.label&&this.setAttribute("aria-label",this.label))}validateAccessibleCloseLabel(){this.closeLabel||this.getInternalCloseElement()?.getAttribute("aria-label")?.length||console.error("CHAMELEON-A11Y: Closable chip component must have an accessible label for the X icon provided via the closeLabel attribute.")}validateAccessibleLabel(){this.getAttribute("aria-labelledby")?.length||this.getAttribute("aria-label")?.length||console.error("CHAMELEON-A11Y: Chip component must have an accessible label provided by either \n  1) text content \n  2) a visible label whose id is given as the attribute labelId \n  3) a non-empty label attribute to be used as aria-label.\n")}render(){const e=Oi(u(mr)),t=Oi(u(Dh));return"button"===this.type?this.renderButtonChip(e):"checkbox"===this.type||"radio"===this.type?this.renderCheckableChip(e):this.renderDefaultChip(e,t)}renderDefaultChip(e,t){return Ni`
1034      ${this.person&&!this.error?Ni`<${e} class="person-icon">${Al}</${e}>`:le}
1035      ${this.person||this.error?le:oe`<slot name="icon" @slotchange=${this.handleIconSlotChange}></slot>`}
1036      ${this.error?Ni`<${e} class="error-icon">${Cl}</${e}>`:le}
1037      <slot name="avatar" @slotchange=${this.handleAvatarSlotChange}></slot>
1038      <span class="content" part="content"><slot></slot></span>
1039      ${this.closable?Ni`<${t}
1040            @click=${e=>this.close(e)}
1041            size="${this.closeButtonSize}"
1042            variant="${this.active||this.error?"active":"default"}"
1043            close-label="${this.closeLabel??""}"
1044            ?disabled="${this.disabled}"
1045            ?error="${this.error}"
1046            ?color-token="${!!this.colorToken}"
1047          ><${e}>${Sl}</${e}></${t}>`:le}
1048    `}renderButtonChip(e){return Ni`
1049      <button tabindex="-1" type="button" class="button-chip" @click=${()=>this.action()}>
1050        ${this.person&&!this.error?Ni`<${e} class="person-icon">${Al}</${e}>`:le}
1051        ${this.person||this.error?le:oe`<slot name="icon" @slotchange=${this.handleIconSlotChange}></slot>`}
1052        ${this.error?Ni`<${e} class="error-icon">${Cl}</${e}>`:le}
1053        <slot name="avatar" @slotchange=${this.handleAvatarSlotChange}></slot>
1054        <span class="content" part="content"><slot></slot></span>
1055      </button>
1056    `}renderCheckableChip(e){return Ni`
1057      <label
1058        for="${this.uniqueId}"
1059        @click=${()=>{"radio"!==this.type||this.disabled||(this.active=!0)}}
1060      >
1061        <input
1062          tabindex="-1"
1063          id="${this.uniqueId}"
1064          type="${this.type}"
1065          aria-hidden="true"
1066          .checked="${this.active??!1}"
1067          name="${this.name??""}"
1068          value="${this.value??""}"
1069          @click=${()=>{this.disabled||(this.active="checkbox"!==this.type||!this.active,this.action())}}
1070        />
1071      </label>
1072      ${this.person&&!this.error?Ni`<${e} class="person-icon">${Al}</${e}>`:le}
1073      ${this.person||this.error?le:oe`<slot name="icon" @slotchange=${this.handleIconSlotChange}></slot>`}
1074      ${this.error?Ni`<${e} class="error-icon">${Cl}</${e}>`:le}
1075      <slot name="avatar" @slotchange=${this.handleAvatarSlotChange}></slot>
1076      <span class="content" part="content"><slot></slot></span>
1077    `}}function Fh(e={}){return Gl(e),d(Dh,e),vr(e),$l(e),d(zh,e)}zh.baseName="chip",zh.styles=b(":host{border-radius:var(--goto-radius-circle);height:var(--goto-spacing-07);padding:var(--goto-spacing-01)var(--goto-spacing-03);color:var(--goto-type-color-default);justify-content:center;align-items:center;gap:var(--goto-spacing-02);box-sizing:border-box;font:var(--goto-body-small);background-color:var(--goto-interactive-color-neutral-default);white-space:nowrap;max-width:var(--chip-max-width,248px);min-width:var(--chip-min-width,24px);--goto-icon-color:var(--goto-icon-color-default);--goto-icon-size:var(--goto-spacing-04);border:none;outline:none;display:flex;overflow:hidden}:host .content{white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden}:host .person-icon{display:none}:host([closable]){padding-right:var(--goto-spacing-01)}:host([person]),:host([error]),:host([has-icon=true]){padding-left:var(--goto-spacing-02)}:host([type=checkbox]),:host([type=radio]){cursor:pointer;position:relative}:host([type=checkbox]) label,:host([type=radio]) label{border-radius:var(--goto-radius-circle);cursor:inherit;padding:var(--goto-spacing-00);background:0 0;border:none;justify-content:center;align-items:center;display:inline-flex;position:absolute;inset:0}:host([type=checkbox]) input,:host([type=radio]) input{border-radius:var(--goto-radius-circle);height:var(--goto-spacing-07);appearance:none;width:100%;cursor:inherit;position:absolute}:host([type=checkbox]:hover),:host([type=radio]:hover){background-color:var(--goto-interactive-color-neutral-hover)}:host([type=checkbox]:active),:host([type=radio]:active){background-color:var(--goto-interactive-color-neutral-pressed)}:host([type=button]){cursor:pointer;padding:var(--goto-spacing-00)}:host([type=button]) .button-chip{border-radius:var(--goto-radius-circle);cursor:inherit;align-items:center;gap:var(--goto-spacing-02);font:var(--goto-body-small);height:var(--goto-spacing-07);width:100%;padding:var(--goto-spacing-01)var(--goto-spacing-03);background:0 0;border:none;justify-content:center;display:inline-flex}:host([type=button]) .button-chip:focus-visible{outline:1px solid var(--goto-focus-color-highlight-default);outline-offset:2px}:host([type=button]) .button-chip:active{color:var(--goto-type-color-pressed);--goto-icon-color:var(--goto-icon-color-default)}:host([type=button][closable]) .button-chip{padding-right:var(--goto-spacing-01)}
1077:host([type=button]:not([active]):not([error])){background-color:var(--goto-interactive-color-neutral-default)}:host([type=button]:not([active]):hover){background-color:var(--goto-interactive-color-neutral-hover)}:host([type=button]:not([error]):active){background-color:var(--goto-interactive-color-neutral-pressed)}:host([type=button][size=xsmall]) .button-chip{font:var(--goto-caption-medium);height:var(--goto-spacing-05)}:host([type=button][size=small]) .button-chip{height:var(--goto-spacing-06)}:host([size=xsmall]){font:var(--goto-caption-medium);height:var(--goto-spacing-05)}:host([size=small]){height:var(--goto-spacing-06)}:host([has-avatar=true]){padding-left:var(--goto-spacing-00);--goto-avatar-bg-color:var(--goto-chip-bg-color);color:var(--goto-type-color-default);justify-content:space-between}:host([has-avatar=true]) .person-icon{display:none}:host([has-avatar=true]) .button-chip{padding-left:var(--goto-spacing-00)}:host([has-avatar=true]) .button-chip .person-icon{display:none}:host([has-avatar=true][error]:not([type=button])),:host([has-avatar=true][error]) .button-chip{padding-left:var(--goto-spacing-03)}:host([person]) .person-icon,:host([person]) label .person-icon{display:block}:host([active]){--goto-icon-color:var(--goto-icon-color-inverted)}:host([active]) .button-chip{color:inherit}:host([active]:not([color-token^=avatar-]):not([color-token^=goto-avatar-])),:host([active]:not([color-token^=avatar-]):not([color-token^=goto-avatar-])) .button-chip{background-color:var(--goto-interactive-color-brand-default)}:host([active][color-token^=avatar-]),:host([active][color-token^=goto-avatar-]){color:var(--goto-type-color-default);background-color:var(--goto-chip-bg-color,var(--goto-interactive-color-brand-default))}:host([active]:hover:not([color-token^=avatar-]):not([color-token^=goto-avatar-]):not([type=default])),:host([active]:hover:not([color-token^=avatar-]):not([color-token^=goto-avatar-]):not([type=default])) .button-chip{background-color:var(--goto-interactive-color-brand-hover)}:host([active]:active:not([color-token^=avatar-]):not([color-token^=goto-avatar-]):not([type=default])),:host([active]:active:not([color-token^=avatar-]):not([color-token^=goto-avatar-]):not([type=default])) .button-chip{background-color:var(--goto-interactive-color-brand-pressed)}:host([error]){background-color:var(--goto-interactive-color-danger-default)!important}:host([error]) ::slotted([slot=avatar]){display:none}:host([active]:not([color-token^=avatar-]):not([color-token^=goto-avatar-]):not([disabled])),:host([error]){color:var(--goto-type-color-inverted);--goto-icon-color:var(--goto-icon-color-inverted)}:host([active][color-token^=avatar-]:not([has-avatar])),:host([active][color-token^=goto-avatar-]:not([has-avatar])){--goto-icon-color:var(--goto-icon-color-default)}:host([type=button][error]) .button-chip{color:var(--goto-type-color-inverted);--goto-icon-color:var(--goto-icon-color-inverted)}:host([type=button][error]) .button-chip:focus-visible{outline:1px solid var(--goto-focus-color-highlight-danger);outline-offset:2px}:host([type=button][error]:hover) .button-chip{background-color:var(--goto-interactive-color-danger-hover)}:host([type=button][error]:active) .button-chip{background-color:var(--goto-interactive-color-danger-pressed)}:host([type=checkbox][error]:hover),:host([type=radio][error]:hover){background-color:var(--goto-interactive-color-danger-hover)}:host([type=checkbox][error]:active),:host([type=radio][error]:active){background-color:var(--goto-interactive-color-danger-pressed)}:host([disabled]),:host([disabled][type=button]) .button-chip{cursor:not-allowed;--goto-icon-color:var(--goto-icon-color-disabled);background-color:var(--goto-interactive-color-neutral-default)!important;color:var(--goto-type-color-disabled)!important}:host([disabled]) ::slotted([slot=avatar]){cursor:not-allowed;--goto-icon-color:var(--goto-icon-color-disabled);background-color:var(--goto-interactive-color-disabled)!important;color:var(--goto-type-color-disabled)!important}:host([type=checkbox]:focus-visible),:host([type=button]:focus-visible),:host([type=radio]:focus-visible){outline:1px solid var(--goto-focus-color-highlight-default);outline-offset:2px}:host([type=checkbox][error]:focus-visible),:host([type=button][error]:focus-visible),:host([type=radio][error]:focus-visible){outline:1px solid var(--goto-focus-color-highlight-danger);outline-offset:2px}"),zh.formAssociated=!0,h([Te({type:Boolean,reflect:!0})],zh.prototype,"disabled",void 0),h([Te({type:Boolean,reflect:!0})],zh.prototype,"active",void 0),h([Te({type:Boolean,reflect:!0})],zh.prototype,"error",void 0),h([Te({type:Boolean,reflect:!0})],zh.prototype,"closable",void 0),h([Te({type:Boolean,reflect:!0})],zh.prototype,"person",void 0),h([Te({type:Boolean,attribute:"checked",reflect:!0})],zh.prototype,"checked",null),h([Te({attribute:"label-id"})],zh.prototype,"labelId",void 0),h([Te({attribute:"close-label"})],zh.prototype,"closeLabel",void 0),h([Te()],zh.prototype,"label",void 0),h([Te({reflect:!0})],zh.prototype,"name",void 0),h([Te()],zh.prototype,"value",void 0),h([Te({reflect:!0})],zh.prototype,"size",void 0),h([Te({reflect:!0})],zh.prototype,"type",void 0),h([Te({attribute:"role"})],zh.prototype,"role",void 0),h([Te({attribute:"color-token",reflect:!0}
1077)],zh.prototype,"colorToken",void 0),h([Oe()],zh.prototype,"uniqueId",void 0),h([Ne({slot:"icon"})],zh.prototype,"slottedIcon",void 0),h([Ne({slot:"avatar"})],zh.prototype,"slottedAvatar",void 0),Fh();class Uh extends Zt{constructor(){super(...arguments),this.copyString="Copy to clipboard",this.copiedString="Copied to clipboard",this.showTooltip=!1,this.addBreaks=!1,this.line="singleline",this.copyClicked=!1,this.iconChanged=!1,this.handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.copyToClipboard())},this.resetCopyTooltip=()=>{this.copyClicked=!1},this.copyToClipboard=()=>{clearTimeout(this.copiedTimer);const e=this.getContentToCopy();e&&navigator.clipboard.writeText(e).then(()=>{this.dispatchEvent(new CustomEvent("copied",{detail:e,bubbles:!1}))}).then(()=>{this.copyClicked=!0,this.iconChanged=!0,this.copiedTimer=setTimeout(()=>{this.copyClicked=!1,this.iconChanged=!1},5e3)})}}render(){const e=Oi(u(mr)),t=Oi(u(Wi)),r=Oi(u(Ca));return"inline"===this.line?Ni`
1078        <pre
1079          @click=${this.copyToClipboard}
1080          @mouseleave=${this.resetCopyTooltip}
1081          @keydown=${this.handleKeyDown}
1082          id="inline-trigger"
1083          role="button"
1084          tabindex="0"
1085        >
1086          <slot @slotchange=${this.handleSlotChange}></slot>
1087          <span class="displayed-content"></span>
1088        </pre>
1089        <${r}
1090          trigger-id="inline-trigger"
1091          style="${this.tooltipZIndex?`--z-index: ${this.tooltipZIndex}`:""}"
1092          ?hidden="${!this.showTooltip}"
1093          part="tooltip"
1094          position="top-center"
1095        >
1096          <span>${this.copyClicked?this.copiedString:this.copyString}</span>
1097        </${r}>
1098        <span class="sr-only" role="status" aria-live="polite" aria-atomic="true">
1099          ${this.copyClicked?this.copiedString:""}
1100        </span>
1101      `:Ni`
1102      <pre>
1103        <slot @slotchange=${this.handleSlotChange}></slot>
1104        <span class="displayed-content"></span>
1105      </pre>
1106      <${t}
1107        id="copy-button"
1108        size="large"
1109        slot="trigger"
1110        variant="${"primary"}"
1111        @click=${this.copyToClipboard}
1112        @mouseleave=${this.resetCopyTooltip}
1113        label="${this.copyClicked?this.copiedString:this.copyString}"
1114      >
1115        <${e}>${Mi(this.iconChanged?'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M21.7071 5.70711L9 18.4142L2.29289 11.7071L3.70711 10.2929L9 15.5858L20.2929 4.29289L21.7071 5.70711Z" fill="currentColor"></path></svg>':'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 2H19V4L4 4V19H2V2ZM7 7H20V20H7V7ZM5 22V5H22V22H5Z" fill="currentColor"></path></svg>')}</${e}>
1116      </${t}>
1117      <${r}
1118        trigger-id="copy-button"
1119        style="${this.tooltipZIndex?`--z-index: ${this.tooltipZIndex}`:""}"
1120        part="tooltip"
1121        position="top-center"
1122      >
1123        <span>${this.copyClicked?this.copiedString:this.copyString}</span>
1124      </${r}>
1125      <span class="sr-only" role="status" aria-live="polite" aria-atomic="true">
1126        ${this.copyClicked?this.copiedString:""}
1127      </span>
1128    `}updated(e){super.updated(e),e.has("addBreaks")&&this.addBreaks&&this.updateDisplayedContent()}connectedCallback(){super.connectedCallback(),this.addBreaks&&(this.slotObserver=new MutationObserver(()=>this.updateDisplayedContent()),this.slotObserver.observe(this,{childList:!0,characterData:!0,subtree:!0}))}disconnectedCallback(){super.disconnectedCallback(),this.copiedTimer&&clearTimeout(this.copiedTimer),this.slotObserver&&this.slotObserver.disconnect()}handleSlotChange(){this.addBreaks&&this.updateDisplayedContent()}updateDisplayedContent(){if(!this.displayedContent)return;const e=this.shadowRoot?.querySelector("slot"),t=(e?.assignedNodes()??[]).map(e=>e.textContent??"").join("");this.addBreaks&&t&&(this.displayedContent.innerHTML=t.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;").replaceAll(/\w+(?=[./?#&]|(:(?!\/\/)))/gi,e=>`${e}<wbr />`),e&&(e.style.display="none"))}getContentToCopy(){const e=this.shadowRoot?.querySelector("slot");return(e?.assignedNodes()??[]).map(e=>e.textContent??"").join("")}}Uh.baseName="code-snippet",Uh.styles=b(":host{color:var(--goto-type-color-default);border-radius:var(--goto-radius-small);background-color:var(--goto-surface-color-secondary);font:var(--goto-code-small);gap:var(--goto-spacing-04);padding:var(--goto-spacing-00);padding-left:var(--goto-spacing-04);height:var(--goto-spacing-08);box-sizing:border-box;width:100%;display:inline-flex}:host pre{white-space:nowrap;align-items:center;width:100%;display:flex}:host [part=tooltip]{align-self:start;height:auto}:host #copy-button{justify-content:center}:host::selection{background-color:var(--goto-interactive-color-neutral-pressed)}:host([line=multiline]){height:auto}:host([line=multiline]) pre{white-space:pre-wrap}:host([line=singleline]) pre{margin:var(--goto-spacing-00);max-width:calc(100% - 3.5rem);overflow-x:auto}:host([line=inline]){height:var(--goto-spacing-05);width:fit-content;padding:.125rem var(--goto-spacing-02);box-sizing:content-box}:host([line=inline]) pre{margin:var(--goto-spacing-00)}:host([line=inline]:hover){background-color:var(--goto-interactive-color-neutral-hover)}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}"),h([Te({attribute:"copy-string"})],Uh.prototype,"copyString",void 0),h([Te({attribute:"copied-string"})],Uh.prototype,"copiedString",void 0),h([Te({type:Boolean,attribute:"show-tooltip"})],Uh.prototype,"showTooltip",void 0),h([Te({type:Number,attribute:"tooltip-z-index"})],Uh.prototype,"tooltipZIndex",void 0),h([Te({type:Boolean,attribute:"add-breaks"})],Uh.prototype,"addBreaks",void 0),h([Te({reflect:!0}
1128)],Uh.prototype,"line",void 0),h([Oe()],Uh.prototype,"copyClicked",void 0),h([Oe()],Uh.prototype,"iconChanged",void 0),h([$e(".displayed-content")],Uh.prototype,"displayedContent",void 0),function(e={}){const{prefix:t,node:r}=e;vr(e),fl(e),To({prefix:t,node:r},bl),d(Uh,e)}();class Bh extends Zt{static get styles(){return Ml(Bh,":host{background-color:var(--goto-surface-color-default);box-shadow:var(--goto-elevation-medium);border-style:solid;border-width:1px;border-color:var(--goto-border-color-default);border-radius:var(--goto-radius-small);height:var(--goto-spacing-07);padding-right:var(--goto-spacing-01);padding-left:var(--goto-spacing-01);display:inline-flex}:host([variant=transparent]){box-shadow:none;background-color:#0000;border:none}:host([variant=transparent]) ::slotted(chameleon-icon-button){background-color:var(--goto-interactive-color-secondary-default);border-radius:var(--goto-radius-small)}::slotted(chameleon-icon-button){align-self:center}")}render(){return oe`<slot></slot>`}}Bh.baseName="contextual-actions",h([Te({reflect:!0})],Bh.prototype,"variant",void 0),function(e={}){d(cl,e),d(Bh,e)}();class Hh extends Zt{static get styles(){return Ml(Hh,":host{display:table-row-group}::slotted(chameleon-data-table-row:not([disabled],[selected]):hover){background-color:var(--goto-interactive-color-secondary-hover)}::slotted(chameleon-data-table-row:not([disabled],[selected]):active){background-color:var(--goto-interactive-color-secondary-pressed)}::slotted(chameleon-data-table-row:not([disabled]):focus-visible){border-color:var(--goto-focus-border-color-default);box-shadow:var(--goto-focus-color-highlight-default);background-color:var(--goto-interactive-color-disabled)}")}connectedCallback(){super.connectedCallback(),this.setAttribute("role","rowgroup")}render(){return oe`<slot></slot>`}}function jh(e={}){return d(Hh,e)}Hh.baseName="data-table-body";class Vh extends Zt{constructor(){super(...arguments),this.selected=!1,this.disabled=!1,this.header=!1,this.condensed=!1,this.indented=!1}static get styles(){return Ml(Vh,":host{border-top:1px solid var(--goto-border-color-default);height:var(--goto-spacing-11);display:table-row}:host ::slotted(chameleon-data-table-header-cell:first-of-type){padding-left:var(--goto-spacing-06)}:host ::slotted(chameleon-data-table-cell:first-of-type){padding-left:var(--goto-spacing-07)}:host ::slotted(td){padding:var(--goto-spacing-00)}:host ::slotted([slot=drag]){cursor:grab}:host ::slotted([slot=drag]:active){cursor:grabbing}:host([empty-state]){caption-side:bottom;justify-items:center;height:auto;display:table-caption}:host([draggable]) ::slotted(chameleon-data-table-cell:first-of-type){padding-left:var(--goto-spacing-00)}:host([condensed]){height:var(--goto-spacing-08)}:host(:not([disabled]):hover){background-color:var(--goto-interactive-color-secondary-hover)}:host(:not([disabled]):active){background-color:var(--goto-interactive-color-secondary-pressed)}:host(:focus-visible){outline:1px solid var(--goto-focus-border-highlight-default);outline-offset:1px}:host([selected]){background-color:var(--goto-surface-color-brand-secondary)}:host([header]){border-top:none}:host([indented]) ::slotted(chameleon-data-table-cell:first-of-type){padding-left:var(--goto-spacing-09)}")}connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}handleCellsSlotChange(e){const t=e.target.assignedElements();if(this.condensed)for(const e of t)e.setAttribute("condensed","true");if(this.disabled)for(const e of t)e.setAttribute("disabled","true")}handleDragSlotChange(e){const t=e.target.assignedElements();if(t.length>0?this.setAttribute("draggable","true"):this.removeAttribute("draggable"),this.condensed)for(const e of t)e.setAttribute("condensed","true")}render(){return oe`
1129      <slot name="drag" @slotchange=${this.handleDragSlotChange}></slot>
1130      <slot @slotchange=${this.handleCellsSlotChange}></slot>
1131    `}}function Wh(e={}){return d(Vh,e)}Vh.baseName="data-table-row",h([Te({type:Boolean,reflect:!0})],Vh.prototype,"selected",void 0),h([Te({type:Boolean,reflect:!0})],Vh.prototype,"disabled",void 0),h([Te({type:Boolean,reflect:!0})],Vh.prototype,"header",void 0),h([Te({type:Boolean,reflect:!0})],Vh.prototype,"condensed",void 0),h([Te({type:Boolean,reflect:!0})],Vh.prototype,"indented",void 0);class Kh extends Zt{connectedCallback(){super.connectedCallback(),this.setAttribute("role","rowgroup")}render(){return oe`<slot></slot>`}}function qh(e={}){return d(Kh,e)}Kh.baseName="data-table-header",Kh.styles=b(":host{--goto-datatable-cell-color:var(--goto-type-color-secondary);--goto-datatable-cell-font:var(--goto-caption-medium-strong);--goto-datatable-row-height:var(--goto-spacing-09);display:table-header-group}");class Gh extends Zt{constructor(){super(...arguments),this.state="collapsed",this.condensed=!1,this.disabled=!1,this.selected=!1}static get styles(){return Ml(Gh,":host{height:var(--goto-spacing-11);align-items:center;display:flex}:host .inner{justify-content:space-between;align-items:center;width:100%;display:flex}:host .title{align-items:center;display:flex}:host .title.has-drag .drag{margin-right:var(--goto-spacing-02)}:host .title.has-drag .checkbox{margin-left:var(--goto-spacing-00)}:host .title:not(.has-drag) .checkbox{margin-left:var(--goto-spacing-07)}:host chameleon-svg{--goto-icon-size:24px;margin-right:var(--goto-spacing-06)}:host ::slotted(chameleon-checkbox[slot=checkbox]){font:var(--goto-body-medium-strong)}:host ::slotted(chameleon-svg[slot=drag]){--goto-icon-size:24px;--goto-icon-color:var(--goto-icon-color-secondary)}:host([condensed]){height:var(--goto-spacing-08)}")}get isExpanded(){return"expanded"===this.state}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-expanded",this.isExpanded?"true":"false")}updated(e){super.updated(e),e.has("state")&&this.setAttribute("aria-expanded",this.isExpanded?"true":"false")}handleDragSlotChange(e){0===e.target.assignedElements().length?this.titleEl?.classList.remove("has-drag"):this.titleEl?.classList.add("has-drag")}render(){const e=Oi(u(mr));return Ni`
1132      <div class="inner">
1133        <div class="title">
1134          <div class="drag"><slot name="drag" @slotchange=${this.handleDragSlotChange}></slot></div>
1135          <div class="checkbox"><slot name="checkbox"></slot></div>
1136        </div>
1137        ${"collapsed"===this.state?Ni`<${e}>${'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.29291 9.29291L6.70712 7.87869L12 13.1716L17.2929 7.87869L18.7071 9.29291L12 16L5.29291 9.29291Z" fill="currentColor"></path></svg>'}</${e}>`:""}
1138        ${"expanded"===this.state?Ni`<${e}>${'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M18.7071 14.7071L17.2929 16.1213L12 10.8284L6.70709 16.1213L5.29288 14.7071L12 8L18.7071 14.7071Z" fill="currentColor"></path></svg>'}</${e}>`:""}
1139      </div>
1140    `}}Gh.baseName="data-table-group-row",h([Te({reflect:!0})],Gh.prototype,"state",void 0),h([Te({type:Boolean,reflect:!0})],Gh.prototype,"condensed",void 0),h([Te({type:Boolean,reflect:!0})],Gh.prototype,"disabled",void 0),h([Te({type:Boolean,reflect:!0})],Gh.prototype,"selected",void 0),h([$e(".title")],Gh.prototype,"titleEl",void 0);class Zh extends Zt{constructor(){super(...arguments),this.condensed=!1,this.disabled=!1,this.handleHostClick=e=>{this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())},this.handleClick=()=>{this.disabled||this.dispatchEvent(new CustomEvent("sort",{detail:void 0,bubbles:!0,composed:!0,cancelable:!0}))},this.handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||this.dispatchEvent(new CustomEvent("sort",{detail:void 0,bubbles:!0,composed:!0,cancelable:!0}))}}static get styles(){return Ml(Zh,":host{vertical-align:middle;box-sizing:border-box;background-color:var(--goto-background-color-default);display:table-cell}:host .cell{--goto-icon-size:12px;--goto-icon-color:var(--goto-type-color-secondary);color:var(--goto-type-color-secondary);background-color:var(--goto-background-color-default);appearance:none;width:fit-content;height:var(--goto-spacing-09);align-items:center;gap:var(--goto-spacing-01);border-radius:var(--goto-radius-small);padding:var(--goto-spacing-00)calc(var(--goto-spacing-02) + 8px);border:none;display:inline-flex}:host .cell:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host .cell:active{background-color:var(--goto-interactive-color-secondary-pressed)}:host .cell:focus-visible{outline-offset:1px;outline:1px solid var(--goto-focus-color-highlight-default)}:host(:empty) .cell{display:none}:host([condensed]) .cell{height:var(--goto-spacing-07)}:host(:not([disabled])[sort]) .cell{padding:var(--goto-spacing-00)var(--goto-spacing-02);background-color:var(--goto-surface-color-brand-secondary)}:host(:not([disabled])[sort]) .cell:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host(:not([disabled])[sort]) .cell:active{background-color:var(--goto-interactive-color-secondary-pressed)}:host([disabled]) .cell{--goto-icon-color:var(--goto-icon-color-disabled);color:var(--goto-type-color-disabled);background-color:var(--goto-background-color-default)}")}connectedCallback(){super.connectedCallback(),this.setAttribute("role","columnheader"),this.addEventListener("click",this.handleHostClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick)}render(){const e=Oi(u(mr)),t=Oi(u(Hl));return Ni`
1141      <button class="cell" @keydown=${this.handleKeyDown} @click=${this.handleClick} ?disabled=${this.disabled}>
1142        <${t}
1143          variant="caption-medium-strong"
1144          color=${this.disabled?"type-color-disabled":"type-color-secondary"}
1145        >
1146          <slot></slot>
1147        </${t}>
1148        ${"asc"===this.sort?Ni`<${e}>${'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M20.7071 10.2929L19.2929 11.7071L13 5.41421L13 22H11L11 5.41421L4.70711 11.7071L3.29289 10.2929L12 1.58578L20.7071 10.2929Z" fill="currentColor"></path></svg>'}</${e}>`:""}
1149        ${"desc"===this.sort?Ni`<${e}>${'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.29289 13.7071L4.70711 12.2929L11 18.5858L11 2L13 2L13 18.5858L19.2929 12.2929L20.7071 13.7071L12 22.4142L3.29289 13.7071Z" fill="currentColor"></path></svg>'}</${e}>`:""}
1150      </button>
1151    `}}function Yh(e={}
1151){return Gl(e),vr(e),d(Zh,e)}Zh.baseName="data-table-header-cell",h([Te({reflect:!0})],Zh.prototype,"sort",void 0),h([Te({type:Boolean,reflect:!0})],Zh.prototype,"condensed",void 0),h([Te({type:Boolean,reflect:!0})],Zh.prototype,"disabled",void 0);class Jh extends Zt{static get styles(){return Ml(Jh,":host{vertical-align:middle;font:var(--goto-body-small);padding:var(--goto-spacing-02);display:table-cell}:host .inner{align-items:center;height:100%;display:flex}:host ::slotted(*){margin:var(--goto-spacing-00);color:var(--goto-type-color-default)}:host([condensed]):not([multiline]) .inner{height:var(--goto-spacing-08)}:host([disabled]){--goto-icon-color:var(--goto-icon-color-disabled);color:var(--goto-type-color-disabled)}:host([disabled]) ::slotted(*){color:var(--goto-type-color-disabled)}:host([multiline]) .inner{flex-direction:row;align-items:flex-end;display:flex}:host([multiline]) .content{-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:host([multiline]):host([expanded]) .content{-webkit-line-clamp:unset;line-clamp:unset;display:inline;overflow:visible}:host([multiline]) .toggle-multiline{all:unset;cursor:pointer;color:var(--goto-type-color-brand-default);white-space:nowrap;margin-left:var(--goto-spacing-01)}:host([multiline]) .toggle-multiline.inline{display:inline}:host([multiline]) .toggle-multiline:hover{color:var(--goto-interactive-color-brand-primary-hover);text-decoration:underline}:host([multiline]) .toggle-multiline:active{color:var(--goto-interactive-color-brand-primary-pressed)}:host([multiline]) .toggle-multiline:focus-visible{outline:1px solid var(--goto-focus-color-highlight-default);outline-offset:2px;border-radius:var(--goto-radius-small)}:host([condensed]) .content{-webkit-line-clamp:1;line-clamp:1}:host([disabled]) .content{color:var(--goto-type-color-disabled)}")}get defaultSlot(){const e=this.shadowRoot?.querySelector("slot:not([name])");return e?.assignedNodes({flatten:!0})??[]}get slottedDialog(){const e=this.shadowRoot?.querySelector('slot[name="dialog"]'),t=e?.assignedElements()?.[0];return t}constructor(){super(),this.condensed=!1,this.disabled=!1,this.indented=!1,this.multiline=!1,this.showTruncateAction=!0,this.lineClamp=this.condensed?1:2,this.handleHostClick=e=>{this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())},this.handleToggle=e=>{e.stopPropagation(),this.openInDialog&&this.slottedDialog?this.openSlottedDialog():this.expanded=!this.expanded;const t=this.openInDialog&&this.slottedDialog;this.updateComplete.then(()=>{this.expanded||t?this.expanded&&!t&&this.showLessRef?.focus({preventScroll:!0}):(this.handleShowTruncateAction(this.allTextNodes),this.showMoreRef?.focus({preventScroll:!0}))})},this.handleSlotChange=()=>{this.handleShowTruncateAction(this.allTextNodes)},this.defaultSlotTextMutationCallback=()=>{this.handleShowTruncateAction(this.allTextNodes)},this.defaultSlotTextObserver=new MutationObserver(this.defaultSlotTextMutationCallback)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","cell"),this.addEventListener("click",this.handleHostClick),this.defaultSlotTextObserver.observe(this,{childList:!0,subtree:!0,characterData:!0})}firstUpdated(){this.observeResize(),this.setupDialogCloseHandler()}setupDialogCloseHandler(){this.slottedDialog&&this.openInDialog&&(this.dialogCloseHandler=()=>{this.showMoreRef?.focus({preventScroll:!0})},this.slottedDialog.addEventListener("close",this.dialogCloseHandler))}cleanupDialogCloseHandler(){this.slottedDialog&&this.dialogCloseHandler&&(this.slottedDialog.removeEventListener("close",this.dialogCloseHandler),this.dialogCloseHandler=void 0)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.resizeObserver?.disconnect(),this.defaultSlotTextObserver?.disconnect(),this.cleanupDialogCloseHandler()}get allTextNodes(){return this.defaultSlot.filter(e=>e.textContent?.trim().length)??[this.defaultSlot[0]]}handleShowTruncateAction(e){const t=[],r=document?.createRange();e.forEach(e=>{r.selectNodeContents(e);const n=r?.getClientRects();for(let e=0;e<n.length;
1151e++)-1===t.indexOf(n[e].top)&&t.push(n[e].top)}),this.showTruncateAction=t.length>this.lineClamp}observeResize(){this.resizeObserver?.disconnect();const e=this.shadowRoot?.querySelector(".content");e&&(this.resizeObserver=new ResizeObserver(()=>{this.expanded||this.handleShowTruncateAction(this.allTextNodes)}),this.resizeObserver.observe(e))}openSlottedDialog(){this.slottedDialog?.show?.()}render(){return oe`
1152      <div class="inner">
1153        ${this.multiline?oe`
1154              <div class="content">
1155                <slot @slotchange=${this.handleSlotChange}></slot>
1156                ${this.showTruncateAction&&this.expanded&&!this.disabled?oe`<button class="toggle-multiline inline" aria-expanded="true" @click=${this.handleToggle}>
1157                      ${this.showLess??"Show less"}
1158                    </button>`:""}
1159              </div>
1160              ${!this.showTruncateAction||this.expanded||this.disabled?"":oe`<button class="toggle-multiline" aria-expanded="false" @click=${this.handleToggle}>
1161                    ${this.showMore??"Show more"}
1162                  </button>`}
1163              ${this.openInDialog?oe`<slot name="dialog"></slot>`:""}
1164            `:oe`<slot></slot>`}
1165      </div>
1166    `}}function Qh(e={}){return d(Jh,e)}Jh.baseName="data-table-cell",h([Te({type:Boolean,reflect:!0})],Jh.prototype,"condensed",void 0),h([Te({type:Boolean,reflect:!0})],Jh.prototype,"disabled",void 0),h([Te({type:Boolean,reflect:!0})],Jh.prototype,"indented",void 0),h([Te({type:Boolean,reflect:!0})],Jh.prototype,"multiline",void 0),h([Te({type:Boolean,reflect:!0,attribute:"open-in-dialog"})],Jh.prototype,"openInDialog",void 0),h([Te({reflect:!0,attribute:"show-more"})],Jh.prototype,"showMore",void 0),h([Te({reflect:!0,attribute:"show-less"})],Jh.prototype,"showLess",void 0),h([Te({type:Boolean,reflect:!0})],Jh.prototype,"expanded",void 0),h([Oe()],Jh.prototype,"showTruncateAction",void 0),h([$e("button.toggle-multiline:not(.inline)")],Jh.prototype,"showMoreRef",void 0),h([$e("button.toggle-multiline.inline")],Jh.prototype,"showLessRef",void 0);class Xh extends Zt{constructor(){super(...arguments),this.condensed=!1,this.isValidSizeAttribute=e=>null===e||"small"===e||"medium"===e}static get styles(){return Ml(Xh,":host{width:100%;padding-block:var(--goto-spacing-04);justify-content:space-between;align-items:flex-end;display:flex}:host .left,:host .right{align-items:flex-end;display:flex}:host ::slotted([slot=search]){margin-right:var(--goto-spacing-04)}:host ::slotted([slot=manage-selection]){margin-right:var(--goto-spacing-02)}:host ::slotted([slot=select]){padding-right:var(--goto-spacing-04);border-right:1px solid var(--goto-border-color-default);border-radius:var(--goto-radius-none)}:host ::slotted([slot=actions]){margin-left:var(--goto-spacing-04);align-items:flex-end;gap:var(--goto-spacing-02);display:flex}:host([condensed]){padding-block:var(--goto-spacing-02)}")}get buttonSize(){return this.elementSize}get elementSize(){return this.condensed?"small":"medium"}connectedCallback(){super.connectedCallback();const e=Ji(Yi(this),"size");for(const t of e){const e=t.tagName.toLowerCase().includes("search")?"fieldsize":"size";t.setAttribute(e,this.elementSize)}}updated(e){super.updated(e),e.has("condensed")&&this.condensedChanged()}condensedChanged(){const e=Ji(Yi(this),"size");for(const t of e){const e=t.tagName.toLowerCase().includes("search")?"fieldsize":"size";t.setAttribute(e,this.elementSize)}}render(){return oe`
1167      <div class="left">
1168        <slot name="search"></slot>
1169        <slot name="manage-selection"></slot>
1170        <slot name="selected-button"></slot>
1171      </div>
1172      <div class="right">
1173        <slot name="select"></slot>
1174        <div class="divider"></div>
1175        <slot name="actions"></slot>
1176      </div>
1177    `}}Xh.baseName="data-table-actions",h([Te({type:Boolean,reflect:!0})],Xh.prototype,"condensed",void 0);class ep extends Zt{constructor(){super(...arguments),this.addFiltersText="",this.openFiltersText="",this.condensed=!1,this.filters=[],this.favorite=[],this.clear=[],this.handleFiltersSlotChange=e=>{this.filters=e.target.assignedElements(),this.applySize(this.filters)},this.handleFavoriteSlotChange=e=>{this.favorite=e.target.assignedElements(),this.applySize(this.favorite)}
1177,this.handleClearSlotChange=e=>{this.clear=e.target.assignedElements(),this.applySize(this.clear)},this.handleFilterButtonClick=()=>{this.dispatchEvent(new CustomEvent("filter-button-click",{bubbles:!0,composed:!0,cancelable:!0}))}}static get styles(){return Ml(ep,":host{box-sizing:border-box;min-height:var(--goto-spacing-11);padding-top:var(--goto-spacing-04);padding-bottom:var(--goto-spacing-04);border-top:var(--table-filter-bar-border-top);justify-content:space-between;display:flex}:host .filters{align-items:flex-start;gap:var(--goto-spacing-02);flex-wrap:wrap;display:flex}:host .actions{gap:var(--goto-spacing-02);display:flex}:host ::slotted([slot=favorite]),:host ::slotted([slot=clear]){align-self:flex-start}:host([condensed]){min-height:var(--goto-spacing-08);padding-top:var(--goto-spacing-02);padding-bottom:var(--goto-spacing-02)}")}get showAddButton(){return 0===this.filters.length}get showOpenButton(){return this.filters.length>0}get allSlottedElements(){return[...this.filters,...this.clear,...this.favorite]}connectedCallback(){super.connectedCallback(),this.previousElementSibling?.tagName.toLowerCase().endsWith("-data-table-actions")?this.style.setProperty("--table-filter-bar-border-top","1px solid var(--goto-border-color-default)"):this.style.removeProperty("--table-filter-bar-border-top")}updated(e){super.updated(e),e.has("condensed")&&this.applySize(this.allSlottedElements)}applySize(e){for(const t of e)t.setAttribute("size",this.condensed?"small":"medium")}render(){const e=Oi(u(mr)),t=Oi(u(jl));return Ni`
1178      <div class="filters">
1179        <slot name="filters" @slotchange=${this.handleFiltersSlotChange}></slot>
1180        ${this.showAddButton?Ni`
1181              <${t}
1182                variant="tertiary"
1183                size=${this.condensed?"small":"medium"}
1184                @click=${this.handleFilterButtonClick}
1185              >
1186                <${e} slot="leading-icon">${'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M13 3H11V11H3V13H11V21H13V13H21V11H13V3Z" fill="currentColor"></path></svg>'}</${e}>
1187                ${this.addFiltersText}
1188              </${t}>
1189            `:""}
1190        ${this.showOpenButton?Ni`
1191              <${t}
1192                variant="tertiary"
1193                size=${this.condensed?"small":"medium"}
1194                @click=${this.handleFilterButtonClick}
1195              >
1196                ${this.openFiltersText}
1197              </${t}>
1198            `:""}
1199      </div>
1200      <div class="actions">
1201        <slot name="favorite" @slotchange=${this.handleFavoriteSlotChange}></slot>
1202        <slot name="clear" @slotchange=${this.handleClearSlotChange}></slot>
1203      </div>
1204      <slot name="filter-panel"></slot>
1205    `}}function tp(e={}){return vr(e),ql(e),d(ep,e)}ep.baseName="data-table-filter-bar",h([Te({reflect:!0,attribute:"add-filters-text"})],ep.prototype,"addFiltersText",void 0),h([Te({reflect:!0,attribute:"open-filters-text"})],ep.prototype,"openFiltersText",void 0),h([Te({type:Boolean,reflect:!0})],ep.prototype,"condensed",void 0),h([Oe()],ep.prototype,"filters",void 0),h([Oe()],ep.prototype,"favorite",void 0),h([Oe()],ep.prototype,"clear",void 0);class rp extends Zt{constructor(){super(...arguments),this.counterText="",this.condensed=!1}static get styles(){return Ml(rp,":host{height:var(--goto-spacing-09);justify-content:space-between;align-items:flex-end;display:flex}:host .right{align-items:center;display:flex}:host ::slotted([slot=actions]){align-items:center;gap:var(--goto-spacing-01);display:flex}:host .counter{margin-left:var(--goto-spacing-04);padding-left:var(--goto-spacing-03);margin-right:var(--goto-spacing-04);padding-right:var(--goto-spacing-03);font:var(--goto-caption-medium-strong);color:var(--goto-type-color-secondary)}:host([condensed]){height:var(--goto-spacing-07)}")}connectedCallback(){super.connectedCallback();const e=Ji(Yi(this),"size");for(const t of e)t.setAttribute("size",this.condensed?"small":"medium")}updated(e){if(super.updated(e),e.has("condensed")){const e=Ji(Yi(this),"size");for(const t of e)t.setAttribute("size",this.condensed?"small":"medium")}}render(){return oe`
1206      <div>
1207        <slot name="select"></slot>
1208      </div>
1209      <div class="right">
1210        <div class="counter">${this.counterText?this.counterText:oe`<slot name="counter"></slot>`}</div>
1211        <div class="actions">
1212          <slot name="actions"></slot>
1213        </div>
1214      </div>
1215    `}}function np(e={}){return d(rp,e)}rp.baseName="data-table-pagination",h([Te({reflect:!0,attribute:"counter-text"})],rp.prototype,"counterText",void 0),h([Te({type:Boolean,reflect:!0})],rp.prototype,"condensed",void 0);class op extends Zt{constructor(){super(...arguments),this.condensed=!1}static get styles(){return Ml(op,":host{border-collapse:collapse;outline:1px solid var(--goto-border-color-default);border-radius:var(--goto-radius-small);display:table}")}connectedCallback(){super.connectedCallback(),this.setAttribute("role","table");const e=Ji(Yi(this),"condensed");for(const t of e)t.setAttribute("condensed",this.condensed?"true":"false")}updated(e){if(super.updated(e),e.has("condensed")){const e=Ji(Yi(this),"condensed");for(const t of e)t.setAttribute("condensed",this.condensed?"true":"false")}}render(){return oe`<slot></slot>`}}op.baseName="data-table",h([Te({type:Boolean,reflect:!0})],op.prototype,"condensed",void 0),function(e={}){vr(e),ql(e),Gl(e),jh(e),Wh(e),qh(e),function(e={}){vr(e),d(Gh,e)}(e),Yh(e),Qh(e),function(e={}){d(Xh,e)}(e),tp(e),np(e),d(op,e)}();var ip='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M8 2H6V7H8V2Z" fill="currentColor"></path><path d="M18 2H16V7H18V2Z" fill="currentColor"></path><path d="M16 16H18V18H16V16Z" fill="currentColor"></path><path d="M14 16H12V18H14V16Z" fill="currentColor"></path><path d="M8 18V16H10V18H8Z" fill="currentColor"></path>
1215<path d="M14 12H12V14H14V12Z" fill="currentColor"></path><path d="M16 12H18V14H16V12Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M19 6V4H22V22H2V4H5V6H4V8H20V6H19ZM20 20V10H4V20H20Z" fill="currentColor"></path><path d="M15 4H9V6H15V4Z" fill="currentColor"></path></svg>';let sp=new Map,ap=!1;try{ap="exceptZero"===new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay}catch{}let lp=!1;try{lp="unit"===new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style}catch{}const cp={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class dp{format(e){let t="";if(t=ap||null==this.options.signDisplay?this.numberFormatter.format(e):function(e,t,r){if("auto"===t)return e.format(r);if("never"===t)return e.format(Math.abs(r));{let n=!1;if("always"===t?n=r>0||Object.is(r,0):"exceptZero"===t&&(Object.is(r,-0)||Object.is(r,0)?r=Math.abs(r):n=r>0),n){let t=e.format(-r),n=e.format(r),o=t.replace(n,"").replace(/\u200e|\u061C/,"");return 1!==[...o].length&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),t.replace(n,"!!!").replace(o,"+").replace("!!!",n)}return e.format(r)}}(this.numberFormatter,this.options.signDisplay,e),"unit"===this.options.style&&!lp){var r;let{unit:e,unitDisplay:n="short",locale:o}=this.resolvedOptions();if(!e)return t;let i=null===(r=cp[e])||void 0===r?void 0:r[n];t+=i[o]||i.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if("function"==typeof this.numberFormatter.formatRange)return this.numberFormatter.formatRange(e,t);if(t<e)throw new RangeError("End date must be >= start date");return`${this.format(e)} – ${this.format(t)}`}formatRangeToParts(e,t){if("function"==typeof this.numberFormatter.formatRangeToParts)return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(e),n=this.numberFormatter.formatToParts(t);return[...r.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return ap||null==this.options.signDisplay||(e={...e,signDisplay:this.options.signDisplay}),lp||"unit"!==this.options.style||(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=function(e,t={}){let{numberingSystem:r}=t;if(r&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${r}`),"unit"===t.style&&!lp){var n;let{unit:e,unitDisplay:r="short"}=t;if(!e)throw new Error('unit option must be provided with style: "unit"');if(!(null===(n=cp[e])||void 0===n?void 0:n[r]))throw new Error(`Unsupported unit ${e} with unitDisplay = ${r}`);t={...t,style:"decimal"}}let o=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(sp.has(o))return sp.get(o);let i=new Intl.NumberFormat(e,t);return sp.set(o,i),i}(e,t),this.options=t}}const up=new RegExp("^.*\\(.*\\).*$"),hp=["latn","arab","hanidec","deva","beng","fullwide"];class pp{parse(e){return fp(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,r){return fp(this.locale,this.options,e).isValidPartialNumber(e,t,r)}getNumberingSystem(e){return fp(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}}const gp=new Map;function fp(e,t,r){let n=mp(e,t);if(!e.includes("-nu-")&&!n.isValidPartialNumber(r))for(let o of hp)if(o!==n.options.numberingSystem){let n=mp(e+(e.includes("-u-")?"-nu-":"-u-nu-")+o,t);if(n.isValidPartialNumber(r))return n}return n}function mp(e,t){let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():""),n=gp.get(r);return n||(n=new vp(e,t),gp.set(r,n)),n}class vp{parse(e){let t=this.sanitize(e);if(this.symbols.group&&(t=wp(t,this.symbols.group,"")),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(t=t.replace(this.symbols.minusSign,"-")),t=t.replace(this.symbols.numeral,this.symbols.index),"percent"===this.options.style){let e=t.indexOf("-");t=t.replace("-",""),t=t.replace("+","");let r=t.indexOf(".");-1===r&&(r=t.length),t=t.replace(".",""),t=r-2==0?`0.${t}`:r-2==-1?`0.0${t}`:r-2==-2?"0.00":`${t.slice(0,r-2)}.${t.slice(r-2)}`,e>-1&&(t=`-${t}`)}let r=t?+t:NaN;if(isNaN(r))return NaN;if("percent"===this.options.style){var n,o;let e={...this.options,style:"decimal",minimumFractionDigits:Math.min((null!==(n=this.options.minimumFractionDigits)&&void 0!==n?n:0)+2,20),maximumFractionDigits:Math.min((null!==(o=this.options.maximumFractionDigits)&&void 0!==o?o:0)+2,20)};return new pp(this.locale,e).parse(new dp(this.locale,e).format(r))}return"accounting"===this.options.currencySign&&up.test(e)&&(r*=-1),r}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),"arab"===this.options.numberingSystem&&(this.symbols.decimal&&(e=(e=e.replace(",",this.symbols.decimal)).replace(String.fromCharCode(1548),this.symbols.decimal)),this.symbols.group&&(e=wp(e,".",this.symbols.group))),"’"===this.symbols.group&&e.includes("'")&&(e=wp(e,"'",this.symbols.group)),"fr-FR"===this.options.locale&&this.symbols.group&&(e=wp(e," ",this.symbols.group),e=wp(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,t=-1/0,r=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&r>0&&(e=e.slice(this.symbols.plusSign.length)),!(this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&0===this.options.maximumFractionDigits||(this.symbols.group&&(e=wp(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),0!==e.length))}constructor(e,t={}){var r,n;this.locale=e,1!==t.roundingIncrement&&null!=t.roundingIncrement&&(null==t.maximumFractionDigits&&null==t.minimumFractionDigits?(t.maximumFractionDigits=0,t.minimumFractionDigits=0):null==t.maximumFractionDigits?t.maximumFractionDigits=t.minimumFractionDigits:null==t.minimumFractionDigits&&(t.minimumFractionDigits=t.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=function(e,t,r,n){var o,i,s,a;let l=new Intl.NumberFormat(e,{...r,minimumSignificantDigits:1,maximumSignificantDigits:21,roun
1215dingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),c=l.formatToParts(-10000.111),d=l.formatToParts(10000.111),u=yp.map(e=>l.formatToParts(e));var h;let p=null!==(h=null===(o=c.find(e=>"minusSign"===e.type))||void 0===o?void 0:o.value)&&void 0!==h?h:"-",g=null===(i=d.find(e=>"plusSign"===e.type))||void 0===i?void 0:i.value;g||"exceptZero"!==(null==n?void 0:n.signDisplay)&&"always"!==(null==n?void 0:n.signDisplay)||(g="+");let f=null===(s=new Intl.NumberFormat(e,{...r,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(e=>"decimal"===e.type))||void 0===s?void 0:s.value,m=null===(a=c.find(e=>"group"===e.type))||void 0===a?void 0:a.value,v=c.filter(e=>!bp.has(e.type)).map(e=>xp(e.value)),b=u.flatMap(e=>e.filter(e=>!bp.has(e.type)).map(e=>xp(e.value))),y=[...new Set([...v,...b])].sort((e,t)=>t.length-e.length),w=0===y.length?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${y.join("|")}|[\\p{White_Space}]`,"gu"),x=[...new Intl.NumberFormat(r.locale,{useGrouping:!1}).format(9876543210)].reverse(),_=new Map(x.map((e,t)=>[e,t]));return{minusSign:p,plusSign:g,decimal:f,group:m,literals:w,numeral:new RegExp(`[${x.join("")}]`,"g"),index:e=>String(_.get(e))}}(e,this.formatter,this.options,t),"percent"===this.options.style&&((null!==(r=this.options.minimumFractionDigits)&&void 0!==r?r:0)>18||(null!==(n=this.options.maximumFractionDigits)&&void 0!==n?n:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const bp=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),yp=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function wp(e,t,r){return e.replaceAll?e.replaceAll(t,r):e.split(t).join(r)}function xp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const _p=["year","month","day"];function kp(e){return _p.includes(e)}class Cp extends(s(Jn)){constructor(){super(),this.timezone=Td(),this.value="",this.defaultValue="",this.disabled=!1,this.placeholder="MM-DD-YYYY",this.locale=navigator.language,this.skipSegmentReset=!1,this.dateFormatLabel="",this.dateParts=[],this.placeholderDate=Cd(this.timezone),this.validationInput=document.createElement("input"),this.internals=this.attachInternals()}checkValidity(){return this.internals.checkValidity()}reportValidity(){this.internals.reportValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}localeChanged(){this.isConnected&&this.isLocaleValid(this.locale)&&(this.dateParts=this.calculateDateSegments())}timezoneChanged(){this.isConnected&&this.isTimezoneValid(this.timezone)&&(this.dateParts=this.calculateDateSegments())}labelChanged(){this.internals.ariaLabel=this.label??null}valueChanged(e,t){if(!this.isConnected||!this.internals)return;let r;if(t)try{r=Gc(t)}catch(e){console.warn(e)}else this.skipSegmentReset||(this.dateParts=this.dateParts.map(e=>({...e,isPlaceholder:!0,enteredKeys:"",value:0}))),this.skipSegmentReset=!1;if(this.hasAttribute("required")&&!this.value){this.validationInput.setAttribute("required","true");const e=this.validationInput.validationMessage;this.internals.setValidity({valueMissing:!0},e,this)}else this.hasAttribute("required")&&(this.internals.setValidity({}),this.validationInput.removeAttribute("required"),this.validationInput.value="");if(this.internals.setFormValue(this.value),r){const e=r;this.dateParts=this.dateParts.map(t=>"literal"===t.type?t:this.createSegment(t,e,!1))}const n=""!==this.value?r?.toDate(this.timezone):"";this.$emit("change",{date:n}),this.validateMinAndMax(r)}spinButtonKeyDown(e,t){if(this.disabled)return"Tab"===t.key;const r=new pp(this.locale,{maximumFractionDigits:0});switch(!0){case"ArrowUp"===t.key:e.isPlaceholder?this.revealSegment(e):this.increment(e);break;case"ArrowDown"===t.key:e.isPlaceholder?this.revealSegment(e):this.decrement(e);break;case"Backspace"===t.key:this.handleBackSpace(e);break;case" "===t.key:return!1;case r.isValidPartialNumber(t.key,e.minValue,e.maxValue):this.updateSegment(e,t.key);break;case"Tab"===t.key:return!0}}handleSpinButtonFocus(e){e.enteredKeys=""}
1215handleBackSpace(e){if(e.isPlaceholder)return;e.enteredKeys="";const t=this.dateParts.indexOf(e);if(t>=0){const r={...e,isPlaceholder:!0,text:e.placeholder||e.text};this.dateParts.splice(t,1,r)}if(!this.isDateValid(this.dateParts)){const e=this.value?Gc(this.value):this.placeholderDate;this.dateParts.forEach(t=>{!t.isPlaceholder&&kp(t.type)&&(this.placeholderDate=e.set({[t.type]:t.value}))}),this.skipSegmentReset=!0,this.value=""}}createSegment(e,t,r=!1){return{...e,isPlaceholder:r,value:t[e.type],text:this.getTextForPart(e.type,t),...this.getSegmentLimits(t,e.type)}}clearSegment(e){this.placeholderDate=Cd(this.timezone);const t=this.createSegment(e,this.placeholderDate,!0);this.setSegment(e,t,this.placeholderDate)}updateSegment(e,t){const r=new pp(this.locale,{maximumFractionDigits:0}),n=e.enteredKeys+t,o=r.parse(n);let i;i=o<=e.maxValue&&o>=e.minValue?o:r.parse(t);const s=String(e.maxValue).length,a=n.length<s;if(0===i&&0!==e.minValue&&!a)return;let l;if(this.value){const t=Gc(this.value).set({[e.type]:i});l=this.createSegment(e,t),n.length>=String(e.maxValue).length||Number(`${o}0`)>e.maxValue?(l.enteredKeys="",Tr.queueUpdate(()=>{this.focusNextSegment(l)})):l.enteredKeys=n,this.setSegment(e,l,t)}else this.placeholderDate=this.placeholderDate.set({[e.type]:i}),l=this.createSegment(e,this.placeholderDate),n.length>=String(e.maxValue).length||Number(`${o}0`)>e.maxValue?(l.enteredKeys="",Tr.queueUpdate(()=>{this.focusNextSegment(l)})):l.enteredKeys=n,this.setSegment(e,l,this.placeholderDate)}focusNextSegment(e){const t=this.dateParts.findIndex(t=>t.type===e.type),r=this.dateParts.find((e,r)=>r>t&&"literal"!==e.type);if(!r)return;const n=this.shadowRoot?.querySelector(`#${r.type}`);n?.focus()}setSegment(e,t,r){let n=this.dateParts.indexOf(e);n<0&&(n=this.dateParts.findIndex(t=>t.type===e.type)),this.dateParts.splice(n,1,t),this.dateParts=this.dateParts.map(e=>{if("literal"===e.type)return e;const t=this.getSegmentLimits(r,e.type);return e.value>t.maxValue?{...e,...t,value:t.maxValue,text:this.getTextForPart(e.type,r)}:e.value<t.minValue?{...e,...t,value:t.minValue,text:this.getTextForPart(e.type,r)}:{...e,...t}}),this.isDateValid(this.dateParts)?this.value=r.toString():this.placeholderDate=r}isDateValid(e){for(const t of e)if("literal"!==t.type&&t.isPlaceholder)return!1;return!0}revealSegment(e){const t=this.dateParts.findIndex(t=>t.type===e.type),r=this.createSegment(e,this.placeholderDate);this.dateParts.splice(t,1,r),this.isDateValid(this.dateParts)&&(this.value=this.placeholderDate.toString())}increment(e){if(e.enteredKeys="",kp(e.type))if(this.value){const t=Gc(this.value).cycle(e.type,1),r=this.createSegment(e,t);this.setSegment(e,r,t)}else{this.placeholderDate=this.placeholderDate.cycle(e.type,1);const t=this.createSegment(e,this.placeholderDate);this.setSegment(e,t,this.placeholderDate)}}
1215decrement(e){if(e.enteredKeys="",kp(e.type))if(this.value){const t=Gc(this.value).cycle(e.type,-1),r=this.createSegment(e,t);this.setSegment(e,r,t)}else{const t=this.placeholderDate.cycle(e.type,-1),r=this.createSegment(e,t);this.setSegment(e,r,t)}}connectedCallback(){if(super.connectedCallback(),(this.isLocaleValid(this.locale)||this.isTimezoneValid(this.locale))&&(this.dateParts=this.calculateDateSegments(),this.defaultValue?this.value=this.defaultValue:this.internals.setFormValue(""),this.hasAttribute("required")&&!this.value)){this.validationInput.setAttribute("required","true");const e=this.validationInput.validationMessage;this.internals.setValidity({valueMissing:!0},e,this)}}get localizedParts(){return new Intl.DateTimeFormat(this.locale,{day:"2-digit",month:"2-digit",year:"numeric",timeZone:this.timezone}).formatToParts(Cd(this.timezone).toDate(this.timezone))}calculateDateSegments(){const e=new Intl.DateTimeFormat(this.locale,{day:"2-digit",month:"2-digit",year:"numeric",timeZone:this.timezone}).formatToParts(Cd(this.timezone).toDate(this.timezone)),t=this.value?Gc(this.value):this.defaultValue?Gc(this.defaultValue):null;this.placeholderDate=Cd(this.timezone);const r=t||this.placeholderDate;return e.map(e=>({enteredKeys:"",type:e.type,isPlaceholder:!t,placeholder:"literal"===e.type?void 0:this.getPlaceholderForPart(e),isEditable:"literal"!==e.type,text:r&&"literal"!==e.type?this.getTextForPart(e.type,r):e.value,value:"literal"!==e.type?r[e.type]:e.value,...this.getSegmentLimits(r,e.type)}))}getSegmentLimits(e,t){switch(t){case"year":return{minValue:1,maxValue:e.calendar.getYearsInEra(e)};case"month":return{minValue:Nd(e),maxValue:e.calendar.getMonthsInYear(e)};case"day":return{minValue:Rd(e),maxValue:e.calendar.getDaysInMonth(e)}}}getPlaceholderForPart(e){const t=new Intl.DisplayNames(this.locale,{type:"dateTimeField"});return t.of(e.type)?.slice(0,1).toUpperCase().repeat(e.value.length)}getTextForPart(e,t){return new Intl.DateTimeFormat(this.locale,{year:"numeric",month:"2-digit",day:"2-digit",timeZone:this.timezone}).formatToParts(t.toDate(this.timezone)).filter(t=>t.type===e).map(e=>e.value).join("")}isLocaleValid(e){try{return Intl.getCanonicalLocales(e),!0}catch{return!1}}isTimezoneValid(e){try{return Intl.DateTimeFormat(void 0,{timeZone:e}),!0}catch{return!1}}validateMinAndMax(e){if(!this.value)return;if(!e)return;const t=e,r=!!this.min&&Gc(this.min).compare(t)>0,n=!!this.max&&Gc(this.max).compare(t)<0;if(r&&this.min){this.validationInput.setAttribute("type","date"),this.validationInput.setAttribute("min",this.min),this.validationInput.value=this.value;const e=this.validationInput.validationMessage;this.internals.setValidity({rangeUnderflow:!0},e,this)}if(n){this.validationInput.setAttribute("type","number"),this.validationInput.setAttribute("max","10"),this.validationInput.value="11";const e=this.validationInput.validationMessage;this.internals.setValidity({rangeOverflow:!0},e,this)}this.validationInput.removeAttribute("min"),this.validationInput.removeAttribute("max")}}Cp.formAssociated=!0,h([Qr({attribute:"label"})],Cp.prototype,"label",void 0),h([Qr],Cp.prototype,"fieldsize",void 0),h([Qr],Cp.prototype,"timezone",void 0),h([Qr],Cp.prototype,"value",void 0),h([Qr({attribute:"default-value"})],Cp.prototype,"defaultValue",void 0),h([Qr({mode:"boolean"})],Cp.prototype,"disabled",void 0),h([Qr],Cp.prototype,"placeholder",void 0),h([Qr],Cp.prototype,"locale",void 0),h([Qr],Cp.prototype,"min",void 0),h([Qr],Cp.prototype,"max",void 0),h([Qr({attribute:"date-format-label"})],Cp.prototype,"dateFormatLabel",void 0),h([Nr],Cp.prototype,"dateParts",void 0);class Sp extends(s(Jn)){constructor(){super(),this.timezone=Td(),this.value="",this.defaultValue="",this.disabled=!1,this.error=!1,this.placeholder="MM-DD-YYYY",this.position="bottom-start",this.locale=navigator.language,this.calendarToggleLabel="",this.dateFormatLabel="",this.validationInput=document.createElement("input"),this.internals=this.attachInternals()}reportValidity(){return this.internals.reportValidity()}get validationMessage(){return this.internals.validationMessage}valueChanged(e,t){if(this.isConnected&&this.internals){this.internals.setFormValue(t);const e=this.hasAttribute("required");this.validationInput.toggleAttribute("required",e);const r=this.validationInput.validationMessage;this.internals.setValidity({customError:e&&!t},r,this.field)}}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}willValidate(){return this.internals.willValidate}inputLabelChanged(){this.internals.ariaLabel=this.inputLabel??null}connectedCallback(){if(super.connectedCallback(),(this.isLocaleValid(this.locale)||this.isTimezoneValid(this.locale))&&(this.defaultValue?this.value=this.defaultValue:this.internals.setFormValue(""),this.hasAttribute("required"))){this.validationInput.toggleAttribute("required",!0);const e=this.validationInput.validationMessage;this.internals.setValidity({valueMissing:!0},e,this.field)}}handleCalendarChange(e){const t=e.detail.customDate;this.value=t.toString(),Tr.queueUpdate(()=>{this.popoverElement.close()})}calculatePopoverOffset(){if(!this.popoverElement.isOpen)return;const e=(this.popoverElement?.dataset.renderedPosition??this.position).includes("bottom"),t=this.helperText&&this.helperText.length>0,r=this.inputLabel&&this.inputLabel.length>0;e&&t&&(this.popoverOffset="-27px"),e&&!t&&(this.popoverOffset="-8px"),!e&&r&&(this.popoverOffset="25px"),e||r||(this.popoverOffset="3px")}isLocaleValid(e){try{return Intl.getCanonicalLocales(e),!0}catch(e){return!1}}isTimezoneValid(e){try{return Intl.DateTimeFormat(void 0,{timeZone:e}),!0}catch(e){return!1}}validateAccessibleLabels(){this.validateInputLabel(),this.validateCalendarToggleLabel(),this.validateDateFormatLabel()}validateInputLabel(){this.inputLabel&&0!==this.inputLabel.length||console.error("CHAMELEON-A11Y: DatePicker component must have an accessible input label provided by a non-empty inputLabel/input-label attribute.")}validateCalendarToggleLabel(){this.calendarToggleLabel&&0!==this.calendarToggleLabel.length||console.error("CHAMELEON-A11Y: DatePicker component must have an accessible calendar toggle button label provided by a non-empty calendarToggleLabel/calendar-toggle-label attribute.")}validateDateFormatLabel(){this.dateFormatLabel&&0!==this.dateFormatLabel.length||console.warn("CHAMELEON-A11Y: DatePicker component should have a date format description provided by the dateFormatLabel/date-format-label attribute to help users understand the expected date format.")}getInitialFocusTarget(){const e=this.calendar?.shadowRoot?.querySelector('span[role="button"][tabindex="0"]');return e||void 0}}Sp.formAssociated=!0,h([Qr({attribute:"input-label"}
1215)],Sp.prototype,"inputLabel",void 0),h([Qr({attribute:"helper-text"})],Sp.prototype,"helperText",void 0),h([Qr],Sp.prototype,"fieldsize",void 0),h([Qr],Sp.prototype,"timezone",void 0),h([Qr],Sp.prototype,"value",void 0),h([Qr({attribute:"default-value"})],Sp.prototype,"defaultValue",void 0),h([Qr],Sp.prototype,"disabled",void 0),h([Qr({mode:"boolean"})],Sp.prototype,"error",void 0),h([Qr],Sp.prototype,"placeholder",void 0),h([Qr],Sp.prototype,"position",void 0),h([Qr],Sp.prototype,"locale",void 0),h([Qr],Sp.prototype,"min",void 0),h([Qr],Sp.prototype,"max",void 0),h([Nr],Sp.prototype,"disabledDates",void 0),h([Qr({attribute:"calendar-toggle-label"})],Sp.prototype,"calendarToggleLabel",void 0),h([Qr({attribute:"date-format-label"})],Sp.prototype,"dateFormatLabel",void 0),h([Nr],Sp.prototype,"field",void 0),h([Nr],Sp.prototype,"popoverElement",void 0),h([Nr],Sp.prototype,"calendar",void 0),h([Nr],Sp.prototype,"popoverOffset",void 0);const Ep=Sp.compose({baseName:"date-picker",template:(e,t)=>{const r=u(Hl),n=u(Wi),o=u(mr),i=u(ll),s=u(iu),a=u(Cp);return ri`<template>
1216    ${Aa(e=>e.inputLabel,ri`<${r} class="input-label" variant="caption-medium-strong" color="type-color-default">
1217      ${e=>e.inputLabel}
1218    </${r}>`)}
1219    <div tabindex="-1" ${li("field")} class="input-container">
1220      <slot name="start"></slot>
1221      <div class="control">
1222        <${a} ${li("dateInput")} label=${e=>e.inputLabel} timezone=${e=>e.timezone} value=${e=>e.value} default-value=${e=>e.defaultValue} ?disabled=${e=>e.disabled} placeholder=${e=>e.placeholder} locale=${e=>e.locale} min=${e=>e.min} max=${e=>e.max} date-format-label=${e=>e.dateFormatLabel}
1223        @change=${(e,t)=>{e.value=t.event.target.value}}></${a}>
1224      </div>
1225      <slot name="end"></slot>
1226      <${n}
1227        variant="${"primary"}"
1228        size="${e=>e.fieldsize}"
1229        label="${e=>e.calendarToggleLabel}"
1230        id="trigger"
1231        slot="end"
1232        disabled="${e=>e.disabled}"
1233      >
1234        <${o}>${ip}</${o}>
1235      </${n}>
1236    </div>
1237    <${i}
1238      trigger-id="trigger"
1239      slot="end"
1240      :position="${e=>e.position}"
1241      ${li("popoverElement")}
1242      :anchorElement=${e=>e.field}
1243      :initialFocus=${e=>()=>e.getInitialFocusTarget()}
1244      @popoverchange=${e=>e.calculatePopoverOffset()}
1245      @position-changed=${e=>e.calculatePopoverOffset()}
1246      compact
1247    >
1248      <div role="rowgroup">
1249        <${s}
1250          ${li("calendar")}
1251          locale="${e=>e.locale}"
1252          timezone="${e=>e.timezone}"
1253          error="${e=>e.error}"
1254          min="${e=>e.min}"
1255          max="${e=>e.max}"
1256          :disabledDates="${e=>e.disabledDates}"
1257          value=${e=>e.value}
1258          @ch-calendar-change="${(e,t)=>e.handleCalendarChange(t.event)}"
1259        >        <slot slot="header" name="header"></slot></${s}>
1260      </div>
1261    </${i}>
1262    ${Aa(e=>e.helperText,ri`<${r} 
1263      id="text" 
1264      class="helpertext" 
1265      variant="caption-medium" 
1266      color="${e=>e.error?"type-color-danger":"type-color-secondary"}">
1267      ${e=>e.helperText}
1268      </${r}>`)}
1269  </template>`},styles:Ci(":host{width:100%;min-width:fit-content;height:fit-content}:host .control{width:100%}:host .input-label{margin-bottom:var(--goto-spacing-01)}:host .input-container{font:var(--goto-body-medium);height:var(--goto-spacing-07);box-sizing:border-box;padding:var(--goto-spacing-00)var(--goto-spacing-03);border-radius:var(--goto-radius-small);border:1px solid var(--goto-border-color-default);justify-content:space-between;align-items:center;gap:4px;display:flex}:host .input-container>div{color:var(--goto-type-color-default);justify-content:center;align-items:center;display:flex}:host .input-container [role=spinbutton]{caret-color:#0000}:host .input-container [role=spinbutton]:focus{background:var(--goto-interactive-color-brand-hover);color:#fff;border-radius:var(--goto-radius-small);outline:none}:host .helpertext{margin-top:var(--goto-spacing-01);cursor:text}:host([success]) #text .helpertext{color:var(--goto-surface-color-success-default)}:host([error]) .input-container{border-color:var(--goto-border-color-danger)}:host([error]) .helpertext{color:var(--goto-surface-color-danger-default)}:host([fieldsize=small]) .input-container{height:var(--goto-spacing-06);font:var(--goto-button-small);gap:calc(var(--goto-spacing-02)/2)}:host([fieldsize=large]) .input-container{height:var(--goto-spacing-08);font:var(--goto-button-large);--goto-icon-size:var(--goto-spacing-05)}
1269:host([fieldsize=xlarge]) .input-container{height:var(--goto-spacing-09);font:var(--goto-button-xlarge);--goto-icon-size:var(--goto-spacing-06)}:host(:focus-within) .input-container{outline-offset:2px;outline:1px solid var(--goto-focus-color-highlight-default)}:host(:focus-visible){outline:none}"),shadowOptions:{delegatesFocus:!0}});function Ip(e,t,r){return e.nodeType!==Node.TEXT_NODE||"string"==typeof e.nodeValue&&!!e.nodeValue.trim().length}const Ap=(e,t)=>ri`
1270    <template
1271        class="
1272            ${e=>e.readOnly?"readonly":""}
1273        "
1274    >
1275        <label
1276            part="label"
1277            for="control"
1278            class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label__hidden"}"
1279        >
1280            <slot
1281                ${si({property:"defaultSlottedNodes",filter:Ip})}
1282            ></slot>
1283        </label>
1284        <div class="root" part="root">
1285            ${nc(0,t)}
1286            <input
1287                class="control"
1288                part="control"
1289                id="control"
1290                @input="${e=>e.handleTextInput()}"
1291                @change="${e=>e.handleChange()}"
1292                ?autofocus="${e=>e.autofocus}"
1293                ?disabled="${e=>e.disabled}"
1294                list="${e=>e.list}"
1295                maxlength="${e=>e.maxlength}"
1296                minlength="${e=>e.minlength}"
1297                pattern="${e=>e.pattern}"
1298                placeholder="${e=>e.placeholder}"
1299                ?readonly="${e=>e.readOnly}"
1300                ?required="${e=>e.required}"
1301                size="${e=>e.size}"
1302                ?spellcheck="${e=>e.spellcheck}"
1303                :value="${e=>e.value}"
1304                type="${e=>e.type}"
1305                aria-atomic="${e=>e.ariaAtomic}"
1306                aria-busy="${e=>e.ariaBusy}"
1307                aria-controls="${e=>e.ariaControls}"
1308                aria-current="${e=>e.ariaCurrent}"
1309                aria-describedby="${e=>e.ariaDescribedby}"
1310                aria-details="${e=>e.ariaDetails}"
1311                aria-disabled="${e=>e.ariaDisabled}"
1312                aria-errormessage="${e=>e.ariaErrormessage}"
1313                aria-flowto="${e=>e.ariaFlowto}"
1314                aria-haspopup="${e=>e.ariaHaspopup}"
1315                aria-hidden="${e=>e.ariaHidden}"
1316                aria-invalid="${e=>e.ariaInvalid}"
1317                aria-keyshortcuts="${e=>e.ariaKeyshortcuts}"
1318                aria-label="${e=>e.ariaLabel}"
1319                aria-labelledby="${e=>e.ariaLabelledby}"
1320                aria-live="${e=>e.ariaLive}"
1321                aria-owns="${e=>e.ariaOwns}"
1322                aria-relevant="${e=>e.ariaRelevant}"
1323                aria-roledescription="${e=>e.ariaRoledescription}"
1324                ${li("control")}
1325            />
1326            ${rc(0,t)}
1327        </div>
1328    </template>
1329`;class Tp extends Jn{}class Op extends(Iu(Tp)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class Lp extends Op{constructor(){super(...arguments),this.type="text"}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}autofocusChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autofocus=this.autofocus,this.validate())}placeholderChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.placeholder=this.placeholder)}typeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.t
1329ype,this.validate())}listChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.setAttribute("list",this.list),this.validate())}maxlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.maxLength=this.maxlength,this.validate())}minlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.minLength=this.minlength,this.validate())}patternChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.pattern=this.pattern,this.validate())}sizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.size=this.size)}spellcheckChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.spellcheck=this.spellcheck)}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.validate(),this.autofocus&&Tr.queueUpdate(()=>{this.focus()})}select(){this.control.select(),this.$emit("select")}handleTextInput(){this.value=this.control.value}handleChange(){this.$emit("change")}validate(){super.validate(this.control)}}nn([Qr({attribute:"readonly",mode:"boolean"})],Lp.prototype,"readOnly",void 0),nn([Qr({mode:"boolean"})],Lp.prototype,"autofocus",void 0),nn([Qr],Lp.prototype,"placeholder",void 0),nn([Qr],Lp.prototype,"type",void 0),nn([Qr],Lp.prototype,"list",void 0),nn([Qr({converter:Yr})],Lp.prototype,"maxlength",void 0),nn([Qr({converter:Yr})],Lp.prototype,"minlength",void 0),nn([Qr],Lp.prototype,"pattern",void 0),nn([Qr({converter:Yr})],Lp.prototype,"size",void 0),nn([Qr({mode:"boolean"})],Lp.prototype,"spellcheck",void 0),nn([Nr],Lp.prototype,"defaultSlottedNodes",void 0);class $p{}oc($p,_u),oc(Lp,tc,$p);class Np{constructor(e,t){this.callback=0===t?yh(e,t):wh(e,t),this.mutationObserver=new MutationObserver(this.callback)}subscribe(e,t){this.mutationObserver.observe(e,t)}unsubscribe(){this.callback.cancel(),this.mutationObserver.disconnect()}}class Rp extends(s(Lp)){constructor(){super(...arguments),this.fieldsize="medium",this.success=!1,this.error=!1,this.fullwidth=!1,this.optional=!1,this.disableBrowserDefaults=!1,this.infoContainer=document.createElement("div"),this.helperTextEl=document.createElement("slot"),this.observedLabelElement=null,this.handleDisabledKeydown=e=>{this.hasAttribute("disabled")&&"Tab"!==e.key&&e.preventDefault()},this.handleRootClick=e=>{e.defaultPrevented||this.control.focus()},this.handleHelperTextSlotChange=()=>{const e=this.helperTextEl.assignedElements()[0];e?.textContent&&this.querySelector('[slot="helpertext"]')&&this.control.setAttribute("aria-describedby",this.querySelector('[slot="helpertext"]').id)}}errorChanged(e,t){this.ariaInvalid=t?"true":null}labelIdChanged(e,t){this.applyReferencedLabelAsAriaLabel()}autocompleteChanged(e,t){t?this.control?.setAttribute("autocomplete",t):this.control?.removeAttribute("autocomplete")}connectedCallback(){super.connectedCallback(),this.shadowRoot?.querySelector(".root")?.addEventListener("click",this.handleRootClick),this.control?.addEventListener("keydown",this.handleDisabledKeydown),this.infoContainer.classList.add("info"),this.shadowRoot?.appendChild(this.infoContainer),this.addHelperText(),this.setAccessibleLabel(),this.applyReferencedLabelAsAriaLabel()}disconnectedCallback(){super.disconnectedCallback(),this.shadowRoot?.querySelector(".root")?.removeEventListener("click",this.handleRootClick),this.control?.removeEventListener("keydown",this.handleDisabledKeydown),this.helperTextEl.removeEventListener("slotchange",this.handleHelperTextSlotChange),this.labelMutationSubscription?.unsubscribe(),this.labelMutationSubscription=void 0,this.observedLabelElement=null}attributeChangedCallback(e,t,r){super.attributeChangedCallback(e,t,r),"readonly"===e&&this.hasAttribute("readonly")?this.setAttribute("aria-readonly","true"):"readonly"!==e||this.hasAttribute("readonly")||this.removeAttribute("aria-readonly"),this.addAllRelevantAttributes(),"disabled"!==e||this.hasAttribute("disabled")||requestAnimationFrame(()=>{this.control?.removeAttribute("readonly")}),this.hasAttribute("disabled")&&requestAnimationFrame(()=>{this.control?.removeAttribute("disabled")}),this.control?.setAttribute("aria-disabled",`${this.hasAttribute("disabled")}`),this.hasAttribute("disabled")&&this.control?.setAttribute("readonly",`${this.hasAttribute("disabled")}`)}
1329applyReferencedLabelAsAriaLabel(){if(!this.control)return;const e=()=>{this.observedLabelElement&&(this.labelMutationSubscription?.unsubscribe(),this.labelMutationSubscription=void 0,this.observedLabelElement=null,this.control.removeAttribute("aria-label"))},t=this.labelId??this.getAttribute("aria-labelledby")??void 0;if(!t)return void e();const r=this.getRootNode(),n=(r instanceof Document||r instanceof ShadowRoot?r.getElementById(t):null)??document.getElementById(t);if(!n)return void e();this.observedLabelElement!==n&&(this.labelMutationSubscription?.unsubscribe(),this.observedLabelElement=n,this.labelMutationSubscription=new Np(()=>this.applyReferencedLabelAsAriaLabel(),0),this.labelMutationSubscription.subscribe(n,{characterData:!0,childList:!0,subtree:!0})),queueMicrotask(()=>{this.control?.removeAttribute("aria-labelledby")});const o=n.textContent?.trim();o?this.control.setAttribute("aria-label",o):this.control.removeAttribute("aria-label")}addAllRelevantAttributes(){this.getAttributeNames().forEach(e=>{Object.keys(HTMLInputElement.prototype).includes(e)&&(this.control?.setAttribute(e,this.getAttribute(e)),"disabled"===e&&(this.control?.removeAttribute("disabled"),this.control?.setAttribute("aria-disabled",`${this.hasAttribute("disabled")}`),this.control?.setAttribute("readonly",`${this.hasAttribute("disabled")}`)))}),this.optional||this.textContent?.includes("(optional)")?this.control?.removeAttribute("aria-required"):this.control?.setAttribute("aria-required","true")}addHelperText(){this.helperTextEl.setAttribute("name","helpertext"),this.querySelector('[slot="helpertext"]')&&this.querySelector('[slot="helpertext"]')?.setAttribute("id",xa("helpertext-")),this.helperTextEl.addEventListener("slotchange",this.handleHelperTextSlotChange);const e=this.shadowRoot?.querySelector('[name="helpertext"]');e||this.infoContainer?.prepend(this.helperTextEl)}setAccessibleLabel(){this.textContent?.trim()&&this.helperTextEl.assignedElements()[0]?.textContent!==this.textContent?.trim()||this.labelId}validateAccessibleLabel(){this.labelId||this.getAttribute("aria-labelledby")?.length||console.error("CHAMELEON-A11Y: InputField component must have an accessible label provided by either \n  1) text content \n  2) a visible label whose id is given as the attribute labelId\n")}}h([Qr],Rp.prototype,"fieldsize",void 0),h([Qr({mode:"boolean"})],Rp.prototype,"success",void 0),h([Qr({mode:"boolean"})],Rp.prototype,"error",void 0),h([Qr({mode:"boolean"})],Rp.prototype,"fullwidth",void 0),h([Qr({mode:"boolean"})],Rp.prototype,"optional",void 0),h([Qr({attribute:"label-id"})],Rp.prototype,"labelId",void 0),h([Qr({mode:"boolean",attribute:"disable-browser-defaults"})],Rp.prototype,"disableBrowserDefaults",void 0),h([Qr],Rp.prototype,"autocomplete",void 0);class Pp extends Rp{constructor(){super(...arguments),this.hidecounter=!1,this.counterEl=document.createElement("span"),this.handleHelperTextSlotChange=()=>{this.render();const e=this.helperTextEl.assignedElements()[0];e&&e.textContent&&this.control.setAttribute("aria-describedby",this.querySelector('[slot="helpertext"]').id)},this.handleInput=e=>{const{value:t}=e?.target;this.maxlength&&!this.hidecounter&&(this.counterEl.textContent=`${t.length}/${this.maxlength}`)}}connectedCallback(){super.connectedCallback(),this.control.addEventListener("input",this.handleInput),this.render()}disconnectedCallback(){super.disconnectedCallback(),this.control.removeEventListener("input",this.handleInput)}attributeChangedCallback(e,t,r){super.attributeChangedCallback(e,t,r),this.render()}hasHelperText(){return null!==this.querySelector('[slot="helpertext"]')}render(){this.maxlength&&!this.hidecounter?this.renderCounter():this.removeCounter()}renderCounter(){this.hasHelperText()?this.infoContainer.style.justifyContent="space-between":this.infoContainer.style.justifyContent="flex-end",this.counterEl.classList.add("counter"),this.counterEl.textContent=`${this.value.length}/${this.maxlength}`,this.infoContainer?.appendChild(this.counterEl)}removeCounter(){this.counterEl?.isConnected&&(this.infoContainer.style.justifyContent="",this.counterEl.remove())}setAccessibleLabel(){this.textContent?.trim()&&this.helperTextEl.assignedElements()[0]?.textContent!==this.textContent?.trim()||this.labelId&&this.setAttribute("aria-labelledby",this.labelId)}validateAccessibleLabel(){this.getAttribute("aria-labelledby")?.length||console.error("CHAMELEON-A11Y: TextField component must have an accessible label provided by either \n  1) text content \n  2) a visible label whose id is given as the attribute labelId\n")}}h([Qr({mode:"boolean",attribute:"hide-counter"})],Pp.prototype,"hidecounter",void 0);var Dp=":host{flex-direction:column;display:inline-flex}:host .root{border-style:solid;border-width:1px;border-color:var(--goto-border-color-default);color:var(--goto-type-color-default);font:var(--goto-body-medium);height:var(--goto-spacing-07);border-radius:var(--goto-radius-small);padding:var(--goto-spacing-00)var(--goto-spacing-00)var(--goto-spacing-00)var(--goto-spacing-03);box-sizing:border-box;background-color:var(--goto-surface-color-default);outline:0;display:inline-flex}:host .root:hover{border-color:var(--goto-border-color-default)}:host ::slotted([slot=helpertext]){color:var(--goto-type-color-secondary);margin-top:var(--goto-spacing-01);font:var(--goto-caption-medium);cursor:text}:host input{box-shadow:none;font:inherit;width:100%;color:var(--goto-type-color-default);text-align:var(--chameleon-input-text-align,start);background:0 0;border:none;outline:0}:host input[type=number]{appearance:textfield}:host input[type=number]::-webkit-outer-spin-button,:host input[type=number]::-webkit-inner-spin-button{appearance:none;margin:var(--goto-spacing-00)}:host input::placeholder{color:var(--goto-type-color-secondary);font:var(--goto-body-medium);margin-top:var(--goto-spacing-01);opacity:1;line-height:1.3rem;display:inline-flex}:host .info{justify-content:space-between;align-items:center;gap:var(--goto-spacing-02);display:flex}:host .counter{color:var(--goto-type-color-secondary);margin-top:var(--goto-spacing-01);font:var(--goto-caption-medium)}:host .label__hidden{visibility:hidden;display:none}:host(:focus-within) .root{outline-offset:2px;outline:1px solid var(--goto-focus-color-highlight-default)}:host(:focus-visible){outline:none}.start,.end{align-items:center;display:inline-flex}::slotted([slot=end]:not(chameleon-icon-button)),::slotted([slot=start]:not(chameleon-icon-button)){--goto-icon-size:.875rem;font:var(--goto-body-medium)}::slotted([slot=end]:not(chameleon-icon-button)){margin-right:var(--goto-spacing-03)}::slotted([slot=start]){margin-right:var(--goto-spacing-01)}::slotted([slot=end]){margin-left:var(--goto-spacing-01)}::slotted(svg[slot=end]),::slotted(svg[slot=start]){width:14px;
1329height:14px}:host([success]) .root{border-color:var(--goto-border-color-success)}:host([success]) ::slotted([slot=end]){--goto-icon-color:var(--goto-surface-color-success-default);color:var(--goto-surface-color-success-default)}:host([success]) ::slotted([slot=helpertext]){color:var(--goto-surface-color-success-default)}:host([success]:focus-within) .root{outline-color:var(--goto-focus-color-highlight-success)}:host([aria-disabled]),:host([disabled]){cursor:not-allowed;--goto-icon-color:var(--goto-type-color-disabled)}:host([aria-disabled]) .root,:host([disabled]) .root{border-color:var(--goto-border-color-default);background-color:var(--goto-surface-color-default);box-shadow:none;color:var(--goto-type-color-disabled);pointer-events:none;caret-color:#0000}:host([aria-disabled]) .counter,:host([aria-disabled]) .label,:host([disabled]) .counter,:host([disabled]) .label{color:var(--goto-type-color-disabled)}:host([aria-disabled]) input,:host([disabled]) input{border-color:var(--goto-border-color-default);background-color:var(--goto-surface-color-default);box-shadow:none;color:var(--goto-type-color-disabled);user-select:none;pointer-events:none}:host([aria-disabled]) input::placeholder,:host([disabled]) input::placeholder,:host([aria-disabled]) ::slotted([slot=helpertext]),:host([disabled]) ::slotted([slot=helpertext]){color:var(--goto-type-color-disabled)}:host([readonly]) .root{border-color:var(--goto-border-color-default);background-color:var(--goto-surface-color-secondary);box-shadow:none;color:var(--goto-type-color-default)}:host([readonly]) .root input::placeholder{color:var(--goto-type-color-default)}:host([readonly]:focus-within) .root{border-color:var(--goto-border-color-default);background-color:var(--goto-surface-color-secondary);box-shadow:none;color:var(--goto-type-color-default)}:host([error]) .root{border-color:var(--goto-border-color-danger)}:host([error]) ::slotted([slot=end]){--goto-icon-color:var(--goto-surface-color-danger-default);color:var(--goto-surface-color-danger-default)}:host([error]) ::slotted([slot=helpertext]){color:var(--goto-surface-color-danger-default)}:host([error]:focus-within) .root{outline-color:var(--goto-focus-color-highlight-danger)}:host([fieldsize=small]) .root{font:var(--goto-body-small);height:var(--goto-spacing-06)}:host([fieldsize=small]) .root input::placeholder,:host([fieldsize=small]) ::slotted([slot=end]),:host([fieldsize=small]) ::slotted([slot=start]){font:var(--goto-body-small)}:host([fieldsize=large]) .root{height:var(--goto-spacing-08)}:host([fieldsize=xlarge]) .root{height:var(--goto-spacing-09)}.label{color:var(--goto-type-color-default);font:var(--goto-caption-medium-strong);margin-bottom:var(--goto-spacing-01);display:block}:host([fullwidth]),:host([fullwidth]) .control{width:100%}:host([disable-browser-defaults]) input[type=password]::-ms-reveal,:host([disable-browser-defaults]) input[type=password]::-ms-clear{display:none}";const Mp={baseName:"text-field",template:Ap,styles:Dp,shadowOptions:{delegatesFocus:!0}},zp=Pp.compose(Mp),Fp=Cp.compose({baseName:"date-input",template:e=>ri`
1330    <template>
1331      ${wu(e=>e.dateParts,ri`
1332          ${Aa(e=>"literal"===e.type,ri`<span>${e=>e.text}</span>`,ri`
1333              <div
1334                id="${e=>e.type}"
1335                ?contenteditable=${(e,t)=>!t.parent.disabled}
1336                autocapitalize="off"
1337                spellcheck="false"
1338                autocorrect="off"
1339                enterkeyhint="next"
1340                inputmode="numeric"
1341                role="spinbutton"
1342                tabindex="0"
1343                aria-label="${(e,t)=>{const r=t.parent.dateParts.findIndex(e=>e.isEditable)===t.parent.dateParts.indexOf(e),n=[e.type,t.parent.label,t.parent.dateFormatLabel].filter(Boolean);return r?n.join(", "):e.type}}"
1344                aria-valuenow="${e=>e.isPlaceholder?null:e.value}"
1345                aria-valuetext="${e=>e.isPlaceholder?null:e.text}"
1346                aria-valuemin="${e=>e.minValue}"
1347                aria-valuemax="${e=>e.maxValue}"
1348                aria-disabled="${(e,t)=>Ru(t.parent.disabled)}"
1349                @keydown=${(e,t)=>t.parent.spinButtonKeyDown(e,t.event)}
1350                @focus=${(e,t)=>t.parent.handleSpinButtonFocus(e)}
1351              >
1352                ${e=>e.isPlaceholder?e.placeholder:e.text}
1353              </div>
1354            `)}
1355        `)}
1356    </template>`,styles:Ci(":host{justify-content:space-between;align-items:center;display:flex}:host>div{color:var(--goto-type-color-default);justify-content:center;align-items:center;display:flex}:host [role=spinbutton]{caret-color:#0000}:host [role=spinbutton]:focus{background:var(--goto-interactive-color-brand-hover);color:#fff;border-radius:var(--goto-radius-small);outline:none}:host([fieldsize=small]){font:var(--goto-button-small)}:host([fieldsize=large]){font:var(--goto-button-large)}
1356:host([fieldsize=xlarge]){font:var(--goto-button-xlarge)}:host([aria-disabled]),:host([disabled]){cursor:not-allowed;border-color:var(--goto-border-color-default);background-color:var(--goto-surface-color-default);box-shadow:none;color:var(--goto-type-color-disabled);pointer-events:none;caret-color:#0000}:host([aria-disabled])>div,:host([disabled])>div{color:var(--goto-type-color-disabled)}"),shadowOptions:{delegatesFocus:!0}});!function(e){vr({prefix:e}),ql({prefix:e}),fl({prefix:e}),Gl({prefix:e}),gl({prefix:e}),su({prefix:e}),To({prefix:e,node:void 0},wl,zp,Fp,Ep)}();class Up extends(s(Jn)){internalErrorChanged(){this.classList.toggle("error-state",this.isInErrorState)}errorChanged(){this.classList.toggle("error-state",this.isInErrorState)}get isInErrorState(){return(this.internalError??!1)||(this.error??!1)}get isDateInputFieldOutside(){return!this.footer}get isDateRangeInputDisabled(){return this.disabled??!1}get isSelectedValueDirty(){return this.inputSelectionStart!==this.start||this.inputSelectionEnd!==this.end}get isApplyButtonDisabled(){return this.isDateRangeInputDisabled||!this.isSelectedValueDirty||(this.internalError??!1)}get isAutoApplyEnabled(){return!!this.isDateInputFieldOutside||(this.autoApply??!1)}get shouldAutoClosePopover(){return!(!this.isDateInputFieldOutside&&this.autoApply)}get applyButtonLabelWithDefault(){return this.applyButtonLabel??"Apply"}startChanged(e,t){this.startEndChangedCallback(),this.start!==this.inputSelectionStart&&(this.inputSelectionStart=this.start,this.isConnected&&(this.evaluateInputSelectionRange({doApply:!1}),this.updateFormValue(),this.updateRequiredValidity()))}endChanged(e,t){this.startEndChangedCallback(),this.end!==this.inputSelectionEnd&&(this.inputSelectionEnd=this.end,this.isConnected&&(this.evaluateInputSelectionRange({doApply:!1}),this.updateFormValue(),this.updateRequiredValidity()))}openChanged(e,t){!e&&t&&(this.rangeCalendar.viewBy=this.viewBy)}isValidNumberOfDays(e){const t=Number(e);return Number.isInteger(t)&&t>=0&&t<=365}maxDurationChanged(e,t){this.isValidNumberOfDays(t)?this.maxDuration=Number(t):this.maxDuration=void 0,this.evaluateInputSelectionRange({doApply:!0})}reportValidity(){return this.internals.reportValidity()}get validationMessage(){return this.internals.validationMessage}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}willValidate(){return this.internals.willValidate}inputLabelChanged(){this.internals.ariaLabel=this.inputLabel??null}constructor(){super(),this.dateFormatLabel="Date format is MM DD YYYY",this.timezone=Td(),this.locale=navigator.language,this.presets=[],this.internalError=!1,this.validationInput=document.createElement("input"),this.internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.initializeDateSelectionTemporaryState()}initializeDateSelectionTemporaryState(){this.calendarSelectionStart=this.start,this.calendarSelectionEnd=this.end,this.inputSelectionStart=this.start,this.inputSelectionEnd=this.end,this.start&&this.end&&this.updateFormValue(),this.updateRequiredValidity()}computeValidationState(){const e=this.inputSelectionStart?Gc(this.inputSelectionStart):void 0,t=this.inputSelectionEnd?Gc(this.inputSelectionEnd):void 0,r=this.min?Gc(this.min):void 0,n=this.max?Gc(this.max):void 0,o=e&&r&&e<r,i=e&&n&&e>n,s=t&&r&&t<r,a=t&&n&&t>n,l=o||i,c=s||a,d=t&&e&&e<=t;let u=!1;if(Number.isInteger(this.maxDuration)&&e&&t&&d){const r={days:Number(this.maxDuration)};u=t>e.add(r)}return{inputStartDate:e,inputEndDate:t,isInputStartOutsideMin:o,isInputStartOutsideMax:i,isInputEndOutsideMin:s,isInputEndOutsideMax:a,isInputStartOutOfRange:l,isInputEndOutOfRange:c,isWellOrdered:d,isDurationExceeded:u}}evaluateInputSelectionRange({doApply:e}){const t=this.inputSelectionStart,r=this.inputSelectionEnd,{inputStartDate:n,inputEndDate:o,isInputStartOutOfRange:i,isInputEndOutOfRange:s,isWellOrdered:a,isDurationExceeded:l}=this.computeValidationState(),c=i||s||!a||l,d=!n&&!o,u=this.internalError;this.internalError=!d&&c,u!==this.internalError&&this.updateRequiredValidity(),this.calendarSelectionStart=i?void 0:t,this.calendarSelectionEnd=t&&(!a||s||l)?void 0:r,e&&!this.internalError&&(this.start=this.inputSelectionStart,this.end=this.inputSelectionEnd,this.inputSelectionStart&&this.inputSelectionEnd&&this.shouldAutoClosePopover&&(this.open=!1))}getValidationMessage(){const{inputStartDate:e,inputEndDate:t,isInputStartOutsideMin:r,isInputStartOutsideMax:n,isInputEndOutsideMin:o,isInputEndOutsideMax:i,isWellOrdered:s,isDurationExceeded:a}=this.computeValidationState();return r?"Start date is before the minimum allowed date":n?"Start date is after the maximum allowed date":o?"End date is before the minimum allowed date":i?"End date is after the maximum allowed date":!s&&e&&t?"Start date must be before or equal to end date":a?`Date range exceeds maximum duration of ${this.maxDuration} days`:"Invalid date range"}updateRequiredValidity(){if(!this.isConnected)return;const e=this.hasAttribute("required")&&(!this.start||!this.end),t=this.internalError||e;let r="";e?(this.validationInput.toggleAttribute("required",!0),r=this.validationInput.validationMessage):this.internalError&&(r=this.getValidationMessage()),this.internals.setValidity({customError:t},r,this.control)}updateFormValue(){const e=this.start&&this.end?`${this.start}/${this.end}`:"";this.internals.setFormValue(e)}
1356startEndChangedCallback(){this.isConnected&&!this.isSelectedValueDirty&&(this.updateFormValue(),this.$emit("change",{start:this.start??"",end:this.end??""}),this.updateRequiredValidity())}handlePopoverChangeEvent(e){this.open=e.detail.isOpen}handleRangeCalendarChangeEvent(e){const{start:t,end:r}=e;this.inputSelectionStart=t,this.inputSelectionEnd=r,this.evaluateInputSelectionRange({doApply:this.isAutoApplyEnabled})}handleDateRangeInputStartChangeEvent(e){this.inputSelectionStart=e,this.evaluateInputSelectionRange({doApply:this.isAutoApplyEnabled})}handleDateRangeInputEndChangeEvent(e){this.inputSelectionEnd=e,this.evaluateInputSelectionRange({doApply:this.isAutoApplyEnabled})}handleDateRangeInputApply(){this.evaluateInputSelectionRange({doApply:!0})}handleDateRangeInputKeyDown(e){return"Enter"===e.code&&this.handleDateRangeInputApply(),!0}validateAccessibleLabels(){this.validateInputLabels(),this.validateCalendarToggleLabel(),this.validateDateFormatLabel()}validateInputLabels(){this.inputLabel&&0!==this.inputLabel.length||console.error("CHAMELEON-A11Y: DateRangePicker component must have an accessible input label provided by a non-empty inputLabel/input-label attribute."),this.startInputLabel&&0!==this.startInputLabel.length||console.error("CHAMELEON-A11Y: DateRangePicker component must have an accessible start input label provided by a non-empty startInputLabel/start-input-label attribute."),this.endInputLabel&&0!==this.endInputLabel.length||console.error("CHAMELEON-A11Y: DateRangePicker component must have an accessible end input label provided by a non-empty endInputLabel/end-input-label attribute.")}validateCalendarToggleLabel(){this.calendarToggleLabel&&0!==this.calendarToggleLabel.length||console.error("CHAMELEON-A11Y: DateRangePicker component must have an accessible calendar toggle button label provided by a non-empty calendarToggleLabel/calendar-toggle-label attribute.")}validateDateFormatLabel(){this.dateFormatLabel&&0!==this.dateFormatLabel.length||console.warn("CHAMELEON-A11Y: DateRangePicker component should have a date format description provided by the dateFormatLabel/date-format-label attribute to help users understand the expected date format.")}getInitialFocusTarget(){const e=this.rangeCalendar?.shadowRoot?.querySelector('span[role="button"][tabindex="0"]');return e||void 0}}Up.formAssociated=!0,h([Qr({attribute:"input-label"})],Up.prototype,"inputLabel",void 0),h([Qr({attribute:"start-input-label"})],Up.prototype,"startInputLabel",void 0),h([Qr({attribute:"end-input-label"})],Up.prototype,"endInputLabel",void 0),h([Qr({attribute:"helper-text"})],Up.prototype,"helperText",void 0),h([Qr],Up.prototype,"fieldsize",void 0),h([Qr({attribute:"calendar-toggle-label"})],Up.prototype,"calendarToggleLabel",void 0),h([Qr({attribute:"date-format-label"})],Up.prototype,"dateFormatLabel",void 0),h([Qr()],Up.prototype,"start",void 0),h([Qr()],Up.prototype,"end",void 0),h([Qr()],Up.prototype,"min",void 0),h([Qr()],Up.prototype,"max",void 0),h([Qr],Up.prototype,"timezone",void 0),h([Qr],Up.prototype,"locale",void 0),h([Qr({mode:"boolean"})],Up.prototype,"disabled",void 0),h([Qr({mode:"boolean"})],Up.prototype,"open",void 0),h([Qr({mode:"boolean"})],Up.prototype,"error",void 0),h([Qr({mode:"boolean"})],Up.prototype,"success",void 0),h([Qr()],Up.prototype,"viewBy",void 0),h([Qr({mode:"boolean"})],Up.prototype,"footer",void 0),h([Qr({mode:"boolean"})],Up.prototype,"autoApply",void 0),h([Qr({attribute:"max-duration"})],Up.prototype,"maxDuration",void 0),h([Qr({attribute:"apply-button-label"})],Up.prototype,"applyButtonLabel",void 0),h([Qr({attribute:"presets-label"})],Up.prototype,"presetsLabel",void 0),h([Nr],Up.prototype,"presets",void 0),h([Nr],Up.prototype,"internalError",void 0),h([Nr],Up.prototype,"popoverElement",void 0),h([Nr],Up.prototype,"control",void 0),h([Nr],Up.prototype,"rangeCalendar",void 0),h([Nr],Up.prototype,"inputSelectionStart",void 0),h([Nr],Up.prototype,"inputSelectionEnd",void 0),h([Nr],Up.prototype,"calendarSelectionStart",void 0),h([Nr],Up.prototype,"calendarSelectionEnd",void 0),h([Rr],Up.prototype,"isInErrorState",null),h([Rr],Up.prototype,"isDateInputFieldOutside",null),h([Rr],Up.prototype,"isDateRangeInputDisabled",null),h([Rr],Up.prototype,"isSelectedValueDirty",null),h([Rr],Up.prototype,"isApplyButtonDisabled",null),h([Rr],Up.prototype,"isAutoApplyEnabled",null),h([Rr],Up.prototype,"shouldAutoClosePopover",null),h([Rr],Up.prototype,"applyButtonLabelWithDefault",null);const Bp=Up.compose({baseName:"date-range-picker",template:(e,t)=>
1356{const r=u(Hl),n=u(jl),o=u(Wi),i=u(mr),s=u(ll),a=u(Pu),l=u(Cp),c=ri`
1357    <slot name="start"></slot>
1358    <div class="date-inputs ${e=>e.isDateRangeInputDisabled?"disabled":""}"
1359      @keydown="${(e,t)=>e.handleDateRangeInputKeyDown(t.event)}"
1360    >
1361      <${l}
1362        value=${e=>e.inputSelectionStart}
1363        locale=${e=>e.locale}
1364        timezone=${e=>e.timezone}
1365        fieldsize=${e=>e.fieldsize}
1366        label=${e=>[e.inputLabel,e.startInputLabel].filter(Boolean).join(", ")}
1367        date-format-label=${e=>e.dateFormatLabel}
1368        ?disabled="${e=>e.isDateRangeInputDisabled}"
1369        @change=${(e,t)=>{t.event.stopPropagation(),e.handleDateRangeInputStartChangeEvent(t.event.target.value)}}
1370        @blur=${e=>{(e.inputSelectionStart??"")>(e.inputSelectionEnd??"")&&(e.inputSelectionEnd=void 0)}}
1371      ></${l}>
1372      <slot name="middle">
1373        <${r}
1374          variant="body-medium"
1375          color="${e=>e.isDateRangeInputDisabled?"type-color-disabled":"type-color-secondary"}"
1376          aria-hidden="true"
1377        >–</${r}></slot>
1378      <${l}
1379        fieldsize=${e=>e.fieldsize}
1380        value=${e=>e.inputSelectionEnd}
1381        locale=${e=>e.locale}
1382        timezone=${e=>e.timezone}
1383        fieldsize=${e=>e.fieldsize}
1384        label=${e=>[e.inputLabel,e.endInputLabel].filter(Boolean).join(", ")}
1385        date-format-label=${e=>e.dateFormatLabel}
1386        ?disabled="${e=>e.isDateRangeInputDisabled}"
1387        @change=${(e,t)=>{t.event.stopPropagation(),e.handleDateRangeInputEndChangeEvent(t.event.target.value)}}
1388      ></${l}>
1389    </div>
1390    <slot name="end">
1391      ${Aa(e=>e.isInErrorState,ri`<${i}>${Cl}</${i}>`)}
1392      ${Aa(e=>e.success,ri`<${i}>${kl}</${i}>`)}
1393    </slot>
1394  `,d=ri`
1395    ${Aa(e=>e.helperText,ri`
1396        <${r} 
1397          id="text" 
1398          class="helpertext" 
1399          variant="caption-medium" 
1400          color="${e=>e.isInErrorState?"type-color-danger":e.success?"type-color-success":"type-color-secondary"}"
1401        >
1402          ${e=>e.helperText}
1403        </${r}>
1404      `)}
1405  `,h=ri`
1406    <${o}
1407      variant="${"primary"}"
1408      label="${e=>e.calendarToggleLabel}"
1409      id="calendar-button"
1410      disabled="${e=>e.disabled}"
1411    >
1412      <${i}>${ip}</${i}>
1413    </${o}>
1414    <${s}
1415      trigger-id=${e=>e.disabled?void 0:"calendar-button"}
1416      ${li("popoverElement")}
1417      ?is-open=${e=>e.open}
1418      :initialFocus=${e=>()=>e.getInitialFocusTarget()}
1419      @popoverchange=${(e,t)=>e.handlePopoverChangeEvent(t.event)}
1420      compact
1421    >
1422      ${e=>p}
1423    </${s}>
1424  `,p=ri`
1425    <${a}
1426      ${li("rangeCalendar")}
1427      :presets=${e=>e.presets}
1428      presets-label=${e=>e.presetsLabel}
1429      locale="${e=>e.locale}"
1430      timezone=${e=>e.timezone}
1431      min=${e=>e.min}
1432      max=${e=>e.max}
1433      start="${e=>e.calendarSelectionStart}"
1434      end="${e=>e.calendarSelectionEnd}"
1435      view-by=${e=>e.viewBy}
1436      footer=${e=>e.footer}
1437      auto-apply=${e=>e.autoApply}
1438      @ch-range-calendar-change=${(e,t)=>{e.handleRangeCalendarChangeEvent(t.event.detail)}}
1439    >
1440      <slot name="header" slot="header"></slot>
1441      ${Aa(e=>!e.isDateInputFieldOutside,ri`
1442          <div slot="footer">
1443            <div class="footer-control">
1444              <div class="control inner-control" ${li("control")} tabindex="-1">
1445                ${e=>c}
1446              </div>
1447              ${Aa(e=>!e.autoApply,ri`
1448                  <${n}
1449                    ?disabled="${e=>e.isApplyButtonDisabled}"
1450                    aria-label="${e=>e.applyButtonLabelWithDefault}"
1451                    @click="${e=>e.handleDateRangeInputApply()}"
1452                  >
1453                    ${e=>e.applyButtonLabelWithDefault}
1454                  </${n}>
1455                `)}
1456            </div>
1457            <div class="footer-helper-text">
1458              ${()=>d}
1459            </div>
1460          </div>
1461        `)}
1462    </${a}>
1463  `;return ri`
1464    <template>
1465      ${Aa(e=>e.inputLabel,ri`
1466          <${r} class="input-label" variant="caption-medium-strong" color="type-color-default">
1467            ${e=>e.inputLabel}
1468          </${r}>
1469        `)}
1470      ${Aa(e=>e.isDateInputFieldOutside,ri`
1471          <div class="control" ${li("control")} tabindex="-1">
1472            ${e=>c}
1473            ${e=>h}
1474          </div>
1475          ${()=>d}
1476        `,ri`
1477          ${e=>h}
1478        `)}
1479    </template>
1480  `},styles:Ci(":host{width:100%;min-width:fit-content;height:fit-content}:host .input-label{margin-bottom:var(--goto-spacing-01)}:host .control{font:var(--goto-body-medium);width:100%;min-width:260px;height:var(--goto-spacing-07);box-sizing:border-box;padding:var(--goto-spacing-00)var(--goto-spacing-03);border-radius:var(--goto-radius-small);border:1px solid var(--goto-border-color-default);justify-content:space-between;align-items:center;gap:4px;display:flex}:host .control .date-inputs{flex-grow:1;place-items:center;gap:8px}:host .control .date-inputs.disabled{color:var(--goto-type-color-disabled)}:host .control>div{color:var(--goto-type-color-default);justify-content:center;align-items:center;display:flex}:host .control.inner-control>div{justify-content:start}:host .control [role=spinbutton]{caret-color:#0000}:host .control [role=spinbutton]:focus{background:var(--goto-interactive-color-brand-hover);color:#fff;border-radius:var(--goto-radius-small);outline:none}:host .control:focus-within{outline-offset:2px;outline:1px solid var(--goto-focus-color-highlight-default)}:host .helper-text{margin-top:var(--goto-spacing-01);cursor:text}:host .footer-control{justify-content:space-between;align-items:center;gap:var(--goto-spacing-02);width:100%;display:flex}:host([success]) .control{border-color:var(--goto-border-color-success)}:host([success]) .helper-text{color:var(--goto-surface-color-success-default)}:host([success]) ::slotted([slot=end]),:host([success]) slot[name=end]{--goto-icon-color:var(--goto-surface-color-success-default);color:var(--goto-surface-color-success-default)}:host([error]) .control,:host(.error-state) .control{border-color:var(--goto-border-color-danger)}:host([error]) .helper-text,:host(.error-state) .helper-text{color:var(--goto-surface-color-danger-default)}:host([error]) ::slotted([slot=end]),:host([error]) slot[name=end],:host(.error-state) ::slotted([slot=end]),:host(.error-state) slot[name=end]{--goto-icon-color:var(--goto-surface-color-danger-default);color:var(--goto-surface-color-danger-default)}:host([fieldsize=small]) .control{height:var(--goto-spacing-06);font:var(--goto-button-small);gap:calc(var(--goto-spacing-02)/2)}:host([fieldsize=large]) .control{height:var(--goto-spacing-08);font:var(--goto-button-large);--goto-icon-size:var(--goto-spacing-05)}
1480:host([fieldsize=xlarge]) .control{height:var(--goto-spacing-09);font:var(--goto-button-xlarge);--goto-icon-size:var(--goto-spacing-06)}:host(:focus-visible){outline:none}"),shadowOptions:{delegatesFocus:!0}});!function(e){vr({prefix:e}),ql({prefix:e}),fl({prefix:e}),Gl({prefix:e}),Uu({prefix:e}),gl({prefix:e}),Mu({prefix:e}),To({prefix:e,node:void 0},Fp,wl,Du,Bp)}(),To({prefix:void 0,node:void 0},Fp);const Hp=86400;function jp(e,t=2){return String(e).padStart(t,"0")}function Vp(e){if(!e)return;const t=/^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/.exec(e.trim());if(!t)return;const r=Number(t[1]),n=Number(t[2]),o=void 0!==t[3]?Number(t[3]):0;return Number.isNaN(r)||Number.isNaN(n)||Number.isNaN(o)||r<0||r>23||n<0||n>59||o<0||o>59?void 0:{hour:r,minute:n,second:o}}function Wp(e){return 3600*e.hour+60*e.minute+e.second}function Kp(e,t){const r=`${jp(e.hour)}:${jp(e.minute)}`;return t?`${r}:${jp(e.second)}`:r}class qp extends(Gt(Zt)){constructor(){super(),this.locale=navigator.language,this.step=60,this.segments=[],this.placeholderTime={hour:0,minute:0,second:0},this.validationInput=Object.assign(document.createElement("input"),{type:"time"}),this.skipSegmentReset=!1,this.skipNormalize=!1,this.handleHostFocusIn=e=>{const t=e.relatedTarget;t&&this.contains(t)||(this.valueAtFocus=this.value??"")},this.handleHostFocusOut=e=>{const t=e.relatedTarget;t&&this.contains(t)||(this.commitChangeIfDirty(),this.valueAtFocus=void 0)},this.handleSegmentFocus=e=>{const t=e.target?.dataset.segment;if(!t)return;const r=this.segments.findIndex(e=>e.type===t);r>=0&&this.segments[r].enteredKeys&&this.patchSegment(r,{enteredKeys:""})},this.internals||(this.internals=this.attachInternals()),this.addEventListener("focusin",this.handleHostFocusIn),this.addEventListener("focusout",this.handleHostFocusOut)}get valueAsNumber(){const e=Vp(this.value??"");return e?1e3*Wp(e):Number.NaN}set valueAsNumber(e){if(Number.isNaN(e)||e<0||e>=864e5)return void(this.value="");const t=Math.floor(e/1e3),r=Math.floor(t/3600),n=Math.floor(t%3600/60),o=t%60;this.value=Kp({hour:r,minute:n,second:o},this.showSeconds)}get valueAsDate(){const e=Vp(this.value??"");return e?new Date(Date.UTC(1970,0,1,e.hour,e.minute,e.second)):null}set valueAsDate(e){if(!e)return void(this.value="");const t={hour:e.getUTCHours(),minute:e.getUTCMinutes(),second:e.getUTCSeconds()};this.value=Kp(t,this.showSeconds)}get showSeconds(){const e=Number(this.step);return!(!Number.isFinite(e)||e<=0)&&(e<60||e%60!=0)}get use12HourClock(){return this.localeCache.use12HourClock}get localeCache(){if(this._localeCache?.locale===this.locale)return this._localeCache;const e=function(e){try{return Intl.getCanonicalLocales(e),!0}catch{return!1}}(this.locale),t=!!e&&!0===new Intl.DateTimeFormat(this.locale,{hour:"numeric"}).resolvedOptions().hour12,r=e?new Intl.DateTimeFormat(this.locale,{hour:"numeric",minute:"2-digit",hour12:!0}):void 0;return this._localeCache={locale:this.locale,use12HourClock:t,dayPeriodFormat:r},this._localeCache}incrementForSegment(e){const t=Number(this.step)||60;switch(e){case"hour":return Math.max(1,Math.floor(t/3600));case"minute":return t>=60&&Math.floor(t/60)%60||1;case"second":return t<60?t:1;case"dayPeriod":return 1}}connectedCallback(){super.connectedCallback(),this.defaultValue&&void 0===this.value&&(this.value=this.defaultValue),this.segments=this.calculateSegments(),this.updateValidity(),this.internals.setFormValue(this.value??"")}formResetCallback(){const e=this.defaultValue??"";this.value=e,this.skipSegmentReset=!1,this.skipNormalize=!1,this.segments=this.calculateSegments(),this.internals?.setFormValue(e),this.updateValidity()}willUpdate(e){super.willUpdate?.(e),(e.has("locale")||e.has("step"))&&(this.segments=this.calculateSegments()),e.has("value")&&this.handleValueChanged(e.get("value")),(e.has("min")||e.has("max")||e.has("required"))&&this.updateValidity(),e.has("disabled")&&this.classList.toggle("disabled",this.disabled)}handleValueChanged(e){const t=Vp(this.value??"");if(t){if(this.placeholderTime={...t},this.segments=this.segments.map(e=>"literal"===e.type?e:this.fillSegmentFromTime(e,t)),!this.skipNormalize){const e=Kp(t,this.showSeconds);if(e!==this.value)return this.skipNormalize=!0,void(this.value=e)}this.skipNormalize=!1,this.skipSegmentReset=!1}else this.skipSegmentReset||(this.segments=this.segments.map(e=>
1480"literal"===e.type?e:{...e,enteredKeys:"",value:void 0,text:"",isPlaceholder:!0})),this.skipSegmentReset=!1;this.internals?.setFormValue(this.value??""),this.updateValidity()}fillSegmentFromTime(e,t){const r=e.type;return{...e,value:this.numericValueForSegment(r,t),text:this.formatSegmentText(r,t),enteredKeys:"",isPlaceholder:!1}}numericValueForSegment(e,t){switch(e){case"hour":return this.use12HourClock?function(e){const t=e%12;return 0===t?12:t}(t.hour):t.hour;case"minute":return t.minute;case"second":return t.second;case"dayPeriod":return t.hour>=12?1:0}}formatSegmentText(e,t){if("dayPeriod"===e){const e=this.localeCache.dayPeriodFormat;if(e)try{const r=new Date(1970,0,1,t.hour,t.minute,t.second),n=e.formatToParts(r).find(e=>"dayPeriod"===e.type);if(n)return n.value}catch{}return t.hour>=12?"PM":"AM"}return jp(this.numericValueForSegment(e,t))}calculateSegments(){const e=this.use12HourClock,t=this.showSeconds,r=["hour","literal","minute"];t&&r.push("literal","second"),e&&r.push("literal","dayPeriod");const n=Vp(this.value??"")??Vp(this.defaultValue??"");return n&&(this.placeholderTime={...n}),r.map((e,t)=>"literal"===e?{type:"literal",text:"dayPeriod"===r[t+1]?" ":":",minValue:0,maxValue:0,placeholder:"",enteredKeys:"",isPlaceholder:!1}:{type:e,...this.getSegmentLimits(e),placeholder:this.getPlaceholder(e),enteredKeys:"",value:n?this.numericValueForSegment(e,n):void 0,text:n?this.formatSegmentText(e,n):"",isPlaceholder:!n})}get segmentDefs(){const e=this.use12HourClock;return{hour:{minValue:e?1:0,maxValue:e?12:23,placeholder:e?"h":"hh"},minute:{minValue:0,maxValue:59,placeholder:"mm"},second:{minValue:0,maxValue:59,placeholder:"ss"},dayPeriod:{minValue:0,maxValue:1,placeholder:"AM"}}}getSegmentLimits(e){const t=this.segmentDefs[e];return{minValue:t.minValue,maxValue:t.maxValue}}getPlaceholder(e){return this.segmentDefs[e].placeholder}spinButtonKeyDown(e,t){if(!this.disabled)switch(t.key){case"ArrowUp":t.preventDefault(),this.increment(e,1);break;case"ArrowDown":t.preventDefault(),this.increment(e,-1);break;case"Backspace":case"Delete":t.preventDefault(),this.clearSegment(e);break;case"ArrowLeft":t.preventDefault(),this.focusSiblingSegment(e,-1);break;case"ArrowRight":t.preventDefault(),this.focusSiblingSegment(e,1);break;case"Enter":t.preventDefault(),this.commitChangeIfDirty();break;case"Tab":return;case" ":return void t.preventDefault();default:/^.$/u.test(t.key)&&t.preventDefault()}}currentTime(){return Vp(this.value??"")??{...this.placeholderTime}}get allEditableFilled(){return this.segments.every(e=>"literal"===e.type||!e.isPlaceholder)}clampToRange(e){const t=this.min?Vp(this.min):void 0,r=this.max?Vp(this.max):void 0,n=Wp(e);return t&&n<Wp(t)?{...t}:r&&n>Wp(r)?{...r}:e}commitTime(e,t){const r=this.clampToRange(e);if(this.placeholderTime={...r},this.segments=this.segments.map(e=>{if("literal"===e.type||e.isPlaceholder)return e;const t=this.numericValueForSegment(e.type,r);return{...e,value:t,text:this.formatSegmentText(e.type,r)}}),this.allEditableFilled){const e=Kp(r,this.showSeconds);e!==this.value?(this.skipSegmentReset=!0,this.skipNormalize=!0,this.value=e):(this.internals?.setFormValue(this.value??""),this.updateValidity())}else this.value?(this.skipSegmentReset=!0,this.value=""):(this.internals?.setFormValue(""),this.updateValidity());this.emit("input"),t&&queueMicrotask(()=>this.focusSegmentByType(t.type))}fillSegment(e,t={}){const r=this.segments.indexOf(e);r>=0&&this.patchSegment(r,{...t,isPlaceholder:!1})}getSegmentValue(e){const t=this.segments.find(t=>t.type===e);if(t&&!t.isPlaceholder)return t.value}setSegmentValue(e,t){const r=this.segments.find(t=>t.type===e);if(!r)return;const n=this.currentTime(),o={...n};switch(e){case"hour":if(this.use12HourClock){const e=n.hour>=12,r=t%12;o.hour=e?r+12:r}else o.hour=t;break;case"minute":o.minute=t;break;case"second":o.second=t;break;case"dayPeriod":o.hour=n.hour%12+(1===t?12:0)}this.fillSegment(r),this.commitTime(o)}patchSegment(e,t){const r=this.segments.slice();r[e]={...r[e],...t},this.segments=r}buildEventDetail(){return{value:this.value??"",valueAsNumber:this.valueAsNumber,valueAsDate:this.valueAsDate}}emit(e){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0,detail:this.buildEventDetail()}))}commitChangeIfDirty(){const e=this.value??"";
1480void 0!==this.valueAtFocus&&e!==this.valueAtFocus&&(this.emit("change"),this.valueAtFocus=e)}increment(e,t){const r=e.type,n=this.currentTime();if("dayPeriod"!==r){const r=this.snapToStep(n,t);if(r)return this.fillSegment(e),void this.commitTime(r)}const o=this.incrementForSegment(r)*t,i={...n};switch(r){case"hour":i.hour=(n.hour+o+24)%24;break;case"minute":i.minute=(n.minute+o+60)%60;break;case"second":i.second=(n.second+o+60)%60;break;case"dayPeriod":i.hour=(n.hour+12)%24}this.fillSegment(e),this.commitTime(i)}snapToStep(e,t){const r=Number(this.step);if(!Number.isFinite(r)||r<=0)return null;const n=this.min?Vp(this.min):void 0,o=n?Wp(n):0,i=Wp(e)-o;if(i%r===0)return null;const s=((o+(1===t?Math.ceil(i/r):Math.floor(i/r))*r)%Hp+Hp)%Hp;return{hour:Math.floor(s/3600),minute:Math.floor(s%3600/60),second:s%60}}clearSegment(e){const t=this.segments.indexOf(e);if(!(t<0)){if(e.isPlaceholder&&!e.enteredKeys){const t=this.findPreviousEditable(e);return void(t&&this.focusSegmentByType(t.type))}this.patchSegment(t,{enteredKeys:"",value:void 0,text:"",isPlaceholder:!0}),this.value?(this.skipSegmentReset=!0,this.value=""):(this.internals?.setFormValue(""),this.updateValidity()),this.emit("input")}}findNextEditable(e){const t=this.segments.indexOf(e);return this.segments.slice(t+1).find(e=>"literal"!==e.type)}findPreviousEditable(e){const t=this.segments.indexOf(e);return this.segments.slice(0,t).reverse().find(e=>"literal"!==e.type)}focusSiblingSegment(e,t){const r=1===t?this.findNextEditable(e):this.findPreviousEditable(e);r&&this.focusSegmentByType(r.type)}focusSegmentByType(e){const t=this.shadowRoot?.querySelector(`[data-segment="${e}"]`);t?.focus()}updateValidity(){if(!this.internals)return;if(this.required&&!this.value)return this.validationInput.required=!0,this.validationInput.value="",void this.internals.setValidity({valueMissing:!0},this.validationInput.validationMessage,this);const e=Vp(this.value??"");if(e){const t=Wp(e),r=this.min?Vp(this.min):void 0,n=this.max?Vp(this.max):void 0;if(r&&t<Wp(r))return void this.applyNativeValidity({rangeUnderflow:!0},{min:this.min??""});if(n&&t>Wp(n))return void this.applyNativeValidity({rangeOverflow:!0},{max:this.max??""});const o=Number(this.step);if(Number.isFinite(o)&&o>0&&60!==o&&(t-(r?Wp(r):0))%o!==0)return void this.applyNativeValidity({stepMismatch:!0},{step:String(o),...this.min?{min:this.min}:{}})}this.internals.setValidity({}),this.validationInput.removeAttribute("required"),this.validationInput.removeAttribute("min"),this.validationInput.removeAttribute("max"),this.validationInput.removeAttribute("step"),this.validationInput.value=""}applyNativeValidity(e,t){this.internals&&(this.validationInput.value=this.value??"",void 0!==t.min&&(this.validationInput.min=t.min),void 0!==t.max&&(this.validationInput.max=t.max),void 0!==t.step&&(this.validationInput.step=t.step),this.internals.setValidity(e,this.validationInput.validationMessage,this))}render(){const e=!1===this.internals?.validity?.valid,t=this.segments.filter(e=>"literal"!==e.type),r=t[0]?.type;return oe`
1481      <div
1482        class="control"
1483        role="group"
1484        aria-label=${Bl(this.labelledBy?void 0:this.label)}
1485        aria-labelledby=${Bl(this.labelledBy)}
1486        aria-describedby=${Bl(this.describedBy)}
1487        aria-required=${this.required?"true":"false"}
1488        aria-invalid=${e?"true":"false"}
1489      >
1490        ${Cc(this.segments,(e,t)=>`${e.type}-${t}`,e=>{if("literal"===e.type)return oe`<span class="literal" aria-hidden="true">${e.text}</span>`;const t=e.type===r,n="dayPeriod"===e.type?"AM/PM":e.type,o=t?[n,this.label,this.timeFormatLabel].filter(Boolean).join(", "):n,i=e.isPlaceholder;return oe`
1491              <div
1492                data-segment=${e.type}
1493                class=${Tl({segment:!0,placeholder:i})}
1494                role="spinbutton"
1495                tabindex=${this.disabled?-1:0}
1496                contenteditable="false"
1497                spellcheck="false"
1498                autocapitalize="off"
1499                autocorrect="off"
1500                inputmode=${"dayPeriod"===e.type?"text":"numeric"}
1501                aria-label=${Bl(o)}
1502                aria-valuenow=${Bl(i||void 0===e.value?void 0:String(e.value))}
1503                aria-valuetext=${i?e.placeholder:e.text}
1504                aria-valuemin=${String(e.minValue)}
1505                aria-valuemax=${String(e.maxValue)}
1506                aria-disabled=${this.disabled?"true":"false"}
1507                @keydown=${t=>this.spinButtonKeyDown(e,t)}
1508                @focus=${this.handleSegmentFocus}
1509              >
1510                ${i?e.placeholder:e.text}
1511              </div>
1512            `})}
1513      </div>
1514    `}}function Gp(e={}){return vr(e),d(qp,e)}function Zp(e){return String(e).padStart(2,"0")}function Yp(e){if(!e)return;const t=/^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/.exec(e.trim());if(!t)return;const r=Number(t[1]),n=Number(t[2]),o=void 0!==t[3]?Number(t[3]):0;return r<0||r>23||n<0||n>59||o<0||o>59?void 0:{hour:r,minute:n,second:o}}function Jp(e){const t=e%12;return 0===t?12:t}function Qp(e,t){const r=e%12;return t?r+12:r}function Xp(e,t,r){const n=Math.max(1,Math.floor(r)),o=[];for(let r=e;r<=t;r+=n)o.push(r);return o}function eg(e){return 3600*e.hour+60*e.minute+e.second}qp.baseName="time-input",qp.formAssociated=!0,qp.styles=b(":host{color:var(--goto-type-color-default);font:var(--goto-body-medium);align-items:center;line-height:1;display:inline-flex}:host .control{white-space:nowrap;font-variant-numeric:tabular-nums;outline:0;align-items:baseline;display:inline-flex}:host .literal{user-select:none;white-space:pre}:host .segment{text-align:left;cursor:text;caret-color:#0000;border-radius:2px;padding:0;display:inline-block}:host .segment.placeholder{color:var(--goto-type-color-secondary)}:host .segment:focus,:host .segment:focus-visible{background:var(--goto-interactive-color-brand-hover);color:var(--goto-type-color-default-inverted,#fff);outline:none}:host([fieldsize=small]){font:var(--goto-body-small)}:host(:focus-visible){outline:none}:host([disabled]),:host([aria-disabled=true]){cursor:not-allowed;color:var(--goto-type-color-disabled)}:host([disabled]) .segment,:host([disabled]) .literal,:host([aria-disabled=true]) .segment,:host([aria-disabled=true]) .literal{color:var(--goto-type-color-disabled);pointer-events:none}"),qp.shadowRootOptions={...Zt.shadowRootOptions,delegatesFocus:!0},h([Te()],qp.prototype,"label",void 0),h([Te({attribute:"labelled-by"})],qp.prototype,"labelledBy",void 0),h([Te({attribute:"described-by"})],qp.prototype,"describedBy",void 0),h([Te({reflect:!0})],qp.prototype,"fieldsize",void 0),h([Te()],qp.prototype,"value",void 0),h([Te({attribute:"default-value"})],qp.prototype,"defaultValue",void 0),h([Te()],qp.prototype,"locale",void 0),h([Te()],qp.prototype,"min",void 0),h([Te()],qp.prototype,"max",void 0),h([Te({type:Number})],qp.prototype,"step",void 0),h([Te({attribute:"time-format-label"}
1514)],qp.prototype,"timeFormatLabel",void 0),h([Oe()],qp.prototype,"segments",void 0),Gp();let tg=0;class rg extends Zt{constructor(){super(),this.step=60,this.locale=navigator.language,this.hoursLabel="Hours",this.minutesLabel="Minutes",this.secondsLabel="Seconds",this.dayPeriodLabel="AM / PM",this.activeIds={},this.use12HourClock=!1,this.amLabel="AM",this.pmLabel="PM",this.userSelectedCols=new Set,this.cachedColumns=[],this.idBase="tm-"+ ++tg,this.menuInternals=this.attachInternals(),this.isInternalValueChange=!1,this.suppressValueDrivenReset=!1,this.menuInternals.role="group"}connectedCallback(){super.connectedCallback(),this.refreshLocale(),this.cachedColumns=this.computeColumns(),this.toggleAttribute("data-with-seconds",this.showSeconds),queueMicrotask(()=>this.scrollSelectedIntoView())}willUpdate(e){super.willUpdate?.(e),e.has("locale")&&this.refreshLocale(),e.has("groupLabel")&&(this.menuInternals.ariaLabel=this.groupLabel??null),(e.has("value")||e.has("defaultValue"))&&(this.isInternalValueChange?this.isInternalValueChange=!1:this.suppressValueDrivenReset?this.suppressValueDrivenReset=!1:Yp(this.value??this.defaultValue)?(this.userSelectedCols=new Set(["hour","minute","second","dayPeriod"]),this.partialTime=void 0):(this.userSelectedCols=new Set,this.partialTime=void 0)),(e.has("value")||e.has("defaultValue")||e.has("min")||e.has("max")||e.has("step")||e.has("locale"))&&this.recomputeColumns()}recomputeColumns(){this.cachedColumns=this.computeColumns(),this.seedActiveIdsFromSelection()}updated(e){super.updated?.(e),e.has("step")&&this.toggleAttribute("data-with-seconds",this.showSeconds),(e.has("value")||e.has("defaultValue"))&&queueMicrotask(()=>this.scrollSelectedIntoView())}refreshLocale(){if(!function(e){try{return Intl.getCanonicalLocales(e),!0}catch{return!1}}(this.locale))return void(this.use12HourClock=!1);const e=new Intl.DateTimeFormat(this.locale,{hour:"numeric"}).resolvedOptions();if(this.use12HourClock=!0===e.hour12,this.use12HourClock)try{const e=new Intl.DateTimeFormat(this.locale,{hour:"numeric",minute:"2-digit",hour12:!0}),t=e.formatToParts(new Date(1970,0,1,6)),r=e.formatToParts(new Date(1970,0,1,18));this.amLabel=t.find(e=>"dayPeriod"===e.type)?.value??"AM",this.pmLabel=r.find(e=>"dayPeriod"===e.type)?.value??"PM"}catch{this.amLabel="AM",this.pmLabel="PM"}}get effectiveStep(){const e=Number(this.step);return Number.isFinite(e)&&e>0?e:60}get showSeconds(){const e=this.effectiveStep;return e<60||e%60!=0}get hourIncrement(){const e=this.effectiveStep;return e>=3600?Math.max(1,Math.floor(e/3600)):1}get minuteIncrement(){const e=this.effectiveStep;return e<60?1:e>=3600?60:Math.max(1,Math.floor(e/60)%60||1)}get secondIncrement(){const e=this.effectiveStep;return e<60?Math.max(1,e):60}get minTime(){return Yp(this.min)}get maxTime(){return Yp(this.max)}get currentTime(){return Yp(this.value)??Yp(this.defaultValue)??this.partialTime??{hour:0,minute:0,second:0}}isOutOfRange(e){const t=eg(e);return!!(this.minTime&&t<eg(this.minTime))||!!(this.maxTime&&t>eg(this.maxTime))}computeColumns(){const e=this.currentTime,t=[],r=e=>this.userSelectedCols.has(e),n=this.use12HourClock?Xp(1,12,1):Xp(0,23,this.hourIncrement),o=Jp(e.hour);return t.push({type:"hour",items:n.map(t=>{const n=this.use12HourClock?{hour:Qp(t,e.hour>=12),minute:e.minute,second:e.second}:{hour:t,minute:e.minute,second:e.second};return{value:t,label:this.use12HourClock?String(t):Zp(t),selected:r("hour")&&(this.use12HourClock?o===t:e.hour===t),disabled:this.isOutOfRange(n)}})}),t.push({type:"minute",items:Xp(0,59,this.minuteIncrement).map(t=>({value:t,label:Zp(t),selected:r("minute")&&e.minute===t,disabled:this.isOutOfRange({hour:e.hour,minute:t,second:e.second})}))}),this.showSeconds&&t.push({type:"second",items:Xp(0,59,this.secondIncrement).map(t=>({value:t,label:Zp(t),selected:r("second")&&e.second===t,disabled:this.isOutOfRange({hour:e.hour,minute:e.minute,second:t})}))}),this.use12HourClock&&t.push({type:"dayPeriod",items:[{value:0,label:this.amLabel,selected:r("dayPeriod")&&e.hour<12,disabled:this.isOutOfRange({hour:e.hour%12,minute:e.minute,second:e.second})},{value:1,label:this.pmLabel,selected:r("dayPeriod")&&e.hour>=12,disabled:this.isOutOfRange({hour:e.hour%12+12,minute:e.minute,second:e.second})}]}),t}seedActiveIdsFromSelection(){const e={};for(const t of this.cachedColumns){const r=t.items.find(e=>e.selected);r&&(e[t.type]=this.optionId(t.type,r.value))}this.activeIds=e}optionId(e,t){return`${this.idBase}-${e}-${t}`}columnLabel(e){switch(e){case"hour":return this.hoursLabel;
1514case"minute":return this.minutesLabel;case"second":return this.secondsLabel;case"dayPeriod":return this.dayPeriodLabel}}deriveValue(e,t){const r={...this.currentTime};switch(e){case"hour":if(this.use12HourClock){const e=r.hour>=12;r.hour=Qp(t,e)}else r.hour=t;break;case"minute":r.minute=t;break;case"second":r.second=t;break;case"dayPeriod":{const e=Jp(r.hour);r.hour=Qp(e,1===t);break}}return this.showSeconds||(r.second=0),function(e,t){const r=`${Zp(e.hour)}:${Zp(e.minute)}`;return t?`${r}:${Zp(e.second)}`:r}(r,this.showSeconds)}selectItem(e,t){const r=this.deriveValue(e,t);if(void 0===r)return;const n=new Set(this.userSelectedCols);n.add(e),this.userSelectedCols=n,this.updateComplete.then(()=>{const t=this.shadowRoot?.querySelector(`.column[data-column="${e}"]`);t?.focus({preventScroll:!0})}),r!==this.value?(this.isInternalValueChange=!0,this.value=r):this.recomputeColumns(),this.dispatchEvent(new CustomEvent("time-select",{detail:{value:r,column:e,columnValue:t},bubbles:!0,composed:!0}))}scrollSelectedIntoView(){if(this.shadowRoot)for(const e of Object.values(this.activeIds))e&&this.shadowRoot.getElementById(e)?.scrollIntoView({block:"nearest"})}focusFirstColumn(e=!1){if(e&&0===this.userSelectedCols.size){const e={};for(const t of this.cachedColumns){const r=t.items.find(e=>!e.disabled);r&&(e[t.type]=this.optionId(t.type,r.value))}this.activeIds=e}const t=this.shadowRoot?.querySelector(".column");t?.focus()}syncFromInputSegments(e){const t={...this.currentTime},r=new Set;if(void 0!==e.hour&&(r.add("hour"),t.hour=this.use12HourClock?Qp(e.hour,1===(e.dayPeriod??(t.hour>=12?1:0))):e.hour),void 0!==e.minute&&(r.add("minute"),t.minute=e.minute),void 0!==e.second&&(r.add("second"),t.second=e.second),void 0!==e.dayPeriod&&(r.add("dayPeriod"),this.use12HourClock)){const r=e.hour??Jp(t.hour);t.hour=Qp(r,1===e.dayPeriod)}this.userSelectedCols=r,this.partialTime=r.size>0?t:void 0,this.suppressValueDrivenReset=!0,this.recomputeColumns()}columnKeyDown(e,t){const r=e.items;if(!r.length)return;const n=t=>{t>=0&&t<r.length&&this.setActive(e.type,this.optionId(e.type,r[t].value))},o=(()=>{const t=this.activeIds[e.type];return t?r.findIndex(r=>this.optionId(e.type,r.value)===t):r.findIndex(e=>e.selected)})(),i=Math.max(0,o);switch(t.key){case"ArrowDown":return t.preventDefault(),void n(this.findEnabled(r,i,1));case"ArrowUp":return t.preventDefault(),void n(this.findEnabled(r,i,-1));case"Home":return t.preventDefault(),void n(this.findEnabled(r,-1,1));case"End":return t.preventDefault(),void n(this.findEnabled(r,r.length,-1));case"ArrowLeft":case"ArrowRight":return t.preventDefault(),void this.focusSiblingColumn(e.type,"ArrowRight"===t.key?1:-1);case"Enter":case" ":{t.preventDefault();const n=r[i];return void(n&&!n.disabled&&this.selectItem(e.type,n.value))}case"Escape":return t.preventDefault(),void this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}));case"Tab":return}}findEnabled(e,t,r){for(let n=t+r;n>=0&&n<e.length;n+=r)if(!e[n].disabled)return n;return-1}setActive(e,t){this.activeIds={...this.activeIds,[e]:t},queueMicrotask(()=>{this.shadowRoot?.getElementById(t)?.scrollIntoView({block:"nearest"})})}focusSiblingColumn(e,t){const r=Array.from(this.shadowRoot?.querySelectorAll(".column")??[]),n=r.findIndex(t=>t.dataset.column===e),o=r[n+t];if(!o)return;const i=o.dataset.column;if(i){const t=this.pickAlignedItem(e,o)??this.pickFallbackItem(i);t&&(this.activeIds={...this.activeIds,[i]:t})}o.focus(),this.updateComplete.then(()=>this.scrollSelectedIntoView())}pickAlignedItem(e,t){const r=this.activeIds[e];if(!r)return;const n=this.shadowRoot?.getElementById(r);if(!n)return;const o=n.getBoundingClientRect(),i=o.top+o.height/2,s=Array.from(t.querySelectorAll(".item:not(.item--disabled)")).map(e=>{const t=e.getBoundingClientRect();return{el:e,dist:Math.abs(t.top+t.height/2-i)}}).sort((e,t)=>e.dist-t.dist);return s[0]?.el.id}pickFallbackItem(e){const t=this.cachedColumns.find(t=>t.type===e),r=t?.items.find(e=>e.selected)??t?.items.find(e=>!e.disabled);return r?this.optionId(e,r.value):void 0}render(){const e=Oi(u(mr)),t=this.cachedColumns;return Ni`
1515      ${Cc(t,e=>e.type,t=>oe`
1516          <ul
1517            class="column"
1518            data-column=${t.type}
1519            role="listbox"
1520            aria-label=${this.columnLabel(t.type)}
1521            tabindex="0"
1522            aria-activedescendant=${Bl(this.activeIds[t.type])}
1523            @keydown=${e=>this.columnKeyDown(t,e)}
1524          >
1525            ${Cc(t.items,e=>e.value,r=>{const n=this.optionId(t.type,r.value),o=this.activeIds[t.type]===n;return oe`
1526                  <li
1527                    id=${n}
1528                    class=${Tl({item:!0,"item--selected":r.selected,"item--active":o,"item--disabled":r.disabled})}
1529                    role="option"
1530                    aria-selected=${r.selected?"true":"false"}
1531                    aria-disabled=${r.disabled?"true":"false"}
1532                    @click=${()=>!r.disabled&&this.selectItem(t.type,r.value)}
1533                    @mousedown=${e=>e.preventDefault()}
1534                  >
1535                    ${r.selected?Ni`<${e} class="check" aria-hidden="true">${Mi(kl)}</${e}>`:null}
1536                    <span class="item-label">${r.label}</span>
1537                  </li>
1538                `})}
1539          </ul>
1540        `)}
1541    `}}function ng(e={}){return vr(e),d(rg,e)}function og(e){return 3600*e.hour+60*e.minute+e.second}rg.baseName="time-menu",rg.styles=b(":host{--time-menu-item-height:32px;--time-menu-item-font:var(--goto-body-small);--time-menu-item-padding-block:var(--goto-spacing-01);background-color:var(--goto-surface-color-default);border:1px solid var(--goto-border-color-default);border-radius:var(--goto-radius-medium);box-shadow:var(--goto-elevation-small);width:320px;max-height:calc(var(--time-menu-item-height)*4);box-sizing:border-box;color:var(--goto-type-color-default);font:var(--goto-body-medium);align-items:stretch;display:inline-flex;overflow:hidden}:host([data-with-seconds]){width:400px}:host([fieldsize=small]){--time-menu-item-height:24px;--time-menu-item-font:var(--goto-caption-medium);--time-menu-item-padding-block:0px}:host([fieldsize=large]),:host([fieldsize=xlarge]){--time-menu-item-height:var(--goto-spacing-08);--time-menu-item-font:var(--goto-body-medium)}.column{box-sizing:border-box;flex:1 1 0;min-width:0;margin:0;padding:0;list-style:none;overflow-y:scroll}.column:not(:first-child){border-inline-start:1px solid var(--goto-border-color-default)}.column:focus,.column:focus-visible{outline:none}.item{align-items:center;gap:var(--goto-spacing-01);height:var(--time-menu-item-height);padding-block:var(--time-menu-item-padding-block);font:var(--time-menu-item-font);color:var(--goto-type-color-default);cursor:pointer;user-select:none;box-sizing:border-box;background-color:#0000;padding-inline-start:var(--goto-spacing-03);padding-inline-end:var(--goto-spacing-04);display:flex}.item:hover{background-color:var(--goto-surface-color-secondary)}.item .check{--goto-icon-size:1.25rem;width:1.25rem;height:1.25rem;color:var(--goto-icon-color-default);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.item .item-label{line-height:var(--goto-spacing-05);text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.column:focus-within .item--active,.item--selected{background-color:var(--goto-surface-color-secondary)}.item--disabled{color:var(--goto-type-color-disabled);cursor:not-allowed;pointer-events:none}"),h([Te()],rg.prototype,"value",void 0),h([Te({attribute:"default-value"})],rg.prototype,"defaultValue",void 0),h([Te()],rg.prototype,"min",void 0),h([Te()],rg.prototype,"max",void 0),h([Te({type:Number})],rg.prototype,"step",void 0),h([Te()],rg.prototype,"locale",void 0),h([Te({reflect:!0})],rg.prototype,"fieldsize",void 0),h([Te({attribute:"group-label"})],rg.prototype,"groupLabel",void 0),h([Te({attribute:"hours-label"})],rg.prototype,"hoursLabel",void 0),h([Te({attribute:"minutes-label"})],rg.prototype,"minutesLabel",void 0),h([Te({attribute:"seconds-label"})],rg.prototype,"secondsLabel",void 0),h([Te({attribute:"day-period-label"})],rg.prototype,"dayPeriodLabel",void 0),h([Oe()],rg.prototype,"activeIds",void 0),h([Oe()],rg.prototype,"use12HourClock",void 0),h([Oe()],rg.prototype,"amLabel",void 0),h([Oe()],rg.prototype,"pmLabel",void 0),h([Oe()],rg.prototype,"userSelectedCols",void 0),h([Oe
1541()],rg.prototype,"partialTime",void 0),ng();let ig=0;class sg extends Zt{get labelId(){return`${this.idBase}-label`}get helperId(){return`${this.idBase}-helper`}get dropdownId(){return`${this.idBase}-dropdown`}constructor(){super(),this.internals=this.attachInternals(),this.locale=navigator.language,this.step=60,this.dropdownToggleLabel="Toggle time picker",this.hoursLabel="Hours",this.minutesLabel="Minutes",this.secondsLabel="Seconds",this.dayPeriodLabel="AM / PM",this.open=!1,this.hasSlottedHelpertext=!1,this.idBase="tp-"+ ++ig,this.handleHelpertextSlotChange=e=>{const t=e.target;this.hasSlottedHelpertext=t.assignedNodes({flatten:!0}).length>0},this.handleHostFocusOut=e=>{const t=e.relatedTarget;t&&this.contains(t)||this.setOpen(!1)},this.handleDocumentPointerDown=e=>{e.composedPath().includes(this)||this.setOpen(!1)},this.handleInnerInput=e=>{e.stopPropagation(),this.value=e.detail.value,this.syncMenuFromInnerSegments(),this.updateValidity(),this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,detail:e.detail}))},this.handleInnerChange=e=>{e.stopPropagation(),this.value=e.detail.value,this.syncMenuFromInnerSegments(),this.updateValidity(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:e.detail}))},this.toggleOpen=e=>{if(e.stopPropagation(),this.disabled)return;const t=e instanceof MouseEvent&&0===e.detail;this.setOpen(!this.open,{viaKeyboard:t})},this.handleMenuSelect=e=>{if(e.stopPropagation(),this.disabled)return;const t=this.value??"";this.innerTimeInput?.setSegmentValue(e.detail.column,e.detail.columnValue);const r=this.value??"";r!==t&&(this.valueAtOpen=r,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:this.buildDetail()})))},this.handleMenuClose=e=>{e.stopPropagation(),this.setOpen(!1),queueMicrotask(()=>this.trigger?.focus())},this.addEventListener("focusout",this.handleHostFocusOut)}formResetCallback(){const e=this.defaultValue??"";this.value=e,this.innerTimeInput&&(this.innerTimeInput.value=e),this.updateValidity()}formDisabledCallback(e){this.disabled=e||void 0}get form(){return this.internals.form}updateValidity(){const e=this.innerTimeInput;if(!e?.internals)return void this.internals.setValidity({});const t=e.validity,r={valueMissing:t.valueMissing,rangeUnderflow:t.rangeUnderflow,rangeOverflow:t.rangeOverflow,stepMismatch:t.stepMismatch,badInput:t.badInput,typeMismatch:t.typeMismatch,patternMismatch:t.patternMismatch,tooLong:t.tooLong,tooShort:t.tooShort,customError:t.customError};this.internals.setValidity(r,e.validationMessage||void 0,e)}checkValidity(){return this.internals.checkValidity()}reportValidity(){return this.internals.reportValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}get willValidate(){return this.internals.willValidate}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.handleDocumentPointerDown,!0)}connectedCallback(){super.connectedCallback(),this.internals.setFormValue(this.value??this.defaultValue??null)}updated(e){super.updated?.(e),e.has("open")&&(this.open?document.addEventListener("mousedown",this.handleDocumentPointerDown,!0):document.removeEventListener("mousedown",this.handleDocumentPointerDown,!0)),(e.has("value")||e.has("defaultValue")||e.has("required")||e.has("min")||e.has("max")||e.has("step")||e.has("disabled"))&&this.innerTimeInput?.updateComplete.then(()=>this.updateValidity())}willUpdate(e){super.willUpdate?.(e),e.has("disabled")&&this.disabled&&this.open&&this.setOpen(!1),(e.has("value")||e.has("defaultValue"))&&this.internals.setFormValue(this.value??this.defaultValue??null)}syncMenuFromInnerSegments(){const e=this.innerTimeInput,t=this.menuEl;e&&t&&t.syncFromInputSegments({hour:e.getSegmentValue("hour"),minute:e.getSegmentValue("minute"),second:e.getSegmentValue("second"),dayPeriod:e.getSegmentValue("dayPeriod")})}buildDetail(){const e=function(e){if(!e)return;const t=/^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/.exec(e.trim());if(!t)return;const r=Number(t[1]),n=Number(t[2]),o=void 0!==t[3]?Number(t[3]):0;return r<0||r>23||n<0||n>59||o<0||o>59?void 0:{hour:r,minute:n,second:o}}(this.value);return{value:this.value??"",valueAsNumber:e?1e3*og(e):Number.NaN,valueAsDate:e?new Date(Date.UTC(1970,0,1,e.hour,e.minute,e.second)):null}}setOpen(e,t={}){if(e!==this.open)if(e)this.valueAtOpen=this.value??this.defaultValue??"",this.open=!0,this.updateComplete.then(()=>
1541{this.syncMenuFromInnerSegments(),this.menuEl?.focusFirstColumn(t.viaKeyboard)});else{const e=this.valueAtOpen;this.open=!1;const t=this.value??this.defaultValue??"";void 0!==e&&e!==t&&this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:this.buildDetail()})),this.valueAtOpen=void 0}}render(){const e=Oi(u(qp)),t=Oi(u(rg)),r=Oi(u(mr)),n=this.helperText||this.hasSlottedHelpertext?this.helperId:void 0;return Ni`
1542      ${this.inputLabel?oe`<span class="label" id=${this.labelId} part="label">${this.inputLabel}${this.required?oe`<span aria-hidden="true"> *</span>`:null}</span>`:null}
1543      <div class="field-wrapper">
1544        <div
1545          class=${Tl({root:!0,error:!!this.error,success:!!this.success,disabled:!!this.disabled,open:this.open})}
1546          part="root"
1547        >
1548          <slot name="start"></slot>
1549          <${e}
1550            id="chameleon-tp-input"
1551            class="time-input"
1552            label=${Bl(this.inputLabel)}
1553            labelled-by=${Bl(this.inputLabel?this.labelId:void 0)}
1554            described-by=${Bl(n)}
1555            fieldsize=${Bl(this.fieldsize)}
1556            value=${Bl(this.value)}
1557            default-value=${Bl(this.defaultValue)}
1558            locale=${Bl(this.locale)}
1559            min=${Bl(this.min)}
1560            max=${Bl(this.max)}
1561            step=${Bl(this.step)}
1562            time-format-label=${Bl(this.timeFormatLabel)}
1563            ?disabled=${this.disabled}
1564            ?required=${this.required}
1565            @input=${this.handleInnerInput}
1566            @change=${this.handleInnerChange}
1567          ></${e}>
1568          ${this.error?Ni`<${r} class="status-icon status-icon--error" aria-hidden="true">${Mi(Cl)}</${r}>`:this.success?Ni`<${r} class="status-icon status-icon--success" aria-hidden="true">${Mi(kl)}</${r}>`:null}
1569          <slot name="end"></slot>
1570          <button
1571            type="button"
1572            class="dropdown-trigger"
1573            aria-label=${this.dropdownToggleLabel}
1574            aria-haspopup="listbox"
1575            aria-controls=${this.dropdownId}
1576            aria-expanded=${this.open?"true":"false"}
1577            ?disabled=${this.disabled}
1578            @click=${this.toggleOpen}
1579            @mousedown=${e=>e.preventDefault()}
1580          >
1581            ${Ni`<${r} aria-hidden="true">${Mi(this.open?di:ci)}</${r}>`}
1582          </button>
1583        </div>
1584        ${this.open?Ni`
1585                <${t}
1586                  id=${this.dropdownId}
1587                  class="time-menu"
1588                  group-label=${Bl(this.inputLabel??this.dropdownToggleLabel)}
1589                  value=${Bl(this.value)}
1590                  default-value=${Bl(this.defaultValue)}
1591                  min=${Bl(this.min)}
1592                  max=${Bl(this.max)}
1593                  step=${Bl(this.step)}
1594                  locale=${Bl(this.locale)}
1595                  fieldsize=${Bl(this.fieldsize)}
1596                  hours-label=${this.hoursLabel}
1597                  minutes-label=${this.minutesLabel}
1598                  seconds-label=${this.secondsLabel}
1599                  day-period-label=${this.dayPeriodLabel}
1600                  @time-select=${this.handleMenuSelect}
1601                  @close=${this.handleMenuClose}
1602                ></${t}>
1603              `:null}
1604      </div>
1605      ${oe`<span class="helpertext" id=${this.helperId}><slot name="helpertext" @slotchange=${this.handleHelpertextSlotChange}>${this.helperText??""}</slot></span>`}
1606    `}}function ag(e){if(!e)return;const t=/^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/.exec(e.trim());if(!t)return;const r=Number(t[1]),n=Number(t[2]),o=void 0!==t[3]?Number(t[3]):0;return r<0||r>23||n<0||n>59||o<0||o>59?void 0:{hour:r,minute:n,second:o}}function lg(e){return 3600*e.hour+60*e.minute+e.second}sg.baseName="time-picker",sg.formAssociated=!0,sg.styles=b(":host{gap:var(--goto-spacing-01);font:var(--goto-body-medium);color:var(--goto-type-color-default);flex-direction:column;display:inline-flex}:host .label{font:var(--goto-caption-medium-strong);display:block}:host .root{border-style:solid;border-width:1px;border-color:var(--goto-border-color-default);border-radius:var(--goto-radius-small);color:var(--goto-type-color-default);font:var(--goto-body-medium);height:var(--goto-spacing-07);padding:var(--goto-spacing-01)var(--goto-spacing-02)var(--goto-spacing-01)var(--goto-spacing-03);box-sizing:border-box;background-color:var(--goto-surface-color-default);align-self:flex-start;align-items:center;gap:var(--goto-spacing-01);outline:0;display:inline-flex}:host .field-wrapper{flex-direction:column;align-self:stretch;display:inline-flex;position:relative}:host .time-input{flex:1}:host .dropdown-trigger{appearance:none;color:var(--goto-icon-color-default);cursor:pointer;border-radius:var(--goto-radius-small);--goto-icon-size:1rem;background:0 0;border:0;
1606justify-content:center;align-items:center;padding:0;display:inline-flex}:host .dropdown-trigger:hover:not(:disabled){color:var(--goto-icon-color-default-hover,var(--goto-icon-color-default))}:host .dropdown-trigger:focus-visible{outline:2px solid var(--goto-focus-color-highlight-default);outline-offset:2px}:host .dropdown-trigger:disabled{cursor:not-allowed;color:var(--goto-icon-color-disabled)}:host .time-menu{top:calc(100% + var(--goto-spacing-01));z-index:1000;position:absolute;inset-inline-start:0}:host ::slotted([slot=helpertext]),:host slot[name=helpertext]{color:var(--goto-type-color-secondary);font:var(--goto-caption-medium);display:block}:host ::slotted([slot=start]),:host ::slotted([slot=end]){align-items:center;display:inline-flex}:host ::slotted([slot=start]){margin-inline-end:var(--goto-spacing-01)}:host ::slotted([slot=end]){margin-inline-start:var(--goto-spacing-01)}:host .status-icon{--goto-icon-size:1rem;flex-shrink:0;align-items:center;display:inline-flex}:host .status-icon--error{--goto-icon-color:var(--goto-icon-color-danger);color:var(--goto-icon-color-danger)}:host .status-icon--success{--goto-icon-color:var(--goto-icon-color-success);color:var(--goto-icon-color-success)}:host(:focus-within) .root{outline-offset:2px;outline:1px solid var(--goto-focus-color-highlight-default)}:host([fullwidth]),:host([fullwidth]) .root{width:100%}:host([fieldsize=small]) .root{font:var(--goto-body-small);height:var(--goto-spacing-06)}:host([fieldsize=large]) .root,:host([fieldsize=xlarge]) .root{gap:var(--goto-spacing-02)}:host([fieldsize=large]) .root{height:var(--goto-spacing-08)}:host([fieldsize=large]) .root .status-icon{--goto-icon-size:1.5rem}:host([fieldsize=xlarge]) .root{height:var(--goto-spacing-09)}:host([fieldsize=xlarge]) .root .status-icon,:host([fieldsize=xlarge]) .root .dropdown-trigger{--goto-icon-size:1.5rem}:host([success]) .root{border-color:var(--goto-border-color-success)}:host([success]) ::slotted([slot=helpertext]),:host([success]) slot[name=helpertext]{color:var(--goto-type-color-success)}:host([success]:focus-within) .root{outline-color:var(--goto-focus-color-highlight-success)}:host([error]) .root{border-color:var(--goto-border-color-danger)}:host([error]) ::slotted([slot=helpertext]),:host([error]) slot[name=helpertext]{color:var(--goto-type-color-danger)}:host([error]:focus-within) .root{outline-color:var(--goto-focus-color-highlight-danger)}:host([disabled]),:host([aria-disabled=true]){cursor:not-allowed}:host([disabled]) .root,:host([aria-disabled=true]) .root{border-color:var(--goto-border-color-default);background-color:var(--goto-surface-color-secondary);box-shadow:none;color:var(--goto-type-color-disabled);pointer-events:none}:host([disabled]) .label,:host([aria-disabled=true]) .label{color:var(--goto-type-color-disabled)}"),sg.shadowRootOptions={...Zt.shadowRootOptions,delegatesFocus:!0},h([Te({attribute:"input-label"})],sg.prototype,"inputLabel",void 0),h([Te({attribute:"helper-text"})],sg.prototype,"helperText",void 0),h([Te({reflect:!0})],sg.prototype,"fieldsize",void 0),h([Te()],sg.prototype,"value",void 0),h([Te({attribute:"default-value"})],sg.prototype,"defaultValue",void 0),h([Te({type:Boolean,reflect:!0})],sg.prototype,"disabled",void 0),h([Te({type:Boolean,reflect:!0})],sg.prototype,"required",void 0),h([Te({type:Boolean,reflect:!0})],sg.prototype,"error",void 0),h([Te({type:Boolean,reflect:!0})],sg.prototype,"success",void 0),h([Te({type:Boolean,reflect:!0})],sg.prototype,"fullwidth",void 0),h([Te()],sg.prototype,"locale",void 0),h([Te()],sg.prototype,"min",void 0),h([Te()],sg.prototype,"max",void 0),h([Te({type:Number})],sg.prototype,"step",void 0),h([Te()],sg.prototype,"name",void 0),h([Te({attribute:"time-format-label"})],sg.prototype,"timeFormatLabel",void 0),h([Te({attribute:"dropdown-toggle-label"})],sg.prototype,"dropdownToggleLabel",void 0),h([Te({attribute:"hours-label"})],sg.prototype,"hoursLabel",void 0),h([Te({attribute:"minutes-label"})],sg.prototype,"minutesLabel",void 0),h([Te({attribute:"seconds-label"})],sg.prototype,"secondsLabel",void 0),h([Te({attribute:"day-period-label"}
1606)],sg.prototype,"dayPeriodLabel",void 0),h([Oe()],sg.prototype,"open",void 0),h([Oe()],sg.prototype,"hasSlottedHelpertext",void 0),h([$e(".dropdown-trigger")],sg.prototype,"trigger",void 0),h([$e(".time-input")],sg.prototype,"innerTimeInput",void 0),h([$e(".time-menu")],sg.prototype,"menuEl",void 0),function(e={}){vr(e),Gp(e),ng(e),d(sg,e)}();let cg=0;class dg extends Zt{get labelId(){return`${this.idBase}-label`}get helperId(){return`${this.idBase}-helper`}get startDropdownId(){return`${this.idBase}-start-dropdown`}get endDropdownId(){return`${this.idBase}-end-dropdown`}constructor(){super(),this.internals=this.attachInternals(),this.locale=navigator.language,this.step=60,this.startLabelSuffix="start",this.endLabelSuffix="end",this.validateOrder=!1,this.orderValidationMessage="End time must be on or after the start time.",this.startDropdownToggleLabel="Toggle start time picker",this.endDropdownToggleLabel="Toggle end time picker",this.hoursLabel="Hours",this.minutesLabel="Minutes",this.secondsLabel="Seconds",this.dayPeriodLabel="AM / PM",this.orderInvalid=!1,this.hasSlottedHelpertext=!1,this.openSide=null,this.idBase="trp-"+ ++cg,this.handleStartInput=e=>this.onInnerEvent("start","input",e),this.handleStartChange=e=>this.onInnerEvent("start","change",e),this.handleEndInput=e=>this.onInnerEvent("end","input",e),this.handleEndChange=e=>this.onInnerEvent("end","change",e),this.handleHelpertextSlotChange=e=>{const t=e.target;this.hasSlottedHelpertext=t.assignedNodes({flatten:!0}).length>0},this.handleHostFocusOut=e=>{const t=e.relatedTarget;t&&this.contains(t)||this.setOpen(null)},this.handleDocumentPointerDown=e=>{e.composedPath().includes(this)||this.setOpen(null)},this.handleStartToggle=e=>this.toggleSide("start",e),this.handleEndToggle=e=>this.toggleSide("end",e),this.handleMenuSelect=e=>{if(e.stopPropagation(),this.disabled||!this.openSide)return;const t=this.openSide,r="start"===t?this.startInputEl:this.endInputEl;if(!r)return;const n=this.getSideValue(t);r.setSegmentValue(e.detail.column,e.detail.columnValue);const o=this.getSideValue(t);o!==n&&(this.valueAtOpen=o,this.dispatchChange())},this.handleMenuClose=e=>{e.stopPropagation();const t="start"===this.openSide?this.startTrigger:this.endTrigger;this.setOpen(null),queueMicrotask(()=>t?.focus())},this.addEventListener("focusout",this.handleHostFocusOut)}formResetCallback(){this.start=this.startDefault??"",this.end=this.endDefault??"",this.recomputeOrderValidity(),this.syncFormValue()}formDisabledCallback(e){this.disabled=e||void 0}get form(){return this.internals.form}connectedCallback(){super.connectedCallback(),void 0===this.start&&this.startDefault&&(this.start=this.startDefault),void 0===this.end&&this.endDefault&&(this.end=this.endDefault),this.syncFormValue()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.handleDocumentPointerDown,!0)}willUpdate(e){super.willUpdate?.(e),e.has("start")||e.has("end")||e.has("validateOrder")?(this.recomputeOrderValidity(),this.syncFormValue()):e.has("name")&&this.syncFormValue(),e.has("disabled")&&this.disabled&&this.openSide&&this.setOpen(null)}updated(e){super.updated?.(e),this.toggleAttribute("data-error",this.effectiveError),this.toggleAttribute("data-success",!!this.success&&!this.effectiveError),e.has("openSide")&&(this.openSide?document.addEventListener("mousedown",this.handleDocumentPointerDown,!0):document.removeEventListener("mousedown",this.handleDocumentPointerDown,!0)),(e.has("start")||e.has("end")||e.has("validateOrder")||e.has("required")||e.has("min")||e.has("max")||e.has("step")||e.has("disabled"))&&this.updateValidityFromInputs()}recomputeOrderValidity(){if(!this.validateOrder)return void(this.orderInvalid=!1);const e=ag(this.start),t=ag(this.end);this.orderInvalid=!!e&&!!t&&lg(t)<lg(e)}syncFormValue(){const e=this.start??"",t=this.end??"";if(!e&&!t)return void this.internals.setFormValue(null,null);const r=this.name?`${this.name}.`:"",n=new FormData;n.append(`${r}start`,e),n.append(`${r}end`,t),this.internals.setFormValue(n,`${e}/${t}`)}async updateValidityFromInputs(){await Promise.all([this.startInputEl?.updateComplete,this.endInputEl?.updateComplete].filter(
1606Boolean)),this.updateValidity()}updateValidity(){const e=this.startInputEl?.validity,t=this.endInputEl?.validity,r={valueMissing:!!e?.valueMissing||!!t?.valueMissing,rangeUnderflow:!!e?.rangeUnderflow||!!t?.rangeUnderflow,rangeOverflow:!!e?.rangeOverflow||!!t?.rangeOverflow,stepMismatch:!!e?.stepMismatch||!!t?.stepMismatch,badInput:!!e?.badInput||!!t?.badInput,customError:this.orderInvalid||!!e?.customError||!!t?.customError};if(!Object.values(r).some(Boolean))return void this.internals.setValidity({});let n,o="";this.orderInvalid?(o=this.orderValidationMessage,n=this.endInputEl??void 0):e&&!e.valid?(o=this.startInputEl?.validationMessage??"",n=this.startInputEl??void 0):t&&!t.valid&&(o=this.endInputEl?.validationMessage??"",n=this.endInputEl??void 0),this.internals.setValidity(r,o||void 0,n)}checkValidity(){return this.internals.checkValidity()}reportValidity(){return this.internals.reportValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}get willValidate(){return this.internals.willValidate}get effectiveError(){return!!this.error||this.orderInvalid}buildDetail(){return{start:this.start??"",end:this.end??""}}getSideValue(e){return("start"===e?this.start:this.end)??""}dispatchChange(){this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:this.buildDetail()}))}onInnerEvent(e,t,r){r.stopPropagation(),"start"===e?this.start=r.detail.value:this.end=r.detail.value,"input"===t&&this.openSide===e&&this.syncMenuFromInputSegments(),"change"===t&&this.openSide===e&&(this.valueAtOpen=this.getSideValue(e)),this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:this.buildDetail()}))}setOpen(e,t={}){if(e===this.openSide)return;if(e)return this.valueAtOpen=this.getSideValue(e),this.openSide=e,void this.updateComplete.then(()=>{this.syncMenuFromInputSegments(),this.menuEl?.focusFirstColumn(t.viaKeyboard)});const r=this.openSide,n=this.valueAtOpen;this.openSide=null,this.valueAtOpen=void 0,void 0!==n&&n!==this.getSideValue(r)&&this.dispatchChange()}toggleSide(e,t){if(t.stopPropagation(),this.disabled)return;const r=t instanceof MouseEvent&&0===t.detail;this.setOpen(this.openSide===e?null:e,{viaKeyboard:r})}syncMenuFromInputSegments(){if(!this.openSide)return;const e="start"===this.openSide?this.startInputEl:this.endInputEl;e&&this.menuEl&&this.menuEl.syncFromInputSegments({hour:e.getSegmentValue("hour"),minute:e.getSegmentValue("minute"),second:e.getSegmentValue("second"),dayPeriod:e.getSegmentValue("dayPeriod")})}render(){const e=Oi(u(qp)),t=Oi(u(rg)),r=Oi(u(mr)),n=this.effectiveError,o=!!this.success&&!n,i=this.startInputLabel??(this.inputLabel?`${this.inputLabel} ${this.startLabelSuffix}`:"Start time"),s=this.endInputLabel??(this.inputLabel?`${this.inputLabel} ${this.endLabelSuffix}`:"End time"),a=this.helperText||this.hasSlottedHelpertext?this.helperId:void 0,l="start"===this.openSide,c="end"===this.openSide,d=l?this.start:this.end,h=l?this.startDefault:this.endDefault,p=l?i:s;return Ni`
1607      ${this.inputLabel?oe`<span class="label" id=${this.labelId} part="label">${this.inputLabel}${this.required?oe`<span aria-hidden="true"> *</span>`:null}</span>`:null}
1608      <div class="field-wrapper">
1609        <div
1610          class="row"
1611          part="row"
1612          role=${Bl(this.inputLabel?"group":void 0)}
1613          aria-labelledby=${Bl(this.inputLabel?this.labelId:void 0)}
1614        >
1615          <div class=${Tl({segment:!0,start:!0,open:l})}>
1616            <${e}
1617              class="time-input start"
1618              label=${i}
1619              described-by=${Bl(a)}
1620              fieldsize=${Bl(this.fieldsize)}
1621              value=${Bl(this.start)}
1622              locale=${Bl(this.locale)}
1623              min=${Bl(this.min)}
1624              max=${Bl(this.max)}
1625              step=${Bl(this.step)}
1626              ?disabled=${this.disabled}
1627              ?required=${this.required}
1628              @input=${this.handleStartInput}
1629              @change=${this.handleStartChange}
1630            ></${e}>
1631            <button
1632              type="button"
1633              class="dropdown-trigger start"
1634              aria-label=${this.startDropdownToggleLabel}
1635              aria-haspopup="listbox"
1636              aria-controls=${this.startDropdownId}
1637              aria-expanded=${l?"true":"false"}
1638              ?disabled=${this.disabled}
1639              @click=${this.handleStartToggle}
1640              @mousedown=${e=>e.preventDefault()}
1641            >
1642              ${Ni`<${r} aria-hidden="true">${Mi(l?di:ci)}</${r}>`}
1643            </button>
1644          </div>
1645          <span class="separator" aria-hidden="true">-</span>
1646          <div class=${Tl({segment:!0,end:!0,open:c})}>
1647            <${e}
1648              class="time-input end"
1649              label=${s}
1650              described-by=${Bl(a)}
1651              fieldsize=${Bl(this.fieldsize)}
1652              value=${Bl(this.end)}
1653              locale=${Bl(this.locale)}
1654              min=${Bl(this.min)}
1655              max=${Bl(this.max)}
1656              step=${Bl(this.step)}
1657              ?disabled=${this.disabled}
1658              ?required=${this.required}
1659              @input=${this.handleEndInput}
1660              @change=${this.handleEndChange}
1661            ></${e}>
1662            <button
1663              type="button"
1664              class="dropdown-trigger end"
1665              aria-label=${this.endDropdownToggleLabel}
1666              aria-haspopup="listbox"
1667              aria-controls=${this.endDropdownId}
1668              aria-expanded=${c?"true":"false"}
1669              ?disabled=${this.disabled}
1670              @click=${this.handleEndToggle}
1671              @mousedown=${e=>e.preventDefault()}
1672            >
1673              ${Ni`<${r} aria-hidden="true">${Mi(c?di:ci)}</${r}>`}
1674            </button>
1675          </div>
1676          ${n?Ni`<${r} class="status-icon status-icon--error" aria-hidden="true">${Mi(Cl)}</${r}>`:o?Ni`<${r} class="status-icon status-icon--success" aria-hidden="true">${Mi(kl)}</${r}>`:null}
1677        </div>
1678        ${this.openSide?Ni`
1679                <${t}
1680                  id=${l?this.startDropdownId:this.endDropdownId}
1681                  class=${`time-menu ${this.openSide}`}
1682                  group-label=${Bl(p)}
1683                  value=${Bl(d)}
1684                  default-value=${Bl(h)}
1685                  min=${Bl(this.min)}
1686                  max=${Bl(this.max)}
1687                  step=${Bl(this.step)}
1688                  locale=${Bl(this.locale)}
1689                  fieldsize=${Bl(this.fieldsize)}
1690                  hours-label=${this.hoursLabel}
1691                  minutes-label=${this.minutesLabel}
1692                  seconds-label=${this.secondsLabel}
1693                  day-period-label=${this.dayPeriodLabel}
1694                  @time-select=${this.handleMenuSelect}
1695                  @close=${this.handleMenuClose}
1696                ></${t}>
1697              `:null}
1698      </div>
1699      ${oe`<span class="helpertext" id=${this.helperId}><slot name="helpertext" @slotchange=${this.handleHelpertextSlotChange}>${this.helperText??""}</slot></span>`}
1700    `}}dg.baseName="time-range-picker",dg.formAssociated=!0,dg.styles=b(":host{gap:var(--goto-spacing-01);font:var(--goto-body-medium);color:var(--goto-type-color-default);flex-direction:column;display:inline-flex}:host .label{font:var(--goto-caption-medium-strong);display:block}:host .field-wrapper{flex-direction:column;align-self:stretch;display:inline-flex;position:relative}:host .row{border-style:solid;border-width:1px;border-color:var(--goto-border-color-default);border-radius:var(--goto-radius-small);background-color:var(--goto-surface-color-default);height:var(--goto-spacing-07);padding:0 var(--goto-spacing-02)0 var(--goto-spacing-03);box-sizing:border-box;align-self:flex-start;align-items:center;gap:var(--goto-spacing-02);outline:0;display:inline-flex}:host .segment{align-items:center;gap:var(--goto-spacing-01);padding:var(--goto-spacing-01);border-radius:var(--goto-radius-small);flex:0 auto;min-width:0;display:inline-flex}:host .time-input{flex:0 auto;min-width:0}:host .separator{color:var(--goto-type-color-secondary);user-select:none;flex-shrink:0;line-height:1}:host .dropdown-trigger{appearance:none;color:var(--goto-icon-color-default);cursor:pointer;border-radius:var(--goto-radius-small);--goto-icon-size:1rem;background:0 0;border:0;justify-content:center;align-items:center;padding:0;display:inline-flex}:host .dropdown-trigger:hover:not(:disabled){color:var(--goto-icon-color-default-hover,var(--goto-icon-color-default))}:host .dropdown-trigger:focus-visible{outline:2px solid var(--goto-focus-color-highlight-default);outline-offset:2px}:host .dropdown-trigger:disabled{cursor:not-allowed;color:var(--goto-icon-color-disabled)}:host .time-menu{top:calc(100% + var(--goto-spacing-01));z-index:1000;position:absolute;inset-inline-start:0}:host .status-icon{--goto-icon-size:1rem;flex-shrink:0;align-items:center;margin-inline-start:auto;display:inline-flex}:host .status-icon--error{--goto-icon-color:var(--goto-icon-color-danger);color:var(--goto-icon-color-danger)}:host .status-icon--success{--goto-icon-color:var(--goto-icon-color-success);color:var(--goto-icon-color-success)}:host ::slotted([slot=helpertext]),:host slot[name=helpertext]{color:var(--goto-type-color-secondary);font:var(--goto-caption-medium);display:block}:host(:focus-within) .row{outline-offset:2px;outline:1px solid var(--goto-focus-color-highlight-default)}:host([fullwidth]),:host([fullwidth]) .field-wrapper,:host([fullwidth]) .row{width:100%}:host([fullwidth]) .segment{flex:1 1 0}:host([fieldsize=small]) .row{font:var(--goto-body-small);height:var(--goto-spacing-06)}:host([fieldsize=large]) .row{height:var(--goto-spacing-08)}:host([fieldsize=large]) .row .status-icon{--goto-icon-size:1.5rem}
1700:host([fieldsize=xlarge]) .row{height:var(--goto-spacing-09)}:host([fieldsize=xlarge]) .row .status-icon,:host([fieldsize=xlarge]) .row .dropdown-trigger{--goto-icon-size:1.5rem}:host([success]) .row,:host([data-success]) .row{border-color:var(--goto-border-color-success)}:host([success]) ::slotted([slot=helpertext]),:host([success]) slot[name=helpertext],:host([data-success]) ::slotted([slot=helpertext]),:host([data-success]) slot[name=helpertext]{color:var(--goto-type-color-success)}:host([success]:focus-within) .row,:host([data-success]:focus-within) .row{outline-color:var(--goto-focus-color-highlight-success)}:host([error]) .row,:host([data-error]) .row{border-color:var(--goto-border-color-danger)}:host([error]) ::slotted([slot=helpertext]),:host([error]) slot[name=helpertext],:host([data-error]) ::slotted([slot=helpertext]),:host([data-error]) slot[name=helpertext]{color:var(--goto-type-color-danger)}:host([error]:focus-within) .row,:host([data-error]:focus-within) .row{outline-color:var(--goto-focus-color-highlight-danger)}:host([disabled]),:host([aria-disabled=true]){cursor:not-allowed}:host([disabled]) .row,:host([aria-disabled=true]) .row{border-color:var(--goto-border-color-default);background-color:var(--goto-surface-color-secondary);color:var(--goto-type-color-disabled);pointer-events:none}:host([disabled]) .label,:host([disabled]) .separator,:host([aria-disabled=true]) .label,:host([aria-disabled=true]) .separator{color:var(--goto-type-color-disabled)}"),h([Te({attribute:"input-label"})],dg.prototype,"inputLabel",void 0),h([Te({attribute:"helper-text"})],dg.prototype,"helperText",void 0),h([Te({reflect:!0})],dg.prototype,"fieldsize",void 0),h([Te({attribute:"start"})],dg.prototype,"start",void 0),h([Te({attribute:"end"})],dg.prototype,"end",void 0),h([Te({attribute:"start-default"})],dg.prototype,"startDefault",void 0),h([Te({attribute:"end-default"})],dg.prototype,"endDefault",void 0),h([Te({type:Boolean,reflect:!0})],dg.prototype,"disabled",void 0),h([Te({type:Boolean,reflect:!0})],dg.prototype,"required",void 0),h([Te({type:Boolean,reflect:!0})],dg.prototype,"error",void 0),h([Te({type:Boolean,reflect:!0})],dg.prototype,"success",void 0),h([Te({type:Boolean,reflect:!0})],dg.prototype,"fullwidth",void 0),h([Te()],dg.prototype,"locale",void 0),h([Te()],dg.prototype,"min",void 0),h([Te()],dg.prototype,"max",void 0),h([Te({type:Number})],dg.prototype,"step",void 0),h([Te()],dg.prototype,"name",void 0),h([Te({attribute:"start-input-label"})],dg.prototype,"startInputLabel",void 0),h([Te({attribute:"end-input-label"})],dg.prototype,"endInputLabel",void 0),h([Te({attribute:"start-label-suffix"})],dg.prototype,"startLabelSuffix",void 0),h([Te({attribute:"end-label-suffix"})],dg.prototype,"endLabelSuffix",void 0),h([Te({type:Boolean,attribute:"validate-order"})],dg.prototype,"validateOrder",void 0),h([Te({attribute:"order-validation-message"})],dg.prototype,"orderValidationMessage",void 0),h([Te({attribute:"start-dropdown-toggle-label"})],dg.prototype,"startDropdownToggleLabel",void 0),h([Te({attribute:"end-dropdown-toggle-label"})],dg.prototype,"endDropdownToggleLabel",void 0),h([Te({attribute:"hours-label"})],dg.prototype,"hoursLabel",void 0),h([Te({attribute:"minutes-label"})],dg.prototype,"minutesLabel",void 0),h([Te({attribute:"seconds-label"})],dg.prototype,"secondsLabel",void 0),h([Te({attribute:"day-period-label"})],dg.prototype,"dayPeriodLabel",void 0),h([Oe()],dg.prototype,"orderInvalid",void 0),h([Oe()],dg.prototype,"hasSlottedHelpertext",void 0),h([Oe()],dg.prototype,"openSide",void 0),h([$e(".time-input.start")],dg.prototype,"startInputEl",void 0),h([$e(".time-input.end")],dg.prototype,"endInputEl",void 0),h([$e(".dropdown-trigger.start")],dg.prototype,"startTrigger",void 0),h([$e(".dropdown-trigger.end")],dg.prototype,"endTrigger",void 0),h([$e(".time-menu")],dg.prototype,"menuEl",void 0),function(e={}){vr(e),Gp(e),ng(e),d(dg,e)}();var ug=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not
1700(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"].join(","),hg="undefined"==typeof Element,pg=hg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,gg=!hg&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},fg=function(e,t){var r;void 0===t&&(t=!0);var n=null==e||null===(r=e.getAttribute)||void 0===r?void 0:r.call(e,"inert");return""===n||"true"===n||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):fg(e.parentNode))},mg=function(e,t,r){for(var n=[],o=Array.from(e);o.length;){var i=o.shift();if(!fg(i,!1))if("SLOT"===i.tagName){var s=i.assignedElements(),a=s.length?s:i.children,l=mg(a,!0,r);r.flatten?n.push.apply(n,l):n.push({scopeParent:i,candidates:l})}else{pg.call(i,ug)&&r.filter(i)&&(t||!e.includes(i))&&n.push(i);var c=i.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(i),d=!fg(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(c&&d){var u=mg(!0===c?i.children:c.children,!0,r);r.flatten?n.push.apply(n,u):n.push({scopeParent:i,candidates:u})}else o.unshift.apply(o,i.children)}}return n},vg=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},bg=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,r=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===r||"true"===r}(e))&&!vg(e)?0:e.tabIndex},yg=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},wg=function(e){return"INPUT"===e.tagName},xg=function(e){var t=e.getBoundingClientRect(),r=t.width,n=t.height;return 0===r&&0===n},_g=function(e,t){return!(t.disabled||function(e){return wg(e)&&"hidden"===e.type}(t)||function(e,t){var r=t.displayCheck,n=t.getShadowRoot;if("full-native"===r&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var o=getComputedStyle(e).visibility;if("hidden"===o||"collapse"===o)return!0;var i=pg.call(e,"details>summary:first-of-type")?e.parentElement:e;if(pg.call(i,"details:not([open]) *"))return!0;if(r&&"full"!==r&&"full-native"!==r&&"legacy-full"!==r){if("non-zero-area"===r)return xg(e)}else{if("function"==typeof n){for(var s=e;e;){var a=e.parentElement,l=gg(e);if(a&&!a.shadowRoot&&!0===n(a))return xg(e);e=e.assignedSlot?e.assignedSlot:a||l===e.ownerDocument?a:l.host}e=s}if(function(e){var t,r,n,o,i=e&&gg(e),s=null===(t=i)||void 0===t?void 0:t.host,a=!1;if(i&&i!==e)for(a=!!(null!==(r=s)&&void 0!==r&&null!==(n=r.ownerDocument)&&void 0!==n&&n.contains(s)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!a&&s;){var l,c,d;a=!(null===(c=s=null===(l=i=gg(s))||void 0===l?void 0:l.host)||void 0===c||null===(d=c.ownerDocument)||void 0===d||!d.contains(s))}return a}(e))return!e.getClientRects().length;if("legacy-full"!==r)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var r=0;r<t.children.length;r++){var n=t.children.item(r);if("LEGEND"===n.tagName)return!!pg.call(t,"fieldset[disabled] *")||!n.contains(e)}return!0}t=t.parentElement}return!1}(t))},kg=function(e,t){return!(function(e){return function(e){return wg(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,r=e.form||gg(e),n=function(e){return r.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=n(window.CSS.escape(e.name));else try{t=n(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]}(t,e.form);return!o||o===e}(e)}(t)||bg(t)<0||!_g(e,t))},Cg=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Sg=function(e){var t=[],r=[];
1700return e.forEach(function(e,n){var o=!!e.scopeParent,i=o?e.scopeParent:e,s=function(e,t){var r=bg(e);return r<0&&t&&!vg(e)?0:r}(i,o),a=o?Sg(e.candidates):i;0===s?o?t.push.apply(t,a):t.push(i):r.push({documentOrder:n,tabIndex:s,item:e,isScope:o,content:a})}),r.sort(yg).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},Eg=function(e,t){var r;return r=(t=t||{}).getShadowRoot?mg([e],t.includeContainer,{filter:kg.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Cg}):function(e,t,r){if(fg(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(ug));return t&&pg.call(e,ug)&&n.unshift(e),n.filter(r)}(e,t.includeContainer,kg.bind(null,t)),Sg(r)},Ig=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==pg.call(e,ug)&&kg(t,e)};class Ag extends(s(Jn)){openChanged(e,t){this.refreshVisibleState()}constructor(){super(),this.open=!1,this.closable=!1,this.size="medium",this.closeButtonLabel=void 0,this.preventClose=!1,this.returnValue="",this.handleFormSubmit=e=>{if("dialog"===e.target.method){e.preventDefault();const t=e.submitter;this.close(t?.value||"")}},this.handleTitleSlotChange=()=>{this.observeTitleMutations(),this.updateAriaLabel()},this.handleBackgroundClick=e=>{e.target===this.wrapperElement&&this.closable&&this.requestClose(!0)},this.handleEscapeKey=e=>{"Escape"===e.key&&this.closable&&(e.stopImmediatePropagation(),this.requestClose(!0))},this.resizeSubscription=new xh(e=>e.forEach(e=>{this.handleElementHeightOverflow(e.target)}),200)}connectedCallback(){super.connectedCallback(),this.updateAriaLabel(),this.observeTitleMutations();const e=this.shadowRoot?.querySelector('slot[name="title"]');e?.addEventListener("slotchange",this.handleTitleSlotChange);const t=this.wrapperElement?.querySelector(".content");t&&this.resizeSubscription?.subscribe(t),this.refreshVisibleState(),this.addEventListener("submit",this.handleFormSubmit)}disconnectedCallback(){super.disconnectedCallback();const e=this.shadowRoot?.querySelector('slot[name="title"]');e?.removeEventListener("slotchange",this.handleTitleSlotChange),this.titleMutationSubscription?.unsubscribe(),this.titleMutationSubscription=void 0,this.resizeSubscription?.unsubscribe(),clearTimeout(this.closeTimeout),this.unbindEvents(),this.focusTrap?.deactivate({returnFocus:!1})}show(){this.open=!0,this.bindEvents()}showModal(){this.show()}requestClose(e=!1){e&&!this.$emit("cancel",null,{bubbles:!1})||this.$emit("before-close")&&!this.preventClose&&this.close()}close(e){void 0!==e&&(this.returnValue=e),this.open=!1,this.$emit("close",{returnValue:this.returnValue},{bubbles:!1}),this.$emit("closing",null,{bubbles:!1}),this.delayedClosedEvent(),this.unbindEvents()}handleElementHeightOverflow(e){if(e){const t=e.clientHeight<e.scrollHeight;e.classList.toggle("content--overflow",t)}}bindEvents(){this.wrapperElement?.addEventListener("mousedown",this.handleBackgroundClick),document.addEventListener("keydown",this.handleEscapeKey)}unbindEvents(){this.wrapperElement?.removeEventListener("mousedown",this.handleBackgroundClick),document.removeEventListener("keydown",this.handleEscapeKey)}delayedClosedEvent(){this.closeTimeout=window.setTimeout(()=>{this.$emit("closed",null,{bubbles:!1})},250)}observeTitleMutations(){this.titleMutationSubscription?.unsubscribe();const e=this.querySelector('[slot="title"]');e?(this.titleMutationSubscription=new Np(()=>this.updateAriaLabel(),0),this.titleMutationSubscription.subscribe(e,{characterData:!0,childList:!0,subtree:!0})):this.titleMutationSubscription=void 0}updateAriaLabel(){const e=this.querySelector('[slot="title"]'),t=e?.textContent?.trim()??"",r=this.hasAttribute("aria-labelledby"),n=this.getAttribute("aria-label"),o=this.hasAttribute("aria-label")&&n!==this.autoAriaLabel;r||o?r&&n===this.autoAriaLabel&&(this.removeAttribute("aria-label"),this.autoAriaLabel=void 0):t?(this.autoAriaLabel=t,this.setAttribute("aria-label",t)):(n===this.autoAriaLabel&&this.removeAttribute("aria-label"),this.autoAriaLabel=void 0)}refreshVisibleState(){this.wrapperElement?.classList.toggle("visible",this.open),this.open?(this.bindEvents(),Tr.queueUpdate(()=>{this.isConnected&&this.open&&(this.ensureFocusTrap(),this.focusTrap?.activate())})):(this.unbindEvents(),this.focusTrap?.deactivate({returnFocus:!1!==this.restoreFocus}))}ensureFocusTrap(){this.focusTrap||this.dialogContent&&(this.focusTrap=sl(this,{escapeDeactivates:!1,allowOutsideClick:!0,initialFocus:()=>this.initialFocus?.()??this.getDefaultInitialFocus(),tabbableOptions:{getShadowRoot:!0},fallbackFocus:this.dialogContent}))}getDefaultInitialFocus(){const e=this.shadowRoot?.querySelector("slot:not([name])"),t=e?.assignedElements({flatten:!0})??[];for(const e of t){const t=Ig(e)?e:Eg(e,{getShadowRoot:!0})[0];if(t)return t}return this.dialogContent??!1}}h([Qr({mode:"boolean"})],Ag.prototype,"open",void 0),h([Qr({mode:"boolean"})],Ag.prototype,"closable",void 0),h([Qr],Ag.prototype,"size",void 0),h([Qr({attribute:"close-button-label"})],Ag.prototype,"closeButtonLabel",void 0),h([Qr({mode:"boolean",attribute:"prevent-close"})],Ag.prototype,"preventClose",void 0),h([Nr],Ag.prototype,"wrapperElement",void 0),h([Nr],Ag.prototype,"dialogContent",void 0);const Tg={baseName:"dialog",template:(e,t)=>
1700{const r=u(mr),n=u(Wi);return ri`
1701    <template
1702      role="dialog"
1703      aria-modal="${e=>e.open?"true":null}"
1704      aria-hidden="${e=>e.open?null:"true"}"
1705    >
1706      <div part="overlay" class="goto-dialog-wrapper" ${li("wrapperElement")}>
1707        <div part="content" ${li("dialogContent")} tabindex="-1" :className="goto-dialog goto-dialog--${e=>e.size}">
1708          <div part="heading" role="heading" aria-level="1">
1709            <slot name="title"></slot>
1710            ${Aa(e=>e.closable,ri`<${n}
1711                @click="${e=>e.requestClose(!0)}"
1712                label="${e=>e.closeButtonLabel}"
1713                size="small"
1714                variant="${"primary"}"
1715                class="close-button"
1716              >
1717                <${r}>${Sl}</${r}>
1718              </${n}>`)}
1719          </div>
1720          <div part="body" class="content">
1721            <slot></slot>
1722          </div>
1723          <div part="actions">
1724            <slot name="actions"></slot>
1725          </div>
1726        </div>
1727      </div>
1728    </template>
1729  `},styles:":host{--goto-dialog-z-index:var(--goto-z-index-modal);--goto-dialog-min-height:208px;--transition-dialog-in:visibility 0s linear 0s,opacity .25s 0s,transform .25s;
1729--transition-dialog-out:visibility 0s linear .25s,opacity .25s 0s,transform .25s}:host([open]){z-index:var(--goto-dialog-z-index);pointer-events:none;display:block;position:fixed;inset:0}[role=heading]{min-height:var(--goto-layout-05);padding:var(--goto-spacing-00)24px;--goto-icon-button-icon-color:var(--goto-icon-color-default);justify-content:space-between;align-items:center;display:flex}[role=heading] ::slotted([slot=title]){margin:var(--goto-spacing-00);font:var(--goto-heading-small);color:var(--goto-type-color-default)}.goto-dialog-wrapper{left:var(--goto-spacing-00);top:var(--goto-spacing-00);background-color:var(--goto-scrim-color);width:100%;height:100%;z-index:var(--goto-dialog-z-index);opacity:0;visibility:hidden;transition:var(--transition-dialog-out);pointer-events:auto;justify-content:center;align-items:center;display:flex;position:fixed;transform:scale(1.1)}.visible{opacity:1;visibility:visible;transition:var(--transition-dialog-in);transform:scale(1)}.goto-dialog{box-sizing:border-box;min-height:var(--goto-dialog-min-height);max-height:calc(100vh - var(--goto-layout-05));background-color:var(--goto-surface-color-default);border-radius:var(--goto-radius-xlarge);border-style:solid;border-width:1px;border-color:var(--goto-border-color-secondary);width:480px;min-width:318px;max-width:calc(100vw - var(--goto-layout-05));box-shadow:var(--goto-elevation-xlarge);flex-direction:column;display:flex}.goto-dialog:focus-visible{outline:2px solid var(--goto-border-color-focus);outline-offset:-2px}.goto-dialog ::slotted([slot=actions]){min-height:72px;padding:var(--goto-spacing-00)24px;--goto-button-margin:var(--goto-spacing-00)4px;flex-direction:row-reverse;align-items:center;display:flex}.goto-dialog .content{margin:var(--goto-spacing-00);font:var(--goto-body-medium);color:var(--goto-type-color-default);padding:var(--goto-spacing-00)24px;overscroll-behavior:contain;border-color:#0000;border-top-style:solid;border-top-width:1px;border-bottom-style:solid;border-bottom-width:1px;flex-grow:1;overflow-y:auto}.goto-dialog .content.content--overflow{border-color:var(--goto-border-color-default)}.goto-dialog.goto-dialog--small{width:400px}.goto-dialog.goto-dialog--large{width:640px}.goto-dialog.goto-dialog--xlarge{width:860px}.goto-dialog.goto-dialog--fullScreen{border:var(--goto-border-color-secondary);border-radius:var(--goto-radius-xlarge);width:100%;height:100%;inset:0;transform:none}.goto-dialog.goto-dialog--fullScreen .content{border-top:1px solid;border-bottom:1px solid;border-color:var(--goto-border-color-default)}::slotted([slot=actions]){gap:var(--goto-spacing-02);display:grid}"},Og=Ag.compose(Tg);!function(e){vr({prefix:e}),gl({prefix:e}),fl({prefix:e}),To({prefix:e,node:void 0},Og)}();class Lg extends Zt{constructor(){super(...arguments),this.size="medium"}render(){return oe`
1730      ${"large"===this.size?"":oe`<slot name="icon"></slot>`}
1731      ${"small"===this.size?"":oe`<slot name="title"></slot>`}
1732      <div class="content">
1733        <slot></slot>
1734      </div>
1735      <slot name="actions"></slot>
1736    `}}Lg.baseName="empty-state",Lg.styles=b(":host{padding:var(--goto-spacing-06);align-items:center;gap:var(--goto-spacing-02);flex-direction:column;max-width:25.3125rem;margin:auto;display:flex}:host ::slotted([slot=icon]:not(.pictogram)){--goto-icon-color:var(--goto-icon-color-disabled);--goto-icon-size:var(--goto-spacing-11)}:host ::slotted([slot=title]){font:var(--goto-heading-small);color:var(--goto-type-color-default);margin:var(--goto-spacing-00);text-align:center}:host ::slotted([slot=actions]){align-items:center;gap:var(--goto-spacing-04);padding-top:var(--goto-spacing-04);flex-direction:column;display:flex}:host .content{font:var(--goto-body-small);color:var(--goto-type-color-secondary);text-align:center}:host .content ::slotted(p){margin:var(--goto-spacing-00)}:host([size=small]){padding:var(--goto-spacing-04);max-width:14rem}:host([size=small]) ::slotted([slot=icon]:not(.pictogram)){--goto-icon-size:var(--goto-spacing-08)}:host([size=small]) ::slotted([slot=title]){font:var(--goto-heading-small);color:var(--goto-type-color-default);margin:var(--goto-spacing-00);text-align:center}:host([size=small]) .content{font:var(--goto-caption-medium)}:host([size=small]) ::slotted([slot=actions]){padding-top:var(--goto-spacing-00)}:host([size=large]){padding:var(--goto-spacing-09);gap:var(--goto-spacing-04);max-width:34.6875rem}:host([size=large]) ::slotted([slot=title]){font:var(--goto-heading-large);text-align:center}:host([size=large]) .content{font:var(--goto-body-large)}"),h([Te({reflect:!0})],Lg.prototype,"size",void 0),function(e={}){d(Lg,e)}();class $g extends Hi{constructor(){super(),this.variant="secondary",this.size="medium",this.isLoading=!1,this.inactive=!1,this.displayLabel=!1,new ji(this),new Vi(this,()=>this.isAriaDisabled)}get labelClassNames(){return["label",...this.computedConfig.needsSmallCaption?["caption-small"]:[]].join(" ")}get isAriaDisabled(){return this.disabled||this.isLoading||"true"===this.ariaDisabled}connectedCallback(){super.connectedCallback()}willUpdate(e){e.has("variant")&&this.handleFallback(),this.inactive&&(this.variant="secondary")}handleFallback(){const{guardedValue:e}=Fi({"brand-primary":"primary","brand-tertiary":"tertiary","neutral-secondary":"secondary","neutral-tertiary":"tertiary","danger-primary":"danger","danger-tertiary":"danger","inverted-primary":"primary","inverted-secondary-bright":"primary","inverted-secondary-dim":"primary"},{forMissing:this.variant,forRemoved:"secondary",message:Fi.defaultMessageFnForVariants("[Chameleon RoundButton]")}),t=e(this.variant);this.variant=t.value,null!==t.message&&console.warn(t.message)}updated(e){super.updated(e),(e.has("label")||e.has("labelId"))&&this.setAccessibleLabel()}async setAccessibleLabel(){await this.updateComplete,this.labelId?this.setAttribute("aria-labelledby",this.labelId):this.label&&this.control?.setAttribute("aria-label",this.label)}validateAccessibleLabel(){this.control?.getAttribute("aria-label")?.length||this.getAttribute("aria-labelledby")?.length||console.error("CHAMELEON-A11Y: Round Button component must have an accessible label provided by either \n  1) a visible label whose id is given as the attribute labelId \n  2) a non-empty label attribute to be used as aria-label.\n")}get computedConfig(){return{needsSmallCaption:["xsmall","small","medium"].includes(this.size)}}render(){const e=Oi(u(mr));return Ni`
1737      <button
1738        class="control"
1739        part="control"
1740        ?autofocus="${this.autofocus}"
1741        form="${this.form??le}"
1742        formaction="${this.formaction??le}"
1743        formenctype="${this.formenctype??le}"
1744        formmethod="${this.formmethod??le}"
1745        ?formnovalidate="${this.formnovalidate}"
1746        formtarget="${this.formtarget??le}"
1747        name="${this.name??le}"
1748        type="${this.type}"
1749        value="${this.value??le}"
1750        aria-atomic="${this.ariaAtomic??le}"
1751        aria-busy="${this.ariaBusy??le}"
1752        aria-current="${this.ariaCurrent??le}"
1753        aria-disabled="${this.isAriaDisabled}"
1754        aria-expanded="${this.ariaExpanded??le}"
1755        aria-haspopup="${this.ariaHasPopup??le}"
1756        aria-hidden="${this.ariaHidden??le}"
1757        aria-invalid="${this.ariaInvalid??le}"
1758        aria-keyshortcuts="${this.ariaKeyShortcuts??le}"
1759        aria-label="${this.ariaLabel??le}"
1760        aria-live="${this.ariaLive??le}"
1761        aria-pressed="${this.ariaPressed??le}"
1762        aria-relevant="${this.ariaRelevant??le}"
1763        aria-roledescription="${this.ariaRoleDescription??le}"
1764      >
1765        <div part="content" class="content">
1766          ${this.isLoading?Ni`<${e} class="loading-icon" aria-label="Loading icon">${Mi(Bi)}</${e}>`:Ni`
1767                ${le}
1768                <slot>
1769                  <slot name="start"></slot>
1770                  <slot name="end"></slot>
1771                </slot>
1772              `}
1773        </div>
1774      </button>
1775      <span class="${this.labelClassNames}">${this.label}</span>
1776    `}}$g.baseName="round-button",$g.styles=b(':host .control:focus-visible,:host:host(.selected-interactive-item) .control{outline-color:var(--goto-focus-color-highlight-default)}:host([variant=primary]) .control{color:var(--goto-type-color-inverted);background-color:var(--goto-interactive-color-primary-default);--goto-icon-color:var(--goto-icon-color-inverted)}:host([variant=primary]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-inverted))}:host([variant=primary]) .control:hover{background-color:var(--goto-interactive-color-primary-hover)}:host([variant=primary]) .control:active,:host([variant=primary]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-primary-pressed)}:host([variant=primary]):host([disabled]) .control,:host([variant=primary]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=secondary]) .control{color:var(--goto-type-color-brand-default);--goto-icon-color:var(--goto-icon-color-brand-default);background-color:#0000}:host([variant=secondary]) .control:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host([variant=secondary]) .control:active,:host([variant=secondary]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-secondary-pressed)}:host([variant=secondary]):host([disabled]) .control,:host([variant=secondary]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=secondary-filled]) .control{color:var(--goto-type-color-brand-default);background-color:var(--goto-interactive-color-neutral-secondary-default);--goto-icon-color:var(--goto-icon-color-on-neutral-secondary-default)}:host([variant=secondary-filled]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-on-neutral-secondary-default))}:host([variant=secondary-filled]) .control:hover{background-color:var(--goto-interactive-color-neutral-secondary-hover)}:host([variant=secondary-filled]) .control:active,:host([variant=secondary-filled]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-neutral-secondary-pressed)}:host([variant=secondary-filled]):host([disabled]) .control,:host([variant=secondary-filled]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=tertiary]) .control{color:var(--goto-type-color-default);--goto-icon-color:var(--goto-icon-color-default);background-color:#0000}:host([variant=tertiary]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-default))}:host([variant=tertiary]) .control:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host([variant=tertiary]) .control:active,:host([variant=tertiary]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-secondary-pressed)}:host([variant=tertiary]):host([disabled]) .control,:host([variant=tertiary]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=neutral]) .control{color:var(--goto-type-color-default);--goto-icon-color:var(--goto-icon-color-default);background-color:#0000}:host([variant=neutral]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-default))}:host([variant=neutral]) .control:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host([variant=neutral]) .control:active,:host([variant=neutral]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-secondary-pressed)}:host([variant=neutral]):host([disabled]) .control,:host([variant=neutral]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=success]) .control{color:var(--goto-type-color-inverted);background-color:var(--goto-interactive-color-success-default);--goto-icon-color:var(--goto-icon-color-inverted)}:host([variant=success]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-inverted))}:host([variant=success]) .control:hover{background-color:var(--goto-interactive-color-success-hover)}:host([variant=success]) .control:active,:host([variant=success]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-success-pressed)}:host([variant=success]):host([disabled]) .control,:host([variant=success]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=danger]) .control{color:var(--goto-type-color-inverted);background-color:var(--goto-interactive-color-danger-default);--goto-icon-color:var(--goto-icon-color-inverted)}:host([variant=danger]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-inverted))}:host([variant=danger]) .control:hover{background-color:var(--goto-interactive-color-danger-hover)}:host([variant=danger]) .control:active,:host([variant=danger]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-danger-pressed)}:host([variant=danger]):host([disabled]) .control,:host([variant=danger]):host([is-loading]) .control{color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=inverted]) .control{color:var(--goto-type-color-inverted);--goto-icon-color:var(--goto-icon-color-inverted);background-color:#0000}:host([variant=inverted]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-inverted))}:host([variant=inverted]) .control:hover{background-color:var(--goto-interactive-color-primary-hover)}:host([variant=inverted]) .control:active,:host([variant=inverted]) .control[aria-expanded=true]{background-color:var(--goto-interactive-color-primary-pressed)}:host([variant=inverted]):host([disabled]) .control,:host([variant=inverted]):host([is-loading]) .control{color:var(--goto-type-color-inverted);--goto-icon-color:var(--goto-icon-color-inverted);background-color:#0000}:host([variant=inverted]) .control:focus-visible,:host([variant=inverted]):host(.selected-interactive-item) .control{outline-color:var(--goto-focus-border-color-default)}@keyframes button-loading{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes button-loading-half{0%,to{transform:rotate(180deg)}}:host{box-sizing:border-box;border-radius:var(--goto-radius-small);display:inline-flex}:host .control{border-radius:inherit;cursor:pointer;white-space:nowrap;border:none;justify-content:center;align-items:center;display:flex;position:relative}:host([is-loading]),:host([disabled]){cursor:not-allowed}:host([is-loading]) .control,:host([disabled]) .control{pointer-events:none}:host .control:focus-visible,:host(.selected-interactive-item) .control{outline-offset:2px;outline-width:1px;outline-style:solid}:host .loading-icon{display:none}:host([isloading]) .loading-icon,:host([is-loading]) .loading-icon{animation-direction:normal;animation-delay:0s;animation-duration:var(--goto-duration-sluggish);animation-iteration-count:infinite;animation-play-state:running;animation-fill-mode:forwards;animation-timing-function:var(--goto-standard-easing);
1776animation-name:var(--button-loading-animation-name,button-loading);display:flex}:host([isloading]) .leading-icon,:host([isloading]) .trailing-icon,:host([is-loading]) .leading-icon,:host([is-loading]) .trailing-icon{display:none}:host{cursor:pointer;flex-direction:column;align-items:center;max-width:100%}:host .control{border-radius:var(--goto-radius-circle);user-select:none;padding:0}:host .label{max-width:100%;padding-top:var(--goto-spacing-02);color:var(--goto-type-color-secondary);font:var(--goto-caption-medium);text-align:center;white-space:var(--goto-button-label-whitespace,normal);overflow:var(--goto-button-label-overflow,visible);text-overflow:var(--goto-button-label-text-overflow,clip)}:host .label.caption-small{font:var(--goto-caption-small)}:host(:not([display-label])) .label{display:none}:host([disabled]),:host([is-loading]){cursor:not-allowed}:host([disabled]) .label,:host([is-loading]) .label{color:var(--goto-type-color-disabled)}:host([size=xxlarge]) .control{padding:var(--goto-spacing-03);--goto-icon-size:var(--goto-spacing-07)}:host([size=xlarge]) .control{padding:var(--goto-spacing-03);--goto-icon-size:var(--goto-spacing-06)}:host([size=large]) .control{padding:var(--goto-spacing-02);--goto-icon-size:var(--goto-spacing-06)}:host([size=medium]) .control{padding:var(--goto-spacing-02);--goto-icon-size:var(--goto-spacing-04)}:host([size=small]) .control{padding:var(--goto-spacing-01);--goto-icon-size:var(--goto-spacing-04)}:host([size=xsmall]) .control{padding:calc(var(--goto-spacing-01)/2);--goto-icon-size:var(--goto-spacing-04)}:host([size=xsmall]) .control:before{content:"";width:var(--goto-spacing-06);height:var(--goto-spacing-06);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}:host([variant=secondary]) .control{color:var(--goto-type-color-default);--goto-icon-color:var(--goto-icon-color-default);box-shadow:inset 0 0 0 1px var(--goto-border-color-default);border:none}:host([variant=secondary]) .control.icon-button-control{--goto-icon-color:var(--goto-icon-button-icon-color,var(--goto-icon-color-default))}:host([variant=secondary]):host([disabled]) .control,:host([variant=secondary]):host([is-loading]) .control{box-shadow:inset 0 0 0 1px var(--goto-interactive-color-disabled);background-color:#0000}:host([variant=tertiary]):host([disabled]) .control,:host([variant=tertiary]):host([is-loading]) .control{background-color:#0000}:host([variant=primary]):host([disabled]) .control,:host([variant=primary]):host([is-loading]) .control,:host([variant=success]):host([disabled]) .control,:host([variant=success]):host([is-loading]) .control,:host([variant=danger]):host([disabled]) .control,:host([variant=danger]):host([is-loading]) .control{--goto-icon-color:var(--goto-icon-color-inverted)}'),h([Te({reflect:!0})],$g.prototype,"variant",void 0),h([Te({reflect:!0})],$g.prototype,"size",void 0),h([Te({type:Boolean,reflect:!0,attribute:"is-loading"})],$g.prototype,"isLoading",void 0),h([Te({type:Boolean,reflect:!0})],$g.prototype,"inactive",void 0),h([Te()],$g.prototype,"label",void 0),h([Te({type:Boolean,reflect:!0,attribute:"display-label"})],$g.prototype,"displayLabel",void 0),h([Te({attribute:"label-id"})],$g.prototype,"labelId",void 0),h([$e(".control")],$g.prototype,"control",void 0);class Ng extends Zt{constructor(){super(...arguments),this.size="medium",this.loadingProgress=void 0,this.handleSlotChange=e=>{const t=e.target;"title"===t.name&&(this.titleMutationSubscription?.unsubscribe(),this.observeTitleChanges(),this.requestUpdate()),"actions"!==t.name&&"dismiss"!==t.name||this.setRoundButtonSize()}}firstUpdated(){this.setRoundButtonSize(),this.handleFullWidthChange(),this.observeTitleChanges()}updated(e){e.has("size")&&this.setRoundButtonSize(),e.has("fullWidth")&&this.handleFullWidthChange()}connectedCallback(){super.connectedCallback(),this.addEventListener("slotchange",this.handleSlotChange)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("slotchange",this.handleSlotChange),this.titleMutationSubscription?.unsubscribe(),this.resizeSubscription?.unsubscribe()}observeTitleChanges(){const e=this.querySelector('[slot="title"]');e&&(this.titleMutationSubscription=new Np(()=>{this.requestUpdate()},200),this.titleMutationSubscription.subscribe(e,{characterData:!0,childList:!0,subtree:!0}))}getBadgeLabel(){const e=this.querySelector('[slot="title"]')?.textContent?.trim();if(e)return e;const t=this.label?.trim();return t||void 0}handleFullWidthChange(){this.fullWidth?(this.updateWidthVariable(),!this.resizeSubscription&&this.parentElement&&(this.resizeSubscription=new xh(()=>{this.updateWidthVariable()},200),this.resizeSubscription.subscribe(this.parentElement))):(this.resizeSubscription?.unsubscribe(),this.style.removeProperty("--width"))}updateWidthVariable(){requestAnimationFrame(()=>{if(!this.isConnected)return;const e=this.parentElement?.clientWidth;e&&this.style.setProperty("--width",`${e}px`)})}titleFont(){return Ng.SIZE_CONFIG[this.size]?.titleFont??"caption-medium-strong"}metaFont(){return Ng.SIZE_CONFIG[this.size]?.metaFont??"caption-small"}badgeSize(){return Ng.SIZE_CONFIG[this.size]?.badgeSize??"medium"}progressSize(){return Ng.SIZE_CONFIG[this.size]?.progressSize??"medium"}setRoundButtonSize(){const e=this.querySelectorAll(`chameleon-round-button, ${u($g)}`);for(const t of e)t.setAttribute("size","small")}renderErrorTemplate(){const e=Oi(u(zl)),t=Oi(u(Hl)),r=Oi(u(mr));return Ni`
1777      <div>
1778        <div>
1779          <${e}
1780            label="${this.getBadgeLabel()}"
1781            size="${this.badgeSize()}"
1782            variant="secondary"
1783            style="--goto-icon-color: var(--goto-icon-color-danger)"
1784            color-token="goto-surface-color-secondary"
1785          >
1786            <${r}>${Mi(Cl)}</${r}>
1787          </${e}>
1788          <div>
1789            <${t} color="type-color-default" variant="${this.titleFont()}">
1790              <slot name="title"></slot>
1791            </${t}>
1792            ${Zu("small"!==this.size,()=>Ni`
1793                <${t} tag="p" color="type-color-secondary" variant="${this.metaFont()}">
1794                  <slot name="meta"></slot>
1795                </${t}>
1796              `)}
1797          </div>
1798        </div>
1799        <div class="actions">
1800          <slot name="actions"></slot>
1801        </div>
1802      </div>
1803    `}renderNormalTemplate(){const e=Oi(u(zl)),t=Oi(u(Hl)),r=Oi(u(Bu));return Ni`
1804      <button type="button">
1805        <div>
1806          ${Zu(!this.loading,()=>Ni`
1807            <slot name="media">
1808              <${e}
1809                label="${this.getBadgeLabel()}"
1810                size="${this.badgeSize()}"
1811                variant="secondary"
1812                style="--goto-icon-color: ${this.iconColorToken?`var(--${this.iconColorToken})`:le}"
1813                color-token="${this.badgeColorToken??le}"
1814              >
1815                <slot name="icon"></slot>
1816              </${e}>
1817            </slot>`)}
1818          ${Zu(this.loading,()=>Ni`
1819            <${e}
1820              label="${this.getBadgeLabel()}"
1821              size="${this.badgeSize()}"
1822              variant="secondary"
1823              style="--goto-icon-color: ${this.iconColorToken?`var(--${this.iconColorToken})`:le}"
1824              color-token="${this.badgeColorToken??le}"
1825            >
1826              <${r}
1827                value="${this.loadingProgress??le}"
1828                size="${this.progressSize()}"
1829              ></${r}>          
1830            </${e}> `)}
1831          <div>
1832            <${t} color="type-color-default" variant="${this.titleFont()}">
1833              <slot name="title"></slot>
1834            </${t}>
1835            ${Zu("small"!==this.size,()=>Ni`
1836                <${t} tag="p" color="type-color-secondary" variant="${this.metaFont()}">
1837                  <slot name="meta"></slot>
1838                </${t}>
1839              `)}
1840          </div>
1841        </div>
1842      </button>
1843    `}render(){return Ni`
1844      ${Zu(!this.error,()=>this.renderNormalTemplate())}
1845      ${Zu(this.error,()=>this.renderErrorTemplate())}
1846      <slot name="dismiss"></slot>
1847    `}}function Rg(e={}){return vr(e),d($g,e)}function Pg(e={}){return vr(e),Gl(e),Ku(e),Fl(e),Rg(e),d(Ng,e)}Ng.baseName="file-thumbnail",Ng.styles=b(":host{--width:197px;
1847--media-size:32px;--column-gap:8px;--padding-y:6px;--round-button-width:24px;justify-content:space-between;align-items:center;column-gap:var(--column-gap);width:var(--width);box-sizing:border-box;border-radius:var(--goto-radius-medium);cursor:default;display:flex;position:relative}:host>:is(div,button){border-radius:var(--goto-radius-medium);width:100%;padding:4px var(--padding-y);background:0 0;border:none;justify-content:space-between;align-items:center;display:flex}:host>:is(div,button)>div{text-align:left;justify-content:space-between;align-items:center;column-gap:8px;display:flex}:host>button:hover{background:var(--goto-interactive-color-secondary-hover)}:host>button:active{background:var(--goto-interactive-color-secondary-pressed)}:host>button:focus-visible{outline:1px solid var(--goto-focus-color-highlight-default);outline-offset:1px}:host ::slotted([slot=dismiss]){right:calc(var(--goto-spacing-02)*-1);top:calc(var(--goto-spacing-02)*-1);position:absolute}:host ::slotted(div[slot=actions]){column-gap:8px;display:flex}:host ::slotted([slot=media]){width:var(--media-size);height:var(--media-size);border:1px solid var(--goto-border-color-secondary);border-radius:var(--goto-radius-medium)}:host ::slotted([slot=title]),:host ::slotted([slot=meta]){white-space:nowrap;text-overflow:ellipsis;max-width:calc(var(--width) - var(--media-size) - var(--round-button-width) - var(--column-gap)*2 - var(--padding-y)*2);display:block;overflow:hidden}:host([full-width]){--width:100%}:host([size=small]){--media-size:24px;--round-button-width:16px;--width:176px;height:32px}:host([size=large]){--media-size:48px;--width:235px;--round-button-width:32px;border-radius:var(--goto-radius-large);height:64px}"),Ng.SIZE_CONFIG={small:{titleFont:"caption-medium-strong",metaFont:"caption-small",badgeSize:"small",progressSize:"small"},medium:{titleFont:"caption-medium-strong",metaFont:"caption-small",badgeSize:"medium",progressSize:"medium"},large:{titleFont:"body-small-strong",metaFont:"caption-medium",badgeSize:"xlarge",progressSize:"large"}},h([Te({reflect:!0})],Ng.prototype,"size",void 0),h([Te({attribute:"badge-color-token"})],Ng.prototype,"badgeColorToken",void 0),h([Te({attribute:"icon-color-token"})],Ng.prototype,"iconColorToken",void 0),h([Te({type:Boolean,reflect:!0})],Ng.prototype,"loading",void 0),h([Te({type:Boolean,reflect:!0})],Ng.prototype,"error",void 0),h([Te({type:Boolean,reflect:!0,attribute:"full-width"})],Ng.prototype,"fullWidth",void 0),h([Te({attribute:"loading-progress"})],Ng.prototype,"loadingProgress",void 0),h([Te()],Ng.prototype,"label",void 0),Pg();class Dg extends El{constructor(){super(...arguments),this.variant="brand",this._hasAction=!1,this.role="status",this.ariaLive="polite"}connectedCallback(){super.connectedCallback(),this._resizeObserver=new ResizeObserver(e=>{for(const t of e){const e=t.borderBoxSize?.[0]?.inlineSize??t.contentRect.width;this.toggleAttribute("narrow",e<480)}}),this._resizeObserver.observe(this)}firstUpdated(e){super.firstUpdated(e);const t=this.shadowRoot?.querySelector('slot[name="action"]');t&&t.addEventListener("slotchange",()=>{this._hasAction=t.assignedElements().length>0})}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver?.disconnect()}render(){const e=Oi(u(Wi)),t=Oi(u(mr));return Ni`
1848      <slot name="badge"></slot>
1849      <div class="flag-content">
1850        <div class="flag-title"><slot name="title"></slot></div>
1851        <div class="flag-description"><slot></slot></div>
1852      </div>
1853      <slot name="action"></slot>
1854      ${this.closable?Ni`
1855        <${e}
1856          variant="${"primary"}"
1857          part="close-icon"
1858          size="xsmall"
1859          label="${this.closeLabel??"Close"}"
1860          @click=${()=>this.close()}
1861        >
1862          <${t}>${Mi(Sl)}</${t}>
1863        </${e}>
1864      `:""}
1865    `}}Dg.baseName="flag",Dg.styles=b(':host{box-sizing:border-box;border-radius:var(--goto-radius-large);width:100%;padding:var(--goto-spacing-06);column-gap:var(--goto-spacing-04);--goto-icon-size:var(--goto-spacing-06);grid-template:"icon content"/auto 1fr;align-items:center;display:grid}:host .flag-content{flex-direction:column;grid-area:content;display:flex}:host .flag-title{color:var(--goto-type-color-default);font:var(--goto-body-medium)}:host .flag-description{color:var(--goto-type-color-secondary);font:var(--goto-body-small)}:host ::slotted([slot=action]){grid-area:action}:host [part=close-icon]{width:var(--goto-spacing-06);height:var(--goto-spacing-06);--goto-icon-size:var(--goto-spacing-04);--goto-icon-color:var(--goto-icon-color-default);grid-area:closable;justify-self:end;place-items:center;display:grid}:host([closable]){grid-template-areas:"icon.content.closable";grid-template-columns:auto var(--goto-spacing-04)1fr var(--goto-spacing-06)auto;column-gap:0}:host([has-action]){grid-template-areas:"icon.content.action";grid-template-columns:auto var(--goto-spacing-04)1fr var(--goto-spacing-06)auto;column-gap:0}:host([has-action][closable]){grid-template-areas:"icon.content.action.closable";grid-template-columns:auto var(--goto-spacing-04)1fr var(--goto-spacing-06)auto var(--goto-spacing-02)auto;column-gap:0}:host([narrow][closable]){grid-template-columns:auto 1fr auto;grid-template-areas:"icon.closable"". . .""content content content";grid-template-rows:auto var(--goto-spacing-02)auto;align-items:start;row-gap:0}:host([narrow][has-action]){grid-template-columns:1fr;grid-template-areas:"icon"".""content"".""action";grid-template-rows:auto var(--goto-spacing-02)auto var(--goto-spacing-04)auto;place-items:start;row-gap:0}:host([narrow][has-action][closable]){grid-template-columns:auto 1fr;grid-template-areas:"icon closable"". .""content content"". .""action action";grid-template-rows:auto var(--goto-spacing-02)auto var(--goto-spacing-04)auto;place-items:start;row-gap:0}:host([narrow][has-action][closable]) [part=close-icon]{justify-self:end}:host([variant=brand]){background:var(--goto-surface-color-brand-secondary)}:host([variant=ai]){background:linear-gradient(to bottom right,var(--goto-surface-gradient-ai-secondary))}'),h([Te({reflect:!0})],Dg.prototype,"variant",void 0),h([Te({type:Boolean,reflect:!0,attribute:"has-action"})],Dg.prototype,"_hasAction",void 0),function(e={}){vr(e),fl(e),d(Dg,e)}();var Mg='<svg viewBox="0 0 49 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><g clip-path="url(#goto-white-yellow_svg__a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M0.580948 23.999L49 18.947L48.416 13.43L-0.00305176 18.482L0.580948 23.999Z" fill="#FFE900"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M23.4644 11.7109C21.7509 11.7109 20.3603 10.3302 20.3603 8.62908C20.3603 6.92788 21.7509 5.54724 23.4644 5.54724C25.1779 5.54724 26.5686 6.92788 26.5686 8.62908C26.5686 10.3302 25.1779 11.7109 23.4644 11.7109ZM23.4644 3.08179C20.3851 3.08179 17.877 5.54724 17.877 8.62908C17.877 11.6862 20.3851 14.1763 23.4644 14.1763C26.5686 14.1763 29.0519 11.6862 29.0519 8.62908C29.0519 5.54724 26.5686 3.08179 23.4644 3.08179ZM41.4457 11.7109C39.7322 11.7109 38.3415 10.3302 38.3415 8.62908C38.3415 6.92788 39.7322 5.54724 41.4457 5.54724C43.1592 5.54724 44.5498 6.92788 44.5498 8.62908C44.5498 10.3302 43.1592 11.7109 41.4457 11.7109ZM41.4457 3.08179C38.3664 3.08179 35.8582 5.54724 35.8582 8.62908C35.8582 11.6862 38.3664 14.1763 41.4457 14.1763C44.5498 14.1763 47.0331 11.6862 47.0331 8.62908C47.033
18651 5.54724 44.5498 3.08179 41.4457 3.08179Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M38.043 2.761V0.295998H26.868V2.761H31.213V13.88H33.697V2.761H38.043Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.36588 5.84308V8.30857H11.7977C11.0057 10.3745 9.4953 11.7109 7.74506 11.7109C6.47858 11.7109 5.31138 11.1931 4.46706 10.3549C3.62274 9.5166 3.10125 8.35785 3.10125 7.07583C3.10125 5.7938 3.62274 4.65971 4.46706 3.82142C5.31138 2.98318 6.47858 2.46544 7.74506 2.46544C9.03638 2.46544 10.2035 2.98318 11.0478 3.82142L12.811 2.07099C11.5197 0.78896 9.73169 0 7.74506 0C5.78323 0 3.99521 0.78896 2.70388 2.07099C1.41256 3.35302 0.61792 5.12812 0.61792 7.07583C0.61792 9.0482 1.41256 10.7986 2.70388 12.0807C3.99521 13.3627 5.78323 14.1763 7.74506 14.1763C10.1768 14.1763 12.3639 12.6218 13.6553 10.1534C13.6553 11.3017 13.6553 12.5162 13.6553 13.8805H16.1386V5.84308C16.1386 5.84308 9.83758 5.84308 8.36588 5.84308Z" fill="white"></path></g><defs><clipPath id="goto-white-yellow_svg__a"><rect width="49" height="24" fill="white"></rect></clipPath></defs></svg>',zg='<svg viewBox="0 0 49 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><g clip-path="url(#goto-black-yellow_svg__a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M0.580948 23.999L49 18.947L48.416 13.43L-0.00305176 18.482L0.580948 23.999Z" fill="#FFE900"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M23.4644 11.7109C21.7509 11.7109 20.3603 10.3302 20.3603 8.62907C20.3603 6.92787 21.7509 5.54723 23.4644 5.54723C25.1779 5.54723 26.5686 6.92787 26.5686 8.62907C26.5686 10.3302 25.1779 11.7109 23.4644 11.7109ZM23.4644 3.08179C20.3851 3.08179 17.877 5.54723 17.877 8.62907C17.877 11.6862 20.3851 14.1763 23.4644 14.1763C26.5686 14.1763 29.0519 11.6862 29.0519 8.62907C29.0519 5.54723 26.5686 3.08179 23.4644 3.08179ZM41.4457 11.7109C39.7322 11.7109 38.3415 10.3302 38.3415 8.62907C38.3415 6.92787 39.7322 5.54723 41.4457 5.54723C43.1592 5.54723 44.5498 6.92787 44.5498 8.62907C44.5498 10.3302 43.1592 11.7109 41.4457 11.7109ZM41.4457 3.08179C38.3664 3.08179 35.8582 5.54723 35.8582 8.62907C35.8582 11.6862 38.3664 14.1763 41.4457 14.1763C44.5498 14.1763 47.0331 11.6862 47.0331 8.62907C47.0331 5.54723 44.5498 3.08179 41.4457 3.08179Z" fill="black"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M38.043 2.76101V0.296005H26.868V2.76101H31.213V13.88H33.697V2.76101H38.043Z" fill="black"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.36588 5.84308V8.30857H11.7977C11.0057 10.3745 9.4953 11.7109 7.74506 11.7109C6.47858 11.7109 5.31138 11.1931 4.46706 10.3549C3.62274 9.5166 3.10125 8.35785 3.10125 7.07583C3.10125 5.7938 3.62274 4.65971 4.46706 3.82142C5.31138 2.98318 6.47858 2.46544 7.74506 2.46544C9.03638 2.46544 10.2035 2.98318 11.0478 3.82142L12.811 2.07099C11.5197 0.78896 9.73169 0 7.74506 0C5.78323 0 3.99521 0.78896 2.70388 2.07099C1.41256 3.35302 0.61792 5.12812 0.61792 7.07583C0.61792 9.0482 1.41256 10.7986 2.70388 12.0807C3.99521 13.3627 5.78323 14.1763 7.74506 14.1763C10.1768 14.1763 12.3639 12.6218 13.6553 10.1534C13.6553 11.3017 13.6553 12.5162 13.6553 13.8805H16.1386V5.84308C16.1386 5.84308 9.83758 5.84308 8.36588 5.84308Z" fill="black"></path></g><defs><clipPath id="goto-black-yellow_svg__a"><rect width="49" height="24" fill="white"></rect></clipPath></defs></svg>';class Fg{constructor(e){this.hostElement=e,this.themeProvider=null,this.callbacks=new Set,this.mutationObserver=null,this.isConnected=!1,this.handleOsThemeChange=()=>{this.getThemeInfo().isAutomatic&&this.notifyCallbacks()},this.osMediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),this.handleOsThemeChange=this.handleOsThemeChange.bind(this)}connect(){this.isConnected||(this.isConnected=!0,this.themeProvider=this.findThemeProvider(),this.themeProvider&&(this.mutationObserver=new MutationObserver(()=>this.notifyCallbacks()),this.mutationObserver.observe(this.themeProvider,{attributes:!0,attributeFilter:["theme","automatic"]})),this.osMediaQuery.addEventListener("change",this.handleOsThemeChange))}disconnect(){this.isConnected&&(this.isConnected=!1,this.osMediaQuery.removeEventListener("change",this.handleOsThemeChange),this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null),this.themeProvider=null)}onThemeChange(e){return this.callbacks.add(e),()=>this.callbacks.delete(e)}getThemeInfo(){const e=this.getThemeProvider(),t=e.getAttribute("automatic"),r="true"===t||""===t,n=e.getAttribute("theme");return{isDarkMode:r?this.osMediaQuery.matches:"dark"===n,isHighContrast:"high-contrast"===n,isAutomatic:r,theme:n}}isDarkMode(){return this.getThemeInfo().isDarkMode}isHighContrast(){return this.getThemeInfo().isHighContrast}
1865getThemeProvider(){if(this.themeProvider||(this.themeProvider=this.findThemeProvider()),!this.themeProvider)throw new Error(`${this.hostElement.tagName?.toLowerCase()||"Component"} requires a chameleon-theme-provider element`);return this.themeProvider}findThemeProvider(){return qi(this.hostElement)||null}notifyCallbacks(){this.callbacks.forEach(e=>{e()})}}class Ug extends Zt{constructor(){super(...arguments),this.compact=!1,this.aspectRatio="square"}connectedCallback(){super.connectedCallback(),this.themeReactive=new Fg(this),this.themeReactive.onThemeChange(()=>this.requestUpdate()),this.themeReactive.connect()}disconnectedCallback(){super.disconnectedCallback(),this.themeReactive?.disconnect()}getSelectedSvg(){const e=this.themeReactive?.getThemeInfo()||{isDarkMode:!1,isHighContrast:!1};return e.isDarkMode||e.isHighContrast?this.compact?'<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M30.6667 27.6933L29.987 21.3333L1.33334 24.3003L2.01357 30.6667L30.6667 27.6933Z" fill="#FFE900"></path><path d="M27.9897 16.4729V23.1111H23.9764V18.6505C23.9764 18.6505 22.0718 23.1111 15.0655 23.1111C10.372 23.1111 7.75311 20.7228 6.59673 19.2125C5.68291 17.9987 5.00184 16.6158 4.59007 15.1382C4.06362 13.2134 4.02847 11.1806 4.48804 9.23754C5.06126 6.59308 6.50338 4.23509 8.56937 2.56423C9.55499 1.76842 10.6572 1.14002 11.8344 0.702699C13.7067 0.00387957 15.7232 -0.177731 17.6844 0.175856C19.7985 0.533476 21.7694 1.50848 23.3642 2.98569L23.9084 3.47742L21.0514 6.42774L20.7453 6.14675C19.5669 5.07519 18.0941 4.40972 16.5322 4.24298C14.9703 4.07624 13.3969 4.41651 12.0311 5.21645C10.6652 6.01638 9.57481 7.23618 8.91168 8.70604C8.24856 10.1759 8.04568 11.8227 8.33129 13.4172C8.52832 14.5582 8.98174 15.6355 9.65511 16.5627C10.3285 17.49 11.2031 18.2411 12.2086 18.7559C13.4329 19.4583 15.4396 19.4935 16.8341 19.2827C21.4596 18.5452 22.3439 13.9791 22.3439 13.9791H15.8818V9.83471H27.9897V16.4729Z" fill="white"></path></svg>':Mg:this.compact?'<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M30.6667 27.6933L29.987 21.3333L1.33335 24.3003L2.01357 30.6667L30.6667 27.6933Z" fill="#FFE900"></path><path d="M27.9897 16.4729V23.1111H23.9764V18.6505C23.9764 18.6505 22.0718 23.1111 15.0655 23.1111C10.372 23.1111 7.75311 20.7228 6.59673 19.2125C5.68291 17.9987 5.00184 16.6158 4.59007 15.1382C4.06362 13.2134 4.02847 11.1806 4.48804 9.23754C5.06126 6.59308 6.50338 4.23509 8.56937 2.56423C9.55499 1.76842 10.6572 1.14002 11.8344 0.702699C13.7067 0.00387955 15.7232 -0.17773 17.6844 0.175856C19.7985 0.533476 21.7694 1.50848 23.3642 2.98569L23.9084 3.47742L21.0514 6.42774L20.7453 6.14675C19.5668 5.07519 18.0941 4.40972 16.5322 4.24298C14.9703 4.07624 13.3969 4.41651 12.0311 5.21645C10.6652 6.01638 9.57481 7.23618 8.91168 8.70604C8.24856 10.1759 8.04568 11.8227 8.33129 13.4172C8.52832 14.5582 8.98174 15.6355 9.65511 16.5627C10.3285 17.49 11.2031 18.2411 12.2086 18.7559C13.4329 19.4583 15.4396 19.4935 16.8341 19.2827C21.4596 18.5452 22.3439 13.9791 22.3439 13.9791H15.8818V9.83471H27.9897V16.4729Z" fill="black"></path></svg>':zg}render(){const e=this.getSelectedSvg();if("original"===this.aspectRatio){const t=qt.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0}});return Ni`
1866        <slot>
1867          <div class="logo-container logo-original" aria-hidden="true">${Mi(t)}</div>
1868        </slot>
1869      `}const t=Oi(u(mr));return Ni`
1870      <slot>
1871        <${t} class="logo-container">${e}</${t}>
1872      </slot>
1873    `}}Ug.baseName="goto-logo",Ug.styles=b(":host{--goto-icon-size:48px;display:flex}:host .logo-container{align-items:center;display:flex}:host:host([aspect-ratio=original]) .logo-original svg{width:var(--goto-icon-size,48px);height:auto}"),h([Te({type:Boolean,reflect:!0})],Ug.prototype,"compact",void 0),h([Te({reflect:!0,attribute:"aspect-ratio"})],Ug.prototype,"aspectRatio",void 0),function(e={}){vr(e),d(Ug,e)}();const Bg=e=>e.normalize("NFD").replace(/\p{Diacritic}/gu,""),Hg=/[.*+?^${}()|[\]\\]/g,jg=/[a-z0-9_]/i,Vg=/\s+/;function Wg(e,t,r={}){const{findAllOccurrences:n,insideWords:o,requireMatchAll:i}={insideWords:!1,findAllOccurrences:!1,requireMatchAll:!1,...r},s=Array.from(e).map(e=>Bg(e));let a=s.join("");return Bg(t).trim().split(Vg).filter(e=>e.length>0).reduce((e,t)=>
1873{const r=t.length,l=!o&&jg.test(t[0])?"\\b":"",c=new RegExp(l+t.replace(Hg,"\\$&"),"i");let d=c.exec(a);if(i&&null===d)return a="",[];let u=d?.index;for(;d;){u=d.index;const t=r-s.slice(u,u+r).join("").length,o=u-s.slice(0,u).join("").length,i=[u+o,u+r+o+t];if(i[0]!==i[1]&&e.push(i),a=a.slice(0,u)+new Array(r+1).join(" ")+a.slice(u+r),!n)break;d=c.exec(a)}return e},[]).sort((e,t)=>e[0]-t[0])}function Kg(e,t){const r=[];return 0===t.length?r.push({text:e,highlight:!1}):t[0][0]>0&&r.push({text:e.slice(0,t[0][0]),highlight:!1}),t.forEach((n,o)=>{const i=n[0],s=n[1];r.push({text:e.slice(i,s),highlight:!0}),o===t.length-1?s<e.length&&r.push({text:e.slice(s,e.length),highlight:!1}):s<t[o+1][0]&&r.push({text:e.slice(s,t[o+1][0]),highlight:!1})}),r}class qg extends Zt{constructor(){super(...arguments),this.handleSlotChange=()=>{const e=this.shadowRoot?.querySelector("slot"),t=e?.assignedNodes()||[];this.contentChanged(void 0,t)},this.highlightNode=(e,t)=>{if(!t)return null;Array.from(e.childNodes).forEach(e=>{e.nodeType===Node.TEXT_NODE?this.highlightTextNode(e,t):e.nodeType===Node.ELEMENT_NODE&&this.highlightNode(e,t)})}}render(){return oe`
1874      <span class="content" part="content">
1875        <slot @slotchange=${this.handleSlotChange}></slot>
1876      </span>
1877    `}updated(e){super.updated(e),e.has("filterAttribute")&&this.handleSlotChange()}highlightTextNode(e,t){const r=e?.textContent??"",n=Kg(r,Wg(r,t,{insideWords:!0,findAllOccurrences:!0}));let o=e;n.forEach(e=>{const t=o.splitText(e.text.length);if(e.highlight){const e=document.createElement("span");e.className="highlight";const t=o.cloneNode();e.appendChild(t),o.replaceWith(e)}o=t})}contentChanged(e,t){const r=this.shadowRoot?.querySelector(".content slot");if(r?.toggleAttribute("hidden",!!this.filterAttribute),this.shadowRoot?.querySelector("#internal-highlight")?.remove(),this.filterAttribute){const e=document.createElement("span");t.forEach(t=>{e.appendChild(t.cloneNode(!0))}),this.highlightNode(e,this.filterAttribute),e.id="internal-highlight",r?.parentElement?.appendChild(e)}}}qg.baseName="highlight",qg.styles=b("[hidden]{display:none}:host .highlight{font:var(--highlight-type-font,var(--goto-body-medium-strong));color:var(--highlight-type-color,var(--goto-highlight-type-color));background-color:var(--highlight-background-color,var(--goto-highlight-background-color))}"),h([Te({attribute:"filter"})],qg.prototype,"filterAttribute",void 0),function(e={}){d(qg,e)}(),fl();class Gg extends Jn{}class Zg extends(Iu(Gg)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class Yg extends Zg{constructor(){super(...arguments),this.hideStep=!1,this.step=1,this.isUserInput=!1}maxChanged(e,t){var r;this.max=Math.max(t,null!==(r=this.min)&&void 0!==r?r:t);const n=Math.min(this.min,this.max);void 0!==this.min&&this.min!==n&&(this.min=n),this.value=this.getValidValue(this.value)}minChanged(e,t){var r;this.min=Math.min(t,null!==(r=this.max)&&void 0!==r?r:t);const n=Math.max(this.min,this.max);void 0!==this.max&&this.max!==n&&(this.max=n),this.value=this.getValidValue(this.value)}get valueAsNumber(){return parseFloat(super.value)}set valueAsNumber(e){this.value=e.toString()}valueChanged(e,t){this.value=this.getValidValue(t),t===this.value&&(this.control&&!this.isUserInput&&(this.control.value=this.value),super.valueChanged(e,this.value),void 0===e||this.isUserInput||(this.$emit("input"),this.$emit("change")),this.isUserInput=!1)}validate(){super.validate(this.control)}getValidValue(e){var t,r;let n=parseFloat(parseFloat(e).toPrecision(12));return isNaN(n)?n="":(n=Math.min(n,null!==(t=this.max)&&void 0!==t?t:n),n=Math.max(n,null!==(r=this.min)&&void 0!==r?r:n).toString()),n}stepUp(){const e=parseFloat(this.value),t=isNaN(e)?this.min>0?this.min:this.max<0?this.max:this.min?0:this.step:e+this.step;this.value=t.toString()}stepDown(){const e=parseFloat(this.value),t=isNaN(e)?this.min>0?this.min:this.max<0?this.max:this.min?0:0-this.step:e-this.step;this.value=t.toString()}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type","number"),this.validate(),this.control.value=this.value,this.autofocus&&Tr.queueUpdate(()=>{this.focus()})}select(){this.control.select(),this.$emit("select")}handleTextInput(){this.control.value=this.control.value.replace(/[^0-9\-+e.]/g,""),this.isUserInput=!0,this.value=this.control.value}handleChange(){this.$emit("change")}handleKeyDown(e){switch(e.key){case yi:return this.stepUp(),!1;case mi:return this.stepDown(),!1}return!0}handleBlur(){this.control.value=this.value}}nn([Qr({attribute:"readonly",mode:"boolean"})],Yg.prototype,"readOnly",void 0),nn([Qr({mode:"boolean"})],Yg.prototype,"autofocus",void 0),nn([Qr({attribute:"hide-step",mode:"boolean"})],Yg.prototype,"hideStep",void 0),nn([Qr],Yg.prototype,"placeholder",void 0),nn([Qr],Yg.prototype,"list",void 0),nn([Qr({converter:Yr})],Yg.prototype,"maxlength",void 0),nn([Qr({converter:Yr})],Yg.prototype,"minlength",void 0),nn([Qr({converter:Yr})],Yg.prototype,"size",void 0),nn([Qr({converter:Yr})],Yg.prototype,"step",void 0),nn([Qr({converter:Yr})],Yg.prototype,"max",void 0),nn([Qr({converter:Yr})],Yg.prototype,"min",void 0),nn([Nr],Yg.prototype,"defaultSlottedNodes",void 0),oc(Yg,tc,$p);class Jg extends(s(Yg)){constructor(){super(...arguments),this.fieldsize="medium",this.success=!1,this.error=!1,this.optional=!1,this.infoContainer=document.createElement("div"),this.helperTextEl=document.createElement("slot"),this.handleKeydown=e=>{this.hasAttribute("disabled")&&"Tab"!==e.key&&e.preventDefault()},this.handleHelperTextSlotChange=()=>{const e=this.helperTextEl.assignedElements()[0];e&&e.textContent&&this.control.setAttribute("aria-describedby",e.id)}}errorChanged(e,t){this.ariaInvalid=t?"true":null}connectedCallback(){super.connectedCallback(),this.control?.setAttribute("type","number");const e=this.shadowRoot?.querySelector('[name="helpertext"]');if(!e){const e=document.createElement("slot");e.name="helpertext",this.shadowRoot?.appendChild(e)}this.addHelperText(),this.addIdForLabel(),this.setAccessibleLabel(),this.control?.addEventListener("keydown",this.handleKeydown)}disconnectedCallback(){super.disconnectedCallback(),this.helperTextEl.removeEventListener("slotchange",this.handleHelperTextSlotChange),this.control?.removeEventListener("keydown",this.handleKeydown)}addHelperText(){this.helperTextEl.setAttribute("name","helpertext"),this.helperTextEl.setAttribute("id",xa("helpertext-")),this.helperTextEl.addEventListener("slotchange",this.handleHelperTextSlotChange);const e=this.shadowRoot?.querySelector('[name="helpertext"]');
1877e||this.infoContainer?.prepend(this.helperTextEl)}attributeChangedCallback(e,t,r){super.attributeChangedCallback(e,t,r),"readonly"===e&&this.hasAttribute("readonly")?this.setAttribute("aria-readonly","true"):"readonly"!==e||this.hasAttribute("readonly")||this.removeAttribute("aria-readonly"),this.addAllRelevantAttributes(),this.hasAttribute("disabled")&&requestAnimationFrame(()=>{this.isConnected&&this.control?.removeAttribute("disabled")}),this.control?.setAttribute("aria-disabled",`${this.hasAttribute("disabled")}`),this.hasAttribute("disabled")&&this.control?.setAttribute("readonly",`${this.hasAttribute("disabled")}`)}addAllRelevantAttributes(){this.getAttributeNames().forEach(e=>{Object.keys(HTMLInputElement.prototype).includes(e)&&(this.control?.setAttribute(e,this.getAttribute(e)),"disabled"===e&&(this.control?.removeAttribute("disabled"),this.control?.setAttribute("aria-disabled",`${this.hasAttribute("disabled")}`),this.control?.setAttribute("readonly",`${this.hasAttribute("disabled")}`)))}),this.optional||this.textContent?.includes("(optional)")?this.control?.removeAttribute("aria-required"):this.control?.setAttribute("aria-required","true")}addIdForLabel(){const e=this.shadowRoot?.querySelector("label");this.labelId?this.setAttribute("aria-labelledby",this.labelId):e&&(e.id=xa("label-"),this.control.setAttribute("aria-labelledby",e.id))}setAccessibleLabel(){this.textContent?.trim()||this.labelId&&this.setAttribute("aria-labelledby",this.labelId)}validateAccessibleLabel(){this.getAttribute("aria-labelledby")?.length||console.error("CHAMELEON-A11Y: NumberField component must have an accessible label provided by either   \n  1) text content \n  2) a visible label whose id is given as the attribute labelId\n")}}h([Qr],Jg.prototype,"fieldsize",void 0),h([Qr({mode:"boolean"})],Jg.prototype,"success",void 0),h([Qr({mode:"boolean"})],Jg.prototype,"error",void 0),h([Qr({mode:"boolean"})],Jg.prototype,"optional",void 0),h([Qr({attribute:"label-id"})],Jg.prototype,"labelId",void 0);const Qg={baseName:"number-field",template:(e,t)=>
1877ri`
1878    <template class="${e=>e.readOnly?"readonly":""}">
1879        <label
1880            part="label"
1881            for="control"
1882            class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label__hidden"}"
1883        >
1884            <slot ${si("defaultSlottedNodes")}></slot>
1885        </label>
1886        <div class="root" part="root">
1887            ${nc(0,t)}
1888            <input
1889                class="control"
1890                part="control"
1891                id="control"
1892                @input="${e=>e.handleTextInput()}"
1893                @change="${e=>e.handleChange()}"
1894                @keydown="${(e,t)=>e.handleKeyDown(t.event)}"
1895                @blur="${(e,t)=>e.handleBlur()}"
1896                ?autofocus="${e=>e.autofocus}"
1897                ?disabled="${e=>e.disabled}"
1898                list="${e=>e.list}"
1899                maxlength="${e=>e.maxlength}"
1900                minlength="${e=>e.minlength}"
1901                placeholder="${e=>e.placeholder}"
1902                ?readonly="${e=>e.readOnly}"
1903                ?required="${e=>e.required}"
1904                size="${e=>e.size}"
1905                type="text"
1906                inputmode="numeric"
1907                min="${e=>e.min}"
1908                max="${e=>e.max}"
1909                step="${e=>e.step}"
1910                aria-atomic="${e=>e.ariaAtomic}"
1911                aria-busy="${e=>e.ariaBusy}"
1912                aria-controls="${e=>e.ariaControls}"
1913                aria-current="${e=>e.ariaCurrent}"
1914                aria-describedby="${e=>e.ariaDescribedby}"
1915                aria-details="${e=>e.ariaDetails}"
1916                aria-disabled="${e=>e.ariaDisabled}"
1917                aria-errormessage="${e=>e.ariaErrormessage}"
1918                aria-flowto="${e=>e.ariaFlowto}"
1919                aria-haspopup="${e=>e.ariaHaspopup}"
1920                aria-hidden="${e=>e.ariaHidden}"
1921                aria-invalid="${e=>e.ariaInvalid}"
1922                aria-keyshortcuts="${e=>e.ariaKeyshortcuts}"
1923                aria-label="${e=>e.ariaLabel}"
1924                aria-labelledby="${e=>e.ariaLabelledby}"
1925                aria-live="${e=>e.ariaLive}"
1926                aria-owns="${e=>e.ariaOwns}"
1927                aria-relevant="${e=>e.ariaRelevant}"
1928                aria-roledescription="${e=>e.ariaRoledescription}"
1929                ${li("control")}
1930            />
1931            ${Aa(e=>!e.hideStep&&!e.readOnly&&!e.disabled,ri`
1932                    <div class="controls" part="controls">
1933                        <div class="step-up" part="step-up" @click="${e=>e.stepUp()}">
1934                            <slot name="step-up-glyph">
1935                                ${t.stepUpGlyph||""}
1936                            </slot>
1937                        </div>
1938                        <div
1939                            class="step-down"
1940                            part="step-down"
1941                            @click="${e=>e.stepDown()}"
1942                        >
1943                            <slot name="step-down-glyph">
1944                                ${t.stepDownGlyph||""}
1945                            </slot>
1946                        </div>
1947                    </div>
1948                `)}
1949            ${rc(0,t)}
1950        </div>
1951    </template>
1952`,styles:Dp,shadowOptions:{delegatesFocus:!0}},Xg=Jg.compose(Qg);var ef='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M21 13H3V11H21V13Z" fill="currentColor"></path></svg>';class tf extends(a(Jn,"input-stepper")){constructor(){super(...arguments),this.size="medium",this.value=0,this.step=1,this.min=0,this.max=999,this.helpertext="",this.incrementLabel="Increment number",this.decrementLabel="Decrement number"}sanitizeValue(){this.value=Number(this.value)}addIdForLabel(){const e=this.shadowRoot?.querySelector(u(Jg))?.shadowRoot?.querySelector("label");e&&(e.id=xa("label-"),this.shadowRoot?.querySelector(u(Jg))?.setAttribute("aria-labelledby",e.id))}setAccessibleLabel(){this.textContent?.trim()||this.labelId&&this.setAttribute("aria-labelledby",this.labelId)}validateAccessibleLabel(){this.getAttribute("aria-labelledby")?.length||console.error("CHAMELEON-A11Y: InputStepper component must have an accessible label provided by either \n  1) text content \n  2) a visible label whose id is given as the attribute labelId\n")}connectedCallback(){super.connectedCallback(),this.addIdForLabel(),this.setAccessibleLabel()}attributeChangedCallback(e,t,r){super.attributeChangedCallback(e,t,r),"readonly"===e&&r?this.setAttribute("aria-readonly","true"):"readonly"===e&&this.removeAttribute("aria-readonly")}cantGoLower(){return!!this.disabled||this.value<=Number(this.min)}cantGoHigher(){return!!this.disabled||this.value>=Number(this.max)}
1952increment(){this.cantGoHigher()||(this.sanitizeValue(),this.value+=Number(this.step),this.$emit("change",null,{bubbles:!1}))}decrement(){this.cantGoLower()||(this.sanitizeValue(),this.value-=Number(this.step),this.$emit("change",null,{bubbles:!1}))}handleChange(e){this.sanitizeValue(),this.value=e.target.value,this.$emit("change",null,{bubbles:!1})}}h([Qr],tf.prototype,"size",void 0),h([Qr],tf.prototype,"value",void 0),h([Qr],tf.prototype,"step",void 0),h([Qr],tf.prototype,"min",void 0),h([Qr],tf.prototype,"max",void 0),h([Qr({mode:"boolean"})],tf.prototype,"disabled",void 0),h([Qr({mode:"boolean"})],tf.prototype,"error",void 0),h([Qr],tf.prototype,"helpertext",void 0),h([Qr({attribute:"increment-aria-label"})],tf.prototype,"incrementLabel",void 0),h([Qr({attribute:"decrement-aria-label"})],tf.prototype,"decrementLabel",void 0),h([Qr({attribute:"label-id"})],tf.prototype,"labelId",void 0);const rf={baseName:"input-stepper",template:(e,t)=>{const r=u(mr),n=u(Jg),o=u(Wi);return ri`<template>
1953    <${n}
1954      disabled=${e=>e.disabled}
1955      error=${e=>e.error}
1956      :value=${e=>e.value}
1957      @change=${(e,{event:t})=>e.handleChange(t)}
1958      fieldsize="${e=>e.size}"
1959      :step="${e=>e.step}"
1960      :max=${e=>e.max}
1961      :min=${e=>e.min}
1962      label-id=${e=>e.labelId??"CHAMELEON_BYPASS_LABEL_ID"}
1963    >
1964      <${o}
1965        variant="${"primary"}"
1966        size="${e=>e.size}"
1967        slot="start"
1968        aria-label=${e=>e.decrementLabel}
1969        @click=${e=>e.decrement()}
1970        ?disabled=${e=>e.cantGoLower()}
1971      >
1972        <${r}>${ef}</${r}>
1973      </${o}>
1974      <${o}
1975        variant="${"primary"}"
1976        size="${e=>e.size}"
1977        slot="end"
1978        aria-label=${e=>e.incrementLabel}
1979        ?disabled=${e=>e.cantGoHigher()}
1980        @click=${e=>e.increment()}
1981      >
1982        <${r}>${'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M13 3H11V11H3V13H11V21H13V13H21V11H13V3Z" fill="currentColor"></path></svg>'}</${r}>
1983      </${o}>
1984      <span class="helper-text" slot="helpertext">${e=>e.helpertext}</span>
1985      <slot></slot>
1986    </${n}>
1987  </template>`},styles:Ci(":host chameleon-number-field::part(root){padding:var(--goto-spacing-00)var(--goto-spacing-01)}:host chameleon-number-field::part(control){text-align:center}:host chameleon-number-field .helper-text{cursor:text}")},nf=tf.compose(rf);!function(e){vr({prefix:e}),fl({prefix:e}),gl({prefix:e}),To({prefix:e,node:void 0},Xg,nf)}();class of extends Zt{connectedCallback(){super.connectedCallback(),this.themeReactive=new Fg(this),this.themeReactive.onThemeChange(()=>{this.requestUpdate()}),this.themeReactive.connect()}disconnectedCallback(){super.disconnectedCallback(),this.themeReactive?.disconnect()}render(){const e=Oi(u(mr)),t=this.themeReactive?.getThemeInfo()||{isDarkMode:!1,isHighContrast:!1};return Ni`
1988      <slot>
1989      ${t.isDarkMode||t.isHighContrast?Ni`<${e}>${Mi(Mg)}</${e}>`:Ni`<${e}>${Mi(zg)}</${e}>`}
1990      </slot>
1991    `}}of.baseName="launch-screen",of.styles=b(":host{--goto-icon-size:var(--goto-layout-07);background-color:var(--goto-background-color-default);place-items:center;width:100%;height:100%;display:grid}:host slot{animation:pulse 1.3s var(--goto-standard-easing)infinite;display:inline-flex}:host ::slotted(svg){height:var(--goto-icon-size);width:var(--goto-icon-size)}:host chameleon-svg{animation:pulse 1.3s var(--goto-standard-easing)infinite;display:inline-flex}@keyframes pulse{0%{transform:scaleX(1)}50%{transform:scale3d(1.05,1.05,1.05)}to{transform:scaleX(1)}}"),function(e={}){vr(e),d(of,e)}();class sf extends Zt{constructor(){super(...arguments),this.value=null,this.min=0,this.max=100,this.size="medium"}get _isDeterminate(){return null!==this.value&&void 0!==this.value}get _percentComplete(){if(!this._isDeterminate||null===this.value||void 0===this.value)return 0;const e=this.max-this.min;return e<=0?0:Math.max(0,Math.min(100,(this.value-this.min)/e*100))}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","progressbar"),this._syncAriaAttributes()}updated(e){super.updated(e),(e.has("value")||e.has("min")||e.has("max"))&&this._syncAriaAttributes()}_syncAriaAttributes(){this._isDeterminate?this.setAttribute("aria-valuenow",String(this.value)):this.removeAttribute("aria-valuenow"),this.setAttribute("aria-valuemin",String(this.min)),this.setAttribute("aria-valuemax",String(this.max))}render(){return oe`
1992      <div class="progress" part="progress">
1993        ${this._isDeterminate?oe`<div class="determinate" part="determinate" style="width: ${this._percentComplete}%"></div>`:oe`
1994              <div class="indeterminate" part="indeterminate">
1995                <span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>
1996                <span class="indeterminate-indicator-2" part="indeterminate-indicator-2"></span>
1997              </div>
1998            `}
1999      </div>
2000    `}}function af(e={}){return d(sf,e)}sf.baseName="linear-progress",sf.styles=b(":host([hidden]){display:none}:host{outline:none;align-items:center;width:100%;height:4px;margin:4px 0;display:flex}.progress{background-color:var(--goto-surface-color-brand-secondary);border-radius:2px;align-items:center;width:100%;height:100%;display:flex;position:relative}.determinate{background-color:var(--goto-progress-color,var(--goto-surface-color-brand-default));border-radius:2px;height:100%;transition:all .2s ease-in-out;display:flex}.indeterminate{border-radius:2px;width:100%;height:100%;display:flex;position:relative;overflow:hidden}.indeterminate-indicator-1{opacity:0;background-color:var(--goto-surface-color-brand-default);border-radius:2px;width:40%;height:100%;animation:2s infinite indeterminate-1;position:absolute}.indeterminate-indicator-2{opacity:0;background-color:var(--goto-surface-color-brand-default);border-radius:2px;width:60%;height:100%;animation:2s infinite indeterminate-2;position:absolute}:host([paused]) .indeterminate-indicator-1,:host([paused]) .indeterminate-indicator-2{background-color:var(--goto-surface-color-brand-secondary);animation-play-state:paused}:host([paused]) .determinate{background-color:var(--goto-surface-color-brand-secondary)}:host([size=large]){height:8px}:host([size=large]) .progress,:host([size=large]) .determinate,:host([size=large]) .indeterminate,:host([size=large]) .indeterminate-indicator-1,:host([size=large]) .indeterminate-indicator-2{border-radius:var(--goto-radius-small)}:host([inverse]) .progress{background-color:var(--goto-surface-color-tertiary)}:host([inverse]) .determinate,:host([inverse]) .indeterminate-indicator-1,:host([inverse]) .indeterminate-indicator-2{background-color:var(--goto-surface-color-brand-default)}@keyframes indeterminate-1{0%{opacity:1;transform:translate(-100%)}70%{opacity:1;transform:translate(300%)}70.01%{opacity:0}to{opacity:0;transform:translate(300%)}}@keyframes indeterminate-2{0%{opacity:0;transform:translate(-150%)}29.99%{opacity:0}
200030%{opacity:1;transform:translate(-150%)}to{opacity:1;transform:translate(166.66%)}}"),h([Te({type:Number,reflect:!0})],sf.prototype,"value",void 0),h([Te({type:Number,reflect:!0})],sf.prototype,"min",void 0),h([Te({type:Number,reflect:!0})],sf.prototype,"max",void 0),h([Te({reflect:!0})],sf.prototype,"size",void 0),h([Te({type:Boolean,reflect:!0})],sf.prototype,"inverse",void 0),h([Te({type:Boolean,reflect:!0})],sf.prototype,"paused",void 0),af(),Mu();class lf extends Zt{constructor(){super(...arguments),this.link="",this.target="_blank",this.newTabLabel="opens in a new tab",this.text="",this.hideTooltip=!0,this.hostname="",this.handleSlotChange=e=>{const t=e.target,r=t.assignedElements();"image"===t.name?this.handleImageSlotChange(r):"name"===t.name&&this.handleTitleSlotChange(r)}}handleImageSlotChange(e){e.length>0?(this.icon?.remove(),this.icon=void 0):this.setNoImageState()}handleTitleSlotChange(e){const t=e[0],r=t?.textContent?.trim()??"";this.text=r,t&&r?this.updateComplete.then(()=>{t.scrollWidth>t.clientWidth?this.hideTooltip=!1:this.hideTooltip=!0}):this.hideTooltip=!0}updated(e){super.updated(e),e.has("link")&&this.updateHostname()}firstUpdated(e){super.firstUpdated(e),this.setNoImageState(),this.updateHostname()}updateHostname(){if(this.link)try{this.hostname=new URL(this.link).hostname}catch(e){console.warn("The link provided is wrong"),this.hostname=""}else this.hostname=""}setNoImageState(){!this.icon&&this.previewElement&&(this.icon=document.createElement(u(mr)),this.icon.innerHTML='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M19.7071 11.7071L16.7071 14.7071L15.2929 13.2929L18.2929 10.2929C19.5592 9.02656 19.5592 6.97343 18.2929 5.7071C17.0265 4.44077 14.9734 4.44077 13.7071 5.7071L10.7071 8.7071L9.29287 7.29289L12.2929 4.29289C14.3402 2.24551 17.6597 2.24551 19.7071 4.29289C21.7545 6.34027 21.7545 9.65972 19.7071 11.7071ZM4.29286 12.2929L7.29286 9.29289L8.70707 10.7071L5.70707 13.7071C4.44074 14.9734 4.44074 17.0266 5.70707 18.2929C6.9734 19.5592 9.02653 19.5592 10.2929 18.2929L13.2929 15.2929L14.7071 16.7071L11.7071 19.7071C9.65969 21.7545 6.34023 21.7545 4.29286 19.7071C2.24548 17.6597 2.24548 14.3403 4.29286 12.2929ZM15.2929 7.29289L7.29288 15.2929L8.70709 16.7071L16.7071 8.7071L15.2929 7.29289Z" fill="currentColor"></path></svg>',this.icon.setAttribute("class","link-icon"),this.previewElement.appendChild(this.icon))}render(){const e=Oi(u(Hl)),t=Oi(u(Ca)),r=this.text||this.hostname||this.link||"",n="_blank"===this.target,o=n&&r?`${r}, ${this.newTabLabel}`:!this.text&&r?r:void 0,i=n?"noreferrer":void 0;return Ni`
2001      <a
2002        href="${this.link}"
2003        target="${this.target}"
2004        rel="${Bl(i)}"
2005        aria-label="${Bl(o)}"
2006        class="container"
2007      >
2008        <div class="preview">
2009          <slot name="image" @slotchange=${this.handleSlotChange}></slot>
2010        </div>
2011        <div class="description">
2012          <${e}
2013            id="trigger"
2014            class="name"
2015            variant="body-large-strong"
2016            color="type-color-default"
2017            .nowrap=${!0}
2018          >
2019            <slot name="name" @slotchange=${this.handleSlotChange}></slot>
2020          </${e}>
2021          <${t} 
2022            position="top-center" 
2023            trigger-id="trigger" 
2024            .hidden=${this.hideTooltip}
2025          >
2026            <${e} variant="caption-medium">${this.text}</${e}>
2027          </${t}>
2028          <${e} 
2029            class="link-container" 
2030            variant="caption-medium" 
2031            color="type-color-secondary" 
2032            .nowrap=${!0}
2033          >
2034            <div class="link">${this.hostname}</div>
2035          </${e}>
2036        </div>
2037      </a>
2038    `}}function cf(e){return Zl(e)&&("option"===e.getAttribute("role")||e instanceof HTMLOptionElement)}lf.baseName="link-thumbnail",lf.styles=b(":host .container{border-radius:var(--goto-radius-xlarge);border:1px solid var(--goto-border-color-secondary);cursor:pointer;flex-direction:column;width:232px;height:180px;text-decoration:none;display:flex}:host .container .preview{border-top-left-radius:var(--goto-radius-xlarge);border-top-right-radius:var(--goto-radius-xlarge);border-bottom:1px solid var(--goto-border-color-secondary);background-color:var(--goto-interactive-color-disabled);justify-content:center;align-items:center;width:100%;height:100%;display:flex}:host .container .preview .link-icon{--goto-icon-color:var(--goto-icon-color-disabled);--goto-icon-size:var(--goto-spacing-06)}:host .container .preview ::slotted([slot=image]){border-top-left-radius:var(--goto-radius-xlarge);border-top-right-radius:var(--goto-radius-xlarge);width:232px;height:120px}:host .container .description{width:208px;height:60px;padding:var(--goto-spacing-02)var(--goto-spacing-03);border-bottom-left-radius:var(--goto-radius-xlarge);border-bottom-right-radius:var(--goto-radius-xlarge);background-color:var(--goto-interactive-color-neutral-default)}:host .container .description .name{height:var(--goto-spacing-06);text-align:start}:host .container .description ::slotted([slot=name]){text-overflow:ellipsis;white-space:nowrap;width:208px;display:inline-block;overflow:hidden}:host .container .description .link-container{height:var(--goto-spacing-05);text-align:start}:host .container .description .link{text-overflow:ellipsis;width:208px;display:inline-block;overflow:hidden}:host .container:hover .description{background-color:var(--goto-interactive-color-neutral-hover)}:host .container:active .description{background-color:var(--goto-interactive-color-neutral-pressed)}:host .container:focus-visible .description{outline-offset:2px;outline:1px solid var(--goto-focus-color-highlight-default)}"),h([Te()],lf.prototype,"link",void 0),h([Te()],lf.prototype,"target",void 0),h([Te({attribute:"new-tab-label"}
2038)],lf.prototype,"newTabLabel",void 0),h([Oe()],lf.prototype,"text",void 0),h([Oe()],lf.prototype,"hideTooltip",void 0),h([Oe()],lf.prototype,"hostname",void 0),h([$e(".preview")],lf.prototype,"previewElement",void 0),function(e={}){const{prefix:t}=e;vr({prefix:t}),yl(t),Gl(e),d(lf,e)}();class df extends Jn{constructor(e,t,r,n){super(),this.defaultSelected=!1,this.dirtySelected=!1,this.selected=this.defaultSelected,this.dirtyValue=!1,e&&(this.textContent=e),t&&(this.initialValue=t),r&&(this.defaultSelected=r),n&&(this.selected=n),this.proxy=new Option(`${this.textContent}`,this.initialValue,this.defaultSelected,this.selected),this.proxy.disabled=this.disabled}checkedChanged(e,t){this.ariaChecked="boolean"!=typeof t?null:t?"true":"false"}contentChanged(e,t){this.proxy instanceof HTMLOptionElement&&(this.proxy.textContent=this.textContent),this.$emit("contentchange",null,{bubbles:!0})}defaultSelectedChanged(){this.dirtySelected||(this.selected=this.defaultSelected,this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.defaultSelected))}disabledChanged(e,t){this.ariaDisabled=this.disabled?"true":"false",this.proxy instanceof HTMLOptionElement&&(this.proxy.disabled=this.disabled)}selectedAttributeChanged(){this.defaultSelected=this.selectedAttribute,this.proxy instanceof HTMLOptionElement&&(this.proxy.defaultSelected=this.defaultSelected)}selectedChanged(){this.ariaSelected=this.selected?"true":"false",this.dirtySelected||(this.dirtySelected=!0),this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.selected)}initialValueChanged(e,t){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}get label(){var e;return null!==(e=this.value)&&void 0!==e?e:this.text}get text(){var e,t;return null!==(t=null===(e=this.textContent)||void 0===e?void 0:e.replace(/\s+/g," ").trim())&&void 0!==t?t:""}set value(e){const t=`${null!=e?e:""}`;this._value=t,this.dirtyValue=!0,this.proxy instanceof HTMLOptionElement&&(this.proxy.value=t),$r.notify(this,"value")}get value(){var e;return $r.track(this,"value"),null!==(e=this._value)&&void 0!==e?e:this.text}get form(){return this.proxy?this.proxy.form:null}}nn([Nr],df.prototype,"checked",void 0),nn([Nr],df.prototype,"content",void 0),nn([Nr],df.prototype,"defaultSelected",void 0),nn([Qr({mode:"boolean"})],df.prototype,"disabled",void 0),nn([Qr({attribute:"selected",mode:"boolean"})],df.prototype,"selectedAttribute",void 0),nn([Nr],df.prototype,"selected",void 0),nn([Qr({attribute:"value",mode:"fromView"})],df.prototype,"initialValue",void 0);class uf{}nn([Nr],uf.prototype,"ariaChecked",void 0),nn([Nr],uf.prototype,"ariaPosInSet",void 0),nn([Nr],uf.prototype,"ariaSelected",void 0),nn([Nr],uf.prototype,"ariaSetSize",void 0),oc(uf,_u),oc(df,tc,uf);class hf extends Jn{constructor(){super(...arguments),this._options=[],this.selectedIndex=-1,this.selectedOptions=[],this.shouldSkipFocus=!1,this.typeaheadBuffer="",this.typeaheadExpired=!0,this.typeaheadTimeout=-1}get firstSelectedOption(){var e;return null!==(e=this.selectedOptions[0])&&void 0!==e?e:null}get hasSelectableOptions(){return this.options.length>0&&!this.options.every(e=>e.disabled)}get length(){var e,t;return null!==(t=null===(e=this.options)||void 0===e?void 0:e.length)&&void 0!==t?t:0}get options(){return $r.track(this,"options"),this._options}set options(e){this._options=e,$r.notify(this,"options")}get typeAheadExpired(){return this.typeaheadExpired}set typeAheadExpired(e){this.typeaheadExpired=e}clickHandler(e){const t=e.target.closest("option,[role=option]");if(t&&!t.disabled)return this.selectedIndex=this.options.indexOf(t),!0}focusAndScrollOptionIntoView(e=this.firstSelectedOption){this.contains(document.activeElement)&&null!==e&&(e.focus(),requestAnimationFrame(()=>{e.scrollIntoView({block:"nearest"})}))}focusinHandler(e){this.shouldSkipFocus||e.target!==e.currentTarget||(this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}getTypeaheadMatches(){const e=this.typeaheadBuffer.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&"),t=new RegExp(`^${e}`,"gi");return this.options.filter(e=>e.text.trim().match(t))}getSelectableIndex(e=this.selectedIndex,t){const r=e>t?-1:e<t?1:0,n=e+r;let o=null;switch(r){case-1:o=this.options.reduceRight((e,t,r)=>!e&&!t.disabled&&r<n?t:e,o);break;case 1:o=this.options.reduce((e,t,r)=>!e&&!t.disabled&&r>n?t:e,o)}return this.options.indexOf(o)}handleChange(e,t){"selected"===t&&(hf.slottedOptionFilter(e)&&(this.selectedIndex=this.options.indexOf(e)),this.setSelectedOptions())}handleTypeAhead(e){this.typeaheadTimeout&&window.clearTimeout(this.typeaheadTimeout),this.typeaheadTimeout=window.setTimeout(()=>
2038this.typeaheadExpired=!0,hf.TYPE_AHEAD_TIMEOUT_MS),e.length>1||(this.typeaheadBuffer=`${this.typeaheadExpired?"":this.typeaheadBuffer}${e}`)}keydownHandler(e){if(this.disabled)return!0;this.shouldSkipFocus=!1;const t=e.key;switch(t){case"Home":e.shiftKey||(e.preventDefault(),this.selectFirstOption());break;case mi:e.shiftKey||(e.preventDefault(),this.selectNextOption());break;case yi:e.shiftKey||(e.preventDefault(),this.selectPreviousOption());break;case"End":e.preventDefault(),this.selectLastOption();break;case"Tab":return this.focusAndScrollOptionIntoView(),!0;case"Enter":case"Escape":return!0;case" ":if(this.typeaheadExpired)return!0;default:return 1===t.length&&this.handleTypeAhead(`${t}`),!0}}mousedownHandler(e){return this.shouldSkipFocus=!this.contains(document.activeElement),!0}multipleChanged(e,t){this.ariaMultiSelectable=t?"true":null}selectedIndexChanged(e,t){var r;if(this.hasSelectableOptions){if((null===(r=this.options[this.selectedIndex])||void 0===r?void 0:r.disabled)&&"number"==typeof e){const r=this.getSelectableIndex(e,t),n=r>-1?r:e;return this.selectedIndex=n,void(t===n&&this.selectedIndexChanged(t,n))}this.setSelectedOptions()}else this.selectedIndex=-1}selectedOptionsChanged(e,t){var r;const n=t.filter(hf.slottedOptionFilter);null===(r=this.options)||void 0===r||r.forEach(e=>{const t=$r.getNotifier(e);t.unsubscribe(this,"selected"),e.selected=n.includes(e),t.subscribe(this,"selected")})}selectFirstOption(){var e,t;this.disabled||(this.selectedIndex=null!==(t=null===(e=this.options)||void 0===e?void 0:e.findIndex(e=>!e.disabled))&&void 0!==t?t:-1)}selectLastOption(){this.disabled||(this.selectedIndex=function(e,t){let r=e.length;for(;r--;)if(t(e[r]))return r;return-1}(this.options,e=>!e.disabled))}selectNextOption(){!this.disabled&&this.selectedIndex<this.options.length-1&&(this.selectedIndex+=1)}selectPreviousOption(){!this.disabled&&this.selectedIndex>0&&(this.selectedIndex=this.selectedIndex-1)}setDefaultSelectedOption(){var e,t;this.selectedIndex=null!==(t=null===(e=this.options)||void 0===e?void 0:e.findIndex(e=>e.defaultSelected))&&void 0!==t?t:-1}setSelectedOptions(){var e,t,r;(null===(e=this.options)||void 0===e?void 0:e.length)&&(this.selectedOptions=[this.options[this.selectedIndex]],this.ariaActiveDescendant=null!==(r=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.id)&&void 0!==r?r:"",this.focusAndScrollOptionIntoView())}slottedOptionsChanged(e,t){this.options=t.reduce((e,t)=>(cf(t)&&e.push(t),e),[]);const r=`${this.options.length}`;this.options.forEach((e,t)=>{e.id||(e.id=xa("option-")),e.ariaPosInSet=`${t+1}`,e.ariaSetSize=r}),this.$fastController.isConnected&&(this.setSelectedOptions(),this.setDefaultSelectedOption())}typeaheadBufferChanged(e,t){if(this.$fastController.isConnected){const e=this.getTypeaheadMatches();if(e.length){const t=this.options.indexOf(e[0]);t>-1&&(this.selectedIndex=t)}this.typeaheadExpired=!1}}}hf.slottedOptionFilter=e=>cf(e)&&!e.hidden,hf.TYPE_AHEAD_TIMEOUT_MS=1e3,nn([Qr({mode:"boolean"})],hf.prototype,"disabled",void 0),nn([Nr],hf.prototype,"selectedIndex",void 0),nn([Nr],hf.prototype,"selectedOptions",void 0),nn([Nr],hf.prototype,"slottedOptions",void 0),nn([Nr],hf.prototype,"typeaheadBuffer",void 0);class pf{}nn([Nr],pf.prototype,"ariaActiveDescendant",void 0),nn([Nr],pf.prototype,"ariaDisabled",void 0),nn([Nr],pf.prototype,"ariaExpanded",void 0),nn([Nr],pf.prototype,"ariaMultiSelectable",void 0),oc(pf,_u),oc(hf,pf);class gf extends hf{constructor(){super(...arguments),this.activeIndex=-1,this.rangeStartIndex=-1}get activeOption(){return this.options[this.activeIndex]}get checkedOptions(){var e;return null===(e=this.options)||void 0===e?void 0:e.filter(e=>e.checked)}get firstSelectedOptionIndex(){return this.options.indexOf(this.firstSelectedOption)}activeIndexChanged(e,t){var r,n;this.ariaActiveDescendant=null!==(n=null===(r=this.options[t])||void 0===r?void 0:r.id)&&void 0!==n?n:"",this.focusAndScrollOptionIntoView()}checkActiveIndex(){if(!this.multiple)return;const e=this.activeOption;e&&(e.checked=!0)}checkFirstOption(e=!1){e?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex+1),this.options.forEach((e,t)=>{e.checked=wi(t,this.rangeStartIndex)})):this.uncheckAllOptions(),this.activeIndex=0,this.checkActiveIndex()}checkLastOption(e=!1){e?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex),this.options.forEach((e,t)=>{e.checked=wi(t,this.rangeStartIndex,this.options.length)})):this.uncheckAllOptions(),this.activeIndex=this.options.length-1,this.checkActiveIndex()}connectedCallback(){super.connectedCallback(),this.addEventListener("focusout",this.focusoutHandler)}disconnectedCallback(){this.removeEventListener("focusout",this.focusoutHandler),super.disconnectedCallback()}checkNextOption(e=!1){e?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex),this.options.forEach((e,t)=>{e.checked=wi(t,this.rangeStartIndex,this.activeIndex+1)})):this.uncheckAllOptions(),this.activeIndex+=this.activeIndex<this.options.length-1?1:0,this.checkActiveIndex()}checkPreviousOption(e=!1){e?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex),1===this.checkedOptions.length&&(this.rangeStartIndex+=1),this.options.forEach((e,t)=>{e.checked=wi(t,this.activeIndex,this.rangeStartIndex)})):this.uncheckAllOptions(),this.activeIndex-=this.activeIndex>0?1:0,this.checkActiveIndex()}clickHandler(e){var t;if(!this.multiple)return super.clickHandler(e);const r=null===(t=e.target)||void 0===t?void 0:t.closest("[role=option]");return r&&!r.disabled?(this.uncheckAllOptions(),this.activeIndex=this.options.indexOf(r),this.checkActiveIndex(),this.toggleSelectedForAllCheckedOptions(),!0):void 0}focusAndScrollOptionIntoView(){super.focusAndScrollOptionIntoView(this.activeOption)}
2038focusinHandler(e){if(!this.multiple)return super.focusinHandler(e);this.shouldSkipFocus||e.target!==e.currentTarget||(this.uncheckAllOptions(),-1===this.activeIndex&&(this.activeIndex=-1!==this.firstSelectedOptionIndex?this.firstSelectedOptionIndex:0),this.checkActiveIndex(),this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}focusoutHandler(e){this.multiple&&this.uncheckAllOptions()}keydownHandler(e){if(!this.multiple)return super.keydownHandler(e);if(this.disabled)return!0;const{key:t,shiftKey:r}=e;switch(this.shouldSkipFocus=!1,t){case"Home":return void this.checkFirstOption(r);case mi:return void this.checkNextOption(r);case yi:return void this.checkPreviousOption(r);case"End":return void this.checkLastOption(r);case"Tab":return this.focusAndScrollOptionIntoView(),!0;case"Escape":return this.uncheckAllOptions(),this.checkActiveIndex(),!0;case" ":if(e.preventDefault(),this.typeAheadExpired)return void this.toggleSelectedForAllCheckedOptions();default:return 1===t.length&&this.handleTypeAhead(`${t}`),!0}}mousedownHandler(e){if(e.offsetX>=0&&e.offsetX<=this.scrollWidth)return super.mousedownHandler(e)}multipleChanged(e,t){var r;this.ariaMultiSelectable=t?"true":null,null===(r=this.options)||void 0===r||r.forEach(e=>{e.checked=!t&&void 0}),this.setSelectedOptions()}setSelectedOptions(){this.multiple?this.$fastController.isConnected&&this.options&&(this.selectedOptions=this.options.filter(e=>e.selected),this.focusAndScrollOptionIntoView()):super.setSelectedOptions()}sizeChanged(e,t){var r;const n=Math.max(0,parseInt(null!==(r=null==t?void 0:t.toFixed())&&void 0!==r?r:"",10));n!==t&&Tr.queueUpdate(()=>{this.size=n})}toggleSelectedForAllCheckedOptions(){const e=this.checkedOptions.filter(e=>!e.disabled),t=!e.every(e=>e.selected);e.forEach(e=>e.selected=t),this.selectedIndex=this.options.indexOf(e[e.length-1]),this.setSelectedOptions()}typeaheadBufferChanged(e,t){if(this.multiple){if(this.$fastController.isConnected){const e=this.getTypeaheadMatches(),t=this.options.indexOf(e[0]);t>-1&&(this.activeIndex=t,this.uncheckAllOptions(),this.checkActiveIndex()),this.typeAheadExpired=!1}}else super.typeaheadBufferChanged(e,t)}uncheckAllOptions(e=!1){this.options.forEach(e=>e.checked=!this.multiple&&void 0),e||(this.rangeStartIndex=-1)}}nn([Nr],gf.prototype,"activeIndex",void 0),nn([Qr({mode:"boolean"})],gf.prototype,"multiple",void 0),nn([Qr({converter:Yr})],gf.prototype,"size",void 0);const ff=(e,t)=>{const r=((e,t={})=>new KeyboardEvent(e.type,{key:e.key,code:e.code,location:e.location,repeat:e.repeat,isComposing:e.isComposing,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,...t}))(e,{bubbles:!1});t.dispatchEvent(new KeyboardEvent(e.type,r))};class mf extends(s(Jn)){constructor(){super(...arguments),this.label="",this.uniqueId=xa("interactive-sub-item-"),this.handleKeyDown=e=>{const{key:t}=e,r=this.firstElementChild;r&&r instanceof HTMLElement&&("Enter"===t||" "===t)&&r.click()}}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown),this.$emit("interactive-item-added")}disconnectedCallback(){this.removeEventListener("keydown",this.handleKeyDown)}}h([Qr],mf.prototype,"label",void 0),h([Qr],mf.prototype,"uniqueId",void 0);class vf extends(a(df,"listbox-item")){constructor(){super(...arguments),this.selectionHighlightDisabled=!1,this.interactiveItems=[],this.handleKeyDown=e=>{const{key:t}=e,r=this.interactiveItems.findIndex(e=>e?.getAttribute("aria-current")),n=this.interactiveItems[r];if(n||"Enter"!==t&&" "!==t||this.click(),this.interactiveItems.length>0){if("ArrowRight"===t)if(e.preventDefault(),this.classList.remove("selected"),n){const e=this.interactiveItems[r+1];e?this.updateSelectedInteractiveItem(e,n):(this.removeSelectedInteractiveItem(n),this.classList.add("selected"))}else{const e=this.interactiveItems[0];this.updateSelectedInteractiveItem(e)}if("ArrowLeft"===t)if(e.preventDefault(),this.classList.remove("selected"),n){const e=this.interactiveItems[r-1];e?this.updateSelectedInteractiveItem(e,n):(this.removeSelectedInteractiveItem(n),this.classList.add("selected"))}else{const e=this.interactiveItems[this.interactiveItems.length-1];this.updateSelectedInteractiveItem(e)}!n||"ArrowUp"!==t&&"ArrowDown"!==t||this.removeSelectedInteractiveItem(n),!n||"Enter"!==t&&" "!==t||ff(e,n)}}}updateSelectedInteractiveItem(e,t){this.addSelectedInteractiveItem(e),t&&this.removeSelectedInteractiveItem(t)}addSelectedInteractiveItem(e){const t=u(bf,{optional:!0}),r=u(Ca),n=Gi(this,e=>e.tagName===t);
2038e.setAttribute("aria-current","true"),n?.setAttribute("aria-activedescendant",e.id),e.firstElementChild?.classList.add("selected-interactive-item");const o=e.shadowRoot?.querySelector(r);o?.setAttribute("delay","0"),o?.setAttribute("is-open","true")}removeSelectedInteractiveItem(e){const t=u(Ca),r=e.shadowRoot?.querySelector(t);r?.removeAttribute("is-open"),e.removeAttribute("aria-current"),r?.setAttribute("delay","400"),e.firstElementChild?.classList.remove("selected-interactive-item")}getAllInteractiveItems(){const e=new Set;let t=1;const r=t=>{for(const r of t)e.add(r)},n=e=>{const o=u(mf);if(r(Array.from(e.querySelectorAll(o))),e.shadowRoot){t++,r(Array.from(e.shadowRoot.querySelectorAll(o)));for(const r of[...e.shadowRoot.children])t<20&&n(r)}for(const r of[...e.children])t<20&&n(r)};return n(this),Array.from(e)}setInteractiveItems(){this.interactiveItems=this.getAllInteractiveItems()}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("interactive-item-added",this.setInteractiveItems)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("interactive-item-added",this.setInteractiveItems)}}h([Qr({attribute:"selection-highlight-disabled",mode:"boolean"})],vf.prototype,"selectionHighlightDisabled",void 0);class bf extends(a(gf,"listbox")){constructor(){super(...arguments),this.defaultBaseName="listbox",this.handleKeyDown=e=>{const t=this.querySelectorAll(u(vf)),r=Array.from(t)?.find(e=>"true"===e.getAttribute("aria-selected")),{key:n}=e;!r||"ArrowUp"!==n&&"ArrowDown"!==n&&"ArrowRight"!==n&&"ArrowLeft"!==n&&"Enter"!==n&&" "!==n||ff(e,r)}}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){this.removeEventListener("keydown",this.handleKeyDown)}}const yf={baseName:"listbox",template:(e,t)=>
2038ri`
2039    <template
2040        aria-activedescendant="${e=>e.ariaActiveDescendant}"
2041        aria-multiselectable="${e=>e.ariaMultiSelectable}"
2042        class="listbox"
2043        role="listbox"
2044        tabindex="${e=>e.disabled?null:"0"}"
2045        @click="${(e,t)=>e.clickHandler(t.event)}"
2046        @focusin="${(e,t)=>e.focusinHandler(t.event)}"
2047        @keydown="${(e,t)=>e.keydownHandler(t.event)}"
2048        @mousedown="${(e,t)=>e.mousedownHandler(t.event)}"
2049    >
2050        <slot
2051            ${si({filter:gf.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}
2052        ></slot>
2053    </template>
2054`,styles:Ci(":host{box-sizing:border-box;flex-direction:column;width:100%;display:flex}")},wf=bf.compose(yf),xf=(e,t)=>ri`
2055    <template
2056        aria-checked="${e=>e.ariaChecked}"
2057        aria-disabled="${e=>e.ariaDisabled}"
2058        aria-posinset="${e=>e.ariaPosInSet}"
2059        aria-selected="${e=>e.ariaSelected}"
2060        aria-setsize="${e=>e.ariaSetSize}"
2061        class="${e=>[e.checked&&"checked",e.selected&&"selected",e.disabled&&"disabled"].filter(Boolean).join(" ")}"
2062        role="option"
2063    >
2064        ${nc(0,t)}
2065        <span class="content" part="content">
2066            <slot ${si("content")}></slot>
2067        </span>
2068        ${rc(0,t)}
2069    </template>
2070`,_f={baseName:"listbox-item",template:xf,styles:Ci(":host{box-sizing:border-box;width:100%}:host(:hover){background-color:var(--goto-interactive-color-secondary-hover)}:host(:active){background-color:var(--goto-interactive-color-secondary-pressed)}:host([aria-selected=true]:not([selection-highlight-disabled])){background:var(--goto-surface-color-secondary);border:none}:host:focus-visible{outline:var(--goto-focus-color-highlight-persistent)solid 1px;outline-offset:2px}")},kf=vf.compose(_f),Cf={baseName:"interactive-sub-item",template:(e,t)=>
2070{const r=u(Ca);return ri`<template tabindex="-1" aria-label=${e=>e.label}>
2071    <div id="trigger">
2072      <slot tabindex="-1"></slot>
2073    </div>
2074    <${r} trigger-id="trigger">
2075      <span>${e=>e.label}</span>
2076    </${r}>
2077  </template>`},styles:Ci(":host{justify-content:center;align-items:center;display:flex}")},Sf=mf.compose(Cf);To({prefix:void 0,node:void 0},kf,bl,Sf,wf),Ah();class Ef extends(s(ic)){constructor(){super(...arguments),this.selected=!1}selectedChanged(e,t){t?this.setAttribute("aria-current","page"):this.removeAttribute("aria-current")}connectedCallback(){super.connectedCallback(),this.setAccessibleLabel(),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("click",this.handleClick)}labelChanged(){this.setAccessibleLabel()}handleKeyDown(e){const{key:t}=e;" "!==t&&"Enter"!==t||(this.action(e),e.preventDefault())}handleClick(e){this.action(e),e.preventDefault()}action(e){this.disabled?e.stopImmediatePropagation():this.$emit("nav-drawer-action",null,{bubbles:!0})}setAccessibleLabel(){this.textContent||this.label&&this.setAttribute("aria-label",this.label)}validateAccessibleLabel(){this.getAttribute("aria-label")?.length||console.error("CHAMELEON-A11Y: Navigation Drawer Item component must have an accessible label provided by either \n  1) text content \n  2) a non-empty label attribute to be used as aria-label.\n")}}h([Qr({mode:"boolean"})],Ef.prototype,"selected",void 0),h([Qr],Ef.prototype,"label",void 0);class If extends Jn{constructor(){super(...arguments),this.handleUnsupportedDelegatesFocus=()=>{var e;window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&(null===(e=this.$fastController.definition.shadowOptions)||void 0===e?void 0:e.delegatesFocus)&&(this.focus=()=>{var e;null===(e=this.control)||void 0===e||e.focus()})}}connectedCallback(){super.connectedCallback(),this.handleUnsupportedDelegatesFocus()}}nn([Qr],If.prototype,"download",void 0),nn([Qr],If.prototype,"href",void 0),nn([Qr],If.prototype,"hreflang",void 0),nn([Qr],If.prototype,"ping",void 0),nn([Qr],If.prototype,"referrerpolicy",void 0),nn([Qr],If.prototype,"rel",void 0),nn([Qr],If.prototype,"target",void 0),nn([Qr],If.prototype,"type",void 0),nn([Nr],If.prototype,"defaultSlottedContent",void 0);class Af{}nn([Qr({attribute:"aria-expanded"})],Af.prototype,"ariaExpanded",void 0),oc(Af,_u),oc(If,tc,Af);class Tf extends(s(If)){selectedChanged(e,t){t?this.setAttribute("aria-current","page"):this.removeAttribute("aria-current")}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menuitem"),this.setAccessibleLabel()}labelChanged(){this.setAccessibleLabel()}setAccessibleLabel(){this.textContent||this.label&&this.setAttribute("aria-label",this.label)}validateAccessibleLabel(){this.getAttribute("aria-label")?.length||console.error("CHAMELEON-A11Y: Navigation Drawer Link component must have an accessible label provided by either \n  1) text content \n  2) a non-empty label attribute to be used as aria-label.\n")}}h([Qr({mode:"boolean"})],Tf.prototype,"selected",void 0),h([Qr],Tf.prototype,"label",void 0);class Of extends(s(Jn)){}class Lf extends(a(sc,"navigation-drawer")){connectedCallback(){super.connectedCallback(),this.propagateSizeAttribute(this.getAttribute("size")),this.setAccessibleLabel()}sizeChanged(e,t){this.propagateSizeAttribute(t)}propagateSizeAttribute(e){const t=this.querySelectorAll(`${u(Ef)}, ${u(Tf)}`);t?.forEach(t=>{e?t.setAttribute("size",e):t.removeAttribute("size")})}getNavDrawerHeaderTextContent(){const e=this.querySelector(u(Of));return e?.textContent}setAccessibleLabel(){this.labelId?this.setAttribute("aria-labelledby",this.labelId):this.getNavDrawerHeaderTextContent()?.length&&this.setAttribute("aria-label",this.getNavDrawerHeaderTextContent()??"")}validateAccessibleLabel(){this.getAttribute("aria-label")?.length||this.getAttribute("aria-labelledby")?.length||console.error("CHAMELEON-A11Y: Navigation Drawer component must have an accessible label provided by either \n  1) text content in a Navigation Header component \
2077n  2) a visible label whose id is given as the attribute labelId\n")}}h([Qr],Lf.prototype,"size",void 0),h([Qr({attribute:"label-id"})],Lf.prototype,"labelId",void 0);const $f={baseName:"navigation-drawer",template:fc,styles:Ci(":host{width:var(--goto-navigation-drawer-width,16rem);background-color:var(--goto-background-color-secondary);padding-top:var(--goto-spacing-06);flex-direction:column;display:inline-flex;box-sizing:border-box!important}:host slot{flex-direction:column;display:inline-flex}::slotted(chameleon-accordion){outline:0}::slotted(chameleon-accordion-item){margin-left:var(--goto-spacing-05)}")},Nf=Lf.compose($f),Rf={baseName:"navigation-drawer-header",template:(e,t)=>{const r=u(Hl);return ri`<template tabindex="-1">
2078    <${r} tag="h1" variant="heading-small"><slot></slot></${r}>
2079  </template>`},styles:Ci(":host{padding:var(--goto-spacing-00)var(--goto-spacing-04);margin-bottom:var(--goto-spacing-04)}")},Pf=Of.compose(Rf),Df={baseName:"navigation-drawer-item",template:bc,styles:Ci(":host{--goto-icon-color:var(--goto-icon-color-secondary);--goto-icon-size:var(--goto-spacing-04);cursor:pointer;height:2.25rem;padding:var(--goto-spacing-00)var(--goto-spacing-05);box-sizing:border-box;border:1px solid #0000;outline:0;align-items:center;display:inline-flex}:host .content{font:var(--goto-body-small);color:var(--goto-type-color-default);white-space:nowrap;text-overflow:ellipsis;flex:1;display:block;overflow:hidden}:host [name=start]::slotted(*){margin-right:var(--goto-spacing-02)}:host [name=end]::slotted(*){margin-left:var(--goto-spacing-04)}:host .start,:host .end{align-items:center;display:flex}:host ::slotted(chameleon-svg){--goto-icon-color:var(--goto-icon-color-default)}:host(:focus-visible){border-color:var(--goto-border-color-default);box-shadow:0 0 0 .3125rem #4090ff3d}:host(:hover){background-color:var(--goto-interactive-color-secondary-hover)}:host(:active){background-color:var(--goto-interactive-color-secondary-pressed)}:host([selected]){--goto-icon-color:var(--goto-icon-color-inverted);background-color:var(--goto-surface-color-brand-default)}:host([selected]) .content{color:var(--goto-type-color-inverted);--goto-icon-color:var(--goto-type-color-inverted)}:host([disabled]),:host([disabled]:hover){color:var(--goto-type-color-persistent-disabled);--goto-icon-color:var(--goto-icon-color-persistent-disabled);pointer-events:none;background-color:#0000}:host([disabled]) .content,:host([disabled]:hover) .content{color:var(--goto-type-color-disabled);--goto-icon-color:var(--goto-type-color-disabled)}:host([disabled]) ::slotted(svg),:host([disabled]:hover) ::slotted(svg){color:var(--goto-type-color-disabled)}:host([size=small]){height:var(--goto-spacing-06)}:host([size=small]) .content{font:var(--goto-caption-medium)}:host([size=large]){height:2.75rem;margin:var(--goto-spacing-01)var(--goto-spacing-02);border-radius:var(--goto-radius-small);padding:var(--goto-spacing-00)var(--goto-spacing-03)}:host([size=large]) .content{font:var(--goto-body-small);color:var(--goto-type-color-default);white-space:nowrap;text-overflow:ellipsis;flex:1;display:block;overflow:hidden}")},Mf=Ef.compose(Df),zf={baseName:"navigation-drawer-link",template:(e,t)=>
2079ri`
2080    <a
2081        class="control"
2082        part="control"
2083        download="${e=>e.download}"
2084        href="${e=>e.href}"
2085        hreflang="${e=>e.hreflang}"
2086        ping="${e=>e.ping}"
2087        referrerpolicy="${e=>e.referrerpolicy}"
2088        rel="${e=>e.rel}"
2089        target="${e=>e.target}"
2090        type="${e=>e.type}"
2091        aria-atomic="${e=>e.ariaAtomic}"
2092        aria-busy="${e=>e.ariaBusy}"
2093        aria-controls="${e=>e.ariaControls}"
2094        aria-current="${e=>e.ariaCurrent}"
2095        aria-describedby="${e=>e.ariaDescribedby}"
2096        aria-details="${e=>e.ariaDetails}"
2097        aria-disabled="${e=>e.ariaDisabled}"
2098        aria-errormessage="${e=>e.ariaErrormessage}"
2099        aria-expanded="${e=>e.ariaExpanded}"
2100        aria-flowto="${e=>e.ariaFlowto}"
2101        aria-haspopup="${e=>e.ariaHaspopup}"
2102        aria-hidden="${e=>e.ariaHidden}"
2103        aria-invalid="${e=>e.ariaInvalid}"
2104        aria-keyshortcuts="${e=>e.ariaKeyshortcuts}"
2105        aria-label="${e=>e.ariaLabel}"
2106        aria-labelledby="${e=>e.ariaLabelledby}"
2107        aria-live="${e=>e.ariaLive}"
2108        aria-owns="${e=>e.ariaOwns}"
2109        aria-relevant="${e=>e.ariaRelevant}"
2110        aria-roledescription="${e=>e.ariaRoledescription}"
2111        ${li("control")}
2112    >
2113        ${nc(0,t)}
2114        <span class="content" part="content">
2115            <slot ${si("defaultSlottedContent")}></slot>
2116        </span>
2117        ${rc(0,t)}
2118    </a>
2119`,styles:Ci(":host{cursor:pointer;height:2.25rem;padding:var(--goto-spacing-00)var(--goto-spacing-05);box-sizing:border-box;border:1px solid #0000;outline:none;align-items:center;display:inline-flex;box-sizing:border-box!important}:host .control{align-items:center;width:100%;text-decoration:none;display:inline-flex}:host .control .content{font:var(--goto-body-small);color:var(--goto-type-color-default);white-space:nowrap;text-overflow:ellipsis;flex:1;display:block;overflow:hidden}:host .control [name=start]::slotted(*){margin-right:var(--goto-spacing-04)}:host .control [name=end]::slotted(*){margin-left:var(--goto-spacing-04)}:host .control [name=start],:host .control [name=end]{--goto-icon-size:var(--goto-spacing-04);--goto-icon-color:var(--goto-type-color-secondary)}:host .control .start,:host .control .end{align-items:center;display:flex}:host .control ::slotted(svg){color:var(--goto-type-color-secondary);height:var(--goto-spacing-04);width:var(--goto-spacing-04)}:host .control:focus-visible{outline:none}:host(:not([disabled]):focus-within){border-color:var(--goto-border-color-default);box-shadow:0 0 0 .3125rem #4090ff3d}:host(:hover){background-color:var(--goto-interactive-color-secondary-hover)}:host(:active){background-color:var(--goto-interactive-color-secondary-pressed)}:host([selected]){background-color:var(--goto-surface-color-brand-default)}:host([selected]) .content{color:var(--goto-type-color-inverted);--goto-icon-color:var(--goto-type-color-inverted)}:host([selected]) [name=start],:host([selected]) [name=end]{--goto-icon-color:var(--goto-type-color-inverted)}:host([selected]) ::slotted(svg){color:var(--goto-type-color-inverted)}:host([size=small]){height:var(--goto-spacing-06)}:host([size=small]) .content{font:var(--goto-caption-medium)}:host([size=large]){height:2.75rem;margin:var(--goto-spacing-01)var(--goto-spacing-02);border-radius:var(--goto-radius-small);padding:var(--goto-spacing-00)var(--goto-spacing-03)}:host([size=large]) .content{font:var(--goto-body-small);color:var(--goto-type-color-default);white-space:nowrap;text-overflow:ellipsis;flex:1;display:block;overflow:hidden}"),shadowOptions:{delegatesFocus:!0}},Ff=Tf.compose(zf);class Uf extends(s(Jn)){}const Bf={baseName:"navigation-drawer-section",template:(e,t)=>
2119{const r=u(Hl);return ri`<template tabindex="-1">
2120    <${r} variant="caption-medium-strong" tag="h2"><slot></slot></${r}
2121    ><slot name="end"></slot>
2122  </template>`},styles:Ci(":host{outline:0;align-items:center;padding:1.25rem 1rem .5rem;display:inline-flex}:host chameleon-typography{flex:1}")},Hf=Uf.compose(Bf);!function(e){Gl({prefix:e}),To({prefix:e,node:void 0},Ff,Mf,Pf,Hf,Nf)}();class jf extends Zt{constructor(){super(...arguments),this.state="expanded",this.appearance="navrailitem",this.cachedLabel=""}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","menuitem"),this.cacheLabel(),this.hasAttribute("tabindex")||(this.tabIndex=-1)}updated(e){super.updated(e),e.has("selected")&&(this.selected?this.setAttribute("aria-current","page"):this.removeAttribute("aria-current")),e.has("disabled")&&(this.disabled?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")),e.has("state")&&this.cacheLabel(),this.syncCollapsedLabelAccessibility()}syncCollapsedLabelAccessibility(){const e="collapsed"===this.state&&this.cachedLabel?this.cachedLabel:null;e?this.setAttribute("aria-label",e):this.removeAttribute("aria-label")}render(){const e=Oi(u(Ca));return Ni`
2123      ${Zu("collapsed"===this.state&&!this.disabled,()=>Ni`
2124          <${e}
2125            trigger-id="tooltip-trigger"
2126            position="right-center"
2127            z-index="100"
2128            delay="0"
2129            inverted
2130            min-width="30"
2131            max-width="224"
2132            trigger-on="mouseover"
2133            style="--additional-offset-x: 8px"
2134          >${this.cachedLabel}</${e}>
2135        `)}
2136      ${this.renderContent()}
2137    `}activate(){this.click()}cacheLabel(){const e=this.renderRoot?.querySelector("slot:not([name])");if(!e)return void(this.cachedLabel="");const t=e.assignedNodes();let r="";for(const e of t)if(e.nodeType===Node.TEXT_NODE)r+=e.textContent?.trim()||"";else if(e.nodeType===Node.ELEMENT_NODE){const t=e;t.getAttribute("slot")||(r+=t.textContent?.trim()||"")}this.cachedLabel=r.trim()}}h([Te({reflect:!0})],jf.prototype,"state",void 0),h([Te({type:Boolean,reflect:!0})],jf.prototype,"selected",void 0),h([Te({type:Boolean,reflect:!0})],jf.prototype,"disabled",void 0),h([Te({reflect:!0})],jf.prototype,"appearance",void 0),h([Oe()],jf.prototype,"cachedLabel",void 0);class Vf extends jf{constructor(){super(...arguments),this.handleHostClick=e=>{if(this.disabled)return e.preventDefault(),void e.stopPropagation();this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleHostClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick)}renderContent(){return oe`
2138      <div class="item-container" id="tooltip-trigger">
2139        <div class="item-content">
2140          <slot name="start"></slot>
2141          <span class="label">
2142            <slot @slotchange="${()=>this.cacheLabel()}"></slot>
2143          </span>
2144          <slot name="end"></slot>
2145        </div>
2146      </div>
2147    `}activate(){this.disabled||this.click()}}Vf.baseName="navigation-rail-item",Vf.styles=b(":host{color:var(--goto-type-color-persistent);--goto-icon-color:var(--goto-icon-color-persistent);border-radius:var(--goto-radius-medium);margin-inline-start:var(--goto-spacing-02);margin-inline-end:7px;display:block;position:relative}:host([appearance=menuitem]){cursor:pointer;font:var(--goto-body-small);height:var(--goto-spacing-07);border-radius:var(--goto-radius-none);width:100%;padding:var(--goto-spacing-00);color:var(--goto-type-color-default);--goto-icon-color:var(--goto-icon-color-secondary);margin:0}:host([appearance=menuitem]:hover:not([disabled])){background-color:var(--goto-interactive-color-secondary-hover)}:host([appearance=menuitem]:active:not([disabled])){background-color:var(--goto-interactive-color-secondary-pressed)}:host([appearance=menuitem][selected]){background-color:var(--goto-surface-color-secondary)}:host([selected]){background-color:var(--goto-interactive-color-persistent-active);--goto-icon-color:var(--goto-icon-color-brand-persistent);color:var(--goto-type-color-brand-persistent)}.item-container{align-items:center;gap:var(--goto-spacing-03);cursor:pointer;min-height:var(--goto-spacing-09);border-radius:var(--goto-radius-small);font:var(--goto-caption-small-strong);--goto-icon-size:var(--goto-spacing-06);background-color:#0000;grid-template-columns:max-content auto min-content;padding-inline-start:var(--goto-spacing-03);padding-inline-end:4px;transition:background-color .2s;
2147display:grid;position:relative}:host([appearance=menuitem]) .item-container{padding:var(--goto-spacing-00)var(--goto-spacing-01);min-height:var(--goto-spacing-07);border-radius:var(--goto-radius-none);--goto-icon-size:var(--goto-spacing-05)}:host(:hover:not([disabled]):not([selected]):not([appearance=menuitem])){background-color:var(--goto-interactive-color-persistent-hover)}:host(:active:not([disabled]):not([selected]):not([appearance=menuitem])){background-color:var(--goto-interactive-color-persistent-pressed)}:host(:focus-visible:not([disabled]):not([appearance=menuitem])){outline:1px solid var(--goto-focus-color-highlight-persistent);outline-offset:2px}:host(:hover:not([disabled])) ::slotted([slot=end]){border-color:var(--goto-interactive-color-persistent-hover)}:host(:active:not([disabled])) ::slotted([slot=end]){border-color:var(--goto-interactive-color-persistent-pressed)}:host([selected]) .item-container{color:inherit}.item-content{display:contents}:host([state=collapsed]) .item-content{justify-content:center;gap:0}.label{overflow-wrap:break-word;word-break:break-word;display:block}:host([state=collapsed][appearance=navrailitem]) .label{display:none}:host([selected]) .label{font-weight:600}:host([disabled]){--goto-icon-color:var(--goto-icon-color-persistent-disabled);color:var(--goto-type-color-persistent-disabled);cursor:not-allowed}:host([disabled]) .item-container{cursor:not-allowed}:host([appearance=menuitem][disabled]){--goto-icon-color:var(--goto-icon-color-disabled);color:var(--goto-type-color-disabled)}::slotted([slot=start]),::slotted([slot=end]){flex-shrink:0}:host([selected]) ::slotted([slot=end]){border-color:var(--goto-interactive-color-persistent-active)}:host([state=collapsed][appearance=navrailitem]) ::slotted([slot=end]){top:var(--badge-counter-element-top);position:absolute;inset-inline-end:calc(100% - var(--badge-counter-element-right) - var(--badge-counter-element-left-offset,0px))}:host([state=collapsed][appearance=navrailitem]) ::slotted(.dot[slot=end]){--badge-counter-element-top:6px;--badge-counter-element-right:6px;--badge-counter-element-left-offset:12px;inset-inline-end:var(--badge-counter-element-right)}:host([state=collapsed][appearance=navrailitem]) ::slotted(:not(.dot)[slot=end]){--badge-counter-element-top:-2px;--badge-counter-element-right:-2px;inset-inline-end:var(--badge-counter-element-right)}");class Wf extends jf{constructor(){super(...arguments),this.target="_blank",this.rovingTabIndex=-1,this.handleHostClick=e=>{if(this.disabled)return e.preventDefault(),void e.stopPropagation();const t=e.composedPath();this.linkElement&&t.includes(this.linkElement)||this.linkElement?.click()}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menuitem"),this.tabIndex=-1,this.addEventListener("click",this.handleHostClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick)}updated(e){super.updated(e),(e.has("selected")||e.has("href")||e.has("target"))&&this.syncAriaCurrent(),e.has("disabled")&&this.linkElement&&(this.disabled?this.linkElement.setAttribute("aria-disabled","true"):this.linkElement.removeAttribute("aria-disabled"))}renderContent(){const e=this.sanitizeHref(this.href)||"#",t=this.rel?"_blank"===this.target?this.mergeNoopener(this.rel):this.rel:"_blank"===this.target?"noopener noreferrer":void 0;return oe`
2148      <div class="link-container" id="tooltip-trigger">
2149        <a
2150          class="link-content"
2151          href="${e}"
2152          target="${Bl(this.target||void 0)}"
2153          rel="${Bl(t)}"
2154          tabindex="${this.disabled?-1:this.rovingTabIndex}"
2155          @click="${this.handleAnchorClick}"
2156        >
2157          <div class="item-content">
2158            <slot name="start"></slot>
2159            <span class="label">
2160              <slot @slotchange="${()=>this.cacheLabel()}"></slot>
2161            </span>
2162            <slot name="end"></slot>
2163          </div>
2164        </a>
2165      </div>
2166    `}sanitizeHref(e){if(!e)return e;const t=e.trim();let r="";for(let e=0;e<t.length;e++){const n=t.charCodeAt(e);n>32&&127!==n&&(r+=t[e])}if(!/^(javascript|data|vbscript):/i.test(r))return t;console.warn(`[NavigationRailLink] Refused unsafe href scheme: ${t.slice(0,32)}…`)}
2166mergeNoopener(e){const t=new Set(e.split(/\s+/).filter(Boolean));return t.add("noopener"),t.add("noreferrer"),Array.from(t).join(" ")}activate(){this.disabled||this.linkElement?.click()}focus(e){!this.linkElement||this.disabled?super.focus(e):this.linkElement.focus(e)}setRovingTabIndex(e){this.rovingTabIndex=e,this.tabIndex=-1}syncCollapsedLabelAccessibility(){if(super.syncCollapsedLabelAccessibility(),!this.linkElement)return;const e="collapsed"===this.state&&this.cachedLabel?this.cachedLabel:null;e?this.linkElement.setAttribute("aria-label",e):this.linkElement.removeAttribute("aria-label")}syncAriaCurrent(){const e=this.shouldSetAriaCurrent()?"page":null;e?this.setAttribute("aria-current",e):this.removeAttribute("aria-current"),this.linkElement&&(e?this.linkElement.setAttribute("aria-current",e):this.linkElement.removeAttribute("aria-current"))}shouldSetAriaCurrent(){if(!this.selected||!this.href)return!1;if(this.target&&"_self"!==this.target.toLowerCase())return!1;try{const e=new URL(this.href,window.location.href);return e.origin===window.location.origin&&e.pathname===window.location.pathname&&e.search===window.location.search}catch{return!1}}handleAnchorClick(e){if(this.disabled)return e.preventDefault(),void e.stopPropagation();this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}}Wf.baseName="navigation-rail-link",Wf.styles=b(":host{color:var(--goto-type-color-persistent);--goto-icon-color:var(--goto-icon-color-persistent);border-radius:var(--goto-radius-medium);margin-inline-start:var(--goto-spacing-02);margin-inline-end:7px;display:block;position:relative}:host([appearance=menuitem]){cursor:pointer;font:var(--goto-body-small);height:var(--goto-spacing-07);border-radius:var(--goto-radius-none);width:100%;padding:var(--goto-spacing-00);color:var(--goto-type-color-default);--goto-icon-color:var(--goto-icon-color-secondary);margin:0}:host([appearance=menuitem]:hover){background-color:var(--goto-interactive-color-secondary-hover)}:host([appearance=menuitem]:active){background-color:var(--goto-interactive-color-secondary-pressed)}:host([appearance=menuitem][selected]){background-color:var(--goto-surface-color-secondary)}.link-container{min-height:var(--goto-spacing-09);justify-content:flex-start;align-items:center;display:flex;position:relative}.link-content{width:100%;align-items:center;gap:var(--goto-spacing-03);color:inherit;cursor:pointer;border-radius:var(--goto-radius-small);font:var(--goto-caption-small-strong);--goto-icon-size:var(--goto-spacing-06);min-height:var(--goto-spacing-09);background-color:#0000;border:none;grid-template-columns:max-content auto min-content;padding-inline-start:var(--goto-spacing-03);padding-inline-end:4px;text-decoration:none;transition:background-color .2s;display:grid}:host([appearance=menuitem]) .link-container{min-height:var(--goto-spacing-07)}:host([appearance=menuitem]) .link-content{padding:var(--goto-spacing-00)var(--goto-spacing-01);min-height:var(--goto-spacing-07);border-radius:var(--goto-radius-none);--goto-icon-size:var(--goto-spacing-05)}:host(:hover:not([disabled]):not([selected]):not([appearance=menuitem])){background-color:var(--goto-interactive-color-persistent-hover)}:host(:active:not([disabled]):not([selected]):not([appearance=menuitem])){background-color:var(--goto-interactive-color-persistent-pressed)}:host(:focus-visible:not([disabled]):not([appearance=menuitem])),:host(:not([disabled]):not([appearance=menuitem])) .link-content:focus-visible{outline:1px solid var(--goto-focus-color-highlight-persistent);outline-offset:2px}:host(:hover) ::slotted([slot=end]){border-color:var(--goto-interactive-color-persistent-hover)}:host(:active) ::slotted([slot=end]){border-color:var(--goto-interactive-color-persistent-pressed)}:host([selected]) .link-content{background-color:var(--goto-interactive-color-default)}.item-content{display:contents}:host([state=collapsed]) .item-content{justify-content:center;gap:0}.label{overflow-wrap:break-word;word-break:break-word;display:block}:host([state=collapsed][appearance=navrailitem]) .label{display:none}:host([state=collapsed][appearance=navrailitem]) .link-content{gap:unset}:host([selected]) .label{font-weight:600}::slotted([slot=start]),::slotted([slot=end]){flex-shrink:0}:host([selected]) ::slotted([slot=end]){border-color:var(--goto-interactive-color-persistent-active)}:host([state=collapsed][appearance=navrailitem]) ::slotted([slot=end]){top:var(--badge-counter-element-top);position:absolute;inset-inline-end:calc(100% - var(--badge-counter-element-right) - var(--badge-counter-element-left-
2166offset,0px))}:host([state=collapsed][appearance=navrailitem]) ::slotted(.dot[slot=end]){--badge-counter-element-top:6px;--badge-counter-element-right:6px;--badge-counter-element-left-offset:12px;inset-inline-end:var(--badge-counter-element-right)}:host([state=collapsed][appearance=navrailitem]) ::slotted(:not(.dot)[slot=end]){--badge-counter-element-top:-2px;--badge-counter-element-right:-2px;inset-inline-end:var(--badge-counter-element-right)}"),h([Te()],Wf.prototype,"href",void 0),h([Te()],Wf.prototype,"target",void 0),h([Te()],Wf.prototype,"rel",void 0),h([Oe()],Wf.prototype,"rovingTabIndex",void 0),h([$e("a.link-content")],Wf.prototype,"linkElement",void 0);const Kf="chameleon-custom-navigation-rail-item";class qf extends Zt{constructor(){super(...arguments),this.state="expanded",this.moreLabel="More",this.collapseLabel="Collapse",this.expandLabel="Expand",this.focusedItemIndex=0,this.overflowItems=[],this.naturalHeights=new WeakMap,this.originalRoles=new WeakMap,this.isMoreOpen=!1,this.isReconcilingOverflow=!1,this.overflowFrame=null,this.mutationFrame=null,this.hasMeasuredOverflowOnce=!1,this.handleToggleClick=()=>{const e=this.state;this.state="expanded"===e?"collapsed":"expanded",this.syncItemStates(),null!==this.overflowFrame&&(cancelAnimationFrame(this.overflowFrame),this.overflowFrame=null),this.validateOverflow(),this.dispatchEvent(new Event("navrail-toggle",{bubbles:!1,composed:!1})),this.dispatchEvent(new CustomEvent("state-change",{detail:{state:this.state,previousState:e},bubbles:!0,composed:!0}))},this.handleClick=e=>{const t=this.getInteractiveTargetFromPath(e.composedPath());t&&!t.disabled&&t!==this.toggleButton&&"more-items"!==t.id&&this.selectItem(t)},this.handleKeyDown=e=>{const t=e.composedPath().some(e=>e instanceof HTMLElement&&"overflow"===e.getAttribute("slot"));if(t)return void this.handleOverflowKeyDown(e);const r=this.getEnabledItems();if(0===r.length)return;const n=r[this.focusedItemIndex];if("ArrowRight"===e.key&&"more-items"===n?.id&&!this.isMoreOpen){e.preventDefault();const t=this.shadowRoot?.querySelector(".more-items-popover");return void t?.open?.()}let o=!1;switch(e.key){case"ArrowDown":case"ArrowRight":this.focusedItemIndex=Math.min(this.focusedItemIndex+1,r.length-1),o=!0;break;case"ArrowUp":case"ArrowLeft":this.focusedItemIndex=Math.max(this.focusedItemIndex-1,0),o=!0;break;case"Home":this.focusedItemIndex=0,o=!0;break;case"End":this.focusedItemIndex=r.length-1,o=!0;break;case"Enter":case" ":r[this.focusedItemIndex]&&(this.activateItem(r[this.focusedItemIndex]),o=!0)}if(o){e.preventDefault(),this.setupRovingTabindex();const t=r[this.focusedItemIndex];"more-items"===t?.id&&this.isMoreOpen||t?.focus()}},this.handleMenuItemClick=e=>{const t=e.target;t&&this.selectItem(t),this.shadowRoot?.querySelector(".more-items-popover")?.close?.()},this.handlePopoverChange=e=>{const t=e.detail;this.isMoreOpen=!!(t?.isOpen??t?.open)},this.getOverflowInitialFocus=()=>{const e=this.querySelector('[slot="overflow"]:not([disabled])');if(!e)return;const t=e;return"function"==typeof t.setRovingTabIndex?t.setRovingTabIndex(0):e.tabIndex=0,e}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu"),this.label&&this.setAttribute("aria-label",this.label),this.resizeObserver=new ResizeObserver(()=>{this.invalidateOverflow()}),this.resizeObserver.observe(this),this.mutationObserver=new MutationObserver(e=>{e.some(e=>"childList"===e.type)&&(this.invalidateOverflow(),this.scheduleMutationFollowup())}),this.mutationObserver.observe(this,{childList:!0}),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("click",this.handleClick),this.resizeObserver?.disconnect(),this.mutationObserver?.disconnect(),null!==this.overflowFrame&&cancelAnimationFrame(this.overflowFrame),null!==this.mutationFrame&&cancelAnimationFrame(this.mutationFrame),this.overflowFrame=null,this.mutationFrame=null}updated(e){super.updated(e),e.has("state")&&this.syncItemStates(),e.has("state")&&this.updateComplete.then(()=>this.setupRovingTabindex()),e.has("label")&&(this.label?this.setAttribute("aria-label",this.label):this.removeAttribute("aria-label")),(e.has("overflowItems")||e.has("state"))&&this.reconcileOverflowSlots()}render(){const e="expanded"===this.state?this.collapseLabel:this.expandLabel,t=this.overflowItems.length>0,r=Oi(u(Vf)),n=Oi(u(mr)),o=Oi(u(ll)),i=Oi(u(ac));return Ni`
2167      <div class="items" ?data-measuring="${!this.hasMeasuredOverflowOnce}">
2168        <slot @slotchange="${this.handleSlotChange}"></slot>
2169        ${t?Ni`
2170              <${r}
2171                  id="more-items"
2172                  aria-haspopup="menu"
2173                  aria-expanded="${this.isMoreOpen?"true":"false"}"
2174                  .state="${this.state}"
2175                  @change="${e=>e.stopPropagation()}"
2176                >
2177                  <${n} slot="start" aria-hidden="true">
2178                    ${Mi(zi)}
2179                  </${n}>
2180                  ${this.moreLabel}
2181                </${r}>
2182
2183                <${o}
2184                  class="more-items-popover"
2185                  position="right-center"
2186                  arrow
2187                  menu
2188                  z-index="100"
2189                  trigger-id="more-items"
2190                  trigger-on="click"
2191                  .initialFocus="${this.getOverflowInitialFocus}"
2192                  @popoverchange="${this.handlePopoverChange}"
2193                >
2194                  <${i}
2195                    class="more-items-menu"
2196                    label="${this.moreLabel}"
2197                    role="menu"
2198                    aria-label="${this.moreLabel}"
2199                  >
2200                    <slot name="overflow"></slot>
2201                  </${i}>
2202                </${o}>
2203              `:""}
2204      </div>
2205
2206      <div class="secondary-items">
2207        <slot name="secondary-items"></slot>
2208      </div>
2209
2210      <${r}
2211        part="toggle-button"
2212        class="toggle-button"
2213        tabindex="-1"
2214        role="menuitem"
2215        aria-label="${e}"
2216        state="${this.state}"
2217        @click="${this.handleToggleClick}"
2218        @change="${e=>e.stopPropagation()}"
2219      >
2220        <${n} slot="start" aria-hidden="true" class="toggle-icon">
2221          ${Mi("expanded"===this.state?'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.58578 12L11.2929 6.29289L12.7071 7.70711L8.41421 12L12.7071 16.2929L11.2929 17.7071L5.58578 12Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M11.5858 12L17.2929 6.29289L18.7071 7.70711L14.4142 12L18.7071 16.2929L17.2929 17.7071L11.5858 12Z" fill="currentColor"></path></svg>':'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M18.4142 12L12.7071 17.7071L11.2929 16.2929L15.5858 12L11.2929 7.70712L12.7071 6.29291L18.4142 12Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M12.4142 12L6.70709 17.7071L5.29288 16.2929L9.58577 12L5.29288 7.70712L6.70709 6.29291L12.4142 12Z" fill="currentColor"></path></svg>')}
2222        </${n}>
2223        ${e}
2224      </${r}>
2225    `}handleOverflowKeyDown(e){const t=Array.from(this.querySelectorAll('[slot="overflow"]:not([disabled])'));if(0===t.length)return;const r=e.composedPath().find(e=>e instanceof HTMLElement&&"overflow"===e.getAttribute("slot")),n=r?t.indexOf(r):-1;let o=n;switch(e.key){case"ArrowDown":o=n<t.length-1?n+1:0;break;case"ArrowUp":o=n>0?n-1:t.length-1;break;case"Home":o=0;break;case"End":o=t.length-1;break;case"ArrowLeft":{e.preventDefault();const t=this.shadowRoot?.querySelector(".more-items-popover");return void t?.close?.()}case"Enter":case" ":if(e.preventDefault(),r){const e=r;"function"==typeof e.activate?e.activate():r.click()}return;default:return}if(o===n)return;e.preventDefault();const i=t[o],s=i;"function"==typeof s.setRovingTabIndex?s.setRovingTabIndex(0):i.tabIndex=0,i.focus()}getEnabledItems(){const e=`${u(Vf)}, ${u(Wf)}`,t=Array.from(this.querySelectorAll(e)).filter(e=>!e.disabled&&"overflow"!==e.getAttribute("slot")),r=this.shadowRoot?.getElementById("more-items");return r&&t.push(r),this.toggleButton&&t.push(this.toggleButton),t}getInteractiveTargetFromPath(e){const t=u(Vf),r=u(Wf);return e.find(e=>e instanceof HTMLElement&&(e.tagName===t||e.tagName===r))}activateItem(e){if(e===this.toggleButton)return void this.handleToggleClick();if("more-items"===e.id)return;const t=e;"function"==typeof t.activate?t.activate():e.click(),this.focusedItemIndex=this.getEnabledItems().indexOf(e)}selectItem(e){const t=this.getEnabledItems();this.focusedItemIndex=t.indexOf(e)}invalidateOverflow(){const e=()=>{this.overflowFrame=null,this.mutationObserver?.disconnect();try{this.validateOverflow(),this.hasMeasuredOverflowOnce=!0}finally{this.mutationObserver?.observe(this,{childList:!0})}};if(!this.hasMeasuredOverflowOnce)return null!==this.overflowFrame&&(cancelAnimationFrame(this.overflowFrame),this.overflowFrame=null),void queueMicrotask(e);null===this.overflowFrame&&(this.overflowFrame=requestAnimationFrame(e))}scheduleMutationFollowup(){null===this.mutationFrame&&(this.mutationFrame=requestAnimationFrame(()=>{this.mutationFrame=null,this.syncItemStates(),this.setupRovingTabindex()}))}validateOverflow(){const e=`${u(Vf)}, ${u(Wf)}, .${Kf}`,t=Array.from(this.querySelectorAll(e)),r=t.filter(e=>"secondary-items"!==e.getAttribute("slot")),n=t.filter(e=>"secondary-items"===e.getAttribute("slot")),o=this.toggleButton;if(!this.clientHeight||!o)return;for(const e of r)if("overflow"!==e.getAttribute("slot")){const t=e.offsetHeight;t>0&&this.naturalHeights.set(e,t)}const i=e=>this.naturalHeights.get(e)??e.offsetHeight,s=r.reduce((e,t)=>
2225e+i(t),0),a=n.reduce((e,t)=>e+i(t),0),l=o.offsetHeight,c=this.clientHeight-l-a-20-48-16;if(s<c)return void(this.overflowItems.length>0&&(this.overflowItems=[]));let d=0;const h=r.reduce((e,t)=>(d+=i(t),d>c-80&&e.push(t),e),[]);(function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0})(this.overflowItems,h)||(this.overflowItems=h)}reconcileOverflowSlots(){const e=new Set(this.overflowItems);let t=!1;const r=`${u(Vf)}[slot="overflow"], ${u(Wf)}[slot="overflow"], .${Kf}[slot="overflow"]`,n=this.querySelectorAll(r);for(const r of Array.from(n))if(!e.has(r)){if(r.removeAttribute("slot"),"navrailitem"!==r.getAttribute("appearance")&&r.setAttribute("appearance","navrailitem"),r.getAttribute("state")!==this.state&&r.setAttribute("state",this.state),this.originalRoles.has(r)){const e=this.originalRoles.get(r);null==e?r.removeAttribute("role"):r.setAttribute("role",e),this.originalRoles.delete(r)}r.removeEventListener("change",this.handleMenuItemClick),t=!0}for(const e of this.overflowItems)"overflow"!==e.getAttribute("slot")&&(e.setAttribute("slot","overflow"),"menuitem"!==e.getAttribute("appearance")&&e.setAttribute("appearance","menuitem"),this.originalRoles.has(e)||this.originalRoles.set(e,e.getAttribute("role")),e.setAttribute("role","menuitem"),e.addEventListener("change",this.handleMenuItemClick),t=!0);t&&(this.isReconcilingOverflow=!0,queueMicrotask(()=>{this.isReconcilingOverflow=!1}))}syncItemStates(){Array.from(this.querySelectorAll(`${u(Vf)}, ${u(Wf)}
2225`)).forEach(e=>{e.state!==this.state&&(e.state=this.state)})}setupRovingTabindex(){const e=this.getEnabledItems();0!==e.length?(this.focusedItemIndex>=e.length&&(this.focusedItemIndex=0),e.forEach((e,t)=>{const r=t===this.focusedItemIndex?0:-1,n=e;"function"==typeof n.setRovingTabIndex?n.setRovingTabIndex(r):e.tabIndex=r})):this.focusedItemIndex=0}handleSlotChange(e){const t=e.target.assignedElements(),r=u(Vf),n=u(Wf);for(const e of t){const t=e.nodeName;t===r||t===n||e.classList.contains("more-items-popover")||(e.classList.add(Kf),e.hasAttribute("role")||e.setAttribute("role","menuitem"))}this.syncItemStates(),this.setupRovingTabindex(),this.isReconcilingOverflow||this.invalidateOverflow()}}function Gf(e){return e.filter(e=>e.nodeType===Node.TEXT_NODE).map(e=>e.textContent?.trim()??"").join(" ")}qf.baseName="navigation-rail",qf.styles=[b(":host{border-inline-end-style:solid;border-inline-end-width:1px;border-inline-end-color:var(--goto-border-color-default);background-color:var(--goto-interactive-color-persistent-default);width:var(--goto-spacing-11);min-width:var(--goto-spacing-11);box-sizing:border-box;gap:var(--goto-spacing-02);flex-direction:column;min-height:100%;padding-block:8px;display:flex}:host([state=expanded]){width:10.25rem;min-width:10.25rem}.items{gap:var(--goto-spacing-02);flex-direction:column;flex:1;display:flex;overflow-y:auto}.items[data-measuring]{visibility:hidden}.secondary-items{gap:var(--goto-spacing-02);flex-direction:column;flex-shrink:0;display:flex}.toggle-button{flex-shrink:0;margin-top:auto}.more-items-menu{border-radius:var(--goto-radius-medium)}"),b(":host ::slotted(.chameleon-custom-navigation-rail-item){width:calc(100% - (var(--goto-spacing-02) + 7px));font:var(--goto-caption-small-strong);color:var(--goto-type-color-persistent);background-color:var(--goto-interactive-color-persistent-default);margin-inline:var(--goto-spacing-02)7px;padding-inline:var(--goto-spacing-03);height:var(--goto-layout-04);min-height:var(--goto-layout-04);border-radius:var(--goto-radius-medium);box-sizing:border-box;justify-content:flex-start;gap:var(--goto-spacing-03);cursor:pointer;--goto-icon-color:var(--goto-icon-color-persistent);--goto-icon-size:var(--goto-spacing-06);align-items:center;display:flex;overflow:hidden}:host ::slotted(.chameleon-custom-navigation-rail-item[appearance=menuitem]){color:var(--goto-type-color-default);width:100%;margin:var(--goto-spacing-00);border-radius:var(--goto-radius-none);--goto-icon-color:var(--goto-icon-color-secondary);background-color:#0000;height:32px;min-height:32px;padding-inline:12px}:host ::slotted(.chameleon-custom-navigation-rail-item[appearance=menuitem]:hover){background-color:var(--goto-interactive-color-secondary-hover)}:host ::slotted(.chameleon-custom-navigation-rail-item[aria-selected]){color:var(--goto-type-color-brand-persistent);background-color:var(--goto-interactive-color-persistent-active);--goto-icon-color:var(--goto-icon-color-brand-persistent)}:host ::slotted(.chameleon-custom-navigation-rail-item:hover){background-color:var(--goto-interactive-color-persistent-hover)}:host ::slotted(.chameleon-custom-navigation-rail-item:focus-visible){outline:1px solid var(--goto-focus-color-highlight-persistent)}:host ::slotted(.chameleon-custom-navigation-rail-item:active){background-color:var(--goto-interactive-color-persistent-pressed)}:host ::slotted(.chameleon-custom-navigation-rail-item[aria-disabled]){background-color:var(--goto-interactive-color-persistent-default);color:var(--goto-type-color-persistent-disabled);cursor:default;--goto-icon-color:var(--goto-icon-color-persistent-disabled)}:host(:hover),:host(:active){--badge-counter-beacon-animation-name:none}")],h([Te({reflect:!0})],qf.prototype,"state",void 0),h([Te()],qf.prototype,"label",void 0),h([Te({attribute:"more-label"})],qf.prototype,"moreLabel",void 0),h([Te({attribute:"collapse-label"})],qf.prototype,"collapseLabel",void 0),h([Te({attribute:"expand-label"})],qf.prototype,"expandLabel",void 0),h([$e('[part="toggle-button"]')],qf.prototype,"toggleButton",void 0),h([Oe()],qf.prototype,"focusedItemIndex",void 0),h([Oe
2225()],qf.prototype,"overflowItems",void 0),h([Oe()],qf.prototype,"isMoreOpen",void 0),h([Oe()],qf.prototype,"hasMeasuredOverflowOnce",void 0),function(e={}){const{prefix:t}=e;vr(e),yl(t),xl(t),Ah(e),d(Vf,e),d(Wf,e),d(qf,e)}();class Zf extends(s(Jn)){constructor(){super(...arguments),this.href="",this.target="",this.badgeLabel="",this.active=!1,this.external=!1,this.dataIsNarrow=!1,this.label="",this.defaultSlot=[]}selectedChanged(e,t){t?this.setAttribute("aria-current","page"):this.removeAttribute("aria-current")}defaultSlotChanged(){this.isConnected&&(this.label=this.badgeLabel?`${Gf(this.defaultSlot)}, ${this.badgeLabel}`:Gf(this.defaultSlot))}connectedCallback(){super.connectedCallback(),this.target||(this.target=this.external?"_blank":"_self")}}h([Qr],Zf.prototype,"href",void 0),h([Qr],Zf.prototype,"target",void 0),h([Qr],Zf.prototype,"badgeLabel",void 0),h([Qr({mode:"boolean"})],Zf.prototype,"active",void 0),h([Qr({mode:"boolean"})],Zf.prototype,"external",void 0),h([Qr({attribute:"data-is-narrow",mode:"boolean"})],Zf.prototype,"dataIsNarrow",void 0),h([Nr],Zf.prototype,"label",void 0),h([Nr],Zf.prototype,"anchor",void 0),h([Nr],Zf.prototype,"defaultSlot",void 0);class Yf extends(a(Jn,"nav-bar")){constructor(){super(...arguments),this.moreLabel="More",this.dataIsNarrow=!1,this.items=[],this.itemsInMoreSlot=new Set,this.itemsInTempMoreSlot=new Set,this.resizeObserver=new ResizeObserver(this.resizeObserverCallback.bind(this)),this.mutationObserver=new MutationObserver(this.mutationObserverCallback.bind(this)),this.itemClickHandler=e=>{"_self"===e.target.target&&e.preventDefault(),!0!==e.target.active&&this.$emit("ch-nav-bar-change",{target:e.target},{bubbles:!0})}}connectedCallback(){super.connectedCallback();const e=Array.from(this.querySelectorAll('[slot="more"]'));for(const t of e)this.itemsInMoreSlot.add(t);this.resizeObserver.observe(this),this.mutationObserver.observe(this,{childList:!0}),this.addListenerToItems()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect(),this.mutationObserver.disconnect(),this.removeListenerFromItems()}removeListenerFromItems(){const e=u(Zf),t=this.querySelectorAll(e);for(const e of Array.from(t))e.removeEventListener("click",this.itemClickHandler)}resizeObserverCallback(e){const{contentRect:t}=e[0];this.calculateItemPlacement(t),t.width<500?(this.setAttribute("data-is-narrow","true"),Array.from(this.children).forEach(e=>{e.setAttribute("data-is-narrow","true")})):(this.removeAttribute("data-is-narrow"),Array.from(this.children).forEach(e=>{e.removeAttribute("data-is-narrow")}))}mutationObserverCallback(e){const t=this.getBoundingClientRect();this.calculateItemPlacement(t),this.addListenerToItems();for(const t of e)for(const e of t.removedNodes)e instanceof Zf&&e.removeEventListener("click",this.itemClickHandler)}addListenerToItems(){const e=u(Zf),t=this.querySelectorAll(e);for(const e of Array.from(t))e.addEventListener("click",this.itemClickHandler)}calculateItemPlacement(e){const t=u(Zf),r=Array.from(this.querySelectorAll(`${t}:not([slot="more"])`));let n=0,o=r.length;for(let t=0;t<r.length;t++)if(n+=(r[t].hasAttribute("data-width")?Number(r[t].getAttribute("data-width")):r[t].getBoundingClientRect().width)+24,n>e.width-this.more.getBoundingClientRect().width){o=t;break}for(let e=0;e<r.length;e++){const t=r[e];e<o&&(t.removeAttribute("data-width"),t.removeAttribute("slot"),this.itemsInTempMoreSlot.delete(t)),e>=o&&(t.hasAttribute("data-width")||t.setAttribute("data-width",t.getBoundingClientRect().width.toString()),t.setAttribute("slot","temp-more"),this.itemsInTempMoreSlot.add(t)),this.itemsInTempMoreSlot.size>0?this.setAttribute("data-has-temp-more-items","true"):this.removeAttribute("data-has-temp-more-items"),0===this.itemsInMoreSlot.size&&0===this.itemsInTempMoreSlot.size?this.removeAttribute("data-has-more-items"):this.setAttribute("data-has-more-items","true")}}handleKeyDown(e){if("ArrowRight"===e.key){const e=document.activeElement;if(e===this)return void Array.from(this.items)[0].focus();const t=e.nextElementSibling;t&&!t.hasAttribute("slot")?t.focus():this.more.focus()}if("ArrowLeft"===e.key){if(this.shadowRoot?.activeElement===this.more){const e=Array.from(this.items).pop();return e&&e.focus(),!0}const e=document.activeElement;if(e===this)return this.more.focus(),!0;const t=e.previousElementSibling;t&&!t.hasAttribute("slot")?t.focus():this.more.focus()}return!0}handleDropdownKeyDown(e){const t=u(Zf);if("ArrowDown"===e.key){if(this.shadowRoot?.activeElement===this.popoverEl){const e=Array.from(this.querySelectorAll(`${t}[slot="more"],${t}[slot="temp-more"]`)).at(0);return e&&e.focus(),!0}const e=document.activeElement;if(!e.tagName.includes("NAV-BAR-ITEM")||!e.hasAttribute("slot"))return!0;const r=e.nextElementSibling;if(!r){const e=Array.from(this.querySelectorAll(`${t}[slot="more"],${t}[slot="temp-more"]`)).at(0);return e?.focus(),!0}r.focus()}if("ArrowUp"===e.key){const e=document.activeElement.previousElementSibling;if(e&&(!e.tagName.includes("NAV-BAR-ITEM")||!e.hasAttribute("slot"))){const e=Array.from(this.querySelectorAll(`${t}[slot="more"],${t}[slot="temp-more"]`)).at(-1);return e?.focus(),!0}e.focus()}return!0}}h([Qr({attribute:"more-label"})],Yf.prototype,"moreLabel",void 0),h([Qr],Yf.prototype,"label",void 0),h([Qr({attribute:"data-is-narrow",mode:"boolean"})],Yf.prototype,"dataIsNarrow",void 0),h([Nr],Yf.prototype,"items",void 0),h([Nr],Yf.prototype,"more",void 0),h([Nr],Yf.prototype,"popoverEl",void 0);const Jf={baseName:"nav-bar",template:(e,t)=>
2225{const r=u(mr),n=u(Ca),o=u(jl),i=u(ll);return ri`
2226    <template
2227      role="navigation"
2228      aria-label="${e=>e.label}"
2229      @keydown="${(e,t)=>e.handleKeyDown(t.event)}"
2230    >
2231      <ul>
2232        <slot ${si("items")}></slot>
2233        <${o} ${li("more")} label="${e=>e.moreLabel}" variant="${"tertiary"}" id="more">
2234          <${r} slot="leading-icon">${'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 12C7 13.105 6.105 14 5 14C3.895 14 3 13.105 3 12C3 10.895 3.895 10 5 10C6.105 10 7 10.895 7 12ZM14 12C14 13.105 13.105 14 12 14C10.895 14 10 13.105 10 12C10 10.895 10.895 10 12 10C13.105 10 14 10.895 14 12ZM21 12C21 13.105 20.105 14 19 14C17.895 14 17 13.105 17 12C17 10.895 17.895 10 19 10C20.105 10 21 10.895 21 12Z" fill="currentColor"></path></svg>'}</${r}>
2235          <span class="more-text">${e=>e.moreLabel}</span>
2236        </${o}>
2237        <${n} trigger-id="more" ?hidden="${e=>!e.dataIsNarrow}">
2238          ${e=>e.moreLabel}
2239        </${n}>
2240      </ul>
2241      <${i}
2242          ${li("popoverEl")}
2243          @keydown="${(e,t)=>e.handleDropdownKeyDown(t.event)}"
2244          position="bottom-start"
2245          trigger-id="more"
2246          menu
2247        >
2248          <ul class="more-list">
2249            <slot name="temp-more"></slot>
2250            <slot name="more"></slot>
2251          </ul>
2252        </${i}>
2253    </template>
2254  `},styles:Ci(":host{box-sizing:border-box;flex-grow:1;align-items:center;height:56px;display:flex;container-type:size}:host>ul{background-color:var(--goto-surface-color-default);height:100%;padding:var(--goto-spacing-02);box-sizing:border-box;margin:var(--goto-spacing-00);flex-grow:1;align-items:center;gap:16px;display:flex;overflow:hidden}:host .more-list{margin:var(--goto-spacing-00);padding:8px var(--goto-spacing-00)}:host chameleon-nav-bar-item:is([slot=temp-more],[slot=more]):first-of-type{background:red}:host(:focus-visible){outline:1px solid var(--goto-focus-color-highlight-default)}:host(:not([data-has-more-items])) #more{visibility:hidden}@container (width<=500px){:host #more::part(control){gap:var(--goto-spacing-00)}:host .more-text{display:none}}")},Qf=Yf.compose(Jf),Xf={baseName:"nav-bar-item",template:(e,t)=>
2254{const r=u(mr),n=u(Ca);return ri`
2255    <template role="listitem">
2256      <a
2257        id="anchor"
2258        part="anchor"
2259        ${li("anchor")}
2260        href="${e=>e.href}"
2261        target="${e=>e.target}"
2262        aria-label="${e=>e.label}"
2263        aria-current="${e=>e.active?"page":null}"
2264      >
2265        <span class="icon">
2266          <slot name="icon"></slot>
2267        </span>
2268        <span class="default">
2269          <slot ${si("defaultSlot")}></slot>
2270        </span>
2271        <slot name="badge"></slot>
2272        <${r} width="20" height="20" class="external">${xc}</${r}>
2273      </a>
2274      <${n} ?hidden="${e=>!e.dataIsNarrow}" trigger-id="anchor">
2275        ${e=>e.label}
2276      </${n}>
2277    </template>
2278  `},styles:Ci(":host a{box-sizing:border-box;border-radius:var(--goto-radius-small);height:32px;font:var(--goto-button-medium);color:var(--goto-type-color-default);white-space:nowrap;justify-content:space-between;align-items:center;padding:4px 12px;text-decoration:none;display:flex}:host a .default{display:block}:host a .icon{--goto-icon-size:24px;display:none}:host a .external{--goto-icon-size:20px;display:none}:host a ::slotted([slot=badge]){margin-left:12px}:host(:hover) a{background-color:var(--goto-interactive-color-secondary-hover)}:host(:active) a{background-color:var(--goto-interactive-color-secondary-pressed)}:host(:focus-visible) a{outline:1px solid var(--goto-focus-color-highlight-default)}:host([active]) a{background-color:var(--goto-surface-color-inverted);color:var(--goto-type-color-inverted)}:host([active]) a ::slotted([slot=icon]){--goto-icon-color:var(--goto-surface-color-default)}:host(:is([slot=more],[slot=temp-more])) a{font:var(--goto-body-small);border-radius:var(--goto-radius-none)}:host(:is([slot=more],[slot=temp-more])) ::slotted([slot=badge]){margin-left:var(--goto-spacing-00);margin-right:4px}:host([external]:is([slot=more],[slot=temp-more])) .external{display:block}:host(:hover),:host(:active){--badge-counter-beacon-animation-name:none}@container (width<=500px){:host(:not([slot=more],[slot=temp-more])){position:relative}:host(:not([slot=more],[slot=temp-more])) .default{display:none}:host(:not([slot=more],[slot=temp-more])) .icon{display:block}:host(:not([slot=more],[slot=temp-more])) ::slotted([slot=badge]){position:absolute;top:-4px;right:-4px}}"),shadowOptions:{delegatesFocus:!0}},em=Zf.compose(Xf);vr({prefix:"chameleon"}),ql({prefix:"chameleon"}),To({prefix:"chameleon"},em,bl,wl,Qf),To({prefix:void 0,node:void 0},Xg),xl();var tm,rm='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12ZM4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12Z" fill="currentColor"></path></svg>',nm='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.1412 12L16 9.14116L14.8588 8L12 10.8588L9.14116 8L8 9.14116L10.8588 12L8 14.8588L9.14116 16L12 13.1412L14.8588 16L16 14.8588L13.1412 12Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" fill="currentColor"></path></svg>';!function(e){e.AVAILABLE="available",e.AWAY="away",e.BUSY="busy",e.DO_NOT_DISTURB="do-not-disturb",e.OFFLINE="offline",e.DISCONNECTED="disconnected"}(tm||(tm={}));class om extends Zt{constructor(){super(...arguments),this.presence="offline",this.achromatic=!1}connectedCallback(){super.connectedCallback(),this.setAccessibleLabel()}updated(e){super.updated(e),e.has("label")&&this.setAccessibleLabel()}render(){const e=Oi(u(mr)),t=(()=>{switch(this.presence){case tm.AVAILABLE:return'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2Z" fill="currentColor"></path></svg>';case tm.BUSY:return'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM17 11H7V13H17V11Z" fill="currentColor"></path></svg>';case tm.AWAY:return'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM13 11.4412V5H11V12.5588L17.9759 16.8517L19.0241 15.1483L13 11.4412Z" fill="currentColor"></path></svg>';case"dnd":case tm.DO_NOT_DISTURB:return'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM8.70735 4.70686C5.93148 5.96206 4 8.75547 4 12C4 16.4183 7.58172 20 12 20C15.2445 20 18.0379 18.0686 19.2927 15.2931C18.2885 15.7472 17.1737 16 16 16C11.5817 16 8 12.4183 8 8C8 6.82622 8.25279 5.71149 8.70735 4.70686Z" fill="currentColor"></path></svg>';case tm.OFFLINE:return rm;case tm.DISCONNECTED:return nm;default:return rm}})();return Ni`<div
2279      class="goto-presence-indicator goto-presence-indicator--${this.presence} ${this.achromatic?"goto-presence-indicator--achromatic":""}"
2280    >
2281      <${e}>${t}</${e}>
2282    </div>`}setAccessibleLabel(){if(this.label)return this.setAttribute("aria-label",this.label),void this.setAttribute("role","status")}validateAccessibleLabel(){this.getAttribute("aria-label")?.length||console.error("CHAMELEON-A11Y: Presence Indicator component must have an accessible label provided by a non-empty label attribute to be used as aria-label.")}}om.baseName="presence-indicator",om.styles=b(":host{align-items:center;display:inline-flex}:host .goto-presence-indicator{box-sizing:border-box;--goto-icon-size:var(--goto-spacing-03);background-color:var(--goto-presence-indicator-avatar-color,transparent);border-radius:var(--goto-radius-circle);font-size:var(--goto-spacing-03);height:var(--goto-spacing-03);width:var(--goto-spacing-03)}:host .goto-presence-indicator--available{--goto-icon-color:var(--goto-icon-color-success)}:host .goto-presence-indicator--busy{--goto-icon-color:var(--goto-icon-color-danger)}:host .goto-presence-indicator--away{--goto-icon-color:var(--goto-icon-color-warning)}:host .goto-presence-indicator--dnd,:host .goto-presence-indicator--do-not-disturb,:host .goto-presence-indicator--offline,:host .goto-presence-indicator--disconnected{--goto-icon-color:var(--goto-icon-color-default)}:host .goto-presence-indicator--achromatic{--goto-icon-color:var(--goto-icon-color-inverted)}"),h([Te({reflect:!0})],om.prototype,"presence",void 0),h([Te({type:Boolean})],om.prototype,"achromatic",void 0),h([Te()],om.prototype,"label",void 0),function(e={}){vr(e),d(om,e)}();class im extends Zt{constructor(){super(...arguments),this.size="small",this.value=null}render(){const e=Oi(u(Hl)),t=Oi(u(sf));return Ni`
2283      <div class="container">
2284        <${e} class="title-wrapper" variant="${"small"===this.size?"body-small":"body-large"}">
2285          <div class="title">
2286            <slot name="title"></slot>
2287          </div>
2288          ${Zu(null!==this.value,()=>Ni`<div class="percentage">${this.value}%</div>`)}
2289        </${e}>
2290        <${t} size="${this.size}" value="${this.value}"></${t}>
2291      </div>
2292      <div class="actions">
2293        <slot name="action"></slot>
2294      </div>
2295    `}}im.baseName="progress-indicator",im.styles=b(":host{width:100%;display:flex}:host .container{flex-direction:column;flex-grow:1;display:flex}:host .actions{margin-left:var(--goto-spacing-04);align-self:flex-end}
2295:host .title-wrapper{margin:var(--goto-spacing-01)0;display:flex}:host .title-wrapper::part(text){color:var(--goto-progress-color);flex-grow:1;display:flex}:host .title{flex-grow:1}:host .percentage{padding-left:var(--goto-spacing-05);align-items:flex-end;display:flex}"),h([Te()],im.prototype,"size",void 0),h([Te({type:Number})],im.prototype,"value",void 0),function(e={}){Gl(e),af(e),d(im,e)}();class sm extends(s(Jn)){constructor(){super(...arguments),this.disabled=!1,this.badgeValue="",this.editable=!1,this.optional=!1,this.loading=!1,this.visited=!1,this.showTooltip=!0,this.titlePopoverContent="",this.descriptionPopoverContent="",this.selected=!1,this.defaultSlot=[],this.descriptionSlot=[]}selectedChanged(e,t){t?(this.setAttribute("aria-current","step"),this.$emit("change",null,{bubbles:!1})):this.removeAttribute("aria-current")}defaultSlotChanged(e,t){this.titlePopoverContent=t[0]?.textContent??""}descriptionSlotChanged(e,t){this.descriptionPopoverContent=t[0]?.textContent??""}shouldShowDangerState(){return"danger"===this.variant}shouldShowSuccessState(){return"success"===this.variant}shouldShowBadgeValue(){return!this.shouldShowSuccessState()&&!this.shouldShowDangerState()}onStepClick(){this.$emit("step-clicked",null,{bubbles:!1})}}h([Qr],sm.prototype,"variant",void 0),h([Qr({mode:"boolean"})],sm.prototype,"disabled",void 0),h([Qr({attribute:"badgevalue"})],sm.prototype,"badgeValue",void 0),h([Qr({mode:"boolean"})],sm.prototype,"editable",void 0),h([Qr({mode:"boolean"})],sm.prototype,"optional",void 0),h([Qr({mode:"boolean"})],sm.prototype,"loading",void 0),h([Qr({mode:"boolean"})],sm.prototype,"visited",void 0),h([Qr({mode:"boolean",attribute:"show-tooltip"})],sm.prototype,"showTooltip",void 0),h([Nr],sm.prototype,"titlePopoverContent",void 0),h([Nr],sm.prototype,"descriptionPopoverContent",void 0),h([Qr({mode:"boolean"})],sm.prototype,"selected",void 0),h([Nr],sm.prototype,"defaultSlot",void 0),h([Nr],sm.prototype,"descriptionSlot",void 0);const am={baseName:"progress-step",template:(e,t)=>
2295{const r=u(Hl),n=u(Ca),o=u(Nu),i=u(mr),s=u(Bu),a=`step-text-trigger-${crypto.randomUUID()}`;return ri`<template slot="step" role="listitem">
2296    ${Aa(e=>e.loading,ri`<div><${s} size="medium"></${s}</div>`,ri`<span class="badge">
2297        ${Aa(e=>e.shouldShowDangerState(),ri`<${i}>${Cl}</${i}>`)}
2298        ${Aa(e=>e.shouldShowSuccessState(),ri`<${i}>${Oh}</${i}>`)}
2299        ${Aa(e=>e.shouldShowBadgeValue(),ri`<span>${e=>e.badgeValue}</span>`)}
2300      </span>`)}
2301    <div class="step-text" id=${a}>
2302      <${r} class="step-title" part="title" nowrap color="inherit">
2303        ${Aa(e=>!e.editable,ri`<slot ${si("defaultSlot")}></slot>`)}
2304        ${Aa(e=>e.editable&&!e.disabled,ri`
2305            <${o} @click="${e=>e.onStepClick()}">
2306              <slot ${si("defaultSlot")}></slot>
2307            </${o}>
2308          `)}
2309      </${r}>
2310      <div class="step-description">
2311        <slot name="description" ${si("descriptionSlot")}></slot>
2312      </div>
2313    </div>
2314    <${n} trigger-id="${a}" position="bottom-center" hidden="${e=>!e.showTooltip}">
2315      <span>
2316        <${r} tag="b" nowrap color="inherit">${e=>e.titlePopoverContent}</${r}>
2317        ${e=>e.descriptionPopoverContent}
2318      </span>
2319    </${n}>
2320  </template>`},styles:Ci(":host{font:var(--goto-body-medium);border-color:var(--goto-surface-color-brand-secondary);color:var(--goto-type-color-default);border-width:4px;flex-grow:1;align-items:flex-start;display:flex;box-sizing:border-box!important}:host .badge{font:var(--goto-caption-medium);background-color:var(--goto-surface-color-brand-secondary);color:var(--goto-type-color-default);min-width:var(--goto-layout-02);min-height:var(--goto-layout-02);border-radius:50%;justify-content:center;align-items:center;line-height:14px;display:flex}:host .step-text{width:100%;overflow:hidden}:host .step-title{text-overflow:ellipsis;white-space:nowrap;width:100%;margin-top:2px;overflow:hidden}:host .step-description{font:var(--goto-caption-medium);word-wrap:break-word;text-overflow:ellipsis;color:var(--goto-type-color-secondary);line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:host([selected]),:host([variant=success]){--goto-icon-color:var(--goto-icon-color-inverted);border-color:var(--goto-surface-color-brand-default)}:host([selected]) .badge,:host([variant=success]) .badge{color:var(--goto-icon-color-inverted);background-color:var(--goto-surface-color-brand-default)}:host([variant=success]){--goto-icon-size:var(--goto-layout-02)}:host([variant=danger]){--goto-icon-color:var(--goto-icon-color-danger);--goto-icon-size:var(--goto-layout-02);--goto-link:var(--goto-type-color-danger);border-color:var(--goto-surface-color-danger-default);color:var(--goto-type-color-danger)}:host([variant=danger]) .badge{color:inherit;background:0 0}:host([disabled]){--goto-icon-color:var(--goto-type-color-disabled);color:var(--goto-type-color-disabled);border-color:var(--goto-surface-color-secondary)}:host([disabled]) .badge,:host([disabled]) .step-description{color:inherit}:host([disabled]) .badge{background-color:var(--goto-surface-color-secondary)}:host([disabled][variant=danger]) .badge{color:inherit;background:0 0}chameleon-tooltip{width:calc(100% - var(--goto-layout-02) - var(--goto-spacing-02))}chameleon-link{width:100%}chameleon-link::part(control){white-space:nowrap;text-overflow:ellipsis;width:100%;padding:var(--goto-spacing-00);margin:var(--goto-spacing-00);overflow:hidden}")},lm=sm.compose(am),cm=ri`<template slot="steppanel">
2321  <slot></slot>
2322</template>`;class dm extends(s(Jn)){}const um={baseName:"progress-steppanel",template:cm,styles:Ci(":host{font:var(--goto-body-medium);color:var(--goto-type-color-default);display:flex;box-sizing:border-box!important}:host([hidden]){display:none}")},hm=dm.compose(um),pm=ri`<template role="group">
2323  <div class="steps" role="list">
2324    <slot name="step" part="step" ${si("steps")}></slot>
2325  </div>
2326  <div class="steppanels" part="steppanels">
2327    <slot name="steppanel" part="panel" ${si("panels")}></slot>
2328  </div>
2329</template>`;class gm extends(s(Jn)){constructor(){super(...arguments),this.orientation="horizontal",this.type="non-editable",this.activeStep=0,this.onStepChange=()=>{this.$emit("step-change",null,{bubbles:!1})}
2329,this.handleStepChange=()=>{this.onStepChange(),Tr.nextUpdate().then(()=>this.updateSelectedPanel()),this.updateStepsBasedOnType()},this.handleStepClick=e=>{this.activeStep&&(this.steps[this.activeStep].selected=!1),this.activeStep=this.steps.findIndex(t=>t===e.target),this.steps[this.activeStep].selected=!0,this.updateSelectedStep(),this.updateSelectedPanel()}}activeStepChanged(e,t){t>=0&&t<this.steps?.length&&(this.steps?.length&&e>=0&&e<this.steps.length&&(this.steps[e].selected=!1),this.updateSelectedStep(),this.updateSelectedPanel())}stepsChanged(){this.removeListenerOnStepChange(),this.listenOnStepChange(),this.listenOnStepClick(),this.updateSelectedStep()}panelsChanged(){this.updateSelectedPanel()}connectedCallback(){super.connectedCallback(),this.setAccessibleLabel(),this.updateSelectedStep(),this.updateSelectedPanel()}disconnectedCallback(){super.disconnectedCallback(),this.removeListenerOnStepClick()}listenOnStepClick(){this.steps.forEach(e=>{e.addEventListener("step-clicked",this.handleStepClick)})}removeListenerOnStepClick(){this.steps.forEach(e=>{e.removeEventListener("step-clicked",this.handleStepClick)})}listenOnStepChange(){this.steps.forEach(e=>
2329{e.addEventListener("change",this.handleStepChange)})}removeListenerOnStepChange(){this.steps.forEach(e=>{e.removeEventListener("change",this.handleStepChange)})}updateSelectedStep(){this.steps?.length&&(this.steps.forEach((e,t)=>{this.activeStep===t&&(e.selected=!0,e.editable=!0)}),this.updateStepsBasedOnType())}updateSelectedPanel(){this.panels?.length&&(this.activeStep=this.getSelectedIndex(),this.panels.forEach((e,t)=>{e.hidden=this.activeStep!==t}))}updateStepsBasedOnType(){this.activeStep=this.getSelectedIndex(),this.steps.forEach((e,t)=>{e.visited||(e.visited=t<=this.activeStep),e.editable="editable"===this.type&&(e.visited||"success"===e.variant||"danger"===e.variant),e.variant=e.visited&&e.optional?"success":e.variant})}labelChanged(){this.setAccessibleLabel()}labelIdChanged(){this.setAccessibleLabel()}setAccessibleLabel(){return this.labelId?(this.setAttribute("aria-labelledby",this.labelId),void this.removeAttribute("aria-label")):this.label?(this.setAttribute("aria-label",this.label),void this.removeAttribute("aria-labelledby")):(this.removeAttribute("aria-label"),void this.removeAttribute("aria-labelledby"))}validateAccessibleLabel(){this.getAttribute("aria-label")?.length||this.getAttribute("aria-labelledby")?.length||console.error("CHAMELEON-A11Y: ProgressStepper component must have an accessible label provided by either\n1) a visible label whose id is given as the attribute label-id\n2) a non-empty label attribute to be used as aria-label.\n")}getSelectedIndex(){return this.steps.reduce((e,t,r)=>t.selected?r:e,0)}}h([Qr],gm.prototype,"orientation",void 0),h([Qr],gm.prototype,"type",void 0),h([Qr({attribute:"active-step",converter:Yr})],gm.prototype,"activeStep",void 0),h([Qr],gm.prototype,"label",void 0),h([Qr({attribute:"label-id"})],gm.prototype,"labelId",void 0),h([Nr],gm.prototype,"steps",void 0),h([Nr],gm.prototype,"panels",void 0);const fm={baseName:"progress-stepper",template:pm,styles:Ci(":host{--progress-stepper-gap:var(--goto-layout-01);gap:var(--progress-stepper-gap);flex-grow:1;display:flex;box-sizing:border-box!important}:host .steps{display:grid}:host .steppanels{width:100%}:host([orientation=horizontal]){flex-direction:column}:host([orientation=horizontal]) .steps{column-gap:var(--goto-spacing-02);grid-template-columns:repeat(auto-fit,minmax(0,1fr))}:host([orientation=horizontal]) ::slotted([slot=step]){padding:var(--goto-spacing-02)0;gap:var(--goto-spacing-03);border-top-style:solid}:host([orientation=vertical]){flex-direction:row}:host([orientation=vertical]) .steps{row-gap:var(--goto-spacing-02);grid-template-rows:repeat(auto-fit,minmax(0,1fr))}:host([orientation=vertical]) ::slotted([slot=step]){padding:var(--goto-spacing-00);padding-left:var(--goto-spacing-02);gap:var(--goto-spacing-03);min-height:var(--goto-layout-06);border-left-style:solid;width:256px}")},mm=gm.compose(fm);!function(e){vr({prefix:e}),Gl({prefix:e}),Ku({prefix:e}),Mu({prefix:e}),To({prefix:e,node:void 0},bl,lm,hm,mm)}();class vm extends(function(e){class t extends(Gt(e)){}return h([Te({type:Boolean,reflect:!0,attribute:"checked"})],t.prototype,"checkedAttribute",void 0),h([Te({type:Boolean,reflect:!1,attribute:"current-checked"})],t.prototype,"checked",void 0),t}(Zt)){constructor(){super(...arguments),this.labelMutationObserver=new MutationObserver(()=>this.setAccessibleLabel()),this.handleClick=e=>{this.disabled?e.preventDefault():this.checked||(this.checked=!0,this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))},this.handleKeydown=e=>{this.disabled||this.isInsideRadioGroupElement()||" "!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),this.checked||(this.checked=!0,this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))))},this.handleDefaultSlotChange=()=>{this.labelMutationObserver.disconnect(),this.defaultSlottedNodes.forEach(e=>{this.labelMutationObserver.observe(e,{characterData:!0,subtree:!0})}),this.setAccessibleLabel()}}connectedCallback(){super.connectedCallback(),this.internals||(this.internals=this.attachInternals()),this.internals.role="radio",this.setAttribute("role","radio"),this.disabled||this.isInsideRadioGroupElement()||this.setAttribute("tabindex","0"),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeydown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeydown),this.labelMutationObserver.disconnect()}firstUpdated(e){super.firstUpdated(e),this.checked=!!this.checkedAttribute}formResetCallback(){super.formResetCallback(),this.checked=!!this.checkedAttribute}updated(e){if(super.updated(e),e.has("checkedAttribute")&&(this.checked=!!this.checkedAttribute),(e.has("label")||e.has("labelId"))&&this.setAccessibleLabel(),e.has("errorText")&&this.updateErrorState(),e.has("disabled")&&(this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.disabled?this.removeAttribute("tabindex"):this.isInsideRadioGroupElement()||this.setAttribute("tabindex","0")),e.has("checked"))if(this.setAttribute("aria-checked",this.checked?"true":"false"),this.checked){this.uncheckSiblings();const e=this.getFormValue();this.setFormValue(e)}else this.setFormValue(null);if(e.has("value")&&this.checked){const e=this.getFormValue();this.setFormValue(e)}}render(){return Ni`
2330      <div class="control" part="control">
2331        <div part="checked-indicator" class="checked-indicator"></div>
2332      </div>
2333      <label
2334        part="label"
2335        class="${0===this.defaultSlottedNodes.length?"label__hidden":"label"}"
2336      >
2337        <slot @slotchange=${this.handleDefaultSlotChange}></slot>
2338      </label>
2339      ${this.errorText?this.renderError():le}
2340    `}renderError(){const e=Oi(u(Hl)),t=Oi(u(mr));return Ni`
2341      <${t} class="error-icon">${Mi(Cl)}</${t}>
2342      <${e} class="error-text" color="type-color-danger" variant="caption-medium">
2343        ${this.errorText}
2344      </${e}>
2345    `}uncheckSiblings(){this.name&&!this.isInsideRadioGroupElement()&&this.getRootNode().querySelectorAll(`${u(vm)}[name="${CSS.escape(this.name)}
2345"]`).forEach(e=>{const t=e;t!==this&&t.checked&&t.internals?.form===this.internals?.form&&(t.checked=!1)})}isInsideRadioGroupElement(){return null!==this.closest('[role="radiogroup"]')}getFormValue(){return this.hasAttribute("value")?this.getAttribute("value"):"on"}setAccessibleLabel(){return this.textContent?.length?(this.removeAttribute("aria-label"),void this.removeAttribute("aria-labelledby")):this.labelId?(this.removeAttribute("aria-label"),void this.setAttribute("aria-labelledby",this.labelId)):this.label?(this.removeAttribute("aria-labelledby"),void this.setAttribute("aria-label",this.label)):void 0}validateAccessibleLabel(){this.getAttribute("aria-label")?.length||this.getAttribute("aria-labelledby")?.length||console.error("CHAMELEON-A11Y: Each Radio Button component must have an accessible label provided by either\n  1) text content\n  2) a visible label whose id is given as the attribute labelId\n  3) a non-empty label attribute to be used as aria-label.\n")}updateErrorState(){this.classList.toggle("has-error",!!this.errorText),this.internals.ariaInvalid=this.errorText?"true":null,this.errorText?(this.setAttribute("aria-invalid","true"),this.setAttribute("aria-description",this.errorText)):(this.removeAttribute("aria-invalid"),this.removeAttribute("aria-description"))}}function bm(e={}){return Gl(e),vr(e),d(vm,e)}vm.baseName="radio-button",vm.formAssociated=!0,vm.shadowRootOptions={mode:"open",delegatesFocus:!1},vm.styles=b(":host([hidden]){display:none}:host{align-items:center;gap:var(--goto-spacing-02);user-select:none;--goto-radio-button-border-width:1px;outline:none;flex-direction:row;transition:all .2s ease-in-out;display:inline-flex;position:relative}:host .control{box-sizing:border-box;border:var(--goto-radio-button-border-width)solid var(--goto-border-color-strong);background-color:var(--goto-surface-color-default);width:var(--goto-spacing-04);height:var(--goto-spacing-04);cursor:pointer;border-radius:999px;outline:none;flex-shrink:0;position:relative}:host .checked-indicator{inset:calc(var(--goto-spacing-01) - var(--goto-radio-button-border-width));width:var(--goto-spacing-02);height:var(--goto-spacing-02);background-color:var(--goto-surface-color-brand-default);opacity:0;pointer-events:none;border-radius:999px;flex-shrink:0;display:inline-block;position:absolute}@media print{:host .checked-indicator{-webkit-print-color-adjust:exact;color-adjust:exact;print-color-adjust:exact}}:host .label{color:var(--goto-type-color-default);font:var(--goto-body-medium);padding:var(--goto-spacing-00);margin:var(--goto-spacing-00);cursor:pointer}:host .label__hidden{visibility:hidden;display:none}:host([aria-checked=true]) .checked-indicator{opacity:1}:host(:not([disabled]):focus-visible) .control{box-shadow:0 0 0 2px var(--goto-focus-border-color-default),0 0 0 3px var(--goto-focus-color-highlight-default)}:host([disabled]){opacity:1;cursor:not-allowed}:host([disabled]) .control{cursor:not-allowed;background-color:var(--goto-surface-color-default)}:host([disabled]) .checked-indicator{background-color:var(--goto-icon-color-disabled)}:host([disabled]) .label{color:var(--goto-type-color-disabled);cursor:not-allowed}:host(.has-error){align-items:start;row-gap:var(--goto-spacing-00);grid-template-rows:auto 1fr;grid-template-columns:auto 1fr;height:44px;display:grid}:host(.has-error) .error-icon{--goto-icon-color:var(--goto-icon-color-danger);--goto-icon-size:var(--goto-spacing-04);align-self:start;margin-top:1px}:host(.has-error) .error-text{cursor:text;align-self:center}:host(.has-error) .control{border-color:var(--goto-border-color-danger);margin-top:4px}"),h([Te({attribute:"label-id"})],vm.prototype,"labelId",void 0),h([Te()],vm.prototype,"label",void 0),h([Te({attribute:"error-text"})],vm.prototype,"errorText",void 0),h([Re()],vm.prototype,"defaultSlottedNodes",void 0),bm();class ym extends(Gt(Zt)){constructor(){super(...arguments),this.orientation="vertical",this.listenedRadios=[],this.labelMutationObserver=new MutationObserver(()=>this.setAccessibleLabel()),this.handleSlotChange=()=>
2345{this.setupRadioListeners(),this.disabled&&this.propagateDisabledToChildren(),this.syncRadiosToValue(),this.updateTabIndices()},this.handleChildChange=e=>{e.target!==this&&e.stopImmediatePropagation()},this.handleRadioChange=e=>{e.stopPropagation();const t=e.target;t.checked&&(this.value!==t.value&&(this.value=t.value,this.dispatchEvent(new Event("change",{bubbles:!0}))),this.uncheckOtherRadios(t),this.updateTabIndices())},this.groupForcedDisabledRadios=new WeakSet,this.handleKeydown=e=>{switch(e.key){case"ArrowDown":e.preventDefault(),this.moveToNextRadio();break;case"ArrowUp":e.preventDefault(),this.moveToPreviousRadio();break;case"ArrowRight":e.preventDefault(),"rtl"===this.direction?this.moveToPreviousRadio():this.moveToNextRadio();break;case"ArrowLeft":e.preventDefault(),"rtl"===this.direction?this.moveToNextRadio():this.moveToPreviousRadio();break;case" ":case"Spacebar":e.preventDefault(),this.checkFocusedRadio()}},this.handleLabelSlotChange=()=>{this.labelMutationObserver.disconnect();const e=this.querySelector('[slot="label"]');e&&this.labelMutationObserver.observe(e,{characterData:!0,subtree:!0}),this.setAccessibleLabel()}}isRadioElement(e){const t=u(vm,{optional:!0})?.toUpperCase(),r=u(zh,{optional:!0})?.toUpperCase();return!(!t||e.tagName!==t)||!(!r||e.tagName!==r||"radio"!==e.getAttribute("type"))}findRadiosRecursively(e){const t=[];for(const r of e.children)"radiogroup"!==r.getAttribute("role")&&(this.isRadioElement(r)?t.push(r):t.push(...this.findRadiosRecursively(r)));return t}get radioButtons(){const e=[];for(const t of this.slottedElements)"radiogroup"!==t.getAttribute("role")&&(this.isRadioElement(t)?e.push(t):e.push(...this.findRadiosRecursively(t)));return e}get enabledRadioButtons(){return this.radioButtons.filter(e=>!e.disabled)}connectedCallback(){super.connectedCallback(),this.internals||(this.internals=this.attachInternals()),this.internals.role="radiogroup",this.setAttribute("role","radiogroup"),this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.setAttribute("aria-orientation",this.orientation),this.setAccessibleLabel(),this.addEventListener("keydown",this.handleKeydown),this.addEventListener("change",this.handleChildChange)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeydown),this.removeEventListener("change",this.handleChildChange),this.listenedRadios.forEach(e=>{e.removeEventListener("change",this.handleRadioChange)}),this.listenedRadios=[],this.labelMutationObserver.disconnect()}formResetCallback(){this.value=this.defaultValue,this.syncRadiosToValue(),this.updateTabIndices()}firstUpdated(e){super.firstUpdated(e),this.defaultValue=this.value}updated(e){super.updated(e),e.has("disabled")&&(this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.propagateDisabledToChildren()),e.has("orientation")&&this.setAttribute("aria-orientation",this.orientation),e.has("labelId")&&this.setAccessibleLabel(),e.has("value")&&(this.setFormValue(this.value??null),this.radioButtons.length>0&&(this.syncRadiosToValue(),this.updateTabIndices()))}render(){return Ni`
2346      <slot name="label" @slotchange=${this.handleLabelSlotChange}></slot>
2347      <div class="positioning-region" part="positioning-region">
2348        <slot @slotchange=${this.handleSlotChange}></slot>
2349      </div>
2350    `}setupRadioListeners(){this.listenedRadios.forEach(e=>{e.removeEventListener("change",this.handleRadioChange)}),this.listenedRadios=[...this.radioButtons],this.listenedRadios.forEach(e=>{e.addEventListener("change",this.handleRadioChange)})}uncheckOtherRadios(e){this.radioButtons.forEach(t=>{t!==e&&t.checked&&(t.checked=!1)})}syncRadiosToValue(){const e=this.radioButtons,t=e.some(e=>e.value===this.value),r=e.some(e=>e.checked);!t&&r||e.forEach(e=>{e.checked=e.value===this.value})}updateTabIndices(){const e=this.radioButtons,t=e.filter(e=>!e.disabled),r=t.find(e=>e.checked),n=r||t[0];e.forEach(e=>{e.disabled?e.removeAttribute("tabindex"):e.setAttribute("tabindex",e===n?"0":"-1")})}propagateDisabledToChildren(){this.radioButtons.forEach(e=>{this.disabled?(e.disabled||this.groupForcedDisabledRadios.add(e),e.disabled=!0):this.groupForcedDisabledRadios.has(e)&&(e.disabled=!1,this.groupForcedDisabledRadios.delete(e))})}get direction(){const e=this.closest("[dir]");return null!==e&&"rtl"===e.getAttribute("dir")?"rtl":"ltr"}get activeElement(){return this.getRootNode().activeElement}getCurrentRadioIndex(e){const t=e.findIndex(e=>e.checked);return-1!==t?t:e.findIndex(e=>this.activeElement===e)}moveToNextRadio(){const e=this.enabledRadioButtons;if(0===e.length)return;let t=this.getCurrentRadioIndex(e)+1;t>=e.length&&(t=0),this.checkRadio(e[t])}moveToPreviousRadio(){const e=this.enabledRadioButtons;if(0===e.length)return;let t=this.getCurrentRadioIndex(e)-1;t<0&&(t=e.length-1),this.checkRadio(e[t])}checkRadio(e){const t=this.value!==e.value;e.checked=!0,this.value=e.value,e.focus(),this.updateTabIndices(),t&&this.dispatchEvent(new Event("change",{bubbles:!0}))}checkFocusedRadio(){const e=this.radioButtons.find(e=>this.activeElement===e);!e||e.disabled||e.checked||this.checkRadio(e)}setAccessibleLabel(){const e=this.querySelector('[slot="label"]');return e?.textContent?(this.removeAttribute("aria-labelledby"),void this.setAttribute("aria-label",e.textContent)):this.labelId?(this.removeAttribute("aria-label"),void this.setAttribute("aria-labelledby",this.labelId)):void 0}validateAccessibleLabel(){this.getAttribute("aria-label")?.length||this.getAttribute("aria-labelledby")?.length||console.error("CHAMELEON-A11Y: Radio Group component must have an accessible label provided by either\n  1) a non-empty label attribute to be used as aria-label\n  2) a visible label whose id is given as the attribute labelId.\n")}}ym.baseName="radio-group",ym.formAssociated=!0,ym.shadowRootOptions={mode:"open",delegatesFocus:!1},ym.styles=b(":host{box-sizing:border-box;gap:var(--goto-spacing-02);display:block}
2350:host .positioning-region{gap:var(--goto-spacing-04);display:flex}:host([orientation=horizontal]) .positioning-region{flex-direction:row}:host([orientation=vertical]) .positioning-region{gap:var(--goto-spacing-02);flex-direction:column}::slotted([slot=label]){color:var(--goto-type-color-default);font:var(--goto-caption-medium-strong)}"),h([Te({reflect:!0})],ym.prototype,"orientation",void 0),h([Te({attribute:"label-id"})],ym.prototype,"labelId",void 0),h([Te({reflect:!1})],ym.prototype,"value",void 0),h([Ne({slot:"",flatten:!0})],ym.prototype,"slottedElements",void 0),function(e={}){Gl(e),vr(e),bm(e),Fh(e),d(ym,e)}(),Rg(),qu();class wm extends(a(Pp,"search-field")){constructor(){super(...arguments),this.alignment="left",this.fieldsize="medium",this.autocomplete="off",this.clearLabel="Clear",this.handleClearButtonClick=()=>{this.value="",this.$emit("input"),this.$emit("close",null,{bubbles:!1}),this.$emit("change")},this.handleClearButtonKeyboard=e=>{e.stopPropagation(),"keydown"!==e.type||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClearButtonClick())}}clearLabelChanged(e,t){this.clearButton?.setAttribute("aria-label",t)}connectedCallback(){super.connectedCallback(),this.appendStartIcon(),this.appendClearButton(),this.setRoleSearch()}disconnectedCallback(){super.disconnectedCallback(),this.clearButton?.removeEventListener("click",this.handleClearButtonClick),this.clearButton?.removeEventListener("keydown",this.handleClearButtonKeyboard),this.clearButton?.removeEventListener("keyup",this.handleClearButtonKeyboard),this.clearButton?.removeEventListener("keypress",this.handleClearButtonKeyboard)}valueChanged(e,t){super.valueChanged(e,t),""!==t?this.toggleClearButton(t):this.toggleClearButton(this.value)}labelChanged(e,t){this.isConnected&&(t&&t.length>0?this.control.setAttribute("aria-label",t):this.control.removeAttribute("aria-label"))}appendStartIcon(){const e=this.shadowRoot?.querySelector('[name="start"]'),t=u(mr);if(e?.innerHTML.includes("chameleon-svg")||e?.innerHTML.includes(u(mr)))return;const r=document.createElement(t);r.innerHTML='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.9056 16.3199C13.551 17.3729 11.8487 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10C18 11.8487 17.3729 13.551 16.3199 14.9056L22 20.5858L20.5858 22L14.9056 16.3199ZM16 10C16 13.3137 13.3137 16 10 16C6.68629 16 4 13.3137 4 10C4 6.68629 6.68629 4 10 4C13.3137 4 16 6.68629 16 10Z" fill="currentColor"></path></svg>',e?.appendChild(r)}appendClearButton(){const e=this.shadowRoot?.querySelector('[name="end"]'),t=u(mr);if(!e?.innerHTML.includes(t)){this.clearButton=document.createElement("button"),this.clearButton.type="button",this.clearButton.setAttribute("aria-label",this.clearLabel);const e=document.createElement(t);e.innerHTML=Sl,this.clearButton?.appendChild(e)}this.clearButton&&(this.clearButton.addEventListener("click",this.handleClearButtonClick),this.clearButton.addEventListener("keydown",this.handleClearButtonKeyboard),this.clearButton.addEventListener("keyup",this.handleClearButtonKeyboard),this.clearButton.addEventListener("keypress",this.handleClearButtonKeyboard),e?.appendChild(this.clearButton))}toggleClearButton(e){Tr.queueUpdate(()=>{e?this.setAttribute("clear-button-hidden","false"):this.setAttribute("clear-button-hidden","true")})}setRoleSearch(){this.control.setAttribute("role","searchbox")}setAccessibleLabel(){this.label&&""!==this.label?this.control.setAttribute("aria-label",this.label):this.labelId&&""!==this.labelId&&this.control.setAttribute("aria-labelledby",this.labelId)}validateAccessibleLabel(){this.getAttribute("aria-labelledby")?.length||console.error("CHAMELEON-A11Y: SearchField component must have an accessible label provided by either \n  1) text content \n  2) setting the label attribute on the search-field\n  2) a visible element whose id is given as the attribute labelId\n")}}h([Qr],wm.prototype,"alignment",void 0),h([Qr],wm.prototype,"fieldsize",void 0),h([Qr],wm.prototype,"label",void 0),h([Qr],wm.prototype,"autocomplete",void 0),h([Qr({attribute:"clear-label"})],wm.prototype,"clearLabel",void 0);const xm={baseName:"search-field",template:Ap,styles:(e,t)=>ml`
2351    ${".root{box-sizing:border-box;flex-direction:row}.control{appearance:none;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-optical-sizing:inherit;font-size-adjust:inherit;font-kerning:inherit;font-feature-settings:inherit;font-variation-settings:inherit;color:inherit;width:100%;height:calc(100% - 4px);padding:0 calc(var(--design-unit,4)*2px + 1px);font-family:inherit;font-size:var(--type-ramp-base-font-size,14px);line-height:var(--type-ramp-base-line-height,20px);background:0 0;border:none;margin-top:auto;margin-bottom:auto}.control:hover,.control:focus-visible,.control:disabled,.control:active{outline:none}.label{color:var(--neutral-foreground-rest);cursor:pointer;font-size:var(--type-ramp-base-font-size,14px);line-height:var(--type-ramp-base-line-height,20px);margin-bottom:4px;display:block}.label__hidden{visibility:hidden;display:none}:host([disabled]) .label,:host([readonly]) .label,:host([readonly]) .control,:host([disabled]) .control{cursor:not-allowed}:host([hidden]){display:none}:host{user-select:none;--goto-icon-color:var(--goto-type-color-secondary);font-family:var(--goto-font-family);outline:none;font-size:16px;display:inline-block;box-sizing:border-box!important}:host .root{border-style:solid;border-width:1px;border-color:var(--goto-border-color-default);color:var(--goto-type-color-default);font:var(--goto-body-medium);height:var(--goto-spacing-07);border-radius:var(--goto-radius-small);gap:var(--goto-spacing-00);width:100%;padding:var(--goto-spacing-00)var(--goto-spacing-04);background-color:var(--goto-surface-color-secondary);border:1px solid #0000;align-items:center;display:flex;position:relative}:host [part=start]{align-items:center;display:inline-flex}:host [part=start] chameleon-svg{--goto-icon-size:20px}:host [part=end]{--goto-icon-size:10px;bottom:var(--goto-spacing-00);visibility:visible;top:var(--goto-spacing-00);align-items:center;margin:auto;display:inline-flex;position:relative}:host [part=end] button{--goto-icon-color:var(--goto-surface-color-default);background-color:var(--goto-icon-color-secondary);cursor:pointer;height:var(--goto-spacing-04);width:var(--goto-spacing-04);border:1px solid #0000;border-radius:50%;outline:0;justify-content:center;align-items:center;display:inline-flex}:host [part=end] button:focus-visible{border-color:var(--goto-focus-border-color-default);box-shadow:0 0 0 2px var(--goto-focus-color-highlight-default)}:host input{text-overflow:ellipsis;white-space:nowrap;max-width:100%;color:var(--goto-type-color-default);padding:var(--goto-spacing-00)var(--goto-spacing-03);outline:0;overflow:hidden}:host input:-webkit-autofill{box-shadow:0 0 0 1000px var(--goto-surface-color-secondary)inset!important}:host input::placeholder{color:var(--goto-type-color-secondary)}:host([clear-button-hidden=true]) [part=end]{visibility:hidden}:host(:focus-within:not([disabled])) .root{background-color:var(--goto-surface-color-default)}:host([alignment=center]) .root{justify-content:center}:host([alignment=center]) .control{width:60%}:host([alignment=center]) [part=end]{margin:var(--goto-spacing-00);position:relative}:host([alignment=center]:not([disabled]):focus-within) .root{justify-content:center}:host([alignment=center]:not([disabled]):focus-within) .control{width:100%}:host([alignment=center]:not([disabled]):focus-within) [part=end]{margin:var(--goto-spacing-00);position:relative}:host([alignment=center][clear-button-hidden=false]) .control{width:100%}:host(:hover:not([disabled])) .root{background-color:var(--goto-surface-color-secondary);border-color:var(--goto-border-color-default)}:host(:focus-within:hover:not([disabled])) .root,:host(:active:not([disabled])) .root{background:var(--goto-surface-color-default)}:host:not([disabled]) .root:hover{border-color:var(--goto-interactive-color-neutral-hover)}:host(:focus-within:not([disabled])) .root{background-color:var(--goto-surface-color-default);border-color:var(--goto-focus-border-color-default);box-shadow:0 0 0 1px var(--goto-focus-color-highlight-default)}:host([disabled]){--goto-icon-color:var(--goto-icon-color-disabled)}:host([disabled]) input{color:var(--goto-type-color-disabled);caret-color:#0000}:host([disabled]) input::placeholder{color:var(--goto-type-color-disabled)}:host([fieldsize=small]) .root{font:var(--goto-body-small);height:var(--goto-spacing-06)}
2351:host([fieldsize=small]) .root input::placeholder{font:var(--goto-body-small)}:host([fieldsize=small]) span[part=start] chameleon-svg{--goto-icon-size:16px}:host([fieldsize=small]) ::slotted([slot=end]),:host([fieldsize=small]) ::slotted([slot=start]){font:var(--goto-body-small)}:host([fieldsize=large]) .root{height:var(--goto-spacing-08)}:host([fieldsize=large]) span[part=start] chameleon-svg{--goto-icon-size:20px}:host([fieldsize=xlarge]) .root{height:var(--goto-spacing-09)}:host([fieldsize=xlarge]) span[part=start] chameleon-svg{--goto-icon-size:24px}:host([fullwidth]),:host([fullwidth]) .control{width:100%}"}
2352  `,shadowOptions:{delegatesFocus:!0}},_m=wm.compose(xm);!function(e){vr({prefix:e}),To({prefix:e,node:void 0},_m)}();class km extends gf{}class Cm extends(Iu(km)){constructor(){super(...arguments),this.proxy=document.createElement("select")}}const Sm="above",Em="below";class Im extends Cm{constructor(){super(...arguments),this.open=!1,this.forcedPosition=!1,this.listboxId=xa("listbox-"),this.maxHeight=0}openChanged(e,t){if(this.collapsible){if(this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView(),this.indexWhenOpened=this.selectedIndex,void Tr.queueUpdate(()=>this.focus());this.ariaControls="",this.ariaExpanded="false"}}get collapsible(){return!(this.multiple||"number"==typeof this.size)}get value(){return $r.track(this,"value"),this._value}set value(e){var t,r,n,o,i,s,a;const l=`${this._value}`;if(null===(t=this._options)||void 0===t?void 0:t.length){const t=this._options.findIndex(t=>t.value===e),l=null!==(n=null===(r=this._options[this.selectedIndex])||void 0===r?void 0:r.value)&&void 0!==n?n:null,c=null!==(i=null===(o=this._options[t])||void 0===o?void 0:o.value)&&void 0!==i?i:null;-1!==t&&l===c||(e="",this.selectedIndex=t),e=null!==(a=null===(s=this.firstSelectedOption)||void 0===s?void 0:s.value)&&void 0!==a?a:e}l!==e&&(this._value=e,super.valueChanged(l,e),$r.notify(this,"value"),this.updateDisplayValue())}updateValue(e){var t,r;this.$fastController.isConnected&&(this.value=null!==(r=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.value)&&void 0!==r?r:""),e&&(this.$emit("input"),this.$emit("change",this,{bubbles:!0,composed:void 0}))}selectedIndexChanged(e,t){super.selectedIndexChanged(e,t),this.updateValue()}positionChanged(e,t){this.positionAttribute=t,this.setPositioning()}setPositioning(){const e=this.getBoundingClientRect(),t=window.innerHeight-e.bottom;this.position=this.forcedPosition?this.positionAttribute:e.top>t?Sm:Em,this.positionAttribute=this.forcedPosition?this.positionAttribute:this.position,this.maxHeight=this.position===Sm?~~e.top:~~t}get displayValue(){var e,t;return $r.track(this,"displayValue"),null!==(t=null===(e=this.firstSelectedOption)||void 0===e?void 0:e.text)&&void 0!==t?t:""}disabledChanged(e,t){super.disabledChanged&&super.disabledChanged(e,t),this.ariaDisabled=this.disabled?"true":"false"}formResetCallback(){this.setProxyOptions(),super.setDefaultSelectedOption(),-1===this.selectedIndex&&(this.selectedIndex=0)}clickHandler(e){if(!this.disabled){if(this.open){const t=e.target.closest("option,[role=option]");if(t&&t.disabled)return}return super.clickHandler(e),this.open=this.collapsible&&!this.open,this.open||this.indexWhenOpened===this.selectedIndex||this.updateValue(!0),!0}}focusoutHandler(e){var t;if(super.focusoutHandler(e),!this.open)return!0;const r=e.relatedTarget;this.isSameNode(r)?this.focus():(null===(t=this.options)||void 0===t?void 0:t.includes(r))||(this.open=!1,this.indexWhenOpened!==this.selectedIndex&&this.updateValue(!0))}handleChange(e,t){super.handleChange(e,t),"value"===t&&this.updateValue()}slottedOptionsChanged(e,t){this.options.forEach(e=>{$r.getNotifier(e).unsubscribe(this,"value")}),super.slottedOptionsChanged(e,t),this.options.forEach(e=>{$r.getNotifier(e).subscribe(this,"value")}),this.setProxyOptions(),this.updateValue()}mousedownHandler(e){var t;return e.offsetX>=0&&e.offsetX<=(null===(t=this.listbox)||void 0===t?void 0:t.scrollWidth)?super.mousedownHandler(e):this.collapsible}multipleChanged(e,t){super.multipleChanged(e,t),this.proxy&&(this.proxy.multiple=t)}selectedOptionsChanged(e,t){var r;super.selectedOptionsChanged(e,t),null===(r=this.options)||void 0===r||r.forEach((e,t)=>{var r;const n=null===(r=this.proxy)||void 0===r?void 0:r.options.item(t);n&&(n.selected=e.selected)})}setDefaultSelectedOption(){var e;const t=null!==(e=this.options)&&void 0!==e?e:Array.from(this.children).filter(hf.slottedOptionFilter),r=null==t?void 0:t.findIndex(e=>e.hasAttribute("selected")||e.selected||e.value===this.value);this.selectedIndex=-1===r?0:r}setProxyOptions(){this.proxy instanceof HTMLSelectElement&&this.options&&(this.proxy.options.length=0,this.options.forEach(e
2352=>{const t=e.proxy||(e instanceof HTMLOptionElement?e.cloneNode():null);t&&this.proxy.options.add(t)}))}keydownHandler(e){super.keydownHandler(e);const t=e.key||e.key.charCodeAt(0);switch(t){case" ":e.preventDefault(),this.collapsible&&this.typeAheadExpired&&(this.open=!this.open);break;case"Home":case"End":e.preventDefault();break;case"Enter":e.preventDefault(),this.open=!this.open;break;case"Escape":this.collapsible&&this.open&&(e.preventDefault(),this.open=!1);break;case"Tab":return this.collapsible&&this.open&&(e.preventDefault(),this.open=!1),!0}return this.open||this.indexWhenOpened===this.selectedIndex||(this.updateValue(!0),this.indexWhenOpened=this.selectedIndex),!(t===mi||t===yi)}connectedCallback(){super.connectedCallback(),this.forcedPosition=!!this.positionAttribute,this.addEventListener("contentchange",this.updateDisplayValue)}disconnectedCallback(){this.removeEventListener("contentchange",this.updateDisplayValue),super.disconnectedCallback()}sizeChanged(e,t){super.sizeChanged(e,t),this.proxy&&(this.proxy.size=t)}updateDisplayValue(){this.collapsible&&$r.notify(this,"displayValue")}}nn([Qr({attribute:"open",mode:"boolean"})],Im.prototype,"open",void 0),nn([Rr],Im.prototype,"collapsible",null),nn([Nr],Im.prototype,"control",void 0),nn([Qr({attribute:"position"})],Im.prototype,"positionAttribute",void 0),nn([Nr],Im.prototype,"position",void 0),nn([Nr],Im.prototype,"maxHeight",void 0);class Am{}nn([Nr],Am.prototype,"ariaControls",void 0),oc(Am,pf),oc(Im,tc,Am);class Tm extends(s(df)){constructor(){super(...arguments),this.default=!1}get label(){return this.getAttribute("label")??(this.content.map(e=>e.nodeType===e.ELEMENT_NODE?e.innerText:e.textContent).join("")||this.value||this.text)}selectedChanged(e,t){super.selectedChanged(),void 0!==e&&e!==t&&void 0!==this.label&&this.$emit("ch-option-selected-changed",{selected:!!t,value:this.value})}}h([Qr({mode:"boolean"})],Tm.prototype,"default",void 0),h([Rr],Tm.prototype,"label",null);class Om extends(a(Im,"select")){constructor(){super(...arguments),this.selectedValue="",this.fullwidth=!1,this.labelSizeSubscription=new xh(e=>{const t=e[0].contentRect;this.labelWidth=t.width},100),this.helperTextSizeSubscription=new xh(e=>{const t=e[0].contentRect;this.helperTextHeight=t.height},100),this.resizeListboxSubscription=new xh(()=>{this.setPositioning(),this.resizeListboxWhenFullWidth(),this.resizeListboxWhenLongTextOptions(),this.resizeListboxWhenLabelAndHelperText(),this.resizeListboxWhenNoHorizontalScreenSpace(),this.inDialog&&this.resizeListboxWhenInDialog()},100),this.resizeListboxWhenInDialog=()=>{this.control&&this.listbox&&(this.listbox.style.position="fixed",this.listbox.style.width=`${this.controlBoundingRect.width}px`,this.positionIsAbove?(this.listbox.style.top&&this.listbox.style.removeProperty("top"),this.listbox.style.bottom=window.innerHeight-this.controlBoundingRect.y+"px",this.listbox.style.left=`${this.controlBoundingRect.x}px`):(this.listbox.style.bottom&&this.listbox.style.removeProperty("bottom"),this.listbox.style.top=`${this.controlBoundingRect.y+this.controlBoundingRect.height}px`,this.listbox.style.left=`${this.controlBoundingRect.x}px`))},this.resizeListboxWhenDialogScrolls=()=>{if(this.parentDialogContent=this.findParentDialogContent(),this.parentDialogContent)return this.parentDialogContent?.addEventListener("scroll",this.resizeListboxWhenInDialog),window.addEventListener("resize",this.resizeListboxWhenInDialog),()=>{this.resetListbox(),this.parentDialogContent?.removeEventListener("scroll",this.resizeListboxWhenInDialog),window.removeEventListener("resize",this.resizeListboxWhenInDialog)}}}get displayValue(){return this.firstSelectedOption?.label??""}get labelColor(){return this.disabled?"type-color-disabled":"type-color-default"}get helperTextColor(){return this.disabled?"type-color-disabled":this.error?"type-color-danger":this.success?"type-color-success":"type-color-secondary"}get positionIsAbove(){return!!this.position&&this.position===Sm}get isInlineOrFitContent(){return!(!this.inline&&!this.fitContent)}get controlBoundingRect(){return this.control.getBoundingClientRect()}resizeListboxWhenFullWidth(){this.fullwidth&&(this.controlBoundingRect.width>460?(this.listbox.style.width="auto",this.listbox.style.maxWidth="480px"):(this.listbox.style.width="100%",this.listbox.style.maxWidth="100%"))}resizeListboxWhenLabelAndHelperText(){this.isInlineOrFitContent&&this.label&&this.labelWidth&&(this.listbox.style.left=`${this.labelWidth+4}px`)}resizeListboxWhenNoHorizontalScreenSpace(){const e=window.innerWidth-this.controlBoundingRect.left;(e<480||this.inline&&e<260)&&(this.listbox.style.left="unset",this.listbox.style.right="0px")}resizeListboxWhenLongTextOptions(){if(this.optionList)for(const e of this.optionList){const t=e.shadowRoot?.querySelector(".content"),r=this.controlBoundingRect.width;
2352if(t&&!this.inline&&r&&t.scrollWidth>r){this.listbox.style.width="max-content",this.fullwidth&&r>460?this.listbox.style.maxWidth="100%":this.listbox.style.maxWidth="480px";break}}}errorChanged(e,t){this.ariaInvalid=t?"true":null}inlineChanged(){this.inline&&this.hasAttribute("size")&&this.removeAttribute("size")}sizeChanged(){"xsmall"===this.getAttribute("size")&&this.setAttribute("size","small")}selectedValueChanged(e,t){this.value=t}labelElementChanged(e,t){e&&this.labelSizeSubscription.unsubscribe(),t&&this.labelSizeSubscription.subscribe(t)}helperTextElementChanged(e,t){e&&this.helperTextSizeSubscription.unsubscribe(),t&&this.helperTextSizeSubscription.subscribe(t)}connectedCallback(){super.connectedCallback(),this.setPositioning(),this.optionList=this.querySelectorAll(`chameleon-option, ${u(Tm)}`),this.setInitialSelectedValue(),this.resizeListboxSubscription.subscribe(this.listbox),this.inDialog&&(this.dialogScrollCleanup=this.resizeListboxWhenDialogScrolls())}disconnectedCallback(){super.disconnectedCallback(),this.resizeListboxSubscription.unsubscribe(),this.labelSizeSubscription.unsubscribe(),this.helperTextSizeSubscription.unsubscribe(),this.dialogScrollCleanup?.(),this.dialogScrollCleanup=void 0}resetListbox(){this.listbox.style.removeProperty("position"),this.listbox.style.removeProperty("width"),this.listbox.style.removeProperty("top"),this.listbox.style.removeProperty("left")}setInitialSelectedValue(){if(null!==this.selectedValue&&""!==this.selectedValue)Tr.queueUpdate(()=>{this.value=this.selectedValue});else if(this.value)this.selectedValue=this.value;else{const e=Array.from(this.optionList??[]);this.value=e.find(e=>e.selectedAttribute)?.value??e?.at(0)?.value??"",this.selectedValue=this.value}}findDeepActiveElement(e=document.activeElement){return e?e?.shadowRoot?.activeElement?this.findDeepActiveElement(e.shadowRoot.activeElement):e:null}focus(e){super.focus({preventScroll:!0,...e})}mousedownHandler(e){return e.preventDefault(),super.mousedownHandler(e)}focusAndScrollOptionIntoView(e=this.firstSelectedOption){const t=this.findDeepActiveElement();t&&this.contains(t)&&e&&(e.focus({preventScroll:!0}),requestAnimationFrame(()=>{this.scrollOptionIntoViewWithinListbox(e)}))}scrollOptionIntoViewWithinListbox(e){if(!this.listbox)return;const t=e.getBoundingClientRect(),r=this.listbox.getBoundingClientRect();t.top<r.top?this.listbox.scrollTop-=r.top-t.top:t.bottom>r.bottom&&(this.listbox.scrollTop+=t.bottom-r.bottom)}findParentDialogContent(){const e=Gi(this,e=>"CHAMELEON-DIALOG"===e.tagName||e.tagName===u(Ag,{optional:!0}));return e?.shadowRoot&&Zi(e?.shadowRoot,e=>e.part.contains("body"))}setPositioning(){if(!this.listbox||!this.control)return;this.listbox.style.maxHeight="";const e=this.controlBoundingRect,t=Number.parseInt(getComputedStyle(this.listbox).maxHeight,10)||240,r=Math.min(this.listbox.scrollHeight,t),n=window.innerHeight-document.documentElement.clientHeight,o=window.innerHeight-n-e.bottom,i=e.top;o>=r?(this.position=Em,this.listbox.style.maxHeight=`${t}px`,this.listbox.style.removeProperty("bottom")):i>=r?(this.position=Sm,this.listbox.style.maxHeight=`${t}px`,this.adjustListboxBottomForHelperText()):o>i?(this.position=Em,this.listbox.style.maxHeight=`${Math.max(0,o-2)}px`,this.listbox.style.removeProperty("bottom")):(this.position=Sm,this.listbox.style.maxHeight=`${Math.max(0,i-2)}px`,this.adjustListboxBottomForHelperText())}adjustListboxBottomForHelperText(){if(this.helperTextHeight&&this.helperTextHeight>0){const e=this.controlBoundingRect.height;this.listbox.style.bottom=`${e+this.helperTextHeight}px`}}selectedIndexChanged(e,t){super.selectedIndexChanged?.(e,t);const r=null!==this.querySelector('[slot="selected-value"]');this.open&&e!==t&&r&&this.$emit("selected-value-change",{value:this.value,displayValue:this.displayValue,selectedIndex:t})}openChanged(e,t){super.openChanged?.(e,t),t&&this.setPositioning()}handleTextClick(e){e.stopPropagation()}}h([Qr({attribute:"selected-value"})],Om.prototype,"selectedValue",void 0),h([Qr({mode:"boolean"})],Om.prototype,"success",void 0),h([Qr({mode:"boolean"})],Om.prototype,"error",void 0),h([Qr({mode:"boolean"})],Om.prototype,"inline",void 0),h([Qr({attribute:"size"})],Om.prototype,"sizeAttribute",void 0),h([Qr],Om.prototype,"label",void 0),h([Qr({attribute:"helper-text"})],Om.prototype,"helperText",void 0),h([Qr({mode:"boolean"})],Om.prototype,"fullwidth",void 0),h([Qr({attribute:"no-border",mode:"boolean"})],Om.prototype,"noBorder",void 0),h([Qr({attribute:"in-dialog",mode:"boolean"})],Om.prototype,"inDialog",void 0),h([Qr({attribute:"fit-content",mode:"boolean"})],Om.prototype,"fitContent",void 0),h([Nr],Om.prototype,"labelElement",void 0),h([Nr],Om.prototype,"helperTextElement",void 0),h([Rr],Om.prototype,"displayValue",null),h([Rr],Om.prototype,"labelColor",null),h([Rr],Om.prototype,"helperTextColor",null);var Lm=':host{--goto-icon-color:var(--goto-icon-color-default);--chameleon-select-height:var(--goto-spacing-07);--base-height-multiplier:var(--chameleon-select-height);color:var(--goto-type-color-default);width:250px;height:fit-content;min-width:unset;box-shadow:none;background:0 0;border:none;align-items:center;display:block;position:relative}:host .label{color:var(--goto-type-color-default);font:var(--goto-caption-medium-strong);margin-bottom:4px;display:block}:host .helper-text{cursor:text}:host .control{--goto-icon-size:var(--goto-spacing-05);background-color:var(--goto-surface-color-default);border-radius:var(--goto-radius-small);border:1px solid var(--goto-border-color-default);height:var(--chameleon-select-height);box-sizing:border-box;padding:var(--goto-spacing-00)var(--goto-spacing-02)var(--goto-spacing-00)var(--goto-spacing-03);font:var(--goto-body-medium)}:host .start{margin:var(--goto-spacing-00)14px var(--goto-spacing-00)-2px;width:var(--goto-spacing-05);height:var(--goto-spacing-05)}
2352:host .indicator{margin-inline-start:.4em;width:24px;height:24px;margin-top:5px}:host .listbox{visibility:visible;opacity:1;font:var(--goto-body-small);max-height:calc(var(--chameleon-select-height)*9.5);background:var(--goto-surface-color-default);box-shadow:var(--goto-elevation-large);padding:var(--goto-spacing-00);line-height:36px;display:flex;border-radius:var(--goto-radius-medium)!important;border:1px solid var(--goto-border-color-secondary)!important}:host .listbox[hidden]{visibility:hidden;opacity:0;display:none}:host .selected-value{text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box;overflow:hidden}:host .state-icon{position:absolute;right:34px}:host [variant=button-small]{margin-right:var(--goto-spacing-01)}:host(:not([disabled]):hover),:host([disabled]:hover){background:0 0}:host(:not([disabled])){--accent-fill-focus:var(--goto-surface-color-secondary);--focus-stroke-inner:var(--goto-surface-color-secondary);--foreground-on-accent-focus:var(--goto-type-color-default)}:host(:not([disabled])) .control:hover{border-color:var(--goto-border-color-default);background-color:var(--goto-interactive-color-secondary-hover)}:host(:not([disabled])) .control:active,:host(:not([disabled])[open]) .control{border-color:var(--goto-border-color-default);background-color:var(--goto-interactive-color-secondary-pressed)}:host(:not([disabled])[open][success]) .control{border-color:var(--goto-success-1);background-color:var(--goto-interactive-color-secondary-pressed)}:host(:not([disabled])[open][error]) .control{border-color:var(--goto-danger-1);background-color:var(--goto-interactive-color-secondary-pressed)}:host([size=xsmall]),:host([size=small]){--chameleon-select-height:var(--goto-spacing-06)}:host([size=xsmall]) .control,:host([size=small]) .control{font:var(--goto-body-small)}:host([size=xsmall]) .indicator,:host([size=small]) .indicator{height:18px;margin-top:var(--goto-spacing-00)}:host([size=xsmall]) .start,:host([size=small]) .start{margin:var(--goto-spacing-00)14px var(--goto-spacing-00)-2px;height:var(--goto-spacing-04);width:var(--goto-spacing-04)}:host([size=xsmall]) .listbox,:host([size=small]) .listbox{font:var(--goto-caption-medium);line-height:var(--goto-spacing-06);max-height:calc(var(--chameleon-select-height)*6.5)}:host([size=xsmall]) .state-icon,:host([size=small]) .state-icon,:host([size=xsmall]) ::slotted([slot=start]),:host([size=small]) ::slotted([slot=start]){--goto-icon-size:var(--goto-spacing-04)}:host([open]) .indicator{margin-top:-2px;transform:rotateX(180deg)}:host([open]) ::slotted([aria-selected=true][role=option]:hover){--goto-icon-color:var(--goto-type-color-inverted)}:host([size=medium]){--chameleon-select-height:var(--goto-spacing-07)}:host([size=medium]) .state-icon,:host([size=medium]) ::slotted([slot=start]){--goto-icon-size:var(--goto-spacing-04)}:host([size=large]){--chameleon-select-height:var(--goto-spacing-08)}:host([size=large]) .control,:host([size=large]) .listbox{font:var(--goto-body-medium)}:host([size=large]) .start{width:var(--goto-spacing-05);height:var(--goto-spacing-05)}:host([size=large]) .state-icon,:host([size=large]) ::slotted([slot=start]){--goto-icon-size:var(--goto-spacing-05)}:host([size=xlarge]){--chameleon-select-height:var(--goto-spacing-09)}:host([size=xlarge]) .control,:host([size=xlarge]) .listbox{font:var(--goto-body-medium)}:host([size=xlarge]) .start{width:var(--goto-spacing-06);height:var(--goto-spacing-06)}:host([size=xlarge]) .state-icon,:host([size=xlarge]) ::slotted([slot=start]){--goto-icon-size:var(--goto-spacing-06)}:host([open][position=below]) .listbox{top:var(--chameleon-select-height)}:host([open][position=above]) .listbox{bottom:var(--chameleon-select-height)}:host(:not([inline],[fit-content])[open][label]:not([label=""])[position=below]) .listbox{top:inherit}:host(:focus) ::slotted([aria-selected=true][role=option]:not([disabled])){--goto-icon-color:var(--goto-icon-color-default);background:var(--goto-surface-color-secondary);color:var(--goto-type-color-default)}:host(:not([disabled]):focus-visible) .control{outline:1px solid var(--goto-focus-color-highlight-default);outline-offset:1px}:host(:not([disabled])[open]:focus-visible) .control{border-color:none;box-shadow:none}:host([disabled]){opacity:unset}:host([disabled]) .control{--goto-icon-color:var(--goto-icon-color-disabled);color:var(--goto-type-color-disabled)}:host(:not([disabled])[success]) .control,:host(:not([disabled])[success]) .control:hover{border-color:var(--goto-surface-color-success-default)!important}:host(:not([disabled])[success]) .selected-value{padding-right:var(--goto-spacing-05)}
2352:host(:not([disabled])[success]) .state-icon{--goto-icon-color:var(--goto-icon-color-success)}:host(:not([disabled])[success]:focus-visible) .control{border-color:var(--goto-surface-color-success-default);box-shadow:0 0 0 .125rem #00cc853d}:host(:not([disabled])[error]) .control,:host(:not([disabled])[error]) .control:hover{border-color:var(--goto-surface-color-danger-default)!important}:host(:not([disabled])[error]) .selected-value{padding-right:var(--goto-spacing-05)}:host(:not([disabled])[error]) .state-icon{--goto-icon-color:var(--goto-icon-color-danger)}:host(:not([disabled])[error]:focus-visible) .control{border-color:var(--goto-surface-color-danger-default);box-shadow:0 0 0 .125rem #fd4c6f3d}:host([inline]){--chameleon-select-height:var(--goto-spacing-05);width:auto;min-width:auto;display:inline-flex}:host([inline]) .label{margin-bottom:var(--goto-spacing-00)}:host([inline]) .control,:host([inline]) .listbox{font:var(--goto-caption-medium)}:host([inline]) .control{border:1px solid var(--goto-border-color-default);color:var(--goto-type-color-default);padding:var(--goto-spacing-00)8px;border-radius:var(--goto-radius-circle);width:auto}:host([inline]) .indicator{margin:var(--goto-spacing-00)-6px var(--goto-spacing-00)6px;align-items:center;display:inline-flex}:host([inline]) .listbox{width:max-content;max-width:250px;height:max-content;left:unset;right:var(--goto-spacing-00)}:host([inline]) [variant=caption-medium]{display:none}:host([fit-content]:not([label])) .listbox,:host([inline]:not([label])) .listbox{left:var(--goto-spacing-00)}:host([inline]:hover) .control{background-color:var(--goto-interactive-color-secondary-hover)}:host([inline]:active) .control{border-radius:var(--goto-radius-circle);background-color:var(--goto-interactive-color-secondary-pressed)}:host([inline][error]) .selected-value,:host([inline][success]) .selected-value{padding-right:var(--goto-spacing-00)}:host([inline]:focus-visible) .control{outline-offset:1px;outline:1px solid #000}:host(:focus-visible){box-shadow:none}:host(:not([multiple],[size]):focus-visible) ::slotted([aria-selected=true][role=option]:not([disabled])){box-shadow:none;border-color:var(--goto-interactive-color-primary-default);background-color:var(--goto-surface-color-secondary);color:var(--goto-type-color-default)}:host(:not([disabled])[open]) .control{background-color:var(--goto-interactive-color-secondary-pressed);color:var(--goto-type-color-default)}:host([disabled]) .control,:host([disabled]:hover) .control{background-color:var(--goto-surface-color-default);color:var(--goto-type-color-disabled)}:host([inline][disabled]) .control,:host([inline][disabled]:hover) .control{background-color:var(--goto-interactive-color-secondary-hover)}:host([fullwidth]),:host([fullwidth]) .control{width:100%}:host([no-border]),:host([no-border]) .control{border:var(--goto-spacing-00)}:host([fit-content]),:host([fit-content]) .control{width:fit-content}:host([fit-content]){width:auto;min-width:auto;display:inline-flex}:host([fit-content]) .label{margin-bottom:var(--goto-spacing-00)}:host([fit-content]) .control{width:auto}:host([fit-content]) .listbox{width:max-content;max-width:320px;left:unset;right:var(--goto-spacing-00)}:host(:not([size]):not([multiple]):not([open]):focus-visible),:host([multiple]:focus-visible),:host([size]:focus-visible){box-shadow:none}';const $m={baseName:"select",template:(e,t)=>
2352ri`
2353    <template
2354        class="${e=>[e.collapsible&&"collapsible",e.collapsible&&e.open&&"open",e.disabled&&"disabled",e.collapsible&&e.position].filter(Boolean).join(" ")}"
2355        aria-activedescendant="${e=>e.ariaActiveDescendant}"
2356        aria-controls="${e=>e.ariaControls}"
2357        aria-disabled="${e=>e.ariaDisabled}"
2358        aria-expanded="${e=>e.ariaExpanded}"
2359        aria-haspopup="${e=>e.collapsible?"listbox":null}"
2360        aria-multiselectable="${e=>e.ariaMultiSelectable}"
2361        aria-label="${e=>e.ariaLabel||e.label||null}"
2362        ?open="${e=>e.open}"
2363        role="combobox"
2364        tabindex="${e=>e.disabled?null:"0"}"
2365        @click="${(e,t)=>e.clickHandler(t.event)}"
2366        @focusin="${(e,t)=>e.focusinHandler(t.event)}"
2367        @focusout="${(e,t)=>e.focusoutHandler(t.event)}"
2368        @keydown="${(e,t)=>e.keydownHandler(t.event)}"
2369        @mousedown="${(e,t)=>e.mousedownHandler(t.event)}"
2370    >
2371        ${Aa(e=>e.label,ri`
2372            <${u(Hl)} ${li("labelElement")} @click="${(e,t)=>e.handleTextClick(t.event)}" variant="button-small" color="${e=>e.labelColor}" class="label">
2373                ${e=>e.label}
2374            </${u(Hl)}>
2375          `)}
2376        ${Aa(e=>e.collapsible,ri`
2377                <div
2378                    class="control"
2379                    part="control"
2380                    ?disabled="${e=>e.disabled}"
2381                    ${li("control")}
2382                >
2383                    ${pi(0,t)}
2384                    <slot name="button-container">
2385                        <div class="selected-value" part="selected-value">
2386                            <slot name="selected-value">${e=>e.displayValue}</slot>
2387                        </div>                        
2388                        ${Aa(e=>!e.inline&&e.error,ri`
2389                            <${u(mr)} class="state-icon">
2390                                ${Cl}
2391                            </${u(mr)}>
2392                          `)}
2393                        ${Aa(e=>!e.inline&&!e.error&&e.success,ri`
2394                            <${u(mr)} class="state-icon">
2395                                ${kl}
2396                            </${u(mr)}>
2397                          `)}
2398                        <div aria-hidden="true" class="indicator" part="indicator">
2399                            <slot name="indicator">
2400                                <${u(mr)}>
2401                                    ${ci}
2402                                </${u(mr)}>
2403                            </slot>
2404                        </div>
2405                    </slot>
2406                    ${hi(0,t)}
2407                </div>
2408            `)}
2409        <div
2410            class="listbox"
2411            id="${e=>e.listboxId}"
2412            part="listbox"
2413            role="listbox"
2414            ?disabled="${e=>e.disabled}"
2415            ?hidden="${e=>!!e.collapsible&&!e.open}"
2416            ${li("listbox")}
2417        >
2418            <slot
2419                ${si({filter:e=>e.nodeType===Node.ELEMENT_NODE&&hf.slottedOptionFilter(e),flatten:!0,property:"slottedOptions"})}
2420            ></slot>
2421        </div>
2422        ${Aa(e=>e.helperText&&!e.inline&&!e.fitContent,ri`
2423            <${u(Hl)} ${li("helperTextElement")} @click="${(e,t)=>e.handleTextClick(t.event)}" variant="caption-medium" color="${e=>e.helperTextColor}" class="helper-text">
2424                ${e=>e.helperText}
2425            </${u(Hl)}>
2426          `)}
2427    </template>
2428`,styles:(e,t)=>ml`
2429    ${':host([hidden]){display:none}:host{--elevation:14;background:var(--neutral-fill-input-rest);border-radius:calc(var(--control-corner-radius,4)*1px);border:calc(var(--stroke-width,1)*1px)solid var(--accent-fill-rest);box-sizing:border-box;color:var(--neutral-foreground-rest);font-family:var(--body-font,aktiv-grotesk,"Segoe UI",Arial,Helvetica,sans-serif);height:calc((var(--base-height-multiplier,10) + var(--densitity,0))*var(--design-unit,4)*1px);user-select:none;vertical-align:top;outline:none;min-width:250px;display:inline-flex;position:relative}:host(:not([aria-haspopup])){--elevation:0;border:0;min-width:0;height:auto}:host .listbox{background:var(--fill-color);border:calc(var(--stroke-width,1)*1px)solid var(--neutral-stroke-rest);border-radius:calc(var(--control-corner-radius,4)*1px);box-sizing:border-box;padding:calc(var(--design-unit,4)*1px)0;flex-direction:column}.listbox{max-height:calc((var(--size)*(var(--base-height-multiplier,10) + var(--densitity,0))*var(--design-unit,4) + var(--design-unit,4)*var(--stroke-width,1)*2)*1px);overflow-y:auto}:host([size="0"]) .listbox{max-height:none}:host .listbox{box-shadow:0 0 calc(var(--elevation)*.225px + 2px)rgba(0,0,0,calc(.11*(2 - var(--background-luminance,1)))),0 calc(var(--elevation)*.4px)calc(var(--elevation)*.9px)rgba(0,0,0,calc(.13*(2 - var(--background-luminance,1))));z-index:1;border:none;width:100%;display:flex;position:absolute;left:0}.control+.listbox{--stroke-size:calc(var(--design-unit,4)*var(--stroke-width,1)*2);max-height:calc((var(--listbox-max-height)*(var(--base-height-multiplier,10) + var(--densitity,0))*var(--design-unit,4) + var(--stroke-size))*1px)}:host(:not([aria-haspopup])) .listbox{z-index:auto;position:static;left:auto}.listbox[hidden]{display:none}.control{box-sizing:border-box;cursor:pointer;font-size:var(--type-ramp-base-font-size,14px);font-family:inherit;line-height:var(--type-ramp-base-line-height,20px);min-height:100%;padding:0 calc(var(--design-unit,4)*2.25px);align-items:center;width:100%;display:flex}:host(:not([disabled]):hover){background:var(--neutral-fill-input-hover);border-color:var(--accent-fill-hover)}:host(:focus-visible){border-color:var(--focus-stroke-outer)}:host(:not([size]):not([multiple]):not([open]):focus-visible),:host([multiple]:focus-visible),:host([size]:focus-visible){box-shadow:0 0 0 calc(var(--focus-stroke-width,2)*1px)var(--focus-stroke-outer)}:host(:not([multiple]):not([size]):focus-visible) ::slotted(chameleon-option[aria-selected=true]:not([disabled])){box-shadow:0 0 0 calc(var(--focus-stroke-width,2)*1px)inset var(--focus-stroke-inner);border-color:var(--focus-stroke-outer);background:var(--accent-fill-focus);color:var(--foreground-on-accent-focus)}:host([disabled]){cursor:not-allowed;opacity:var(--disabled-opacity,.3)}:host([disabled]) .control{cursor:not-allowed;user-select:none}:host([disabled]:hover){background:var(--neutral-fill-stealth-rest);color:var(--neutral-foreground-rest);fill:currentColor}:host(:not([disabled])) .control:active{background:var(--neutral-fill-input-active);border-color:var(--accent-fill-active);border-radius:calc(var(--control-corner-radius,4)*1px)}:host([open][position=above]) .listbox{bottom:calc((var(--base-height-multiplier,10) + var(--densitity,0))*var(--design-unit,4)*1px);border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}:host([open][position=below]) .listbox{top:calc((var(--base-height-multiplier,10) + var(--densitity,0))*var(--design-unit,4)*1px);border-top:0;border-top-left-radius:0;border-top-right-radius:0}.selected-value{min-width:calc(var(--listbox-scroll-width,0) - var(--design-unit,4)*4*1px);text-align:start;text-overflow:ellipsis;white-space:nowrap;flex:auto;font-family:inherit;overflow:hidden}.indicator{flex:none;margin-inline-start:1em}slot[name=listbox]{width:100%;display:none}:host([open]) slot[name=listbox]{box-shadow:0 0 calc(var(--elevation)*.225px + 2px)rgba(0,0,0,calc(.11*(2 - var(--background-luminance,1)))),0 calc(var(--elevation)*.4px)calc(var(--elevation)*.9px)rgba(0,0,0,calc(.13*(2 - var(--background-luminance,1))));
2429display:flex;position:absolute}.end{margin-inline-start:auto}.start,.end,.indicator,.select-indicator,::slotted(svg){fill:currentColor;height:1em;min-height:calc(var(--design-unit,4)*4px);min-width:calc(var(--design-unit,4)*4px);width:1em}::slotted([role=option]),::slotted(option){flex:none}'}
2430    ${Lm}
2431  `},Nm=Om.compose($m),Rm={baseName:"option",template:xf,styles:(e,t)=>ml`
2432    ${':host([hidden]){display:none}:host{font-family:var(--body-font,aktiv-grotesk,"Segoe UI",Arial,Helvetica,sans-serif);border-radius:calc(var(--control-corner-radius,4)*1px);border:calc(var(--focus-stroke-width,2)*1px)solid transparent;box-sizing:border-box;background:var(--neutral-fill-stealth-rest);color:var(--neutral-foreground-rest);cursor:pointer;fill:currentColor;font-size:var(--type-ramp-base-font-size,14px);height:calc((var(--base-height-multiplier,10) + var(--densitity,0))*var(--design-unit,4)*1px);line-height:var(--type-ramp-base-line-height,20px);margin:0 calc((var(--design-unit,4) - var(--focus-stroke-width,2))*1px);user-select:none;white-space:nowrap;outline:none;flex:none;align-items:center;padding:0 1ch;display:inline-flex;overflow:hidden}:host(:not([disabled]):not([aria-selected=true]):hover){background:var(--neutral-fill-stealth-hover)}:host(:not([disabled]):not([aria-selected=true]):active){background:var(--neutral-fill-stealth-active)}:host([aria-selected=true]){background:var(--accent-fill-rest);color:var(--foreground-on-accent-rest)}:host(:not([disabled])[aria-selected=true]:hover){background:var(--accent-fill-hover);color:var(--foreground-on-accent-hover)}:host(:not([disabled])[aria-selected=true]:active){background:var(--accent-fill-active);color:var(--foreground-on-accent-active)}:host([disabled]){cursor:not-allowed;opacity:var(--disabled-opacity,.3)}.content{text-overflow:ellipsis;grid-column-start:2;justify-self:start;overflow:hidden}.start,.end,::slotted(svg){display:flex}::slotted(svg){height:calc(var(--design-unit,4)*4px);width:calc(var(--design-unit,4)*4px)}::slotted([slot=end]){margin-inline-start:1ch}::slotted([slot=start]){margin-inline-end:1ch}:host([aria-checked=true][aria-selected=false]){border-color:var(--focus-stroke-outer)}:host([aria-checked=true][aria-selected=true]){border-color:var(--focus-stroke-outer);box-shadow:0 0 0 calc(var(--focus-stroke-width,2)*2*1px)inset var(--focus-stroke-inner)}:host{--goto-icon-color:var(--goto-interactive-color-primary-default);color:var(--goto-type-color-default);padding-left:var(--goto-spacing-00);border-radius:var(--goto-radius-none);margin:var(--goto-spacing-00);background:var(--goto-surface-color-default);height:var(--chameleon-select-height);font:inherit;border:none;padding-right:18px}:host .start{box-sizing:border-box;margin-right:12px;display:block}:host .content{margin-left:var(--goto-spacing-04);flex-grow:1}:host .start+.content{margin-left:var(--goto-spacing-00)}:host ::slotted([slot=start]){margin-inline-end:var(--goto-spacing-00);margin-left:var(--goto-spacing-04)}:host ::slotted(chameleon-svg[slot=start]){margin-inline-end:var(--goto-spacing-00);margin-left:12px}:host ::slotted([slot=end]){margin-inline-start:var(--goto-spacing-00)}:host(.skeleton-option) .content{align-items:center;display:flex}:host(:not([disabled])[aria-selected=true]:hover){color:var(--goto-type-color-default);background:var(--goto-interactive-color-secondary-hover)!important}:host(:not([disabled]):not([aria-selected=true]):hover){background:var(--goto-interactive-color-secondary-hover);color:var(--goto-type-color-default)}:host([disabled]),:host([disabled]:hover){--goto-icon-color:var(--goto-icon-color-disabled);opacity:1;color:var(--goto-type-color-disabled)}:host([aria-selected=true]){--goto-icon-color:var(--goto-icon-color-default);background:var(--goto-interactive-color-secondary-hover)!important;color:var(--goto-type-color-default)!important}:host(.skeleton-option:hover){background:var(--goto-surface-color-default)!important}:host(.listbox-start-option) .content{margin-left:var(--goto-spacing-02)}'}
2433  `},Pm=Tm.compose(Rm);!function(e){Gl({prefix:e}),vr({prefix:e}),To({prefix:e,node:void 0},Pm,Nm)}();class Dm extends(s(Jn)){get closeButtonId(){return`${this.uniqueId}-close-button`}constructor(){super(),this.closesOnClickOutside=!1,this.heading="",this.closeLabel=void 0,this.backLabel=void 0,this.isOpen=!1,this.contentScrollable=!1,this.footerSlot=[],this.toolbarSlot=[],this.uniqueId=xa("side-panel-"),this.open=!1,this.returnFocusEl=null,this.observerCallback=yh(e=>{let t=!1;
2433e.forEach(e=>{e.target.scrollHeight>Math.ceil(e.contentRect.height)&&(t=!0)}),this.contentScrollable=t},100),this.onOutsideClick=e=>{!this.isOpen||e.defaultPrevented||e.composedPath().some(e=>e===this)||(this.clickOutside(),this.closesOnClickOutside&&(this.close(),e.stopPropagation()))},this.onTransitionEnd=()=>{"false"!==this.getAttribute("aria-hidden")||this.open?"true"===this.getAttribute("aria-hidden")&&(this.open=!1,"true"===this.ariaModal&&this.focusTrap?.deactivate()):(this.open=!0,"true"===this.ariaModal?(this.ensureFocusTrap(),this.focusTrap?.activate()):this.focus())},this.onHandleEscKey=e=>{"Escape"===e.key&&this.isOpen&&!e.defaultPrevented&&this.close()},this.observer=new ResizeObserver(this.observerCallback)}connectedCallback(){super.connectedCallback(),window.addEventListener("click",this.onOutsideClick,{capture:!0}),document.addEventListener("keydown",this.onHandleEscKey),this.addEventListener("transitionend",this.onTransitionEnd),this.observer.observe(this.body),this.isOpen&&(this.returnFocusEl=document.activeElement)}disconnectedCallback(){window.removeEventListener("click",this.onOutsideClick),document.removeEventListener("keydown",this.onHandleEscKey),this.removeEventListener("transitionend",this.onTransitionEnd),this.observer.disconnect(),this.focusTrap?.deactivate({returnFocus:!1})}isOpenChanged(e,t){this.$fastController.isConnected&&t!==e&&(t?(this.returnFocusEl=document.activeElement,this.$emit("opening",null,{bubbles:!1})):this.$emit("closing",null,{bubbles:!1}),this.scheduleTransitionFallback())}ensureFocusTrap(){this.focusTrap||(this.focusTrap=sl(this,{allowOutsideClick:!0,escapeDeactivates:!1,setReturnFocus:()=>this.returnFocusEl??document.body,fallbackFocus:this,tabbableOptions:{getShadowRoot:!0}}))}scheduleTransitionFallback(){Tr.queueUpdate(()=>{if(!this.isConnected)return;const e=(getComputedStyle(this).transitionDuration||"0s").split(",").some(e=>parseFloat(e)>0);e||this.onTransitionEnd()})}clickOutside(){this.$emit("click-outside",null,{bubbles:!1})}close(){this.$emit("close",null,{bubbles:!1})}back(){this.$emit("back",null,{bubbles:!1})}}h([Qr({mode:"boolean",attribute:"closes-on-click-outside"})],Dm.prototype,"closesOnClickOutside",void 0),h([Qr],Dm.prototype,"heading",void 0),h([Qr({attribute:"close-label"})],Dm.prototype,"closeLabel",void 0),h([Qr({attribute:"back-label"})],Dm.prototype,"backLabel",void 0),h([Qr({mode:"boolean",attribute:"is-open"})],Dm.prototype,"isOpen",void 0),h([Qr({attribute:"data-content-scrollable"})],Dm.prototype,"contentScrollable",void 0),h([Nr],Dm.prototype,"footerSlot",void 0),h([Nr],Dm.prototype,"toolbarSlot",void 0),h([Qr],Dm.prototype,"uniqueId",void 0);const Mm={baseName:"side-panel",template:(e,t)=>
2433{const r=u(Wi),n=u(mr),o=u(Hl),i=u(Ca);return ri`<template
2434   id="${e=>e.uniqueId}"
2435   role="${e=>"true"===e.ariaModal?"dialog":"region"}"
2436   aria-modal="${e=>"true"===e.ariaModal?"true":null}"
2437   aria-hidden="${e=>e.isOpen?"false":"true"}"
2438   aria-label="${e=>e.heading}"
2439   tabindex="-1"
2440 >
2441  <div class="header" part="header">
2442    ${Aa(e=>e.toolbarSlot,ri`<slot name="toolbar" ${si("toolbarSlot")}></slot>`)}
2443    <div class="heading">
2444      ${Aa(e=>e.backLabel,ri`<${r}
2445          variant="${"primary"}"
2446          size="large"
2447          label="${e=>e.backLabel}"
2448          @click=${e=>e.back()}
2449          part="back-button"
2450        >
2451          <${n}>${'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.2929 3.29289L11.7071 4.70711L5.41421 11H22V13H5.41421L11.7071 19.2929L10.2929 20.7071L1.58578 12L10.2929 3.29289Z" fill="currentColor"></path></svg>'}</${n}>
2452        </${r}>`)}
2453      <slot name="heading-start"></slot>
2454      <slot name="heading">
2455        <${o} variant="heading-small">${e=>e.heading}</${o}>
2456      </slot>
2457      ${Aa(e=>e.closeLabel,ri`
2458          <div class="spacer"></div>
2459
2460          <slot name="heading-end"></slot>
2461          <${r}
2462            variant="${"primary"}"
2463            size="large"
2464            label="${e=>e.closeLabel}"
2465            @click=${e=>e.close()}
2466            part="close-button"
2467            id="${e=>e.closeButtonId}"
2468          >
2469            <${n}>${Sl}</${n}>
2470          </${r}>
2471          <${i} trigger-id="${e=>e.closeButtonId}" position="bottom-center"
2472            >${e=>e.closeLabel}</${i}
2473          >
2474        `)}
2475    </div>
2476  </div>
2477  <div class="body" ${li("body")}>
2478    <slot></slot>
2479  </div>
2480
2481  ${Aa(e=>e.footerSlot,ri`<div class="footer">
2482      <slot name="footer" ${si("footerSlot")}></slot>
2483    </div>`)}
2484    
2485  </div>
2486</template>`},styles:Ci(":host{width:360px;font:var(--goto-body-small);background-color:var(--goto-surface-color-default);height:100%;top:var(--goto-spacing-00);right:var(--goto-spacing-00);opacity:0;transition-duration:var(--goto-duration-modest-02);border-left:1px solid var(--goto-border-color-default);z-index:var(--goto-z-index-sticky);flex-direction:column;display:flex;position:fixed;overflow:hidden;transform:translate(100%)}:host .header{background-color:var(--goto-surface-color-default);border-bottom:1px solid var(--goto-surface-color-default)}:host .header .heading{padding:var(--goto-spacing-03);gap:var(--goto-spacing-02);flex-direction:row;align-items:center;display:flex}:host .header .spacer{flex:1}:host .body{padding:var(--goto-side-panel-body-margin,var(--goto-spacing-04));flex-direction:column;flex:1;display:flex;overflow-y:auto}:host .footer{background-color:var(--goto-surface-color-default);border-top:1px solid var(--goto-surface-color-default);flex-direction:column;display:flex}:host([data-content-scrollable]) .header{border-bottom-color:var(--goto-border-color-default)}:host([data-content-scrollable]) .footer{border-top-color:var(--goto-border-color-default)}:host([aria-hidden=false]){opacity:1;transition-timing-function:var(--goto-entrance-easing);transform:translate(0)}:host(:not([aria-hidden=false])){transition-timing-function:var(--goto-exit-easing)}")},zm=Dm.compose(Mm),Fm=ri`<template
2487  data-orientation="${e=>e.orientation}"
2488  id="${e=>e.uniqueId}"
2489>
2490  <slot ${si("defaultSlot")}></slot>
2491</template>`;class Um extends(s(Jn)){constructor(){super(...arguments),this.uniqueId=xa("side-panel-actions-"),this.orientation="vertical",this.defaultSlot=[]}defaultSlotChanged(){this.defaultSlot.length>3?this.orientation="vertical":3===this.defaultSlot.length&&"horizontal"===this.orientation&&(this.orientation="mixed")}connectedCallback(){super.connectedCallback()}}h([Qr],Um.prototype,"uniqueId",void 0),h([Qr],Um.prototype,"orientation",void 0),h([Nr],Um.prototype,"defaultSlot",void 0);const Bm={baseName:"side-panel-actions",template:Fm,styles:Ci(":host{gap:var(--goto-spacing-03);padding:var(--goto-spacing-03);display:flex}:host([data-orientation=vertical]){flex-direction:column}:host([data-orientation=horizontal]){flex-direction:row}:host([data-orientation=mixed]){flex-wrap:wrap}:host([data-orientation=mixed]) ::slotted(:first-child){flex-basis:100%}:host([data-orientation=mixed]) ::slotted(:not(:first-child)){flex:1}")},Hm=Um.compose(Bm);!function(e,t){vr({prefix:e}),fl({prefix:e}),Gl({prefix:e}),yl(e,t),gl({prefix:e}),To({prefix:e,node:t},Hm,zm)}();
2491class jm extends Zt{constructor(){super(...arguments),this.variant="square",this.width=null}computedWidth(){const e=this.width??"100%";return this.width&&Number.isInteger(Number(this.width))?`${this.width}px`:String(e)}render(){return"rectangle"===this.variant?this.style.width=this.computedWidth():this.style.width="",oe``}}function Vm(e={}){d(jm,e)}jm.baseName="skeleton",jm.styles=b(':host{background-color:var(--goto-interactive-color-disabled);height:var(--goto-skeleton-size,1.875rem);display:inline-flex;position:relative;overflow:hidden}:host:after{animation:skeleton-wave var(--goto-duration-sluggish)var(--goto-standard-easing).5s infinite;background:linear-gradient(90deg,var(--goto-gradient-color-skeleton));content:"";width:100%;position:absolute;inset:0}@keyframes skeleton-wave{0%{transform:translate(-100%)}to{transform:translate(100%)}}:host([size=xxsmall]){--goto-skeleton-size:1.125rem}:host([size=xsmall]){--goto-skeleton-size:var(--goto-spacing-05)}:host([size=small]){--goto-skeleton-size:var(--goto-spacing-06)}:host([size=large]){--goto-skeleton-size:2.25rem}:host([size=xlarge]){--goto-skeleton-size:var(--goto-spacing-09)}:host([size=xxlarge]){--goto-skeleton-size:var(--goto-spacing-11)}:host([size=xxxlarge]){--goto-skeleton-size:5rem}:host([variant=square]),:host([variant=rectangle]){border-radius:var(--goto-radius-small)}:host([variant=square]),:host([variant=circle]){width:var(--goto-skeleton-size,1.875rem)}:host([variant=circle]){border-radius:50%}:host([variant=rectangle]){min-width:var(--goto-skeleton-size,1.875rem)}'),h([Te({reflect:!0})],jm.prototype,"variant",void 0),h([Te({reflect:!0})],jm.prototype,"size",void 0),h([Te()],jm.prototype,"width",void 0),Vm();class Wm extends Zt{constructor(){super(...arguments),this.variant="info"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","status")}render(){const e=Oi(u(mr));return oe`
2492      <div class="content-container">
2493        ${Zu("success"===this.variant,()=>Ni`<${e} class="snackbar-icon">${'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M10 17.4142L17.7071 9.70711L16.2929 8.29289L10 14.5858L7.70711 12.2929L6.29289 13.7071L10 17.4142Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12ZM20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12Z" fill="currentColor"></path></svg>'}</${e}>`)}
2494        ${Zu("error"===this.variant,()=>Ni`<${e} class="snackbar-icon">${nm}</${e}>`)}
2495        ${Zu("success"!==this.variant&&"error"!==this.variant,()=>oe`<slot name="icon" class="snackbar-icon"></slot>`)}
2496        <div class="message">
2497          <slot name="title"></slot>
2498          <slot name="message"></slot>
2499          ${Zu("success"!==this.variant&&"error"!==this.variant,()=>oe`<slot name="progress"></slot>`)}
2500        </div>
2501      </div>
2502      <div class="actions">
2503        <slot name="action"></slot>
2504      </div>
2505    `}}Wm.baseName="snackbar",Wm.styles=b(":host{background-color:var(--goto-surface-color-inverted);box-sizing:border-box;min-height:var(--goto-spacing-08);border-radius:var(--goto-radius-small);min-width:14.375rem;max-width:25rem;box-shadow:var(--goto-elevation-medium);color:var(--goto-type-color-inverted);padding:var(--goto-spacing-02)var(--goto-spacing-04);justify-content:space-between;display:inline-flex}:host ::slotted([slot=action]){gap:var(--goto-spacing-02);margin-left:var(--goto-spacing-02);align-items:center;display:flex}:host ::slotted([slot=progress]){margin-top:var(--goto-spacing-02)}:host .actions{justify-content:flex-end;display:flex}:host .message{width:100%;margin-right:var(--goto-spacing-02);flex-direction:column;display:flex}:host .message ::slotted([slot=title]){margin:var(--goto-spacing-00);font:var(--goto-body-small)}:host .message ::slotted([slot=message]){margin:var(--goto-spacing-00);font:var(--goto-caption-medium)}:host([stacked]){flex-direction:column}:host([stacked]) .actions{padding-top:var(--goto-spacing-04)}:host([centered]){align-items:center;gap:var(--goto-spacing-00)}:host([centered]) .message{align-items:center}.snackbar-icon{--goto-icon-color:var(--goto-icon-color-inverted);--goto-icon-size:24px;height:var(--goto-icon-size);width:var(--goto-icon-size)}.content-container{gap:var(--goto-spacing-02);flex:1;display:flex}:host([variant=success]){background-color:var(--goto-surface-color-success-default)}:host([variant=error]){background-color:var(--goto-surface-color-danger-default)}"),h([Te({type:Boolean,reflect:!0})],Wm.prototype,"stacked",void 0),h([Te({type:Boolean,reflect:!0})],Wm.prototype,"centered",void 0),h([Te({reflect:!0})],Wm.prototype,"variant",void 0),function(e={}){vr(e),d(Wm,e)}();class Km extends Hi{constructor(){super(),this.size="medium",this.variant="primary",this.fullWidth=!1,this.isLoading=!1,this.loadingDisablesMenu=!0,this.popoverWidth=void 0,this.popoverZIndex=void 0,this.popoverChangeHandler=e=>{this.dispatchEvent(new CustomEvent("popoverchange",{detail:e.detail,bubbles:!1}))},this.clickHandler=e=>{const t=this.mainButtonElement;t&&e.composedPath().includes(t)||e.stopImmediatePropagation()},new ji(this)}get mainButtonElement(){return this.mainButton?.shadowRoot?.querySelector("button")}get menuButtonElement(){return this.menuButton?.shadowRoot?.querySelector("button")}connectedCallback(){super.connectedCallback(),this.popoverElement?.addEventListener("popoverchange",this.popoverChangeHandler)}disconnectedCallback(){super.disconnectedCallback(),this.popoverElement?.removeEventListener("popoverchange",this.popoverChangeHandler)}willUpdate(e){e.has("variant")&&this.handleFallback(),e.has("position")}handleFallback(){const{guardedValue:e}=Fi({"brand-primary":"primary","neutral-secondary":"secondary","danger-primary":"danger","inverted-primary":"primary"},{forMissing:this.variant,forRemoved:"secondary",message:Fi.defaultMessageFnForVariants("[Chameleon SplitButton]")}),t=e(this.variant);this.variant=t.value,null!==t.message&&console.warn(t.message)}updated(e){super.updated(e),(e.has("label")||e.has("labelId"))&&this.setMainLabel(),e.has("menuLabel")&&this.setMenuLabel()}validateMainLabel(){this.mainButtonElement?.getAttribute("aria-label")?.length||this.getAttribute("aria-labelledby")?.length||console.error("CHAMELEON-A11Y: Split Button component must have an accessible label for the main button provided by either\n  1) text content\n  2) a visible label whose id is given as the attribute labelId\n  3) a non-empty label attribute to be used as aria-label.")}validateMenuLabel(){(!this.menuLabel||this.menuLabel&&!this.menuButtonElement?.getAttribute("aria-label")?.length)&&console.error("CHAMELEON-A11Y: Split Button component must have an accessible label for the chevron button provided by a non-empty menuLabel/menu-label attribute to be used as aria-label.")}async setMainLabel(){await this.updateComplete,this.labelId?this.setAttribute("aria-labelledby",this.labelId):this.label&&this.mainButtonElement?.setAttribute("aria-label",this.label)}async setMenuLabel(){await this.updateComplete;const e=this.menuButtonElement;e&&this.menuLabel&&e.setAttribute("aria-label",this.menuLabel)}render(){const e=Oi(u(jl)),t=Oi(u(mr)),r=Oi(u(ll));return Ni`
2506      <div class="container" @click=${this.clickHandler}>
2507        <${e}
2508          id="main-button"
2509          part="button"
2510          variant="${this.variant}"
2511          size="${this.size}"
2512          ?disabled=${this.disabled||this.isLoading}
2513          ?full-width=${this.fullWidth}
2514          ?is-loading="${this.isLoading}"
2515        >
2516          <slot name="leading-icon" slot="leading-icon" part="leading-icon">
2517            <slot name="start"></slot>
2518          </slot>
2519          <slot></slot>
2520        </${e}>
2521        <${e}
2522          id="menu-button"
2523          part="menu-button"
2524          variant="${this.variant}"
2525          size="${this.size}"
2526          ?disabled=${this.disabled||this.loadingDisablesMenu&&this.isLoading}
2527        >
2528          <${t}>${Mi(ci)}</${t}>
2529        </${e}>
2530        <${r}
2531          part="popover"
2532          label="popover"
2533          trigger-id="${this.disabled||this.loadingDisablesMenu&&this.isLoading?le:"menu-button"}"
2534          ?menu=${!0}
2535          position="${"bottom-end"}"
2536          z-index="${this.popoverZIndex??le}"
2537          width="${this.popoverWidth??le}"
2538          ?disable-focus-trap="${this.disableFocusTrap}"
2539        >
2540          <slot name="actions"></slot>
2541        </${r}>
2542      </div>
2543    `}}Km.baseName="split-button",Km.styles=b(":host{display:inline-flex}:host .container{gap:1px;display:inline-flex}:host #main-button::part(control){border-bottom-right-radius:var(--goto-radius-none);border-top-right-radius:var(--goto-radius-none);border:2px solid #0000}:host #main-button::part(control):focus-visible{border-right:none;margin-right:2px}:host #menu-button::part(control){border-bottom-left-radius:var(--goto-radius-none);border-top-left-radius:var(--goto-radius-none);border:2px solid #0000}:host #menu-button::part(control):focus-visible{border-left:none;margin-left:2px}:host([size=xlarge]) #main-button::part(control){padding:var(--goto-spacing-03)var(--goto-spacing-05)}
2543:host([size=xlarge]) #menu-button::part(control){height:var(--goto-spacing-09);width:var(--goto-spacing-09);padding:var(--goto-spacing-03);--goto-icon-size:var(--goto-spacing-06)}:host([size=xlarge]) #menu-button::part(control):focus-visible{width:calc(var(--goto-spacing-09) - 2px)}:host([size=large]) #main-button::part(control){padding:var(--goto-spacing-02)var(--goto-spacing-04)}:host([size=large]) #menu-button::part(control){height:var(--goto-spacing-08);width:var(--goto-spacing-08);padding:var(--goto-spacing-02);--goto-icon-size:var(--goto-spacing-05)}:host([size=large]) #menu-button::part(control):focus-visible{width:calc(var(--goto-spacing-08) - 2px)}:host([size=medium]) #main-button::part(control){padding:var(--goto-spacing-01)var(--goto-spacing-03)}:host([size=medium]) #menu-button::part(control){height:var(--goto-spacing-07);width:var(--goto-spacing-07);padding:var(--goto-spacing-01);--goto-icon-size:var(--goto-spacing-04)}:host([size=medium]) #menu-button::part(control):focus-visible{width:calc(var(--goto-spacing-07) - 2px)}:host([size=small]) #main-button::part(control){padding:calc(var(--goto-spacing-01)/2)var(--goto-spacing-02)}:host([size=small]) #menu-button::part(control){height:var(--goto-spacing-06);width:var(--goto-spacing-06);padding:calc(var(--goto-spacing-01)/2);--goto-icon-size:var(--goto-spacing-04)}:host([size=small]) #menu-button::part(control):focus-visible{width:calc(var(--goto-spacing-06) - 2px)}:host([full-width]),:host([full-width]) .container,:host([full-width]) #main-button{width:100%}:host([disabled]),:host([is-loading]){cursor:not-allowed}:host([variant=secondary]){display:inline-flex}:host([variant=secondary]) .container{gap:1px;display:inline-flex}:host([variant=secondary]) #main-button{outline:1px solid var(--goto-border-color-default);outline-offset:-1px;border-top-right-radius:0;border-bottom-right-radius:0;margin-right:-1px}:host([variant=secondary]) #main-button::part(control){box-shadow:none;margin-right:1px}:host([variant=secondary]) #main-button::part(control):focus-visible{border-right:3px solid #0000;margin-right:0}:host([variant=secondary]) #menu-button{outline:1px solid var(--goto-border-color-default);outline-offset:-1px;border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}:host([variant=secondary]) #menu-button::part(control){box-shadow:none;margin-left:1px}:host([variant=secondary]) #menu-button::part(control):focus-visible{border-left:3px solid #0000;margin-left:0}:host([variant=secondary]):host([size=xlarge]) #menu-button::part(control):focus-visible{width:calc(var(--goto-spacing-09) + 1px)}:host([variant=secondary]):host([size=large]) #menu-button::part(control):focus-visible{width:calc(var(--goto-spacing-08) + 1px)}:host([variant=secondary]):host([size=medium]) #menu-button::part(control):focus-visible{width:calc(var(--goto-spacing-07) + 1px)}:host([variant=secondary]):host([size=small]) #menu-button::part(control):focus-visible{width:calc(var(--goto-spacing-06) + 1px)}"),h([Te({reflect:!0})],Km.prototype,"size",void 0),h([Te({reflect:!0})],Km.prototype,"variant",void 0),h([Te({type:Boolean,reflect:!0,attribute:"full-width"})],Km.prototype,"fullWidth",void 0),h([Te({type:Boolean,reflect:!0,attribute:"is-loading"})],Km.prototype,"isLoading",void 0),h([Te({type:Boolean,reflect:!0,attribute:"loading-disables-menu"})],Km.prototype,"loadingDisablesMenu",void 0),h([Te({reflect:!0})],Km.prototype,"position",void 0),h([Te({attribute:"popover-width"})],Km.prototype,"popoverWidth",void 0),h([Te({type:Number,attribute:"popover-z-index"})],Km.prototype,"popoverZIndex",void 0),h([Te()],Km.prototype,"label",void 0),h([Te({attribute:"label-id"})],Km.prototype,"labelId",void 0),h([Te({attribute:"menu-label"})],Km.prototype,"menuLabel",void 0),h([Te({type:Boolean,reflect:!0,attribute:"disable-focus-trap"})],Km.prototype,"disableFocusTrap",void 0),h([$e("#main-button")],Km.prototype,"mainButton",void 0),h([$e("#menu-button")],Km.prototype,"menuButton",void 0),h([$e('slot[name="actions"]')],Km.prototype,"actionsSlot",void 0),h([$e("chameleon-popover")],Km.prototype,"popoverElement",void 0),function(e={}){vr(e),ql(e),To({prefix:e.prefix,node:e.node},wl),d(Km,e)}(),vr();class qm extends(s($h)){connectedCallback(){super.connectedCallback(),this.setAccessibleLabel()}labelIdChanged(){this.setAccessibleLabel()}setAccessibleLabel(){this.textContent?.length||this.labelId&&this.setAttribute("aria-labelledby",this.labelId)}validateAccessibleLabel(){this.getAttribute("aria-labelledby")?.length||console.error("CHAMELEON-A11Y: Switch component must have an accessible label provided by either \n  1) visible text content \n  2) a visible label referenced by id in the attribute labelId\n")}}h([Qr({attribute:"label-id"})],qm.prototype,"labelId",void 0),h([Nr],qm.prototype,"defaultSlottedNodes",void 0);const Gm={baseName:"switch",template:(e,t)=>
2543ri`
2544    <template
2545        role="switch"
2546        aria-checked="${e=>!!e.checked}"
2547        aria-disabled="${e=>!!e.disabled}"
2548        tabindex="${e=>e.disabled?null:0}"
2549        @keyup="${(e,t)=>e.keyupHandler(t.event)}"
2550        @keydown="${(e,t)=>e.keydownHandler(t.event)}"
2551        @input="${(e,t)=>e.inputHandler(t.event)}"
2552        @click="${(e,t)=>e.clickHandler(t.event)}"
2553        class="${e=>e.checked?"checked":""}"
2554    >
2555        <label
2556            part="label"
2557            class="${e=>e.defaultSlottedNodes?.length?"label":"label label__hidden"}"
2558        >
2559            <slot ${si("defaultSlottedNodes")}></slot>
2560        </label>
2561        <div part="switch" class="switch">
2562            <slot name="switch">${t.switch||""}</slot>
2563        </div>
2564        <span class="status-message" part="status-message">
2565            <span class="checked-message" part="checked-message">
2566                <slot name="checked-message"></slot>
2567            </span>
2568            <span class="unchecked-message" part="unchecked-message">
2569                <slot name="unchecked-message"></slot>
2570            </span>
2571        </span>
2572    </template>
2573`,styles:':host{align-items:center;display:inline-flex;box-sizing:border-box!important}:host .label{font:var(--goto-body-small);color:var(--goto-type-color-default);margin-inline-end:var(--goto-spacing-02)}:host .label__hidden{visibility:hidden;display:none}:host .switch{width:var(--goto-spacing-08);height:var(--goto-spacing-05);background:var(--goto-surface-color-tertiary);box-sizing:border-box;border-radius:var(--goto-radius-large);cursor:pointer;user-select:none;text-align:left;border:1px solid #0000;flex-shrink:0;margin-inline-start:auto;transition:all .25s ease-out;position:relative}@media print{:host .switch{-webkit-print-color-adjust:exact;color-adjust:exact;print-color-adjust:exact}}:host .switch:before{content:"";background:var(--goto-icon-color-inverted);border-radius:var(--goto-radius-circle);box-shadow:var(--goto-elevation-small);width:var(--goto-spacing-04);height:var(--goto-spacing-04);transition:all 70ms cubic-bezier(.4,.14,.3,1);position:absolute;transform:translate(1px,1px)}:host .checked-message,:host .unchecked-message{display:none}:host(:focus),:host(:focus-visible){outline:none}:host(:focus-visible) .switch{border-color:var(--goto-border-color-default);box-shadow:0 0 0 2px var(--goto-focus-color-highlight-default)}:host(.checked) .switch{background:var(--goto-interactive-color-brand-default)}:host(.checked) .switch:before{transform:translate(21px,1px)}:host([disabled]) .label{color:var(--goto-type-color-disabled)}:host([disabled]) .switch{cursor:not-allowed;background:var(--goto-interactive-color-disabled)}:host([disabled]) .switch:before{box-shadow:none;background:var(--goto-icon-color-inverted)}:host([disabled][checked]) .switch{background-color:var(--goto-surface-color-brand-secondary)}'},Zm=qm.compose(Gm);To({prefix:void 0,node:void 0},Zm);class Ym extends Zt{connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","tab"),this.hasAttribute("slot")||this.setAttribute("slot","tab"),this.ariaDisabled=this.disabled?"true":null}updated(e){e.has("disabled")&&(this.ariaDisabled=this.disabled?"true":null)}render(){return oe`<slot name="start"></slot><slot></slot>`}}Ym.baseName="tab",Ym.styles=b(":host([aria-selected=true]){color:var(--goto-type-color-default);font:var(--goto-body-medium-strong);--goto-icon-color:var(--goto-icon-color-default)}:host{cursor:pointer;box-sizing:border-box;border-radius:var(--goto-radius-medium);white-space:normal;color:var(--goto-type-color-secondary);font:var(--goto-body-medium);height:var(--goto-spacing-07);justify-content:center;align-items:center;gap:var(--goto-spacing-01);padding:var(--goto-spacing-01)var(--goto-spacing-03);width:unset;--goto-icon-color:var(--goto-icon-color-secondary);background-color:#0000;display:inline-flex;position:relative;top:1px}:host(:hover){background-color:var(--goto-interactive-color-secondary-hover);color:var(--goto-type-color-default);--goto-icon-color:var(--goto-icon-color-default)}:host(:active){background-color:var(--goto-interactive-color-secondary-pressed);color:var(--goto-type-color-default);--goto-icon-color:var(--goto-icon-color-default)}:host(:focus-visible){outline-offset:2px;outline:var(--goto-focus-color-highlight-default)solid 1px}
2573:host([disabled]){cursor:pointer;box-sizing:border-box;border-radius:var(--goto-radius-small);white-space:normal;color:var(--goto-type-color-disabled);font:var(--goto-body-medium);height:var(--goto-spacing-07);pointer-events:none;--goto-icon-color:var(--goto-icon-color-default);background-color:#0000;border:1px solid #0000;outline:none;width:100%}:host(.vertical){grid-column:2;justify-content:end;min-width:max-content}"),h([Te({type:Boolean,reflect:!0})],Ym.prototype,"disabled",void 0);class Jm extends Zt{connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","tabpanel"),this.hasAttribute("slot")||this.setAttribute("slot","tabpanel")}render(){return oe`<slot></slot>`}}Jm.baseName="tab-panel",Jm.styles=b(":host([hidden]){display:none}:host{display:grid}:host(:not([hidden])){color:var(--goto-type-color-secondary);width:100%;display:block;box-sizing:border-box!important}");class Qm extends Zt{constructor(){super(...arguments),this.orientation="horizontal",this.activeTabIndex=0,this.prevActiveTabIndex=0,this.ticking=!1,this.isInternalActiveidChange=!1,this.tabIds=[],this.tabpanelIds=[],this.wiredTabs=new WeakSet,this.handleTabClick=e=>{const t=e.currentTarget,r=this.getTabElements();1===t.nodeType&&this.isFocusableElement(t)&&(this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=r.indexOf(t),this.setComponent())},this.handleTabKeyDown=e=>{if(this.isHorizontal())switch(e.key){case"ArrowLeft":e.preventDefault(),this.adjustBackward();break;case"ArrowRight":e.preventDefault(),this.adjustForward()}else switch(e.key){case"ArrowUp":e.preventDefault(),this.adjustBackward();break;case"ArrowDown":e.preventDefault(),this.adjustForward()}switch(e.key){case"Home":e.preventDefault(),this.adjust(-this.activeTabIndex);break;case"End":e.preventDefault(),this.adjust(this.getTabElements().length-this.activeTabIndex-1);break;case"Enter":case" ":this.controlled&&(e.preventDefault(),this.setComponent())}},this.adjustForward=()=>{const e=this.getTabElements();let t=this.activetab?e.indexOf(this.activetab)+1:1;for(t===e.length&&(t=0);t<e.length&&e.length>1;){if(this.isFocusableElement(e[t])){this.moveToTabByIndex(e,t);break}if(this.activetab&&t===e.indexOf(this.activetab))break;t+1>=e.length?t=0:t+=1}},this.adjustBackward=()=>{const e=this.getTabElements();let t=this.activetab?e.indexOf(this.activetab)-1:0;for(t=t<0?e.length-1:t;t>=0&&e.length>1;){if(this.isFocusableElement(e[t])){this.moveToTabByIndex(e,t);break}t-1<0?t=e.length-1:t-=1}},this.moveToTabByIndex=(e,t)=>{const r=e[t];this.activetab=r,this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=t,r.focus(),this.controlled||this.setComponent()}}getTabElements(){const e=this.shadowRoot?.querySelector('slot[name="tab"]');return e?.assignedElements()??[]}getTabPanelElements(){const e=this.shadowRoot?.querySelector('slot[name="tabpanel"]');return e?.assignedElements()??[]}render(){return oe`
2574      <slot name="start"></slot>
2575      <div class="tablist" part="tablist" role="tablist" aria-orientation="${this.orientation}">
2576        <slot name="tab" @slotchange=${this.handleTabSlotChange}></slot>
2577        <div
2578          class="activeIndicator"
2579          part="activeIndicator"
2580        ></div>
2581      </div>
2582      <slot name="end"></slot>
2583      <div class="tabpanel" part="tabpanel">
2584        <slot name="tabpanel" @slotchange=${this.handleTabPanelSlotChange}></slot>
2585      </div>
2586    `}connectedCallback(){super.connectedCallback(),this.setAccessibleLabel()}disconnectedCallback(){super.disconnectedCallback(),this.getTabElements().forEach(e=>{e.removeEventListener("click",this.handleTabClick),e.removeEventListener("keydown",this.handleTabKeyDown)}),this.wiredTabs=new WeakSet}firstUpdated(){this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex(),this.setTabs(),this.setTabPanels(),this.prevActiveTabIndex=this.activeTabIndex,this.ticking=!1,this.setIndicatorPosition(this.activeTabIndex),requestAnimationFrame(()=>{this.isConnected&&this.activeid&&(this.activeTabIndex=this.getActiveIndex(),this.prevActiveTabIndex=this.activeTabIndex,this.ticking=!1,this.setIndicatorPosition(this.activeTabIndex))})}updated(e){super.updated(e),e.has("orientation")&&this.handleOrientationChange(),e.has("activeid")&&!this.isInternalActiveidChange&&this.handleExternalActiveidChange(e),(e.has("labelId")||e.has("label"))&&this.setAccessibleLabel()}handleOrientationChange(){this.setTabs(),this.setTabPanels(),this.activeIndicatorRef&&(this.activeIndicatorRef.style.gridColumn="",this.activeIndicatorRef.style.gridRow="",this.activeIndicatorRef.classList.remove("activeIndicatorTransition"),this.setIndicatorPosition(this.activeTabIndex))}handleExternalActiveidChange(e){const t=e.get("activeid"),r=this.getTabElements(),n=this.getTabPanelElements();if(r.length===n.length){const e=r.findIndex(e=>e.id===t);this.prevActiveTabIndex=-1!==e?e:this.activeTabIndex,this.setTabs(),this.setTabPanels(),t?this.handleActiveIndicatorPosition():this.setIndicatorPosition(this.activeTabIndex)}}handleTabSlotChange(){const e=this.getTabElements(),t=this.getTabPanelElements();e.length===t.length&&(this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition()),this.activeid||0===e.length||requestAnimationFrame(()=>{if(!this.isConnected)return;const e=this.getTabElements(),t=e.find(e=>this.isFocusableElement(e)),r=t?e.indexOf(t):0;this.activeid=this.tabIds[r]??e[r]?.id})}handleTabPanelSlotChange(){const e=this.getTabElements();this.getTabPanelElements().length===e.length&&(this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels())}setAccessibleLabel(){return this.labelId?(this.setAttribute("aria-labelledby",this.labelId),void this.removeAttribute("aria-label")):this.label?(this.setAttribute("aria-label",this.label),void this.removeAttribute("aria-labelledby")):void 0}validateControlled(){this.controlled&&console.warn("CHAMELEON-WARNING: Tabs controlled mode is active. Arrow keys will only move focus — users must press Enter or Space to activate a tab. Only use controlled when you need to block tab changes (e.g. unsaved changes guard).")}validateAccessibleLabel(){this.getAttribute("aria-label")?.length||this.getAttribute("aria-labelledby")?.length||console.error("CHAMELEON-A11Y: Tabs component must have an accessible label provided by either\n  1) a visible label whose id is given as the attribute labelId\n  2) a non-empty label attribute to be used as aria-label.\n")}getActiveIndex(){if(void 0!==this.activeid){const e=this.tabIds.indexOf(this.activeid);return-1===e?0:e}return 0}getTabIds(){return this.getTabElements().map(e=>e.getAttribute("id")??`tab-${xa()}`)}getTabPanelIds(){return this.getTabPanelElements().map(e=>e.getAttribute("id")??`panel-${xa()}`)}setTabs(){const e=this.getTabElements(),t="gridColumn",r="gridRow",n=this.isHorizontal()?t:r;this.activeTabIndex=this.getActiveIndex(),e.forEach((e,o)=>{if("tab"===e.slot){const t=this.activeTabIndex===o&&this.isFocusableElement(e),r=this.tabIds[o],n=this.tabpanelIds[o];e.setAttribute("id",r),e.setAttribute("aria-selected",t?"true":"false"),e.setAttribute("aria-controls",n),this.wiredTabs.has(e)||(e.addEventListener("click",this.handleTabClick),e.addEventListener("keydown",this.handleTabKeyDown),this.wiredTabs.add(e)),e.setAttribute("tabindex",t?"0":"-1"),t&&(this.activetab=e)}e.style[t]="",e.style[r]="",e.style[n]=`${o+1}`,this.isHorizontal()?e.classList.remove("vertical"):e.classList.add("vertical")})}
2586setTabPanels(){this.getTabPanelElements().forEach((e,t)=>{const r=this.tabIds[t],n=this.tabpanelIds[t];e.setAttribute("id",n),e.setAttribute("aria-labelledby",r),this.activeTabIndex!==t?e.setAttribute("hidden",""):e.removeAttribute("hidden")})}setComponent(){if(this.activeTabIndex!==this.prevActiveTabIndex){const e=this.getTabElements();if(this.focusTab(),this.controlled){const t=e[this.activeTabIndex];this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,composed:!0})),this.activeTabIndex=this.prevActiveTabIndex}else this.activetab=e[this.activeTabIndex],this.isInternalActiveidChange=!0,this.activeid=this.tabIds[this.activeTabIndex],this.isInternalActiveidChange=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.activetab,bubbles:!0,composed:!0})),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition()}}handleActiveIndicatorPosition(){this.activeTabIndex!==this.prevActiveTabIndex&&(this.ticking?this.ticking=!1:(this.ticking=!0,this.animateActiveIndicator()))}animateActiveIndicator(){this.ticking=!0;const{gridProperty:e,translateProperty:t,offsetProperty:r}=this.getAxisProperties(),n=this.activeIndicatorRef[r];this.activeIndicatorRef.style[e]=`${this.activeTabIndex+1}`;const o=this.activeIndicatorRef[r];this.activeIndicatorRef.style[e]=`${this.prevActiveTabIndex+1}`;const i=o-n;if(0===i)return this.ticking=!1,void this.setIndicatorPosition(this.activeTabIndex);this.activeIndicatorRef.style.transform=`${t}(${i}px)`,this.activeIndicatorRef.classList.add("activeIndicatorTransition"),this.activeIndicatorRef.addEventListener("transitionend",()=>{this.ticking=!1,this.setIndicatorPosition(this.activeTabIndex),this.activeIndicatorRef.classList.remove("activeIndicatorTransition")},{once:!0})}isHorizontal(){return"horizontal"===this.orientation}getAxisProperties(){const e=this.isHorizontal();return{gridProperty:e?"gridColumn":"gridRow",translateProperty:e?"translateX":"translateY",offsetProperty:e?"offsetLeft":"offsetTop"}}setIndicatorPosition(e){if(!this.activeIndicatorRef)return;const{gridProperty:t,translateProperty:r}=this.getAxisProperties();this.activeIndicatorRef.style[t]=`${e+1}`,this.activeIndicatorRef.style.transform=`${r}(0px)`}isFocusableElement(e){return"true"!==e.getAttribute("aria-disabled")&&!e.hasAttribute("hidden")}focusTab(){this.getTabElements()[this.activeTabIndex]?.focus()}adjust(e){const t=this.getTabElements(),r=t.filter(e=>this.isFocusableElement(e)),n=r.indexOf(this.activetab),o=function(e,t,r){return Math.min(Math.max(r,0),t)}(0,r.length-1,n+e),i=t.indexOf(r[o]);i>-1&&this.moveToTabByIndex(t,i)}}Qm.baseName="tabs",Qm.styles=b(":host([hidden]){display:none}:host{box-sizing:border-box;grid-template-rows:auto 1fr;grid-template-columns:auto 1fr auto;display:grid}.tablist{width:max-content;padding:calc(var(--design-unit,4)*4px)calc(var(--design-unit,4)*4px)0;box-sizing:border-box;grid-template-rows:auto auto;grid-template-columns:auto;align-self:end;display:grid;position:relative}.start,.end{align-self:center}.activeIndicator{background:var(--accent-fill-rest);border-radius:calc(var(--control-corner-radius,4)*1px)calc(var(--control-corner-radius,4)*1px)0 0;grid-area:2/1;justify-self:center;width:100%;height:5px;margin-top:10px}.activeIndicatorTransition{transition:transform .2s ease-in-out}.tabpanel{grid-area:2/1/auto/4;position:relative}:host([orientation=vertical]){grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr}:host([orientation=vertical]) .tablist{width:100%;padding:0 calc(var(--design-unit,4)*4px)calc(((var(--base-height-multiplier,10) + var(--densitity,0))*var(--design-unit,4) - var(--design-unit,4))*1px)0;grid-row:2/2;grid-template-rows:auto;grid-template-columns:auto 1fr;place-self:flex-start end;display:grid;position:relative}:host([orientation=vertical]) .tabpanel{grid-area:1/2/4}:host([orientation=vertical]) .end{grid-row:3}:host([orientation=vertical]) .activeIndicator{background:var(--accent-fill-rest);margin-inline-end:10px;border-radius:0 calc(var(--control-corner-radius,4)*1px)calc(var(--control-corner-radius,4)*1px)0;grid-area:1/1;align-self:center;width:5px;height:100%;margin-top:0}:host([orientation=vertical]) .activeIndicatorTransition{transition:transform .2s linear}:host{grid-template-columns:auto minmax(0,1fr) auto;min-height:0}:host .tabpanel{border-top:1px solid var(--goto-border-color-default);min-height:0;overflow:auto}:host .tablist{align-self:inherit}:host .start,:host .end{margin-top:var(--goto-spacing-02)}:host [part=activeIndicator]{background:var(--goto-surface-color-brand-default);height:var(--goto-spacing-01);border-radius:var(--goto-radius-small)var(--goto-radius-small)var(--goto-radius-none)var(--goto-radius-none);margin-top:var(--goto-spacing-00);position:relative;top:1px}:host ::slotted([slot=tabpanel]){padding-top:var(--goto-spacing-02)}:host([no-padding]) .tablist{padding:var(--goto-spacing-00)}:host([orientation=vertical]) [part=activeIndicator]{background:var(--goto-surface-color-brand-default);margin:var(--goto-spacing-00);border-radius:var(--goto-radius-small)var(--goto-radius-none)var(--goto-radius-none)4px;top:var(--goto-spacing-00);width:var(--goto-spacing-01);grid-area:3/3;right:-1px}:host([orientation=vertical]) .tablist{padding:var(--goto-spacing-00);margin:var(--goto-spacing-00)}:host([orientation=vertical]) .tabpanel{border-left:1px solid var(--goto-border-color-default);padding-left:var(--goto-spacing-01);border-top:none}:host([fullwidth]:not([orientation=vertical])) .tablist{grid-column:2;width:100%}"),h([Te({type:Boolean,reflect:!0})],Qm.prototype,"fullwidth",void 0),h([Te({type:Boolean,reflect:!0,attribute:"no-padding"})],Qm.prototype,"noPadding",void 0),h([Te({attribute:"label-id"})],Qm.prototype,"labelId",void 0),h([Te({reflect:!0})],Qm.prototype,"orientation",void 0),h([Te()],Qm.prototype,"label",void 0),h([Te({reflect:!0})],Qm.prototype,"activeid",void 0),h([Te({type:Boolean,reflect:!0})],Qm.prototype,"controlled",void 0),h([$e(".activeIndicator")],Qm.prototype,"activeIndicatorRef",void 0),function(e){!function(e={}){d(Ym,e)}({prefix:e}),function(e={}){d(Jm,e)}({prefix:e}),function(e={}){d(Qm,e)}({prefix:e})}();const Xm=new WeakSet;class ev extends Zt{constructor(){super(...arguments),this.size="medium",this.variant="brand",this.mode="enabled",this.wholeTagFocused=!1,this.pointerFocusPending=!1,this.overlaysAutoOpened=!1,this.pointerDownOutsideTag=!1,this.isFocused=!1,this.isHovering=!1,this.handlePointerDown=()=>{this.pointerFocusPending=!0},this.handleDocumentPointerDownCapture=e=>{this.contains(e.target)?this.pointerDownOutsideTag=!1:(this.pointerDownOutsideTag=!0,queueMicrotask(()=>{this.pointerDownOutsideTag=!1}))},this.handleMouseEnter=()=>{this.isHovering=!0,clearTimeout(this.closeTimeoutId),this.openCustomOverlays(),this.overlaysAutoOpened=!0},this.handleMouseLeave=()=>{this.isHovering=!1,this.isFocused||this.isSelectionInsideTag()||this.scheduleClose()},this.handleDocumentClickCapture=e=>{this.contains(e.target)&&this.hasPopoverOverlay()&&e.stopPropagation()},this.handleFocus=()=>
2586{if(this.pointerDownOutsideTag)return this.pointerDownOutsideTag=!1,void this.moveCaretToSibling("after");this.isFocused=!0,this.wholeTagFocused=!this.pointerFocusPending,clearTimeout(this.closeTimeoutId),this.overlaysAutoOpened||(this.openCustomOverlays(),this.overlaysAutoOpened=!0),this.pointerFocusPending=!1},this.handleBlur=e=>{this.isFocused=!1,this.wholeTagFocused=!1,this.pointerFocusPending=!1;const t=e.relatedTarget;t&&this.contains(t)||this.isHovering||this.scheduleClose()},this.handleSelectionChange=()=>{if(this.isSelectionInsideTag())return clearTimeout(this.closeTimeoutId),this.openCustomOverlays(),void(this.overlaysAutoOpened=!0);this.scheduleClose()},this.handleKeyDown=e=>"Escape"===e.key?(clearTimeout(this.closeTimeoutId),this.closeCustomOverlays(),void(this.overlaysAutoOpened=!1)):this.wholeTagFocused?"Backspace"===e.key||"Delete"===e.key?(e.preventDefault(),void this.removeAndRestoreCaret()):void("ArrowLeft"!==e.key&&"ArrowUp"!==e.key?"ArrowRight"!==e.key&&"ArrowDown"!==e.key?this.wholeTagFocused=!1:this.moveCaretToSibling("after")&&e.preventDefault():this.moveCaretToSibling("before")&&e.preventDefault()):void 0}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("chameleon-tag"),this.injectStyles(),this.ownerDocument.addEventListener("selectionchange",this.handleSelectionChange),this.ownerDocument.addEventListener("click",this.handleDocumentClickCapture,!0),this.ownerDocument.addEventListener("pointerdown",this.handleDocumentPointerDownCapture,!0)}disconnectedCallback(){super.disconnectedCallback(),this.emptyContentObserver?.disconnect(),clearTimeout(this.popoverOpenTimeoutId),clearTimeout(this.closeTimeoutId),this.ownerDocument.removeEventListener("selectionchange",this.handleSelectionChange),this.ownerDocument.removeEventListener("click",this.handleDocumentClickCapture,!0),this.ownerDocument.removeEventListener("pointerdown",this.handleDocumentPointerDownCapture,!0)}firstUpdated(){"enabled"===this.mode&&(this.setAttribute("tabindex","0"),this.setAttribute("contenteditable","true"),this.observeEmptyContent(),this.addEventListener("pointerdown",this.handlePointerDown),this.addEventListener("focus",this.handleFocus),this.addEventListener("blur",this.handleBlur),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseenter",this.handleMouseEnter),this.addEventListener("mouseleave",this.handleMouseLeave)),this.wireCustomOverlays(),this.truncateContent(),this.setAccessibleLabel()}ensureId(){return this.id||(this.id=`tag-${crypto.randomUUID()}`),this.id}getCustomOverlays(){return this.querySelectorAll(":scope > chameleon-tooltip, :scope > chameleon-popover")}hasCustomOverlay(){return this.getCustomOverlays().length>0}hasPopoverOverlay(){return Array.from(this.getCustomOverlays()).some(e=>"chameleon-popover"===e.tagName.toLowerCase())}wireCustomOverlays(){const e=this.getCustomOverlays();if(0===e.length)return;const t=this.ensureId();for(const r of e)r.setAttribute("trigger-id",t),r.setAttribute("contenteditable","false"),"chameleon-popover"===r.tagName.toLowerCase()&&r.setAttribute("popover-mode","manual"),"chameleon-tooltip"===r.tagName.toLowerCase()&&(r.selectionKeepsOpen=!0)}isSelectionInsideTag(){const e=this.ownerDocument.getSelection();return!(!e?.anchorNode||!this.contains(e.anchorNode))}openCustomOverlays(){for(const e of this.getCustomOverlays())"chameleon-popover"===e.tagName.toLowerCase()?(clearTimeout(this.popoverOpenTimeoutId),this.popoverOpenTimeoutId=setTimeout(()=>{e.open?.()},400)):"chameleon-tooltip"===e.tagName.toLowerCase()&&(e.isOpen=!0)}closeCustomOverlays(){clearTimeout(this.popoverOpenTimeoutId);for(const e of this.getCustomOverlays())"chameleon-popover"===e.tagName.toLowerCase()?e.close?.():"chameleon-tooltip"===e.tagName.toLowerCase()&&(e.isOpen=!1)}scheduleClose(){clearTimeout(this.closeTimeoutId),this.closeTimeoutId=setTimeout(()=>{this.closeCustomOverlays(),this.overlaysAutoOpened=!1},150)}getEditableAncestor(){return this.parentElement?.closest('[contenteditable=""], [contenteditable="true"]')}placeCaretIn(e,t,r){e.focus({preventScroll:!0});const n=this.ownerDocument.getSelection();if(!n)return;const o=this.ownerDocument.createRange();o.setStart(t,r),o.collapse(!0),n.removeAllRanges(),n.addRange(o)}moveCaretToSibling(e){const t=this.parentNode,r=t?Array.prototype.indexOf.call(t.childNodes,this):-1,n=this.getEditableAncestor();return!(!t||r<0||!n||(this.wholeTagFocused=!1,this.placeCaretIn(n,t,"before"===e?r:r+1),0))}removeAndRestoreCaret(){const e=this.parentNode,t=e?Array.prototype.indexOf.call(e.childNodes,this):-1,r=this.getEditableAncestor();this.remove(),!e||t<0||!r||this.placeCaretIn(r,e,t)}injectStyles(){const e=this.ownerDocument;if(Xm.has(e))return;const t=e.createElement("style");t.textContent=".chameleon-tag{display:inline}.chameleon-tag>chameleon-svg{width:1rem;height:1rem;margin-inline-end:var(--goto-spacing-01);display:inline-block}.chameleon-tag[mode=enabled],.chameleon-tag[mode=read-only]{cursor:text;border-style:solid;border-width:1px;border-color:var(--goto-border-color-secondary);border-radius:var(--goto-radius-small);margin-inline:var(--goto-spacing-01);padding-inline:var(--goto-spacing-02);overflow-wrap:break-word;color:var(--goto-type-color-default);text-decoration:none}.chameleon-tag[size=small]{font:var(--goto-body-small);padding-block:0;line-height:22px}.chameleon-tag[size=small]>chameleon-svg{vertical-align:-.2em}.chameleon-tag[size=medium]{font:var(--goto-body-medium);padding-block:0;line-height:22px}.chameleon-tag[size=medium]>chameleon-svg{vertical-align:-.15em}.chameleon-tag[size=large]{font:var(--goto-body-large);padding-block:0;line-height:22px}.chameleon-tag[size=large]>chameleon-svg{vertical-align:-.1em}.chameleon-tag[variant=brand]{background-color:var(--goto-surface-color-brand-secondary)}.chameleon-tag[variant=neutral]{background-color:var(--goto-surface-color-secondary)}.chameleon-tag[variant=success]{--goto-icon-color:var(--goto-icon-color-success);background-color:var(--goto-surface-color-success-secondary)}.chameleon-tag[variant=error]{--goto-icon-color:var(--goto-icon-color-danger);background-color:var(--goto-surface-color-danger-secondary)}.chameleon-tag[variant=brand][mode=enabled]{--goto-icon-color:var(--goto-icon-color-default);border-color:var(--goto-border-color-brand)}.chameleon-tag[variant=neutral][mode=enabled]{--goto-icon-color:var(--goto-icon-color-default);border-color:var(--goto-border-color-default)}.chameleon-tag[variant=success][mode=enabled]{border-color:var(--goto-border-color-success)}.chameleon-tag[variant=error][mode=enabled]{border-color:var(--goto-border-color-danger)}.chameleon-tag[variant=brand][mode=read-only],.chameleon-tag[variant=neutral][mode=read-only]{--goto-icon-color:var(--goto-icon-color-secondary)}.chameleon-tag[mode=read-only]{color:var(--goto-type-color-secondary)}.chameleon-tag:focus-visible{outline-offset:2px;outline:var(--goto-focus-color-highlight-default)solid 1px;border-radius:var(--goto-radius-small)}",t.setAttribute("data-chameleon-tag-styles",""),e.head.append(t),Xm.add(e)}getContentNodes(){return Array.from(this.childNodes).filter(e=>e.nodeType===Node.TEXT_NODE||e instanceof Element&&!e.getElementsByTagName("chameleon-svg"))}observeEmptyContent(){this.emptyContentObserver=new MutationObserver(()=>{const e=this.getContentNodes().some(e=>(e.textContent??"").length>0);e||this.remove()}),this.emptyContentObserver.observe(this,{childList:!0,characterData:!0,subtree:!0})}getFullTextContent(){const e=this.getContentNodes().map(e=>e.textContent?.trim()??"").join("");return e}truncateContent(){const e=this.getFullTextContent();if(e.length<=30)return;const t=this.getContentNodes();for(const e of t)e.remove();if(this.append(`${e.slice(0,30)}…`),this.hasCustomOverlay())return;const r=document.createElement("chameleon-tooltip");r.setAttribute("trigger-id",this.ensureId()),r.setAttribute("position","top-center"),r.textContent=e,this.after(r)}setAccessibleLabel(){this.label&&this.setAttribute("aria-label",`${this.label??this.getFullTextContent()}`)}validateAccessibleLabel(){this.getAttribute("aria-label")?.length||console.error("CHAMELEON-A11Y: Tag component must have an accessible label provided by a non-empty label attribute to be used as aria-label.")}}ev.baseName="tag",h([Te({reflect:!0})],ev.prototype,"size",void 0),h([Te({reflect:!0})],ev.prototype,"label",void 0),h([Te({reflect:!0})],ev.prototype,"variant",void 0),h([Te({reflect:!0})],ev.prototype,"mode",void 0),function(e={}){To(e,bl),d(ev,e)}();const tv="none";class rv extends Jn{}class nv extends(Iu(rv)){constructor(){super(...arguments),this.proxy=document.createElement("textarea")}}class ov extends nv{constructor(){super(...arguments),this.resize=tv,this.cols=20,this.handleTextInput=()=>{this.value=this.control.value}}readOnlyChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.readOnly=this.readOnly)}autofocusChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.autofocus=this.autofocus)}listChanged(){this.proxy instanceof HTMLTextAreaElement&&this.proxy.setAttribute("list",this.list)}maxlengthChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.maxLength=this.maxlength)}minlengthChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.minLength=this.minlength)}spellcheckChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.spellcheck=this.spellcheck)}select(){this.control.select(),this.$emit("select")}handleChange(){this.$emit("change")}validate(){super.validate(this.control)}}nn([Qr({mode:"boolean"})],ov.prototype,"readOnly",void 0),nn([Qr],ov.prototype,"resize",void 0),nn([Qr({mode:"boolean"})],ov.prototype,"autofocus",void 0),nn([Qr({attribute:"form"})],ov.prototype,"formId",void 0),nn([Qr],ov.prototype,"list",void 0),nn([Qr({converter:Yr})],ov.prototype,"maxlength",void 0),nn([Qr({converter:Yr})],ov.prototype,"minlength",void 0),nn([Qr],ov.prototype,"name",void 0),nn([Qr],ov.prototype,"placeholder",void 0),nn([Qr({converter:Yr,mode:"fromView"})],ov.prototype,"cols",void 0),nn([Qr({converter:Yr,mode:"fromView"})],ov.prototype,"rows",void 0),nn([Qr({mode:"boolean"})],ov.prototype,"spellcheck",void 0),nn([Nr],ov.prototype,"defaultSlottedNodes",void 0),oc(ov,$p);class iv extends(s(ov)){constructor(){super(...arguments),this.success=!1,this.error=!1,this.fullwidth=!1,this.hidecounter=!1,this.optional=!1,this.impl
2586icitSubmission=!1,this.resize="both",this.infoContainer=document.createElement("div"),this.counterEl=document.createElement("span"),this.helperTextEl=document.createElement("slot"),this.handleDisabledKeydown=e=>{this.hasAttribute("disabled")&&"Tab"!==e.key&&e.preventDefault()},this.handleImplicitSubmission=e=>{if("Enter"===e.key&&!this.implicitSubmission)return e.stopPropagation(),!0},this.handleInput=e=>{const{value:t}=e?.target;this.maxlength&&!this.hidecounter&&(this.counterEl.textContent=`${t.length}/${this.maxlength}`)},this.handleHelperTextSlotChange=()=>{this.render();const e=this.helperTextEl.assignedElements()[0];e&&e.textContent&&this.control.setAttribute("aria-describedby",e.id)}}connectedCallback(){super.connectedCallback(),this.control.addEventListener("input",this.handleInput),this.control.addEventListener("keypress",this.handleImplicitSubmission),this.control.addEventListener("keydown",this.handleDisabledKeydown),this.infoContainer.classList.add("info"),this.counterEl.classList.add("counter"),this.shadowRoot?.appendChild(this.infoContainer),this.addHelperText(),this.addIdForLabel(),this.setAccessibleLabel(),this.render()}disconnectedCallback(){super.disconnectedCallback(),this.control.removeEventListener("input",this.handleInput),this.control.removeEventListener("keypress",this.handleImplicitSubmission),this.control.removeEventListener("keydown",this.handleDisabledKeydown),this.helperTextEl.removeEventListener("slotchange",this.handleHelperTextSlotChange)}errorChanged(e,t){this.ariaInvalid=t?"true":null}attributeChangedCallback(e,t,r){super.attributeChangedCallback(e,t,r),"readonly"===e&&r?this.setAttribute("aria-readonly","true"):"readonly"===e&&this.removeAttribute("aria-readonly"),this.control?.setAttribute("aria-disabled",`${this.hasAttribute("disabled")}`),this.optional||this.textContent?.includes("optional")?this.control?.removeAttribute("aria-required"):this.control?.setAttribute("aria-required","true"),this.render()}addIdForLabel(){const e=this.shadowRoot?.querySelector("label");e&&(e.id=xa("label-"),this.control.setAttribute("aria-labelledby",e.id))}render(){this.maxlength&&!this.hidecounter?this.renderCounter():this.removeCounter()}hasHelperText(){return null!==this.querySelector('[slot="helpertext"]')}addHelperText(){this.helperTextEl.setAttribute("name","helpertext"),this.helperTextEl.setAttribute("id",xa("helpertext-")),this.helperTextEl.addEventListener("slotchange",this.handleHelperTextSlotChange);const e=this.shadowRoot?.querySelector('[name="helpertext"]');e||this.infoContainer?.prepend(this.helperTextEl)}renderCounter(){this.maxlength&&(this.hasHelperText()?this.infoContainer.style.justifyContent="space-between":this.infoContainer.style.justifyContent="flex-end",this.counterEl.textContent=`${this.value.length}/${this.maxlength}`,this.infoContainer?.appendChild(this.counterEl))}
2586removeCounter(){this.counterEl?.isConnected&&(this.infoContainer.style.justifyContent="",this.counterEl.remove())}setAccessibleLabel(){this.textContent?.trim()&&this.helperTextEl.assignedElements()[0]?.textContent!==this.textContent?.trim()||this.labelId&&this.setAttribute("aria-labelledby",this.labelId)}validateAccessibleLabel(){this.getAttribute("aria-labelledby")?.length||console.error("CHAMELEON-A11Y: TextArea component must have an accessible label provided by either \n  1) text content \n  2) a visible label whose id is given as the attribute labelId\n")}}h([Qr({mode:"boolean"})],iv.prototype,"success",void 0),h([Qr({mode:"boolean"})],iv.prototype,"error",void 0),h([Qr({mode:"boolean"})],iv.prototype,"fullwidth",void 0),h([Qr({mode:"boolean",attribute:"hide-counter"})],iv.prototype,"hidecounter",void 0),h([Qr({mode:"boolean"})],iv.prototype,"optional",void 0),h([Qr({mode:"boolean",attribute:"implicit-submission"})],iv.prototype,"implicitSubmission",void 0),h([Qr({attribute:"label-id"})],iv.prototype,"labelId",void 0),h([Qr],iv.prototype,"resize",void 0);const sv=iv.compose({baseName:"text-area",template:(e,t)=>
2586ri`
2587    <template
2588        class="
2589            ${e=>e.readOnly?"readonly":""}
2590            ${e=>e.resize!==tv?`resize-${e.resize}`:""}"
2591    >
2592        <label
2593            part="label"
2594            for="control"
2595            class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label__hidden"}"
2596        >
2597            <slot ${si("defaultSlottedNodes")}></slot>
2598        </label>
2599        <textarea
2600            part="control"
2601            class="control"
2602            id="control"
2603            ?autofocus="${e=>e.autofocus}"
2604            cols="${e=>e.cols}"
2605            ?disabled="${e=>e.disabled}"
2606            form="${e=>e.form}"
2607            list="${e=>e.list}"
2608            maxlength="${e=>e.maxlength}"
2609            minlength="${e=>e.minlength}"
2610            name="${e=>e.name}"
2611            placeholder="${e=>e.placeholder}"
2612            ?readonly="${e=>e.readOnly}"
2613            ?required="${e=>e.required}"
2614            rows="${e=>e.rows}"
2615            ?spellcheck="${e=>e.spellcheck}"
2616            :value="${e=>e.value}"
2617            aria-atomic="${e=>e.ariaAtomic}"
2618            aria-busy="${e=>e.ariaBusy}"
2619            aria-controls="${e=>e.ariaControls}"
2620            aria-current="${e=>e.ariaCurrent}"
2621            aria-describedby="${e=>e.ariaDescribedby}"
2622            aria-details="${e=>e.ariaDetails}"
2623            aria-disabled="${e=>e.ariaDisabled}"
2624            aria-errormessage="${e=>e.ariaErrormessage}"
2625            aria-flowto="${e=>e.ariaFlowto}"
2626            aria-haspopup="${e=>e.ariaHaspopup}"
2627            aria-hidden="${e=>e.ariaHidden}"
2628            aria-invalid="${e=>e.ariaInvalid}"
2629            aria-keyshortcuts="${e=>e.ariaKeyshortcuts}"
2630            aria-label="${e=>e.ariaLabel}"
2631            aria-labelledby="${e=>e.ariaLabelledby}"
2632            aria-live="${e=>e.ariaLive}"
2633            aria-owns="${e=>e.ariaOwns}"
2634            aria-relevant="${e=>e.ariaRelevant}"
2635            aria-roledescription="${e=>e.ariaRoledescription}"
2636            @input="${(e,t)=>e.handleTextInput()}"
2637            @change="${e=>e.handleChange()}"
2638            ${li("control")}
2639        ></textarea>
2640    </template>
2641`,styles:Ci(":host{outline:none;flex-direction:column;display:inline-flex}:host .control{box-sizing:border-box;background-color:var(--goto-surface-color-default);border-color:var(--goto-border-color-default);color:var(--goto-type-color-default);font:var(--goto-body-medium);border-radius:var(--goto-radius-small);min-height:58px;height:inherit;resize:none;padding:var(--goto-spacing-01)var(--goto-spacing-03);border-width:1px;outline:none}:host .control:hover{border-color:var(--goto-border-color-default)}:host .control::placeholder{color:var(--goto-type-color-secondary);font:var(--goto-body-medium);margin-top:var(--goto-spacing-01);opacity:1;line-height:1.3rem;display:inline-flex}:host .info{justify-content:space-between;align-items:flex-start;gap:var(--goto-spacing-02);display:flex}:host .counter{color:var(--goto-type-color-secondary);margin-top:var(--goto-spacing-01);font:var(--goto-caption-medium)}:host ::slotted([slot=helpertext]){color:var(--goto-type-color-secondary);margin-top:var(--goto-spacing-01);font:var(--goto-caption-medium);cursor:text}:host([resize=both]) .control{resize:both}:host([resize=horizontal]) .control{resize:horizontal}:host([resize=vertical]) .control{resize:vertical}:host(:focus-within) .control{outline-offset:2px;outline-width:1px;outline-style:solid;outline-color:var(--goto-focus-color-highlight-default)}:host([success]) .control{border-color:var(--goto-border-color-success)}:host([success]) ::slotted([slot=helpertext]){color:var(--goto-surface-color-success-default)}:host([success]:focus-within) .control{outline-color:var(--goto-focus-color-highlight-success)}:host([readonly]) .control input::placeholder{color:var(--goto-type-color-default)}:host([error]) .control{border-color:var(--goto-border-color-danger)}:host([error]) ::slotted([slot=helpertext]){color:var(--goto-surface-color-danger-default)}:host([error]:focus-within) .control{outline-color:var(--goto-focus-color-highlight-danger)}:host([fieldsize=small]) .control{font:var(--goto-body-small);height:1.875rem}:host([fieldsize=small]) .control::placeholder{font:var(--goto-body-small)}:host([fieldsize=large]) .control{height:2.625rem}
2641:host([fieldsize=xlarge]) .control{height:3rem}.label{color:var(--goto-type-color-default);font:var(--goto-caption-medium-strong);margin-bottom:4px;display:block}:host([aria-disabled]),:host([disabled]){cursor:not-allowed}:host([aria-disabled]) .counter,:host([aria-disabled]) .label,:host([disabled]) .counter,:host([disabled]) .label{color:var(--goto-type-color-disabled)}:host([aria-disabled]) .control,:host([disabled]) .control{border-color:var(--goto-border-color-default);background-color:var(--goto-surface-color-default);box-shadow:none;cursor:default;color:var(--goto-type-color-disabled);user-select:none;pointer-events:none}:host([aria-disabled]) .control::placeholder,:host([disabled]) .control::placeholder,:host([aria-disabled]) ::slotted([slot=helpertext]),:host([disabled]) ::slotted([slot=helpertext]){color:var(--goto-type-color-disabled)}:host([readonly]) .control{border-color:var(--goto-border-color-default);background-color:var(--goto-surface-color-secondary);box-shadow:none;color:var(--goto-type-color-default)}:host([readonly]) .control::placeholder{color:var(--goto-type-color-default)}:host([readonly]:focus-within) .control{border-color:var(--goto-border-color-default);background-color:var(--goto-surface-color-secondary);box-shadow:none;color:var(--goto-type-color-default)}:host([fullwidth]),:host([fullwidth]) .control{width:100%}"),shadowOptions:{delegatesFocus:!0}});function av(e,t){return To({prefix:e,node:t},sv)}av();class lv extends Zt{constructor(){super(...arguments),this.placeholder="",this.value="",this.disabled=!1,this.error=!1,this.readonly=!1,this.fixedHeight=!1,this.hasAttachments=!1,this.labelElementId=xa("text-editor-label-"),this.handleInput=e=>{e.stopPropagation();const t=e.target;this.value=t.value,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0}))},this.handleChange=e=>{e.stopPropagation();const t=e.target;this.value=t.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))},this.handleContentKeyDown=e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),this.dispatchEvent(new CustomEvent("send",{detail:{value:this.value,attachments:this.getAttachmentElements(),source:"enter"},bubbles:!0,composed:!0})))},this.handleAttachmentsSlotChange=e=>{this.hasAttachments=e.target.assignedElements().length>0}}updated(e){super.updated(e),!e.has("value")&&!e.has("fixedHeight")||this.fixedHeight||this.measureDynamicHeight()}render(){const e=Oi(u(iv)),t=!!this.helperText||null!=this.maxlength;return Ni`
2642      ${Zu(!!this.label,()=>Ni`<div part="label" id="${this.labelElementId}" class="label" ?inert="${this.disabled}">${this.label}</div>`)}
2643      <div part="body" class="body" ?inert="${this.disabled}">
2644        <slot name="top-action-bar" part="top-action-bar" class="action-bar"></slot>
2645        <slot
2646          name="attachments"
2647          part="attachments"
2648          class="attachments"
2649          ?hidden="${!this.hasAttachments}"
2650          @slotchange="${this.handleAttachmentsSlotChange}"
2651        ></slot>
2652        <${e}
2653          class="content"
2654          part="content"
2655          .value="${this.value}"
2656          placeholder="${this.placeholder}"
2657          ?disabled="${this.disabled}"
2658          ?error="${this.error}"
2659          ?readonly="${this.readonly}"
2660          rows="${this.rows??(this.fixedHeight?le:1)}"
2661          maxlength="${this.maxlength??le}"
2662          resize="none"
2663          hide-counter
2664          fullwidth
2665          aria-label="${this.label??this.ariaLabel??le}"
2666          aria-labelledby="${this.label?le:this.ariaLabelledby??le}"
2667          @input="${this.handleInput}"
2668          @change="${this.handleChange}"
2669          @keydown="${this.handleContentKeyDown}"
2670        ></${e}>
2671        <slot name="bottom-action-bar" part="bottom-action-bar" class="action-bar"></slot>
2672      </div>
2673      ${Zu(t,()=>Ni`
2674          <div part="footer" class="footer" ?inert="${this.disabled}">
2675            <span class="helper-text">${this.helperText}</span>
2676            ${Zu(null!=this.maxlength,()=>Ni`<span class="counter" aria-hidden="true">${this.value.length}/${this.maxlength}</span>`)}
2677          </div>
2678        `)}
2679    `}getAttachmentElements(){const e=this.shadowRoot?.querySelector('slot[name="attachments"]');return e?.assignedElements()??[]}async measureDynamicHeight(){await this.updateComplete;const e=this.shadowRoot?.querySelector(u(iv)),t=e?.shadowRoot?.querySelector(".control");if(!t)return;t.style.height="auto";const r=Number.parseFloat(getComputedStyle(t).lineHeight)||20,n=1*r,o=4*r,i=t.scrollHeight;t.style.height=`${Math.min(Math.max(i,n),o)}px`}}lv.baseName="text-editor",lv.styles=b(":host{min-width:var(--goto-texteditor-min-width,268px);flex-direction:column;display:flex}.label{color:var(--goto-type-color-default);font:var(--goto-caption-medium-strong);margin-bottom:var(--goto-spacing-01);display:block}.body{box-sizing:border-box;border:1px solid var(--goto-border-color-default);border-radius:var(--goto-radius-medium);background-color:var(--goto-surface-color-default);flex-direction:column;display:flex;overflow:hidden}.action-bar{width:100%;display:flex}.action-bar::slotted(*){width:100%}.attachments{gap:var(--goto-spacing-02);padding:var(--goto-spacing-02);max-height:calc(4*(var(--goto-spacing-04) + var(--goto-spacing-02)));flex-wrap:wrap;display:flex;overflow-y:auto}.attachments[hidden]{display:none}.content{flex:1}.content::part(control){padding:var(--goto-spacing-02)var(--goto-spacing-03);min-height:unset;resize:none;background:0 0;border:none;overflow-y:auto}.footer{justify-content:space-between;align-items:baseline;gap:var(--goto-spacing-02);margin-top:var(--goto-spacing-01);font:var(--goto-caption-medium);color:var(--goto-type-color-secondary);display:flex}.counter{color:var(--goto-type-color-secondary);flex-shrink:0}:host([error]) .body{border-color:var(--goto-border-color-danger)}:host([error]) .footer,:host([error]) .helper-text{color:var(--goto-type-color-danger)}:host([error]) .counter{color:var(--goto-type-color-secondary)}:host([disabled]) .label,:host([disabled]) .footer,:host([disabled]) .helper-text,:host([disabled]) .counter{color:var(--goto-type-color-disabled)}"),h([Te()],lv.prototype,"label",void 0),h([Te()],lv.prototype,"placeholder",void 0),h([Te()],lv.prototype,"value",void 0),h([Te({attribute:"helper-text"})],lv.prototype,"helperText",void 0),h([Te({type:Number})],lv.prototype,"maxlength",void 0),h([Te({type:Boolean,reflect:!0})],lv.prototype,"disabled",void 0),h([Te({type:Boolean,reflect:!0})],lv.prototype,"error",void 0),h([Te({type:Boolean,reflect:!0})],lv.prototype,"readonly",void 0),h([Te({type:Boolean,reflect:!0,attribute:"fixed-height"})],lv.prototype,"fixedHeight",void 0),h([Te({type:Number}
2679)],lv.prototype,"rows",void 0),h([Oe()],lv.prototype,"hasAttachments",void 0);class cv extends Zt{constructor(){super(),this.mode="icon",this.size="medium",this.backgroundFill=!1,this.badge=!1,this.beacon=!1,this.selected=!1,this.label="",new Vi(this,()=>this.isAriaDisabled)}get isAriaDisabled(){return this.disabled||"true"===this.ariaDisabled}_handleClick(){this.disabled||(this.selected=!this.selected,this.dispatchEvent(new CustomEvent("change",{detail:{selected:this.selected},bubbles:!0,composed:!0})))}willUpdate(e){}updated(e){super.updated(e),this.setAccessibleLabel()}setAccessibleLabel(){this.label&&this.getInternalButtonElement()?.setAttribute("aria-label",this.label)}getInternalButtonElement(){return this.shadowRoot?.querySelector("button")}validateAccessibleLabel(){this.getInternalButtonElement()?.getAttribute("aria-label")?.length||console.error("CHAMELEON-A11Y: Toggle Button component must have an accessible label provided by a non-empty label attribute to be used as aria-label.")}get computedConfig(){return{badgeCounterSize:{xlarge:"medium",large:"medium",medium:"small",small:"small"}[this.size]}}render(){const e=this.iconPair?this.selected?this.iconPair.filled:this.iconPair.outlined:void 0,t=Oi(u(Ui));return Ni`
2680      <button 
2681        class="control" 
2682        @click=${this._handleClick}
2683        aria-pressed="${this.selected??le}"
2684        aria-disabled="${this.isAriaDisabled}"
2685      >
2686        ${"text"===this.mode?Ni`<slot></slot>`:e?Ni`<chameleon-svg>${Pi(e)}</chameleon-svg>`:le}
2687        ${this.badge?Ni`
2688              <${t}
2689                class="icon-button-badge"
2690                label="${"CHAMELEON_BYPASS_LABEL"}"
2691                size="${this.computedConfig.badgeCounterSize}"
2692                aria-label="${this.badgeLabel||""}"
2693                value="${this.count}"
2694                ?beacon="${this.beacon}"
2695              >${void 0!==this.count?this.maxCountLabel?Ni`
2696                        ${this.count}
2697                        <span slot="max">${this.maxCountLabel}</span>
2698                      `:this.count:le}</${t}>
2699            `:""}
2700      </button>
2701    `}}function dv(e={}){vr(e),gl(e),d(cv,e)}cv.baseName="toggle-button",cv.styles=b(":host{box-sizing:border-box;border-radius:var(--goto-radius-small);display:inline-flex}:host .control{border-radius:inherit;cursor:pointer;white-space:nowrap;border:none;justify-content:center;align-items:center;display:flex;position:relative}:host([is-loading]),:host([disabled]){cursor:not-allowed}:host([is-loading]) .control,:host([disabled]) .control{pointer-events:none}:host .control:focus-visible,:host(.selected-interactive-item) .control{outline-offset:2px;outline-width:1px;outline-style:solid}:host .control{position:relative}:host .control .icon-button-badge{top:var(--badge-counter-element-top);left:calc(100% - var(--badge-counter-element-right) - var(--badge-counter-element-left-offset,0px));position:absolute}:host:host([mode=text]) .control{white-space:nowrap;width:auto;height:auto}:host .control{--goto-icon-color:var(--goto-icon-color-on-neutral-tertiary-default);color:var(--goto-type-color-on-neutral-tertiary-default);background-color:#0000}:host .control:hover{--goto-icon-color:var(--goto-icon-color-on-neutral-tertiary-hover);color:var(--goto-type-color-on-neutral-tertiary-hover);background-color:var(--goto-interactive-color-neutral-secondary-hover)}:host .control:active{--goto-icon-color:var(--goto-icon-color-on-neutral-tertiary-pressed);color:var(--goto-type-color-on-neutral-tertiary-pressed);background-color:var(--goto-interactive-color-neutral-secondary-pressed)}:host:host([disabled]) .control,:host:host([is-loading]) .control{--goto-icon-color:var(--goto-icon-color-disabled);color:var(--goto-type-color-disabled);background-color:#0000}:host([selected][background-fill]) .control,:host([mode=text][selected]) .control{--goto-icon-color:var(--goto-icon-color-on-neutral-selected-default);color:var(--goto-type-color-on-neutral-selected-default);background-color:var(--goto-interactive-color-neutral-selected-default);outline:1px solid var(--goto-border-color-strong);outline-offset:-1px}:host([selected][background-fill]) .control:hover,:host([mode=text][selected]) .control:hover{--goto-icon-color:var(--goto-icon-color-on-neutral-selected-hover);color:var(--goto-type-color-on-neutral-selected-hover);background-color:var(--goto-interactive-color-neutral-selected-hover)}:host([selected][background-fill]) .control:active,:host([mode=text][selected]) .control:active{--goto-icon-color:var(--goto-icon-color-on-neutral-selected-pressed);color:var(--goto-type-color-on-neutral-selected-pressed);background-color:var(--goto-interactive-color-neutral-selected-pressed)}:host([selected][background-fill]):host([disabled]) .control,:host([selected][background-fill]):host([is-loading]) .control,:host([mode=text][selected]):host([disabled]) .control,:host([mode=text][selected]):host([is-loading]) .control{--goto-icon-color:var(--goto-icon-color-disabled);color:var(--goto-type-color-disabled);background-color:var(--goto-interactive-color-disabled);outline:none}:host([size=xlarge]){--badge-counter-dot-radius:calc(var(--goto-spacing-03)/2)}
2701:host([size=xlarge]):host([badge]){--badge-counter-element-top:6px;--badge-counter-element-right:6px;--badge-counter-element-left-offset:12px}:host([size=xlarge]):host([badge]):host([mode=text]){--badge-counter-element-top:4px;--badge-counter-element-right:4px}:host([size=xlarge]):host([count]){--badge-counter-element-top:-2px;--badge-counter-element-right:4px;--badge-counter-element-left-offset:22px}:host([size=xlarge]):host([count]):host([mode=text]){--badge-counter-element-top:-2px;--badge-counter-element-right:-2px}:host([size=xlarge]) .control{height:var(--goto-spacing-09);width:var(--goto-spacing-09);padding:var(--goto-spacing-03);font:var(--goto-button-xlarge);--goto-icon-size:var(--goto-spacing-05)}:host([size=large]){--badge-counter-dot-radius:calc(var(--goto-spacing-03)/2)}:host([size=large]):host([badge]){--badge-counter-element-top:2px;--badge-counter-element-right:2px;--badge-counter-element-left-offset:12px}:host([size=large]):host([count]){--badge-counter-element-top:-4px;--badge-counter-element-right:0px;--badge-counter-element-left-offset:22px}
2701:host([size=large]):host([count]):host([mode=text]){--badge-counter-element-top:-4px;--badge-counter-element-right:-4px}:host([size=large]) .control{height:var(--goto-spacing-08);width:var(--goto-spacing-08);padding:var(--goto-spacing-02);font:var(--goto-button-large);--goto-icon-size:var(--goto-spacing-05)}:host([size=medium]){--badge-counter-dot-radius:var(--goto-spacing-01)}:host([size=medium]):host([badge]){--badge-counter-element-top:4px;--badge-counter-element-right:4px;--badge-counter-element-left-offset:8px}:host([size=medium]):host([count]){--badge-counter-element-top:-2px;--badge-counter-element-right:0px;--badge-counter-element-left-offset:16px}:host([size=medium]):host([count]):host([mode=text]){--badge-counter-element-top:-2px;--badge-counter-element-right:-2px}:host([size=medium]) .control{height:var(--goto-spacing-07);width:var(--goto-spacing-07);padding:var(--goto-spacing-02);font:var(--goto-button-medium);--goto-icon-size:var(--goto-spacing-04)}:host([size=medium]):host([mode=text]) .control{padding:var(--goto-spacing-01)var(--goto-spacing-02)}:host([size=small]){--badge-counter-dot-radius:var(--goto-spacing-01)}:host([size=small]):host([badge]){--badge-counter-element-top:0px;--badge-counter-element-right:0px;--badge-counter-element-left-offset:8px}:host([size=small]):host([count]){--badge-counter-element-top:-4px;--badge-counter-element-right:-4px;--badge-counter-element-left-offset:16px}:host([size=small]):host([count]):host([mode=text]){--badge-counter-element-top:-8px;--badge-counter-element-right:-2px}:host([size=small]) .control{height:var(--goto-spacing-06);width:var(--goto-spacing-06);padding:var(--goto-spacing-01);font:var(--goto-button-small);--goto-icon-size:var(--goto-spacing-04)}:host([size=small]):host([mode=text]) .control{padding:calc(var(--goto-spacing-01)/2)var(--goto-spacing-01)}"),cv.shadowRootOptions={...Zt.shadowRootOptions,delegatesFocus:!0},h([Te({reflect:!0})],cv.prototype,"mode",void 0),h([Te({reflect:!0})],cv.prototype,"size",void 0),h([Te({type:Boolean,reflect:!0,attribute:"background-fill"})],cv.prototype,"backgroundFill",void 0),h([Te({type:Boolean,reflect:!0})],cv.prototype,"badge",void 0),h([Te({type:Number,reflect:!0})],cv.prototype,"count",void 0),h([Te({attribute:"max-count-label",reflect:!0})],cv.prototype,"maxCountLabel",void 0),h([Te({type:Boolean,reflect:!0})],cv.prototype,"beacon",void 0),h([Te({type:Boolean,reflect:!0})],cv.prototype,"disabled",void 0),h([Te({type:Boolean,reflect:!0})],cv.prototype,"selected",void 0),h([Te({reflect:!1})],cv.prototype,"label",void 0),h([Te({attribute:"badge-label"})],cv.prototype,"badgeLabel",void 0),h([Te({type:Object,reflect:!1})],cv.prototype,"iconPair",void 0),h([Te({reflect:!0})],cv.prototype,"text",void 0),function(e={}){av(e.prefix),Pg(e),_l(e),dv(e),d(lv,e)}(),To({prefix:void 0,node:void 0},zp);class uv extends Zt{constructor(){super(...arguments),this.direction="ltr",this.theme="light",this.skin="gotoadmin",this.rebranding2021=!0}connectedCallback(){super.connectedCallback(),this.setRebrandingFlagOnBody(this.rebranding2021),this.updateStyles(this.theme,this.automatic,this.skin)}updated(e){super.updated(e),e.has("theme")&&this.updateStyles(this.theme,this.automatic,this.skin),e.has("automatic")&&this.updateStyles(this.theme,this.automatic,this.skin),e.has("skin")&&this.updateStyles(this.theme,this.automatic,this.skin)}updateStyles(e,t,r){const n=r||this.skin;if(void 0===e)return;const o=!0===t,i=!o&&"dark"===e,s="msteams"===n&&"high-contrast"===e;this.classList.toggle("enable-darkmode",o),this.classList.toggle("theme-dark",i),this.classList.toggle("enable-high-contrast",s),this.isGlobalThemeProvider()&&(document.body.classList.toggle("theme-dark",i),document.body.classList.toggle("enable-darkmode",o),document.body.classList.toggle("enable-high-contrast",s))}isGlobalThemeProvider(){const e=this.getGlobalThemeProvider();return null===e||e===this}getGlobalThemeProvider(){return document.querySelector(`chameleon-theme-provider, ${this.tagName}`)}setRebrandingFlagOnBody(e){this.isGlobalThemeProvider()&&document.body.toggleAttribute("rebranding2021",e)}render(){return oe`<slot></slot>`}}uv.baseName="theme-provider",uv.styles=b(':host{width:100%;font-family:var(--goto-font-family);
2701display:block}:host([theme=dark]):not([automatic="" i],[automatic=true i]){color-scheme:dark}'),h([Te({reflect:!0})],uv.prototype,"theme",void 0),h([Te({reflect:!0})],uv.prototype,"skin",void 0),h([Te({type:Boolean,reflect:!0})],uv.prototype,"automatic",void 0),h([Te({type:Boolean})],uv.prototype,"rebranding2021",void 0),function(e={}){d(uv,e)}();class hv extends Zt{constructor(){super(...arguments),this.size="medium"}render(){const e=Oi(u(mr)),t=Oi(u(zl)),r=Oi(u(Hl));return Ni`
2702      <div class="icon">
2703        ${Zu(!this.fileType,()=>Ni`<slot name="image"></slot>`)}
2704        ${Zu(this.fileType,()=>Ni`<${e}>${Mi('<svg viewBox="0 0 80 100" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><g clip-path="url(#file_svg__a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M3 0H54.781C57.9326 0 60.9577 1.23982 63.2028 3.45163L79.1054 19.1187C79.6777 19.6825 80 20.4524 80 21.2558V97C80 98.6568 78.6569 100 77 100H3C1.34315 100 0 98.6568 0 97V3C0 1.34315 1.34315 0 3 0Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M54.781 0C57.9326 0 60.9577 1.23982 63.2028 3.45163L79.1054 19.1187C79.6777 19.6825 80 20.4524 80 21.2558V97C80 98.6568 78.6569 100 77 100H3C1.34315 100 0 98.6568 0 97V3C0 1.34315 1.34315 0 3 0H54.781ZM53.67 1H3C1.94564 1 1.08183 1.81588 1.00549 2.85074L1 3V97C1 98.0544 1.81588 98.9182 2.85074 98.9945L3 99H77C78.0544 99 78.9182 98.1841 78.9945 97.1493L79 97V21.2558C79 20.7797 78.8303 20.3213 78.5246 19.9613L78.4036 19.831L62.5009 4.16399C61.1403 2.82351 59.4671 1.8725 57.6545 1.38191C58.8213 2.3246 59.4436 3.72352 59.4963 5.56074L59.5 5.81871V17C59.5 18.3255 60.5315 19.41 61.8356 19.4947L62 19.5H77C77.2761 19.5 77.5 19.7239 77.5 20C77.5 20.2455 77.3231 20.4496 77.0899 20.4919L77 20.5H62C60.1314 20.5 58.6049 19.0357 58.5052 17.192L58.5 17V5.81871C58.5 2.87644 56.9527 1.31296 53.6967 1.00535L53.67 1Z" fill="#C3D4DE"></path></g><defs><clipPath id="file_svg__a"><rect width="80" height="100" fill="white"></rect></clipPath></defs></svg>')}</${e}>
2705            ${Zu("blank"!==this.fileType,()=>Ni`<${t}
2706                  size="${this.computeIconBadgeSize(this.size)}"
2707                  type="${this.fileType}"
2708                ></${t}>`)}`)}
2709      </div>
2710      <div class="content">
2711        <${r}
2712          variant="caption-medium-strong"
2713          class="title"
2714          color="type-color-default"
2715          ?nowrap=${"large"!==this.size}
2716          ><slot></slot
2717        ></${r}>
2718        ${Zu("small"!==this.size,()=>Ni`<${r}
2719            variant="caption-medium"
2720            color="type-color-secondary"
2721            ?nowrap=${"large"!==this.size}
2722            ><slot name="description"></slot>
2723          </${r}>`)}
2724      </div>
2725    `}computeIconBadgeSize(e){return e?"large"===e?"xlarge":"medium"===e?"small":e:"medium"}}hv.baseName="thumbnail",hv.styles=b(":host{align-items:center;max-width:100%;display:inline-flex;box-sizing:border-box!important}:host .icon{--goto-icon-size:2.75rem;position:relative}:host [name=image]{border-radius:var(--goto-radius-small);height:var(--goto-spacing-07);width:var(--goto-spacing-07);display:inline-flex}:host ::slotted(img){border-radius:var(--goto-radius-small);object-fit:cover;width:100%;height:100%}:host .content{max-width:calc(100% - var(--goto-spacing-09));margin-left:var(--goto-spacing-02)}:host([size=small]) .icon{--goto-icon-size:1.875rem}:host([size=small]) [name=image]{height:var(--goto-spacing-06);width:var(--goto-spacing-06)}:host([size=small]) .content{max-width:calc(100% - var(--goto-spacing-08))}:host([size=large]){text-align:center;flex-direction:column}:host([size=large]) .icon{--goto-icon-size:6.25rem}:host([size=large]) [name=image]{height:100px;margin-right:var(--goto-spacing-00);width:100px}:host([size=large]) .content{max-width:100%;margin-top:var(--goto-spacing-02);margin-left:var(--goto-spacing-00)}"),h([Te({reflect:!0})],hv.prototype,"size",void 0),h([Te({attribute:"file-type"})],hv.prototype,"fileType",void 0),function(e={}){vr(e),Gl(e),Fl(e),d(hv,e)}();class pv extends Zt{constructor(){super(),this.variant="primary",this.selected=!1,this.disabled=!1,new Vi(this,()=>this.isAriaDisabled)}get isAriaDisabled(){return"true"===this.control?.getAttribute("aria-disabled")}updated(e){super.updated(e),(e.has("variant")||e.has("selected")||e.has("disabled"))&&this.updateSlottedElementColors(),this.updateSlotDetection()}updateSlottedElementColors(){const e="secondary"===this.variant&&!this.selected;let t=e?"type-color-default":"type-color-inverted",r=e?"type-color-secondary":"type-color-inverted";this.disabled&&(t="type-color-disabled",r="type-color-disabled"),this.changeTypographyColor([t,r]),this.changeSvgColor(t)}
2725changeTypographyColor(e){this.querySelectorAll(u(Hl)).forEach((t,r)=>{const n=void 0!==e[r]?e[r]:e[0];t.setAttribute("color",n)})}changeSvgColor(e){this.querySelectorAll(u(mr)).forEach(t=>{t.style["--goto-icon-color"]=e})}updateSlotDetection(){const e=this.shadowRoot?.querySelector('slot[name="start"]'),t=this.shadowRoot?.querySelector('slot[name="end"]'),r=(e?.assignedNodes().length??0)>0,n=(t?.assignedNodes().length??0)>0;r?this.setAttribute("has-start-slot",""):this.removeAttribute("has-start-slot"),n?this.setAttribute("has-end-slot",""):this.removeAttribute("has-end-slot")}render(){return oe`
2726      <button
2727        class="control"
2728        part="control"
2729        type="button"
2730        aria-disabled="${this.disabled||this.ariaDisabled}"
2731      >
2732        <span part="start" class="start">
2733          <slot name="start" @slotchange="${this.updateSlotDetection}"></slot>
2734        </span>
2735        <span part="content" class="content">
2736          <slot @slotchange="${this.updateSlotDetection}"></slot>
2737        </span>
2738        <span part="end" class="end">
2739          <slot name="end" @slotchange="${this.updateSlotDetection}"></slot>
2740        </span>
2741      </button>
2742    `}}pv.baseName="tile",pv.styles=b(":host{border-radius:var(--goto-radius-small);display:flex}:host [part=content]{font:var(--goto-body-large)}:host .control{justify-content:center;align-items:flex-start;gap:calc(var(--goto-spacing-04)/2);min-height:4rem;height:inherit;box-sizing:border-box;width:100%;min-width:8rem;padding:var(--goto-spacing-03)var(--goto-spacing-04);font:var(--goto-button-medium);border-radius:inherit;cursor:pointer;white-space:inherit;text-align:left;--goto-icon-size:var(--goto-spacing-06);border:none;flex-direction:column;max-width:100%;display:flex;position:relative}:host .control ::slotted(chameleon-svg[slot=start]){margin:var(--goto-spacing-00)}:host([disabled]) .control{cursor:not-allowed;background-color:var(--goto-interactive-color-disabled);border-color:var(--goto-border-color-default);color:var(--goto-type-color-disabled)!important;--goto-icon-color:var(--goto-icon-color-disabled)!important}:host([disabled]):host(:hover) .control,:host([disabled]):host(:active) .control{background-color:var(--goto-interactive-color-disabled)}:host([disabled][variant=secondary]) .control{box-shadow:inset 0 0 0 1px var(--goto-border-color-default)}:host(:not([has-start-slot])) .control [part=start],:host(:not([has-start-slot])) .start,:host(:not([has-end-slot])) .control [part=end],:host(:not([has-end-slot])) .end{display:none}:host([selected]:not([disabled])) .control ::slotted(chameleon-svg[slot=start]){--goto-icon-color:var(--goto-icon-color-inverted)}:host([variant=primary]:not([disabled])) .control,:host([variant=primary][selected]:not([disabled])) .control{color:var(--goto-type-color-inverted);background-color:var(--goto-interactive-color-brand-default);border-color:var(--goto-interactive-color-brand-default);--goto-icon-color:var(--goto-icon-color-inverted)}:host([variant=primary]:not([disabled])) .control:hover,:host([variant=primary][selected]:not([disabled])) .control:hover{background-color:var(--goto-interactive-color-brand-hover)}:host([variant=primary]:not([disabled])) .control:active,:host([variant=primary][selected]:not([disabled])) .control:active{background-color:var(--goto-interactive-color-brand-pressed)}:host([variant=secondary]:not([disabled])) .control{color:var(--goto-type-color-default);background-color:var(--goto-interactive-color-secondary-default);box-shadow:inset 0 0 0 1px var(--goto-border-color-default);--goto-icon-color:var(--goto-icon-color-brand-default)}:host([variant=secondary]:not([disabled])) .control:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host([variant=secondary]:not([disabled])) .control:active{background-color:var(--goto-interactive-color-secondary-pressed)}:host([variant=secondary]:not([selected]):not([disabled])) .control ::slotted([slot=end]){color:var(--goto-type-color-secondary)}:host([variant=secondary][selected]:not([disabled])) .control{color:var(--goto-type-color-inverted);background-color:var(--goto-interactive-color-brand-default);border-color:var(--goto-interactive-color-brand-default);--goto-icon-color:var(--goto-icon-color-inverted)}:host([variant=secondary][selected]:not([disabled])) .control:hover{background-color:var(--goto-interactive-color-brand-hover)}:host([variant=secondary][selected]:not([disabled])) .control:active{background-color:var(--goto-interactive-color-brand-pressed)}::slotted([slot=end]){font:var(--goto-caption-medium)}:host .control:focus-visible,:host(.selected-interactive-item) .control{outline-offset:2px;outline:var(--goto-focus-color-highlight-default)solid 1px}"),h([Te({reflect:!0})],pv.prototype,"variant",void 0),h([Te({type:Boolean,reflect:!0})],pv.prototype,"selected",void 0),h([Te({type:Boolean,reflect:!0})],pv.prototype,"disabled",void 0),h([$e(".control")],pv.prototype,"control",void 0),function(e){Gl({prefix:e}),vr({prefix:e}),d(pv,{prefix:e})}();class gv extends Zt{render(){return oe`<slot></slot>`}}gv.baseName="tiles",gv.styles=b(":host{column-gap:var(--goto-spacing-02);grid-template-columns:repeat(auto-fit,minmax(0,1fr));display:grid}:host ::slotted(*){width:100%}"),function(e={}){d(gv,e)}(),dv(),Uu(),yl();class fv extends Zt{constructor(){super(...arguments),this.platform="web",this.state="focus",this.closeLabel="Close",this.minimizeLabel="Minimize",this.maximizeLabel="Maximize",this.onBlurHandler=()=>{this.state="blur"},this.onFocusHandler=()=>{this.state="focus"},this.onMinimize=()=>{this.dispatchEvent(new CustomEvent("ch-top-bar-minimize",{bubbles:!1}))},this.onMaximize=()=>{this.dispatchEvent(new CustomEvent("ch-top-bar-maximize",{bubbles:!1}))},this.onClose=()=>{this.dispatchEvent(new CustomEvent("ch-top-bar-close",{bubbles:!1}))}}get safeCloseLabel(){return this.closeLabel?.trim()||"Close"}get safeMinimizeLabel(){return this.minimizeLabel?.trim()||"Minimize"}get safeMaximizeLabel(){return this.maximizeLabel?.trim()||"Maximize"}get shouldShowSeparator(){return this.logoNodes.length>0&&this.submenuNodes.length>0}render(){const e=Oi(u(Wi)),t=Oi(u(mr));return Ni`
2743      <div class="container">
2744        ${Zu("macOS"===this.platform,()=>Ni`<div class="traffic-light-container">
2745            <button type="button" class="close-button traffic-light" id="traffic-light-close" aria-label=${this.safeCloseLabel} @click=${this.onClose}>${Mi(Sl)}</button>
2746            <button type="button" class="minimize-button traffic-light" id="traffic-light-minimize" aria-label=${this.safeMinimizeLabel} @click=${this.onMinimize}>${Mi(ef)}</button>
2747            <button type="button" class="maximize-button traffic-light" id="traffic-light-maximize" aria-label=${this.safeMaximizeLabel} @click=${this.onMaximize}>
2748              ${Mi('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M22 2H16V4H18.5858L13.2929 9.29289L14.7071 10.7071L20 5.41421V8H22V2ZM9.29289 13.2929L4 18.5858V16H2V22H8V20H5.41422L10.7071 14.7071L9.29289 13.2929Z" fill="currentColor"></path></svg>')}
2749            </button>
2750          </div>`)}
2751        <div class="logo">
2752          <slot name="logo" @slotchange=${this.handleSlotChange}></slot>
2753          ${this.shouldShowSeparator?Ni`<div class="separator"></div>`:""}
2754        </div>
2755        <div class="submenu">
2756          <slot name="submenu" @slotchange=${this.handleSlotChange}></slot>
2757        </div>
2758        <div class="search-container">
2759          <slot name="search-field"></slot>
2760        </div>
2761        <div class="extra-element-container">
2762          <slot name="extra-element-container"></slot>
2763        </div>
2764        <div class="button-container">
2765          <slot name="button-container"></slot>
2766        </div>
2767        <div class="sign-in-container">
2768          <slot name="sign-in-button"></slot>
2769        </div>
2770        ${Zu("windows"===this.platform,()=>Ni`<div class="windows-container">
2771            <${e} label=${this.safeMinimizeLabel} aria-label=${this.safeMinimizeLabel} variant="${"primary"}" class="minimize-button" id="windows-button-minimize" @click=${this.onMinimize}>
2772              <${t}>${ef}</${t}>
2773            </${e}>
2774            <${e} label=${this.safeMaximizeLabel} aria-label=${this.safeMaximizeLabel} variant="${"primary"}" class="maximize-button" id="windows-button-maximize" @click=${this.onMaximize}>
2775              <${t}>${'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 5H22V19H2V5ZM4 17H20V7H4V17Z" fill="currentColor"></path><path d="M5 8H13V13H5V8Z" fill="currentColor"></path></svg>'}</${t}>
2776            </${e}>
2777            <${e} label=${this.safeCloseLabel} aria-label=${this.safeCloseLabel} variant="${"primary"}" class="close-button" id="windows-button-close" @click=${this.onClose}>
2778              <${t}>${Sl}</${t}>
2779            </${e}>
2780          </div>`)}
2781      </div>
2782    `}connectedCallback(){super.connectedCallback(),"macOS"===this.platform&&(window.addEventListener("blur",this.onBlurHandler),window.addEventListener("focus",this.onFocusHandler))}disconnectedCallback(){super.disconnectedCallback(),"macOS"===this.platform&&(window.removeEventListener("blur",this.onBlurHandler),window.removeEventListener("focus",this.onFocusHandler))}handleSlotChange(){this.requestUpdate()}}fv.baseName="top-bar",fv.styles=b(":host{width:100%}:host .container{height:var(--goto-spacing-09);background-color:var(--goto-surface-color-default);padding:var(--goto-spacing-00)var(--goto-spacing-04);-webkit-app-region:drag;user-select:none;flex-direction:row;align-items:center;display:flex}:host .logo{flex-direction:row;align-items:center;display:inline-flex}:host ::slotted([slot=logo]){height:var(--goto-spacing-09);width:var(--goto-spacing-09);margin-right:var(--goto-spacing-04);--goto-icon-size:var(--goto-spacing-09)}:host .separator{min-width:var(--goto-spacing-03);height:var(--goto-spacing-06);border-right:1px solid var(--goto-border-color-default)}:host .submenu{height:var(--goto-spacing-06);justify-content:center;align-items:center;display:inline-flex}:host ::slotted([slot=submenu]){height:var(--goto-spacing-06);width:112px;margin-left:var(--goto-spacing-03);margin-right:var(--goto-spacing-04);-webkit-app-region:no-drag}:host .search-container{justify-content:center;align-items:center;width:100%;display:inline-flex}:host ::slotted([slot=search-field]){-webkit-app-region:no-drag;min-width:290px;max-width:480px}:host .sign-in-container{padding:var(--goto-spacing-00)var(--goto-spacing-03)}:host ::slotted([slot=sign-in-button]){-webkit-app-region:no-drag}:host .extra-element-container{padding-left:var(--goto-spacing-03)}:host ::slotted([slot=extra-element-container]){align-items:center;gap:var(--goto-spacing-03);-webkit-app-region:no-drag;flex-direction:row;display:inline-flex}:host .button-container{padding-left:var(--goto-spacing-03);flex-direction:row;align-items:center;display:inline-flex}:host ::slotted([slot=button-container]){-webkit-app-region:no-drag;flex-direction:row;display:inline-flex}:host([platform=macOS]) .traffic-light-container{flex-direction:row;align-items:center;gap:9px;display:flex}:host([platform=macOS]) .traffic-light-container .traffic-light{padding:var(--goto-spacing-00);box-sizing:border-box;-webkit-app-region:no-drag;border:1px solid #0000000f;border-radius:100%;outline:none;align-items:center;width:12px;height:12px;display:flex;position:relative}:host([platform=macOS]) .traffic-light-container .close-button svg{visibility:hidden;color:#4d0000}:host([platform=macOS]) .traffic-light-container .close-button:active{background-color:#bf4942!important}:host([platform=macOS]) .traffic-light-container .close-button:active svg{color:#190000}:host([platform=macOS]) .traffic-light-container .minimize-button svg{visibility:hidden;color:#995700}:host([platform=macOS]) .traffic-light-container .minimize-button:active{background-color:#bf8e22!important}:host([platform=macOS]) .traffic-light-container .minimize-button:active svg{color:#592800}:host([platform=macOS]) .traffic-light-container .maximize-button svg{visibility:hidden;color:#006500}:host([platform=macOS]) .traffic-light-container .maximize-button:active{background-color:#1d9730!important}:host([platform=macOS]) .traffic-light-container .maximize-button:active svg{color:#003200}:host([platform=macOS]) .traffic-light-container:hover .close-button{background-color:#ec6a5e}:host([platform=macOS]) .traffic-light-container:hover .minimize-button{background-color:#f5bf4f}:host([platform=macOS]) .traffic-light-container:hover .maximize-button{background-color:#61c554}:host([platform=macOS]) .traffic-light-container:hover svg{visibility:visible}:host([platform=macOS][state=focus]) .close-button{background-color:#ec6a5e}:host([platform=macOS][state=focus]) .minimize-button{background-color:#f5bf4f}:host([platform=macOS][state=focus]) .maximize-button{background-color:#61c554}:host([platform=windows]) .windows-container{flex-direction:row;display:flex}"),h([Te({reflect:!0})],fv.prototype,"platform",void 0),h([Te({reflect:!0})],fv.prototype,"state",void 0),h([Te({attribute:"close-label"})],fv.prototype,"closeLabel",void 0),h([Te({attribute:"minimize-label"})],fv.prototype,"minimizeLabel",void 0),h([Te({attribute:"maximize-label"})],fv.prototype,"maximizeLabel",void 0),h([Ne({slot:"logo"})],fv.prototype,"logoNodes",void 0),h([Ne({slot:"submenu"})],fv.prototype,"submenuNodes",void 0),function(e={}){gl(e),fl(e),To({prefix:e.prefix}),d(fv,e)}();class mv extends oi{constructor(e,t){super(e,t),this.observer=null,t.childList=!0}observe(){null===this.observer&&(this.observer=new MutationObserver(this.handleEvent.bind(this))),this.observer.observe(this.target,this.options)}disconnect(){this.observer.disconnect()}getNodes(){return"subtree"in this.options?Array.from(this.target.querySelectorAll(this.options.selector)):Array.from(this.target.childNodes)}}function vv(e){return Zl(e)&&"treeitem"===e.getAttribute("role")}class bv extends Jn{constructor(){super(...arguments),this.expanded=!1,this.focusable=!1,this.isNestedItem=()=>vv(this.parentElement),this.handleExpandCollapseButtonClick=e=>{this.disabled||e.defaultPrevented||(this.expanded=!this.expanded)},this.handleFocus=e=>{this.setAttribute("tabindex","0")},this.handleBlur=e=>{this.setAttribute("tabindex","-1")}}expandedChanged(){this.$fastController.isConnected&&this.$emit("expanded-change",this)}selectedChanged(){this.$fastController.isConnected&&this.$emit("selected-change",this)}itemsChanged(e,t){this.$fastController.isConnected&&this.items.forEac
2782h(e=>{vv(e)&&(e.nested=!0)})}static focusItem(e){e.focusable=!0,e.focus()}childItemLength(){const e=this.childItems.filter(e=>vv(e));return e?e.length:0}}nn([Qr({mode:"boolean"})],bv.prototype,"expanded",void 0),nn([Qr({mode:"boolean"})],bv.prototype,"selected",void 0),nn([Qr({mode:"boolean"})],bv.prototype,"disabled",void 0),nn([Nr],bv.prototype,"focusable",void 0),nn([Nr],bv.prototype,"childItems",void 0),nn([Nr],bv.prototype,"items",void 0),nn([Nr],bv.prototype,"nested",void 0),nn([Nr],bv.prototype,"renderCollapsedChildren",void 0),oc(bv,tc);class yv extends(a(bv,"tree-item")){connectedCallback(){if(super.connectedCallback(),!this.querySelector('[slot="expand-collapse-glyph"]')){const e=document.createElement(u(mr));e.setAttribute("slot","expand-collapse-glyph"),e.innerHTML=ui,this.appendChild(e)}}}h([Qr({mode:"boolean"})],yv.prototype,"unread",void 0);const wv={baseName:"tree-item",template:(e,t)=>{return ri`
2783    <template
2784        role="treeitem"
2785        slot="${e=>e.isNestedItem()?"item":void 0}"
2786        tabindex="-1"
2787        class="${e=>e.expanded?"expanded":""} ${e=>e.selected?"selected":""} ${e=>e.nested?"nested":""}
2788            ${e=>e.disabled?"disabled":""}"
2789        aria-expanded="${e=>e.childItems&&e.childItemLength()>0?e.expanded:void 0}"
2790        aria-selected="${e=>e.selected}"
2791        aria-disabled="${e=>e.disabled}"
2792        @focusin="${(e,t)=>e.handleFocus(t.event)}"
2793        @focusout="${(e,t)=>e.handleBlur(t.event)}"
2794        ${r={property:"childItems",filter:ni()},"string"==typeof r&&(r={property:r}),new $o("fast-children",mv,r)}
2795    >
2796        <div class="positioning-region" part="positioning-region">
2797            <div class="content-region" part="content-region">
2798                ${Aa(e=>e.childItems&&e.childItemLength()>0,ri`
2799                        <div
2800                            aria-hidden="true"
2801                            class="expand-collapse-button"
2802                            part="expand-collapse-button"
2803                            @click="${(e,t)=>e.handleExpandCollapseButtonClick(t.event)}"
2804                            ${li("expandCollapseButton")}
2805                        >
2806                            <slot name="expand-collapse-glyph">
2807                                ${t.expandCollapseGlyph||""}
2808                            </slot>
2809                        </div>
2810                    `)}
2811                ${nc(0,t)}
2812                <slot></slot>
2813                ${rc(0,t)}
2814            </div>
2815        </div>
2816        ${Aa(e=>e.childItems&&e.childItemLength()>0&&(e.expanded||e.renderCollapsedChildren),ri`
2817                <div role="group" class="items" part="items">
2818                    <slot name="item" ${si("items")}></slot>
2819                </div>
2820            `)}
2821    </template>
2822`;var r},styles:(e,t)=>ml`
2823    ${':host{--neutral-layer-card-container:#333;--neutral-layer-floating:#4a4a4a;--neutral-layer-1:#3b3b3b;--neutral-layer-2:#333;--neutral-layer-3:#2b2b2b;--neutral-layer-4:#242424;--fill-color:#3b3b3b;--accent-fill-rest:#c01754;--accent-fill-hover:#da1a5f;--accent-fill-active:#a01346;--accent-fill-focus:#c01754;--accent-foreground-rest:#ec87ab;--accent-foreground-hover:#ef9dbb;--accent-foreground-active:#e978a1;--accent-foreground-focus:#ec87ab;--neutral-fill-rest:#4d4d4d;--neutral-fill-hover:#545454;--neutral-fill-active:#484848;--neutral-fill-focus:#3b3b3b;--neutral-fill-input-rest:#3b3b3b;--neutral-fill-input-hover:#3b3b3b;--neutral-fill-input-active:#3b3b3b;--neutral-fill-input-focus:#3b3b3b;--neutral-fill-stealth-rest:#3b3b3b;--neutral-fill-stealth-hover:#484848;--neutral-fill-stealth-active:#424242;--neutral-fill-stealth-focus:#3b3b3b;--neutral-fill-strong-rest:#a7a7a7;--neutral-fill-strong-hover:#bcbcbc;--neutral-fill-strong-active:#9a9a9a;--neutral-fill-strong-focus:#a7a7a7;--neutral-fill-layer-rest:#424242;--focus-stroke-outer:#909090;--focus-stroke-inner:#730e32;--neutral-foreground-hint:#a7a7a7;--neutral-foreground-rest:#fff;--neutral-stroke-rest:#7b7b7b;--neutral-stroke-hover:#a2a2a2;--neutral-stroke-active:#646464;--neutral-stroke-focus:#7b7b7b;--neutral-stroke-divider-rest:#4f4f4f;--tree-item-expand-collapse-hover:#545454;--tree-item-expand-collapse-selected-hover:#5a5a5a}@keyframes treeItemLoading{0%{opacity:0}
2823to{opacity:1}}:host([hidden]){display:none}:host{contain:content;color:var(--neutral-foreground-rest);background:var(--neutral-fill-stealth-rest);cursor:pointer;font-family:var(--body-font,aktiv-grotesk,"Segoe UI",Arial,Helvetica,sans-serif);--expand-collapse-button-size:calc((var(--base-height-multiplier,10) + var(--densitity,0))*var(--design-unit,4)*1px);--tree-item-nested-width:0;outline:none;display:block;position:relative}:host(:focus)>.positioning-region,:host(:focus) .content-region{outline:none}:host(:focus-visible) .positioning-region{border:var(--focus-stroke-outer)calc(var(--stroke-width,1)*1px)solid;border-radius:calc(var(--control-corner-radius,4)*1px);color:var(--neutral-foreground-rest)}.positioning-region{box-sizing:border-box;background:var(--neutral-fill-stealth-rest);border:transparent calc(var(--stroke-width,1)*1px)solid;height:calc(((var(--base-height-multiplier,10) + var(--densitity,0))*var(--design-unit,4) + 1)*1px);display:flex;position:relative}.positioning-region:before{content:"";width:var(--tree-item-nested-width);flex-shrink:0;display:block}:host(:not([disabled])) .positioning-region:hover{background:var(--neutral-fill-stealth-hover)}:host(:not([disabled])) .positioning-region:active{background:var(--neutral-fill-stealth-active)}.content-region{white-space:nowrap;width:100%;height:calc((var(--base-height-multiplier,10) + var(--densitity,0))*var(--design-unit,4)*1px);font-size:var(--type-ramp-base-font-size,14px);line-height:var(--type-ramp-base-line-height,20px);align-items:center;margin-inline-start:calc(var(--design-unit,4)*2px + 8px);font-weight:400;display:inline-flex}.items{font-size:calc(1em + (var(--design-unit,4) + 16)*1px)}.expand-collapse-button{width:calc((var(--base-height-multiplier,10)/2*var(--design-unit,4) + var(--design-unit,4)*var(--densitity,0)/2 + var(--design-unit,4)*2)*1px);height:calc((var(--base-height-multiplier,10)/2*var(--design-unit,4) + var(--design-unit,4)*var(--densitity,0)/2 + var(--design-unit,4)*2)*1px);cursor:pointer;background:0 0;border:none;outline:none;justify-content:center;align-items:center;margin-left:6px;margin-right:6px;padding:0;display:flex}.expand-collapse-glyph{pointer-events:none;fill:currentColor;width:16px;height:16px;transition:transform .1s linear}.start,.end{fill:currentColor;display:flex}::slotted(svg){width:16px;height:16px}.start{margin-inline-end:calc(var(--design-unit,4)*2px + 2px)}.end{margin-inline-start:calc(var(--design-unit,4)*2px + 2px)}:host([expanded])>.items{animation:10ms ease-in forwards treeItemLoading}:host([disabled]) .content-region{opacity:var(--disabled-opacity,.3);cursor:not-allowed}:host(.nested) .content-region{margin-inline-start:var(--expand-collapse-button-size);position:relative}:host(.nested) .expand-collapse-button{position:absolute}:host(.nested:not([disabled])) .expand-collapse-button:hover{background:var(--tree-item-expand-collapse-hover)}:host([selected]) .positioning-region{background:var(--neutral-fill-rest)}:host([selected]:not([disabled])) .positioning-region:hover{background:var(--neutral-fill-hover)}:host([selected]:not([disabled])) .positioning-region:active{background:var(--neutral-fill-active)}:host([selected]:not([disabled])) .expand-collapse-button:hover{background:var(--tree-item-expand-collapse-selected-hover)}:host([selected]):after{background:var(--accent-foreground-rest);border-radius:calc(var(--control-corner-radius,4)*1px);content:"";top:calc((var(--base-height-multiplier,10) + var(--densitity,0))*var(--design-unit,4)/4*1px);width:3px;height:calc((var(--base-height-multiplier,10) + var(--densitity,0))*var(--design-unit,4)/2*1px);display:block;position:absolute}::slotted(chameleon-tree-item){--tree-item-nested-width:1em;--expand-collapse-button-nested-width:calc((var(--base-height-multiplier,10) + var(--densitity,0))*var(--design-unit,4)*-1px)}.expand-collapse-glyph{transform:rotate(0)}:host(.nested) .expand-collapse-button{left:var(--expand-collapse-button-nested-width,calc((var(--base-height-multiplier,10) + var(--densitity,0))*var(--design-unit,4)*-1px))}:host([selected]):after{left:calc(var(--focus-stroke-width,2)*1px)}:host([expanded])>.positioning-region .expand-collapse-glyph{transform:rotate(45deg)}:host{min-height:var(--goto-spacing-07);background-color:#0000;border:1px solid #0000;margin:.125rem;box-sizing:border-box!important}:host .expand-collapse-button{--goto-icon-color:var(--goto-icon-color-default);--goto-icon-size:var(--goto-spacing-05)}
2823:host .end{margin-right:var(--goto-spacing-03);flex-grow:1;justify-content:flex-end}:host .positioning-region{color:var(--goto-type-color-default);background-color:#0000;border:none}:host([unread]) .positioning-region slot{font:var(--goto-button-medium)}:host([size=small][unread]) .positioning-region slot{font:var(--goto-button-small)}:host([size=large][unread]) .positioning-region slot{font:var(--goto-button-large)}:host([selected]) .end{--goto-icon-color:var(--goto-icon-color-inverted);--goto-presence-available:var(--goto-icon-color-inverted);--goto-presence-busy:var(--goto-icon-color-inverted);--goto-presence-away:var(--goto-icon-color-inverted);--goto-presence-dnd:var(--goto-icon-color-inverted);--goto-presence-offline:var(--goto-icon-color-inverted);--goto-badge-color:var(--goto-icon-color-default);--goto-badge-background-color:var(--goto-surface-color-default)}:host([selected]) .positioning-region{background-color:var(--goto-interactive-color-secondary-pressed);color:var(--goto-type-color-default)}:host([selected]):after{display:none}:host(:focus-visible){border-color:var(--goto-focus-border-color-default);box-shadow:0 0 0 2px var(--goto-focus-color-highlight-default)}:host(:focus-visible) .positioning-region{border-radius:var(--goto-radius-none);color:var(--goto-type-color-default);border:none}:host([selected]:focus-visible) .positioning-region{color:var(--goto-type-color-inverted)}:host(.nested) .expand-collapse-button:hover{background-color:#0000}:host([size=small]){min-height:var(--goto-spacing-06)}:host([size=small]) .expand-collapse-button{--goto-icon-size:var(--goto-spacing-04)}:host([size=small]) .positioning-region slot{font:var(--goto-caption-medium)}:host([size=small]) .positioning-region,:host([size=small]) .content-region{height:var(--goto-spacing-06)}:host([size=small]) .items{cursor:default}:host([size=large]){min-height:var(--goto-spacing-08)}:host([size=large]) .expand-collapse-button{--goto-icon-size:var(--goto-spacing-06)}:host([size=large]) .positioning-region slot{font:var(--goto-body-medium)}:host([size=large]) .positioning-region,:host([size=large]) .content-region{height:var(--goto-spacing-08)}:host([expanded]) .expand-collapse-button{transform:rotate(90deg)}:host([selected]) .expand-collapse-button{--goto-icon-color:var(--goto-type-color-default)}:host([disabled]) .expand-collapse-button{--goto-icon-color:var(--goto-icon-color-disabled)}:host([disabled]) .content-region,:host([disabled]) .expand-collapse-button{cursor:default}:host([disabled]) .positioning-region{color:var(--goto-icon-color-disabled)}:host([disabled]) .positioning-region:hover,:host([disabled]) .positioning-region:active{background-color:#0000}:host(:not([disabled])) .positioning-region:hover{background-color:var(--goto-interactive-color-secondary-hover)}:host(:not([disabled])) .positioning-region:active,:host([selected]:not([disabled])) .positioning-region:hover{background-color:var(--goto-interactive-color-secondary-pressed);color:var(--goto-type-color-default)}:host(.nested:not([disabled])) .expand-collapse-button:hover{background-color:#0000}'}
2824  `},xv=yv.compose(wv);class _v extends Jn{constructor(){super(...arguments),this.currentFocused=null,this.handleFocus=e=>{if(!(this.slottedTreeItems.length<1))return e.target===this?(null===this.currentFocused&&(this.currentFocused=this.getValidFocusableItem()),void(null!==this.currentFocused&&bv.focusItem(this.currentFocused))):void(this.contains(e.target)&&(this.setAttribute("tabindex","-1"),this.currentFocused=e.target))},this.handleBlur=e=>{e.target instanceof HTMLElement&&(null===e.relatedTarget||!this.contains(e.relatedTarget))&&this.setAttribute("tabindex","0")},this.handleKeyDown=e=>{if(e.defaultPrevented)return;if(this.slottedTreeItems.length<1)return!0;const t=this.getVisibleNodes();switch(e.key){case"Home":return void(t.length&&bv.focusItem(t[0]));case"End":return void(t.length&&bv.focusItem(t[t.length-1]));case vi:if(e.target&&this.isFocusableElement(e.target)){const t=e.target;t instanceof bv&&t.childItemLength()>0&&t.expanded?t.expanded=!1:t instanceof bv&&t.parentElement instanceof bv&&bv.focusItem(t.parentElement)}return!1;case bi:if(e.target&&this.isFocusableElement(e.target)){const t=e.target;t instanceof bv&&t.childItemLength()>0&&!t.expanded?t.expanded=!0:t instanceof bv&&t.childItemLength()>0&&this.focusNextNode(1,e.target)}return;case mi:return void(e.target&&this.isFocusableElement(e.target)&&this.focusNextNode(1,e.target));case yi:return void(e.target&&this.isFocusableElement(e.target)&&this.focusNextNode(-1,e.target));case"Enter":return void this.handleClick(e)}return!0},this.handleSelectedChange=e=>{if(e.defaultPrevented)return;if(!(e.target instanceof Element&&vv(e.target)))return!0;const t=e.target;t.selected?(this.currentSelected&&this.currentSelected!==t&&(this.currentSelected.selected=!1),this.currentSelected=t):t.selected||this.currentSelected!==t||(this.currentSelected=null)},this.setItems=()=>{const e=this.treeView.querySelector("[aria-selected='true']");this.currentSelected=e,null!==this.currentFocused&&this.contains(this.currentFocused)||(this.currentFocused=this.getValidFocusableItem()),this.nested=this.checkForNestedItems(),this.getVisibleNodes().forEac
2824h(e=>{vv(e)&&(e.nested=this.nested)})},this.isFocusableElement=e=>vv(e),this.isSelectedElement=e=>e.selected}slottedTreeItemsChanged(){this.$fastController.isConnected&&this.setItems()}connectedCallback(){super.connectedCallback(),this.setAttribute("tabindex","0"),Tr.queueUpdate(()=>{this.setItems()})}handleClick(e){if(e.defaultPrevented)return;if(!(e.target instanceof Element&&vv(e.target)))return!0;const t=e.target;t.disabled||(t.selected=!t.selected)}focusNextNode(e,t){const r=this.getVisibleNodes();if(!r)return;const n=r[r.indexOf(t)+e];Zl(n)&&bv.focusItem(n)}getValidFocusableItem(){const e=this.getVisibleNodes();let t=e.findIndex(this.isSelectedElement);return-1===t&&(t=e.findIndex(this.isFocusableElement)),-1!==t?e[t]:null}checkForNestedItems(){return this.slottedTreeItems.some(e=>vv(e)&&e.querySelector("[role='treeitem']"))}getVisibleNodes(){return function(e,t){if(e&&Zl(e))return Array.from(e.querySelectorAll(t)).filter(e=>null!==e.offsetParent)}(this,"[role='treeitem']")||[]}}nn([Qr({attribute:"render-collapsed-nodes"})],_v.prototype,"renderCollapsedNodes",void 0),nn([Nr],_v.prototype,"currentSelected",void 0),nn([Nr],_v.prototype,"slottedTreeItems",void 0);class kv extends(a(_v,"tree-view")){constructor(){super(...arguments),this.size="medium"}sizeChanged(e,t){const r=u(yv,{optional:!0});r&&this.querySelectorAll(r).forEach(e=>{e.setAttribute("size",t)})}}h([Qr],kv.prototype,"size",void 0);const Cv={baseName:"tree-view",template:(e,t)=>
2824ri`
2825    <template
2826        role="tree"
2827        ${li("treeView")}
2828        @keydown="${(e,t)=>e.handleKeyDown(t.event)}"
2829        @focusin="${(e,t)=>e.handleFocus(t.event)}"
2830        @focusout="${(e,t)=>e.handleBlur(t.event)}"
2831        @click="${(e,t)=>e.handleClick(t.event)}"
2832        @selected-change="${(e,t)=>e.handleSelectedChange(t.event)}"
2833    >
2834        <slot ${si("slottedTreeItems")}></slot>
2835    </template>
2836`,styles:(e,t)=>ml`
2837    ${":host([hidden]){display:none}:host{flex-direction:column;align-items:stretch;min-width:fit-content;font-size:0;display:flex}:host:focus-visible{outline:none}:host{font:var(--goto-body-small);width:100%;box-sizing:border-box!important}"}
2838  `},Sv=kv.compose(Cv);!function(e){vr({prefix:e}),To({prefix:e,node:void 0},xv,Sv)}(),Gl();var Ev='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M18.7071 14.7071L17.2929 16.1213L12 10.8284L6.70709 16.1213L5.29288 14.7071L12 8L18.7071 14.7071Z" fill="currentColor"></path></svg>',Iv='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.29291 9.29291L6.70712 7.87869L12 13.1716L17.2929 7.87869L18.7071 9.29291L12 16L5.29291 9.29291Z" fill="currentColor"></path></svg>';class Av extends(a(Jn,"autocomplete")){constructor(){super(...arguments),this.variant="select",this.size="medium",this.disabled=!1,this.multiple=!1,this.error=!1,this.success=!1,this.fullWidth=!1,this.noOptionsText="No Options",this.clearButtonLabel="",this.toggleButtonLabel="",this.placeholder=void 0,this.loading=!1,this.maxSelectableItems=void 0,this.highlightInnerText=!1,this.open=!1,this.autocomplete="off",this.disableFiltering=!1,this.position="bottom",this.handleDisabledKeydown=e=>{this.hasAttribute("disabled")&&"Tab"!==e.key&&e.preventDefault()},this.resizeListboxCallback=()=>{this.inDialog&&this.resizeListboxWhenInDialog()},this.closeListbox=()=>{this.open=!1},this.resizeListboxWhenInDialog=()=>{this.control&&this.listbox&&(this.listbox.style.position="fixed",this.listbox.style.width=`${this.getBoundingClientRect().width}px`,this.positionIsAbove?(this.listbox.style.top&&this.listbox.style.removeProperty("top"),this.listbox.style.left=`${this.getBoundingClientRect().x}px`):(this.listbox.style.bottom&&this.listbox.style.removeProperty("bottom"),this.listbox.style.top=`${this.controlBoundingRect.y+this.controlBoundingRect.height}px`,this.listbox.style.left=`${this.getBoundingClientRect().x}px`))},this.resizeListboxWhenDialogScrolls=()=>{if(this.parentDialogContent=this.findParentDialogContent(),this.parentDialogContent)return this.parentDialogContent?.addEventListener("scroll",this.closeListbox),window.addEventListener("resize",this.closeListbox),()=>{this.resetListbox(),this.parentDialogContent?.removeEventListener("scroll",this.closeListbox),window.removeEventListener("resize",this.closeListbox)}},this.resizeListbox=new ResizeObserver(this.resizeListboxCallback),this._value="",this._options=[],this.optionFilter=e=>e.nodeName===u(Tm),this.filter="",this.listboxId=xa("listbox"),this.currentIndex=-1,this.controlId=xa("autocomplete-control-"),this.selectedOptions=[],this.slottedOptions=[],this.listboxStart=[],this.filteredOptions=[],this.needToRemoveHighlightingBeforeApplying=!1,this.highlightNode=(e,t)=>{t&&Array.from(e.childNodes).forEach(e=>{if(e.nodeType===Node.TEXT_NODE)this.highlightTextNode(e,t);else if(e.nodeType===Node.ELEMENT_NODE){if(this.shouldSkipHighlighting(e))return;this.highlightNode(e,t)}})}}openChanged(e,t){if(t)this.setPositioning(),this.$emit("open",null,{bubbles:!1});else if(this.currentIndex=-1,this.$emit("close",null,{bubbles:!1}),this.options)for(const e of this.options)this.isOptionSelected(e)||(e.selected=!1)}loadingChanged(e,t){if(this.loaderOption?.toggleAttribute("hidden",!t),this.options)for(const e of this.options)e.classList.contains("listbox-start-option")||e.toggleAttribute("hidden",t)}positionChanged(){this.setPositioning()}connectedCallback(){super.connectedCallback(),this.inDialog&&(this.resizeListbox.observe(this.listbox),this.dialogScrollCleanup=this.resizeListboxWhenDialogScrolls()),this.control?.addEventListener("keydown",this.handleDisabledKeydown)}
2838get controlBoundingRect(){return this.control.getBoundingClientRect()}get positionIsAbove(){return!!this.position&&"top"===this.position}resetListbox(){this.listbox.style.removeProperty("position"),this.listbox.style.removeProperty("width"),this.listbox.style.removeProperty("top"),this.listbox.style.removeProperty("left")}findParentDialogContent(){const e=Gi(this,e=>"CHAMELEON-DIALOG"===e.tagName||e.tagName===u(Ag,{optional:!0}));return e?.shadowRoot&&Zi(e?.shadowRoot,e=>e.part.contains("body"))}chipSize(){switch(this.size){case"small":return"xsmall";case"medium":default:return"small";case"large":case"xlarge":return"medium"}}get chips(){return this.selectedOptions.map(e=>({avatar:e.querySelector('[slot="avatar"]'),option:e}))}slottedOptionsChanged(e,t){const r=this.shadowRoot?.querySelector(".listbox-start-option");r&&!t.includes(r)?this.options=[r,...t.filter(e=>this.optionFilter(e))]:this.options=t.filter(e=>this.optionFilter(e));const n=this.options.length;this.options.forEach((e,t)=>{e.id||(e.id=xa("option-")),e.ariaPosInSet=`${t+1}`,e.ariaSetSize=n.toString(),(e.default||e.selected)&&this.selectOption(e,"attribute");const r=this.selectedOptions.findIndex(t=>e.value===t.value);r>-1&&!this.selectedOptions[r].selected&&(this.selectedOptions[r].selected=!0)}),this.filterOptions(this.filter)}slottedChipsChanged(e,t){if(t&&t.length>0)for(const e of t)"small"!==e.getAttribute("size")&&e.setAttribute("size","small")}get shouldShowNoOption(){return!0!==this.loading&&(!this.disableFiltering&&0===this.filteredOptions?.length||this.disableFiltering&&0===this.slottedOptions?.length)}get displayedPlaceholder(){return 0===this.selectedOptions.length?this.placeholder:void 0}get firstOption(){return this.disableFiltering?this.slottedOptions[0]:this.filteredOptions[0]}get isSearchType(){return"search"===this.variant}get hasSelectedOption(){return this.selectedOptions&&this.selectedOptions.length>0}get options(){return $r.track(this,"value"),this.filteredOptions?.length>0?this.filteredOptions:this._options}set options(e){this._options=e,$r.notify(this,"options")}get value(){return $r.track(this,"value"),this._value}set value(e){this._value=e,$r.notify(this,"value")}get ariaActiveDescandant(){return this.open&&this.currentIndex>=0&&this.currentIndex<this.options.length?this.options[this.currentIndex].id:null}get isMaxSelectableItemsReached(){return this.multiple&&this.maxSelectableItems&&this.selectedOptions.length>=(this.maxSelectableItems??-1)}get hasDefaultOptions(){return this.selectedOptions.length>0&&this.selectedOptions.some(e=>e.default)}filterFunction(e,t){return this.getOptionText(t).toLowerCase().startsWith(e.toLowerCase())??!1}disconnectedCallback(){super.disconnectedCallback(),this.autoPositioningCleanup?.(),this.dialogScrollCleanup?.(),this.control?.removeEventListener("keydown",this.handleDisabledKeydown),this.resizeListbox.disconnect()}handleClick(e){if(!this.disabled&&!e.defaultPrevented){if(this.open){const t=e.target.closest("option, [role=option]");if(!t||t.disabled)return;const r=this.selectedOptions.findIndex(e=>this.getOptionText(e)===this.getOptionText(t))>-1;r&&this.multiple?this.deselectOption(t,"click"):this.isMaxSelectableItemsReached||this.selectOption(t,"click"),this.control.focus({preventScroll:!0})}return this.open||this.isSearchType?this.open=!1:this.open=!0,!0}}handleOptionSelectedChange(e){const t=this.slottedOptions.find(t=>t.value===e.detail.value),r=this.selectedOptions.find(t=>t.value===e.detail.value),n=this.open,o=!t||t.disabled,i=e.detail.selected&&r||!e.detail.selected&&!r;if(n||o||i)return;const s=e.detail.selected&&!r,a=!e.detail.selected&&r;s&&this.selectOption(t,"option-selected-change"),a&&this.deselectOption(t,"option-selected-change")}handleChipClose(e){if(this.disabled)return;e.preventDefault();const t=e.target.getAttribute("data-option-id");if(!t)return void console.warn("Chip element inside Autocomplete must have a data-option-id attribute set to the id of the option element it refers to for the close functionality to work.");const r=this.selectedOptions.find(e=>e.id===t);r&&(this.deselectOption(r,"chip-close"),this.control.focus())}handleInput(e){e.stopPropagation(),this.currentIndex>0&&!this.isOptionSelected(this.options[this.currentIndex])&&(this.options[this.currentIndex].selected=!1),this.currentIndex=-1,this.isSearchType&&""===e.target.value?this.open=!1:this.open=!0,this.filter=e.target.value,this.filterOptions(this.filter),this.$emit("input",{value:e.target.value},{bubbles:!1})}handleBlur(e){const t=this.shadowRoot?.querySelector(".chevron");this.control.value&&!this.hasSelectedOption&&(this.filter="",this.control.value="",this.filterOptions(this.filter),this.$emit("input",{value:""})),this.multiple||""!==this.control.value||this.deselectOptions("blur"),!this.multiple&&this.hasSelectedOption&&""!==this.control.value&&this.control.value!==this.getOptionText(this.selectedOptions[0])&&(this.control.value=this.getOptionText(this.selectedOptions[0]),this.filter=this.getOptionText(this.selectedOptions[0]),this.filterOptions(this.filter),this.$emit("input",{value:this.getOptionText(this.selectedOptions[0])})),(this.isSearchType||e.relatedTarget!==t)&&(0!==this.listboxStart.length&&e.relatedTarget===this.listboxStart[0]||(this.open=!1))}handleListboxStartOptionClick(e){if("listbox-start"===e.target.slot)return;const t=this.shadowRoot?.querySelector('slot[name="listbox-start"]'),r=t?.assignedElements();r.length>0&&r[0].dispatchEvent(new Event("click",{bubbles:!0}))}keydownHandler(e){const t=e.key;if(e.stopPropagation(),e.ctrlKey||e.shiftKey||this.disabled)return!0;switch(t){case"Enter":if(this.open){if(-1===this.currentIndex){if(this.isSearchType&&0===this.filteredOptions.length&&this.selectOption(this.firstOption,"enter"),this.filteredOptions.length>0){const e=this.filteredOptions[0];if(e instanceof Tm&&!e.classList.contains("listbox-start-option")){const t=this.selectedOptions.findIndex(t=>this.getOptionText(t)===this.getOptionText(e))>-1;if(t){const t=this.shadowRoot?.querySelector("input#autocomplete-control");t&&(t.value=this.getOptionText(e)),this.filter=this.getOptionText(e),this.$emit("input",{value:this.filter},{bubbles:!1}),this.multiple&&!this.isSearchType||(this.open=!1)}else this.open&&!this.isMaxSelectableItemsReached&&this.selectOption(e,"enter")}}return!0}const e=this.getElementAtIndex(this.currentIndex);if(!(e instanceof Tm)||e.classList.contains("listbox-start-option"))return e.click(),!0;{const t=this.selectedOptions.findIndex(t=>this.getOptionText(t)===this.getOptionText(e))>-1;this.open&&e&&!t&&!this.isMaxSelectableItemsReached&&this.selectOption(e,"enter")}this.multiple&&!this.isSearchType||(this.open=!1)}else this.open=!0;break;case"Escape":if(this.open){this.open=!1;break}this.value="",this.control.value="",this.filter="",this.filterOptions(this.filter),this.control.focus();break;case"Tab":{const e=this.options[this.currentIndex],t=this.selectedOptions.findIndex(t=>this.getOptionText(t)===this.getOptionText(e))>-1;return e&&!t&&this.selectOption(e,"tab"),!this.open||(this.open=!1,!0)}case"ArrowUp":case"ArrowDown":if(this.open||this.isSearchType||(this.open=!0),e.altKey)break;(this.filteredOptions.length>0||this.disableFiltering&&this.slottedOptions.length>0)&&("ArrowUp"===e.key&&this.moveToPreviousOption(),"ArrowDown"===e.key&&this.moveToNextOption());break;case"Home":this.control.selectionStart=0,this.control.selectionEnd=0,e.preventDefault();break;case"End":this.control.selectionStart=this.control.value.length,this.control.selectionEnd=this.control.value.length,e.preventDefault();break;case"Backspace":{const t=u(zh),r=u($g);return this.multiple&&this.selectedOptions.length>0&&""===this.control.value&&(this.shadowRoot?.querySelector(".control")?.querySelector("[name='chips']")?.querySelector(`${t}:last-of-type`)?.shadowRoot?.querySelector(`${r}`)?.focus(),e.preventDefault()),!0}default:return!0}}handleChevronTabindex(){if(this.chevronButton.hasAttribute("disabled"))return"-1"}handleChevronClick(e){this.disabled||(this.open?this.open=!1:this.open=!0,this.control.focus(),e.stopPropagation())}handleClearButtonClick(e){this.disabled||(this.deselectOptions("clear-click"),this.$emit("clear-click"),this.control.focus(),e.stopPropagation())}clear(){this.disabled||this.deselectOptions("clear-function")}setPositioning(){this instanceof HTMLElement&&this.isConnected&&(this.autoPositioningCleanup?.(),Tr.queueUpdate(()=>{this.autoPositioningCleanup=ua(this.controlBox,this.listbox,()=>{fa(this.controlBox,this.listbox,{placement:this.position,middleware:[pa()]}).then(({y:e,placement:t})=>{this.position!==t&&(this.position=t);const r="bottom"===t?e+2:e-2;this.style.setProperty("--autocomplete-listbox-position",`${r}px`)})})}))}filterOptions(e){this.disableFiltering||(this.filteredOptions=this.slottedOptions.filter(t=>this.filterFunction(e,t))),this.slottedOptions?.forEach(t=>{const r=this.disableFiltering||this.filterFunction(e??"",t);t.toggleAttribute("hidden",!r),t.classList.toggle("hidden",!r),this.renderHighlighting(t,e)}),this.filteredOptions||this.filter||(this.filteredOptions=this.slottedOptions)}renderHighlighting(e,t){this.needToRemoveHighlightingBeforeApplying&&(e.querySelectorAll(".highlight").forEach(e
2838=>{e.replaceWith(...e.childNodes)}),e.normalize()),t&&this.highlightInnerText&&(this.highlightNode(e,t),this.needToRemoveHighlightingBeforeApplying=!0)}highlightTextNode(e,t){const r=e?.textContent??"",n=Kg(r,Wg(r,t,{insideWords:!0}));let o=e;n.forEach(e=>{const t=o.splitText(e.text.length);if(e.highlight){const e=document.createElement("span");e.className="highlight",e.style.backgroundColor="var(--goto-highlight-background-color)",e.style.color="var(--goto-highlight-type-color)",e.style.font="var(--goto-body-medium-strong)";const t=o.cloneNode();e.appendChild(t),o.replaceWith(e)}o=t})}shouldSkipHighlighting(e){return["CHAMELEON-AVATAR"].includes(e.tagName.toUpperCase())||e.classList.contains("highlight")}moveToNextOption(){const e=this.totalNavigableElements;if(0===e)return;const t=this.currentIndex;for(let r=1;r<=e;r++){const n=(t+r)%e,o=this.getElementAtIndex(n);if(o&&!this.isElementDisabled(o)){this.deselectCurrentElement(),this.currentIndex=n,this.selectCurrentElement(),this.focusAndScrollElementIntoView(o);break}}}moveToPreviousOption(){const e=this.totalNavigableElements;if(0===e)return;const t=-1===this.currentIndex?e:this.currentIndex;for(let r=1;r<=e;r++){const n=(t-r+e)%e,o=this.getElementAtIndex(n);if(o&&!this.isElementDisabled(o)){this.deselectCurrentElement(),this.currentIndex=n,this.selectCurrentElement(),this.focusAndScrollElementIntoView(o);break}}}selectOption(e,t){this.selectedOptions.includes(e)?!1===this.multiple&&(this.control.value=this.getOptionText(e)):(e.selected=!0,this.multiple?(this.selectedOptions=[...this.selectedOptions,e],this.control.value="",this.filter="",this.filterOptions(this.filter),this.$emit("input",{value:"",source:t})):(this.hasDefaultOptions&&(this.selectedOptions[0].setAttribute("default","false"),e.default=!0),this.hasSelectedOption&&(this.selectedOptions[0].selected=!1),this.selectedOptions=[e],this.value=this.getOptionText(e),this.filter="",this.control.value=this.getOptionText(e),this.filterOptions(this.filter),this.$emit("input",{value:this.getOptionText(this.selectedOptions[0]),source:t})),this.$emit("change",{selectedOptions:this.selectedOptions}))}deselectOption(e,t){e.default||(e.selected=!1,this.multiple?(this.selectedOptions=this.selectedOptions.filter(t=>this.getOptionText(t)!==this.getOptionText(e)),this.value=""):(this.selectedOptions=[],this.value="",this.filter="",this.filterOptions(this.filter),this.control.value=""),"option-selected-change"!==t&&(this.$emit("input",{value:"",source:t}),this.$emit("change",{selectedOptions:this.selectedOptions},{bubbles:!0})))}deselectOptions(e){if(this.hasDefaultOptions){const t=this.selectedOptions.find(e=>e.default);return void this.selectOption(t,e)}for(const e of this.options)e.selected=!1;this.selectedOptions=[],this.value="",this.filter="",this.control.value="",this.filterOptions(this.filter),this.$emit("input",{value:"",source:e}),this.$emit("change",{selectedOptions:this.selectedOptions},{bubbles:!0})}isOptionSelected(e){return this.selectedOptions.findIndex(t=>this.getOptionText(t)===this.getOptionText(e))>-1}getOptionText(e){return e?.label}get totalNavigableElements(){return(this.listboxStart?.length??0)+(this.options?.length??0)}getElementAtIndex(e){if(e<0)return null;if(this.listboxStart&&e<this.listboxStart.length){const e=this.shadowRoot?.querySelector(".listbox-start-option");return e}return this.options&&e-this.listboxStart.length<this.options.length?this.options[e-this.listboxStart.length]:null}isElementDisabled(e){return e instanceof Tm?e.disabled:e.hasAttribute("disabled")}deselectCurrentElement(){if(-1===this.currentIndex)return;const e=this.getElementAtIndex(this.currentIndex);e&&this.deselectElement(e)}selectCurrentElement(){const e=this.getElementAtIndex(this.currentIndex);e&&this.selectElement(e)}deselectElement(e){e instanceof Tm?this.isOptionSelected(e)||(e.selected=!1):this.shadowRoot?.querySelector(".listbox-start-option")?.setAttribute("aria-selected","false")}selectElement(e){e instanceof Tm?e.selected=!0:this.shadowRoot?.querySelector(".listbox-start-option")?.setAttribute("aria-selected","false")}focusAndScrollElementIntoView(e){requestAnimationFrame(()=>{this.isConnected&&e.scrollIntoView({block:"nearest"})})}}h([Qr()],Av.prototype,"variant",void 0),h([Qr()],Av.prototype,"size",void 0),h([Qr({mode:"boolean"})],Av.prototype,"disabled",void 0),h([Qr({mode:"boolean"})],Av.prototype,"multiple",void 0),h([Qr({mode:"boolean"})],Av.prototype,"error",void 0),h([Qr({mode:"boolean"})],Av.prototype,"success",void 0),h([Qr({mode:"boolean",attribute:"full-width"})],Av.prototype,"fullWidth",void 0),h([Qr({mode:"fromView",attribute:"no-options-text"})],Av.prototype,"noOptionsText",void 0),h([Qr({attribute:"clear-button-label"})],Av.prototype,"clearButtonLabel",void 0),h([Qr({attribute:"toggle-button-label"})],Av.prototype,"toggleButtonLabel",void 0),h([Qr()],Av.prototype,"placeholder",void 0),h([Qr({mode:"boolean"})],Av.prototype,"loading",void 0),h([Qr({attribute:"max-selectable-items",converter:Yr})],Av.prototype,"maxSelectableItems",void 0),h([Qr({mode:"boolean",attribute:"highlight-inner-text"})],Av.prototype,"highlightInnerText",void 0),h([Qr({attribute:"in-dialog",mode:"boolean"})],Av.prototype,"inDialog",void 0),h([Qr({mode:"boolean"})],Av.prototype,"open",void 0),h([Qr],Av.prototype,"autocomplete",void 0),h([Qr({mode:"boolean",attribute:"disable-filtering"})],Av.prototype,"disableFiltering",void 0),h([Qr],Av.prototype,"position",void 0),h([Nr],Av.prototype,"filter",void 0),h([Nr],Av.prototype,"currentIndex",void 0),h([Nr],Av.prototype,"controlId",void 0),h([Nr],Av.prototype,"selectedOptions",void 0),h([Nr],Av.prototype,"slottedOptions",void 0),h([Nr],Av.prototype,"listboxStart",void 0),h([Nr],Av.prototype,"chipSize",null),h([Rr],Av.prototype,"chips",null),h([Nr],Av.prototype,"slottedChips",void 0),h([Nr],Av.prototype,"filteredOptions",void 0),h([Rr],Av.prototype,"shouldShowNoOption",null),h([Rr],Av.prototype,"displayedPlaceholder",null),h([Rr],Av.prototype,"hasSelectedOption",null),h([Rr],Av.prototype,"ariaActiveDescandant",null),h([Rr],Av.prototype,"isMaxSelectableItemsReached",null),h([Rr],Av.prototype,"hasDefaultOptions",null);const Tv={baseName:"autocomplete",template:(e,t)=>
2838{const r=u(mr),n=u(Wi),o=u(zh),i=u(Tm),s=u(jm);return ri`
2839  <template @click="${(e,t)=>e.handleClick(t.event)}" @ch-option-selected-changed="${(e,t)=>e.handleOptionSelectedChange(t.event)}">
2840    <label class="label" part="label" for="${e=>e.controlId}">
2841      <slot name="label"></slot>
2842    </label>
2843    <div
2844      ${li("controlBox")}
2845      part="control"
2846      class="control"
2847      @ch-chip-close="${(e,t)=>e.handleChipClose(t.event)}"
2848      ${""}
2849    >
2850        <slot name="start"></slot>
2851        ${Aa(e=>e.multiple,ri`<slot name="chips" ${si("slottedChips")}
2852            >${wu(e=>e.chips,ri`<${o}
2853                size="${(e,t)=>t.parent.chipSize()}"
2854                data-option-id="${e=>e.option.id}"
2855                close-label="${e=>e.option.getAttribute("close-label")??`Remove option ${e.option.label}`}"
2856                ?disabled="${(e,t)=>t.parent.disabled}"
2857                closable>
2858                  ${Aa(e=>e.avatar,e=>ri`<${e.avatar.tagName}
2859                        slot="avatar"
2860                        size="${(e,t)=>t.parent.chipSize()}"
2861                        label="${e=>e.avatar.label}"
2862                        :innerHTML="${e=>e.avatar.innerHTML}">
2863                      </${e.avatar.tagName}>`)}
2864                  ${e=>e.option.label}
2865                </${o}>`)}
2866          </slot>`)}
2867        <slot name="control">
2868          <input
2869            part="input-text"
2870            id="${e=>e.controlId}"
2871            type="text"
2872            value="${e=>e.value}"
2873            placeholder="${e=>e.displayedPlaceholder}"
2874            class="selected-value"
2875            aria-disabled="${e=>e.disabled||e.ariaDisabled}"
2876            ${li("control")}
2877            @input="${(e,t)=>e.handleInput(t.event)}"
2878            @blur="${(e,t)=>e.handleBlur(t.event)}"
2879            @keydown="${(e,t)=>e.keydownHandler(t.event)}"
2880            role="combobox"
2881            autocomplete="${e=>e.autocomplete}"
2882            aria-autocomplete="list"
2883            aria-controls="${e=>e.listboxId}"
2884            aria-expanded="${e=>e.open}"
2885            aria-haspopup="listbox"
2886            aria-activedescendant="${e=>e.ariaActiveDescandant}"
2887          />
2888        </slot>
2889      <div class="buttons" part="buttons">
2890        ${ri`<${r} class="state-icon">
2891          ${Aa(e=>e.error,ri`${Cl}`)}
2892          ${Aa(e=>e.success,ri`${kl}`)}
2893        </${r}>`}
2894        ${Aa(e=>!e.hasDefaultOptions,ri`
2895            <${n}
2896              variant="${"primary"}"
2897              size="small"
2898              class="clear-btn"
2899              label="${e=>e.clearButtonLabel}"
2900              has-selected-option="${e=>e.hasSelectedOption}"
2901              ?disabled="${e=>e.disabled}"
2902              @click="${(e,t)=>e.handleClearButtonClick(t.event)}"
2903            >
2904              <${r} ${li("closeButton")}>${'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM16 9.14116L13.1412 12L16 14.8588L14.8588 16L12 13.1412L9.14116 16L8 14.8588L10.8588 12L8 9.14116L9.14116 8L12 10.8588L14.8588 8L16 9.14116Z" fill="currentColor"></path></svg>'}</${r}>
2905            </${n}>
2906          `)}
2907        ${Aa(e=>"select"===e.variant,ri`
2908            <${n} ${li("chevronButton")}
2909              variant="${"primary"}"
2910              size="small"
2911              role="button"
2912              class="chevron"
2913              ?disabled="${e=>e.disabled}"
2914              @click="${(e,t)=>e.handleChevronClick(t.event)}"
2915              tabindex="${e=>e.handleChevronTabindex()}"
2916              aria-controls="${e=>e.listboxId}"
2917              aria-expanded="${e=>e.open}"
2918              label="${e=>e.toggleButtonLabel}"
2919            >
2920              <${r} ${li("chevron")}
2921                >${e=>e.open?Ev:Iv}</${r}
2922              >
2923            </${n}>`)}
2924      </div>
2925    </div>
2926    <div id="${e=>e.listboxId}" ${li("listbox")} part="listbox" role="listbox" class="listbox ${e=>e.open?"open":""}">
2927    <${i} class="listbox-start-option" ?hidden="${e=>0===e.listboxStart.length}" @click="${(e,t)=>e.handleListboxStartOptionClick(t.event)}" @change="${(e,t)=>{t.event.preventDefault(),t.event.stopPropagation()}}">
2928      <slot name="listbox-start" ${si("listboxStart")}></slot>
2929    </${i}>
2930    <slot ${si({property:"slottedOptions",filter:e=>e.nodeName===i.toUpperCase()})}></slot>
2931      <${i} ${li("noOptionsElement")} ?hidden=${e=>!e.shouldShowNoOption} disabled
2932        >${e=>e.noOptionsText}</${i}
2933      >
2934      <${i} class="skeleton-option" ${li("loaderOption")} hidden
2935        ><${s} variant="rectangle"></${s}
2936      ></${i}>
2937    </div>
2938    <slot name="helper-text"></slot>
2939  </template>
2940`},styles:(e,t)=>ml`
2941    ${':host([hidden]){display:none}:host{--elevation:14;background:var(--neutral-fill-input-rest);border-radius:calc(var(--control-corner-radius,4)*1px);border:calc(var(--stroke-width,1)*1px)solid var(--accent-fill-rest);box-sizing:border-box;color:var(--neutral-foreground-rest);font-family:var(--body-font,aktiv-grotesk,"Segoe UI",Arial,Helvetica,sans-serif);height:calc((var(--base-height-multiplier,10) + var(--densitity,0))*var(--design-unit,4)*1px);user-select:none;vertical-align:top;outline:none;min-width:250px;display:inline-flex;position:relative}:host .listbox{background:var(--fill-color);border:calc(var(--stroke-width,1)*1px)solid var(--neutral-stroke-rest);border-radius:calc(var(--control-corner-radius,4)*1px);box-sizing:border-box;padding:calc(var(--design-unit,4)*1px)0;flex-direction:column}.listbox{max-height:calc((var(--size)*(var(--base-height-multiplier,10) + var(--densitity,0))*var(--design-unit,4) + var(--design-unit,4)*var(--stroke-width,1)*2)*1px);overflow-y:auto}:host([size="0"]) .listbox{max-height:none}:host .listbox{box-shadow:0 0 calc(var(--elevation)*.225px + 2px)rgba(0,0,0,calc(.11*(2 - var(--background-luminance,1)))),0 calc(var(--elevation)*.4px)calc(var(--elevation)*.9px)rgba(0,0,0,calc(.13*(2 - var(--background-luminance,1))));z-index:1;border:none;width:100%;display:flex;position:absolute;
2941left:0}.control+.listbox{--stroke-size:calc(var(--design-unit,4)*var(--stroke-width,1)*2);max-height:calc((var(--listbox-max-height)*(var(--base-height-multiplier,10) + var(--densitity,0))*var(--design-unit,4) + var(--stroke-size))*1px)}.listbox[hidden]{display:none}.control{box-sizing:border-box;cursor:pointer;font-size:var(--type-ramp-base-font-size,14px);font-family:inherit;line-height:var(--type-ramp-base-line-height,20px);min-height:100%;padding:0 calc(var(--design-unit,4)*2.25px);align-items:center;width:100%;display:flex}:host(:not([disabled]):hover){background:var(--neutral-fill-input-hover);border-color:var(--accent-fill-hover)}:host(:focus-visible){border-color:var(--focus-stroke-outer)}:host(:not([size]):not([multiple]):not([open]):focus-visible),:host([multiple]:focus-visible),:host([size]:focus-visible){box-shadow:0 0 0 calc(var(--focus-stroke-width,2)*1px)var(--focus-stroke-outer)}:host(:not([multiple]):not([size]):focus-visible) ::slotted(chameleon-option[aria-selected=true]:not([disabled])){box-shadow:0 0 0 calc(var(--focus-stroke-width,2)*1px)inset var(--focus-stroke-inner);border-color:var(--focus-stroke-outer);background:var(--accent-fill-focus);color:var(--foreground-on-accent-focus)}:host([disabled]){cursor:not-allowed;opacity:var(--disabled-opacity,.3)}:host([disabled]) .control{cursor:not-allowed;user-select:none}:host([disabled]:hover){background:var(--neutral-fill-stealth-rest);color:var(--neutral-foreground-rest);fill:currentColor}:host(:not([disabled])) .control:active{background:var(--neutral-fill-input-active);border-color:var(--accent-fill-active);border-radius:calc(var(--control-corner-radius,4)*1px)}:host([open][position=above]) .listbox{bottom:calc((var(--base-height-multiplier,10) + var(--densitity,0))*var(--design-unit,4)*1px);border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}:host([open][position=below]) .listbox{top:calc((var(--base-height-multiplier,10) + var(--densitity,0))*var(--design-unit,4)*1px);border-top:0;border-top-left-radius:0;border-top-right-radius:0}.selected-value{min-width:calc(var(--listbox-scroll-width,0) - var(--design-unit,4)*4*1px);text-align:start;text-overflow:ellipsis;white-space:nowrap;flex:auto;font-family:inherit;overflow:hidden}.indicator{flex:none;margin-inline-start:1em}slot[name=listbox]{width:100%;display:none}:host([open]) slot[name=listbox]{box-shadow:0 0 calc(var(--elevation)*.225px + 2px)rgba(0,0,0,calc(.11*(2 - var(--background-luminance,1)))),0 calc(var(--elevation)*.4px)calc(var(--elevation)*.9px)rgba(0,0,0,calc(.13*(2 - var(--background-luminance,1))));display:flex;position:absolute}.end{margin-inline-start:auto}.start,.end,.indicator,.select-indicator,::slotted(svg){fill:currentColor;height:1em;min-height:calc(var(--design-unit,4)*4px);min-width:calc(var(--design-unit,4)*4px);width:1em}::slotted([role=option]),::slotted(option){flex:none}:host(:empty) .listbox{display:none}:host([disabled]) *,:host([disabled]){cursor:not-allowed;user-select:none}.selected-value{appearance:none;color:inherit;font-size:var(--type-ramp-base-font-size,14px);line-height:var(--type-ramp-base-line-height,20px);height:calc(100% - var(--stroke-width,1)*1px);background:0 0;border:none;width:100%;margin:auto 0}.selected-value:hover,.selected-value:focus-visible,.selected-value:disabled,.selected-value:active{outline:none}'}
2942    ${Lm}
2943    ${":host{--chameleon-select-height:32px;--input-font-size:16px;--listbox-focus-offset:0;--listbox-z-index:var(--goto-z-index-dropdown);width:unset}:host .control{box-sizing:border-box;--goto-icon-size:16px;min-height:var(--chameleon-select-height);height:unset;max-height:calc(var(--chameleon-select-height)*3);gap:var(--goto-spacing-02)var(--goto-spacing-03);cursor:default;padding-right:var(--goto-spacing-10);padding-top:calc(var(--goto-spacing-01) - 1px);padding-bottom:calc(var(--goto-spacing-01) - 1px);background-color:var(--goto-surface-color-default);flex-wrap:wrap;display:flex;position:relative;overflow:hidden auto}:host .label{font:var(--goto-caption-medium-strong)}:host input{padding:var(--goto-spacing-00);min-width:60px;font:var(--goto-body-medium);font-size:var(--input-font-size);border:none;flex:1}:host .buttons{top:var(--goto-spacing-00);right:var(--goto-spacing-01);height:calc(var(--chameleon-select-height) - 2px);box-sizing:border-box;align-self:start;align-items:center;gap:var(--goto-spacing-02);display:flex;position:absolute}:host .buttons .close{visibility:hidden;display:none}:host .buttons .close.visible{visibility:visible;display:block}:host .clear-btn{visibility:hidden}:host ::slotted([slot=helper-text]){font:var(--goto-caption-medium);color:var(--goto-type-color-secondary);cursor:text}:host ::slotted([slot=start]:is(chameleon-svg)){color:var(--goto-type-color-secondary);--goto-icon-color:var(--goto-icon-color-default)}:host([full-width]){width:100%}:host(:focus-within){--listbox-focus-offset:2px}:host(:focus-within) .clear-btn[has-selected-option=true]{display:inherit;visibility:visible}:host(:focus-within) .control{outline:1px solid var(--goto-focus-color-highlight-default);outline-offset:1px}:host .listbox{visibility:hidden;max-height:calc(var(--chameleon-select-height)*9.5);z-index:var(--listbox-z-index);display:none}:host .listbox.open{visibility:visible;padding:var(--goto-spacing-02)0;top:var(--autocomplete-listbox-position);display:flex;position:absolute}:host([size=small]){--chameleon-select-height:24px;--input-font-size:14px}:host([size=small]) .control{--goto-icon-size:16px;padding-top:1px;padding-bottom:1px}:host([size=small]) .control .selected-value{height:var(--goto-spacing-04)}:host([size=small]) .buttons{height:calc(var(--chameleon-select-height) - 4px)}:host([size=large]){--chameleon-select-height:40px;--input-font-size:16px}:host([size=large]) .control{--goto-icon-size:24px}:host([size=xlarge]){--chameleon-select-height:48px;--input-font-size:16px}:host([size=xlarge]) .control{--goto-icon-size:24px}:host([success]) ::slotted([slot=helper-text]){color:var(--goto-type-color-success)}:host([error]) ::slotted([slot=helper-text]){color:var(--goto-type-color-danger)}:host([disabled]) ::slotted([slot=start]){color:var(--goto-type-color-disabled);--goto-icon-color:var(--goto-icon-color-disabled)}:host([disabled]) .label,:host([disabled]) ::slotted([slot=helper-text]){color:var(--goto-type-color-disabled)}:host([disabled]:focus-within){caret-color:#0000}:host([disabled]:focus-within) .clear-btn,:host(:not([disabled])[error]:focus-within) .state-icon,:host(:not([disabled])[success]:focus-within) .state-icon{display:none}:host chameleon-option.listbox-start-option,:host chameleon-option.listbox-start-option.selected{--chameleon-select-height:auto;padding:var(--goto-spacing-02);padding-left:var(--goto-spacing-00);line-height:normal}::slotted(chameleon-button){--goto-interactive-color-secondary-hover:transparent;--goto-interactive-color-secondary-pressed:transparent;outline:#0000}"}
2944  `,shadowOptions:{delegatesFocus:!0}},Ov=Av.compose(Tv);!function(e){vr({prefix:e}),fl({prefix:e}),Rg({prefix:e}),Gl({prefix:e}),Vm({prefix:e}),gl({prefix:e}),$l({prefix:e}),Fh({prefix:e}),To({prefix:e,node:void 0},Pm,Ov)}(),Ku();const Lv=Rp.compose({baseName:"input-field",template:Ap,styles:Dp,shadowOptions:{delegatesFocus:!0}});To({prefix:void 0,node:void 0},Lv);class $v extends Hi{constructor(){super(),this.size="large",this.variant="primary",this.position="top-center",this.split=!1,this.isLoading=!1,this.isloading=!1,this.loadingDisablesMenu=!0,this.displayLabel=!0,this.popoverWidth=void 0,this.popoverZIndex=void 0,this.disableMenuOpen=!1,this.popoverChangeHandler=e=>{this.dispatchEvent(new CustomEvent("popoverchange",{detail:e.detail,bubbles:!1}))},this.clickHandler=e=>{const t=this.mainButtonElement;t&&e.composedPath().includes(t)||e.stopImmediatePropagation()},this.menuButtonClickHandler=()=>{this.dispatchEvent(new CustomEvent("menubuttonclick",{bubbles:!1}))},new ji(this),new Vi(this,e=>{const t=e.composedPath().includes(this.menuButtonElement),r=e.composedPath().includes(this.popoverElement),n=t||r;return this.isAriaDisabled&&!n}
2944)}get mainButtonElement(){return this.mainButton?.shadowRoot?.querySelector("button")}get menuButtonElement(){return this.menuButton?.shadowRoot?.querySelector("button")}get isAriaDisabled(){return"true"===this.mainButtonElement?.getAttribute("aria-disabled")}connectedCallback(){super.connectedCallback(),this.popoverElement?.addEventListener("popoverchange",this.popoverChangeHandler)}disconnectedCallback(){super.disconnectedCallback(),this.popoverElement?.removeEventListener("popoverchange",this.popoverChangeHandler)}willUpdate(e){e.has("variant")&&this.handleFallback(),e.has("isloading")}updated(e){super.updated(e),(e.has("label")||e.has("labelId"))&&this.setMainLabel(),e.has("menuLabel")&&this.setMenuLabel(),(e.has("disableMenuOpen")||e.has("split")||e.has("isLoading")||e.has("isloading")||e.has("disabled")||e.has("loadingDisablesMenu"))&&this.updateMenuButtonHasPopup()}async updateMenuButtonHasPopup(){await this.updateComplete;const e=this.menuButtonElement;if(!e)return;const t=this.disabled||this.loadingDisablesMenu&&(this.isLoading||this.isloading);this.split&&this.disableMenuOpen&&!t?e.setAttribute("aria-haspopup","menu"):this.disableMenuOpen&&e.removeAttribute("aria-haspopup")}validateMainLabel(){this.mainButtonElement?.getAttribute("aria-label")?.length||this.getAttribute("aria-labelledby")?.length||console.error("CHAMELEON-A11Y: Squircle Button component must have an accessible label provided by either\n  1) a visible label whose id is given as the attribute labelId\n  2) a non-empty label attribute to be used as aria-label.")}validateMenuLabel(){!this.split||this.menuLabel||this.menuButtonElement?.getAttribute("aria-label")?.length||console.error("CHAMELEON-A11Y: Squircle Button component must have an accessible label for the Menu Button provided by a non-empty menuLabel/menu-label attribute to be used as aria-label.")}async setMenuLabel(){await this.updateComplete,this.split&&this.menuButtonElement&&this.menuLabel&&this.menuButtonElement.setAttribute("aria-label",this.menuLabel)}async setMainLabel(){await this.updateComplete,this.labelId?this.setAttribute("aria-labelledby",this.labelId):this.label&&this.mainButtonElement?.setAttribute("aria-label",this.label)}get computedConfig(){return{chevron:(()=>{switch(this.position){case"top-start":case"top-center":case"top-end":return di;case"left-start":case"left-center":case"left-end":return'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.7071 5.29289L16.1213 6.70711L10.8284 12L16.1213 17.2929L14.7071 18.7071L8 12L14.7071 5.29289Z" fill="currentColor"></path></svg>';case"bottom-start":case"bottom-center":case"bottom-end":return ci;case"right-start":case"right-center":case"right-end":return ui;default:return void this.position}})()}}handleFallback(){const{guardedValue:e}=Fi({inactive:"secondary","brand-primary":"primary","neutral-secondary":"secondary","danger-primary":"danger"},{forMissing:this.variant,forRemoved:"secondary",message:Fi.defaultMessageFnForVariants("[Chameleon SquircleButton]")}),t=e(this.variant);this.variant=t.value,null!==t.message&&console.warn(t.message)}render(){const e=Oi(u(jl)),t=Oi(u(mr)),r=Oi(u(ll));return Ni`
2945      <div class="container" @click=${this.clickHandler}>
2946        <${e}
2947          id="main-button"
2948          part="button"
2949          variant="${this.variant}"
2950          size="${this.size}"
2951          ?disabled="${this.disabled||this.isLoading||this.isloading}"
2952        >
2953          ${this.isLoading||this.isloading?Ni`<${t} class="loading-icon" aria-label="Loading icon">${Mi(Bi)}</${t}>`:Ni`<slot>
2954                  <slot name="icon"></slot>
2955                </slot>`}
2956        </${e}>
2957        ${this.split?Ni`
2958              <${e}
2959                id="menu-button"
2960                part="menu-button"
2961                variant="${this.variant}"
2962                size="${this.size}"
2963                ?disabled="${this.disabled||this.loadingDisablesMenu&&(this.isLoading||this.isloading)}"
2964                aria-expanded="${this.split&&this.disableMenuOpen?this.ariaExpanded??le:le}"
2965                @click=${this.menuButtonClickHandler}
2966              >
2967                ${this.computedConfig.chevron?Ni`<${t}>${this.computedConfig.chevron}</${t}>`:""}
2968              </${e}>
2969              ${this.disableMenuOpen?le:Ni`
2970                      <${r}
2971                        ?disable-focus-trap="${this.disableFocusTrap}"
2972                        part="popover"
2973                        label="popover"
2974                        trigger-id="${this.disabled||this.loadingDisablesMenu&&(this.isLoading||this.isloading)?le:"menu-button"}"
2975                        ?menu="${!0}"
2976                        position="${this.position}"
2977                        z-index="${this.popoverZIndex??le}"
2978                        width="${this.popoverWidth??le}"
2979                      >
2980                        <slot name="actions"></slot>
2981                      </${r}>
2982                    `}
2983            `:""}
2984      </div>
2985      <span class="label">${this.label}</span>
2986    `}}$v.baseName="squircle-button",$v.styles=b("@keyframes button-loading{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes button-loading-half{0%,to{transform:rotate(180deg)}}:host .loading-icon{display:none}:host([isloading]) .loading-icon,:host([is-loading]) .loading-icon{animation-direction:normal;animation-delay:0s;animation-duration:var(--goto-duration-sluggish);animation-iteration-count:infinite;animation-play-state:running;animation-fill-mode:forwards;animation-timing-function:var(--goto-standard-easing);animation-name:var(--button-loading-animation-name,button-loading);display:flex}:host([isloading]) .leading-icon,:host([isloading]) .trailing-icon,:host([is-loading]) .leading-icon,:host([is-loading]) .trailing-icon{display:none}:host{cursor:pointer;flex-direction:column;align-items:center;max-width:100%;display:inline-flex}:host .container{gap:1px;display:inline-flex}:host #main-button{border-radius:var(--goto-radius-large);user-select:none}:host .label{padding-top:var(--goto-spacing-02);text-align:center}:host([split]) #main-button{border-bottom-right-radius:var(--goto-radius-none);border-top-right-radius:var(--goto-radius-none)}:host([split]) #menu-button{border-radius:var(--goto-radius-large);border-bottom-left-radius:var(--goto-radius-none);border-top-left-radius:var(--goto-radius-none);user-select:none}:host([split]) #main-button::part(control){border:2px solid #0000}:host([split]) #main-button::part(control):focus-visible{border-right:none;margin-right:2px}:host([split]) #menu-button::part(control){border:2px solid #0000}:host([split]) #menu-button::part(control):focus-visible{border-left:none;margin-left:2px}:host .label{max-width:100%;padding-top:var(--goto-spacing-02);color:var(--goto-type-color-secondary);font:var(--goto-caption-medium);white-space:var(--goto-button-label-whitespace,normal);overflow:var(--goto-button-label-overflow,visible);text-overflow:var(--goto-button-label-text-overflow,clip)}:host(:not([display-label])) .label{display:none}:host([disabled]),:host([isloading]),:host([is-loading]){cursor:not-allowed}:host([disabled]) .label,:host([isloading]) .label,:host([is-loading]) .label{color:var(--goto-type-color-disabled)}:host([size=xlarge]) #main-button::part(control){width:var(--goto-spacing-09);max-height:var(--goto-spacing-09);max-width:var(--goto-spacing-09);padding:var(--goto-spacing-03);--goto-icon-size:var(--goto-spacing-06)}:host([size=xlarge]) #menu-button::part(control){height:var(--goto-spacing-09);width:var(--goto-spacing-07);padding:var(--goto-spacing-00);--goto-icon-size:var(--goto-spacing-06)}:host([size=xlarge][split]) #main-button::part(control):focus-visible{width:calc(var(--goto-spacing-09) - 2px)}:host([size=xlarge][split]) #menu-button::part(control):focus-visible{width:calc(var(--goto-spacing-07) - 2px)}:host([size=large]) #main-button::part(control){width:var(--goto-spacing-08);max-height:var(--goto-spacing-08);max-width:var(--goto-spacing-08);padding:var(--goto-spacing-02);--goto-icon-size:var(--goto-spacing-05)}:host([size=large]) #menu-button::part(control){height:var(--goto-spacing-08);width:var(--goto-spacing-06);padding:var(--goto-spacing-00);--goto-icon-size:var(--goto-spacing-05)}:host([size=large][split]) #main-button::part(control):focus-visible{width:calc(var(--goto-spacing-08) - 2px)}:host([size=large][split]) #menu-button::part(control):focus-visible{width:calc(var(--goto-spacing-06) - 2px)}:host([variant=secondary]){display:inline-flex}:host([variant=secondary]) .container{gap:1px;display:inline-flex}:host([variant=secondary]) #main-button{outline:1px solid var(--goto-border-color-default);outline-offset:-1px}:host([variant=secondary]):host([split]) #main-button{border-top-right-radius:0;border-bottom-right-radius:0;margin-right:-1px}:host([variant=secondary]) #main-button::part(control){--goto-icon-color:var(--goto-icon-color-default);box-shadow:none;border-color:#0000}:host([variant=secondary]):host([split]) #main-button::part(control){margin-right:1px}:host([variant=secondary]):host([split]) #main-button::part(control):focus-visible{border-right:3px s
2986olid #0000;margin-right:0}:host([variant=secondary]) #menu-button{outline:1px solid var(--goto-border-color-default);outline-offset:-1px}:host([variant=secondary]):host([split]) #menu-button{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}:host([variant=secondary]):host([split]) #menu-button::part(control){box-shadow:none;--goto-icon-color:var(--goto-icon-color-default);margin-left:1px}:host([variant=secondary]):host([split]) #menu-button::part(control):focus-visible{border-left:3px solid #0000;margin-left:0}:host([variant=secondary]):host([disabled]) #main-button::part(control),:host([variant=secondary]):host([is-loading]) #main-button::part(control),:host([variant=secondary]):host([disabled]) #menu-button::part(control),:host([variant=secondary]):host([is-loading][loading-disables-menu]) #menu-button::part(control){--goto-icon-color:var(--goto-icon-color-disabled)}:host([variant=secondary]):host([split][size=xlarge]) #main-button::part(control):focus-visible{width:calc(var(--goto-spacing-09) + 1px);max-width:calc(var(--goto-spacing-09) + 1px)}:host([variant=secondary]):host([split][size=xlarge]) #menu-button::part(control):focus-visible{width:calc(var(--goto-spacing-07) + 1px)}:host([variant=secondary]):host([split][size=large]) #main-button::part(control):focus-visible{width:calc(var(--goto-spacing-08) + 1px);max-width:calc(var(--goto-spacing-08) + 1px)}:host([variant=secondary]):host([split][size=large]) #menu-button::part(control):focus-visible{width:calc(var(--goto-spacing-06) + 1px)}"),h([Te({reflect:!0})],$v.prototype,"size",void 0),h([Te({reflect:!0})],$v.prototype,"variant",void 0),h([Te({reflect:!0})],$v.prototype,"position",void 0),h([Te()],$v.prototype,"label",void 0),h([Te({type:Boolean,reflect:!0})],$v.prototype,"split",void 0),h([Te({type:Boolean,reflect:!0,attribute:"is-loading"})],$v.prototype,"isLoading",void 0),h([Te({type:Boolean,reflect:!0,attribute:"isloading"})],$v.prototype,"isloading",void 0),h([Te({type:Boolean,reflect:!0,attribute:"loading-disables-menu"})],$v.prototype,"loadingDisablesMenu",void 0),h([Te({attribute:"label-id"})],$v.prototype,"labelId",void 0),h([Te({type:Boolean,reflect:!0,attribute:"display-label"})],$v.prototype,"displayLabel",void 0),h([Te({attribute:"popover-width"})],$v.prototype,"popoverWidth",void 0),h([Te({type:Number,attribute:"popover-z-index"})],$v.prototype,"popoverZIndex",void 0),h([Te({attribute:"menu-label"})],$v.prototype,"menuLabel",void 0),h([Te({type:Boolean,reflect:!0,attribute:"disable-focus-trap"})],$v.prototype,"disableFocusTrap",void 0),h([Te({type:Boolean,reflect:!0,attribute:"disable-menu-open"})],$v.prototype,"disableMenuOpen",void 0),h([$e("#main-button")],$v.prototype,"mainButton",void 0),h([$e("#menu-button")],$v.prototype,"menuButton",void 0),h([$e('slot[name="actions"]')],$v.prototype,"actionsSlot",void 0),h([$e("chameleon-popover")],$v.prototype,"popoverElement",void 0),function(e={}){vr(e),ql(e),To({prefix:e.prefix,node:e.node},wl),d($v,e)}(),jh(),qh(),Yh(),Qh(),Wh(),tp(),np();class Nv extends Zt{constructor(){super(...arguments),this.svgTag=u(mr),this.headTitle="",this.dragTooltip="",this.resizable=!0,this.state="default"}connectedCallback(){super.connectedCallback(),this.heightObserver=new ResizeObserver(e=>{for(const t of e)if(t&&this.headerElement&&this.contentElement){const e=this.headerElement,r=this.contentElement;t.contentRect.height<50?(e.style.borderBottom="1px solid var(--goto-border-color-inverted)",e.style.borderRadius="4px",this.resizable&&this.style.height&&(r.hidden=!0),this.style.overflow="hidden"):(this.style.overflow="auto",e.style.borderBottom="none",this.resizable&&this.style.height&&(r.hidden=!1),e.style.borderRadius="4px 4px 0 0")}}),this.heightObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.heightObserver?.disconnect()}updated(e){super.updated(e),e.has("collapsed")&&this.updateCollapseButton()}firstUpdated(){this.updateDragButton(),this.updateCollapseButton()}updateDragButton(){const e=this.shadowRoot?.querySelector('slot[name="drag-button"]');
2986e&&e.assignedNodes().forEach(e=>{if(e instanceof Element){const t=Array.from(e.childNodes).find(e=>e instanceof Wi);t&&(t.size="small",t.innerHTML=`<${this.svgTag}><svg viewBox="0 0 23 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.5416 3H6.70831V7H10.5416V3ZM10.5416 10H6.70831V14H10.5416V10ZM6.70831 17H10.5416V21H6.70831V17ZM16.2916 3H12.4583V7H16.2916V3ZM12.4583 10H16.2916V14H12.4583V10ZM16.2916 17H12.4583V21H16.2916V17Z" fill="currentColor"></path></svg></${this.svgTag}>`)}})}updateCollapseButton(){const e=this.querySelector('[slot="collapse-button"]');if(e){const t=Array.from(e.childNodes).find(e=>e instanceof Wi);t&&(t.size="small",t.innerHTML=`<${this.svgTag}>${this.collapsed?Iv:Ev}</${this.svgTag}>`,t.classList.add("widget-collapse-button"))}}handleDragButtonSlotChange(){this.updateDragButton()}handleCollapseButtonSlotChange(){this.updateCollapseButton()}render(){const e=Oi(u(Hl));return Ni`
2987      <div class="header" part="header">
2988        <div class="title-container">
2989          <slot slot="icon" name="icon"></slot>
2990          <${e} variant="body-medium-strong">${this.headTitle}</${e}>
2991        </div>
2992        <div class="actions">
2993          <div part="actions">
2994            <slot name="actions"></slot>
2995          </div>
2996          <div class="built-in-actions" part="built-in-actions">
2997            <slot name="drag-button" @slotchange=${this.handleDragButtonSlotChange}></slot>
2998            <slot name="collapse-button" @slotchange=${this.handleCollapseButtonSlotChange}></slot>
2999          </div>
3000        </div>
3001      </div>
3002      <div class="content">
3003        <div class="body" part="body"><slot></slot></div>
3004        ${Zu("coming-soon"===this.state,()=>Ni`
3005            <div class="coming-soon-overlay">
3006              <div class="coming-soon-overlay-content">
3007                <slot name="overlay-content"></slot>
3008              </div>
3009              <div class="coming-soon-overlay-background"></div>
3010            </div>
3011          `)}
3012      </div>
3013    `}}Nv.baseName="widget",Nv.styles=b(":host{border-radius:var(--goto-radius-small);background:var(--goto-background-color-default);flex-direction:column;width:360px;min-height:47px;display:flex}:host ::slotted([slot=drag-button]),:host ::slotted([slot=collapse-button]){max-height:var(--goto-spacing-06)}:host ::slotted([slot=icon]){--goto-icon-size:var(--goto-spacing-06)}:host .header{padding:var(--goto-spacing-03)var(--goto-spacing-04);border-top:1px solid var(--goto-border-color-inverted);border-right:1px solid var(--goto-border-color-inverted);border-left:1px solid var(--goto-border-color-inverted);border-radius:var(--goto-radius-small)var(--goto-radius-small)var(--goto-radius-none)var(--goto-radius-none);box-sizing:border-box;justify-content:space-between;align-items:center;width:100%;min-height:48px;max-height:48px;display:flex;overflow:auto hidden}:host .header .title-container{align-items:center;gap:var(--goto-spacing-02);display:flex}:host .header .actions{padding-left:var(--goto-spacing-02);gap:var(--goto-spacing-02);display:flex}:host .header .actions .built-in-actions{align-items:center;gap:var(--goto-spacing-02);display:flex}:host .header .actions .built-in-actions .drag-button-container{cursor:pointer}:host .content{border:1px solid var(--goto-border-color-inverted);border-radius:var(--goto-radius-none)var(--goto-radius-none)var(--goto-radius-small)var(--goto-radius-small);place-content:center;height:100%;position:relative;overflow:auto}:host .content .body{padding:var(--goto-spacing-04);height:calc(100% - 32px)}:host([state=coming-soon]) .content{overflow:hidden}:host([state=coming-soon]) .content .coming-soon-overlay{top:var(--goto-spacing-00);left:var(--goto-spacing-00);backdrop-filter:blur(2px);place-items:center;width:100%;height:100%;display:grid;position:absolute}:host([state=coming-soon]) .content .coming-soon-overlay .coming-soon-overlay-content{z-index:2;text-align:center;align-content:center;width:100%;height:100%;overflow:auto}:host([state=coming-soon]) .content .coming-soon-overlay .coming-soon-overlay-background{opacity:.25;z-index:1;background:linear-gradient(180deg,var(--goto-surface-color-default)0%,var(--goto-surface-color-brand-default)100%);width:100%;height:100%;position:absolute}:host([state=empty]) .content .body,:host([state=error]) .content .body{padding:var(--goto-spacing-00);height:100%;display:flex}:host([resizable]){resize:both;min-height:48px;overflow:auto}:host([collapsed]){resize:none;min-height:48px;max-height:48px}:host([collapsed]) .header{border-bottom:1px solid var(--goto-border-color-inverted);border-radius:var(--goto-radius-small)}:host([collapsed]) .content{height:0}"),h([Te({attribute:"head-title"})],Nv.prototype,"headTitle",void 0),h([Te({attribute:"drag-tooltip"})],Nv.prototype,"dragTooltip",void 0),h([Te({type:Boolean,reflect:!0})],Nv.prototype,"resizable",void 0),h([Te({reflect:!0})],Nv.prototype,"state",void 0),h([Te({type:Boolean,reflect:!0})],Nv.prototype,"collapsed",void 0),h([$e(".header")],Nv.prototype,"headerElement",void 0),h([$e(".content")],Nv.prototype,"contentElement",void 0),function(e={}){vr(e),Gl(e),gl(e),fl(e),d(Nv,e)}();class Rv extends Zt{constructor(){super(...arguments),this.label="Slider",this.value=0,this.step=1,this.progress=0}connectedCallback(){super.connectedCallback(),this.progress=(this.value-this.minValue)/(this.maxValue-this.minValue)*100,this.checkMinMaxValues(this.minValue,this.maxValue,this.value,this.step)}firstUpdated(){!this.hasTooltip&&!this.tooltipFormat||this.disabled||this.controlEl?.addEventListener("mouseover",()=>this.tooltipHandler(this.progress))}willUpdate(e){this.progress=(this.value-this.minValue)/(this.maxValue-this.minValue)*100;const t=this.closest("[lang]")?.getAttribute("lang")||void 0;const r=t!==this._cachedLocale,n=this.step!==this._cachedStep;if(!r&&this._percentFormatter||(this._percentFormatter=new Intl.NumberFormat(t,{style:"percent"}),this._numberFormatter=new Intl.NumberFormat(t),this._cachedLocale=t),n||r||!this._valueFormatter){const e=String(this.step),r=e.indexOf("."),n=r>=0?e.length-r-1:0;this._valueFormatter=new Intl.NumberFormat(t,{minimumFractionDigits:n,maximumFractionDigits:n}),this._cachedStep=this.step}this._formattedValue=this.computeFormattedValue(),this._ariaValueText=this.computeAriaValueText()}updated(){this.tooltipHandler(this.progress),this.checkMinMaxValues(this.minValue,this.maxValue,this.value,this.step)}hasMinMaxValues(e,t){return null!=e&&null!=t}checkMinMaxValues(e,t,r,n){this.hasMinMaxValues(e,t)||console.error("ERROR: Both min-value and max-value have to be provided."),e>=t&&console.warn(`WARNING: The slider's min-value (${e}) should be less than the max-value (${t}), otherwise the user will not be able to interact with the slider.`),r>t&&console.warn(`WARNING: The slider's default value (${r}) should be less than or equal to the max-value (${t}).`),r<e&&console.warn(`WARNING: The slider's default value (${r}) should be greater than or equal to the min-value (${e}).`),n>t&&console.warn(`WARNING: The slider's step (${n}) has to be less than the max value (${t}).`),(r-e)%n!==0&&console.warn(`WARNING: The default value (${r}) should be multiple of the step (${n}) counted from the min value (${e}).`),(t-e)%n!==0&&console.warn(`WARNING: The slider can't reach the max (${t}) value because it is not a multiple of the step (${n}) counting from the start (min: ${e})`)}tooltipHandler(e){const t="calc(var(--trigger-width) - var(--slider-thumb-size))",r=`calc(-1 * (${t} / 2))`,n=`calc(${e} * calc(${t} / 100))`;this.tooltipEl?.style.setProperty("--additional-offset-x",`calc(${r} + ${n} + 1px)`)}inputHandler(e){this.value=Number((e?.target).value),this.progress=(this.value-this.minValue)/(this.maxValue-this.minValue)*100}_computeDescribedBy(){const e=[];return this.bounds&&e.push("slider-min","slider-max"),this.helperText&&e.push("helper-text"),e.length>0?e.join(" "):void 0}computeFormattedValue(){if(this.hasTooltip||this.tooltipFormat)return"value"===this.tooltipFormat?this._valueFormatter.format(this.value):this._percentFormatter.format(Math.round(this.progress)/100)}computeAriaValueText(){if("value"!==this.tooltipFormat)return this._formattedValue}progressTrack(e){if(void 0!==this.origin&&Number.isFinite(this.origin)){const t=this.maxValue-this.minValue;return`--progress: ${e}%; --center: ${Math.min(100,Math.max(0,(this.origin-this.minValue)/t*100))}%`}return`--progress: ${e}%`}render(){const e=Oi(u(Ca));return Ni`<div class="slider-wrapper">
3014      <!-- The <label for> provides click-to-focus and the native label association.
3015           aria-labelledby is an explicit belt-and-suspenders ARIA link that ensures
3016           the accessible name resolves correctly in all shadow DOM 
3016implementations. -->
3017      <label id="slider-label" for="slider">${this.label}</label>
3018      ${this.hasMinMaxValues(this.minValue,this.maxValue)?Ni`
3019          <div class="slider-control"
3020              >
3021                ${this.bounds?Ni`<span id="slider-min" class="slider-bound" aria-label=${Bl(this.minLabel)}>${"percentage"===this.tooltipFormat?this._percentFormatter.format(0):this._numberFormatter.format(this.minValue)}</span>`:null}
3022                <div id="slider-control">
3023                  <input 
3024                    type="range" 
3025                    id="slider"
3026                    name="slider"
3027                    min="${this.minValue}"
3028                    max="${this.maxValue}"
3029                    step="${this.step}" 
3030                    value="${this.value}"
3031                    @input=${e=>this.inputHandler(e)}
3032                    style="${this.progressTrack(this.progress)}"
3033                    ?disabled=${this.disabled}
3034                    aria-disabled=${Bl(this.disabled)}
3035                    aria-labelledby="slider-label"
3036                    aria-describedby=${Bl(this._computeDescribedBy())}
3037                    aria-valuetext=${Bl(this._ariaValueText)}
3038                  />
3039                  ${!this.hasTooltip&&!this.tooltipFormat||this.disabled?null:Ni`
3040                          <${e} trigger-id="slider-control" id="tooltip" delay="50" position="top-center" z-index="55">
3041                            ${this._formattedValue}
3042                          </${e}>
3043                        `}
3044                </div>
3045                ${this.bounds?Ni`<span id="slider-max" class="slider-bound" aria-label=${Bl(this.maxLabel)}>${"percentage"===this.tooltipFormat?this._percentFormatter.format(1):this._numberFormatter.format(this.maxValue)}</span>`:null}
3046                        </div>`:le}
3047      ${this.helperText?Ni`<slot name="helper-text" id="helper-text" class="slider-helper">${this.helperText}</slot>`:le}
3048    </div>`}}Rv.baseName="slider",Rv.styles=b(":host{--slider-thumb-size:16px;--slider-thumb-disabled-background:linear-gradient(0deg,var(--goto-interactive-color-secondary-default)0%,var(--goto-interactive-color-secondary-default)100%),var(--goto-surface-color-default)}:host #slider-label{color:var(--goto-type-color-default);font:var(--goto-caption-medium-strong);margin-bottom:var(--goto-spacing-01);display:block}:host .slider-control{align-self:stretch;align-items:center;gap:8px;height:24px;display:flex;position:relative}:host #slider-control{width:100%;height:var(--slider-thumb-size);align-items:center;display:flex}:host .slider-bound{font:var(--goto-body-small);color:var(--goto-type-color-default)}:host .slider-helper{color:var(--goto-type-color-secondary);margin-top:var(--goto-spacing-01);font:var(--goto-caption-medium);cursor:text}:host input[type=range]{-webkit-appearance:none;appearance:none;cursor:pointer;background:linear-gradient(to right,var(--slider-track-progress-color,var(--goto-interactive-color-brand-default))var(--progress,0),var(--slider-track-base-color,var(--goto-surface-color-brand-secondary))var(--progress,0));border-radius:100px;outline:none;width:100%;height:4px}:host input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;height:var(--slider-thumb-size);width:var(--slider-thumb-size);background:var(--slider-thumb-color,var(--goto-interactive-color-brand-default));box-shadow:var(--goto-elevation-small);border:none;border-radius:50%}:host input[type=range]::-moz-range-thumb{height:var(--slider-thumb-size);width:var(--slider-thumb-size);background:var(--slider-thumb-color,var(--goto-interactive-color-brand-default));box-shadow:var(--goto-elevation-small);border:none;border-radius:50%}:host input[type=range]:hover{--slider-track-progress-color:var(--goto-interactive-color-brand-hover)}:host input[type=range]:hover::-webkit-slider-thumb{--slider-thumb-color:var(--goto-interactive-color-brand-hover)}:host input[type=range]:hover::-moz-range-thumb{--slider-thumb-color:var(--goto-interactive-color-brand-hover)}:host input[type=range]:active{--slider-track-progress-color:var(--goto-interactive-color-brand-pressed)}:host input[type=range]:active::-webkit-slider-thumb{--slider-thumb-color:var(--goto-interactive-color-brand-pressed)}:host input[type=range]:active::-moz-range-thumb{--slider-thumb-color:var(--goto-interactive-color-brand-pressed)}:host input[type=range]:disabled{--slider-track-base-color:var(--goto-interactive-color-disabled);--slider-track-progress-color:var(--goto-interactive-color-disabled);pointer-events:none}:host input[type=range]:disabled::-webkit-slider-thumb{--slider-thumb-color:var(--slider-thumb-disabled-background)}:host input[type=range]:disabled::-moz-range-thumb{--slider-thumb-color:var(--slider-thumb-disabled-background)}:host:has(input[type=range]:disabled){cursor:not-allowed}:host:has(input[type=range]:disabled) #slider-label,:host:has(input[type=range]:disabled) #slider-helper,:host:has(input[type=range]:disabled) .slider-bound{color:var(--goto-type-color-disabled)}:host .slider-control:has(input[type=range]:focus-visible),:host .slider-control:focus-visible,:host:host(:focus-visible) .slider-control{outline-offset:2px;outline:var(--goto-focus-color-highlight-default)solid 1px;border-radius:var(--goto-radius-small)}:host:host([origin]) input[type=range]{background:linear-gradient(to right,var(--slider-track-base-color,var(--goto-surface-color-brand-secondary))min(var(--center),var(--progress)),var(--slider-track-progress-color,var(--goto-interactive-color-brand-default))min(var(--center),var(--progress)),var(--slider-track-progress-color,var(--goto-interactive-color-brand-default))max(var(--center),var(--progress)),var(--slider-track-base-color,var(--goto-surface-color-brand-secondary))max(var(--center),var(--progress)))}
3048:host:host(:hover){--slider-track-progress-color:var(--goto-interactive-color-brand-hover);--slider-thumb-color:var(--goto-interactive-color-brand-hover)}:host:host(:active){--slider-track-progress-color:var(--goto-interactive-color-brand-pressed);--slider-thumb-color:var(--goto-interactive-color-brand-pressed)}"),h([$e("#tooltip")],Rv.prototype,"tooltipEl",void 0),h([$e("#slider-control")],Rv.prototype,"controlEl",void 0),h([Te({reflect:!0})],Rv.prototype,"label",void 0),h([Te({reflect:!0,attribute:"min-value",type:Number})],Rv.prototype,"minValue",void 0),h([Te({reflect:!0,attribute:"max-value",type:Number})],Rv.prototype,"maxValue",void 0),h([Te({reflect:!0})],Rv.prototype,"value",void 0),h([Te({reflect:!0})],Rv.prototype,"step",void 0),h([Te({reflect:!0,type:Boolean})],Rv.prototype,"bounds",void 0),h([Te({reflect:!0,attribute:"tooltip-format"})],Rv.prototype,"tooltipFormat",void 0),h([Te({reflect:!0,type:Boolean,attribute:"has-tooltip"})],Rv.prototype,"hasTooltip",void 0),h([Te({reflect:!0,type:Boolean})],Rv.prototype,"disabled",void 0),h([Te({reflect:!0,attribute:"helper-text"})],Rv.prototype,"helperText",void 0),h([Te({reflect:!0,attribute:"min-label"})],Rv.prototype,"minLabel",void 0),h([Te({reflect:!0,attribute:"max-label"})],Rv.prototype,"maxLabel",void 0),h([Te({reflect:!0,type:Number})],Rv.prototype,"origin",void 0),function(e={}){To(e,bl),d(Rv,e)}();class Pv extends Zt{constructor(){super(...arguments),this.size="medium"}render(){const e=Oi(u(Hl)),t=Oi(u(Nu)),r=`body-${this.size}`;return Ni`
3049      <figure>
3050        <blockquote>
3051          <${e} variant=${r}>
3052            <slot></slot>
3053          </${e}>
3054        </blockquote>
3055        ${this.author||this.sourceLink?Ni`
3056              <figcaption>
3057                <span aria-hidden="true"><slot name="avatar"></slot></span>
3058                <div class="blockquote-footer-text">
3059                  ${this.author?Ni`<${e} class="blockquote-author-name" variant="caption-medium-strong">${this.author}</${e}>`:le}
3060                  ${this.sourceLink?Ni`
3061                        <${t} id="source" class="blockquote-source" variant='caption-medium' href=${this.sourceLink}>${this.sourceText??this.sourceLink}</${t}>
3062                      `:le}
3063                </div>
3064              </figcaption>`:le}
3065      </figure>
3066    `}}Pv.baseName="blockquote",Pv.styles=b(':host{white-space:normal;width:100%;height:auto;display:block}:host blockquote,:host figure{margin:0}:host figure{margin-inline:var(--goto-spacing-04);padding-inline-start:var(--goto-spacing-06);padding-block:var(--goto-spacing-02);position:relative}:host figure:before{content:"";height:100%;width:var(--goto-spacing-01);border-radius:var(--goto-radius-small);background-color:var(--goto-icon-color-secondary);position:absolute;top:0;left:0}:host figcaption{align-items:center;gap:var(--goto-spacing-03);margin-block-start:var(--goto-spacing-02);display:flex}:host figcaption>span[aria-hidden=true]{display:contents}:host .blockquote-footer-text{flex-wrap:wrap;align-items:center;max-width:100%;display:flex;overflow:hidden}:host .blockquote-author-name{margin-inline-end:var(--goto-spacing-02)}:host .blockquote-author-name,:host .blockquote-source{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}'),h([Te({reflect:!0})],Pv.prototype,"size",void 0),h([Te({reflect:!0})],Pv.prototype,"author",void 0),h([Te({reflect:!0,attribute:"source-link"})],Pv.prototype,"sourceLink",void 0),h([Te({reflect:!0,attribute:"source-text"})],Pv.prototype,"sourceText",void 0),function(e={}){vr(e),To(e,bl),Mu(e),d(Pv,e)}();var Dv=r(769);const Mv=()=>(0,Dv.Z)()?.namespaces,zv=["side-panel-permission-banner","overrideBanner","retry-login-container","shellDisconnectionBanner","phone-disconnected-error-id","voiceAutoAnswerBanner","voicemail-box-almost-full-banner","shellUnrecoverableErrorBanner","shellSessionExpiredBanner","direct-meeting-invite-declined-banner","voicemail-box-full-banner","shellOutdatedVersionBanner","shellStaleUpdateBanner"];var Fv,Uv={},Bv=(Fv||(Fv=1,function(e){typeof globalThis<"u"?globalThis:typeof self<"u"&&self,function(e){function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function r(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};
3066r%2?t(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){if(!e)throw Error("single-spa-html must be called with an opts object");if(("string"!=typeof(e=r(r({},o),e)).template||0===e.template.trim().length)&&"function"!=typeof e.template)throw Error("single-spa-html must be passed a 'template' opt that is a non empty string or function");if(e.domElementGetter&&"function"!=typeof e.domElementGetter)throw Error("single-spa-html was given 'opts.domElementGetter', but it isn't a function");return{bootstrap:i.bind(null,e),mount:s.bind(null,e),unmount:a.bind(null,e)}};var o={template:"",domElementGetter:null};function i(e,t){return Promise.resolve()}function s(e,t){return Promise.resolve("function"==typeof e.template?e.template(t):e.template).then(function(r){var n=l(e,t)(t);if(!n)throw Error("single-spa-html: domElementGetter did not return a valid dom element");n.innerHTML=r})}function a(e,t){return Promise.resolve().then(function(){var r=l(e,t)(t);if(!r)throw Error("single-spa-html: domElementGetter did not return a valid dom element");r.innerHTML=""})}function l(e,t){return t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa-html was not given an application name as a prop, so it can't make a unique dom element container for the ht l application");var r="single-spa-application:".concat(t);return function(){var e=document.getElementById(r);return e||((e=document.createElement("div")).id=r,document.body.appendChild(e)),e}}(t)}}(e)}(Uv)),Uv);const Hv=(0,Dv._)(Bv),jv=({template:e})=>{const{bootstrap:t,mount:r,unmount:n,update:o}=Hv({template:e});return{bootstrap:t,mount:r,unmount:n,update:o}};let Vv=class{callback;delay;id=null;constructor(e,t){this.callback=e,this.delay=t,this.reset()}pause(){this.stop()}reset(){this.stop(),this.id=setInterval(this.callback,this.delay)}stop(){this.id&&(clearInterval(this.id),this.id=null)}};class Wv{callback;delay;start=Date.now();id=null;static create(e,t){return new Wv(e,t)}constructor(e,t){this.callback=e,this.delay=t,this.resume()}pause(){this.stop(),this.delay-=Date.now()-this.start}resume(){this.start=Date.now(),this.stop(),this.id=setTimeout(this.callback,this.delay)}stop(){this.id&&(clearTimeout(this.id),this.id=null)}}const Kv=()=>window,qv=(e,t)=>{const r=Kv(),n=r.location,o=Gv(e);0===e.indexOf("#")?r.location.hash=o.hash:n.host!==o.host&&o.host?r.location.href=e:o.pathname===n.pathname&&o.search===n.search?r.location.hash=o.hash:r.history.pushState(null,"",e)},Gv=e=>{const t=document.createElement("a");return t.href=e,t},Zv=(e,t)=>{const r=e,n=Jv(r);return n.push(t),r.actions=n,r},Yv=e=>e.contextItems??[],Jv=e=>e.actions??[],Qv=.05;function Xv(e,t,r){const n=((e,t)=>(((e,t)=>{if(!e&&!t)throw new Error('ResponsiveView: need at least one parameter, "min | max".');if(e&&t){const r=Dv.$.indexOf(e);if(Dv.$.indexOf(t)<r)throw new Error("ResponsiveView: max value should be greater or equal to min value.")}if(e&&!Dv.$.includes(e))throw new Error(`ResponsiveView: min value of "${e}" is not supported.`);if(t&&!Dv.$.includes(t))throw new Error(`ResponsiveView: max value of "${t}" is not supported.`)})(e,t),e&&t&&e===t?(e=>{let t=Dv.a0[e];const r=Dv.$.indexOf(e),n=Dv.$[r+1];let o=Dv.a0[n]-Qv;return e===Dv.a1.xs&&(t=0),e===Dv.a1.xxl&&(o=1e4),`(min-width: ${t}px) and (max-width: ${o}px)`})(e):e&&t?((e,t)=>{const r=Dv.a0[e];let n=Dv.a0[t]-Qv;return t===Dv.a1.xxl&&(n=1e4),`(min-width: ${r}px) and (max-width: ${n}px)`})(e,t):e?(e=>`(min-width: ${Dv.a0[e]}px)`)(e):(e=>{let t=Dv.a0[e]-Qv;return e===Dv.a1.xs&&(t=0),`(max-width: ${t}px)`})(t)))(e,t),o=e=>{r({active:e.matches})},i=Kv().matchMedia(n);return i.addEventListener("change",o),r({active:i.matches}),()=>i.removeEventListener("change",o)}const eb=(e,t="")=>{const{status:r=412,statusText:n="Precondition Failed",body:o=null}=e??{};if(r>=400&&r<=500)throw new Dv.a3({message:t,response:e,status:r,statusText:n,body:o})};let tb,rb=!1;const nb=()=>new Dv.S("You are in the process of logging out"),ob=e=>(0,Dv.g)().warn(`You are in the process of logging out, ${e} should not be called`),ib=(e,t)=>
3066rb?(ob("authenticatedFetch"),Promise.reject(nb())):(0,Dv.y)(e,t),sb=()=>rb?(ob("IsLoggedIn"),Promise.reject(nb())):Dv.a9.getInstance().waitIsLoggedInState(),ab={getToken:()=>{if(!rb)return(0,Dv.aa)();throw ob("getToken"),nb()},isLoggedIn:sb,authenticatedFetch:ib,authenticatedFetchWithRetries:(e,t,r,n)=>rb?(ob("authenticatedFetchWithRetries"),Promise.reject(nb())):(0,Dv.a8)(e,t,r,n),login:e=>(0,Dv.a6)()?((0,Dv.g)().warn("auth-outage: login blocked while the shell-auth-outage flag is on"),Promise.resolve()):rb?(ob("login"),Promise.reject(nb())):((e?.restartFlow||!tb)&&(tb=(0,Dv.a7)(e)),tb),logout:()=>rb?(ob("logout"),Promise.reject(nb())):((0,Dv.g)().info("wrappedLogout: logout initiated",{stack:new Error("wrappedLogout caller trace").stack}),rb=!0,(0,Dv.a5)().then(()=>{rb=!1}).catch(e=>{throw rb=!1,e})),refresh:()=>rb?(ob("refresh"),Promise.reject(nb())):(0,Dv.a4)()},lb=e=>{const t=(0,Dv.Z)(),r=(t.context.pbx?.pbxes??[]).find(t=>t.id===e);if(!r)return!1;const n={accountKey:r.accountKey??"",accountName:r.name??"",pbxId:r.id,pbxUserId:r.userInfo?.userId??"",externalUserKey:t.user.key??""};return(0,Dv.ab)(n)};var cb=(e=>(e.UNAVAILABLE="UNAVAILABLE",e.OFFLINE="OFFLINE",e.ONLINE="ONLINE",e.BUSY="BUSY",e.DO_NOT_DISTURB="DO_NOT_DISTURB",e.AWAY="AWAY",e.AUTO_UPDATE="AUTO_UPDATE",e))(cb||{}),db=(e=>(e.NONE="NONE",e.OFFLINE="OFFLINE",e.AWAY="AWAY",e.BUSY="BUSY",e.ONLINE="ONLINE",e))(db||{}),ub=(e=>(e.NONE="NONE",e.DO_NOT_DISTURB="DO_NOT_DISTURB",e))(ub||{}),hb=(e=>(e.IN_A_MEETING="IN_A_MEETING",e.IN_A_CALL="IN_A_CALL",e.IN_A_CALENDAR_EVENT="IN_A_CALENDAR_EVENT",e))(hb||{}),pb=(e=>(e.USER_SET="USER_SET",e.ONE_TIME_PERIOD="ONE_TIME_PERIOD",e.WORK_PERIOD="WORK_PERIOD",e))(pb||{}),gb=(e=>(e.ON="ON",e.OFF="OFF",e.NONE="NONE",e))(gb||{});let fb;function mb(e){return(t,r)=>(0,Dv.ac)(t,r,{get(){return(this.renderRoot??(fb??=document.createDocumentFragment())).querySelectorAll(e)}})}const vb='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M13 3H11V11H3V13H11V21H13V13H21V11H13V3Z" fill="currentColor"></path></svg>',bb='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 2L2 22H22L12 2ZM12 6.47214L5.23607 20H18.7639L12 6.47214ZM13 11V16H11V11H13ZM12 19C12.5523 19 13 18.5523 13 18C13 17.4477 12.5523 17 12 17C11.4477 17 11 17.4477 11 18C11 18.5523 11.4477 19 12 19Z" fill="currentColor"></path></svg>',yb='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.29288 18.7071L7.87866 17.2929L13.1716 12L7.87866 6.70711L9.29287 5.29289L16 12L9.29288 18.7071Z" fill="currentColor"></path></svg>',wb='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM16 9.14116L13.1412 12L16 14.8588L14.8588 16L12 13.1412L9.14116 16L8 14.8588L10.8588 12L8 9.14116L9.14116 8L12 10.8588L14.8588 8L16 9.14116Z" fill="currentColor"></path></svg>',xb='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.1213 11.7071L19.4142 5.41421L18 4L11.7071 10.2929L5.41422 4L4 5.41421L10.2929 11.7071L4 18L5.41421 19.4142L11.7071 13.1213L18 19.4142L19.4142 18L13.1213 11.7071Z" fill="currentColor"></path></svg>',_b='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.1213 11.7071L19.4142 5.41421L18 4L11.7071 10.2929L5.41422 4L4 5.41421L10.2929 11.7071L4 18L5.41421 19.4142L11.7071 13.1213L18 19.4142L19.4142 18L13.1213 11.7071Z" fill="currentColor"></path></svg>',kb='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 19.4142L4.29289 11.7071L5.70711 10.2929L11 15.5858L11 2L13 2L13 15.5858L18.2929 10.2929L19.7071 11.7071L12 19.4142Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M4 20H20V22H4L4 20Z" fill="currentColor"></path></svg>',Cb='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M18 2L22 6L7 21L2 22L3 17L18 2ZM16.9142 5.91421L18.0858 7.08579L19.1716 6L18 4.82843L16.9142 5.91421ZM16.5858 8.58579L15.4142 7.41421L4.8424 17.986L4.54951 19.4505L6.01398 19.1576L16.5858 8.58579Z" fill="currentColor"></path></svg>',Sb='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M14 6H16.5858L12.2929 10.2929L13.7071 11.7071L18 7.41421V10H20V4H14
3066V6ZM12 6H4V20H18V12H16V18H6V8H12V6Z" fill="currentColor"></path></svg>',Eb='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM12 9C12.8284 9 13.5 8.32843 13.5 7.5C13.5 6.67157 12.8284 6 12 6C11.1716 6 10.5 6.67157 10.5 7.5C10.5 8.32843 11.1716 9 12 9ZM13.5 16V10H9V12H10.5V16H9V18H15V16H13.5Z" fill="currentColor"></path></svg>',Ib='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.2857 19H22V4H2V19H6V22L12.2857 19ZM8 18.8293L11.8329 17H20V6H4V17H8V18.8293Z" fill="currentColor"></path><path d="M7 11.5C7 10.9477 7.44772 10.5 8 10.5C8.55228 10.5 9 10.9477 9 11.5C9 12.0523 8.55228 12.5 8 12.5C7.44772 12.5 7 12.0523 7 11.5Z" fill="currentColor"></path><path d="M13 11.5C13 10.9477 12.5523 10.5 12 10.5C11.4477 10.5 11 10.9477 11 11.5C11 12.0523 11.4477 12.5 12 12.5C12.5523 12.5 13 12.0523 13 11.5Z" fill="currentColor"></path><path d="M15 11.5C15 10.9477 15.4477 10.5 16 10.5C16.5523 10.5 17 10.9477 17 11.5C17 12.0523 16.5523 12.5 16 12.5C15.4477 12.5 15 12.0523 15 11.5Z" fill="currentColor"></path></svg>',Ab='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM8.70735 4.70686C5.93148 5.96206 4 8.75547 4 12C4 16.4183 7.58172 20 12 20C15.2445 20 18.0379 18.0686 19.2927 15.2931C18.2885 15.7472 17.1737 16 16 16C11.5817 16 8 12.4183 8 8C8 6.82622 8.25279 5.71149 8.70735 4.70686Z" fill="currentColor"></path></svg>',Tb='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12H22C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C15.2712 2 18.1755 3.57069 20 5.99903V3L22 3V10H15V8L18.9297 8C17.5465 5.60879 14.9611 4 12 4C7.58172 4 4 7.58172 4 12Z" fill="currentColor"></path></svg>',Ob='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.9056 16.3199C13.551 17.3729 11.8487 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10C18 11.8487 17.3729 13.551 16.3199 14.9056L22 20.5858L20.5858 22L14.9056 16.3199ZM16 10C16 13.3137 13.3137 16 10 16C6.68629 16 4 13.3137 4 10C4 6.68629 6.68629 4 10 4C13.3137 4 16 6.68629 16 10Z" fill="currentColor"></path></svg>',Lb='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M9 14L4.25204 14H2.20004H2V21H4L4 18.001C4.0918 18.1232 4.18634 18.2432 4.28351 18.3609C6.11766 20.5834 8.8934 22 12 22C17.5228 22 22 17.5228 22 12H20C20 16.4183 16.4183 20 12 20C9.03887 20 6.4535 18.3912 5.07026 16H9L9 14ZM4 12C4 7.58172 7.58172 4 12 4C14.9611 4 17.5465 5.60879 18.9297 8L15 8V10H19.748H21.8H22V3L20 3V5.99903C18.1755 3.57069 15.2712 2 12 2C6.47715 2 2 6.47715 2 12H4Z" fill="currentColor"></path></svg>',$b=(e,t,r)=>{const n=new Map;for(let o=t;o<=r;o++)n.set(e[o],o);return n},Nb=(0,Dv.ad)(class extends Dv.ae{constructor(e){if(super(e),e.type!==Dv.af.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,r){let n;void 0===r?r=t:void 0!==t&&(n=t);const o=[],i=[];let s=0;for(const t of e)o[s]=n?n(t,s):s,i[s]=r(t,s),s++;return{values:i,keys:o}}render(e,t,r){return this.dt(e,t,r).values}update(e,[t,r,n]){const o=(0,Dv.ag)(e),{values:i,keys:s}=this.dt(t,r,n);if(!Array.isArray(o))return this.ut=s,i;const a=this.ut??=[],l=[];let c,d,u=0,h=o.length-1,p=0,g=i.length-1;for(;u<=h&&p<=g;)if(null===o[u])u++;else if(null===o[h])h--;else if(a[u]===s[p])l[p]=(0,Dv.ah)(o[u],i[p]),u++,p++;else if(a[h]===s[g])l[g]=(0,Dv.ah)(o[h],i[g]),h--,g--;else if(a[u]===s[g])l[g]=(0,Dv.ah)(o[u],i[g]),(0,Dv.ai)(e,l[g+1],o[u]),u++,g--;else if(a[h]===s[p])l[p]=(0,Dv.ah)(o[h],i[p]),(0,Dv.ai)(e,o[u],o[h]),h--,p++;else if(void 0===c&&(c=$b(s,p,g),d=$b(a,u,h)),c.has(a[u]))if(c.has(a[h])){const t=d.get(s[p]),r=void 0!==t?o[t]:null;if(null===r){const t=(0,Dv.ai)(e,o[u]);(0,Dv.ah)(t,i[p]),l[p]=t}else l[p]=(0,Dv.ah)(r,i[p]),(0,Dv.ai)(e,o[u],r),o[t]=null;p++}else(0,Dv.aj)(o[h]),h--;else(0,Dv.aj)(o[u]),u++;for(;p<=g;){const t=(0,Dv.ai)(e,l[g+1]);(0,Dv.ah)(t,i[p]),l[p++]=t}for(;u<=h;){const e=o[u++];null!==e&&(0,Dv.aj)(e)}return this.ut=s,(0,Dv.al)(e,l),Dv.ak}});var Rb;!function(e){e.AVAILABLE="available",e.AWAY="away",e.BUSY="busy",e.DO_NOT_DISTURB="do-not-disturb",e.OFFLINE="offline",e.DISCONNECTED="disconnected"}(Rb||(Rb={}));const Pb=()=>({[Rb.AVAILABLE]:cb.ONLINE,[Rb.BUSY]:cb.BUSY,[Rb.DO_NOT_DISTURB]:cb.DO_NOT_DISTURB,[Rb.AWAY]:cb.AWAY,[Rb.OFFLINE]:cb.OFFLINE,[Rb.DISCONNECTED]:cb.OFFLINE}),Db=e=>{const t=Pb();return Object.keys(t).find(r=>t[r]===e)??Rb.OFFLINE},Mb=e=>Pb()[e]??cb.OFFLINE,zb=e=>(0,Dv.am)()===e,Fb=e=>"presence"===e.data.type,Ub=(e,t)=>
3066({...t.get(e.userKey),...e});class Bb{constructor(e,t){this.disconnectionTimeout=void 0,this.externalUserKey="",this.accumulatedResolves=new Map,this.accumulatorTimer=null,this.externalUserKeys=new Map,this.subscribeTimer=null,this.subscriptions=new Map,this.notificationChannelConnectedHandler=e=>{void 0!==this.disconnectionTimeout&&((0,Dv.ap)(this.disconnectionTimeout),this.disconnectionTimeout=void 0);const{user:t}=(0,Dv.Z)();if(this.notificationChannelId=e.channelId,""===this.externalUserKey){const e=t.key??"";this.externalUserKey=e}this.notificationChannelId!==this.oldNotificationChannelId&&this.unregisterSubscriptionsToPresenceService(this.oldNotificationChannelId),this.oldNotificationChannelId=this.notificationChannelId,this.registerSubscriptionsToPresenceService()},this.notificationChannelDisconnectedHandler=()=>{this.disconnectionTimeout=(0,Dv.aq)(this.showPresenceDisconnected,1e4)},this.showPresenceDisconnected=()=>{this.disconnectionTimeout=void 0,(0,Dv.ar)({presence:Rb.DISCONNECTED,userKey:this.externalUserKey,externalUserKey:this.externalUserKey}),this.notificationChannelId=void 0},this.handleNotificationEvent=e=>{if(Fb(e)){const t=e.data.content,{appearance:r,userKey:n,userNote:o,status:i}=t;if((e=>Fb(e)&&zb(e.data.content.userKey))(e)){const{userDoNotDisturb:t,userAppearance:s,userStatus:a,doNotDisturbDetails:l,userDoNotDisturbExpiration:c}=e.data.content;this.updateSubscription(n,{userDoNotDisturb:t,userDoNotDisturbExpiration:c,userAppearance:s,userNote:o,userStatus:a,status:i}),(0,Dv.as)({eventId:e.eventId,userKey:n,externalUserKey:n,userDoNotDisturb:t,userDoNotDisturbExpiration:c,doNotDisturbDetails:l,userAppearance:s,userNote:o,userStatus:a,appearance:r,status:i})}const s=Db(r);this.updateSubscription(n,{presence:s,appearance:r,userNote:o,status:i}),(0,Dv.ar)({eventId:e.eventId,userKey:n,externalUserKey:n,presence:s,appearance:r,userNote:o,status:i})}},this.updateSubscription=(e,t)=>{this.subscriptions.set(e,{...this.subscriptions.get(e),...t})},this.unsubscribeIntervalHandler=()=>{Array.from(this.subscriptions.keys()).forEach(e=>{const t=this.subscriptions.get(e);(e=>!!(e&&e.subscribersCount>0))(t)||(t?.subscriptionId&&this.presenceService.deleteSubscriptionBySubscriptionId(t.subscriptionId),this.subscriptions.delete(e))})},this.presenceService=e,this.notificationChannelId=t,this.subscribeToChannelEvents(),this.unsubscribeInterval=new Vv(this.unsubscribeIntervalHandler,1e4)}isNotificationChannelAvailable(){return!!this.notificationChannelId}getPresenceSnapshots(e){return new Promise(t=>{const r=this.accumulatedResolves.get(e)??[];this.accumulatedResolves.set(e,[...r,t]),this.accumulatorTimer||(this.accumulatorTimer=new Wv(()=>{this.accumulatorTimer=null;const e=this.getAccumulatedUserKeys(),t=this.getAccumulatedResolvesCopy();this.resetAccumulatedUserKeys(),this.fetchUserAppearance(e,t)},250))})}async subscribe(e){const t=this.subscriptions.get(e);if(!t)return await new Promise(t=>{this.externalUserKeys.set(e,t),this.subscribeTimer||(this.subscribeTimer=new Wv(()=>{this.subscribeTimer=null,this.internalSubscribe(new Map(this.externalUserKeys)),this.externalUserKeys=new Map},250))});{const{userDoNotDisturb:r,userAppearance:n,userStatus:o,userNote:i,status:s,presence:a,appearance:l,userDoNotDisturbExpiration:c}=t;this.increaseSubscriberCount(e),(0,Dv.ar)({appearance:l,presence:a,userKey:e,userNote:i,status:s,externalUserKey:e}),zb(e)&&(0,Dv.as)({userKey:e,externalUserKey:e,userDoNotDisturb:r,userDoNotDisturbExpiration:c,userAppearance:n,userStatus:o,userNote:i,appearance:l,status:s})}}unsubscribe(e){this.subscriptions.get(e)&&(this.decreaseSubscriberCount(e),this.unsubscribeInterval?.reset())}getUserPresence(){return this.presenceService.getUserPresence().then(async e=>await e.json()).catch(e=>{(0,Dv.g)().error(`Failed to get user presence with error: ${e}`)})}setUserPresence(e){return this.presenceService.setUserPresence(e).then(async e=>((0,Dv.g)().log("Succeed to setUserPresence, requestId: ",(0,Dv.at)(e)),await e.json())).catch(e=>{(0,Dv.g)().error(`Failed to set user presence with error: ${e}`)})}subscribeToChannelEvents(){const e=(0,Dv.au)().subscribeTo(Dv.r);e.connected.on(this.notificationChannelConnectedHandler),e.disconnected.on(this.notificationChannelDisconnectedHandler),e.message.on(this.handleNotificationEvent),(0,Dv.av)(()=>{e.connected.removeListener(this.notificationChannelConnectedHandler),e.disconnected.removeListener(this.notificationChannelDisconnectedHandler),e.message.removeListener(this.handleNotificationEvent)})}emitUserCurrentPresence(){const e=this.subscriptions.get(this.externalUserKey);if(e?.presence){const{presence:t,userNote:r}=e;(0,Dv.ar)({presence:t,userKey:this.externalUserKey,externalUserKey:this.externalUserKey,userNote:r})}}createPresenceSubscriptionHandler(e){const t=this.presenceService.createSubscription({userKeys:e,channelId:this.notificationChannelId});return this.unsubscribeInterval?.reset(),(async(e,t)=>{try{return(await t).items}catch(t){throw new Error(`failed to create presence subscription for external user key ${e} with error: ${t}`)}})(e,t)}registerSubscriptionsToPresenceService(){const e=[];this.subscriptions.forEach((t,r)=>{t.subscriptionId||e.push(r)}),e.length?this.createPresenceSubscriptionHandler(e).then(e=>
3066{e.forEach(e=>{this.updateSubscription(e.userKey,{...Ub(e,this.subscriptions)})}),this.emitUserCurrentPresence()}).catch(e=>{(0,Dv.g)().error(e)}):this.emitUserCurrentPresence()}unregisterSubscriptionsToPresenceService(e){e&&this.presenceService.deleteSubscriptionByChannelId(e).catch(e=>{this.emitUserCurrentPresence(),(0,Dv.g)().log("Presence:deleteSubscriptionByChannelId",e)}),this.subscriptions.forEach((e,t)=>{e.subscriptionId&&this.subscriptions.set(t,{subscriptionId:void 0,subscribersCount:e.subscribersCount})})}async internalSubscribe(e){const t=Array.from(e.keys());t.forEach(e=>{this.updateSubscription(e,{subscriptionId:void 0,subscribersCount:1})}),this.isNotificationChannelAvailable()&&this.createPresenceSubscriptionHandler(t).then(t=>{t.forEach(t=>{this.updateSubscription(t.userKey,{...t});const r=e.get(t.userKey);r&&r()})}).catch(e=>{(0,Dv.g)().error(e)}),this.unsubscribeInterval?.reset()}increaseSubscriberCount(e){const t=this.subscriptions.get(e);t&&this.subscriptions.set(e,{...t,subscribersCount:++t.subscribersCount})}getAccumulatedUserKeys(){return Array.from(this.accumulatedResolves.keys())}getAccumulatedResolvesCopy(){return new Map(this.accumulatedResolves)}resetAccumulatedUserKeys(){this.accumulatedResolves=new Map}fetchUserAppearance(e,t){(async e=>{if(e.length>0){const t=new URLSearchParams;e.forEach(e=>t.append("userKey",e));try{if("rc"===(0,Dv.an)().environment){const e=[];return await Promise.resolve(e)}return(await(await(0,Dv.y)(`${(0,Dv.ao)()}/presence/v1/presence?${t.toString()}`)).json()).items}catch(e){(0,Dv.g)().error(`failed to get user appearance: ${e}`)}}return[]})(e).then(e=>{(e=>e.map(e=>{const{timestamp:t,userKey:r,appearance:n,userAppearance:o,status:i,userStatus:s,userNote:a}=e;return{timestamp:t,userKey:r,presence:Db(n),appearance:n,userAppearance:o,status:i,userStatus:s,userNote:a}}))(e).forEach(e=>{const r=t.get(e.userKey);r&&r.forEach(t=>t(e))})})}decreaseSubscriberCount(e){const t=this.subscriptions.get(e);t&&this.subscriptions.set(e,{...t,subscribersCount:--t.subscribersCount})}}const Hb="userreport-launcher-script",jb=e=>{e._urq||(e._urq=[]);const t=()=>{let t=!1;return e.document.getElementById(Hb)&&(t=!0),t},r=r=>{const{type:n,uuid:o}=r,i=[n,o].filter(Boolean);if(!1===t())throw new Error("This event won't be tracked because you forgot to load a dependency");e._urq?.push(i)};return{openFeedbackDialog:()=>{r({type:"Feedback_Open"})},mounted:t,mount:t=>{let n=!1;return new Promise(t=>{e.setTimeout(()=>{if(e.document.getElementById(Hb))n=!0;else{const t=(e=>{const t=e.document.createDocumentFragment(),r=e.document.createElement("script");return r.src=Dv.aw,r.async=!0,r.id=Hb,t.appendChild(r),t})(e);e.document.body.appendChild(t)}t(n)},0)}).then(e=>(!1===e&&r({type:"initSite",uuid:t}),e))}}},Vb=jv({template:()=>"<goto-app-launch-settings></goto-app-launch-settings>"}),Wb=jv({template:()=>"<goto-calendar-settings></goto-calendar-settings>"}),Kb=jv({template:()=>"<goto-appearance-settings></goto-appearance-settings>"}),qb=jv({template:()=>"<goto-keyboard-shortcut-settings></goto-keyboard-shortcut-settings>"}),Gb=jv({template:()=>"<goto-notifications-settings></goto-notifications-settings>"}),Zb=jv({template:()=>"<goto-language-settings></goto-language-settings>"}),Yb=jv({template:()=>"<goto-schedule-settings></goto-schedule-settings>"}),Jb={app:Vb,name:"goto/app-launch",rootRoutes:[Dv.az]},Qb={app:Wb,name:"goto/calendar",rootRoutes:[Dv.aA]},Xb={app:Kb,name:"goto/appearance",rootRoutes:[Dv.ax]},ey={app:Yb,name:"goto/schedule",rootRoutes:[Dv.aE]},ty={app:qb,name:"goto/keyboard-shortcut",rootRoutes:[Dv.aB]},ry={app:Gb,name:"goto/notifications",rootRoutes:[Dv.aD]},ny={app:Zb,name:"goto/language",rootRoutes:[Dv.aC]},oy=Object.freeze(Object.defineProperty({__proto__:null,goToAppearanceExperienceConfig:Xb,gotoAppLaunchSettingsExperienceConfig:Jb,gotoCalendarExperienceConfig:Qb,gotoKeyboardShortcutExperienceConfig:ty,gotoLanguageSettingsExperienceConfig:ny,gotoNotificationsSettingsExperienceConfig:ry,gotoScheduleExperienceConfig:ey},Symbol.toStringTag,{value:"Module"})),iy=(0,Dv.aF)({template:e=>Dv.aH`<goto-settings .settingLinks=${e?.settingLinks??[]}></goto-settings>`,domElement:Dv.aG}),sy={name:"goto/settings",app:iy,activeWhen:[Dv.aI]},ay=(0,Dv.aF)({template:Dv.aH`<goto-terms-of-service></goto-terms-of-service>`,domElement:Dv.aG}),ly=(0,Dv.aF)({template:Dv.aH`<goto-shell-landing-controller></goto-shell-landing-controller>`,domElement:Dv.aG}),cy=(0,Dv.aF)({template:()=>Dv.aH`<goto-calendar-connected></goto-calendar-connected>`,domElement:Dv.aJ}),dy=(0,Dv.aF)({template:()=>Dv.aH`<goto-unauthenticated-error></goto-unauthenticated-error>`,domElement:Dv.aJ}),uy=(0,Dv.aF)({template:()=>Dv.aH`<goto-search-results-page></goto-search-results-page>`,domElement:Dv.aG}),hy=(0,Dv.aF)({template:Dv.aH`<goto-integration-start-plugin></goto-integration-start-plugin>`,domElement:Dv.aG}),py=(0,Dv.aF)({template:e=>{const{data:t={}}=e??{};return Dv.aH`<goto-integration-redirect-proxy .data=${t}></goto-integration-redirect-proxy>`},domElement:Dv.aG}),gy=(0,Dv.aF)({template:Dv.aH`<goto-connect-to-desktop-app></goto-connect-to-desktop-app>`,domElement:Dv.aG}),fy={name:"goto/terms-of-service",app:ay,activeWhen:()=>(0,Dv.aS)(location.pathname,Dv.aT)},my={name:"goto/shell-landing",app:ly,activeWhen:()=>(0,Dv.aS)(location.pathname,Dv.aU)},vy={name:`goto${Dv.aO}`,app:hy,activeWhen:Dv.aO},by={name:`goto${Dv.aP}`,app:py,activeWhen:Dv.aP,customProps:{data:(0,Dv.aK)("data")}},yy={name:`goto${Dv.aQ}`,app:gy,activeWhen:()=>(0,Dv.aS)(location.pathname,Dv.aQ)},wy={app:cy,name:`goto${Dv.aL}`,activeWhen:Dv.aL},xy={app:dy,name:`goto${Dv.aM}`,activeWhen:()=>(0,Dv.aS)(location.pathname,Dv.aM)},_y={name:"goto/error-page",app:Dv.aN,activeWhen:()=>(0,Dv.aS)(location.pathname,"/error")},ky={name:"goto/search",app:uy,activeWhen:Dv.aR},Cy=()=>[fy,my,wy,xy,_y,vy,by,yy,ky];var Sy=(e=>(e.LIGHT="light",e.DARK="dark",e.SYSTEM="system",e.HIGH_CONTRAST="high-contrast",e))(Sy||{});const Ey="system";function Iy(e,t){"system"===t?(e.setAttribute("automatic","true"),e.removeAttribute("theme")):(e.setAttribute("theme",t),e.removeAttribute("automatic"))}function Ay(e){(0,Dv.Z)().userPreferences?.setPreference("theme",e),(0,Dv.aW)(Dv.aX.chameleonTheme,e)}function Ty(){return(0,Dv.aZ)(Dv.aX.chameleonTheme)??Ey}async function Oy(){return await((0,Dv.Z)().userPreferences?.getPreference("theme"))??Ey}const Ly=e=>"dark"===e?Sy.DARK:"contrast"===e?Sy.HIGH_CONTRAST:Sy.LIGHT,$y=["/calendar-connected",Dv.aT,Dv.aU,Dv.a_.redirect,Dv.aO,Dv.aP,Dv.aQ],Ny=[Dv.aU,Dv.aO,Dv.aP,Dv.aQ,Dv.aT],Ry=e=>{const t=!!(0,Dv.Z)()?.user.key,r=$y.some(e=>(0,Dv.bg)().startsWith(e))||"/"===(0,Dv.bg)();return!(!t||r||(0,Dv.bh)((0,Dv.bg)())||!(0,Dv.bi)()?.showSideBar)},Py=e=>{const t=Ny.some(e=>(0,Dv.bg)()===e);return!(!(0,Dv.Z)()?.user.key||t||(0,Dv.bh)((0,Dv.bg)())||!(0,Dv.bi)()?.showTopBar)},Dy="shell-chameleon-theme-provider";class My{navigateMainWindowToUrl(e){(0,Dv.bj)(e)}openUrlInNewTab(e){(0,Dv.bk)(e)}}let zy,Fy,Uy;class By{constructor(e){this.navigationService=e}navigateMainWindowToUrl(e){this.navigationService.navigateMainWindowToUrl(e),(e=>{const t=(0,Dv.O)();t.isCompanion&&((0,Dv.g)().log(`Opening integration with relative URL: ${e}`),(0,Dv.bk)((0,Dv.bm)()),zy=e,Fy&&(0,Dv.ap)(Fy),Fy=(0,Dv.aq)(()=>{zy&&((0,Dv.g)().log(`No integration claimed navigation, clearing pending relative URL: ${zy}`),zy=void 0)},6e4),t.send({type:"navigation",payload:{topic:"notify-navigation-available",data:{}}}))})(e)}openUrlInNewTab(e){this.navigationService.openUrlInNewTab(e)}}class Hy{constructor(e){this.navigationService=e}navigateMainWindowToUrl(e){this.navigationService.navigateMainWindowToUrl(e)}openUrlInNewTab(e){(0,Dv.bn)()&&(0,Dv.bo)(e)}}const jy=()=>(Uy||Vy(),Uy),Vy=()=>{Uy=new My,(0,Dv.O)().isCompanion?Uy=new By(Uy):(0,Dv.O)().isIntegration&&(Uy=new Hy(Uy))},Wy=(e,t)=>e-t,Ky=()=>Intl.DateTimeFormat().resolvedOptions().timeZone;
vendor: 25,591 bytes, line 3066
3066class qy extends Error{}class Gy extends qy{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class Zy extends qy{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class Yy extends qy{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Jy extends qy{}class Qy extends qy{constructor(e){super(`Invalid unit ${e}`)}}class Xy extends qy{}class ew extends qy{constructor(){super("Zone is an abstract class")}}const tw="numeric",rw="short",nw="long",ow={year:tw,month:tw,day:tw},iw={year:tw,month:rw,day:tw},sw={year:tw,month:rw,day:tw,weekday:rw},aw={year:tw,month:nw,day:tw},lw={year:tw,month:nw,day:tw,weekday:nw},cw={hour:tw,minute:tw},dw={hour:tw,minute:tw,second:tw},uw={hour:tw,minute:tw,second:tw,timeZoneName:rw},hw={hour:tw,minute:tw,second:tw,timeZoneName:nw},pw={hour:tw,minute:tw,hourCycle:"h23"},gw={hour:tw,minute:tw,second:tw,hourCycle:"h23"},fw={hour:tw,minute:tw,second:tw,hourCycle:"h23",timeZoneName:rw},mw={hour:tw,minute:tw,second:tw,hourCycle:"h23",timeZoneName:nw},vw={year:tw,month:tw,day:tw,hour:tw,minute:tw},bw={year:tw,month:tw,day:tw,hour:tw,minute:tw,second:tw},yw={year:tw,month:rw,day:tw,hour:tw,minute:tw},ww={year:tw,month:rw,day:tw,hour:tw,minute:tw,second:tw},xw={year:tw,month:rw,day:tw,weekday:rw,hour:tw,minute:tw},_w={year:tw,month:nw,day:tw,hour:tw,minute:tw,timeZoneName:rw},kw={year:tw,month:nw,day:tw,hour:tw,minute:tw,second:tw,timeZoneName:rw},Cw={year:tw,month:nw,day:tw,weekday:nw,hour:tw,minute:tw,timeZoneName:nw},Sw={year:tw,month:nw,day:tw,weekday:nw,hour:tw,minute:tw,second:tw,timeZoneName:nw};class Ew{get type(){throw new ew}get name(){throw new ew}get ianaName(){return this.name}get isUniversal(){throw new ew}offsetName(e,t){throw new ew}formatOffset(e,t){throw new ew}offset(e){throw new ew}equals(e){throw new ew}get isValid(){throw new ew}}let Iw=null;class Aw extends Ew{static get instance(){return null===Iw&&(Iw=new Aw),Iw}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return Gx(e,t,r)}formatOffset(e,t){return Qx(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}const Tw=new Map,Ow={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6},Lw=new Map;class $w extends Ew{static create(e){let t=Lw.get(e);return void 0===t&&Lw.set(e,t=new $w(e)),t}static resetCache(){Lw.clear(),Tw.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=$w.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return Gx(e,t,r,this.name)}formatOffset(e,t){return Qx(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const r=function(e){let t=Tw.get(e);return void 0===t&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Tw.set(e,t)),t}(this.name);let[n,o,i,s,a,l,c]=r.formatToParts?function(e,t){const r=e.formatToParts(t),n=[];for(let e=0;e<r.length;e++){const{type:t,value:o}=r[e],i=Ow[t];"era"===t?n[i]=o:Ix(i)||(n[i]=parseInt(o,10))}return n}(r,t):function(e,t){const r=e.format(t).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,o,i,s,a,l,c,d]=n;return[s,o,i,a,l,c,d]}(r,t);"BC"===s&&(n=1-Math.abs(n));let d=+t;const u=d%1e3;return d-=u>=0?u:1e3+u,(Vx({year:n,month:o,day:i,hour:24===a?0:a,minute:l,second:c,millisecond:0})-d)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let Nw={};const Rw=new Map;function Pw(e,t={}){const r=JSON.stringify([e,t]);let n=Rw.get(r);return void 0===n&&(n=new Intl.DateTimeFormat(e,t),Rw.set(r,n)),n}const Dw=new Map,Mw=new Map;let zw=null;const Fw=new Map;function Uw(e){let t=Fw.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),Fw.set(e,t)),t}const Bw=new Map;function Hw(e,t,r,n){const o=e.listingMode();return"error"===o?null:"en"===o?r(t):n(t)}class jw{constructor(e,t,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:n,floor:o,...i}=r;if(!t||Object.keys(i).length>0){const t={useGrouping:!1,...r};r.padTo>0&&(t.minimumIntegerDigits=r.padTo),this.inf=function(e,t={}){const r=JSON.stringify([e,t]);let n=Dw.get(r);return void 0===n&&(n=new Intl.NumberFormat(e,t),Dw.set(r,n)),n}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Dx(this.floor?Math.floor(e):Ux(e,3),this.padTo)}}class Vw{constructor(e,t,r){let n;if(this.opts=r,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,r=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&$w.create(r).valid?(n=r,this.dt=e):(n="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,n=e.zone.name):(n="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const o={...this.opts};o.timeZone=o.timeZone||n,this.dtf=Pw(t,o)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class Ww{constructor(e,t,r){this.opts={style:"long",...r},!t&&Ox()&&(this.rtf=function(e,t={}){const{base:r,...n}=t,o=JSON.stringify([e,n]);let i=Mw.get(o);return void 0===i&&(i=new Intl.RelativeTimeFormat(e,t),Mw.set(o,i)),i}(e,r))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,r="always",n=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===r&&i){const r="days"===e;switch(t){case 1:return r?"tomorrow":`next ${o[e][0]}`;case-1:return r?"yesterday":`last ${o[e][0]}`;case 0:return r?"today":`this ${o[e][0]}`}}const s=Object.is(t,-0)||t<0,a=Math.abs(t),l=1===a,c=o[e],d=n?l?c[1]:c[2]||c[1]:l?o[e][0]:e;return s?`${a} ${d} ago`:`in ${a} ${d}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const Kw={firstDay:1,minimalDays:4,weekend:[6,7]};class qw{static fromOpts(e){return qw.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,r,n,o=!1){const i=e||ux.defaultLocale,s=i||(o?"en-US":zw||(zw=(new Intl.DateTimeFormat).resolvedOptions().locale,zw)),a=t||ux.defaultNumberingSystem,l=r||ux.defaultOutputCalendar,c=Rx(n)||ux.defaultWeekSettings;return new qw(s,a,l,c,i)}static resetCache(){zw=null,Rw.clear(),Dw.clear(),Mw.clear(),Fw.clear(),Bw.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:r,weekSettings:n}={}){return qw.create(e,t,r,n)}constructor(e,t,r,n,o){const[i,s,a]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const r=e.indexOf("-u-");if(-1===r)return[e];{let t,n;try{t=Pw(e).resolvedOptions(),n=e}catch{const o=e.substring(0,r);t=Pw(o).resolvedOptions(),n=o}const{numberingSystem:o,calendar:i}=t;return[n,o,i]}}(e);this.locale=i,this.numberingSystem=t||s||null,this.outputCalendar=r||a||null,this.weekSettings=n,this.intl=function(e,t,r){return(r||t)&&(e.includes("-u-")||(e+="-u"),r&&(e+=`-ca-${r}`),t&&(e+=`-nu-${t}`)),e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=o,this.fastNumbersCached=null}get fastNumbers(){return null==this.fastNumbersCached&&(this.fastNumbersCached=function(e){return(!e.numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===Uw(e.locale).numberingSystem)}(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?qw.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Rx(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Hw(this,e,n_,()=>{const r="ja"===this.intl||this.intl.startsWith("ja-"),n=(t&=!r)?{month:e,day:"numeric"}:{month:e},o=t?"format":"standalone";if(!this.monthsCache[o][e]){const t=r?e=>this.dtFormatter(e,n).format():e=>this.extract(e,n,"month");this.monthsCache[o][e]=function(e){const t=[];for(let r=1;r<=12;r++){const n=lC.utc(2009,r,1);t.push(e(n))}return t}(t)}return this.monthsCache[o][e]})}weekdays(e,t=!1){return Hw(this,e,a_,()=>{const r=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},n=t?"format":"standalone";return this.weekdaysCache[n][e]||(this.weekdaysCache[n][e]=function(e){const t=[];for(let r=1;r<=7;r++){const n=lC.utc(2016,11,13+r);t.push(e(n))}return t}(e=>this.extract(e,r,"weekday"))),this.weekdaysCache[n][e]})}meridiems(){return Hw(this,void 0,()=>l_,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[lC.utc(2016,11,13,9),lC.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Hw(this,e,h_,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[lC.utc(-40,1,1),lC.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,r){const n=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===r);return n?n.value:null}numberFormatter(e={}){return new jw(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Vw(e,this.intl,t)}relFormatter(e={}){return new Ww(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const r=JSON.stringify([e,t]);let n=Nw[r];return n||(n=new Intl.ListFormat(e,t),Nw[r]=n),n}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||Uw(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Lx()?function(e){let t=Bw.get(e);if(!t){const r=new Intl.Locale(e);t="getWeekInfo"in r?r.getWeekInfo():r.weekInfo,"minimalDays"in t||(t={...Kw,...t}),Bw.set(e,t)}return t}(this.locale):Kw}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Gw=null;class Zw extends Ew{static get utcInstance(){return null===Gw&&(Gw=new Zw(0)),Gw}static instance(e){return 0===e?Zw.utcInstance:new Zw(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new Zw(Zx(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${Qx(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${Qx(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return Qx(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class Yw extends Ew{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Jw(e,t){if(Ix(e)||null===e)return t;if(e instanceof Ew)return e;if(function(e){return"string"==typeof e}(e)){const r=e.toLowerCase();return"default"===r?t:"local"===r||"system"===r?Aw.instance:"utc"===r||"gmt"===r?Zw.utcInstance:Zw.parseSpecifier(r)||$w.create(e)}return Ax(e)?Zw.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new Yw(e)}const Qw={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Xw={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},ex=Qw.hanidec.replace(/[\[|\]]/g,"").split(""),tx=new Map;function rx({numberingSystem:e},t=""){const r=e||"latn";let n=tx.get(r);void 0===n&&(n=new Map,tx.set(r,n));let o=n.get(t);return void 0===o&&(o=new RegExp(`${Qw[r]}${t}`),n.set(t,o)),o}let nx,ox=()=>Date.now(),ix="system",sx=null,ax=null,lx=null,cx=60,dx=null;class ux{static get now(){return ox}static set now(e){ox=e}static set defaultZone(e){ix=e}static get defaultZone(){return Jw(ix,Aw.instance)}static get defaultLocale(){return sx}static set defaultLocale(e){sx=e}static get defaultNumberingSystem(){return ax}static set defaultNumberingSystem(e){ax=e}static get defaultOutputCalendar(){return lx}static set defaultOutputCalendar(e){lx=e}static get defaultWeekSettings(){return dx}static set defaultWeekSettings(e){dx=Rx(e)}static get twoDigitCutoffYear(){return cx}static set twoDigitCutoffYear(e){cx=e%100}static get throwOnInvalid(){return nx}static set throwOnInvalid(e){nx=e}static resetCaches(){qw.resetCache(),$w.resetCache(),lC.resetCache(),tx.clear()}}class hx{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const px=[0,31,59,90,120,151,181,212,243,273,304,334],gx=[0,31,60,91,121,152,182,213,244,274,305,335];function fx(e,t){return new hx("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function mx(e,t,r){const n=new Date(Date.UTC(e,t-1,r));e<100&&e>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const o=n.getUTCDay();return 0===o?7:o}function vx(e,t,r){return r+(Bx(e)?gx:px)[t-1]}function bx(e,t){const r=Bx(e)?gx:px,n=r.findIndex(e=>e<t);return{month:n+1,day:t-r[n]}}function yx(e,t){return(e-t+7)%7+1}function wx(e,t=4,r=1){const{year:n,month:o,day:i}=e,s=vx(n,o,i),a=yx(mx(n,o,i),r);let l,c=Math.floor((s-a+14-t)/7);return c<1?(l=n-1,c=Kx(l,t,r)):c>Kx(n,t,r)?(l=n+1,c=1):l=n,{weekYear:l,weekNumber:c,weekday:a,...Xx(e)}}function xx(e,t=4,r=1){const{weekYear:n,weekNumber:o,weekday:i}=e,s=yx(mx(n,1,t),r),a=Hx(n);let l,c=7*o+i-s-7+t;c<1?(l=n-1,c+=Hx(l)):c>a?(l=n+1,c-=Hx(n)):l=n;const{month:d,day:u}=bx(l,c);return{year:l,month:d,day:u,...Xx(e)}}function _x(e){const{year:t,month:r,day:n}=e;return{year:t,ordinal:vx(t,r,n),...Xx(e)}}function kx(e){const{year:t,ordinal:r}=e,{month:n,day:o}=bx(t,r);return{year:t,month:n,day:o,...Xx(e)}}function Cx(e,t){if(Ix(e.localWeekday)&&Ix(e.localWeekNumber)&&Ix(e.localWeekYear))return{minDaysInFirstWeek:4,startOfWeek:1};if(!Ix(e.weekday)||!Ix(e.weekNumber)||!Ix(e.weekYear))throw new Jy("Cannot mix locale-based week fields with ISO-based week fields");return Ix(e.localWeekday)||(e.weekday=e.localWeekday),Ix(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Ix(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}function Sx(e){const t=Tx(e.year),r=Px(e.month,1,12),n=Px(e.day,1,jx(e.year,e.month));return t?r?!n&&fx("day",e.day):fx("month",e.month):fx("year",e.year)}function Ex(e){const{hour:t,minute:r,second:n,millisecond:o}=e,i=Px(t,0,23)||24===t&&0===r&&0===n&&0===o,s=Px(r,0,59),a=Px(n,0,59),l=Px(o,0,999);return i?s?a?!l&&fx("millisecond",o):fx("second",n):fx("minute",r):fx("hour",t)}function Ix(e){return typeof e>"u"}function Ax(e){return"number"==typeof e}function Tx(e){return"number"==typeof e&&e%1==0}function Ox(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Lx(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function $x(e,t,r){if(0!==e.length)return e.reduce((e,n)=>{const o=[t(n),n];return e&&r(e[0],o[0])===e[0]?e:o},null)[1]}function Nx(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Rx(e){if(null==e)return null;if("object"!=typeof e)throw new Xy("Week settings must be an object");if(!Px(e.firstDay,1,7)||!Px(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!Px(e,1,7)))throw new Xy("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Px(e,t,r){return Tx(e)&&e>=t&&e<=r}function Dx(e,t=2){let r;return r=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),r}function Mx(e){if(!Ix(e)&&null!==e&&""!==e)return parseInt(e,10)}function zx(e){if(!Ix(e)&&null!==e&&""!==e)return parseFloat(e)}function Fx(e){if(!Ix(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Ux(e,t,r="round"){const n=10**t;switch(r){case"expand":return e>0?Math.ceil(e*n)/n:Math.floor(e*n)/n;case"trunc":return Math.trunc(e*n)/n;case"round":return Math.round(e*n)/n;case"floor":return Math.floor(e*n)/n;case"ceil":return Math.ceil(e*n)/n;default:throw new RangeError(`Value rounding ${r} is out of range`)}}function Bx(e){return e%4==0&&(e%100!=0||e%400==0)}function Hx(e){return Bx(e)?366:365}function jx(e,t){const r=function(e){return e-12*Math.floor(e/12)}(t-1)+1;return 2===r?Bx(e+(t-r)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function Vx(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Wx(e,t,r){return-yx(mx(e,1,t),r)+t-1}function Kx(e,t=4,r=1){const n=Wx(e,t,r),o=Wx(e+1,t,r);return(Hx(e)-n+o)/7}function qx(e){return e>99?e:e>ux.twoDigitCutoffYear?1900+e:2e3+e}function Gx(e,t,r,n=null){const o=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(i.timeZone=n);const s={timeZoneName:t,...i},a=new Intl.DateTimeFormat(r,s).formatToParts(o).find(e=>"timezonename"===e.type.toLowerCase());return a?a.value:null}function Zx(e,t){let r=parseInt(e,10);Number.isNaN(r)&&(r=0);const n=parseInt(t,10)||0;return 60*r+(r<0||Object.is(r,-0)?-n:n)}function Yx(e){const t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new Xy(`Invalid unit value ${e}`);return t}function Jx(e,t){const r={};for(const n in e)if(Nx(e,n)){const o=e[n];if(null==o)continue;r[t(n)]=Yx(o)}return r}function Qx(e,t){const r=Math.trunc(Math.abs(e/60)),n=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${Dx(r,2)}:${Dx(n,2)}`;case"narrow":return`${o}${r}${n>0?`:${n}`:""}`;case"techie":return`${o}${Dx(r,2)}${Dx(n,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Xx(e){return function(e){return["hour","minute","second","millisecond"].reduce((t,r)=>(t[r]=e[r],t),{})}(e)}const e_=["January","February","March","April","May","June","July","August","September","October","November","December"],t_=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],r_=["J","F","M","A","M","J","J","A","S","O","N","D"];function n_(e){switch(e){case"narrow":return[...r_];case"short":return[...t_];case"long":return[...e_];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const o_=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],i_=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],s_=["M","T","W","T","F","S","S"];function a_(e){switch(e){case"narrow":return[...s_];case"short":return[...i_];case"long":return[...o_];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const l_=["AM","PM"],c_=["Before Christ","Anno Domini"],d_=["BC","AD"],u_=["B","A"];function h_(e){switch(e){case"narrow":return[...u_];case"short":return[...d_];case"long":return[...c_];default:return null}}function p_(e,t){let r="";for(const n of e)n.literal?r+=n.val:r+=t(n.val);return r}const g_={D:ow,DD:iw,DDD:aw,DDDD:lw,t:cw,tt:dw,ttt:uw,tttt:hw,T:pw,TT:gw,TTT:fw,TTTT:mw,f:vw,ff:yw,fff:_w,ffff:Cw,F:bw,FF:ww,FFF:kw,FFFF:Sw};class f_{static create(e,t={}){return new f_(e,t)}static parseFormat(e){let t=null,r="",n=!1;const o=[];for(let i=0;i<e.length;i++){const s=e.charAt(i);"'"===s?((r.length>0||n)&&o.push({literal:n||/^\s+$/.test(r),val:""===r?"'":r}),t=null,r="",n=!n):n||s===t?r+=s:(r.length>0&&o.push({literal:/^\s+$/.test(r),val:r}),r=s,t=s)}return r.length>0&&o.push({literal:n||/^\s+$/.test(r),val:r}),o}static macroTokenToFormatOpts(e){return g_[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,r=void 0){if(this.opts.forceSimple)return Dx(e,t);const n={...this.opts};return t>0&&(n.padTo=t),r&&(n.signDisplay=r),this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,t){const r="en"===this.loc.listingMode(),n=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,o=(t,r)=>this.loc.extract(e,t,r),i=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",s=(t,n)=>r?function(e,t){return n_(t)[e.month-1]}(e,t):o(n?{month:t}:{month:t,day:"numeric"},"month"),a=(t,n)=>r?function(e,t){return a_(t)[e.weekday-1]}(e,t):o(n?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),l=t=>{const r=f_.macroTokenToFormatOpts(t);return r?this.formatWithSystemDefault(e,r):t},c=t=>r?function(e,t){return h_(t)[e.year<0?0:1]}(e,t):o({era:t},"era");return p_(f_.parseFormat(t),t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return i({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return i({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return i({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return r?function(e){return l_[e.hour<12?0:1]}(e):o({hour:"numeric",hourCycle:"h12"},"dayperiod");case"d":return n?o({day:"numeric"},"day"):this.num(e.day);case"dd":return n?o({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return a("short",!0);case"cccc":return a("long",!0);case"ccccc":return a("narrow",!0);case"EEE":return a("short",!1);case"EEEE":return a("long",!1);case"EEEEE":return a("narrow",!1);case"L":return n?o({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return n?o({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return s("short",!0);case"LLLL":return s("long",!0);case"LLLLL":return s("narrow",!0);case"M":return n?o({month:"numeric"},"month"):this.num(e.month);case"MM":return n?o({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return s("short",!1);case"MMMM":return s("long",!1);case"MMMMM":return s("narrow",!1);case"y":return n?o({year:"numeric"},"year"):this.num(e.year);case"yy":return n?o({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return n?o({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return n?o({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);
3066case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return l(t)}})}formatDurationFromString(e,t){const r="negativeLargestOnly"===this.opts.signMode?-1:1,n=e=>{switch(e[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},o=f_.parseFormat(t),i=o.reduce((e,{literal:t,val:r})=>t?e:e.concat(r),[]),s=e.shiftTo(...i.map(n).filter(e=>e));return p_(o,((e,t)=>o=>{const i=n(o);if(i){const n=t.isNegativeDuration&&i!==t.largestUnit?r:1;let s;return s="negativeLargestOnly"===this.opts.signMode&&i!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(i)*n,o.length,s)}return o})(s,{isNegativeDuration:s<0,largestUnit:Object.keys(s.values)[0]}))}}const m_=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function v_(...e){const t=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${t}$`)}function b_(...e){return t=>e.reduce(([e,r,n],o)=>{const[i,s,a]=o(t,n);return[{...e,...i},s||r,a]},[{},null,1]).slice(0,2)}function y_(e,...t){if(null==e)return[null,null];for(const[r,n]of t){const t=r.exec(e);if(t)return n(t)}return[null,null]}function w_(...e){return(t,r)=>{const n={};let o;for(o=0;o<e.length;o++)n[e[o]]=Mx(t[r+o]);return[n,null,r+o]}}const x_=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,__=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,k_=RegExp(`${__.source}(?:${x_.source}?(?:\\[(${m_.source})\\])?)?`),C_=RegExp(`(?:[Tt]${k_.source})?`),S_=w_("weekYear","weekNumber","weekDay"),E_=w_("year","ordinal"),I_=RegExp(`${__.source} ?(?:${x_.source}|(${m_.source}))?`),A_=RegExp(`(?: ${I_.source})?`);function T_(e,t,r){const n=e[t];return Ix(n)?r:Mx(n)}
3066function O_(e,t){return[{hours:T_(e,t,0),minutes:T_(e,t+1,0),seconds:T_(e,t+2,0),milliseconds:Fx(e[t+3])},null,t+4]}function L_(e,t){const r=!e[t]&&!e[t+1],n=Zx(e[t+1],e[t+2]);return[{},r?null:Zw.instance(n),t+3]}function $_(e,t){return[{},e[t]?$w.create(e[t]):null,t+1]}const N_=RegExp(`^T?${__.source}$`),R_=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function P_(e){const[t,r,n,o,i,s,a,l,c]=e,d="-"===t[0],u=l&&"-"===l[0],h=(e,t=!1)=>void 0!==e&&(t||e&&d)?-e:e;return[{years:h(zx(r)),months:h(zx(n)),weeks:h(zx(o)),days:h(zx(i)),hours:h(zx(s)),minutes:h(zx(a)),seconds:h(zx(l),"-0"===l),milliseconds:h(Fx(c),u)}]}const D_={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function M_(e,t,r,n,o,i,s){const a={year:2===t.length?qx(Mx(t)):Mx(t),month:t_.indexOf(r)+1,day:Mx(n),hour:Mx(o),minute:Mx(i)};return s&&(a.second=Mx(s)),e&&(a.weekday=e.length>3?o_.indexOf(e)+1:i_.indexOf(e)+1),a}const z_=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function F_(e){const[,t,r,n,o,i,s,a,l,c,d,u]=e,h=M_(t,o,n,r,i,s,a);let p;return p=l?D_[l]:c?0:Zx(d,u),[h,new Zw(p)]}const U_=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,B_=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,H_=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function j_(e){const[,t,r,n,o,i,s,a]=e;return[M_(t,o,n,r,i,s,a),Zw.utcInstance]}function V_(e){const[,t,r,n,o,i,s,a]=e;return[M_(t,a,r,n,o,i,s),Zw.utcInstance]}const W_=v_(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,C_),K_=v_(/(\d{4})-?W(\d\d)(?:-?(\d))?/,C_),q_=v_(/(\d{4})-?(\d{3})/,C_),G_=v_(k_),Z_=b_(function(e,t){return[{year:T_(e,t),month:T_(e,t+1,1),day:T_(e,t+2,1)},null,t+3]},O_,L_,$_),Y_=b_(S_,O_,L_,$_),J_=b_(E_,O_,L_,$_),Q_=b_(O_,L_,$_),X_=b_(O_),ek=v_(/(\d{4})-(\d\d)-(\d\d)/,A_),tk=v_(I_),rk=b_(O_,L_,$_),nk="Invalid Duration",ok={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},ik={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...ok},sk=365.2425,ak=30.436875,lk={years:{quarters:4,months:12,weeks:sk/7,days:sk,hours:24*sk,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:sk/28,days:sk/4,hours:24*sk/4,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:ak/7,days:ak,hours:24*ak,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...ok},ck=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],dk=ck.slice(0).reverse();function uk(e,t,r=!1){const n={values:r?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new fk(n)}function hk(e,t){let r=t.milliseconds??0;for(const n of dk.slice(1))t[n]&&(r+=t[n]*e[n].milliseconds);return r}function pk(e,t){const r=hk(e,t)<0?-1:1;ck.reduceRight((n,o)=>
vendor: 6,720 bytes, line 3066
3066{if(Ix(t[o]))return n;if(n){const i=t[n]*r,s=e[o][n],a=Math.floor(i/s);t[o]+=a*r,t[n]-=a*s*r}return o},null),ck.reduce((r,n)=>{if(Ix(t[n]))return r;if(r){const o=t[r]%1;t[r]-=o,t[n]+=o*e[r][n]}return n},null)}function gk(e){const t={};for(const[r,n]of Object.entries(e))0!==n&&(t[r]=n);return t}class fk{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let r=t?lk:ik;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||qw.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,t){return fk.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new Xy("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new fk({values:Jx(e,fk.normalizeUnit),loc:qw.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(Ax(e))return fk.fromMillis(e);if(fk.isDuration(e))return e;if("object"==typeof e)return fk.fromObject(e);throw new Xy(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[r]=function(e){return y_(e,[R_,P_])}(e);return r?fk.fromObject(r,t):fk.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[r]=function(e){return y_(e,[N_,X_])}(e);return r?fk.fromObject(r,t):fk.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Xy("need to specify a reason the Duration is invalid");const r=e instanceof hx?e:new hx(e,t);if(ux.throwOnInvalid)throw new Yy(r);return new fk({invalid:r})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new Qy(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const r={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?f_.create(this.loc,r).formatDurationFromString(this,e):nk}toHuman(e={}){if(!this.isValid)return nk;const t=!1!==e.showZeros,r=ck.map(r=>{const n=this.values[r];return Ix(n)||0===n&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:r.slice(0,-1)}).format(n)}).filter(e=>e);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),(0!==this.months||0!==this.quarters)&&(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),(0!==this.hours||0!==this.minutes||0!==this.seconds||0!==this.milliseconds)&&(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),(0!==this.seconds||0!==this.milliseconds)&&(e+=Ux(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},lC.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?hk(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=fk.fromDurationLike(e),r={};for(const e of ck)(Nx(t.values,e)||Nx(this.values,e))&&(r[e]=t.get(e)+this.get(e));return uk(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const t=fk.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const r of Object.keys(this.values))t[r]=Yx(e(this.values[r],r));return uk(this,{values:t},!0)}get(e){return this[fk.normalizeUnit(e)]}set(e){return this.isValid?uk(this,{values:{...this.values,...Jx(e,fk.normalizeUnit)}}):this}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:r,matrix:n}={}){return uk(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:n,conversionAccuracy:r})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return pk(this.matrix,e),uk(this,{values:e},!0)}rescale(){return this.isValid?uk(this,{values:gk(this.normalize().shiftToAll().toObject())},!0):this}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>fk.normalizeUnit(e));const t={},r={},n=this.toObject();let o;for(const i of ck)if(e.indexOf(i)>=0){o=i;let e=0;for(const t in r)e+=this.matrix[t][i]*r[t],r[t]=0;Ax(n[i])&&(e+=n[i]);const s=Math.trunc(e);t[i]=s,r[i]=(1e3*e-1e3*s)/1e3}else Ax(n[i])&&(r[i]=n[i]);for(const e in r)0!==r[e]&&(t[o]+=e===o?r[e]:r[e]/this.matrix[o][e]);return pk(this.matrix,t),uk(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return uk(this,{values:e},!0)}removeZeros(){return this.isValid?uk(this,{values:gk(this.values)},!0):this}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const r of ck)if(!t(this.values[r],e.values[r]))return!1;return!0}}const mk="Invalid Interval";class vk{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}
3066static invalid(e,t=null){if(!e)throw new Xy("need to specify a reason the Interval is invalid");const r=e instanceof hx?e:new hx(e,t);if(ux.throwOnInvalid)throw new Zy(r);return new vk({invalid:r})}static fromDateTimes(e,t){const r=cC(e),n=cC(t),o=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?vk.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null:vk.invalid("missing or invalid end"):vk.invalid("missing or invalid start")}(r,n);return o??new vk({start:r,end:n})}static after(e,t){const r=fk.fromDurationLike(t),n=cC(e);return vk.fromDateTimes(n,n.plus(r))}static before(e,t){const r=fk.fromDurationLike(t),n=cC(e);return vk.fromDateTimes(n.minus(r),n)}static fromISO(e,t){const[r,n]=(e||"").split("/",2);if(r&&n){let e,o,i,s;try{e=lC.fromISO(r,t),o=e.isValid}catch{o=!1}try{i=lC.fromISO(n,t),s=i.isValid}catch{s=!1}if(o&&s)return vk.fromDateTimes(e,i);if(o){const r=fk.fromISO(n,t);if(r.isValid)return vk.after(e,r)}else if(s){const e=fk.fromISO(r,t);if(e.isValid)return vk.before(i,e)}}return vk.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const r=this.start.startOf(e,t);let n;return n=t?.useLocaleWeeks?this.end.reconfigure({locale:r.locale}):this.end,n=n.startOf(e,t),Math.floor(n.diff(r,e).get(e))+(n.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&this.s<=e&&this.e>e}set({start:e,end:t}={}){return this.isValid?vk.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(cC).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),r=[];let{s:n}=this,o=0;for(;n<this.e;){const e=t[o]||this.e,i=+e>+this.e?this.e:e;r.push(vk.fromDateTimes(n,i)),n=i,o+=1}return r}splitBy(e){const t=fk.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let r,{s:n}=this,o=1;const i=[];for(;n<this.e;){const e=this.start.plus(t.mapUnits(e=>e*o));r=+e>+this.e?this.e:e,i.push(vk.fromDateTimes(n,r)),n=r,o+=1}return i}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e==+e.s}abutsEnd(e){return!!this.isValid&&+e.e==+this.s}engulfs(e){return!!this.isValid&&this.s<=e.s&&this.e>=e.e}equals(e){return!(!this.isValid||!e.isValid)&&this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return t>=r?null:vk.fromDateTimes(t,r)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return vk.fromDateTimes(t,r)}static merge(e){const[t,r]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],r)=>t?t.overlaps(r)||t.abutsStart(r)?[e,t.union(r)]:[e.concat([t]),r]:[e,r],[[],null]);return r&&t.push(r),t}static xor(e){let t=null,r=0;const n=[],o=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),i=Array.prototype.concat(...o).sort((e,t)=>e.time-t.time);for(const e of i)r+="s"===e.type?1:-1,1===r?t=e.time:(t&&+t!=+e.time&&n.push(vk.fromDateTimes(t,e.time)),t=null);return vk.merge(n)}difference(...e){return vk.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:mk}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}
vendor: 2,789 bytes, line 3066
3066toLocaleString(e=ow,t={}){return this.isValid?f_.create(this.s.loc.clone(t),e).formatInterval(this):mk}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:mk}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:mk}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:mk}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:mk}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):fk.invalid(this.invalidReason)}mapEndpoints(e){return vk.fromDateTimes(e(this.s),e(this.e))}}class bk{static hasDST(e=ux.defaultZone){const t=lC.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return $w.isValidZone(e)}static normalizeZone(e){return Jw(e,ux.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||qw.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||qw.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||qw.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:r=null,locObj:n=null,outputCalendar:o="gregory"}={}){return(n||qw.create(t,r,o)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:n=null,outputCalendar:o="gregory"}={}){return(n||qw.create(t,r,o)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:r=null,locObj:n=null}={}){return(n||qw.create(t,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:n=null}={}){return(n||qw.create(t,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return qw.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return qw.create(t,null,"gregory").eras(e)}static features(){return{relative:Ox(),localeWeek:Lx()}}}function yk(e,t){const r=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=r(t)-r(e);return Math.floor(fk.fromMillis(n).as("days"))}function wk(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);if(-1!==e[r].search(Qw.hanidec))t+=ex.indexOf(e[r]);else for(const e in Xw){const[r,o]=Xw[e];n>=r&&n<=o&&(t+=n-r)}}return parseInt(t,10)}return t}(e))}}const xk="[  ]",_k=new RegExp(xk,"g");function kk(e){return e.replace(/\./g,"\\.?").replace(_k,xk)}function Ck(e){return e.replace(/\./g,"").replace(_k," ").toLowerCase()}function Sk(e,t){return null===e?null:{regex:RegExp(e.map(kk).join("|")),deser:([r])=>e.findIndex(e=>Ck(r)===Ck(e))+t}}function Ek(e,t){return{regex:e,deser:([,e,t])=>Zx(e,t),groups:t}}function Ik(e){return{regex:e,deser:([e])=>e}}
3066function Ak(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}const Tk={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let Ok=null;function Lk(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const r=Rk(f_.macroTokenToFormatOpts(e.val),t);return null==r||r.includes(void 0)?e:r}(e,t)))}class $k{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Lk(f_.parseFormat(t),e),this.units=this.tokens.map(t=>function(e,t){const r=rx(t),n=rx(t,"{2}"),o=rx(t,"{3}"),i=rx(t,"{4}"),s=rx(t,"{6}"),a=rx(t,"{1,2}"),l=rx(t,"{1,3}"),c=rx(t,"{1,6}"),d=rx(t,"{1,9}"),u=rx(t,"{2,4}"),h=rx(t,"{4,6}"),p=e=>({regex:RegExp(Ak(e.val)),deser:([e])=>e,literal:!0}),g=(g=>{if(e.literal)return p(g);switch(g.val){case"G":return Sk(t.eras("short"),0);case"GG":return Sk(t.eras("long"),0);case"y":return wk(c);case"yy":case"kk":return wk(u,qx);case"yyyy":case"kkkk":return wk(i);case"yyyyy":return wk(h);case"yyyyyy":return wk(s);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return wk(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return wk(n);case"MMM":return Sk(t.months("short",!0),1);case"MMMM":return Sk(t.months("long",!0),1);case"LLL":return Sk(t.months("short",!1),1);case"LLLL":return Sk(t.months("long",!1),1);case"o":case"S":return wk(l);case"ooo":case"SSS":return wk(o);case"u":return Ik(d);case"uu":return Ik(a);case"uuu":case"E":case"c":return wk(r);case"a":return Sk(t.meridiems(),0);case"EEE":return Sk(t.weekdays("short",!1),1);case"EEEE":return Sk(t.weekdays("long",!1),1);case"ccc":return Sk(t.weekdays("short",!0),1);case"cccc":return Sk(t.weekdays("long",!0),1);case"Z":case"ZZ":return Ek(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return Ek(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return Ik(/[a-z_+-/]{1,256}?/i);case" ":return Ik(/[^\S\n\r]/);default:return p(g)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return g.token=e,g}(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){const[e,t]=function(e){return[`^${e.map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,"")}$`,e]}(this.units);this.regex=RegExp(e,"i"),this.handlers=t}}explainFromTokens(e){if(this.isValid){const[t,r]=function(e,t,r){const n=e.match(t);if(n){const e={};let t=1;for(const o in r)if(Nx(r,o)){const i=r[o],s=i.groups?i.groups+1:1;!i.literal&&i.token&&(e[i.token.val[0]]=i.deser(n.slice(t,t+s))),t+=s}return[n,e]}return[n,{}]}(e,this.regex,this.handlers),[n,o,i]=r?function(e){let t,r=null;return Ix(e.z)||(r=$w.create(e.z)),Ix(e.Z)||(r||(r=new Zw(e.Z)),t=e.Z),Ix(e.q)||(e.M=3*(e.q-1)+1),Ix(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),Ix(e.u)||(e.S=Fx(e.u)),[Object.keys(e).reduce((t,r)=>{const n=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(r);return n&&(t[n]=e[r]),t},{}),r,t]}(r):[null,null,void 0];if(Nx(r,"a")&&Nx(r,"H"))throw new Jy("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:r,result:n,zone:o,specificOffset:i}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invali
vendor: 15,207 bytes, line 3066
3066dReason:null}}function Nk(e,t,r){return new $k(e,r).explainFromTokens(t)}function Rk(e,t){if(!e)return null;const r=f_.create(t,e).dtFormatter((Ok||(Ok=lC.fromMillis(1555555555555)),Ok)),n=r.formatToParts(),o=r.resolvedOptions();return n.map(t=>function(e,t,r){const{type:n,value:o}=e;if("literal"===n){const e=/^\s+$/.test(o);return{literal:!e,val:e?" ":o}}const i=t[n];let s=n;"hour"===n&&(s=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":r.hour12?"hour12":"hour24");let a=Tk[s];if("object"==typeof a&&(a=a[i]),a)return{literal:!1,val:a}}(t,e,o))}const Pk="Invalid DateTime",Dk=864e13;function Mk(e){return new hx("unsupported zone",`the zone "${e.name}" is not supported`)}function zk(e){return null===e.weekData&&(e.weekData=wx(e.c)),e.weekData}function Fk(e){return null===e.localWeekData&&(e.localWeekData=wx(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Uk(e,t){const r={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new lC({...r,...t,old:r})}function Bk(e,t,r){let n=e-60*t*1e3;const o=r.offset(n);if(t===o)return[n,t];n-=60*(o-t)*1e3;const i=r.offset(n);return o===i?[n,o]:[e-60*Math.min(o,i)*1e3,Math.max(o,i)]}function Hk(e,t){const r=new Date(e+=60*t*1e3);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function jk(e,t,r){return Bk(Vx(e),t,r)}function Vk(e,t){const r=e.o,n=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),i={...e.c,year:n,month:o,day:Math.min(e.c.day,jx(n,o))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},s=fk.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=Vx(i);let[l,c]=Bk(a,r,e.zone);return 0!==s&&(l+=s,c=e.zone.offset(l)),{ts:l,o:c}}function Wk(e,t,r,n,o,i){const{setZone:s,zone:a}=r;if(e&&0!==Object.keys(e).length||t){const n=t||a,o=lC.fromObject(e,{...r,zone:n,specificOffset:i});return s?o:o.setZone(a)}return lC.invalid(new hx("unparsable",`the input "${o}" can't be parsed as ${n}`))}function Kk(e,t,r=!0){return e.isValid?f_.create(qw.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,t):null}function qk(e,t,r){const n=e.c.year>9999||e.c.year<0;let o="";if(n&&e.c.year>=0&&(o+="+"),o+=Dx(e.c.year,n?6:4),"year"===r)return o;if(t){if(o+="-",o+=Dx(e.c.month),"month"===r)return o;o+="-"}else if(o+=Dx(e.c.month),"month"===r)return o;return o+=Dx(e.c.day),o}function Gk(e,t,r,n,o,i,s){let a=!r||0!==e.c.millisecond||0!==e.c.second,l="";switch(s){case"day":case"month":case"year":break;default:if(l+=Dx(e.c.hour),"hour"===s)break;if(t){if(l+=":",l+=Dx(e.c.minute),"minute"===s)break;a&&(l+=":",l+=Dx(e.c.second))}else{if(l+=Dx(e.c.minute),"minute"===s)break;a&&(l+=Dx(e.c.second))}if("second"===s)break;a&&(!n||0!==e.c.millisecond)&&(l+=".",l+=Dx(e.c.millisecond,3))}return o&&(e.isOffsetFixed&&0===e.offset&&!i?l+="Z":e.o<0?(l+="-",l+=Dx(Math.trunc(-e.o/60)),l+=":",l+=Dx(Math.trunc(-e.o%60))):(l+="+",l+=Dx(Math.trunc(e.o/60)),l+=":",l+=Dx(Math.trunc(e.o%60)))),i&&(l+="["+e.zone.ianaName+"]"),l}const Zk={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Yk={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Jk={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Qk=["year","month","day","hour","minute","second","millisecond"],Xk=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],eC=["year","ordinal","hour","minute","second","millisecond"];function tC(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new Qy(e);return t}function rC(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return tC(e)}}function nC(e,t){const r=Jw(t.zone,ux.defaultZone);if(!r.isValid)return lC.invalid(Mk(r));const n=qw.fromObject(t);let o,i;if(Ix(e.year))o=ux.now();else{for(const t of Qk)Ix(e[t])&&(e[t]=Zk[t]);const t=Sx(e)||Ex(e);if(t)return lC.invalid(t);const n=function(e){if(void 0===sC&&(sC=ux.now()),"iana"!==e.type)return e.offset(sC);const t=e.name;let r=aC.get(t);return void 0===r&&(r=e.offset(sC),aC.set(t,r)),r}(r);[o,i]=jk(e,n,r)}return new lC({ts:o,zone:r,loc:n,o:i})}function oC(e,t,r){const n=!!Ix(r.round)||r.round,o=Ix(r.rounding)?"trunc":r.rounding,i=(e,i)=>(e=Ux(e,n||r.calendary?0:2,r.calendary?"round":o),t.loc.clone(r).relFormatter(r).format(e,i)),s=n=>r.calendary?t.hasSame(e,n)?0:t.startOf(n).diff(e.startOf(n),n).get(n):t.diff(e,n).get(n);if(r.unit)return i(s(r.unit),r.unit);for(const e of r.units){const t=s(e);if(Math.abs(t)>=1)return i(t,e)}return i(e>t?-0:0,r.units[r.units.length-1])}function iC(e){let t,r={};return e.length>0&&"object"==typeof e[e.length-1]?(r=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[r,t]}let sC;const aC=new Map;class lC{constructor(e){const t=e.zone||ux.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new hx("invalid input"):null)||(t.isValid?null:Mk(t));this.ts=Ix(e.ts)?ux.now():e.ts;let n=null,o=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[n,o]=[e.old.c,e.old.o];else{const i=Ax(e.o)&&!e.old?e.o:t.offset(this.ts);n=Hk(this.ts,i),r=Number.isNaN(n.year)?new hx("invalid input"):null,n=r?null:n,o=r?null:i}this._zone=t,this.loc=e.loc||qw.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=n,this.o=o,this.isLuxonDateTime=!0}static now(){return new lC({})}static local(){const[e,t]=iC(arguments),[r,n,o,i,s,a,l]=t;return nC({year:r,month:n,day:o,hour:i,minute:s,second:a,millisecond:l},e)}static utc(){const[e,t]=iC(arguments),[r,n,o,i,s,a,l]=t;return e.zone=Zw.utcInstance,nC({year:r,month:n,day:o,hour:i,minute:s,second:a,millisecond:l},e)}static fromJSDate(e,t={}){const r=function(e){return"[object Date]"===Object.prototype.toString.call(e)}(e)?e.valueOf():NaN;if(Number.isNaN(r))return lC.invalid("invalid input");const n=Jw(t.zone,ux.defaultZone);return n.isValid?new lC({ts:r,zone:n,loc:qw.fromObject(t)}):lC.invalid(Mk(n))}static fromMillis(e,t={}){if(Ax(e))return e<-Dk||e>Dk?lC.invalid("Timestamp out of range"):new lC({ts:e,zone:Jw(t.zone,ux.defaultZone),loc:qw.fromObject(t)});throw new Xy(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(Ax(e))return new lC({ts:1e3*e,zone:Jw(t.zone,ux.defaultZone),loc:qw.fromObject(t)});throw new Xy("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const r=Jw(t.zone,ux.defaultZone);if(!r.isValid)return lC.invalid(Mk(r));const n=qw.fromObject(t),o=Jx(e,rC),{minDaysInFirstWeek:i,startOfWeek:s}=Cx(o,n),a=ux.now(),l=Ix(t.specificOffset)?r.offset(a):t.specificOffset,c=!Ix(o.ordinal),d=!Ix(o.year),u=!Ix(o.month)||!Ix(o.day),h=d||u,p=o.weekYear||o.weekNumber;if((h||c)&&p)throw new Jy("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&c)throw new Jy("Can't mix ordinal dates with month/day");const g=p||o.weekday&&!h;let f,m,v=Hk(a,l);g?(f=Xk,m=Yk,v=wx(v,i,s)):c?(f=eC,m=Jk,v=_x(v)):(f=Qk,m=Zk);let b=!1;for(const e of f)Ix(o[e])?o[e]=b?m[e]:v[e]:b=!0;const y=g?function(e,t=4,r=1){const n=Tx(e.weekYear),o=Px(e.weekNumber,1,Kx(e.weekYear,t,r)),i=Px(e.weekday,1,7);return n?o?!i&&fx("weekday",e.weekday):fx("week",e.weekNumber):fx("weekYear",e.weekYear)}(o,i,s):c?function(e){const t=Tx(e.year),r=Px(e.ordinal,1,Hx(e.year));return t?!r&&fx("ordinal",e.ordinal):fx("year",e.year)}(o):Sx(o),w=y||Ex(o);if(w)return lC.invalid(w);const x=g?xx(o,i,s):c?kx(o):o,[_,k]=jk(x,l,r),C=new lC({ts:_,zone:r,o:k,loc:n});return o.weekday&&h&&e.weekday!==C.weekday?lC.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${C.toISO()}`):C.isValid?C:lC.invalid(C.invalid)}static fromISO(e,t={}){const[r,n]=function(e){return y_(e,[W_,Z_],[K_,Y_],[q_,J_],[G_,Q_])}(e);return Wk(r,n,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[r,n]=function(e){return y_(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[z_,F_])}(e);return Wk(r,n,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[r,n]=function(e){return y_(e,[U_,j_],[B_,j_],[H_,V_])}(e);return Wk(r,n,t,"HTTP",t)}static fromFormat(e,t,r={}){if(Ix(e)||Ix(t))throw new Xy("fromFormat requires an input string and a format");const{locale:n=null,numberingSystem:o=null}=r,i=qw.fromOpts({locale:n,numberingSystem:o,defaultToEN:!0}),[s,a,l,c]=function(e,t,r){const{result:n,zone:o,specificOffset:i,invalidReason:s}=Nk(e,t,r);return[n,o,i,s]}(i,e,t);return c?lC.invalid(c):Wk(s,a,r,`format ${t}`,e,l)}static fromString(e,t,r={}){return lC.fromFormat(e,t,r)}static fromSQL(e,t={}){const[r,n]=function(e){return y_(e,[ek,Z_],[tk,rk])}(e);return Wk(r,n,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Xy("need to specify a reason the DateTime is invalid");const r=e instanceof hx?e:new hx(e,t);if(ux.throwOnInvalid)throw new Gy(r);return new lC({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const r=Rk(e,qw.fromObject(t));return r?r.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return Lk(f_.parseFormat(e),qw.fromObject(t)).map(e=>e.val).join("")}static resetCache(){sC=void 0,aC.clear()}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?zk(this).weekYear:NaN}get weekNumber(){return this.isValid?zk(this).weekNumber:NaN}get weekday(){return this.isValid?zk(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Fk(this).weekday:NaN}get localWeekNumber(){return this.isValid?Fk(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Fk(this).weekYear:NaN}get ordinal(){return this.isValid?_x(this.c).ordinal:NaN}get monthShort(){return this.isValid?bk.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?bk.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?bk.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?bk.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,r=Vx(this.c),n=this.zone.offset(r-e),o=this.zone.offset(r+e),i=this.zone.offset(r-n*t),s=this.zone.offset(r-o*t);if(i===s)return[this];const a=r-i*t,l=r-s*t,c=Hk(a,i),d=Hk(l,s);return c.hour===d.hour&&c.minute===d.minute&&c.second===d.second&&c.millisecond===d.millisecond?[Uk(this,{ts:a}),Uk(this,{ts:l})]:[this]}get isInLeapYear(){return Bx(this.year)}get daysInMonth(){return jx(this.year,this.month)}get daysInYear(){return this.isValid?Hx(this.year):NaN}get weeksInWeekYear(){return this.isValid?Kx(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Kx(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:r,calendar:n}=f_.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:r,outputCalendar:n}}toUTC(e=0,t={}){return this.setZone(Zw.instance(e),t)}toLocal(){return this.setZone(ux.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:r=!1}={}){if((e=Jw(e,ux.defaultZone)).equals(this.zone))return this;if(e.isValid){let n=this.ts;if(t||r){const t=e.offset(this.ts),r=this.toObject();[n]=jk(r,t,e)}return Uk(this,{ts:n,zone:e})}return lC.invalid(Mk(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:r}={}){return Uk(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:r})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=Jx(e,rC),{minDaysInFirstWeek:r,startOfWeek:n}=Cx(t,this.loc),o=!Ix(t.weekYear)||!Ix(t.weekNumber)||!Ix(t.weekday),i=!Ix(t.ordinal),s=!Ix(t.year),a=!Ix(t.month)||!Ix(t.day),l=s||a,c=t.weekYear||t.weekNumber;if((l||i)&&c)throw new Jy("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(a&&i)throw new Jy("Can't mix ordinal dates with month/day");let d;o?d=xx({...wx(this.c,r,n),...t},r,n):Ix(t.ordinal)?(d={...this.toObject(),...t},Ix(t.day)&&(d.day=Math.min(jx(d.year,d.month),d.day))):d=kx({..._x(this.c),...t});const[u,h]=jk(d,this.o,this.zone);return Uk(this,{ts:u,o:h})}plus(e){return this.isValid?Uk(this,Vk(this,fk.fromDurationLike(e))):this}minus(e){return this.isValid?Uk(this,Vk(this,fk.fromDurationLike(e).negate())):this}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const r={},n=fk.normalizeUnit(e);switch(n){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0}if("weeks"===n)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(r.weekNumber=this.weekNumber-1),r.weekday=e}else r.weekday=1;if("quarters"===n){const e=Math.ceil(this.month/3);r.month=3*(e-1)+1}return this.set(r)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?f_.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Pk}
3066toLocaleString(e=ow,t={}){return this.isValid?f_.create(this.loc.clone(t),e).formatDateTime(this):Pk}toLocaleParts(e={}){return this.isValid?f_.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:r=!1,includeOffset:n=!0,extendedZone:o=!1,precision:i="milliseconds"}={}){if(!this.isValid)return null;const s="extended"===e;let a=qk(this,s,i=tC(i));return Qk.indexOf(i)>=3&&(a+="T"),a+=Gk(this,s,t,r,n,o,i),a}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?qk(this,"extended"===e,tC(t)):null}toISOWeekDate(){return Kk(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:r=!0,includePrefix:n=!1,extendedZone:o=!1,format:i="extended",precision:s="milliseconds"}={}){return this.isValid?(s=tC(s),(n&&Qk.indexOf(s)>=3?"T":"")+Gk(this,"extended"===i,t,e,r,o,s)):null}toRFC2822(){return Kk(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Kk(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?qk(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:r=!0}={}){let n="HH:mm:ss.SSS";return(t||e)&&(r&&(n+=" "),t?n+="z":e&&(n+="ZZ")),Kk(this,n,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Pk}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",r={}){if(!this.isValid||!e.isValid)return fk.invalid("created by diffing an invalid DateTime");const n={locale:this.locale,numberingSystem:this.numberingSystem,...r},o=function(e){return Array.isArray(e)?e:[e]}(t).map(fk.normalizeUnit),i=e.valueOf()>this.valueOf(),s=function(e,t,r,n){let[o,i,s,a]=function(e,t,r){const n=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const r=yk(e,t);return(r-r%7)/7}],["days",yk]],o={},i=e;let s,a;for(const[l,c]of n)r.indexOf(l)>=0&&(s=l,o[l]=c(e,t),a=i.plus(o),a>t?(o[l]--,(e=i.plus(o))>t&&(a=e,o[l]--,e=i.plus(o))):e=a);return[e,o,a,s]}(e,t,r);const l=t-o,c=r.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===c.length&&(s<t&&(s=o.plus({[a]:1})),s!==o&&(i[a]=(i[a]||0)+l/(s-o)));const d=fk.fromObject(i,n);return c.length>0?fk.fromMillis(l,n).shiftTo(...c).plus(d):d}(i?this:e,i?e:this,o,n);return i?s.negate():s}diffNow(e="milliseconds",t={}){return this.diff(lC.now(),e,t)}until(e){return this.isValid?vk.fromDateTimes(this,e):this}hasSame(e,t,r){if(!this.isValid)return!1;const n=e.valueOf(),o=this.setZone(e.zone,{keepLocalTime:!0});return o.startOf(t,r)<=n&&n<=o.endOf(t,r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||lC.fromObject({},{zone:this.zone}),r=e.padding?this<t?-e.padding:e.padding:0;let n=["years","months","days","hours","minutes","seconds"],o=e.unit;return Array.isArray(e.unit)&&(n=e.unit,o=void 0),oC(t,this.plus(r),{...e,numeric:"always",units:n,unit:o})}toRelativeCalendar(e={}){return this.isValid?oC(e.base||lC.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(lC.isDateTime))throw new Xy("min requires all arguments be DateTimes");return $x(e,e=>e.valueOf(),Math.min)}static max(...e){if(!e.every(lC.isDateTime))throw new Xy("max requires all arguments be DateTimes");return $x(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,r={}){const{locale:n=null,numberingSystem:o=null}=r;return Nk(qw.fromOpts({locale:n,numberingSystem:o,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,r={}){return lC.fromFormatExplain(e,t,r)}static buildFormatParser(e,t={}){const{locale:r=null,numberingSystem:n=null}=t,o=qw.fromOpts({locale:r,numberingSystem:n,defaultToEN:!0});return new $k(o,e)}static fromFormatParser(e,t,r={}){if(Ix(e)||Ix(t))throw new Xy("fromFormatParser requires an input string and a format parser");const{locale:n=null,numberingSystem:o=null}=r,i=qw.fromOpts({locale:n,numberingSystem:o,defaultToEN:!0});if(!i.equals(t.locale))throw new Xy(`fromFormatParser called with a locale of ${i}, but the format parser was created for ${t.locale}`);const{result:s,zone:a,specificOffset:l,invalidReason:c}=t.explainFromTokens(e);return c?lC.invalid(c):Wk(s,a,r,`format ${t.format}`,e,l)}static get DATE_SHORT(){return ow}static get DATE_MED(){return iw}static get DATE_MED_WITH_WEEKDAY(){return sw}static get DATE_FULL(){return aw}static get DATE_HUGE(){return lw}static get TIME_SIMPLE(){return cw}static get TIME_WITH_SECONDS(){return dw}static get TIME_WITH_SHORT_OFFSET(){return uw}static get TIME_WITH_LONG_OFFSET(){return hw}static get TIME_24_SIMPLE(){return pw}static get TIME_24_WITH_SECONDS(){return gw}static get TIME_24_WITH_SHORT_OFFSET(){return fw}static get TIME_24_WITH_LONG_OFFSET(){return mw}static get DATETIME_SHORT(){return vw}static get DATETIME_SHORT_WITH_SECONDS(){return bw}static get DATETIME_MED(){return yw}static get DATETIME_MED_WITH_SECONDS(){return ww}static get DATETIME_MED_WITH_WEEKDAY(){return xw}static get DATETIME_FULL(){return _w}static get DATETIME_FULL_WITH_SECONDS(){return kw}static get DATETIME_HUGE(){return Cw}static get DATETIME_HUGE_WITH_SECONDS(){return Sw}}function cC(e){if(lC.isDateTime(e))return e;if(e&&e.valueOf&&Ax(e.valueOf()))return lC.fromJSDate(e);if(e&&"object"==typeof e)return lC.fromObject(e);throw new Xy(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const dC=86400,uC=1e3,hC="yyyy-MM-dd";class pC{constructor(e,t){let r,n;this.pattern=hC;const o=Ky();r="string"==typeof e?lC.fromFormat(e.toString(),this.pattern,{zone:o}):lC.fromMillis(e,{zone:o}),n="string"==typeof t?lC.fromFormat(t.toString(),this.pattern,{zone:o}):lC.fromMillis(t,{zone:o});const i=n.diff(r).toObject().milliseconds;if(!(i&&i>1))throw Error('The "to" date must be at least one day after the "from" date');this.from=r.toISODate(),this.to=n.toISODate()}toJSON(){return{from:this.from,to:this.to}}}class gC extends pC{constructor(e,t){super(e,t),this.getTzNormalizedUnixDateRange=()=>{const{from:e,to:t}=this.toOffsetUnixTime();return new Array(vC(e,t)).fill(void 0).map((t,r)=>mC(e,r)).sort(Wy)}}toCISdate(){return this.toJSON()}toOffsetUnixTime(){return{from:fC(this.from),to:fC(this.to)}}toTzNormalizedUnixKeys(){return[...this.getTzNormalizedUnixDateRange()]}}const fC=e=>{const t=Ky();return lC.fromFormat(e.toString(),hC,{zone:t}).toSeconds()},mC=(e,t)=>e+t*dC,vC=(e,t)=>Math.round((t-e)/dC),bC=(e,t)=>lC.fromISO(e,{zone:"utc"}).plus({days:t}).toISODate();class yC{constructor(){this.cacheDays=[],this.cacheEvents=new Map([]),this.clear=()=>{this.cacheDays=[],this.cacheEvents=new Map}}getMissingDatesRange(e){if(0===this.cacheDays.length)return e;const t=e.toTzNormalizedUnixKeys(),r=t.map(e=>this.cacheDays.includes(e)).map((e,t)=>!1===e?t:void 0).filter(e=>void 0!==e),n=t[r[0]];if(1===r.length)return new gC(n*uC,mC(n,1)*uC);{const e=t[r[r.length-1]]+dC;return new gC(n*uC,e*uC)}}
3066isDateRangeCached(e){return e.toTzNormalizedUnixKeys().every(e=>this.cacheDays.includes(e))}setEvents(e,t){this.markRangeAsFetched(e),this.setCache([...t]),this.sortDays()}getEvents(e,t){const{from:r,to:n}=e.toOffsetUnixTime(),o=[];return this.cacheEvents.forEach(e=>{const t=lC.fromJSDate(new Date(e.start)).toSeconds(),i=lC.fromJSDate(new Date(e.end)).toSeconds();(t>=r&&t<n||i>=r&&i<n||t<=r&&i>=n)&&o.push(e)}),o.filter(e=>(e=>!t||t&&!e)(e.privateEvent)).sort((e,t)=>lC.fromJSDate(new Date(e.start)).toSeconds()-lC.fromJSDate(new Date(t.end)).toSeconds())}setCache(e){e.forEach(e=>{this.cacheEvents.set(e.eventId,e)})}markRangeAsFetched(e){e.toTzNormalizedUnixKeys().forEach(e=>{this.cacheDays.includes(e)||this.cacheDays.push(e)})}sortDays(){this.cacheDays.sort()}}class wC{constructor(e,t,r){this.calendarServiceConnector=e,this.externalUserKey=t,this.eventBus=r,this.cache=new yC,this.currentChannelId=void 0,this.calendarEventUpdatedHandler=e=>{const t=("calendar-integration-service"===e.data.source||"goto-calendar-integration-service"===e.data.source)&&"change"===e.data.type,r=null===e.data.source&&null===e.data.type;(t||r)&&(this.cache.clear(),(0,Dv.z)())},this.notificationChannelConnectedHandler=e=>{this.currentChannelId=e.channelId,this.cache.clear(),(0,Dv.z)(),(0,Dv.g)().debug("Calendar: Notification channel connected, cache cleared",{channelId:e.channelId})},this.subscribeToChannelEvents(),this.clearCacheWhenIdle(),this.subscribeToCalendarEvents()}isConnected(){return this.calendarServiceConnector.isConnected(this.externalUserKey)}async getEvents(...e){const[t,r,n]=e,o=new gC(t,r);if(!this.cache.isDateRangeCached(o)){const e=this.currentChannelId,t=await this.fetchAllEvents(o,n);e===this.currentChannelId?this.cache.setEvents(o,t):(0,Dv.g)().warn("Calendar: Discarding fetch results due to notification channel reconnection during fetch",{channelIdAtFetchStart:e,currentChannelId:this.currentChannelId})}return{events:this.cache.getEvents(o,n?.excludePrivate)}}navigateToCalendarSettings(){(0,Dv.bj)(Dv.aA)}getConnectedServiceType(){return this.calendarServiceConnector.getConnectedServiceType(this.externalUserKey)}async fetchAllEvents(e,t){const{events:r,nextPageToken:n}=await this.fetchEventsFirstPage(e,t);let o=[];return n&&(o=await this.fetchAllPaginatedEvents(n)),[...r,...o]}async fetchEventsFirstPage(e,t){const r=this.cache.getMissingDatesRange(e);return await this.getEventsFromAPI(r,t)}async fetchAllPaginatedEvents(e){let t=25,r=e;const n=[];for(;r&&t>0;){(0,Dv.g)().debug("fetchAllNextPageEvents max next page token request: ",t);const e=await this.getNextPageResponse(r);n.push(...e.events),r=e.nextPageToken,t--}if(0===t)throw(0,Dv.g)().error("Stopped querying nextPageEvents even if the backend returned a next page token in the request. maxNextPageTokenRequest reached"),"Too many events to request to the backend. Try smaller requests";return n}async getNextPageResponse(e){try{return await this.calendarServiceConnector.getNextPage(e)}catch(e){throw(0,Dv.g)().error("Could not get next page calendar events from API: ",e),e}}async getEventsFromAPI(e,t){try{return await this.calendarServiceConnector.getEvents(e,t)}catch(e){throw(0,Dv.g)().error("Could not get calendar events from API:",e),e}}subscribeToChannelEvents(){const e=this.eventBus.subscribeTo(Dv.r);e.message.addListener(this.calendarEventUpdatedHandler),e.connected.addListener(this.notificationChannelConnectedHandler),(0,Dv.av)(()=>{e.message.removeListener(this.calendarEventUpdatedHandler),e.connected.removeListener(this.notificationChannelConnectedHandler)})}subscribeToCalendarEvents(){document.addEventListener("calendar",e=>{"disconnect"===e.detail.eventName&&this.cache.clear()})}clearCacheWhenIdle(){((e,t)=>{let r;const n=()=>{clearTimeout(r),r=setTimeout(()=>{t(),n()},144e5)};(0,Dv.bp)().addEventListener("load",n,!0),["mousedown","mousemove","mousewheel","keypress","scroll","touchstart"].forEach(function(e){(0,Dv.bp)().addEventListener(e,n,!0)}),n()})(0,()=>this.cache.clear())}}let xC,_C;const kC=(e,t,r)=>(xC||CC(e,t,r),xC),CC=(...e)=>{const t=SC(...e);xC={isConnected:t.isConnected.bind(t),getEvents:t.getEvents.bind(t),navigateToCalendarSettings:t.navigateToCalendarSettings.bind(t),getConnectedServiceType:t.getConnectedServiceType.bind(t)}},SC=(...e)=>(_C||(_C=new wC(...e)),_C),EC=new Map;class IC{constructor(e,t=(0,Dv.bp)().fetch){const{apiBaseUrl:r=""}=e;if(""===r)throw new Error("apiBaseUrl must not be an empty string");this.apiBaseUrl=r,this.fetchClient=t}async connect(...e){const[t,r,n]=e;let o;try{o=await this.fetchClient(this.getConnectionUrl(t),{method:"POST",body:JSON.stringify({providerName:r,redirectUrl:n}),headers:[["Content-Type","application/json"]]})}catch{}eb(o,"calendar not connected");const{authorizationUrl:i=""}=await o.json();return(0,Dv.bq)(i).toString()}async disconnect(...e){const[t]=e;let r;try{r=await this.fetchClient(this.getConnectionUrl(t),{method:"DELETE"})}catch{}eb(r,"calendar not disconnected")}async getConnection(...e){const[t]=e;let r;try{r=await this.fetchClient(this.getConnectionUrl(t))}catch{}if(404===r?.status)throw new Dv.a3({...r,response:r,message:"no connection for account"});eb(r,"could not get calendar connection");const n=await r.json();return{...n,connected:!0,connectedService:Dv.br[n.providerSubType]}}async isConnected(...e){const[t]=e;let r=!1;try{200===(await this.fetchClient(this.getConnectionUrl(t))).status&&(r=!0)}catch(e){(0,Dv.g)().warn("Calendar not connected: ",e)}return r}async getConnectedServiceType(...e){try{return(await this.getConnection(...e)).connectedService??null}catch(e){(0,Dv.g)().warn("Calendar not connected:",e)}return null}async getEvents(e,t){let r={excludePrivate:!1,tzid:Ky()};if((0,Dv.bs)(Dv.bt.SHELL_CALENDAR_GETEVENTS_USE_ID)){const e=(0,Dv.Z)().notificationChannel?.id??void 0;e?r={...r,notificationChannelId:e}:(r={...r,notificationChannelId:void 0},(0,Dv.g)().warn("Calendar: Skipping notification channel ID registration - channel not ready",{channelId:e}))}else{const{callbackURL:e}=(0,Dv.Z)().notificationChannel?.channelInfo??{},t=e?(0,Dv.bu)(e):void 0;r={...r,notificationUrl:t}}const{from:n,to:o}=e.toCISdate(),i={from:n,to:o,...{...t,...r}},s=`${this.apiBaseUrl}/events?${(0,Dv.bv)(i)}`;return await this.fetchResponse(s)}async getNextPage(...e){const[t]=e,r=`${this.apiBaseUrl}/events/pages?nextPageToken=${t}`;return await this.fetchResponse(r)}fetchClientWithCache(e){const t=EC.get(e);if(t)return t;const r=this.fetchClient(e).finally(()=>{EC.delete(e)});return EC.set(e,r),r}async fetchResponse(e){let t;try{t=await this.fetchClientWithCache(e)}catch{}if(eb(t,"Could not get events"),204===t.status)throw new Dv.a3({...t,response:t,message:"Calendar not connected"});return await t.clone().json()}getConnectionUrl(e){return`${this.apiBaseUrl}/users/${e}/connection`}}let AC;const TC=()=>(AC||(AC=new IC({apiBaseUrl:(0,Dv.an)().calendarServiceBaseUrl},Dv.y)),AC),OC={notificationSettingsUpdate:(0,Dv.F)()},{emit:LC}=(0,Dv.au)().register("NotificationSettings",OC),$C=e=>{LC.notificationSettingsUpdate(e)},NC={general:{message:!0,call:!0,meeting:!0},doNotDisturb:{message:!0,call:!0,meeting:!0}},RC=()=>{const e=(()=>{try{const e=(0,Dv.aZ)(Dv.aX.notificationSettings);return null===e?null:JSON.parse(e)}catch{}return null})()??{};return Object.assign({...NC},e)};var PC;if(typeof window>"u"){var DC={hostname:""};PC={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:DC,referrer:""},screen:{width:0,height:0},location:DC,addEventListener:function(){},removeEventListener:function(){},dispatchEvent:function(){},CustomEvent:function(){}}}else PC=window;var MC={DEBUG:!1,LIB_VERSION:"2.82.1"},zC="__mp_targeting",FC="__mp_recorder",UC="__MP_TARGETING_FILENAME__";function BC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function HC(e,t,r,n,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void r(e)}a.done?t(l):Promise.resolve(l).then(n,o)}function jC(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function s(e){HC(i,n,o,s,a,"next",e)}function a(e){HC(i,n,o,s,a,"throw",e)}s(void 0)})}}function VC(e,t,r){return VC=eS()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&JC(o,r.prototype),o},VC.apply(null,arguments)}function WC(e,t,r){return t&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}function KC(){return KC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
3066for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},KC.apply(this,arguments)}function qC(e){return qC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},qC(e)}function GC(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&JC(e,t)}function ZC(e,t){return null!=t&&typeof Symbol<"u"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function YC(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}function JC(e,t){return JC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},JC(e,t)}function QC(e){return e&&typeof Symbol<"u"&&e.constructor===Symbol?"symbol":typeof e}function XC(e){var t="function"==typeof Map?new Map:void 0;return XC=function(e){if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return VC(e,arguments,qC(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),JC(r,e)},XC(e)}function eS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(eS=function(){return!!e})()}function tS(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return BC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return BC(e,t)}}(e))||t){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function rS(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function nS(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var oS,iS=Object.defineProperty,sS=function(e,t,r){return function(e,t,r){return t in e?iS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r}(e,"symbol"!==(typeof t>"u"?"undefined":QC(t))?t+"":t,r)},aS=Object.defineProperty,lS=function(e,t,r){return function(e,t,r){return t in e?aS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r}(e,"symbol"!==(typeof t>"u"?"undefined":QC(t))?t+"":t,r)},cS=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(cS||{}),dS={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},uS={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},hS={};function pS(e){if(hS[e])return hS[e];var t=globalThis[e],r=t.prototype,n=e in dS?dS[e]:void 0,o=!(!n||!n.every(function(e){var t,n;return!(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)||!n.toString().includes("[native code]"))})),i=e in uS?uS[e]:void 0,s=!(!i||!i.every(function(e){var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(o&&s&&!globalThis.Zone)return hS[e]=t.prototype,t.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var l=a.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(a),c?hS[e]=c:r}catch{return r}}var gS={};function fS(e,t,r){var n,o=e+"."+String(r);if(gS[o])return gS[o].call(t);var i=pS(e),s=null==(n=Object.getOwnPropertyDescriptor(i,r))?void 0:n.get;return s?(gS[o]=s,s.call(t)):t[r]}var mS=function(e){return fS("Node",e,"childNodes")},vS=function(e){return fS("Node",e,"parentNode")},bS=function(e){return fS("Node",e,"parentElement")},yS=function(e){return fS("Node",e,"textContent")},wS=function(e){return e&&"host"in e?fS("ShadowRoot",e,"host"):null},xS=function(e){return e&&"shadowRoot"in e?fS("Element",e,"shadowRoot"):null};
3066function _S(e){return e.nodeType===e.ELEMENT_NODE}function kS(e){var t=e&&"host"in e&&"mode"in e&&wS(e)||null;return!(!t||!("shadowRoot"in t)||xS(t)!==e)}function CS(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function SS(e){try{var t=e.rules||e.cssRules;if(!t)return null;var r=e.href;return!r&&e.ownerNode&&e.ownerNode.ownerDocument&&(r=e.ownerNode.ownerDocument.location.href),function(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}(Array.from(t,function(e){return ES(e,r)}).join(""))}catch{return null}}function ES(e,t){if(function(e){return"styleSheet"in e}(e)){var r;try{r=SS(e.styleSheet)||function(e){var t=e.cssText;if(t.split('"').length<3)return t;var r=["@import","url("+JSON.stringify(e.href)+")"];return""===e.layerName?r.push("layer"):e.layerName&&r.push("layer("+e.layerName+")"),e.supportsText&&r.push("supports("+e.supportsText+")"),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch{r=e.cssText}return e.styleSheet.href?MS(r,e.styleSheet.href):r}var n=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(n=function(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}(n)),t?MS(n,t):n}var IS=function(){function e(){lS(this,"idNodeMap",new Map),lS(this,"nodeMetaMap",new WeakMap)}var t=e.prototype;return t.getId=function(e){var t;return e?(null==(t=this.getMeta(e))?void 0:t.id)??-1:-1},t.getNode=function(e){return this.idNodeMap.get(e)||null},t.getIds=function(){return Array.from(this.idNodeMap.keys())},t.getMeta=function(e){return this.nodeMetaMap.get(e)||null},t.removeNodeFromMap=function(e,t){var r=this;void 0===t&&(t=!1);var n=this.getId(e);this.idNodeMap.delete(n),t&&this.nodeMetaMap.delete(e),e.childNodes&&e.childNodes.forEach(function(e){return r.removeNodeFromMap(e,t)})},t.has=function(e){return this.idNodeMap.has(e)},t.hasNode=function(e){return this.nodeMetaMap.has(e)},t.add=function(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)},t.replace=function(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)},t.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function AS(e){var t=e.element,r=e.maskInputOptions,n=e.tagName,o=e.type,i=e.value,s=e.maskInputFn,a=i||"",l=o&&TS(o);return(r[n.toLowerCase()]||l&&r[l])&&(a=s?s(a,t):"*".repeat(a.length)),a}function TS(e){return e.toLowerCase()}var OS="__rrweb_original__";function LS(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?TS(t):null}function $S(e,t){var r;try{r=new URL(e,t??window.location.href)}catch{return null}var n,o=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!=(n=o?.[1])?n:null}var NS=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,RS=/^(?:[a-z+]+:)?\/\//i,PS=/^www\..*/i,DS=/^(data:)([^,]*),(.*)/i;function MS(e,t){return(e||"").replace(NS,function(e,r,n,o,i,s){var a=n||i||s,l=r||o||"";if(!a)return e;if(RS.test(a)||PS.test(a)||DS.test(a))return"url("+l+a+l+")";if("/"===a[0])return"url("+l+(function(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}(t)+a)+l+")";var c=t.split("/"),d=a.split("/");c.pop();for(var u,h=tS(d);!(u=h()).done;){var p=u.value;"."!==p&&(".."===p?c.pop():c.push(p))}return"url("+l+c.join("/")+l+")"})}function zS(e,t){return void 0===t&&(t=!1),t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}var FS=1,US=new RegExp("[^a-z0-9-_:]");function BS(){return FS++}var HS,jS,VS=/^[^ \t\n\r\u000c]+/,WS=/^[, \t\n\r\u000c]+/,KS=new WeakMap;function qS(e,t){return t&&""!==t.trim()?ZS(e,t):t}function GS(e){return!("svg"!==e.tagName&&!e.ownerSVGElement)}function ZS(e,t){var r=KS.get(e);if(r||(r=e.createElement("a"),KS.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function YS(e,t,r,n){return n&&("src"===r||"href"===r&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&"#"!==n[0]||"background"===r&&("table"===t||"td"===t||"th"===t)?qS(e,n):"srcset"===r?function(e,t){if(""===t.trim())return t;var r=0;function n(e){var n,o=e.exec(t.substring(r));return o?(n=o[0],r+=n.length,n):""}for(var o=[];n(WS),!(r>=t.length);){var i=n(VS);if(","===i.slice(-1))i=qS(e,i.substring(0,i.length-1)),o.push(i);else{var s="";i=qS(e,i);for(var a=!1;;){var l=t.charAt(r);if(""===l){o.push((i+s).trim());break}if(a)")"===l&&(a=!1);else{if(","===l){r+=1,o.push((i+s).trim());break}"("===l&&(a=!0)}s+=l,r+=1}}}return o.join(", ")}(e,n):"style"===r?MS(n,ZS(e)):"object"===t&&"data"===r?qS(e,n):n)}function JS(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function QS(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&QS(vS(e),t,r);for(var n=e.classList.length;n--;){var o=e.classList[n];if(t.test(o))return!0}return!!r&&QS(vS(e),t,r)}function XS(e,t,r,n){var o;if(_S(e)){if(!mS(o=e).length)return!1}else{if(null===bS(e))return!1;o=bS(e)}
3066try{if("string"==typeof t){if(n){if(o.closest("."+t))return!0}else if(o.classList.contains(t))return!0}else if(QS(o,t,n))return!0;if(r)if(n){if(o.closest(r))return!0}else if(o.matches(r))return!0}catch{}return!1}function eE(e,t){var r=t.doc,n=t.mirror,o=t.blockClass,i=t.blockSelector,s=t.needsMask,a=t.inlineStylesheet,l=t.maskInputOptions,c=void 0===l?{}:l,d=t.maskTextFn,u=t.maskInputFn,h=t.dataURLOptions,p=void 0===h?{}:h,g=t.inlineImages,f=t.recordCanvas,m=t.keepIframeSrcFn,v=t.newlyAddedElement,b=void 0!==v&&v,y=t.cssCaptured,w=void 0!==y&&y,x=function(e,t){if(t.hasNode(e)){var r=t.getId(e);return 1===r?void 0:r}}(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:cS.Document,childNodes:[],compatMode:e.compatMode}:{type:cS.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:cS.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:x};case e.ELEMENT_NODE:return function(e,t){for(var r=t.doc,n=t.inlineStylesheet,o=t.maskInputOptions,i=void 0===o?{}:o,s=t.maskInputFn,a=t.dataURLOptions,l=void 0===a?{}:a,c=t.inlineImages,d=t.recordCanvas,u=t.keepIframeSrcFn,h=t.newlyAddedElement,p=void 0!==h&&h,g=t.rootId,f=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var o=e.classList[n];if(t.test(o))return!0}if(r)return e.matches(r)}catch{}return!1}(e,t.blockClass,t.blockSelector),m=function(e){if(ZC(e,HTMLFormElement))return"form";var t=TS(e.tagName);return US.test(t)?"div":t}(e),v={},b=e.attributes.length,y=0;y<b;y++){var w=e.attributes[y];JS(m,w.name,w.value)||(v[w.name]=YS(r,m,TS(w.name),w.value))}if("link"===m&&n){var x=Array.from(r.styleSheets).find(function(t){return t.href===e.href}),_=null;x&&(_=SS(x)),_&&(delete v.rel,delete v.href,v._cssText=_)}if("style"===m&&e.sheet){var k=SS(e.sheet);k&&(e.childNodes.length>1&&(k=function(e,t){return function(e,t,r){void 0===r&&(r=!1);var n=Array.from(t.childNodes),o=[],i=0;if(n.length>1&&e&&"string"==typeof e)for(var s=zS(e,r),a=s.length/e.length,l=1;l<n.length;l++)if(n[l].textContent&&"string"==typeof n[l].textContent){for(var c=zS(n[l].textContent,r),d=3;d<c.length&&(c[d].match(/[a-zA-Z0-9]/)||-1!==c.indexOf(c.substring(0,d),1));d++);for(;d<c.length;d++){var u=c.substring(0,d),h=s.split(u),p=-1;if(2===h.length)p=h[0].length;else if(h.length>2&&""===h[0]&&""!==n[l-1].textContent)p=s.indexOf(u,1);else if(1===h.length){if(u=u.substring(0,u.length-1),(h=s.split(u)).length<=1)return o.push(e),o;d=101}else d===c.length-1&&(p=s.indexOf(u));if(h.length>=2&&d>100){var g=n[l-1].textContent;if(g&&"string"==typeof g){var f=zS(g).length;p=s.indexOf(u,f)}-1===p&&(p=h[0].length)}if(-1!==p){for(var m=Math.floor(p/a);m>0&&m<e.length;){if((i+=1)>50*n.length)return o.push(e),o;var v=zS(e.substring(0,m),r);if(v.length===p){o.push(e.substring(0,m)),e=e.substring(m),s=s.substring(p);break}v.length<p?m+=Math.max(1,Math.floor((p-v.length)/a)):m-=Math.max(1,Math.floor((v.length-p)*a))}break}}}return o.push(e),o}(e,t).join("/* rr_split */")}(k,e)),v._cssText=k)}if("input"===m||"textarea"===m||"select"===m){var C=e.value,S=e.checked;"radio"!==v.type&&"checkbox"!==v.type&&"submit"!==v.type&&"button"!==v.type&&C?v.value=AS({element:e,type:LS(e),tagName:m,value:C,maskInputOptions:i,maskInputFn:s}):S&&(v.checked=S)}if("option"===m&&(e.selected&&!i.select?v.selected=!0:delete v.selected),"dialog"===m&&e.open&&(v.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),"canvas"===m&&d)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;r<e.width;r+=50)for(var n=0;n<e.height;n+=50){var o=t.getImageData,i=OS in o?o[OS]:o;if(new Uint32Array(i.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some(function(e){return 0!==e}))return!1}return!0})(e)||(v.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){var E=e.toDataURL(l.type,l.quality),I=r.createElement("canvas");I.width=e.width,I.height=e.height,E!==I.toDataURL(l.type,l.quality)&&(v.rr_dataURL=E)}if("img"===m&&c){HS||(HS=r.createElement("canvas"),jS=HS.getContext("2d"));var A=e,T=A.currentSrc||A.getAttribute("src")||"<unknown-src>",O=A.crossOrigin,L=function(){A.removeEventListener("load",L);
3066try{HS.width=A.naturalWidth,HS.height=A.naturalHeight,jS.drawImage(A,0,0),v.rr_dataURL=HS.toDataURL(l.type,l.quality)}catch(e){if("anonymous"!==A.crossOrigin)return A.crossOrigin="anonymous",void(A.complete&&0!==A.naturalWidth?L():A.addEventListener("load",L));console.warn("Cannot inline img src="+T+"! Error: "+e)}"anonymous"===A.crossOrigin&&(O?v.crossOrigin=O:A.removeAttribute("crossorigin"))};A.complete&&0!==A.naturalWidth?L():A.addEventListener("load",L)}if("audio"===m||"video"===m){var $=v;$.rr_mediaState=e.paused?"paused":"played",$.rr_mediaCurrentTime=e.currentTime,$.rr_mediaPlaybackRate=e.playbackRate,$.rr_mediaMuted=e.muted,$.rr_mediaLoop=e.loop,$.rr_mediaVolume=e.volume}if(p||(e.scrollLeft&&(v.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(v.rr_scrollTop=e.scrollTop)),f){var N=e.getBoundingClientRect(),R=N.width,P=N.height;v={class:v.class,rr_width:R+"px",rr_height:P+"px"}}var D;"iframe"===m&&!u(v.src)&&(e.contentDocument||(v.rr_src=v.src),delete v.src);try{customElements.get(m)&&(D=!0)}catch{}return{type:cS.Element,tagName:m,attributes:v,childNodes:[],isSVG:GS(e)||void 0,needBlock:f,rootId:g,isCustom:D}}(e,{doc:r,blockClass:o,blockSelector:i,inlineStylesheet:a,maskInputOptions:c,maskInputFn:u,dataURLOptions:p,inlineImages:g,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:b,rootId:x});case e.TEXT_NODE:return function(e,t){var r=t.needsMask,n=t.maskTextFn,o=t.rootId,i=t.cssCaptured,s=vS(e),a=s&&s.tagName,l="",c="STYLE"===a||void 0,d="SCRIPT"===a||void 0;return d?l="SCRIPT_PLACEHOLDER":i||(l=yS(e),c&&l&&(l=MS(l,ZS(t.doc)))),!c&&!d&&l&&r&&(l=n?n(l,bS(e)):l.replace(/[\S]/g,"*")),{type:cS.Text,textContent:l||"",rootId:o}}(e,{doc:r,needsMask:s,maskTextFn:d,rootId:x,cssCaptured:w});case e.CDATA_SECTION_NODE:return{type:cS.CDATA,textContent:"",rootId:x};case e.COMMENT_NODE:return{type:cS.Comment,textContent:yS(e)||"",rootId:x};default:return!1}}function tE(e){return null==e?"":e.toLowerCase()}function rE(e,t){var r=t.doc,n=t.mirror,o=t.blockClass,i=t.blockSelector,s=t.maskTextClass,a=t.maskTextSelector,l=t.skipChild,c=void 0!==l&&l,d=t.inlineStylesheet,u=void 0===d||d,h=t.maskInputOptions,p=void 0===h?{}:h,g=t.maskTextFn,f=t.maskInputFn,m=t.slimDOMOptions,v=t.dataURLOptions,b=void 0===v?{}:v,y=t.inlineImages,w=void 0!==y&&y,x=t.recordCanvas,_=void 0!==x&&x,k=t.onSerialize,C=t.onIframeLoad,S=t.iframeLoadTimeout,E=void 0===S?5e3:S,I=t.onStylesheetLoad,A=t.stylesheetLoadTimeout,T=void 0===A?5e3:A,O=t.keepIframeSrcFn,L=void 0===O?function(){return!1}:O,$=t.newlyAddedElement,N=void 0!==$&&$,R=t.cssCaptured,P=void 0!==R&&R,D=t.needsMask,M=t.preserveWhiteSpace,z=void 0===M||M;D||(D=XS(e,s,a,void 0===D));var F,U=eE(e,{doc:r,mirror:n,blockClass:o,blockSelector:i,needsMask:D,inlineStylesheet:u,maskInputOptions:p,maskTextFn:g,maskInputFn:f,dataURLOptions:b,inlineImages:w,recordCanvas:_,keepIframeSrcFn:L,newlyAddedElement:N,cssCaptured:P});if(!U)return console.warn(e,"not serialized"),null;F=n.hasNode(e)?n.getId(e):function(e,t){if(t.comment&&e.type===cS.Comment)return!0;if(e.type===cS.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===$S(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(tE(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===tE(e.attributes.name)||"icon"===tE(e.attributes.rel)||"apple-touch-icon"===tE(e.attributes.rel)||"shortcut icon"===tE(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&tE(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(tE(e.attributes.property).match(/^(og|twitter|fb):/)||tE(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===tE(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===tE(e.attributes.name)||"googlebot"===tE(e.attributes.name)||"bingbot"===tE(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;
3066if(t.headMetaAuthorship&&("author"===tE(e.attributes.name)||"generator"===tE(e.attributes.name)||"framework"===tE(e.attributes.name)||"publisher"===tE(e.attributes.name)||"progid"===tE(e.attributes.name)||tE(e.attributes.property).match(/^article:/)||tE(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===tE(e.attributes.name)||"yandex-verification"===tE(e.attributes.name)||"csrf-token"===tE(e.attributes.name)||"p:domain_verify"===tE(e.attributes.name)||"verify-v1"===tE(e.attributes.name)||"verification"===tE(e.attributes.name)||"shopify-checkout-api-token"===tE(e.attributes.name)))return!0}}return!1}(U,m)||!z&&U.type===cS.Text&&!U.textContent.replace(/^\s+|\s+$/gm,"").length?-2:BS();var B=Object.assign(U,{id:F});if(n.add(e,B),-2===F)return null;k&&k(e);var H=!c;if(B.type===cS.Element){H=H&&!B.needBlock,delete B.needBlock;var j=xS(e);j&&CS(j)&&(B.isShadowHost=!0)}if((B.type===cS.Document||B.type===cS.Element)&&H){m.headWhitespace&&B.type===cS.Element&&"head"===B.tagName&&(z=!1);var V={doc:r,mirror:n,blockClass:o,blockSelector:i,needsMask:D,maskTextClass:s,maskTextSelector:a,skipChild:c,inlineStylesheet:u,maskInputOptions:p,maskTextFn:g,maskInputFn:f,slimDOMOptions:m,dataURLOptions:b,inlineImages:w,recordCanvas:_,preserveWhiteSpace:z,onSerialize:k,onIframeLoad:C,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:T,keepIframeSrcFn:L,cssCaptured:!1};if(B.type!==cS.Element||"textarea"!==B.tagName||void 0===B.attributes.value){B.type===cS.Element&&void 0!==B.attributes._cssText&&"string"==typeof B.attributes._cssText&&(V.cssCaptured=!0);for(var W,K=tS(Array.from(mS(e)));!(W=K()).done;){var q=rE(W.value,V);q&&B.childNodes.push(q)}}var G=null;if(_S(e)&&(G=xS(e)))for(var Z,Y=tS(Array.from(mS(G)));!(Z=Y()).done;){var J=rE(Z.value,V);J&&(CS(G)&&(J.isShadow=!0),B.childNodes.push(J))}}var Q=vS(e);
3066return Q&&kS(Q)&&CS(Q)&&(B.isShadow=!0),B.type===cS.Element&&"iframe"===B.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var o,i=!1;try{o=n.document.readyState}catch{return}if("complete"!==o){var s=setTimeout(function(){i||(t(),i=!0)},r);return void e.addEventListener("load",function(){clearTimeout(s),i=!0,t()})}var a="about:blank";if(n.location.href!==a||e.src===a||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}(e,function(){var t=e.contentDocument;if(t&&C){var r=rE(t,{doc:t,mirror:n,blockClass:o,blockSelector:i,needsMask:D,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:p,maskTextFn:g,maskInputFn:f,slimDOMOptions:m,dataURLOptions:b,inlineImages:w,recordCanvas:_,preserveWhiteSpace:z,onSerialize:k,onIframeLoad:C,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:T,keepIframeSrcFn:L});r&&C(e,r)}},E),B.type===cS.Element&&"link"===B.tagName&&"string"==typeof B.attributes.rel&&("stylesheet"===B.attributes.rel||"preload"===B.attributes.rel&&"string"==typeof B.attributes.href&&"css"===$S(B.attributes.href))&&function(e,t,r){var n,o=!1;try{n=e.sheet}catch{return}if(!n){var i=setTimeout(function(){o||(t(),o=!0)},r);e.addEventListener("load",function(){clearTimeout(i),o=!0,t()})}}(e,function(){if(I){var t=rE(e,{doc:r,mirror:n,blockClass:o,blockSelector:i,needsMask:D,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:p,maskTextFn:g,maskInputFn:f,slimDOMOptions:m,dataURLOptions:b,inlineImages:w,recordCanvas:_,preserveWhiteSpace:z,onSerialize:k,onIframeLoad:C,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:T,keepIframeSrcFn:L});t&&I(e,t)}},T),B}function nE(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function oE(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return ZC(this,e)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var iE={exports:{}},sE=String,aE=function(){return{isColorSupported:!1,reset:sE,bold:sE,dim:sE,italic:sE,underline:sE,inverse:sE,hidden:sE,strikethrough:sE,black:sE,red:sE,green:sE,yellow:sE,blue:sE,magenta:sE,cyan:sE,white:sE,gray:sE,bgBlack:sE,bgRed:sE,bgGreen:sE,bgYellow:sE,bgBlue:sE,bgMagenta:sE,bgCyan:sE,bgWhite:sE}};iE.exports=aE(),iE.exports.createColors=aE;var lE=iE.exports,cE=oE(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),dE=lE,uE=cE,hE=function(e){function t(r,n,o,i,s,a){var l;return(l=e.call(this,r)||this).name="CssSyntaxError",l.reason=r,s&&(l.file=s),i&&(l.source=i),a&&(l.plugin=a),typeof n<"u"&&typeof o<"u"&&("number"==typeof n?(l.line=n,l.column=o):(l.line=n.line,l.column=n.column,l.endLine=o.line,l.endColumn=o.column)),l.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(l,t),l}GC(t,e);var r=t.prototype;return r.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},r.showSourceCode=function(e){var t=this;if(!this.source)return"";var r=this.source;null==e&&(e=dE.isColorSupported),uE&&e&&(r=uE(r));var n,o,i=r.split(/\r?\n/),s=Math.max(this.line-3,0),a=Math.min(this.line+2,i.length),l=String(a).length;if(e){var c=dE.createColors(!0),d=c.bold,u=c.gray,h=c.red;n=function(e){return d(h(e))},o=function(e){return u(e)}}else n=o=function(e){return e};return i.slice(s,a).map(function(e,r){var i=s+1+r,a=" "+(" "+i).slice(-l)+" | ";if(i===t.line){var c=o(a.replace(/\d/g," "))+e.slice(0,t.column-1).replace(/[^\t]/g," ");return n(">")+o(a)+e+"\n "+c+n("^")}return" "+o(a)+e}).join("\n")},r.toString=function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e},t}(XC(Error)),pE=hE;hE.default=hE;var gE={};gE.isClean=Symbol("isClean"),gE.my=Symbol("my");var fE={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1},mE=function(){function e(e){this.builder=e}var t=e.prototype;
3066return t.atrule=function(e,t){var r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{var o=(e.raws.between||"")+(t?";":"");this.builder(r+n+o,e)}},t.beforeAfter=function(e,t){var r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var n=e.parent,o=0;n&&"root"!==n.type;)o+=1,n=n.parent;if(r.includes("\n")){var i=this.raw(e,null,"indent");if(i.length)for(var s=0;s<o;s++)r+=i}return r},t.block=function(e,t){var r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")},t.body=function(e){for(var t=e.nodes.length-1;t>0&&"comment"===e.nodes[t].type;)t-=1;for(var r=this.raw(e,"semicolon"),n=0;n<e.nodes.length;n++){var o=e.nodes[n],i=this.raw(o,"before");i&&this.builder(i),this.stringify(o,t!==n||r)}},t.comment=function(e){var t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)},t.decl=function(e,t){var r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)},t.document=function(e){this.body(e)},t.raw=function(e,t,r){var n;if(r||(r=t),t&&typeof(n=e.raws[t])<"u")return n;var o=e.parent;if("before"===r&&(!o||"root"===o.type&&o.first===e||o&&"document"===o.type))return"";if(!o)return fE[r];var i=e.root();if(i.rawCache||(i.rawCache={}),typeof i.rawCache[r]<"u")return i.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);var s="raw"+function(e){return e[0].toUpperCase()+e.slice(1)}(r);return this[s]?n=this[s](i,e):i.walk(function(e){if(typeof(n=e.raws[t])<"u")return!1}),typeof n>"u"&&(n=fE[r]),i.rawCache[r]=n,n},t.rawBeforeClose=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length>0&&typeof e.raws.after<"u")return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawBeforeComment=function(e,t){var r;return e.walkComments(function(e){if(typeof e.raws.before<"u")return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r},t.rawBeforeDecl=function(e,t){var r;return e.walkDecls(function(e){if(typeof e.raws.before<"u")return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r},t.rawBeforeOpen=function(e){var t;return e.walk(function(e){if("decl"!==e.type&&typeof(t=e.raws.between)<"u")return!1}),t},t.rawBeforeRule=function(e){var t;return e.walk(function(r){if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return(t=r.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawColon=function(e){var t;return e.walkDecls(function(e){if(typeof e.raws.between<"u")return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t},t.rawEmptyBody=function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&typeof(t=e.raws.after)<"u")return!1}),t},t.rawIndent=function(e){return e.raws.indent?e.raws.indent:(e.walk(function(r){var n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof r.raws.before<"u"){var o=r.raws.before.split("\n");return t=(t=o[o.length-1]).replace(/\S/g,""),!1}}),t);var t},t.rawSemicolon=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&typeof(t=e.raws.semicolon)<"u")return!1}),t},t.rawValue=function(e,t){var r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r},t.root=function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)},t.rule=function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")},t.stringify=function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)},e}(),vE=mE;mE.default=mE;var bE=vE;function yE(e,t){new bE(t).stringify(e)}var wE=yE;yE.default=yE;var xE=gE.isClean,_E=gE.my,kE=pE,CE=vE,SE=wE;function EE(e,t){var r=new e.constructor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&"proxyCache"!==n){var o=e[n],i=typeof o>"u"?"undefined":QC(o);"parent"===n&&"object"===i?t&&(r[n]=t):"source"===n?r[n]=o:Array.isArray(o)?r[n]=o.map(function(e){return EE(e,r)}):("object"===i&&null!==o&&(o=EE(o)),r[n]=o)}return r}var IE=function(){function e(e){for(var t in void 0===e&&(e={}),this.raws={},this[xE]=!1,this[_E]=!0,e)if("nodes"===t){this.nodes=[];for(var r,n=tS(e[t]);!(r=n()).done;){var o=r.value;"function"==typeof o.clone?this.append(o.clone()):this.append(o)}}else this[t]=e[t]}var t=e.prototype;return t.addToError=function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&"+t.input.from+":"+t.start.line+":"+t.start.column+"$&")}return e},t.after=function(e){return this.parent.insertAfter(this,e),this},t.assign=function(e){for(var t in void 0===e&&(e={}),e)this[t]=e[t];return this},t.before=function(e){return this.parent.insertBefore(this,e),this},t.cleanRaws=function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between},t.clone=function(e){void 0===e&&(e={});var t=EE(this);for(var r in e)t[r]=e[r];return t},t.cloneAfter=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t},t.cloneBefore=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t},t.error=function(e,t){if(void 0===t&&(t={}),this.source){var r=this.rangeBy(t),n=r.end,o=r.start;return this.source.input.error(e,{column:o.column,line:o.line},{column:n.column,line:n.line},t)}return new kE(e)},t.getProxyProcessor=function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,r){return e[t]===r||(e[t]=r,("prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty()),!0}}},t.markDirty=function(){if(this[xE]){this[xE]=!1;for(var e=this;e=e.parent;)e[xE]=!1}},t.next=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}},t.positionBy=function(e,t){var r=this.source.start;if(e.index)r=this.positionInside(e.index,t);
3066else if(e.word){var n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r},t.positionInside=function(e,t){for(var r=t||this.toString(),n=this.source.start.column,o=this.source.start.line,i=0;i<e;i++)"\n"===r[i]?(n=1,o+=1):n+=1;return{column:n,line:o}},t.prev=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e-1]}},t.rangeBy=function(e){var t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){var n=this.toString(),o=n.indexOf(e.word);-1!==o&&(t=this.positionInside(o,n),r=this.positionInside(o+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}},t.raw=function(e,t){return(new CE).raw(this,e,t)},t.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.replaceWith=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(this.parent){for(var n,o=this,i=!1,s=tS(t);!(n=s()).done;){var a=n.value;a===this?i=!0:i?(this.parent.insertAfter(o,a),o=a):this.parent.insertBefore(o,a)}i||this.remove()}return this},t.root=function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e},t.toJSON=function(e,t){var r={},n=null==t;t=t||new Map;var o=0;for(var i in this)if(Object.prototype.hasOwnProperty.call(this,i)&&"parent"!==i&&"proxyCache"!==i){var s=this[i];if(Array.isArray(s))r[i]=s.map(function(e){return"object"===(typeof e>"u"?"undefined":QC(e))&&e.toJSON?e.toJSON(null,t):e});else if("object"===(typeof s>"u"?"undefined":QC(s))&&s.toJSON)r[i]=s.toJSON(null,t);else if("source"===i){var a=t.get(s.input);null==a&&(a=o,t.set(s.input,o),o++),r[i]={end:s.end,inputId:a,start:s.start}}else r[i]=s}return n&&(r.inputs=[].concat(t.keys()).map(function(e){return e.toJSON()})),r},t.toProxy=function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache},t.toString=function(e){void 0===e&&(e=SE),e.stringify&&(e=e.stringify);var t="";return e(this,function(e){t+=e}),t},t.warn=function(e,t,r){var n={node:this};for(var o in r)n[o]=r[o];return e.warn(t,n)},WC(e,[{key:"proxyOf",get:function(){return this}}]),e}(),AE=IE;IE.default=IE;var TE=function(e){function t(t){var r;return t&&typeof t.value<"u"&&"string"!=typeof t.value&&(t=KC({},t,{value:String(t.value)})),(r=e.call(this,t)||this).type="decl",r}return GC(t,e),WC(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),t}(AE),OE=TE;TE.default=TE;var LE=cE.SourceMapConsumer,$E=cE.SourceMapGenerator,NE=cE.existsSync,RE=cE.readFileSync,PE=cE.dirname,DE=cE.join,ME=function(){function e(e,t){if(!1!==t.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=PE(this.mapFile)),n&&(this.text=n)}}var t=e.prototype;return t.consumer=function(){return this.consumerCache||(this.consumerCache=new LE(this.text)),this.consumerCache},t.decodeInline=function(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return function(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}(e.substr(RegExp.lastMatch.length));var t=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+t)},t.getAnnotationURL=function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()},t.isMap=function(e){return"object"===(typeof e>"u"?"undefined":QC(e))&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))},t.loadAnnotation=function(e){var t=e.match(/\/\*\s*# sourceMappingURL=/gm);
3066if(t){var r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}},t.loadFile=function(e){if(this.root=PE(e),NE(e))return this.mapFile=e,RE(e,"utf-8").toString().trim()},t.loadMap=function(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(ZC(t,LE))return $E.fromSourceMap(t).toString();if(ZC(t,$E))return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var r=t(e);if(r){var n=this.loadFile(r);if(!n)throw new Error("Unable to load previous source map: "+r.toString());return n}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var o=this.annotation;return e&&(o=DE(PE(e),o)),this.loadFile(o)}}},t.startWith=function(e,t){return!!e&&e.substr(0,t.length)===t},t.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e}(),zE=ME;ME.default=ME;var FE=cE.SourceMapConsumer,UE=cE.SourceMapGenerator,BE=cE.fileURLToPath,HE=cE.pathToFileURL,jE=cE.isAbsolute,VE=cE.resolve,WE=function(e){void 0===e&&(e=21);for(var t="",r=e;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}
3066,KE=cE,qE=pE,GE=zE,ZE=Symbol("fromOffsetCache"),YE=!(!FE||!UE),JE=!(!VE||!jE),QE=function(){function e(e,t){if(void 0===t&&(t={}),null===e||typeof e>"u"||"object"===(typeof e>"u"?"undefined":QC(e))&&!e.toString)throw new Error("PostCSS received "+e+" instead of CSS string");if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!JE||/^\w+:\/\//.test(t.from)||jE(t.from)?this.file=t.from:this.file=VE(t.from)),JE&&YE){var r=new GE(this.css,t);if(r.text){this.map=r;var n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+WE(6)+">"),this.map&&(this.map.file=this.from)}var t=e.prototype;return t.error=function(e,t,r,n){var o,i,s;if(void 0===n&&(n={}),t&&"object"===(typeof t>"u"?"undefined":QC(t))){var a=t,l=r;if("number"==typeof a.offset){var c=this.fromOffset(a.offset);t=c.line,r=c.col}else t=a.line,r=a.column;if("number"==typeof l.offset){var d=this.fromOffset(l.offset);i=d.line,s=d.col}else i=l.line,s=l.column}else if(!r){var u=this.fromOffset(t);t=u.line,r=u.col}var h=this.origin(t,r,i,s);return(o=h?new qE(e,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,n.plugin):new qE(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:s,line:i},this.css,this.file,n.plugin)).input={column:r,endColumn:s,endLine:i,line:t,source:this.css},this.file&&(HE&&(o.input.url=HE(this.file).toString()),o.input.file=this.file),o},t.fromOffset=function(e){var t;if(this[ZE])t=this[ZE];else{var r=this.css.split("\n");t=new Array(r.length);for(var n=0,o=0,i=r.length;o<i;o++)t[o]=n,n+=r[o].length+1;this[ZE]=t}var s=0;if(e>=t[t.length-1])s=t.length-1;else for(var a,l=t.length-2;s<l;)if(e<t[a=s+(l-s>>1)])l=a-1;else{if(!(e>=t[a+1])){s=a;break}s=a+1}return{col:e-t[s]+1,line:s+1}},t.mapResolve=function(e){return/^\w+:\/\//.test(e)?e:VE(this.map.consumer().sourceRoot||this.map.root||".",e)},t.origin=function(e,t,r,n){if(!this.map)return!1;var o,i,s=this.map.consumer(),a=s.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(o=s.originalPositionFor({column:n,line:r})),i=jE(a.source)?HE(a.source):new URL(a.source,this.map.consumer().sourceRoot||HE(this.map.mapFile));var l={column:a.column,endColumn:o&&o.column,endLine:o&&o.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!BE)throw new Error("file: protocol is not available in this PostCSS build");l.file=BE(i)}var c=s.sourceContentFor(a.source);return c&&(l.source=c),l},t.toJSON=function(){for(var e={},t=0,r=["hasBOM","css","file","id"];t<r.length;t++){var n=r[t];null!=this[n]&&(e[n]=this[n])}return this.map&&(e.map=KC({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e},WC(e,[{key:"from",get:function(){return this.file||this.id}}]),e}(),XE=QE;QE.default=QE,KE&&KE.registerInput&&KE.registerInput(QE);var eI=cE.SourceMapConsumer,tI=cE.SourceMapGenerator,rI=cE.dirname,nI=cE.relative,oI=cE.resolve,iI=cE.sep,sI=cE.pathToFileURL,aI=XE,lI=!(!eI||!tI),cI=!!(rI&&oI&&nI&&iI),dI=function(){function e(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}var t=e.prototype;return t.addAnnotation=function(){var e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"},t.applyPrevMaps=function(){for(var e,t=tS(this.previous());!(e=t()).done;){var r=e.value,n=this.toUrl(this.path(r.file)),o=r.root||rI(r.file),i=void 0;!1===this.mapOpts.sourcesContent?(i=new eI(r.text)).sourcesContent&&(i.sourcesContent=null):i=r.consumer(),this.map.applySourceMap(i,n,this.toUrl(this.path(o)))}},t.clearAnnotation=function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))},t.generate=function(){if(this.clearAnnotation(),cI&&lI&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]},t.generateMap=function(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=tI.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new tI({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},t.generateString=function(){var e=this;this.css="",this.map=new tI({file:this.outputFile(),ignoreInvalidMapping:!0});var t,r,n=1,o=1,i="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(a,l,c){if(e.css+=a,l&&"end"!==c&&(s.generated.line=n,s.generated.column=o-1,l.source&&l.source.start?(s.source=e.sourcePath(l),s.original.line=l.source.start.line,s.original.column=l.source.start.column-1,e.map.addMapping(s)):(s.source=i,s.original.line=1,s.original.column=0,e.map.addMapping(s))),(t=a.match(/\n/g))?(n+=t.length,r=a.lastIndexOf("\n"),o=a.length-r):o+=a.length,l&&"start"!==c){var d=l.parent||{raws:{}};("decl"!==l.type&&("atrule"!==l.type||l.nodes)||l!==d.last||d.raws.semicolon)&&(l.source&&l.source.end?(s.source=e.sourcePath(l),s.original.line=l.source.end.line,s.original.column=l.source.end.column-1,s.generated.line=n,s.generated.column=o-2,e.map.addMapping(s)):(s.source=i,s.original.line=1,s.original.column=0,s.generated.line=n,s.generated.column=o-1,e.map.addMapping(s)))}})},t.isAnnotation=function(){return!!this.isInline()||(typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))},t.isInline=function(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;var e=this.mapOpts.annotation;return!(typeof e<"u"&&!0!==e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))},t.isMap=function(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0},t.isSourcesContent=function(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})},t.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"},t.path=function(e){if(this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var r=this.opts.to?rI(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=rI(oI(r,this.mapOpts.annotation)));var n=nI(r,e);return this.memoizedPaths.set(e,n),n},t.previous=function(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var r=t.source.input.map;e.previousMaps.includes(r)||e.previousMaps.push(r)}});else{var t=new aI(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps},t.setSourcesContent=function(){var e=this,t={};if(this.root)this.root.walk(function(r){if(r.source){var n=r.source.input.from;if(n&&!t[n]){t[n]=!0;var o=e.usesFileUrls?e.toFileUrl(n):e.toUrl(e.path(n));e.map.setSourceContent(o,r.source.input.css)}}});else if(this.css){var r=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(r,this.css)}},t.sourcePath=function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))},t.toBase64=function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))},t.toFileUrl=function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(sI){var r=sI(e).toString();return this.memoizedFileURLs.set(e,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")},t.toUrl=function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===iI&&(e=e.replace(/\\/g,"/"));var r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r},e}(),uI=dI,hI=function(e){function t(t){var r;return(r=e.call(this,t)||this).type="comment",r}return GC(t,e),t}(AE),pI=hI;hI.default=hI;var gI,fI,mI,vI,bI=gE.isClean,yI=gE.my,wI=OE,xI=pI;
3066function _I(e){return e.map(function(e){return e.nodes&&(e.nodes=_I(e.nodes)),delete e.source,e})}function kI(e){if(e[bI]=!1,e.proxyOf.nodes)for(var t,r=tS(e.proxyOf.nodes);!(t=r()).done;)kI(t.value)}var CI=function(e){function t(){return e.apply(this,arguments)||this}GC(t,e);var r=t.prototype;return r.append=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n,o=tS(t);!(n=o()).done;)for(var i,s=n.value,a=tS(this.normalize(s,this.last));!(i=a()).done;){var l=i.value;this.proxyOf.nodes.push(l)}return this.markDirty(),this},r.cleanRaws=function(t){if(e.prototype.cleanRaws.call(this,t),this.nodes)for(var r,n=tS(this.nodes);!(r=n()).done;)r.value.cleanRaws(t)},r.each=function(e){if(this.proxyOf.nodes){for(var t,r,n=this.getIterator();this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],!1!==(r=e(this.proxyOf.nodes[t],t)));)this.indexes[n]+=1;return delete this.indexes[n],r}},r.every=function(e){return this.nodes.every(e)},r.getIterator=function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e},r.getProxyProcessor=function(){return{get:function(e,t){return"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];var i;return(i=e)[t].apply(i,[].concat(n.map(function(e){return"function"==typeof e?function(t,r){return e(t.toProxy(),r)}:e})))}:"every"===t||"some"===t?function(r){return e[t](function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return r.apply(void 0,[].concat([e.toProxy()],n))})}:"root"===t?function(){return e.root().toProxy()}:"nodes"===t?e.nodes.map(function(e){return e.toProxy()}):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]},set:function(e,t,r){return e[t]===r||(e[t]=r,("name"===t||"params"===t||"selector"===t)&&e.markDirty()),!0}}},r.index=function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))},r.insertAfter=function(e,t){var r,n=this.index(e),o=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(var i,s=tS(o);!(i=s()).done;){var a=i.value;this.proxyOf.nodes.splice(n+1,0,a)}for(var l in this.indexes)n<(r=this.indexes[l])&&(this.indexes[l]=r+o.length);return this.markDirty(),this},r.insertBefore=function(e,t){var r,n=this.index(e),o=0===n&&"prepend",i=this.normalize(t,this.proxyOf.nodes[n],o).reverse();n=this.index(e);for(var s,a=tS(i);!(s=a()).done;){var l=s.value;this.proxyOf.nodes.splice(n,0,l)}for(var c in this.indexes)n<=(r=this.indexes[c])&&(this.indexes[c]=r+i.length);return this.markDirty(),this},r.normalize=function(e,r){var n=this;if("string"==typeof e)e=_I(gI(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e))for(var o,i=tS(e=e.slice(0));!(o=i()).done;){var s=o.value;s.parent&&s.parent.removeChild(s,"ignore")}else if("root"===e.type&&"document"!==this.type)for(var a,l=tS(e=e.nodes.slice(0));!(a=l()).done;){var c=a.value;c.parent&&c.parent.removeChild(c,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new wI(e)]}else if(e.selector)e=[new fI(e)];else if(e.name)e=[new mI(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new xI(e)]}var d=e.map(function(e){return e[yI]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[bI]&&kI(e),typeof e.raws.before>"u"&&r&&typeof r.raws.before<"u"&&(e.raws.before=r.raws.before.replace(/\S/g,"")),e.parent=n.proxyOf,e});return d},r.prepend=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n,o=tS(t=t.reverse());!(n=o()).done;){for(var i,s=n.value,a=this.normalize(s,this.first,"prepend").reverse(),l=tS(a);!(i=l()).done;){var c=i.value;this.proxyOf.nodes.unshift(c)}for(var d in this.indexes)this.indexes[d]=this.indexes[d]+a.length}return this.markDirty(),this},r.push=function(e){return e.parent=this,this.proxyOf.nodes.push(e),this},r.removeAll=function(){for(var e,t=tS(this.proxyOf.nodes);!(e=t()).done;)e.value.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this},r.removeChild=function(e){var t;for(var r in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[r])>=e&&(this.indexes[r]=t-1);return this.markDirty(),this},r.replaceValues=function(e,t,r){return r||(r=t,t={}),this.walkDecls(function(n){t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this}
3066,r.some=function(e){return this.nodes.some(e)},r.walk=function(e){return this.each(function(t,r){var n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n})},r.walkAtRules=function(e,t){return t?ZC(e,RegExp)?this.walk(function(r,n){if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk(function(r,n){if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk(function(e,r){if("atrule"===e.type)return t(e,r)}))},r.walkComments=function(e){return this.walk(function(t,r){if("comment"===t.type)return e(t,r)})},r.walkDecls=function(e,t){return t?ZC(e,RegExp)?this.walk(function(r,n){if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk(function(r,n){if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk(function(e,r){if("decl"===e.type)return t(e,r)}))},r.walkRules=function(e,t){return t?ZC(e,RegExp)?this.walk(function(r,n){if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk(function(r,n){if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk(function(e,r){if("rule"===e.type)return t(e,r)}))},WC(t,[{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),t}(AE);CI.registerParse=function(e){gI=e},CI.registerRule=function(e){fI=e},CI.registerAtRule=function(e){mI=e},CI.registerRoot=function(e){vI=e};var SI=CI;CI.default=CI,CI.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,mI.prototype):"rule"===e.type?Object.setPrototypeOf(e,fI.prototype):"decl"===e.type?Object.setPrototypeOf(e,wI.prototype):"comment"===e.type?Object.setPrototypeOf(e,xI.prototype):"root"===e.type&&Object.setPrototypeOf(e,vI.prototype),e[yI]=!0,e.nodes&&e.nodes.forEach(function(e){CI.rebuild(e)})};var EI,II,AI=function(e){function t(t){var r;return(r=e.call(this,KC({type:"document"},t))||this).nodes||(r.nodes=[]),r}return GC(t,e),t.prototype.toResult=function(e){return void 0===e&&(e={}),new EI(new II,this,e).stringify()},t}(SI);AI.registerLazyResult=function(e){EI=e},AI.registerProcessor=function(e){II=e};var TI=AI;AI.default=AI;var OI=function(){function e(e,t){if(void 0===t&&(t={}),this.type="warning",this.text=e,t.node&&t.node.source){var r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var n in t)this[n]=t[n]}return e.prototype.toString=function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},e}(),LI=OI;OI.default=OI;var $I=LI,NI=function(){function e(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}var t=e.prototype;return t.toString=function(){return this.css},t.warn=function(e,t){void 0===t&&(t={}),t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);var r=new $I(e,t);return this.messages.push(r),r},t.warnings=function(){return this.messages.filter(function(e){return"warning"===e.type})},WC(e,[{key:"content",get:function(){return this.css}}]),e}(),RI=NI;NI.default=NI;var PI=/[\t\n\f\r "#'()/;[\\\]{}]/g,DI=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,MI=/.[\r\n"'(/\\]/,zI=/[\da-f]/i,FI=SI,UI=function(e){function t(t){var r;return(r=e.call(this,t)||this).type="atrule",r}GC(t,e);var r=t.prototype;return r.append=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o;return this.proxyOf.nodes||(this.nodes=[]),(o=e.prototype.append).call.apply(o,[].concat([this],r))},r.prepend=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o;return this.proxyOf.nodes||(this.nodes=[]),(o=e.prototype.prepend).call.apply(o,[].concat([this],r))},t}(FI),BI=UI;UI.default=UI,FI.registerAtRule(UI);var HI,jI,VI=SI,WI=function(e){function t(t){var r;return(r=e.call(this,t)||this).type="root",r.nodes||(r.nodes=[]),r}GC(t,e);var r=t.prototype;return r.normalize=function(t,r,n){var o=e.prototype.normalize.call(this,t);if(r)if("prepend"===n)this.nodes.length>1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r)for(var i,s=tS(o);!(i=s()).done;)i.value.raws.before=r.raws.before;return o},r.removeChild=function(t,r){var n=this.index(t);return!r&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),e.prototype.removeChild.call(this,t)},r.toResult=function(e){return void 0===e&&(e={}),new HI(new jI,this,e).stringify()},t}(VI);WI.registerLazyResult=function(e){HI=e},WI.registerProcessor=function(e){jI=e};var KI=WI;WI.default=WI,VI.registerRoot(WI);var qI={comma:function(e){return qI.split(e,[","],!0)},space:function(e){return qI.split(e,[" ","\n","\t"])},split:function(e,t,r){for(var n,o=[],i="",s=!1,a=0,l=!1,c="",d=!1,u=tS(e);!(n=u()).done;){var h=n.value;d?d=!1:"\\"===h?d=!0:l?h===c&&(l=!1):'"'===h||"'"===h?(l=!0,c=h):"("===h?a+=1:")"===h?a>
30660&&(a-=1):0===a&&t.includes(h)&&(s=!0),s?(""!==i&&o.push(i.trim()),i="",s=!1):i+=h}return(r||""!==i)&&o.push(i.trim()),o}},GI=qI;qI.default=qI;var ZI=SI,YI=GI,JI=function(e){function t(t){var r;return(r=e.call(this,t)||this).type="rule",r.nodes||(r.nodes=[]),r}return GC(t,e),WC(t,[{key:"selectors",get:function(){return YI.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}]),t}(ZI),QI=JI;JI.default=JI,ZI.registerRule(JI);var XI=OE,eA=pI,tA=BI,rA=KI,nA=QI,oA={empty:!0,space:!0},iA=function(){function e(e){this.input=e,this.root=new rA,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}var t=e.prototype;return t.atrule=function(e){var t=new tA;t.name=e[1].slice(1),""===t.name&&this.unnamedAtrule(t,e),this.init(t,e[2]);for(var r,n,o,i=!1,s=!1,a=[],l=[];!this.tokenizer.endOfFile();){if("("===(r=(e=this.tokenizer.nextToken())[0])||"["===r?l.push("("===r?")":"]"):"{"===r&&l.length>0?l.push("}"):r===l[l.length-1]&&l.pop(),0===l.length){if(";"===r){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}if("{"===r){s=!0;break}if("}"===r){if(a.length>0){for(n=a[o=a.length-1];n&&"space"===n[0];)n=a[--o];n&&(t.source.end=this.getPosition(n[3]||n[2]),t.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),i&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),s&&(t.nodes=[],this.current=t)},t.checkMissedSemicolon=function(e){var t=this.colon(e);if(!1!==t){for(var r,n=0,o=t-1;o>=0&&("space"===(r=e[o])[0]||2!==(n+=1));o--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}},t.colon=function(e){for(var t,r,n,o,i=0,s=tS(e.entries());!(o=s()).done;){var a=o.value,l=a[0];if("("===(r=(t=a[1])[0])&&(i+=1),")"===r&&(i-=1),0===i&&":"===r){if(n){if("word"===n[0]&&"progid"===n[1])continue;return l}this.doubleColon(t)}n=t}return!1},t.comment=function(e){var t=new eA;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{var n=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=n[2],t.raws.left=n[1],t.raws.right=n[3]}},t.createTokenizer=function(){this.tokenizer=function(e,t){void 0===t&&(t={});var r,n,o,i,s,a,l,c,d,u,h=e.css.valueOf(),p=t.ignoreErrors,g=h.length,f=0,m=[],v=[];function b(t){throw e.error("Unclosed "+t,f)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&f>=g},nextToken:function(e){if(v.length)return v.pop();if(!(f>=g)){var t=!!e&&e.ignoreUnclosed;switch(r=h.charCodeAt(f)){case 10:case 32:case 9:case 13:case 12:n=f;do{n+=1,r=h.charCodeAt(n)}while(32===r||10===r||9===r||13===r||12===r);u=["space",h.slice(f,n)],f=n-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:var y=String.fromCharCode(r);u=[y,y,f];break;case 40:if(c=m.length?m.pop()[1]:"",d=h.charCodeAt(f+1),"url"===c&&39!==d&&34!==d&&32!==d&&10!==d&&9!==d&&12!==d&&13!==d){n=f;do{if(a=!1,-1===(n=h.indexOf(")",n+1))){if(p||t){n=f;break}b("bracket")}for(l=n;
306692===h.charCodeAt(l-1);)l-=1,a=!a}while(a);u=["brackets",h.slice(f,n+1),f,n],f=n}else n=h.indexOf(")",f+1),i=h.slice(f,n+1),-1===n||MI.test(i)?u=["(","(",f]:(u=["brackets",i,f,n],f=n);break;case 39:case 34:o=39===r?"'":'"',n=f;do{if(a=!1,-1===(n=h.indexOf(o,n+1))){if(p||t){n=f+1;break}b("string")}for(l=n;92===h.charCodeAt(l-1);)l-=1,a=!a}while(a);u=["string",h.slice(f,n+1),f,n],f=n;break;case 64:PI.lastIndex=f+1,PI.test(h),n=0===PI.lastIndex?h.length-1:PI.lastIndex-2,u=["at-word",h.slice(f,n+1),f,n],f=n;break;case 92:for(n=f,s=!0;92===h.charCodeAt(n+1);)n+=1,s=!s;if(r=h.charCodeAt(n+1),s&&47!==r&&32!==r&&10!==r&&9!==r&&13!==r&&12!==r&&(n+=1,zI.test(h.charAt(n)))){for(;zI.test(h.charAt(n+1));)n+=1;32===h.charCodeAt(n+1)&&(n+=1)}u=["word",h.slice(f,n+1),f,n],f=n;break;default:47===r&&42===h.charCodeAt(f+1)?(0===(n=h.indexOf("*/",f+2)+1)&&(p||t?n=h.length:b("comment")),u=["comment",h.slice(f,n+1),f,n],f=n):(DI.lastIndex=f+1,DI.test(h),n=0===DI.lastIndex?h.length-1:DI.lastIndex-2,u=["word",h.slice(f,n+1),f,n],m.push(u),f=n)}return f++,u}},position:function(){return f}}}(this.input)},t.decl=function(e,t){var r=new XI;this.init(r,e[0][2]);var n,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(o[3]||o[2]||function(e){for(var t=e.length-1;t>=0;t--){var r=e[t],n=r[3]||r[2];if(n)return n}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){var i=e[0][0];if(":"===i||"space"===i||"comment"===i)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(":"===(n=e.shift())[0]){r.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1]}("_"===r.prop[0]||"*"===r.prop[0])&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));for(var s,a=[];e.length&&("space"===(s=e[0][0])||"comment"===s);)a.push(e.shift());this.precheckMissedSemicolon(e);for(var l=e.length-1;l>=0;l--){if("!important"===(n=e[l])[1].toLowerCase()){r.important=!0;var c=this.stringFrom(e,l);" !important"!==(c=this.spacesFromEnd(e)+c)&&(r.raws.important=c);break}if("important"===n[1].toLowerCase()){for(var d=e.slice(0),u="",h=l;h>0;h--){var p=d[h][0];if(0===u.trim().indexOf("!")&&"space"!==p)break;u=d.pop()[1]+u}0===u.trim().indexOf("!")&&(r.important=!0,r.raws.important=u,e=d)}if("space"!==n[0]&&"comment"!==n[0])break}var g=e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]});g&&(r.raws.between+=a.map(function(e){return e[1]}).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)},t.doubleColon=function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})},t.emptyRule=function(e){var t=new nA;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t},t.end=function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)},t.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())},t.freeSemicolon=function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}},t.getPosition=function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}},t.init=function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)},t.other=function(e){for(var t=!1,r=null,n=!1,o=null,i=[],s=e[1].startsWith("--"),a=[],l=e;l;){if(r=l[0],a.push(l),"("===r||"["===r)o||(o=l),i.push("("===r?")":"]");else if(s&&n&&"{"===r)o||(o=l),i.push("}");else if(0===i.length){if(";"===r){if(n)return void this.decl(a,s);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(o=null));l=this.tokenizer.nextToken()}
3066if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(o),t&&n){if(!s)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)},t.parse=function(){for(var e;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()},t.precheckMissedSemicolon=function(){},t.raw=function(e,t,r,n){for(var o,i,s,a,l=r.length,c="",d=!0,u=0;u<l;u+=1)"space"!==(i=(o=r[u])[0])||u!==l-1||n?"comment"===i?(a=r[u-1]?r[u-1][0]:"empty",s=r[u+1]?r[u+1][0]:"empty",oA[a]||oA[s]||","===c.slice(-1)?d=!1:c+=o[1]):c+=o[1]:d=!1;if(!d){var h=r.reduce(function(e,t){return e+t[1]},"");e.raws[t]={raw:h,value:c}}e[t]=c},t.rule=function(e){e.pop();var t=new nA;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t},t.spacesAndCommentsFromEnd=function(e){for(var t,r="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r},t.spacesAndCommentsFromStart=function(e){for(var t,r="";e.length&&("space"===(t=e[0][0])||"comment"===t);)r+=e.shift()[1];return r},t.spacesFromEnd=function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t},t.stringFrom=function(e,t){for(var r="",n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r},t.unclosedBlock=function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)},t.unclosedBracket=function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})},t.unexpectedClose=function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})},t.unknownWord=function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})},t.unnamedAtrule=function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})},e}(),sA=SI,aA=iA,lA=XE;function cA(e,t){var r=new lA(e,t),n=new aA(r);try{n.parse()}catch(e){throw e}return n.root}var dA=cA;cA.default=cA,sA.registerParse(cA);var uA=gE.isClean,hA=gE.my,pA=uI,gA=wE,fA=SI,mA=TI,vA=RI,bA=dA,yA=KI,wA={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},xA={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},_A={Once:!0,postcssPlugin:!0,prepare:!0};function kA(e){return"object"===(typeof e>"u"?"undefined":QC(e))&&"function"==typeof e.then}function CA(e){var t=!1,r=wA[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function SA(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:CA(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function EA(e){return e[uA]=!1,e.nodes&&e.nodes.forEach(function(e){return EA(e)}),e}var IA={},AA=function(){function e(t,r,n){var o,i=this;if(this.stringified=!1,this.processed=!1,"object"!==(typeof r>"u"?"undefined":QC(r))||null===r||"root"!==r.type&&"document"!==r.type)if(ZC(r,e)||ZC(r,vA))o=EA(r.root),r.map&&(typeof n.map>"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{var s=bA;n.syntax&&(s=n.syntax.parse),n.parser&&(s=n.parser),s.parse&&(s=s.parse);try{o=s(r,n)}catch(e){this.processed=!0,this.error=e}o&&!o[hA]&&fA.rebuild(o)}else o=EA(r);this.result=new vA(t,o,n),this.helpers=KC({},IA,{postcss:IA,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===(typeof e>"u"?"undefined":QC(e))&&e.prepare?KC({},e,e.prepare(i.result)):e})}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)},t.catch=function(e){return this.async().catch(e)},t.finally=function(e){return this.async().then(e,e)},t.getAsyncError=function(){throw new Error("Use process(css).then(cb) to work with async plugins")},t.handleError=function(e,t){var r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e},t.prepareVisitors=function(){var e=this;this.listeners={};for(var t,r=function(t,r,n){e.listeners[r]||(e.listeners[r]=[]),e.listeners[r].push([t,n])},n=tS(this.plugins);!(t=n()).done;){var o=t.value;if("object"===(typeof o>"u"?"undefined":QC(o)))for(var i in o){if(!xA[i]&&/^[A-Z]/.test(i))throw new Error("Unknown event "+i+" in "+o.postcssPlugin+". Try to update PostCSS ("+this.processor.ver
3066sion+" now).");if(!_A[i])if("object"===QC(o[i]))for(var s in o[i])r(o,"*"===s?i:i+"-"+s.toLowerCase(),o[i][s]);else"function"==typeof o[i]&&r(o,i,o[i])}}this.hasListener=Object.keys(this.listeners).length>0},t.runAsync=function(){var e=this;return jC(function(){var t,r,n,o,i,s,a,l,c,d,u,h;return rS(this,function(p){switch(p.label){case 0:e.plugin=0,t=0,p.label=1;case 1:if(!(t<e.plugins.length))return[3,6];if(r=e.plugins[t],!kA(n=e.runOnRoot(r)))return[3,5];p.label=2;case 2:return p.trys.push([2,4,,5]),[4,n];case 3:return p.sent(),[3,5];case 4:throw o=p.sent(),e.handleError(o);case 5:return t++,[3,1];case 6:if(e.prepareVisitors(),!e.hasListener)return[3,18];i=e.result.root,p.label=7;case 7:if(i[uA])return[3,14];i[uA]=!0,s=[SA(i)],p.label=8;case 8:if(!(s.length>0))return[3,13];if(!kA(a=e.visitTick(s)))return[3,12];p.label=9;case 9:return p.trys.push([9,11,,12]),[4,a];case 10:return p.sent(),[3,12];case 11:throw l=p.sent(),c=s[s.length-1].node,e.handleError(l,c);case 12:return[3,8];case 13:return[3,7];case 14:if(!e.listeners.OnceExit)return[3,18];d=function(){var t,r,n,o,s;return rS(this,function(a){switch(a.label){case 0:t=h.value,r=t[0],n=t[1],e.result.lastPlugin=r,a.label=1;case 1:return a.trys.push([1,6,,7]),"document"!==i.type?[3,3]:(o=i.nodes.map(function(t){return n(t,e.helpers)}),[4,Promise.all(o)]);case 2:return a.sent(),[3,5];case 3:return[4,n(i,e.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw s=a.sent(),e.handleError(s);case 7:return[2]}})},u=tS(e.listeners.OnceExit),p.label=15;case 15:return(h=u()).done?[3,18]:[5,nS(d())];case 16:p.sent(),p.label=17;case 17:return[3,15];case 18:return e.processed=!0,[2,e.stringify()]}})})()},t.runOnRoot=function(e){var t=this;this.result.lastPlugin=e;try{if("object"===(typeof e>"u"?"undefined":QC(e))&&e.Once){if("document"===this.result.root.type){var r=this.result.root.nodes.map(function(r){return e.Once(r,t.helpers)});return kA(r[0])?Promise.all(r):r}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}},t.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=gA;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var r=new pA(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result},t.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var e,t=tS(this.plugins);!(e=t()).done;){var r=e.value;if(kA(this.runOnRoot(r)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var n=this.result.root;!n[uA];)n[uA]=!0,this.walkSync(n);if(this.listeners.OnceExit)if("document"===n.type)for(var o,i=tS(n.nodes);!(o=i()).done;){var s=o.value;this.visitSync(this.listeners.OnceExit,s)}else this.visitSync(this.listeners.OnceExit,n)}return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this.css},t.visitSync=function(e,t){for(var r,n=tS(e);!(r=n()).done;){var o=r.value,i=o[0],s=o[1];this.result.lastPlugin=i;var a=void 0;try{a=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(kA(a))throw this.getAsyncError()}},t.visitTick=function(e){var t=e[e.length-1],r=t.node,n=t.visitors;if("root"===r.type||"document"===r.type||r.parent){if(n.length>0&&t.visitorIndex<n.length){var o=n[t.visitorIndex],i=o[0],s=o[1];t.visitorIndex+=1,t.visitorIndex===n.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=i;try{return s(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){for(var a,l=t.iterator;a=r.nodes[r.indexes[l]];)if(r.indexes[l]+=1,!a[uA])return a[uA]=!0,void e.push(SA(a));t.iterator=0,delete r.indexes[l]}for(var c=t.events;t.eventIndex<c.length;){var d=c[t.eventIndex];if(t.eventIndex+=1,0===d)return void(r.nodes&&r.nodes.length&&(r[uA]=!0,t.iterator=r.getIterator()));if(this.listeners[d])return void(t.visitors=this.listeners[d])}e.pop()}else e.pop()},t.walkSync=function(e){var t=this;e[uA]=!0;for(var r,n=tS(CA(e));!(r=n()).done;){var o=r.value;if(0===o)e.nodes&&e.each(function(e){e[uA]||t.walkSync(e)});else{var i=this.listeners[o];if(i&&this.visitSync(i,e.toProxy()))return}}},t.warnings=function(){return this.sync().warnings()}
3066,WC(e,[{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}]),e}();AA.registerPostcss=function(e){IA=e};var TA=AA;AA.default=AA,yA.registerLazyResult(AA),mA.registerLazyResult(AA);var OA=uI,LA=wE,$A=dA,NA=RI,RA=function(){function e(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;var n,o=LA;this.result=new NA(this._processor,n,this._opts),this.result.css=t;var i=this;Object.defineProperty(this.result,"root",{get:function(){return i.root}});var s=new OA(o,n,this._opts,t);if(s.isMap()){var a=s.generate(),l=a[0],c=a[1];l&&(this.result.css=l),c&&(this.result.map=c)}else s.clearAnnotation(),this.result.css=s.css}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)},t.catch=function(e){return this.async().catch(e)},t.finally=function(e){return this.async().then(e,e)},t.sync=function(){if(this.error)throw this.error;return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this._css},t.warnings=function(){return[]},WC(e,[{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=$A;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),e}(),PA=RA;RA.default=RA;var DA=PA,MA=TA,zA=TI,FA=KI,UA=function(){function e(e){void 0===e&&(e=[]),this.version="8.4.38",this.plugins=this.normalize(e)}var t=e.prototype;return t.normalize=function(e){for(var t,r=[],n=tS(e);!(t=n()).done;){var o=t.value;if(!0===o.postcss?o=o():o.postcss&&(o=o.postcss),"object"===(typeof o>"u"?"undefined":QC(o))&&Array.isArray(o.plugins))r=r.concat(o.plugins);else if("object"===(typeof o>"u"?"undefined":QC(o))&&o.postcssPlugin)r.push(o);else if("function"==typeof o)r.push(o);else if("object"!==(typeof o>
3066"u"?"undefined":QC(o))||!o.parse&&!o.stringify)throw new Error(o+" is not a PostCSS plugin")}return r},t.process=function(e,t){return void 0===t&&(t={}),this.plugins.length||t.parser||t.stringifier||t.syntax?new MA(this,e,t):new DA(this,e,t)},t.use=function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this},e}(),BA=UA;UA.default=UA,FA.registerProcessor(UA),zA.registerProcessor(UA);var HA=OE,jA=zE,VA=pI,WA=BI,KA=XE,qA=KI,GA=QI;function ZA(e,t){if(Array.isArray(e))return e.map(function(e){return ZA(e)});var r=e.inputs,n=YC(e,["inputs"]);if(r){t=[];for(var o,i=tS(r);!(o=i()).done;){var s=KC({},o.value,{__proto__:KA.prototype});s.map&&(s.map=KC({},s.map,{__proto__:jA.prototype})),t.push(s)}}if(n.nodes&&(n.nodes=e.nodes.map(function(e){return ZA(e,t)})),n.source){var a=n.source,l=a.inputId,c=YC(a,["inputId"]);n.source=c,null!=l&&(n.source.input=t[l])}if("root"===n.type)return new qA(n);if("decl"===n.type)return new HA(n);if("rule"===n.type)return new GA(n);if("comment"===n.type)return new VA(n);if("atrule"===n.type)return new WA(n);throw new Error("Unknown node type: "+e.type)}var YA=ZA;ZA.default=ZA;var JA=pE,QA=OE,XA=TA,eT=SI,tT=BA,rT=wE,nT=YA,oT=TI,iT=LI,sT=pI,aT=BI,lT=RI,cT=XE,dT=dA,uT=GI,hT=QI,pT=KI,gT=AE;function fT(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new tT(t)}fT.plugin=function(e,t){var r,n=!1;function o(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var s=t.apply(void 0,[].concat(o));return s.postcssPlugin=e,s.postcssVersion=(new tT).version,s}return Object.defineProperty(o,"postcss",{get:function(){return r||(r=o()),r}}),o.process=function(e,t,r){return fT([o(r)]).process(e,t)},o},fT.stringify=rT,fT.parse=dT,fT.fromJSON=nT,fT.list=uT,fT.comment=function(e){return new sT(e)},fT.atRule=function(e){return new aT(e)},fT.decl=function(e){return new QA(e)},fT.rule=function(e){return new hT(e)},fT.root=function(e){return new pT(e)},fT.document=function(e){return new oT(e)},fT.CssSyntaxError=JA,fT.Declaration=QA,fT.Container=eT,fT.Processor=tT,fT.Document=oT,fT.Comment=sT,fT.Warning=iT,fT.AtRule=aT,fT.Result=lT,fT.Input=cT,fT.Rule=hT,fT.Root=pT,fT.Node=gT,XA.registerPostcss(fT);var mT=fT;fT.default=fT;var vT=nE(mT);vT.stringify,vT.fromJSON,vT.plugin,vT.parse,vT.list,vT.document,vT.comment,vT.atRule,vT.rule,vT.decl,vT.root,vT.CssSyntaxError,vT.Declaration,vT.Container,vT.Processor,vT.Document,vT.Comment,vT.Warning,vT.AtRule,vT.Result,vT.Input,vT.Rule,vT.Root,vT.Node;var bT=Object.defineProperty,yT=function(e,t,r){return function(e,t,r){return t in e?bT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r}(e,"symbol"!==(typeof t>"u"?"undefined":QC(t))?t+"":t,r)};function wT(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function xT(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return ZC(this,e)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var _T={exports:{}},kT=String,CT=function(){return{isColorSupported:!1,reset:kT,bold:kT,dim:kT,italic:kT,underline:kT,inverse:kT,hidden:kT,strikethrough:kT,black:kT,red:kT,green:kT,yellow:kT,blue:kT,magenta:kT,cyan:kT,white:kT,gray:kT,bgBlack:kT,bgRed:kT,bgGreen:kT,bgYellow:kT,bgBlue:kT,bgMagenta:kT,bgCyan:kT,bgWhite:kT}};_T.exports=CT(),_T.exports.createColors=CT;var ST=_T.exports,ET=xT(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),IT=ST,AT=ET,TT=function(e){function t(r,n,o,i,s,a){var l;return(l=e.call(this,r)||this).name="CssSyntaxError",l.reason=r,s&&(l.file=s),i&&(l.source=i),a&&(l.plugin=a),typeof n<"u"&&typeof o<"u"&&("number"==typeof n?(l.line=n,l.column=o):(l.line=n.line,l.column=n.column,l.endLine=o.line,l.endColumn=o.column)),l.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(l,t),l}GC(t,e);var r=t.prototype;return r.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},r.showSourceCode=function(e){var t=this;if(!this.source)return"";var r=this.source;null==e&&(e=IT.isColorSupported),AT&&e&&(r=AT(r));var n,o,i=r.split(/\r?\n/),s=Math.max(this.line-3,0),a=Math.min(this.line+2,i.length),l=String(a).length;if(e){var c=IT.createColors(!0),d=c.bold,u=c.gray,h=c.red;n=function(e){return d(h(e))},o=function(e){return u(e)}}else n=o=function(e){return e};return i.slice(s,a).map(function(e,r){var i=s+1+r,a=" "+(" "+i).slice(-l)+" | ";if(i===t.line){var c=o(a.replace(/\d/g," "))+e.slice(0,t.column-1).replace(/[^\t]/g," ");return n(">")+o(a)+e+"\n "+c+n("^")}return" "+o(a)+e}).join("\n")},r.toString=function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e},t}(XC(Error)),OT=TT;TT.default=TT;var LT={};LT.isClean=Symbol("isClean"),LT.my=Symbol("my");var $T={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1},NT=function(){function e(e){this.builder=e}var t=e.prototype;
3066return t.atrule=function(e,t){var r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{var o=(e.raws.between||"")+(t?";":"");this.builder(r+n+o,e)}},t.beforeAfter=function(e,t){var r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var n=e.parent,o=0;n&&"root"!==n.type;)o+=1,n=n.parent;if(r.includes("\n")){var i=this.raw(e,null,"indent");if(i.length)for(var s=0;s<o;s++)r+=i}return r},t.block=function(e,t){var r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")},t.body=function(e){for(var t=e.nodes.length-1;t>0&&"comment"===e.nodes[t].type;)t-=1;for(var r=this.raw(e,"semicolon"),n=0;n<e.nodes.length;n++){var o=e.nodes[n],i=this.raw(o,"before");i&&this.builder(i),this.stringify(o,t!==n||r)}},t.comment=function(e){var t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)},t.decl=function(e,t){var r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)},t.document=function(e){this.body(e)},t.raw=function(e,t,r){var n;if(r||(r=t),t&&typeof(n=e.raws[t])<"u")return n;var o=e.parent;if("before"===r&&(!o||"root"===o.type&&o.first===e||o&&"document"===o.type))return"";if(!o)return $T[r];var i=e.root();if(i.rawCache||(i.rawCache={}),typeof i.rawCache[r]<"u")return i.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);var s="raw"+function(e){return e[0].toUpperCase()+e.slice(1)}(r);return this[s]?n=this[s](i,e):i.walk(function(e){if(typeof(n=e.raws[t])<"u")return!1}),typeof n>"u"&&(n=$T[r]),i.rawCache[r]=n,n},t.rawBeforeClose=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length>0&&typeof e.raws.after<"u")return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawBeforeComment=function(e,t){var r;return e.walkComments(function(e){if(typeof e.raws.before<"u")return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r},t.rawBeforeDecl=function(e,t){var r;return e.walkDecls(function(e){if(typeof e.raws.before<"u")return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r},t.rawBeforeOpen=function(e){var t;return e.walk(function(e){if("decl"!==e.type&&typeof(t=e.raws.between)<"u")return!1}),t},t.rawBeforeRule=function(e){var t;return e.walk(function(r){if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return(t=r.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawColon=function(e){var t;return e.walkDecls(function(e){if(typeof e.raws.between<"u")return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t},t.rawEmptyBody=function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&typeof(t=e.raws.after)<"u")return!1}),t},t.rawIndent=function(e){return e.raws.indent?e.raws.indent:(e.walk(function(r){var n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof r.raws.before<"u"){var o=r.raws.before.split("\n");return t=(t=o[o.length-1]).replace(/\S/g,""),!1}}),t);var t},t.rawSemicolon=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&typeof(t=e.raws.semicolon)<"u")return!1}),t},t.rawValue=function(e,t){var r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r},t.root=function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)},t.rule=function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")},t.stringify=function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)},e}(),RT=NT;NT.default=NT;var PT=RT;function DT(e,t){new PT(t).stringify(e)}var MT=DT;DT.default=DT;var zT=LT.isClean,FT=LT.my,UT=OT,BT=RT,HT=MT;function jT(e,t){var r=new e.constructor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&"proxyCache"!==n){var o=e[n],i=typeof o>"u"?"undefined":QC(o);"parent"===n&&"object"===i?t&&(r[n]=t):"source"===n?r[n]=o:Array.isArray(o)?r[n]=o.map(function(e){return jT(e,r)}):("object"===i&&null!==o&&(o=jT(o)),r[n]=o)}return r}var VT=function(){function e(e){for(var t in void 0===e&&(e={}),this.raws={},this[zT]=!1,this[FT]=!0,e)if("nodes"===t){this.nodes=[];for(var r,n=tS(e[t]);!(r=n()).done;){var o=r.value;"function"==typeof o.clone?this.append(o.clone()):this.append(o)}}else this[t]=e[t]}var t=e.prototype;return t.addToError=function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&"+t.input.from+":"+t.start.line+":"+t.start.column+"$&")}return e},t.after=function(e){return this.parent.insertAfter(this,e),this},t.assign=function(e){for(var t in void 0===e&&(e={}),e)this[t]=e[t];return this},t.before=function(e){return this.parent.insertBefore(this,e),this},t.cleanRaws=function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between},t.clone=function(e){void 0===e&&(e={});var t=jT(this);for(var r in e)t[r]=e[r];return t},t.cloneAfter=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t},t.cloneBefore=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t},t.error=function(e,t){if(void 0===t&&(t={}),this.source){var r=this.rangeBy(t),n=r.end,o=r.start;return this.source.input.error(e,{column:o.column,line:o.line},{column:n.column,line:n.line},t)}return new UT(e)},t.getProxyProcessor=function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,r){return e[t]===r||(e[t]=r,("prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty()),!0}}},t.markDirty=function(){if(this[zT]){this[zT]=!1;for(var e=this;e=e.parent;)e[zT]=!1}},t.next=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}},t.positionBy=function(e,t){var r=this.source.start;if(e.index)r=this.positionInside(e.index,t);
3066else if(e.word){var n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r},t.positionInside=function(e,t){for(var r=t||this.toString(),n=this.source.start.column,o=this.source.start.line,i=0;i<e;i++)"\n"===r[i]?(n=1,o+=1):n+=1;return{column:n,line:o}},t.prev=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e-1]}},t.rangeBy=function(e){var t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){var n=this.toString(),o=n.indexOf(e.word);-1!==o&&(t=this.positionInside(o,n),r=this.positionInside(o+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}},t.raw=function(e,t){return(new BT).raw(this,e,t)},t.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.replaceWith=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(this.parent){for(var n,o=this,i=!1,s=tS(t);!(n=s()).done;){var a=n.value;a===this?i=!0:i?(this.parent.insertAfter(o,a),o=a):this.parent.insertBefore(o,a)}i||this.remove()}return this},t.root=function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e},t.toJSON=function(e,t){var r={},n=null==t;t=t||new Map;var o=0;for(var i in this)if(Object.prototype.hasOwnProperty.call(this,i)&&"parent"!==i&&"proxyCache"!==i){var s=this[i];if(Array.isArray(s))r[i]=s.map(function(e){return"object"===(typeof e>"u"?"undefined":QC(e))&&e.toJSON?e.toJSON(null,t):e});else if("object"===(typeof s>"u"?"undefined":QC(s))&&s.toJSON)r[i]=s.toJSON(null,t);else if("source"===i){var a=t.get(s.input);null==a&&(a=o,t.set(s.input,o),o++),r[i]={end:s.end,inputId:a,start:s.start}}else r[i]=s}return n&&(r.inputs=[].concat(t.keys()).map(function(e){return e.toJSON()})),r},t.toProxy=function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache},t.toString=function(e){void 0===e&&(e=HT),e.stringify&&(e=e.stringify);var t="";return e(this,function(e){t+=e}),t},t.warn=function(e,t,r){var n={node:this};for(var o in r)n[o]=r[o];return e.warn(t,n)},WC(e,[{key:"proxyOf",get:function(){return this}}]),e}(),WT=VT;VT.default=VT;var KT=function(e){function t(t){var r;return t&&typeof t.value<"u"&&"string"!=typeof t.value&&(t=KC({},t,{value:String(t.value)})),(r=e.call(this,t)||this).type="decl",r}return GC(t,e),WC(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),t}(WT),qT=KT;KT.default=KT;var GT=ET.SourceMapConsumer,ZT=ET.SourceMapGenerator,YT=ET.existsSync,JT=ET.readFileSync,QT=ET.dirname,XT=ET.join,eO=function(){function e(e,t){if(!1!==t.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=QT(this.mapFile)),n&&(this.text=n)}}var t=e.prototype;return t.consumer=function(){return this.consumerCache||(this.consumerCache=new GT(this.text)),this.consumerCache},t.decodeInline=function(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return function(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}(e.substr(RegExp.lastMatch.length));var t=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+t)},t.getAnnotationURL=function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()},t.isMap=function(e){return"object"===(typeof e>"u"?"undefined":QC(e))&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))},t.loadAnnotation=function(e){var t=e.match(/\/\*\s*# sourceMappingURL=/gm);
3066if(t){var r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}},t.loadFile=function(e){if(this.root=QT(e),YT(e))return this.mapFile=e,JT(e,"utf-8").toString().trim()},t.loadMap=function(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(ZC(t,GT))return ZT.fromSourceMap(t).toString();if(ZC(t,ZT))return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var r=t(e);if(r){var n=this.loadFile(r);if(!n)throw new Error("Unable to load previous source map: "+r.toString());return n}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var o=this.annotation;return e&&(o=XT(QT(e),o)),this.loadFile(o)}}},t.startWith=function(e,t){return!!e&&e.substr(0,t.length)===t},t.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e}(),tO=eO;eO.default=eO;var rO=ET.SourceMapConsumer,nO=ET.SourceMapGenerator,oO=ET.fileURLToPath,iO=ET.pathToFileURL,sO=ET.isAbsolute,aO=ET.resolve,lO=function(e){void 0===e&&(e=21);for(var t="",r=e;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}
3066,cO=ET,dO=OT,uO=tO,hO=Symbol("fromOffsetCache"),pO=!(!rO||!nO),gO=!(!aO||!sO),fO=function(){function e(e,t){if(void 0===t&&(t={}),null===e||typeof e>"u"||"object"===(typeof e>"u"?"undefined":QC(e))&&!e.toString)throw new Error("PostCSS received "+e+" instead of CSS string");if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!gO||/^\w+:\/\//.test(t.from)||sO(t.from)?this.file=t.from:this.file=aO(t.from)),gO&&pO){var r=new uO(this.css,t);if(r.text){this.map=r;var n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+lO(6)+">"),this.map&&(this.map.file=this.from)}var t=e.prototype;return t.error=function(e,t,r,n){var o,i,s;if(void 0===n&&(n={}),t&&"object"===(typeof t>"u"?"undefined":QC(t))){var a=t,l=r;if("number"==typeof a.offset){var c=this.fromOffset(a.offset);t=c.line,r=c.col}else t=a.line,r=a.column;if("number"==typeof l.offset){var d=this.fromOffset(l.offset);i=d.line,s=d.col}else i=l.line,s=l.column}else if(!r){var u=this.fromOffset(t);t=u.line,r=u.col}var h=this.origin(t,r,i,s);return(o=h?new dO(e,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,n.plugin):new dO(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:s,line:i},this.css,this.file,n.plugin)).input={column:r,endColumn:s,endLine:i,line:t,source:this.css},this.file&&(iO&&(o.input.url=iO(this.file).toString()),o.input.file=this.file),o},t.fromOffset=function(e){var t;if(this[hO])t=this[hO];else{var r=this.css.split("\n");t=new Array(r.length);for(var n=0,o=0,i=r.length;o<i;o++)t[o]=n,n+=r[o].length+1;this[hO]=t}var s=0;if(e>=t[t.length-1])s=t.length-1;else for(var a,l=t.length-2;s<l;)if(e<t[a=s+(l-s>>1)])l=a-1;else{if(!(e>=t[a+1])){s=a;break}s=a+1}return{col:e-t[s]+1,line:s+1}},t.mapResolve=function(e){return/^\w+:\/\//.test(e)?e:aO(this.map.consumer().sourceRoot||this.map.root||".",e)},t.origin=function(e,t,r,n){if(!this.map)return!1;var o,i,s=this.map.consumer(),a=s.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(o=s.originalPositionFor({column:n,line:r})),i=sO(a.source)?iO(a.source):new URL(a.source,this.map.consumer().sourceRoot||iO(this.map.mapFile));var l={column:a.column,endColumn:o&&o.column,endLine:o&&o.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!oO)throw new Error("file: protocol is not available in this PostCSS build");l.file=oO(i)}var c=s.sourceContentFor(a.source);return c&&(l.source=c),l},t.toJSON=function(){for(var e={},t=0,r=["hasBOM","css","file","id"];t<r.length;t++){var n=r[t];null!=this[n]&&(e[n]=this[n])}return this.map&&(e.map=KC({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e},WC(e,[{key:"from",get:function(){return this.file||this.id}}]),e}(),mO=fO;fO.default=fO,cO&&cO.registerInput&&cO.registerInput(fO);var vO=ET.SourceMapConsumer,bO=ET.SourceMapGenerator,yO=ET.dirname,wO=ET.relative,xO=ET.resolve,_O=ET.sep,kO=ET.pathToFileURL,CO=mO,SO=!(!vO||!bO),EO=!!(yO&&xO&&wO&&_O),IO=function(){function e(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}var t=e.prototype;return t.addAnnotation=function(){var e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"},t.applyPrevMaps=function(){for(var e,t=tS(this.previous());!(e=t()).done;){var r=e.value,n=this.toUrl(this.path(r.file)),o=r.root||yO(r.file),i=void 0;!1===this.mapOpts.sourcesContent?(i=new vO(r.text)).sourcesContent&&(i.sourcesContent=null):i=r.consumer(),this.map.applySourceMap(i,n,this.toUrl(this.path(o)))}},t.clearAnnotation=function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))},t.generate=function(){if(this.clearAnnotation(),EO&&SO&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]},t.generateMap=function(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=bO.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new bO({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},t.generateString=function(){var e=this;this.css="",this.map=new bO({file:this.outputFile(),ignoreInvalidMapping:!0});var t,r,n=1,o=1,i="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(a,l,c){if(e.css+=a,l&&"end"!==c&&(s.generated.line=n,s.generated.column=o-1,l.source&&l.source.start?(s.source=e.sourcePath(l),s.original.line=l.source.start.line,s.original.column=l.source.start.column-1,e.map.addMapping(s)):(s.source=i,s.original.line=1,s.original.column=0,e.map.addMapping(s))),(t=a.match(/\n/g))?(n+=t.length,r=a.lastIndexOf("\n"),o=a.length-r):o+=a.length,l&&"start"!==c){var d=l.parent||{raws:{}};("decl"!==l.type&&("atrule"!==l.type||l.nodes)||l!==d.last||d.raws.semicolon)&&(l.source&&l.source.end?(s.source=e.sourcePath(l),s.original.line=l.source.end.line,s.original.column=l.source.end.column-1,s.generated.line=n,s.generated.column=o-2,e.map.addMapping(s)):(s.source=i,s.original.line=1,s.original.column=0,s.generated.line=n,s.generated.column=o-1,e.map.addMapping(s)))}})},t.isAnnotation=function(){return!!this.isInline()||(typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))},t.isInline=function(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;var e=this.mapOpts.annotation;return!(typeof e<"u"&&!0!==e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))},t.isMap=function(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0},t.isSourcesContent=function(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})},t.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"},t.path=function(e){if(this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var r=this.opts.to?yO(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=yO(xO(r,this.mapOpts.annotation)));var n=wO(r,e);return this.memoizedPaths.set(e,n),n},t.previous=function(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var r=t.source.input.map;e.previousMaps.includes(r)||e.previousMaps.push(r)}});else{var t=new CO(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps},t.setSourcesContent=function(){var e=this,t={};if(this.root)this.root.walk(function(r){if(r.source){var n=r.source.input.from;if(n&&!t[n]){t[n]=!0;var o=e.usesFileUrls?e.toFileUrl(n):e.toUrl(e.path(n));e.map.setSourceContent(o,r.source.input.css)}}});else if(this.css){var r=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(r,this.css)}},t.sourcePath=function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))},t.toBase64=function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))},t.toFileUrl=function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(kO){var r=kO(e).toString();return this.memoizedFileURLs.set(e,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")},t.toUrl=function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===_O&&(e=e.replace(/\\/g,"/"));var r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r},e}(),AO=IO,TO=function(e){function t(t){var r;return(r=e.call(this,t)||this).type="comment",r}return GC(t,e),t}(WT),OO=TO;TO.default=TO;var LO,$O,NO,RO,PO=LT.isClean,DO=LT.my,MO=qT,zO=OO;
3066function FO(e){return e.map(function(e){return e.nodes&&(e.nodes=FO(e.nodes)),delete e.source,e})}function UO(e){if(e[PO]=!1,e.proxyOf.nodes)for(var t,r=tS(e.proxyOf.nodes);!(t=r()).done;)UO(t.value)}var BO=function(e){function t(){return e.apply(this,arguments)||this}GC(t,e);var r=t.prototype;return r.append=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n,o=tS(t);!(n=o()).done;)for(var i,s=n.value,a=tS(this.normalize(s,this.last));!(i=a()).done;){var l=i.value;this.proxyOf.nodes.push(l)}return this.markDirty(),this},r.cleanRaws=function(t){if(e.prototype.cleanRaws.call(this,t),this.nodes)for(var r,n=tS(this.nodes);!(r=n()).done;)r.value.cleanRaws(t)},r.each=function(e){if(this.proxyOf.nodes){for(var t,r,n=this.getIterator();this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],!1!==(r=e(this.proxyOf.nodes[t],t)));)this.indexes[n]+=1;return delete this.indexes[n],r}},r.every=function(e){return this.nodes.every(e)},r.getIterator=function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e},r.getProxyProcessor=function(){return{get:function(e,t){return"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];var i;return(i=e)[t].apply(i,[].concat(n.map(function(e){return"function"==typeof e?function(t,r){return e(t.toProxy(),r)}:e})))}:"every"===t||"some"===t?function(r){return e[t](function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return r.apply(void 0,[].concat([e.toProxy()],n))})}:"root"===t?function(){return e.root().toProxy()}:"nodes"===t?e.nodes.map(function(e){return e.toProxy()}):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]},set:function(e,t,r){return e[t]===r||(e[t]=r,("name"===t||"params"===t||"selector"===t)&&e.markDirty()),!0}}},r.index=function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))},r.insertAfter=function(e,t){var r,n=this.index(e),o=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(var i,s=tS(o);!(i=s()).done;){var a=i.value;this.proxyOf.nodes.splice(n+1,0,a)}for(var l in this.indexes)n<(r=this.indexes[l])&&(this.indexes[l]=r+o.length);return this.markDirty(),this},r.insertBefore=function(e,t){var r,n=this.index(e),o=0===n&&"prepend",i=this.normalize(t,this.proxyOf.nodes[n],o).reverse();n=this.index(e);for(var s,a=tS(i);!(s=a()).done;){var l=s.value;this.proxyOf.nodes.splice(n,0,l)}for(var c in this.indexes)n<=(r=this.indexes[c])&&(this.indexes[c]=r+i.length);return this.markDirty(),this},r.normalize=function(e,r){var n=this;if("string"==typeof e)e=FO(LO(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e))for(var o,i=tS(e=e.slice(0));!(o=i()).done;){var s=o.value;s.parent&&s.parent.removeChild(s,"ignore")}else if("root"===e.type&&"document"!==this.type)for(var a,l=tS(e=e.nodes.slice(0));!(a=l()).done;){var c=a.value;c.parent&&c.parent.removeChild(c,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new MO(e)]}else if(e.selector)e=[new $O(e)];else if(e.name)e=[new NO(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new zO(e)]}var d=e.map(function(e){return e[DO]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[PO]&&UO(e),typeof e.raws.before>"u"&&r&&typeof r.raws.before<"u"&&(e.raws.before=r.raws.before.replace(/\S/g,"")),e.parent=n.proxyOf,e});return d},r.prepend=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n,o=tS(t=t.reverse());!(n=o()).done;){for(var i,s=n.value,a=this.normalize(s,this.first,"prepend").reverse(),l=tS(a);!(i=l()).done;){var c=i.value;this.proxyOf.nodes.unshift(c)}for(var d in this.indexes)this.indexes[d]=this.indexes[d]+a.length}return this.markDirty(),this},r.push=function(e){return e.parent=this,this.proxyOf.nodes.push(e),this},r.removeAll=function(){for(var e,t=tS(this.proxyOf.nodes);!(e=t()).done;)e.value.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this},r.removeChild=function(e){var t;for(var r in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[r])>=e&&(this.indexes[r]=t-1);return this.markDirty(),this},r.replaceValues=function(e,t,r){return r||(r=t,t={}),this.walkDecls(function(n){t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this}
3066,r.some=function(e){return this.nodes.some(e)},r.walk=function(e){return this.each(function(t,r){var n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n})},r.walkAtRules=function(e,t){return t?ZC(e,RegExp)?this.walk(function(r,n){if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk(function(r,n){if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk(function(e,r){if("atrule"===e.type)return t(e,r)}))},r.walkComments=function(e){return this.walk(function(t,r){if("comment"===t.type)return e(t,r)})},r.walkDecls=function(e,t){return t?ZC(e,RegExp)?this.walk(function(r,n){if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk(function(r,n){if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk(function(e,r){if("decl"===e.type)return t(e,r)}))},r.walkRules=function(e,t){return t?ZC(e,RegExp)?this.walk(function(r,n){if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk(function(r,n){if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk(function(e,r){if("rule"===e.type)return t(e,r)}))},WC(t,[{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),t}(WT);BO.registerParse=function(e){LO=e},BO.registerRule=function(e){$O=e},BO.registerAtRule=function(e){NO=e},BO.registerRoot=function(e){RO=e};var HO=BO;BO.default=BO,BO.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,NO.prototype):"rule"===e.type?Object.setPrototypeOf(e,$O.prototype):"decl"===e.type?Object.setPrototypeOf(e,MO.prototype):"comment"===e.type?Object.setPrototypeOf(e,zO.prototype):"root"===e.type&&Object.setPrototypeOf(e,RO.prototype),e[DO]=!0,e.nodes&&e.nodes.forEach(function(e){BO.rebuild(e)})};var jO,VO,WO=function(e){function t(t){var r;return(r=e.call(this,KC({type:"document"},t))||this).nodes||(r.nodes=[]),r}return GC(t,e),t.prototype.toResult=function(e){return void 0===e&&(e={}),new jO(new VO,this,e).stringify()},t}(HO);WO.registerLazyResult=function(e){jO=e},WO.registerProcessor=function(e){VO=e};var KO=WO;WO.default=WO;var qO=function(){function e(e,t){if(void 0===t&&(t={}),this.type="warning",this.text=e,t.node&&t.node.source){var r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var n in t)this[n]=t[n]}return e.prototype.toString=function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},e}(),GO=qO;qO.default=qO;var ZO=GO,YO=function(){function e(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}var t=e.prototype;return t.toString=function(){return this.css},t.warn=function(e,t){void 0===t&&(t={}),t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);var r=new ZO(e,t);return this.messages.push(r),r},t.warnings=function(){return this.messages.filter(function(e){return"warning"===e.type})},WC(e,[{key:"content",get:function(){return this.css}}]),e}(),JO=YO;YO.default=YO;var QO=/[\t\n\f\r "#'()/;[\\\]{}]/g,XO=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,eL=/.[\r\n"'(/\\]/,tL=/[\da-f]/i,rL=HO,nL=function(e){function t(t){var r;return(r=e.call(this,t)||this).type="atrule",r}GC(t,e);var r=t.prototype;return r.append=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o;return this.proxyOf.nodes||(this.nodes=[]),(o=e.prototype.append).call.apply(o,[].concat([this],r))},r.prepend=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o;return this.proxyOf.nodes||(this.nodes=[]),(o=e.prototype.prepend).call.apply(o,[].concat([this],r))},t}(rL),oL=nL;nL.default=nL,rL.registerAtRule(nL);var iL,sL,aL=HO,lL=function(e){function t(t){var r;return(r=e.call(this,t)||this).type="root",r.nodes||(r.nodes=[]),r}GC(t,e);var r=t.prototype;return r.normalize=function(t,r,n){var o=e.prototype.normalize.call(this,t);if(r)if("prepend"===n)this.nodes.length>1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r)for(var i,s=tS(o);!(i=s()).done;)i.value.raws.before=r.raws.before;return o},r.removeChild=function(t,r){var n=this.index(t);return!r&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),e.prototype.removeChild.call(this,t)},r.toResult=function(e){return void 0===e&&(e={}),new iL(new sL,this,e).stringify()},t}(aL);lL.registerLazyResult=function(e){iL=e},lL.registerProcessor=function(e){sL=e};var cL=lL;lL.default=lL,aL.registerRoot(lL);var dL={comma:function(e){return dL.split(e,[","],!0)},space:function(e){return dL.split(e,[" ","\n","\t"])},split:function(e,t,r){for(var n,o=[],i="",s=!1,a=0,l=!1,c="",d=!1,u=tS(e);!(n=u()).done;){var h=n.value;d?d=!1:"\\"===h?d=!0:l?h===c&&(l=!1):'"'===h||"'"===h?(l=!0,c=h):"("===h?a+=1:")"===h?a>
30660&&(a-=1):0===a&&t.includes(h)&&(s=!0),s?(""!==i&&o.push(i.trim()),i="",s=!1):i+=h}return(r||""!==i)&&o.push(i.trim()),o}},uL=dL;dL.default=dL;var hL=HO,pL=uL,gL=function(e){function t(t){var r;return(r=e.call(this,t)||this).type="rule",r.nodes||(r.nodes=[]),r}return GC(t,e),WC(t,[{key:"selectors",get:function(){return pL.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}]),t}(hL),fL=gL;gL.default=gL,hL.registerRule(gL);var mL=qT,vL=OO,bL=oL,yL=cL,wL=fL,xL={empty:!0,space:!0},_L=function(){function e(e){this.input=e,this.root=new yL,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}var t=e.prototype;return t.atrule=function(e){var t=new bL;t.name=e[1].slice(1),""===t.name&&this.unnamedAtrule(t,e),this.init(t,e[2]);for(var r,n,o,i=!1,s=!1,a=[],l=[];!this.tokenizer.endOfFile();){if("("===(r=(e=this.tokenizer.nextToken())[0])||"["===r?l.push("("===r?")":"]"):"{"===r&&l.length>0?l.push("}"):r===l[l.length-1]&&l.pop(),0===l.length){if(";"===r){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}if("{"===r){s=!0;break}if("}"===r){if(a.length>0){for(n=a[o=a.length-1];n&&"space"===n[0];)n=a[--o];n&&(t.source.end=this.getPosition(n[3]||n[2]),t.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),i&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),s&&(t.nodes=[],this.current=t)},t.checkMissedSemicolon=function(e){var t=this.colon(e);if(!1!==t){for(var r,n=0,o=t-1;o>=0&&("space"===(r=e[o])[0]||2!==(n+=1));o--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}},t.colon=function(e){for(var t,r,n,o,i=0,s=tS(e.entries());!(o=s()).done;){var a=o.value,l=a[0];if("("===(r=(t=a[1])[0])&&(i+=1),")"===r&&(i-=1),0===i&&":"===r){if(n){if("word"===n[0]&&"progid"===n[1])continue;return l}this.doubleColon(t)}n=t}return!1},t.comment=function(e){var t=new vL;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{var n=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=n[2],t.raws.left=n[1],t.raws.right=n[3]}},t.createTokenizer=function(){this.tokenizer=function(e,t){void 0===t&&(t={});var r,n,o,i,s,a,l,c,d,u,h=e.css.valueOf(),p=t.ignoreErrors,g=h.length,f=0,m=[],v=[];function b(t){throw e.error("Unclosed "+t,f)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&f>=g},nextToken:function(e){if(v.length)return v.pop();if(!(f>=g)){var t=!!e&&e.ignoreUnclosed;switch(r=h.charCodeAt(f)){case 10:case 32:case 9:case 13:case 12:n=f;do{n+=1,r=h.charCodeAt(n)}while(32===r||10===r||9===r||13===r||12===r);u=["space",h.slice(f,n)],f=n-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:var y=String.fromCharCode(r);u=[y,y,f];break;case 40:if(c=m.length?m.pop()[1]:"",d=h.charCodeAt(f+1),"url"===c&&39!==d&&34!==d&&32!==d&&10!==d&&9!==d&&12!==d&&13!==d){n=f;do{if(a=!1,-1===(n=h.indexOf(")",n+1))){if(p||t){n=f;break}b("bracket")}for(l=n;
306692===h.charCodeAt(l-1);)l-=1,a=!a}while(a);u=["brackets",h.slice(f,n+1),f,n],f=n}else n=h.indexOf(")",f+1),i=h.slice(f,n+1),-1===n||eL.test(i)?u=["(","(",f]:(u=["brackets",i,f,n],f=n);break;case 39:case 34:o=39===r?"'":'"',n=f;do{if(a=!1,-1===(n=h.indexOf(o,n+1))){if(p||t){n=f+1;break}b("string")}for(l=n;92===h.charCodeAt(l-1);)l-=1,a=!a}while(a);u=["string",h.slice(f,n+1),f,n],f=n;break;case 64:QO.lastIndex=f+1,QO.test(h),n=0===QO.lastIndex?h.length-1:QO.lastIndex-2,u=["at-word",h.slice(f,n+1),f,n],f=n;break;case 92:for(n=f,s=!0;92===h.charCodeAt(n+1);)n+=1,s=!s;if(r=h.charCodeAt(n+1),s&&47!==r&&32!==r&&10!==r&&9!==r&&13!==r&&12!==r&&(n+=1,tL.test(h.charAt(n)))){for(;tL.test(h.charAt(n+1));)n+=1;32===h.charCodeAt(n+1)&&(n+=1)}u=["word",h.slice(f,n+1),f,n],f=n;break;default:47===r&&42===h.charCodeAt(f+1)?(0===(n=h.indexOf("*/",f+2)+1)&&(p||t?n=h.length:b("comment")),u=["comment",h.slice(f,n+1),f,n],f=n):(XO.lastIndex=f+1,XO.test(h),n=0===XO.lastIndex?h.length-1:XO.lastIndex-2,u=["word",h.slice(f,n+1),f,n],m.push(u),f=n)}return f++,u}},position:function(){return f}}}(this.input)},t.decl=function(e,t){var r=new mL;this.init(r,e[0][2]);var n,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(o[3]||o[2]||function(e){for(var t=e.length-1;t>=0;t--){var r=e[t],n=r[3]||r[2];if(n)return n}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){var i=e[0][0];if(":"===i||"space"===i||"comment"===i)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(":"===(n=e.shift())[0]){r.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1]}("_"===r.prop[0]||"*"===r.prop[0])&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));for(var s,a=[];e.length&&("space"===(s=e[0][0])||"comment"===s);)a.push(e.shift());this.precheckMissedSemicolon(e);for(var l=e.length-1;l>=0;l--){if("!important"===(n=e[l])[1].toLowerCase()){r.important=!0;var c=this.stringFrom(e,l);" !important"!==(c=this.spacesFromEnd(e)+c)&&(r.raws.important=c);break}if("important"===n[1].toLowerCase()){for(var d=e.slice(0),u="",h=l;h>0;h--){var p=d[h][0];if(0===u.trim().indexOf("!")&&"space"!==p)break;u=d.pop()[1]+u}0===u.trim().indexOf("!")&&(r.important=!0,r.raws.important=u,e=d)}if("space"!==n[0]&&"comment"!==n[0])break}var g=e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]});g&&(r.raws.between+=a.map(function(e){return e[1]}).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)},t.doubleColon=function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})},t.emptyRule=function(e){var t=new wL;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t},t.end=function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)},t.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())},t.freeSemicolon=function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}},t.getPosition=function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}},t.init=function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)},t.other=function(e){for(var t=!1,r=null,n=!1,o=null,i=[],s=e[1].startsWith("--"),a=[],l=e;l;){if(r=l[0],a.push(l),"("===r||"["===r)o||(o=l),i.push("("===r?")":"]");else if(s&&n&&"{"===r)o||(o=l),i.push("}");else if(0===i.length){if(";"===r){if(n)return void this.decl(a,s);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(o=null));l=this.tokenizer.nextToken()}
3066if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(o),t&&n){if(!s)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)},t.parse=function(){for(var e;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()},t.precheckMissedSemicolon=function(){},t.raw=function(e,t,r,n){for(var o,i,s,a,l=r.length,c="",d=!0,u=0;u<l;u+=1)"space"!==(i=(o=r[u])[0])||u!==l-1||n?"comment"===i?(a=r[u-1]?r[u-1][0]:"empty",s=r[u+1]?r[u+1][0]:"empty",xL[a]||xL[s]||","===c.slice(-1)?d=!1:c+=o[1]):c+=o[1]:d=!1;if(!d){var h=r.reduce(function(e,t){return e+t[1]},"");e.raws[t]={raw:h,value:c}}e[t]=c},t.rule=function(e){e.pop();var t=new wL;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t},t.spacesAndCommentsFromEnd=function(e){for(var t,r="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r},t.spacesAndCommentsFromStart=function(e){for(var t,r="";e.length&&("space"===(t=e[0][0])||"comment"===t);)r+=e.shift()[1];return r},t.spacesFromEnd=function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t},t.stringFrom=function(e,t){for(var r="",n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r},t.unclosedBlock=function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)},t.unclosedBracket=function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})},t.unexpectedClose=function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})},t.unknownWord=function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})},t.unnamedAtrule=function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})},e}(),kL=HO,CL=_L,SL=mO;function EL(e,t){var r=new SL(e,t),n=new CL(r);try{n.parse()}catch(e){throw e}return n.root}var IL=EL;EL.default=EL,kL.registerParse(EL);var AL=LT.isClean,TL=LT.my,OL=AO,LL=MT,$L=HO,NL=KO,RL=JO,PL=IL,DL=cL,ML={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},zL={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},FL={Once:!0,postcssPlugin:!0,prepare:!0};function UL(e){return"object"===(typeof e>"u"?"undefined":QC(e))&&"function"==typeof e.then}function BL(e){var t=!1,r=ML[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function HL(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:BL(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function jL(e){return e[AL]=!1,e.nodes&&e.nodes.forEach(function(e){return jL(e)}),e}var VL={},WL=function(){function e(t,r,n){var o,i=this;if(this.stringified=!1,this.processed=!1,"object"!==(typeof r>"u"?"undefined":QC(r))||null===r||"root"!==r.type&&"document"!==r.type)if(ZC(r,e)||ZC(r,RL))o=jL(r.root),r.map&&(typeof n.map>"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{var s=PL;n.syntax&&(s=n.syntax.parse),n.parser&&(s=n.parser),s.parse&&(s=s.parse);try{o=s(r,n)}catch(e){this.processed=!0,this.error=e}o&&!o[TL]&&$L.rebuild(o)}else o=jL(r);this.result=new RL(t,o,n),this.helpers=KC({},VL,{postcss:VL,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===(typeof e>"u"?"undefined":QC(e))&&e.prepare?KC({},e,e.prepare(i.result)):e})}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)},t.catch=function(e){return this.async().catch(e)},t.finally=function(e){return this.async().then(e,e)},t.getAsyncError=function(){throw new Error("Use process(css).then(cb) to work with async plugins")},t.handleError=function(e,t){var r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e},t.prepareVisitors=function(){var e=this;this.listeners={};for(var t,r=function(t,r,n){e.listeners[r]||(e.listeners[r]=[]),e.listeners[r].push([t,n])},n=tS(this.plugins);!(t=n()).done;){var o=t.value;if("object"===(typeof o>"u"?"undefined":QC(o)))for(var i in o){if(!zL[i]&&/^[A-Z]/.test(i))throw new Error("Unknown event "+i+" in "+o.postcssPlugin+". Try to update PostCSS ("+this.processor.ver
3066sion+" now).");if(!FL[i])if("object"===QC(o[i]))for(var s in o[i])r(o,"*"===s?i:i+"-"+s.toLowerCase(),o[i][s]);else"function"==typeof o[i]&&r(o,i,o[i])}}this.hasListener=Object.keys(this.listeners).length>0},t.runAsync=function(){var e=this;return jC(function(){var t,r,n,o,i,s,a,l,c,d,u,h;return rS(this,function(p){switch(p.label){case 0:e.plugin=0,t=0,p.label=1;case 1:if(!(t<e.plugins.length))return[3,6];if(r=e.plugins[t],!UL(n=e.runOnRoot(r)))return[3,5];p.label=2;case 2:return p.trys.push([2,4,,5]),[4,n];case 3:return p.sent(),[3,5];case 4:throw o=p.sent(),e.handleError(o);case 5:return t++,[3,1];case 6:if(e.prepareVisitors(),!e.hasListener)return[3,18];i=e.result.root,p.label=7;case 7:if(i[AL])return[3,14];i[AL]=!0,s=[HL(i)],p.label=8;case 8:if(!(s.length>0))return[3,13];if(!UL(a=e.visitTick(s)))return[3,12];p.label=9;case 9:return p.trys.push([9,11,,12]),[4,a];case 10:return p.sent(),[3,12];case 11:throw l=p.sent(),c=s[s.length-1].node,e.handleError(l,c);case 12:return[3,8];case 13:return[3,7];case 14:if(!e.listeners.OnceExit)return[3,18];d=function(){var t,r,n,o,s;return rS(this,function(a){switch(a.label){case 0:t=h.value,r=t[0],n=t[1],e.result.lastPlugin=r,a.label=1;case 1:return a.trys.push([1,6,,7]),"document"!==i.type?[3,3]:(o=i.nodes.map(function(t){return n(t,e.helpers)}),[4,Promise.all(o)]);case 2:return a.sent(),[3,5];case 3:return[4,n(i,e.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw s=a.sent(),e.handleError(s);case 7:return[2]}})},u=tS(e.listeners.OnceExit),p.label=15;case 15:return(h=u()).done?[3,18]:[5,nS(d())];case 16:p.sent(),p.label=17;case 17:return[3,15];case 18:return e.processed=!0,[2,e.stringify()]}})})()},t.runOnRoot=function(e){var t=this;this.result.lastPlugin=e;try{if("object"===(typeof e>"u"?"undefined":QC(e))&&e.Once){if("document"===this.result.root.type){var r=this.result.root.nodes.map(function(r){return e.Once(r,t.helpers)});return UL(r[0])?Promise.all(r):r}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}},t.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=LL;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var r=new OL(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result},t.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var e,t=tS(this.plugins);!(e=t()).done;){var r=e.value;if(UL(this.runOnRoot(r)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var n=this.result.root;!n[AL];)n[AL]=!0,this.walkSync(n);if(this.listeners.OnceExit)if("document"===n.type)for(var o,i=tS(n.nodes);!(o=i()).done;){var s=o.value;this.visitSync(this.listeners.OnceExit,s)}else this.visitSync(this.listeners.OnceExit,n)}return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this.css},t.visitSync=function(e,t){for(var r,n=tS(e);!(r=n()).done;){var o=r.value,i=o[0],s=o[1];this.result.lastPlugin=i;var a=void 0;try{a=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(UL(a))throw this.getAsyncError()}},t.visitTick=function(e){var t=e[e.length-1],r=t.node,n=t.visitors;if("root"===r.type||"document"===r.type||r.parent){if(n.length>0&&t.visitorIndex<n.length){var o=n[t.visitorIndex],i=o[0],s=o[1];t.visitorIndex+=1,t.visitorIndex===n.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=i;try{return s(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){for(var a,l=t.iterator;a=r.nodes[r.indexes[l]];)if(r.indexes[l]+=1,!a[AL])return a[AL]=!0,void e.push(HL(a));t.iterator=0,delete r.indexes[l]}for(var c=t.events;t.eventIndex<c.length;){var d=c[t.eventIndex];if(t.eventIndex+=1,0===d)return void(r.nodes&&r.nodes.length&&(r[AL]=!0,t.iterator=r.getIterator()));if(this.listeners[d])return void(t.visitors=this.listeners[d])}e.pop()}else e.pop()},t.walkSync=function(e){var t=this;e[AL]=!0;for(var r,n=tS(BL(e));!(r=n()).done;){var o=r.value;if(0===o)e.nodes&&e.each(function(e){e[AL]||t.walkSync(e)});else{var i=this.listeners[o];if(i&&this.visitSync(i,e.toProxy()))return}}},t.warnings=function(){return this.sync().warnings()}
3066,WC(e,[{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}]),e}();WL.registerPostcss=function(e){VL=e};var KL=WL;WL.default=WL,DL.registerLazyResult(WL),NL.registerLazyResult(WL);var qL=AO,GL=MT,ZL=IL,YL=JO,JL=function(){function e(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;var n,o=GL;this.result=new YL(this._processor,n,this._opts),this.result.css=t;var i=this;Object.defineProperty(this.result,"root",{get:function(){return i.root}});var s=new qL(o,n,this._opts,t);if(s.isMap()){var a=s.generate(),l=a[0],c=a[1];l&&(this.result.css=l),c&&(this.result.map=c)}else s.clearAnnotation(),this.result.css=s.css}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)},t.catch=function(e){return this.async().catch(e)},t.finally=function(e){return this.async().then(e,e)},t.sync=function(){if(this.error)throw this.error;return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this._css},t.warnings=function(){return[]},WC(e,[{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=ZL;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),e}(),QL=JL;JL.default=JL;var XL=QL,e$=KL,t$=KO,r$=cL,n$=function(){function e(e){void 0===e&&(e=[]),this.version="8.4.38",this.plugins=this.normalize(e)}var t=e.prototype;return t.normalize=function(e){for(var t,r=[],n=tS(e);!(t=n()).done;){var o=t.value;if(!0===o.postcss?o=o():o.postcss&&(o=o.postcss),"object"===(typeof o>"u"?"undefined":QC(o))&&Array.isArray(o.plugins))r=r.concat(o.plugins);else if("object"===(typeof o>"u"?"undefined":QC(o))&&o.postcssPlugin)r.push(o);else if("function"==typeof o)r.push(o);else if("object"!==(typeof o>
3066"u"?"undefined":QC(o))||!o.parse&&!o.stringify)throw new Error(o+" is not a PostCSS plugin")}return r},t.process=function(e,t){return void 0===t&&(t={}),this.plugins.length||t.parser||t.stringifier||t.syntax?new e$(this,e,t):new XL(this,e,t)},t.use=function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this},e}(),o$=n$;n$.default=n$,r$.registerProcessor(n$),t$.registerProcessor(n$);var i$=qT,s$=tO,a$=OO,l$=oL,c$=mO,d$=cL,u$=fL;function h$(e,t){if(Array.isArray(e))return e.map(function(e){return h$(e)});var r=e.inputs,n=YC(e,["inputs"]);if(r){t=[];for(var o,i=tS(r);!(o=i()).done;){var s=KC({},o.value,{__proto__:c$.prototype});s.map&&(s.map=KC({},s.map,{__proto__:s$.prototype})),t.push(s)}}if(n.nodes&&(n.nodes=e.nodes.map(function(e){return h$(e,t)})),n.source){var a=n.source,l=a.inputId,c=YC(a,["inputId"]);n.source=c,null!=l&&(n.source.input=t[l])}if("root"===n.type)return new d$(n);if("decl"===n.type)return new i$(n);if("rule"===n.type)return new u$(n);if("comment"===n.type)return new a$(n);if("atrule"===n.type)return new l$(n);throw new Error("Unknown node type: "+e.type)}var p$=h$;h$.default=h$;var g$=OT,f$=qT,m$=KL,v$=HO,b$=o$,y$=MT,w$=p$,x$=KO,_$=GO,k$=OO,C$=oL,S$=JO,E$=mO,I$=IL,A$=uL,T$=fL,O$=cL,L$=WT;function $$(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new b$(t)}$$.plugin=function(e,t){var r,n=!1;function o(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var s=t.apply(void 0,[].concat(o));return s.postcssPlugin=e,s.postcssVersion=(new b$).version,s}return Object.defineProperty(o,"postcss",{get:function(){return r||(r=o()),r}}),o.process=function(e,t,r){return $$([o(r)]).process(e,t)},o},$$.stringify=y$,$$.parse=I$,$$.fromJSON=w$,$$.list=A$,$$.comment=function(e){return new k$(e)},$$.atRule=function(e){return new C$(e)},$$.decl=function(e){return new f$(e)},$$.rule=function(e){return new T$(e)},$$.root=function(e){return new O$(e)},$$.document=function(e){return new x$(e)},$$.CssSyntaxError=g$,$$.Declaration=f$,$$.Container=v$,$$.Processor=b$,$$.Document=x$,$$.Comment=k$,$$.Warning=_$,$$.AtRule=C$,$$.Result=S$,$$.Input=E$,$$.Rule=T$,$$.Root=O$,$$.Node=L$,m$.registerPostcss($$);var N$=$$;$$.default=$$;var R$=wT(N$);R$.stringify,R$.fromJSON,R$.plugin,R$.parse,R$.list,R$.document,R$.comment,R$.atRule,R$.rule,R$.decl,R$.root,R$.CssSyntaxError,R$.Declaration,R$.Container,R$.Processor,R$.Document,R$.Comment,R$.Warning,R$.AtRule,R$.Result,R$.Input,R$.Rule,R$.Root,R$.Node;var P$=function(){function e(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];yT(this,"parentElement",null),yT(this,"parentNode",null),yT(this,"ownerDocument"),yT(this,"firstChild",null),yT(this,"lastChild",null),yT(this,"previousSibling",null),yT(this,"nextSibling",null),yT(this,"ELEMENT_NODE",1),yT(this,"TEXT_NODE",3),yT(this,"nodeType"),yT(this,"nodeName"),yT(this,"RRNodeType")}var t=e.prototype;return t.contains=function(t){if(!ZC(t,e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1},t.appendChild=function(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")},t.insertBefore=function(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")},t.removeChild=function(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")},t.toString=function(){return"RRNode"},WC(e,[{key:"childNodes",get:function(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}}]),e}(),D$={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},M$={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},z$={};function F$(e){if(z$[e])return z$[e];var t=globalThis[e],r=t.prototype,n=e in D$?D$[e]:void 0,o=!(!n||!n.every(function(e){var t,n;return!(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)||!n.toString().includes("[native code]"))})),i=e in M$?M$[e]:void 0,s=!(!i||!i.every(function(e){var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(o&&s&&!globalThis.Zone)return z$[e]=t.prototype,t.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var l=a.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(a),c?z$[e]=c:r}catch{return r}}var U$={};function B$(e,t,r){var n,o=e+"."+String(r);if(U$[o])return U$[o].call(t);var i=F$(e),s=null==(n=Object.getOwnPropertyDescriptor(i,r))?void 0:n.get;return s?(U$[o]=s,s.call(t)):t[r]}var H$={};function j$(e,t,r){var n=e+"."+String(r);if(H$[n])return H$[n].bind(t);var o=F$(e)[r];return"function"!=typeof o?t[r]:(H$[n]=o,o.bind(t))}function V$(){return F$("MutationObserver").constructor}function W$(e,t,r){try{if(!(t in e))return function(){};var n=e[t],o=r(n);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,function(){e[t]=n}}catch{return function(){}}}var K$=function(e){return B$("Node",e,"childNodes")},q$=function(e){return B$("Node",e,"parentNode")},G$=function(e){return B$("Node",e,"parentElement")},Z$=function(e){return B$("Node",e,"textContent")},Y$=function(e,t){return j$("Node",e,"contains")(t)},J$=function(e){return j$("Node",e,"getRootNode")()},Q$=function(e){return e&&"host"in e?B$("ShadowRoot",e,"host"):null},X$=function(e){return e&&"shadowRoot"in e?B$("Element",e,"shadowRoot"):null};function eN(e,t,r){void 0===r&&(r=document);var n={capture:!0,passive:!0};return r.addEventListener(e,t,n),function(){return r.removeEventListener(e,t,n)}}var tN="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",rN={map:{},getId:function(){return console.error(tN),-1},getNode:function(){return console.error(tN),null},removeNodeFromMap:function(){console.error(tN)},has:function(){return console.error(tN),!1},reset:function(){console.error(tN)}};function nN(e,t,r){void 0===r&&(r={});var n=null,o=0;return function(){for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];var l=Date.now();!o&&!1===r.leading&&(o=l);var c=t-(l-o),d=this;c<=0||c>t?(n&&(clearTimeout(n),n=null),o=l,e.apply(d,s)):!n&&!1!==r.trailing&&(n=setTimeout(function(){o=!1===r.leading?0:Date.now(),n=null,e.apply(d,s)},c))}}function oN(e,t,r,n,o){void 0===o&&(o=window);var i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,n?r:{set:function(e){var t=this;setTimeout(function(){r.set.call(t,e)},0),i&&i.set&&i.set.call(this,e)}}),function(){return oN(e,t,i||{},!0)}}typeof window<"u"&&window.Proxy&&window.Reflect&&(rN=new Proxy(rN,{get:function(e,t,r){return"map"===t&&console.error(tN),Reflect.get(e,t,r)}}));var iN=Date.now;function sN(e){var t,r,n,o,i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||i?.body&&(null==(t=G$(i.body))?void 0:t.scrollLeft)||(null==(r=i?.body)?void 0:r.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:i?.documentElement.scrollTop||i?.body&&(null==(n=G$(i.body))?void 0:n.scrollTop)||(null==(o=i?.body)?void 0:o.scrollTop)||0}}function aN(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function lN(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function cN(e){return e?e.nodeType===e.ELEMENT_NODE?e:G$(e):null}function dN(e,t,r,n){if(!e)return!1;var o=cN(e);if(!o)return!1;try{if("string"==typeof t){if(o.classList.contains(t)||n&&null!==o.closest("."+t))return!0}else if(QS(o,t,n))return!0}catch{}return!(!r||!(o.matches(r)||n&&null!==o.closest(r)))}function uN(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)}function hN(e,t){if(kS(e))return!1;var r=t.getId(e);if(!t.has(r))return!0;var n=q$(e);return(!n||n.nodeType!==e.DOCUMENT_NODE)&&(!n||hN(n,t))}function pN(e){return!!e.changedTouches}function gN(e,t){return!("IFRAME"!==e.nodeName||!t.getMeta(e))}
3066function fN(e,t){return!("LINK"!==e.nodeName||e.nodeType!==e.ELEMENT_NODE||!e.getAttribute||"stylesheet"!==e.getAttribute("rel")||!t.getMeta(e))}function mN(e){return!!e&&(ZC(e,P$)&&"shadowRoot"in e?!!e.shadowRoot:!!X$(e))}/[1-9][0-9]{12}/.test(Date.now().toString())||(iN=function(){return(new Date).getTime()});var vN=function(){function e(){sS(this,"id",1),sS(this,"styleIDMap",new WeakMap),sS(this,"idStyleMap",new Map)}var t=e.prototype;return t.getId=function(e){var t;return null!=(t=this.styleIDMap.get(e))?t:-1},t.has=function(e){return this.styleIDMap.has(e)},t.add=function(e,t){return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r);var r},t.getStyle=function(e){return this.idStyleMap.get(e)||null},t.reset=function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1},t.generateId=function(){return this.id++},t.remove=function(e){var t=this.styleIDMap.get(e);return void 0!==t&&(this.styleIDMap.delete(e),this.idStyleMap.delete(t),!0)},e}();function bN(e){var t,r=null;return"getRootNode"in e&&(null==(t=J$(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Q$(J$(e))&&(r=Q$(J$(e))),r}function yN(e){var t=e.ownerDocument;return!!t&&(Y$(t,e)||function(e){var t=e.ownerDocument;if(!t)return!1;var r=function(e){for(var t,r=e;t=bN(r);)r=t;return r}(e);return Y$(t,r)}(e))}var wN=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(wN||{}),xN=function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e}(xN||{}),_N=function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e}(_N||{}),kN=function(e){return e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e}(kN||{}),CN=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(CN||{}),SN=function(e){return e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e}(SN||{}),EN=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(EN||{});function IN(e){return"__ln"in e}var AN,TN=function(){function e(){sS(this,"length",0),sS(this,"head",null),sS(this,"tail",null)}var t=e.prototype;return t.get=function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,r=0;r<e;r++)t=t?.next||null;return t},t.addNode=function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&IN(e.previousSibling)){var r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&IN(e.nextSibling)&&e.nextSibling.__ln.previous){var n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++},t.removeNode=function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)},e}(),ON=function(e,t){return e+"@"+t},LN=function(){function e(){var e=this;sS(this,"frozen",!1),sS(this,"locked",!1),sS(this,"texts",[]),sS(this,"attributes",[]),sS(this,"attributeMap",new WeakMap),sS(this,"removes",[]),sS(this,"mapRemoves",[]),sS(this,"movedMap",{}),sS(this,"addedSet",new Set),sS(this,"movedSet",new Set),sS(this,"droppedSet",new Set),sS(this,"removesSubTreeCache",new Set),sS(this,"mutationCb"),sS(this,"blockClass"),sS(this,"blockSelector"),sS(this,"maskTextClass"),sS(this,"maskTextSelector"),sS(this,"inlineStylesheet"),sS(this,"maskInputOptions"),sS(this,"maskTextFn"),sS(this,"maskInputFn"),sS(this,"keepIframeSrcFn"),sS(this,"recordCanvas"),sS(this,"inlineImages"),sS(this,"slimDOMOptions"),sS(this,"dataURLOptions"),sS(this,"doc"),sS(this,"mirror"),sS(this,"iframeManager"),sS(this,"stylesheetManager"),sS(this,"shadowDomManager"),sS(this,"canvasManager"),sS(this,"processedNodeManager"),sS(this,"unattachedDoc"),sS(this,"processMutations",function(t){t.forEach(e.processMutation),e.emit()}),sS(this,"emit",function(){if(!e.frozen&&!e.locked){for(var t=[],r=new Set,n=new TN,o=function(t){for(var r=t,n=-2;-2===n;)n=(r=r&&r.nextSibling)&&e.mirror.getId(r);return n},i=function(i){var s=q$(i);if(s&&yN(i)){var a=!1;if(i.nodeType===Node.TEXT_NODE){var l=s.tagName;if("TEXTAREA"===l)return;"STYLE"===l&&e.addedSet.has(s)&&(a=!0)}var c=kS(s)?e.mirror.getId(bN(i)):e.mirror.getId(s),d=o(i);if(-1===c||-1===d)return n.addNode(i);var u=rE(i,{doc:e.doc,mirror:e.mirror,blockClass:e.blockClass,blockSelector:e.blockSelector,maskTextClass:e.maskTextClass,maskTextSelector:e.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:e.inlineStylesheet,maskInputOptions:e.maskInputOptions,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:e.slimDOMOptions,dataURLOptions:e.dataURLOptions,recordCanvas:e.recordCanvas,inlineImages:e.inlineImages,onSerialize:function(t){gN(t,e.mirror)&&e.iframeManager.addIframe(t),fN(t,e.mirror)&&e.stylesheetManager.trackLinkElement(t),mN(i)&&e.shadowDomManager.addShadowRoot(X$(i),e.doc)},onIframeLoad:function(t,r){e.iframeManager.attachIframe(t,r),e.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:function(t,r){e.stylesheetManager.attachLinkElement(t,r)},cssCaptured:a});u&&(t.push({parentId:c,nextId:d,node:u}),r.add(u.id))}};e.mapRemoves.length;){var s=e.mapRemoves.shift();e.cleanupRemovedNode(s),e.mirror.removeNodeFromMap(s)}for(var a,l=tS(e.movedSet);!(a=l()).done;){var c=a.value;NN(e.removesSubTreeCache,c,e.mirror)&&!e.movedSet.has(q$(c))||i(c)}for(var d,u=tS(e.addedSet);!(d=u()).done;){var h=d.value;!RN(e.droppedSet,h)&&!NN(e.removesSubTreeCache,h,e.mirror)||RN(e.movedSet,h)?i(h):e.droppedSet.add(h)}for(var p=null;n.length;){var g=null;if(p){var f=e.mirror.getId(q$(p.value)),m=o(p.value);-1!==f&&-1!==m&&(g=p)}if(!g)for(var v=n.tail;v;){var b=v;if(v=v.previous,b){var y=e.mirror.getId(q$(b.value));if(-1===o(b.value))continue;if(-1!==y){g=b;break}var w=b.value,x=q$(w);if(x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var _=Q$(x);if(-1!==e.mirror.getId(_)){g=b;break}}}}if(!g){for(;n.head;)n.removeNode(n.head.value);break}p=g.previous,n.removeNode(g.value),i(g.value)}
3066var k={texts:e.texts.map(function(t){var r=t.node,n=q$(r);return n&&"TEXTAREA"===n.tagName&&e.genTextAreaValueMutation(n),{id:e.mirror.getId(r),value:t.value}}).filter(function(e){return!r.has(e.id)}).filter(function(t){return e.mirror.has(t.id)}),attributes:e.attributes.map(function(t){var r=t.attributes;if("string"==typeof r.style){var n=JSON.stringify(t.styleDiff),o=JSON.stringify(t._unchangedStyles);n.length<r.style.length&&(n+o).split("var(").length===r.style.split("var(").length&&(r.style=t.styleDiff)}return{id:e.mirror.getId(t.node),attributes:r}}).filter(function(e){return!r.has(e.id)}).filter(function(t){return e.mirror.has(t.id)}),removes:e.removes,adds:t};!k.texts.length&&!k.attributes.length&&!k.removes.length&&!k.adds.length||(e.texts=[],e.attributes=[],e.attributeMap=new WeakMap,e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.removesSubTreeCache=new Set,e.movedMap={},e.mutationCb(k))}}),sS(this,"genTextAreaValueMutation",function(t){var r=e.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},e.attributes.push(r),e.attributeMap.set(t,r));var n=Array.from(K$(t),function(e){return Z$(e)||""}).join("");r.attributes.value=AS({element:t,maskInputOptions:e.maskInputOptions,tagName:t.tagName,type:LS(t),value:n,maskInputFn:e.maskInputFn})}),sS(this,"processMutation",function(t){if(!uN(t.target,e.mirror,e.slimDOMOptions))switch(t.type){case"characterData":var r=Z$(t.target);!dN(t.target,e.blockClass,e.blockSelector,!1)&&r!==t.oldValue&&e.texts.push({value:XS(t.target,e.maskTextClass,e.maskTextSelector,!0)&&r?e.maskTextFn?e.maskTextFn(r,cN(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break;case"attributes":var n=t.target,o=t.attributeName,i=t.target.getAttribute(o);if("value"===o){var s=LS(n);i=AS({element:n,maskInputOptions:e.maskInputOptions,tagName:n.tagName,type:s,value:i,maskInputFn:e.maskInputFn})}if(dN(t.target,e.blockClass,e.blockSelector,!1)||i===t.oldValue)return;var a=e.attributeMap.get(t.target);if("IFRAME"===n.tagName&&"src"===o&&!e.keepIframeSrcFn(i)){if(n.contentDocument)return;o="rr_src"}if(a||(a={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},e.attributes.push(a),e.attributeMap.set(t.target,a)),"type"===o&&"INPUT"===n.tagName&&"password"===(t.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!JS(n.tagName,o))if(a.attributes[o]=YS(e.doc,TS(n.tagName),TS(o),i),"style"===o){if(!e.unattachedDoc)try{e.unattachedDoc=document.implementation.createHTMLDocument()}catch{e.unattachedDoc=e.doc}var l=e.unattachedDoc.createElement("span");t.oldValue&&l.setAttribute("style",t.oldValue);for(var c,d=tS(Array.from(n.style));!(c=d()).done;){var u=c.value,h=n.style.getPropertyValue(u),p=n.style.getPropertyPriority(u);h!==l.style.getPropertyValue(u)||p!==l.style.getPropertyPriority(u)?a.styleDiff[u]=""===p?h:[h,p]:a._unchangedStyles[u]=[h,p]}for(var g,f=tS(Array.from(l.style));!(g=f()).done;){var m=g.value;""===n.style.getPropertyValue(m)&&(a.styleDiff[m]=!1)}}else"open"===o&&"DIALOG"===n.tagName&&(n.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal");break;case"childList":if(dN(t.target,e.blockClass,e.blockSelector,!0))return;if("TEXTAREA"===t.target.tagName)return void e.genTextAreaValueMutation(t.target);t.addedNodes.forEach(function(r){return e.genAdds(r,t.target)}),t.removedNodes.forEach(function(r){var n=e.mirror.getId(r),o=kS(t.target)?e.mirror.getId(Q$(t.target)):e.mirror.getId(t.target);dN(t.target,e.blockClass,e.blockSelector,!1)||uN(r,e.mirror,e.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(r,e.mirror)||(e.addedSet.has(r)?($N(e.addedSet,r),e.droppedSet.add(r)):e.addedSet.has(t.target)&&-1===n||hN(t.target,e.mirror)||(e.movedSet.has(r)&&e.movedMap[ON(n,o)]?$N(e.movedSet,r):(e.removes.push({parentId:o,id:n,isShadow:!(!kS(t.target)||!CS(t.target))||void 0}),function(e,t){for(var r=[e];r.length;){var n=r.pop();t.has(n)||(t.add(n),K$(n).forEach(function(e){return r.push(e)}))}}(r,e.removesSubTreeCache))),e.mapRemoves.push(r))})}}),sS(this,"genAdds",function(t,r){if(!e.processedNodeManager.inOtherBuffer(t,e)&&!e.addedSet.has(t)&&!e.movedSet.has(t)){if(e.mirror.hasNode(t)){if(uN(t,e.mirror,e.slimDOMOptions))return;e.movedSet.add(t);var n=null;r&&e.mirror.hasNode(r)&&(n=e.mirror.getId(r)),n&&-1!==n&&(e.movedMap[ON(e.mirror.getId(t),n)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);dN(t,e.blockClass,e.blockSelector,!1)||(K$(t).forEach(function(t){return e.genAdds(t)}
3066),mN(t)&&K$(X$(t)).forEach(function(r){e.processedNodeManager.add(r,e),e.genAdds(r,t)}))}}),sS(this,"cleanupRemovedNode",function(t){if("IFRAME"===t.nodeName)try{e.iframeManager.removeIframe(t)}catch{}else try{e.stylesheetManager.cleanupStylesheetsForRemovedNode(t)}catch{}t.childNodes.forEach(function(t){e.cleanupRemovedNode(t)})})}var t=e.prototype;return t.init=function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(function(r){t[r]=e[r]})},t.freeze=function(){this.frozen=!0,this.canvasManager.freeze()},t.unfreeze=function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()},t.isFrozen=function(){return this.frozen},t.lock=function(){this.locked=!0,this.canvasManager.lock()},t.unlock=function(){this.locked=!1,this.canvasManager.unlock(),this.emit()},t.reset=function(){this.shadowDomManager.reset(),this.canvasManager.reset()},t.getDoc=function(){return this.doc},e}();function $N(e,t){e.delete(t),K$(t).forEach(function(t){return $N(e,t)})}function NN(e,t,r){return 0!==e.size&&function(e,t){var r=q$(t);return!!r&&e.has(r)}(e,t)}function RN(e,t){return 0!==e.size&&PN(e,t)}function PN(e,t){var r=q$(t);return!!r&&(!!e.has(r)||PN(e,r))}var DN=function(e){return AN?function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];try{return e.apply(void 0,[].concat(r))}catch(e){if(AN&&!0===AN(e))return;throw e}}:e},MN=[];function zN(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function FN(e,t){var r=new LN;MN.push(r),r.init(e);var n=new(V$())(DN(r.processMutations.bind(r)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n}function UN(e){var t=e.scrollCb,r=e.doc,n=e.mirror,o=e.blockClass,i=e.blockSelector,s=e.sampling,a=DN(nN(DN(function(e){var s=zN(e);if(s&&!dN(s,o,i,!0)){var a=n.getId(s);if(s===r&&r.defaultView){var l=sN(r.defaultView);t({id:a,x:l.left,y:l.top})}else t({id:a,x:s.scrollLeft,y:s.scrollTop})}}),s.scroll||100));return eN("scroll",a,r)}var BN=["INPUT","TEXTAREA","SELECT"],HN=new WeakMap;function jN(e){return function(e,t){if(qN("CSSGroupingRule")&&ZC(e.parentRule,CSSGroupingRule)||qN("CSSMediaRule")&&ZC(e.parentRule,CSSMediaRule)||qN("CSSSupportsRule")&&ZC(e.parentRule,CSSSupportsRule)||qN("CSSConditionRule")&&ZC(e.parentRule,CSSConditionRule)){var r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){var n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function VN(e,t,r){var n,o;return e?(e.ownerNode?n=t.getId(e.ownerNode):o=r.getId(e),{styleId:o,id:n}):{}}function WN(e,t){var r,n,o,i,s=e.mirror,a=e.stylesheetManager;i="#document"===t.nodeName?s.getId(t):s.getId(Q$(t));var l="#document"===t.nodeName?null==(r=t.defaultView)?void 0:r.Document:null==(o=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:o.ShadowRoot,c=l?.prototype?Object.getOwnPropertyDescriptor(l?.prototype,"adoptedStyleSheets"):void 0;return null!==i&&-1!==i&&l&&c?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:function(){var e;return null==(e=c.get)?void 0:e.call(this)},set:function(e){var t,r=null==(t=c.set)?void 0:t.call(this,e);if(null!==i&&-1!==i)try{a.adoptStyleSheets(e,i)}catch{}return r}}),DN(function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})})):function(){}}function KN(e,t){void 0===t&&(t={});var r,n=e.doc.defaultView;if(!n)return function(){};!function(e,t){var r=e.mutationCb,n=e.mousemoveCb,o=e.mouseInteractionCb,i=e.scrollCb,s=e.viewportResizeCb,a=e.inputCb,l=e.mediaInteractionCb,c=e.styleSheetRuleCb,d=e.styleDeclarationCb,u=e.canvasMutationCb,h=e.fontCb,p=e.selectionCb,g=e.customElementCb;e.mutationCb=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];var i;t.mutation&&(i=t).mutation.apply(i,[].concat(n)),r.apply(void 0,[].concat(n))},e.mousemoveCb=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var i;t.mousemove&&(i=t).mousemove.apply(i,[].concat(r)),n.apply(void 0,[].concat(r))},e.mouseInteractionCb=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var i;t.mouseInteraction&&(i=t).mouseInteraction.apply(i,[].concat(r)),o.apply(void 0,[].concat(r))},e.scrollCb=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var o;t.scroll&&(o=t).scroll.apply(o,[].concat(r)),i.apply(void 0,[].concat(r))},e.viewportResizeCb=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var o;t.viewportResize&&(o=t).viewportResize.apply(o,[].concat(r)),s.apply(void 0,[].concat(r))},e.inputCb=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var o;t.input&&(o=t).input.apply(o,[].concat(r)),a.apply(void 0,[].concat(r))},e.mediaInteractionCb=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var o;t.mediaInteaction&&(o=t).mediaInteaction.apply(o,[].concat(r)),l.apply(void 0,[].concat(r))},e.styleSheetRuleCb=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var o;t.styleSheetRule&&(o=t).styleSheetRule.apply(o,[].concat(r)),c.apply(void 0,[].concat(r))},e.styleDeclarationCb=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var o;t.styleDeclaration&&(o=t).styleDeclaration.apply(o,[].concat(r)),d.apply(void 0,[].concat(r))},e.canvasMutationCb=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var o;t.canvasMutation&&(o=t).canvasMutation.apply(o,[].concat(r)),u.apply(void 0,[].concat(r))},e.fontCb=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var o;t.font&&(o=t).font.apply(o,[].concat(r)),h.apply(void 0,[].concat(r))},e.selectionCb=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var o;t.selection&&(o=t).selection.apply(o,[].concat(r)),p.apply(void 0,[].concat(r))},e.customElementCb=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var o;t.customElement&&(o=t).customElement.apply(o,[].concat(r)),g.apply(void 0,[].concat(r))}}(e,t),e.recordDOM&&(r=FN(e,e.doc));var o=function(e){var t=e.mousemoveCb,r=e.sampling,n=e.doc,o=e.mirror;if(!1===r.mousemove)return function(){};var i,s="number"==typeof r.mousemove?r.mousemove:50,a="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,l=[],c=nN(DN(function(e){var r=Date.now()-i;t(l.map(function(e){return e.timeOffset-=r,e}),e),l=[],i=null}),a),d=DN(nN(DN(function(e){var t=zN(e),r=pN(e)?e.changedTouches[0]:e,n=r.clientX,s=r.clientY;i||(i=iN()),l.push({x:n,y:s,id:o.getId(t),timeOffset:iN()-i}),c(typeof DragEvent<"u"&&ZC(e,DragEvent)?xN.Drag:ZC(e,MouseEvent)?xN.MouseMove:xN.TouchMove)}),s,{trailing:!1})),u=[eN("mousemove",d,n),eN("touchmove",d,n),eN("drag",d,n)];return DN(function(){u.forEach(function(e){return e()})})}(e),i=function(e){var t=e.mouseInteractionCb,r=e.doc,n=e.mirror,o=e.blockClass,i=e.blockSelector,s=e.sampling;if(!1===s.mouseInteraction)return function(){};var a=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,l=[],c=null;return Object.keys(_N).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]}
3066).forEach(function(e){var s=TS(e),a=function(e){return function(r){var s=zN(r);if(!dN(s,o,i,!0)){var a=null,l=e;if("pointerType"in r){switch(r.pointerType){case"mouse":a=kN.Mouse;break;case"touch":a=kN.Touch;break;case"pen":a=kN.Pen}a===kN.Touch?_N[e]===_N.MouseDown?l="TouchStart":_N[e]===_N.MouseUp&&(l="TouchEnd"):kN.Pen}else pN(r)&&(a=kN.Touch);null!==a?(c=a,(l.startsWith("Touch")&&a===kN.Touch||l.startsWith("Mouse")&&a===kN.Mouse)&&(a=null)):_N[e]===_N.Click&&(a=c,c=null);var d=pN(r)?r.changedTouches[0]:r;if(d){var u=n.getId(s),h=d.clientX,p=d.clientY;DN(t)(KC({type:_N[l],id:u,x:h,y:p},null!==a&&{pointerType:a}))}}}}(e);if(window.PointerEvent)switch(_N[e]){case _N.MouseDown:case _N.MouseUp:s=s.replace("mouse","pointer");break;case _N.TouchStart:case _N.TouchEnd:return}l.push(eN(s,a,r))}),DN(function(){l.forEach(function(e){return e()})})}(e),s=UN(e),a=function(e,t){var r=e.viewportResizeCb,n=t.win,o=-1,i=-1,s=DN(nN(DN(function(){var e=aN(),t=lN();(o!==e||i!==t)&&(r({width:Number(t),height:Number(e)}),o=e,i=t)}),200));return eN("resize",s,n)}(e,{win:n}),l=function(e){var t=e.inputCb,r=e.doc,n=e.mirror,o=e.blockClass,i=e.blockSelector,s=e.ignoreClass,a=e.ignoreSelector,l=e.maskInputOptions,c=e.maskInputFn,d=e.sampling,u=e.userTriggeredOnInput;function h(e){var t=zN(e),n=e.isTrusted,d=t&&t.tagName;if(t&&"OPTION"===d&&(t=G$(t)),t&&d&&!(BN.indexOf(d)<0)&&!dN(t,o,i,!0)&&!(t.classList.contains(s)||a&&t.matches(a))){var h=t.value,g=!1,f=LS(t)||"";"radio"===f||"checkbox"===f?g=t.checked:(l[d.toLowerCase()]||l[f])&&(h=AS({element:t,maskInputOptions:l,tagName:d,type:f,value:h,maskInputFn:c})),p(t,u?{text:h,isChecked:g,userTriggered:n}:{text:h,isChecked:g});var m=t.name;"radio"===f&&m&&g&&r.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach(function(e){if(e!==t){var r=e.value;p(e,u?{text:r,isChecked:!g,userTriggered:!1}:{text:r,isChecked:!g})}})}}function p(e,r){var o=HN.get(e);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){HN.set(e,r);var i=n.getId(e);DN(t)(KC({},r,{id:i}))}}var g=("last"===d.input?["change"]:["input","change"]).map(function(e){return eN(e,DN(h),r)}),f=r.defaultView;if(!f)return function(){g.forEach(function(e){return e()})};var m,v=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),b=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&(m=g).push.apply(m,[].concat(b.map(function(e){return oN(e[0],e[1],{set:function(){DN(h)({target:this,isTrusted:!1})}},!1,f)}))),DN(function(){g.forEach(function(e){return e()})})}(e),c=function(e){var t=e.mediaInteractionCb,r=e.blockClass,n=e.blockSelector,o=e.mirror,i=e.sampling,s=e.doc,a=DN(function(e){return nN(DN(function(i){var s=zN(i);if(s&&!dN(s,r,n,!0)){var a=s.currentTime,l=s.volume,c=s.muted,d=s.playbackRate,u=s.loop;t({type:e,id:o.getId(s),currentTime:a,volume:l,muted:c,playbackRate:d,loop:u})}}),i.media||500)}),l=[eN("play",a(SN.Play),s),eN("pause",a(SN.Pause),s),eN("seeked",a(SN.Seeked),s),eN("volumechange",a(SN.VolumeChange),s),eN("ratechange",a(SN.RateChange),s)];return DN(function(){l.forEach(function(e){return e()})})}(e),d=function(){},u=function(){},h=function(){},p=function(){};e.recordDOM&&(d=function(e,t){var r=e.styleSheetRuleCb,n=e.mirror,o=e.stylesheetManager,i=t.win;if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return function(){};var s=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:DN(function(e,t,i){var s=i[0],a=i[1],l=VN(t,n,o.styleMirror),c=l.id,d=l.styleId;return(c&&-1!==c||d&&-1!==d)&&r({id:c,styleId:d,adds:[{rule:s,index:a}]}),e.apply(t,i)})}),i.CSSStyleSheet.prototype.addRule=function(e,t,r){void 0===r&&(r=this.cssRules.length);var n=e+" { "+t+" }";return i.CSSStyleSheet.prototype.insertRule.apply(this,[n,r])};var a,l,c=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=new Proxy(c,{apply:DN(function(e,t,i){var s=i[0],a=VN(t,n,o.styleMirror),l=a.id,c=a.styleId;
vendor: 1,570 bytes, line 3066
3066return(l&&-1!==l||c&&-1!==c)&&r({id:l,styleId:c,removes:[{index:s}]}),e.apply(t,i)})}),i.CSSStyleSheet.prototype.removeRule=function(e){return i.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},i.CSSStyleSheet.prototype.replace&&(a=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:DN(function(e,t,i){var s=i[0],a=VN(t,n,o.styleMirror),l=a.id,c=a.styleId;return(l&&-1!==l||c&&-1!==c)&&r({id:l,styleId:c,replace:s}),e.apply(t,i)})})),i.CSSStyleSheet.prototype.replaceSync&&(l=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:DN(function(e,t,i){var s=i[0],a=VN(t,n,o.styleMirror),l=a.id,c=a.styleId;return(l&&-1!==l||c&&-1!==c)&&r({id:l,styleId:c,replaceSync:s}),e.apply(t,i)})}));var d={};GN("CSSGroupingRule")?d.CSSGroupingRule=i.CSSGroupingRule:(GN("CSSMediaRule")&&(d.CSSMediaRule=i.CSSMediaRule),GN("CSSConditionRule")&&(d.CSSConditionRule=i.CSSConditionRule),GN("CSSSupportsRule")&&(d.CSSSupportsRule=i.CSSSupportsRule));var u={};return Object.entries(d).forEach(function(e){var t=e[0],i=e[1];u[t]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(u[t].insertRule,{apply:DN(function(e,t,i){var s=i[0],a=i[1],l=VN(t.parentStyleSheet,n,o.styleMirror),c=l.id,d=l.styleId;return(c&&-1!==c||d&&-1!==d)&&r({id:c,styleId:d,adds:[{rule:s,index:[].concat(jN(t),[a||0])}]}),e.apply(t,i)})}),i.prototype.deleteRule=new Proxy(u[t].deleteRule,{apply:DN(function(e,t,i){var s=i[0],a=VN(t.parentStyleSheet,n,o.styleMirror),l=a.id,c=a.styleId;
3066return(l&&-1!==l||c&&-1!==c)&&r({id:l,styleId:c,removes:[{index:[].concat(jN(t),[s])}]}),e.apply(t,i)})})}),DN(function(){i.CSSStyleSheet.prototype.insertRule=s,i.CSSStyleSheet.prototype.deleteRule=c,a&&(i.CSSStyleSheet.prototype.replace=a),l&&(i.CSSStyleSheet.prototype.replaceSync=l),Object.entries(d).forEach(function(e){var t=e[0],r=e[1];r.prototype.insertRule=u[t].insertRule,r.prototype.deleteRule=u[t].deleteRule})})}(e,{win:n}),u=WN(e,e.doc),h=function(e,t){var r=e.styleDeclarationCb,n=e.mirror,o=e.ignoreCSSAttributes,i=e.stylesheetManager,s=t.win,a=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:DN(function(e,t,s){var l,c=s[0],d=s[1],u=s[2];if(o.has(c))return a.apply(t,[c,d,u]);var h=VN(null==(l=t.parentRule)?void 0:l.parentStyleSheet,n,i.styleMirror),p=h.id,g=h.styleId;return(p&&-1!==p||g&&-1!==g)&&r({id:p,styleId:g,set:{property:c,value:d,priority:u},index:jN(t.parentRule)}),e.apply(t,s)})});var l=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:DN(function(e,t,s){var a,c=s[0];if(o.has(c))return l.apply(t,[c]);var d=VN(null==(a=t.parentRule)?void 0:a.parentStyleSheet,n,i.styleMirror),u=d.id,h=d.styleId;return(u&&-1!==u||h&&-1!==h)&&r({id:u,styleId:h,remove:{property:c},index:jN(t.parentRule)}),e.apply(t,s)})}),DN(function(){s.CSSStyleDeclaration.prototype.setProperty=a,s.CSSStyleDeclaration.prototype.removeProperty=l})}(e,{win:n}),e.collectFonts&&(p=function(e){var t=e.fontCb,r=e.doc,n=r.defaultView;if(!n)return function(){};var o=[],i=new WeakMap,s=n.FontFace;n.FontFace=function(e,t,r){var n=new s(e,t,r);return i.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};var a=W$(r.fonts,"add",function(e){return function(r){return setTimeout(DN(function(){var e=i.get(r);e&&(t(e),i.delete(r))}),0),e.apply(this,[r])}});return o.push(function(){n.FontFace=s}),o.push(a),DN(function(){o.forEach(function(e){return e()})})}(e)));for(var g,f=function(e){var t=e.doc,r=e.mirror,n=e.blockClass,o=e.blockSelector,i=e.selectionCb,s=!0,a=DN(function(){var e=t.getSelection();if(!(!e||s&&e?.isCollapsed)){s=e.isCollapsed||!1;for(var a=[],l=e.rangeCount||0,c=0;c<l;c++){var d=e.getRangeAt(c),u=d.startContainer,h=d.startOffset,p=d.endContainer,g=d.endOffset;dN(u,n,o,!0)||dN(p,n,o,!0)||a.push({start:r.getId(u),startOffset:h,end:r.getId(p),endOffset:g})}i({ranges:a})}});return a(),eN("selectionchange",a)}(e),m=function(e){var t=e.doc,r=e.customElementCb,n=t.defaultView;if(!n||!n.customElements)return function(){};var o=W$(n.customElements,"define",function(e){return function(t,n,o){try{r({define:{name:t}})}catch{console.warn("Custom element callback failed for "+t)}return e.apply(this,[t,n,o])}});return o}(e),v=[],b=tS(e.plugins);!(g=b()).done;){var y=g.value;v.push(y.observer(y.callback,n,y.options))}return DN(function(){MN.forEach(function(e){return e.reset()}),r?.disconnect(),o(),i(),s(),a(),l(),c(),d(),u(),h(),p(),f(),m(),v.forEach(function(e){return e()})})}function qN(e){return typeof window[e]<"u"}function GN(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}for(var ZN=function(){function e(e){sS(this,"iframeIdToRemoteIdMap",new WeakMap),sS(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}var t=e.prototype;return t.getId=function(e,t,r,n){var o=r||this.getIdToRemoteIdMap(e),i=n||this.getRemoteIdToIdMap(e),s=o.get(t);return s||(s=this.generateIdFn(),o.set(t,s),i.set(s,t)),s},t.getIds=function(e,t){var r=this,n=this.getIdToRemoteIdMap(e),o=this.getRemoteIdToIdMap(e);return t.map(function(t){return r.getId(e,t,n,o)})},t.getRemoteId=function(e,t,r){var n=r||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:n.get(t)||-1},t.getRemoteIds=function(e,t){var r=this,n=this.getRemoteIdToIdMap(e);
3066return t.map(function(t){return r.getRemoteId(e,t,n)})},t.reset=function(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)},t.getIdToRemoteIdMap=function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t},t.getRemoteIdToIdMap=function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t},e}(),YN=function(){function e(e){sS(this,"iframes",new WeakMap),sS(this,"crossOriginIframeMap",new WeakMap),sS(this,"crossOriginIframeMirror",new ZN(BS)),sS(this,"crossOriginIframeStyleMirror"),sS(this,"crossOriginIframeRootIdMap",new WeakMap),sS(this,"iframeContentDocumentMap",new WeakMap),sS(this,"iframeObserverCleanupMap",new WeakMap),sS(this,"mirror"),sS(this,"mutationCb"),sS(this,"wrappedEmit"),sS(this,"loadListener"),sS(this,"stylesheetManager"),sS(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ZN(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}var t=e.prototype;return t.addIframe=function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}
3066,t.getIframeContentDocument=function(e){return this.iframeContentDocumentMap.get(e)},t.setObserverCleanup=function(e,t){this.iframeObserverCleanupMap.set(e,t)},t.getObserverCleanup=function(e){return this.iframeObserverCleanupMap.get(e)},t.removeIframe=function(e){var t=this.iframeContentDocumentMap.get(e);t&&(this.stylesheetManager.cleanupStylesheetsForRemovedNode(t),this.mirror.removeNodeFromMap(t,!0)),this.iframes.delete(e),this.iframeContentDocumentMap.delete(e);var r=this.iframeObserverCleanupMap.get(e);if(r){try{r()}catch{}this.iframeObserverCleanupMap.delete(e)}},t.addLoadListener=function(e){this.loadListener=e},t.attachIframe=function(e,t){var r,n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),e.contentDocument&&this.iframeContentDocumentMap.set(e,e.contentDocument),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(n=this.loadListener)||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))},t.handleMessage=function(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var r=this.crossOriginIframeMap.get(e.source);if(r){var n=this.transformCrossOriginEvent(r,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}}},t.transformCrossOriginEvent=function(e,t){var r,n=this;switch(t.type){case wN.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var o=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,o),this.patchRootIdOnNode(t.data.node,o),{timestamp:t.timestamp,type:wN.IncrementalSnapshot,data:{source:xN.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case wN.Meta:case wN.Load:case wN.DomContentLoaded:return!1;case wN.Plugin:return t;case wN.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case wN.IncrementalSnapshot:switch(t.data.source){case xN.Mutation:return t.data.adds.forEach(function(t){n.replaceIds(t,e,["parentId","nextId","previousId"]),n.replaceIdOnNode(t.node,e);var r=n.crossOriginIframeRootIdMap.get(e);r&&n.patchRootIdOnNode(t.node,r)}),t.data.removes.forEach(function(t){n.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(function(t){n.replaceIds(t,e,["id"])}),t.data.texts.forEach(function(t){n.replaceIds(t,e,["id"])}),t;case xN.Drag:case xN.TouchMove:case xN.MouseMove:return t.data.positions.forEach(function(t){n.replaceIds(t,e,["id"])}),t;case xN.ViewportResize:return!1;case xN.MediaInteraction:case xN.MouseInteraction:case xN.Scroll:case xN.CanvasMutation:case xN.Input:return this.replaceIds(t.data,e,["id"]),t;case xN.StyleSheetRule:case xN.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case xN.Font:return t;case xN.Selection:return t.data.ranges.forEach(function(t){n.replaceIds(t,e,["start","end"])}),t;case xN.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach(function(t){n.replaceStyleIds(t,e,["styleId"])}),t}}return!1},t.replace=function(e,t,r,n){for(var o,i=tS(n);!(o=i()).done;){var s=o.value;!Array.isArray(t[s])&&"number"!=typeof t[s]||(Array.isArray(t[s])?t[s]=e.getIds(r,t[s]):t[s]=e.getId(r,t[s]))}return t},t.replaceIds=function(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)},t.replaceStyleIds=function(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)},t.replaceIdOnNode=function(e,t){var r=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(function(e){r.replaceIdOnNode(e,t)})},t.patchRootIdOnNode=function(e,t){var r=this;e.type!==EN.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(function(e){r.patchRootIdOnNode(e,t)})},e}(),JN=function(){function e(e){sS(this,"shadowDoms",new WeakSet),sS(this,"mutationCb"),sS(this,"scrollCb"),sS(this,"bypassOptions"),sS(this,"mirror"),sS(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}var t=e.prototype;return t.init=function(){this.reset(),this.patchAttachShadow(Element,document)},t.addShadowRoot=function(e,t){var r=this;if(CS(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var n=FN(KC({},this.bypassOptions,{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(function(){return n.disconnect()}),this.restoreHandlers.push(UN(KC({},this.bypassOptions,{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&r.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,r.mirror.getId(Q$(e))),r.restoreHandlers.push(WN({mirror:r.mirror,stylesheetManager:r.bypassOptions.stylesheetManager},e))},0)}},t.observeAttachShadow=function(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)},t.patchAttachShadow=function(e,t){var r=this;this.restoreHandlers.push(W$(e.prototype,"attachShadow",function(e){return function(n){var o=e.call(this,n),i=X$(this);return i&&yN(this)&&r.addShadowRoot(i,t),o}}))}
3066,t.reset=function(){this.restoreHandlers.forEach(function(e){try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet},e}(),QN="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",XN=typeof Uint8Array>"u"?[]:new Uint8Array(256),eR=0;eR<64;eR++)XN[QN.charCodeAt(eR)]=eR;var tR=new Map,rR=function(e,t,r){if(e&&(iR(e,t)||"object"===(typeof e>"u"?"undefined":QC(e)))){var n=function(e,t){var r=tR.get(e);return r||(r=new Map,tR.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name),o=n.indexOf(e);return-1===o&&(o=n.length,n.push(e)),o}};function nR(e,t,r){if(ZC(e,Array))return e.map(function(e){return nR(e,t,r)});if(null===e)return e;if(ZC(e,Float32Array)||ZC(e,Float64Array)||ZC(e,Int32Array)||ZC(e,Uint32Array)||ZC(e,Uint8Array)||ZC(e,Uint16Array)||ZC(e,Int16Array)||ZC(e,Int8Array)||ZC(e,Uint8ClampedArray))return{rr_type:e.constructor.name,args:[Object.values(e)]};if(ZC(e,ArrayBuffer)){var n=e.constructor.name,o=function(e){var t,r=new Uint8Array(e),n=r.length,o="";for(t=0;t<n;t+=3)o+=QN[r[t]>>2],o+=QN[(3&r[t])<<4|r[t+1]>>4],o+=QN[(15&r[t+1])<<2|r[t+2]>>6],o+=QN[63&r[t+2]];return n%3==2?o=o.substring(0,o.length-1)+"=":n%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e);return{rr_type:n,base64:o}}return ZC(e,DataView)?{rr_type:e.constructor.name,args:[nR(e.buffer,t,r),e.byteOffset,e.byteLength]}:ZC(e,HTMLImageElement)?{rr_type:e.constructor.name,src:e.src}:ZC(e,HTMLCanvasElement)?{rr_type:"HTMLImageElement",src:e.toDataURL()}:ZC(e,ImageData)?{rr_type:e.constructor.name,args:[nR(e.data,t,r),e.width,e.height]}:iR(e,t)||"object"===(typeof e>"u"?"undefined":QC(e))?{rr_type:e.constructor.name,index:rR(e,t,r)}:e}var oR=function(e,t,r){return e.map(function(e){return nR(e,t,r)})},iR=function(e,t){return!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(function(e){return"function"==typeof t[e]}).find(function(r){return ZC(e,t[r])})};function sR(e,t,r,n){var o=[];try{var i=W$(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(o){for(var i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];if(!dN(this,t,r,!0)){var l=function(e){return"experimental-webgl"===e?"webgl":e}(o);if("__context"in this||(this.__context=l),n&&["webgl","webgl2"].includes(l))if(s[0]&&"object"===QC(s[0])){var c=s[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else s.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[].concat([o],s))}});o.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){o.forEach(function(e){return e()})}}function aR(e,t,r,n,o,i){for(var s,a=function(){var a=s.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))return"continue";try{if("function"!=typeof e[a])return"continue";var c=W$(e,a,function(e){return function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];var d=e.apply(this,l);if(rR(d,i,this),"tagName"in this.canvas&&!dN(this.canvas,n,o,!0)){var u=oR(l,i,this),h={type:t,property:a,args:u};r(this.canvas,h)}return d}});l.push(c)}catch{var d=oN(e,a,{set:function(e){r(this.canvas,{type:t,property:a,args:[e],setter:!0})}});l.push(d)}},l=[],c=tS(Object.getOwnPropertyNames(e));!(s=c()).done;)a();return l}var lR="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSA
3066yKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",cR=typeof window<"u"&&window.Blob&&new Blob([function(e){return Uint8Array.from(atob(e),function(e){return e.charCodeAt(0)})}(lR)],{type:"text/javascript;charset=utf-8"});function dR(e){var t;try{if(!(t=cR&&(window.URL||window.webkitURL).createObjectURL(cR)))throw"";var r=new Worker(t,{name:e?.name});return r.addEventListener("error",function(){(window.URL||window.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;base64,"+lR,{name:e?.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}var uR=function(){function e(e){var t=this;sS(this,"pendingCanvasMutations",new Map),sS(this,"rafStamps",{latestId:0,invokeId:null}),sS(this,"mirror"),sS(this,"mutationCb"),sS(this,"resetObservers"),sS(this,"frozen",!1),sS(this,"locked",!1),sS(this,"processMutation",function(e,r){(t.rafStamps.invokeId&&t.rafStamps.latestId!==t.rafStamps.invokeId||!t.rafStamps.invokeId)&&(t.rafStamps.invokeId=t.rafStamps.latestId),t.pendingCanvasMutations.has(e)||t.pendingCanvasMutations.set(e,[]),t.pendingCanvasMutations.get(e).push(r)});var r=e.sampling,n=void 0===r?"all":r,o=e.win,i=e.blockClass,s=e.blockSelector,a=e.recordCanvas,l=e.dataURLOptions;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&"all"===n&&this.initCanvasMutationObserver(o,i,s),a&&"number"==typeof n&&this.initCanvasFPSObserver(n,o,i,s,{dataURLOptions:l})}var t=e.prototype;return t.reset=function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()},t.freeze=function(){this.frozen=!0},t.unfreeze=function(){this.frozen=!1},t.lock=function(){this.locked=!0},t.unlock=function(){this.locked=!1},t.initCanvasFPSObserver=function(e,t,r,n,o){var i=this,s=sR(t,r,n,!0),a=new Map,l=new dR;l.onmessage=function(e){var t=e.data.id;if(a.set(t,!1),"base64"in e.data){var r=e.data,n=r.base64,o=r.type,s=r.width,l=r.height;i.mutationCb({id:t,type:CN["2D"],commands:[{property:"clearRect",args:[0,0,s,l]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:n}],type:o}]},0,0]}]})}};var c,d=1e3/e,u=0,h=function(e){if(u&&e-u<d)c=requestAnimationFrame(h);else{u=e;var s=i;(function(){var e=[];return t.document.querySelectorAll("canvas").forEach(function(t){dN(t,r,n,!0)||e.push(t)}),e}
3066)().forEach(jC(function(e){var t,r,n,i;return rS(this,function(c){switch(c.label){case 0:return r=s.mirror.getId(e),a.get(r)||0===e.width||0===e.height?[2]:(a.set(r,!0),["webgl","webgl2"].includes(e.__context)&&(n=e.getContext(e.__context),!1===(null==(t=n?.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)),[4,createImageBitmap(e)]);case 1:return i=c.sent(),l.postMessage({id:r,bitmap:i,width:e.width,height:e.height,dataURLOptions:o.dataURLOptions},[i]),[2]}})})),c=requestAnimationFrame(h)}};c=requestAnimationFrame(h),this.resetObservers=function(){s(),cancelAnimationFrame(c)}},t.initCanvasMutationObserver=function(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=sR(e,t,r,!1),o=function(e,t,r,n){for(var o,i=function(){var i=o.value;try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[i])return"continue";var a=W$(t.CanvasRenderingContext2D.prototype,i,function(o){return function(){for(var s=this,a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return dN(this.canvas,r,n,!0)||setTimeout(function(){var r=oR(l,t,s);e(s.canvas,{type:CN["2D"],property:i,args:r})},0),o.apply(this,l)}});s.push(a)}catch{var l=oN(t.CanvasRenderingContext2D.prototype,i,{set:function(t){e(this.canvas,{type:CN["2D"],property:i,args:[t],setter:!0})}});s.push(l)}},s=[],a=tS(Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype));!(o=a()).done;)i();return function(){s.forEach(function(e){return e()})}}(this.processMutation.bind(this),e,t,r),i=function(e,t,r,n){var o,i,s=[];return(o=s).push.apply(o,[].concat(aR(t.WebGLRenderingContext.prototype,CN.WebGL,e,r,n,t))),typeof t.WebGL2RenderingContext<"u"&&(i=s).push.apply(i,[].concat(aR(t.WebGL2RenderingContext.prototype,CN.WebGL2,e,r,n,t))),function(){s.forEach(function(e){return e()})}}(this.processMutation.bind(this),e,t,r);this.resetObservers=function(){n(),o(),i()}},t.startPendingCanvasMutationFlusher=function(){var e=this;requestAnimationFrame(function(){return e.flushPendingCanvasMutations()})},t.startRAFTimestamping=function(){var e=this,t=function(r){e.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)},t.flushPendingCanvasMutations=function(){var e=this;this.pendingCanvasMutations.forEach(function(t,r){var n=e.mirror.getId(r);e.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(function(){return e.flushPendingCanvasMutations()})},t.flushPendingCanvasMutationFor=function(e,t){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(e);if(r&&-1!==t){var n=r.map(function(e){return e.type,YC(e,["type"])}),o=r[0].type;this.mutationCb({id:t,type:o,commands:n}),this.pendingCanvasMutations.delete(e)}}},e}(),hR=function(){function e(e){sS(this,"trackedLinkElements",new WeakSet),sS(this,"mutationCb"),sS(this,"adoptedStyleSheetCb"),sS(this,"styleMirror",new vN),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}var t=e.prototype;return t.attachLinkElement=function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)},t.trackLinkElement=function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))},t.adoptStyleSheets=function(e,t){var r,n=function(){var e=o.value,t=void 0;r.styleMirror.has(e)?t=r.styleMirror.getId(e):(t=r.styleMirror.add(e),s.push({styleId:t,rules:Array.from(e.rules||CSSRule,function(t,r){return{rule:ES(t,e.href),index:r}})})),i.styleIds.push(t)};if(0!==e.length){for(var o,i={id:t,styleIds:[]},s=[],a=tS(e);!(o=a()).done;)r=this,n();s.length>0&&(i.styles=s),this.adoptedStyleSheetCb(i)}},t.reset=function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet},t.cleanupStylesheetsForRemovedNode=function(e){var t=this;try{if(e.nodeType===Node.DOCUMENT_NODE){var r=e;if(r.adoptedStyleSheets)for(var n,o=tS(r.adoptedStyleSheets);!(n=o()).done;){var i=n.value;this.styleMirror.remove(i)}}if("STYLE"===e.nodeName){var s=e;s.sheet&&this.styleMirror.remove(s.sheet)}if("LINK"===e.nodeName&&"stylesheet"===e.rel){var a=e;a.sheet&&this.styleMirror.remove(a.sheet)}
3066e.childNodes&&e.childNodes.forEach(function(e){t.cleanupStylesheetsForRemovedNode(e)})}catch{}},t.trackStylesheetInLinkElement=function(e){},e}(),pR=function(){function e(){sS(this,"nodeMap",new WeakMap),sS(this,"active",!1)}var t=e.prototype;return t.inOtherBuffer=function(e,t){var r=this.nodeMap.get(e);return r&&Array.from(r).some(function(e){return e!==t})},t.add=function(e,t){var r=this;this.active||(this.active=!0,requestAnimationFrame(function(){r.nodeMap=new WeakMap,r.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))},t.destroy=function(){},e}();function gR(e){try{var t=new URL(e).origin;return"null"!==t?t:null}catch{return null}}var fR,mR,vR,bR=!1;try{if(2!==Array.from([1],function(e){return 2*e})[0]){var yR=document.createElement("iframe");document.body.appendChild(yR),Array.from=(null==(oS=yR.contentWindow)?void 0:oS.Array.from)||Array.from,document.body.removeChild(yR)}}catch(p){console.debug("Unable to override Array.from",p)}var wR,xR=new IS;function _R(e){void 0===e&&(e={});var t,r=e.emit,n=e.checkoutEveryNms,o=e.checkoutEveryNth,i=e.blockClass,s=void 0===i?"rr-block":i,a=e.blockSelector,l=void 0===a?null:a,c=e.ignoreClass,d=void 0===c?"rr-ignore":c,u=e.ignoreSelector,h=void 0===u?null:u,p=e.maskTextClass,g=void 0===p?"rr-mask":p,f=e.maskTextSelector,m=void 0===f?null:f,v=e.inlineStylesheet,b=void 0===v||v,y=e.maskAllInputs,w=e.maskInputOptions,x=e.slimDOMOptions,_=e.maskInputFn,k=e.maskTextFn,C=e.hooks,S=e.packFn,E=e.sampling,I=void 0===E?{}:E,A=e.dataURLOptions,T=void 0===A?{}:A,O=e.mousemoveWait,L=e.recordDOM,$=void 0===L||L,N=e.recordCanvas,R=void 0!==N&&N,P=e.recordCrossOriginIframes,D=void 0!==P&&P,M=e.allowedIframeOrigins,z=e.recordAfter,F=void 0===z?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":z,U=e.userTriggeredOnInput,B=void 0!==U&&U,H=e.collectFonts,j=void 0!==H&&H,V=e.inlineImages,W=void 0!==V&&V,K=e.plugins,q=e.keepIframeSrcFn,G=void 0===q?function(){return!1}:q,Z=e.ignoreCSSAttributes,Y=void 0===Z?new Set([]):Z;!function(e){AN=e}(e.errorHandler),D&&M&&M.length>0&&(t=function(e){if(!Array.isArray(e)||0===e.length)throw new Error("[rrweb] allowedIframeOrigins must be a non-empty array of origin strings.");for(var t=new Set,r=0;r<e.length;r++){var n=e[r];if("string"!=typeof n)throw new Error("[rrweb] allowedIframeOrigins["+r+"] must be a string, got "+(typeof n>"u"?"undefined":QC(n))+".");var o=gR(n);o&&t.add(o)}return Object.freeze(t)}(M),0===t.size&&(t=void 0));var J=!D||window.parent===window,Q=!1;if(!J)try{window.parent.document&&(Q=!1)}catch{Q=!0}if(J&&!r)throw new Error("emit function is required");if(!J&&!Q)return function(){};void 0!==O&&void 0===I.mousemove&&(I.mousemove=O),xR.reset();var X=!0===y?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0,hidden:!0}:void 0!==w?w:{password:!0},ee=!0===x||"all"===x?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===x,headMetaDescKeywords:"all"===x,headTitleMutations:"all"===x}:x||{};!function(e){void 0===e&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();var te,re=0,ne=function(e){for(var t,r=tS(K||[]);!(t=r()).done;){var n=t.value;n.eventProcessor&&(e=n.eventProcessor(e))}return S&&!Q&&(e=S(e)),e};fR=function(e,i){var s,a=e;if(a.timestamp=iN(),null!=(s=MN[0])&&s.isFrozen()&&a.type!==wN.FullSnapshot&&!(a.type===wN.IncrementalSnapshot&&a.data.source===xN.Mutation)&&MN.forEach(function(e){return e.unfreeze()}),J)r?.(ne(a),i);else if(Q){var l={type:"rrweb",event:ne(a),origin:window.location.origin,isCheckout:i};if(t)for(var c,d=tS(t);!(c=d()).done;){var u=c.value;window.parent.postMessage(l,u)}else window.parent.postMessage(l,"*")}if(a.type===wN.FullSnapshot)te=a,re=0;else if(a.type===wN.IncrementalSnapshot){if(a.data.source===xN.Mutation&&a.data.isAttachIframe)return;re++;var h=o&&re>=o,p=n&&a.timestamp-te.timestamp>n;(h||p)&&mR(!0)}};for(var oe,ie=function(e){fR({type:wN.IncrementalSnapshot,data:KC({source:xN.Mutation},e)})},se=function(e){return fR({type:wN.IncrementalSnapshot,data:KC({source:xN.Scroll},e)})},ae=function(e){return fR({type:wN.IncrementalSnapshot,data:KC({source:xN.CanvasMutation},e)})},le=new hR({mutationCb:ie,adoptedStyleSheetCb:function(e){return fR({type:wN.IncrementalSnapshot,data:KC({source:xN.AdoptedStyleSheet},e)})}}),ce=new YN({mirror:xR,mutationCb:ie,stylesheetManager:le,recordCrossOriginIframes:D,wrappedEmit:fR}),de=tS(K||[]);!(oe=de()).done;){var ue=oe.value;ue.getMirror&&ue.getMirror({nodeMirror:xR,crossOriginIframeMirror:ce.crossOriginIframeMirror,crossOriginIframeStyleMirror:ce.crossOriginIframeStyleMirror})}var he=new pR;vR=new uR({recordCanvas:R,mutationCb:ae,win:window,blockClass:s,blockSelector:l,mirror:xR,sampling:I.canvas,dataURLOptions:T});var pe=new JN({mutationCb:ie,scrollCb:se,bypassOptions:{blockClass:s,blockSelector:l,maskTextClass:g,maskTextSelector:m,inlineStylesheet:b,maskInputOptions:X,dataURLOptions:T,maskTextFn:k,maskInputFn:_,recordCanvas:R,inlineImages:W,sampling:I,slimDOMOptions:ee,iframeManager:ce,stylesheetManager:le,canvasManager:vR,keepIframeSrcFn:G,processedNodeManager:he},mirror:xR});mR=function(e){if(void 0===e&&(e=!1),$){fR({type:wN.Meta,data:{href:window.location.href,width:lN(),height:aN()}},e),le.reset(),pe.init(),MN.forEach(function(e){return e.lock()});var t=function(e,t){var r=t||{},n=r.mirror,o=void 0===n?new IS:n,i=r.blockClass,s=r.blockSelector,a=r.maskTextClass,l=r.maskTextSelector,c=r.inlineStylesheet,d=r.inlineImages,u=r.recordCanvas,h=r.maskAllInputs,p=void 0!==h&&h,g=r.slimDOM,f=void 0!==g&&g,m=r.keepIframeSrcFn;return rE(e,{doc:e,mirror:o,blockClass:void 0===i?"rr-block":i,blockSelector:void 0===s?null:s,maskTextClass:void 0===a?"rr-mask":a,maskTextSelector:void 0===l?null:l,ski
3066pChild:!1,inlineStylesheet:void 0===c||c,maskInputOptions:!0===p?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0,hidden:!0}:!1===p?{password:!0}:p,maskTextFn:r.maskTextFn,maskInputFn:r.maskInputFn,slimDOMOptions:!0===f||"all"===f?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===f,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===f?{}:f,dataURLOptions:r.dataURLOptions,inlineImages:void 0!==d&&d,recordCanvas:void 0!==u&&u,preserveWhiteSpace:r.preserveWhiteSpace,onSerialize:r.onSerialize,onIframeLoad:r.onIframeLoad,iframeLoadTimeout:r.iframeLoadTimeout,onStylesheetLoad:r.onStylesheetLoad,stylesheetLoadTimeout:r.stylesheetLoadTimeout,keepIframeSrcFn:void 0===m?function(){return!1}:m,newlyAddedElement:!1})}(document,{mirror:xR,blockClass:s,blockSelector:l,maskTextClass:g,maskTextSelector:m,inlineStylesheet:b,maskAllInputs:X,maskTextFn:k,maskInputFn:_,slimDOM:ee,dataURLOptions:T,recordCanvas:R,inlineImages:W,onSerialize:function(e){gN(e,xR)&&ce.addIframe(e),fN(e,xR)&&le.trackLinkElement(e),mN(e)&&pe.addShadowRoot(X$(e),document)},onIframeLoad:function(e,t){ce.attachIframe(e,t),pe.observeAttachShadow(e)},onStylesheetLoad:function(e,t){le.attachLinkElement(e,t)},keepIframeSrcFn:G});if(!t)return console.warn("Failed to snapshot the document");fR({type:wN.FullSnapshot,data:{node:t,initialOffset:sN(window)}},e),MN.forEach(function(e){return e.unlock()}),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&le.adoptStyleSheets(document.adoptedStyleSheets,xR.getId(document))}};try{var ge=[],fe=function(e){var t;return DN(KN)({mutationCb:ie,mousemoveCb:function(e,t){return fR({type:wN.IncrementalSnapshot,data:{source:t,positions:e}})},mouseInteractionCb:function(e){return fR({type:wN.IncrementalSnapshot,data:KC({source:xN.MouseInteraction},e)})},scrollCb:se,viewportResizeCb:function(e){return fR({type:wN.IncrementalSnapshot,data:KC({source:xN.ViewportResize},e)})},inputCb:function(e){return fR({type:wN.IncrementalSnapshot,data:KC({source:xN.Input},e)})},mediaInteractionCb:function(e){return fR({type:wN.IncrementalSnapshot,data:KC({source:xN.MediaInteraction},e)})},styleSheetRuleCb:function(e){return fR({type:wN.IncrementalSnapshot,data:KC({source:xN.StyleSheetRule},e)})},styleDeclarationCb:function(e){return fR({type:wN.IncrementalSnapshot,data:KC({source:xN.StyleDeclaration},e)})},canvasMutationCb:ae,fontCb:function(e){return fR({type:wN.IncrementalSnapshot,data:KC({source:xN.Font},e)})},selectionCb:function(e){fR({type:wN.IncrementalSnapshot,data:KC({source:xN.Selection},e)})},customElementCb:function(e){fR({type:wN.IncrementalSnapshot,data:KC({source:xN.CustomElement},e)})},blockClass:s,ignoreClass:d,ignoreSelector:h,maskTextClass:g,maskTextSelector:m,maskInputOptions:X,inlineStylesheet:b,sampling:I,recordDOM:$,recordCanvas:R,inlineImages:W,userTriggeredOnInput:B,collectFonts:j,doc:e,maskInputFn:_,maskTextFn:k,keepIframeSrcFn:G,blockSelector:l,slimDOMOptions:ee,dataURLOptions:T,mirror:xR,iframeManager:ce,stylesheetManager:le,shadowDomManager:pe,processedNodeManager:he,canvasManager:vR,ignoreCSSAttributes:Y,plugins:(null==(t=K?.filter(function(e){return e.observer}))?void 0:t.map(function(e){return{observer:e.observer,options:e.options,callback:function(t){return fR({type:wN.Plugin,data:{plugin:e.name,payload:t}})}}}))||[]},C)};ce.addLoadListener(function(e){try{var t=e.contentDocument,r=fe(t);ge.push(r);var n=ce.getObserverCleanup(e);ce.setObserverCleanup(e,function(){if(n)try{n()}catch{}try{r();var e=ge.indexOf(r);-1!==e&&ge.splice(e,1),function(e){for(var t=MN.length-1;t>=0;t--)MN[t].getDoc()===e&&MN.splice(t,1)}(t)}catch{}})}catch(e){console.warn(e)}});var me=function(){mR(),ge.push(fe(document)),bR=!0};return"interactive"===document.readyState||"complete"===document.readyState?me():(ge.push(eN("DOMContentLoaded",function(){fR({type:wN.DomContentLoaded,data:{}}),"DOMContentLoaded"===F&&me()})),ge.push(eN("load",function(){fR({type:wN.Load,data:{}}),"load"===F&&me()},window))),function(){ge.forEach(function(e){try{e()}catch(e){String(e).toLowerCase().includes("cross-origin")||console.warn(e)}}),he.destroy(),bR=!1,AN=void 0}}catch(e){console.warn(e)}}_R.addCustomEvent=function(e,t){if(!bR)throw new Error("please add custom event after start recording");fR({type:wN.Custom,data:{tag:e,payload:t}}
3066)},_R.freezePage=function(){MN.forEach(function(e){return e.freeze()})},_R.takeFullSnapshot=function(e){if(!bR)throw new Error("please take full snapshot after start recording");mR(e)},_R.mirror=xR,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(wR||(wR={})),_R.addCustomEvent,_R.freezePage,_R.takeFullSnapshot;var kR={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},CR={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},SR={};function ER(e){if(SR[e])return SR[e];var t=globalThis[e],r=t.prototype,n=e in kR?kR[e]:void 0,o=!(!n||!n.every(function(e){var t,n;return!(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)||!n.toString().includes("[native code]"))})),i=e in CR?CR[e]:void 0,s=!(!i||!i.every(function(e){var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(o&&s&&!globalThis.Zone)return SR[e]=t.prototype,t.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var l=a.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(a),c?SR[e]=c:r}catch{return r}}var IR={};function AR(e,t,r){var n,o=e+"."+String(r);if(IR[o])return IR[o].call(t);var i=ER(e),s=null==(n=Object.getOwnPropertyDescriptor(i,r))?void 0:n.get;return s?(IR[o]=s,s.call(t)):t[r]}var TR=function(e){return AR("Node",e,"parentNode")};function OR(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return OR(TR(e),t);for(var n=e.classList.length;n--;){var o=e.classList[n];if(t.test(o))return!0}return OR(TR(e),t)}function LR(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function $R(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return ZC(this,e)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var NR={exports:{}},RR=String,PR=function(){return{isColorSupported:!1,reset:RR,bold:RR,dim:RR,italic:RR,underline:RR,inverse:RR,hidden:RR,strikethrough:RR,black:RR,red:RR,green:RR,yellow:RR,blue:RR,magenta:RR,cyan:RR,white:RR,gray:RR,bgBlack:RR,bgRed:RR,bgGreen:RR,bgYellow:RR,bgBlue:RR,bgMagenta:RR,bgCyan:RR,bgWhite:RR}};NR.exports=PR(),NR.exports.createColors=PR;var DR=NR.exports,MR=$R(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),zR=DR,FR=MR,UR=function(e){function t(r,n,o,i,s,a){var l;return(l=e.call(this,r)||this).name="CssSyntaxError",l.reason=r,s&&(l.file=s),i&&(l.source=i),a&&(l.plugin=a),typeof n<"u"&&typeof o<"u"&&("number"==typeof n?(l.line=n,l.column=o):(l.line=n.line,l.column=n.column,l.endLine=o.line,l.endColumn=o.column)),l.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(l,t),l}GC(t,e);var r=t.prototype;return r.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},r.showSourceCode=function(e){var t=this;if(!this.source)return"";var r=this.source;null==e&&(e=zR.isColorSupported),FR&&e&&(r=FR(r));var n,o,i=r.split(/\r?\n/),s=Math.max(this.line-3,0),a=Math.min(this.line+2,i.length),l=String(a).length;if(e){var c=zR.createColors(!0),d=c.bold,u=c.gray,h=c.red;n=function(e){return d(h(e))},o=function(e){return u(e)}}else n=o=function(e){return e};return i.slice(s,a).map(function(e,r){var i=s+1+r,a=" "+(" "+i).slice(-l)+" | ";if(i===t.line){var c=o(a.replace(/\d/g," "))+e.slice(0,t.column-1).replace(/[^\t]/g," ");return n(">")+o(a)+e+"\n "+c+n("^")}return" "+o(a)+e}).join("\n")},r.toString=function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e},t}(XC(Error)),BR=UR;UR.default=UR;var HR={};HR.isClean=Symbol("isClean"),HR.my=Symbol("my");var jR={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1},VR=function(){function e(e){this.builder=e}var t=e.prototype;
3066return t.atrule=function(e,t){var r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{var o=(e.raws.between||"")+(t?";":"");this.builder(r+n+o,e)}},t.beforeAfter=function(e,t){var r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var n=e.parent,o=0;n&&"root"!==n.type;)o+=1,n=n.parent;if(r.includes("\n")){var i=this.raw(e,null,"indent");if(i.length)for(var s=0;s<o;s++)r+=i}return r},t.block=function(e,t){var r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")},t.body=function(e){for(var t=e.nodes.length-1;t>0&&"comment"===e.nodes[t].type;)t-=1;for(var r=this.raw(e,"semicolon"),n=0;n<e.nodes.length;n++){var o=e.nodes[n],i=this.raw(o,"before");i&&this.builder(i),this.stringify(o,t!==n||r)}},t.comment=function(e){var t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)},t.decl=function(e,t){var r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)},t.document=function(e){this.body(e)},t.raw=function(e,t,r){var n;if(r||(r=t),t&&typeof(n=e.raws[t])<"u")return n;var o=e.parent;if("before"===r&&(!o||"root"===o.type&&o.first===e||o&&"document"===o.type))return"";if(!o)return jR[r];var i=e.root();if(i.rawCache||(i.rawCache={}),typeof i.rawCache[r]<"u")return i.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);var s="raw"+function(e){return e[0].toUpperCase()+e.slice(1)}(r);return this[s]?n=this[s](i,e):i.walk(function(e){if(typeof(n=e.raws[t])<"u")return!1}),typeof n>"u"&&(n=jR[r]),i.rawCache[r]=n,n},t.rawBeforeClose=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length>0&&typeof e.raws.after<"u")return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawBeforeComment=function(e,t){var r;return e.walkComments(function(e){if(typeof e.raws.before<"u")return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r},t.rawBeforeDecl=function(e,t){var r;return e.walkDecls(function(e){if(typeof e.raws.before<"u")return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r},t.rawBeforeOpen=function(e){var t;return e.walk(function(e){if("decl"!==e.type&&typeof(t=e.raws.between)<"u")return!1}),t},t.rawBeforeRule=function(e){var t;return e.walk(function(r){if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return(t=r.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawColon=function(e){var t;return e.walkDecls(function(e){if(typeof e.raws.between<"u")return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t},t.rawEmptyBody=function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&typeof(t=e.raws.after)<"u")return!1}),t},t.rawIndent=function(e){return e.raws.indent?e.raws.indent:(e.walk(function(r){var n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof r.raws.before<"u"){var o=r.raws.before.split("\n");return t=(t=o[o.length-1]).replace(/\S/g,""),!1}}),t);var t},t.rawSemicolon=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&typeof(t=e.raws.semicolon)<"u")return!1}),t},t.rawValue=function(e,t){var r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r},t.root=function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)},t.rule=function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")},t.stringify=function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)},e}(),WR=VR;VR.default=VR;var KR=WR;function qR(e,t){new KR(t).stringify(e)}var GR=qR;qR.default=qR;var ZR=HR.isClean,YR=HR.my,JR=BR,QR=WR,XR=GR;function eP(e,t){var r=new e.constructor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&"proxyCache"!==n){var o=e[n],i=typeof o>"u"?"undefined":QC(o);"parent"===n&&"object"===i?t&&(r[n]=t):"source"===n?r[n]=o:Array.isArray(o)?r[n]=o.map(function(e){return eP(e,r)}):("object"===i&&null!==o&&(o=eP(o)),r[n]=o)}return r}var tP=function(){function e(e){for(var t in void 0===e&&(e={}),this.raws={},this[ZR]=!1,this[YR]=!0,e)if("nodes"===t){this.nodes=[];for(var r,n=tS(e[t]);!(r=n()).done;){var o=r.value;"function"==typeof o.clone?this.append(o.clone()):this.append(o)}}else this[t]=e[t]}var t=e.prototype;return t.addToError=function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&"+t.input.from+":"+t.start.line+":"+t.start.column+"$&")}return e},t.after=function(e){return this.parent.insertAfter(this,e),this},t.assign=function(e){for(var t in void 0===e&&(e={}),e)this[t]=e[t];return this},t.before=function(e){return this.parent.insertBefore(this,e),this},t.cleanRaws=function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between},t.clone=function(e){void 0===e&&(e={});var t=eP(this);for(var r in e)t[r]=e[r];return t},t.cloneAfter=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t},t.cloneBefore=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t},t.error=function(e,t){if(void 0===t&&(t={}),this.source){var r=this.rangeBy(t),n=r.end,o=r.start;return this.source.input.error(e,{column:o.column,line:o.line},{column:n.column,line:n.line},t)}return new JR(e)},t.getProxyProcessor=function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,r){return e[t]===r||(e[t]=r,("prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty()),!0}}},t.markDirty=function(){if(this[ZR]){this[ZR]=!1;for(var e=this;e=e.parent;)e[ZR]=!1}},t.next=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}},t.positionBy=function(e,t){var r=this.source.start;if(e.index)r=this.positionInside(e.index,t);
3066else if(e.word){var n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r},t.positionInside=function(e,t){for(var r=t||this.toString(),n=this.source.start.column,o=this.source.start.line,i=0;i<e;i++)"\n"===r[i]?(n=1,o+=1):n+=1;return{column:n,line:o}},t.prev=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e-1]}},t.rangeBy=function(e){var t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){var n=this.toString(),o=n.indexOf(e.word);-1!==o&&(t=this.positionInside(o,n),r=this.positionInside(o+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}},t.raw=function(e,t){return(new QR).raw(this,e,t)},t.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.replaceWith=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(this.parent){for(var n,o=this,i=!1,s=tS(t);!(n=s()).done;){var a=n.value;a===this?i=!0:i?(this.parent.insertAfter(o,a),o=a):this.parent.insertBefore(o,a)}i||this.remove()}return this},t.root=function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e},t.toJSON=function(e,t){var r={},n=null==t;t=t||new Map;var o=0;for(var i in this)if(Object.prototype.hasOwnProperty.call(this,i)&&"parent"!==i&&"proxyCache"!==i){var s=this[i];if(Array.isArray(s))r[i]=s.map(function(e){return"object"===(typeof e>"u"?"undefined":QC(e))&&e.toJSON?e.toJSON(null,t):e});else if("object"===(typeof s>"u"?"undefined":QC(s))&&s.toJSON)r[i]=s.toJSON(null,t);else if("source"===i){var a=t.get(s.input);null==a&&(a=o,t.set(s.input,o),o++),r[i]={end:s.end,inputId:a,start:s.start}}else r[i]=s}return n&&(r.inputs=[].concat(t.keys()).map(function(e){return e.toJSON()})),r},t.toProxy=function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache},t.toString=function(e){void 0===e&&(e=XR),e.stringify&&(e=e.stringify);var t="";return e(this,function(e){t+=e}),t},t.warn=function(e,t,r){var n={node:this};for(var o in r)n[o]=r[o];return e.warn(t,n)},WC(e,[{key:"proxyOf",get:function(){return this}}]),e}(),rP=tP;tP.default=tP;var nP=function(e){function t(t){var r;return t&&typeof t.value<"u"&&"string"!=typeof t.value&&(t=KC({},t,{value:String(t.value)})),(r=e.call(this,t)||this).type="decl",r}return GC(t,e),WC(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),t}(rP),oP=nP;nP.default=nP;var iP=MR.SourceMapConsumer,sP=MR.SourceMapGenerator,aP=MR.existsSync,lP=MR.readFileSync,cP=MR.dirname,dP=MR.join,uP=function(){function e(e,t){if(!1!==t.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=cP(this.mapFile)),n&&(this.text=n)}}var t=e.prototype;return t.consumer=function(){return this.consumerCache||(this.consumerCache=new iP(this.text)),this.consumerCache},t.decodeInline=function(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return function(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}(e.substr(RegExp.lastMatch.length));var t=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+t)},t.getAnnotationURL=function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()},t.isMap=function(e){return"object"===(typeof e>"u"?"undefined":QC(e))&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))},t.loadAnnotation=function(e){var t=e.match(/\/\*\s*# sourceMappingURL=/gm);
3066if(t){var r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}},t.loadFile=function(e){if(this.root=cP(e),aP(e))return this.mapFile=e,lP(e,"utf-8").toString().trim()},t.loadMap=function(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(ZC(t,iP))return sP.fromSourceMap(t).toString();if(ZC(t,sP))return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var r=t(e);if(r){var n=this.loadFile(r);if(!n)throw new Error("Unable to load previous source map: "+r.toString());return n}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var o=this.annotation;return e&&(o=dP(cP(e),o)),this.loadFile(o)}}},t.startWith=function(e,t){return!!e&&e.substr(0,t.length)===t},t.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e}(),hP=uP;uP.default=uP;var pP=MR.SourceMapConsumer,gP=MR.SourceMapGenerator,fP=MR.fileURLToPath,mP=MR.pathToFileURL,vP=MR.isAbsolute,bP=MR.resolve,yP=function(e){void 0===e&&(e=21);for(var t="",r=e;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}
3066,wP=MR,xP=BR,_P=hP,kP=Symbol("fromOffsetCache"),CP=!(!pP||!gP),SP=!(!bP||!vP),EP=function(){function e(e,t){if(void 0===t&&(t={}),null===e||typeof e>"u"||"object"===(typeof e>"u"?"undefined":QC(e))&&!e.toString)throw new Error("PostCSS received "+e+" instead of CSS string");if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!SP||/^\w+:\/\//.test(t.from)||vP(t.from)?this.file=t.from:this.file=bP(t.from)),SP&&CP){var r=new _P(this.css,t);if(r.text){this.map=r;var n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+yP(6)+">"),this.map&&(this.map.file=this.from)}var t=e.prototype;return t.error=function(e,t,r,n){var o,i,s;if(void 0===n&&(n={}),t&&"object"===(typeof t>"u"?"undefined":QC(t))){var a=t,l=r;if("number"==typeof a.offset){var c=this.fromOffset(a.offset);t=c.line,r=c.col}else t=a.line,r=a.column;if("number"==typeof l.offset){var d=this.fromOffset(l.offset);i=d.line,s=d.col}else i=l.line,s=l.column}else if(!r){var u=this.fromOffset(t);t=u.line,r=u.col}var h=this.origin(t,r,i,s);return(o=h?new xP(e,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,n.plugin):new xP(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:s,line:i},this.css,this.file,n.plugin)).input={column:r,endColumn:s,endLine:i,line:t,source:this.css},this.file&&(mP&&(o.input.url=mP(this.file).toString()),o.input.file=this.file),o},t.fromOffset=function(e){var t;if(this[kP])t=this[kP];else{var r=this.css.split("\n");t=new Array(r.length);for(var n=0,o=0,i=r.length;o<i;o++)t[o]=n,n+=r[o].length+1;this[kP]=t}var s=0;if(e>=t[t.length-1])s=t.length-1;else for(var a,l=t.length-2;s<l;)if(e<t[a=s+(l-s>>1)])l=a-1;else{if(!(e>=t[a+1])){s=a;break}s=a+1}return{col:e-t[s]+1,line:s+1}},t.mapResolve=function(e){return/^\w+:\/\//.test(e)?e:bP(this.map.consumer().sourceRoot||this.map.root||".",e)},t.origin=function(e,t,r,n){if(!this.map)return!1;var o,i,s=this.map.consumer(),a=s.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(o=s.originalPositionFor({column:n,line:r})),i=vP(a.source)?mP(a.source):new URL(a.source,this.map.consumer().sourceRoot||mP(this.map.mapFile));var l={column:a.column,endColumn:o&&o.column,endLine:o&&o.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!fP)throw new Error("file: protocol is not available in this PostCSS build");l.file=fP(i)}var c=s.sourceContentFor(a.source);return c&&(l.source=c),l},t.toJSON=function(){for(var e={},t=0,r=["hasBOM","css","file","id"];t<r.length;t++){var n=r[t];null!=this[n]&&(e[n]=this[n])}return this.map&&(e.map=KC({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e},WC(e,[{key:"from",get:function(){return this.file||this.id}}]),e}(),IP=EP;EP.default=EP,wP&&wP.registerInput&&wP.registerInput(EP);var AP=MR.SourceMapConsumer,TP=MR.SourceMapGenerator,OP=MR.dirname,LP=MR.relative,$P=MR.resolve,NP=MR.sep,RP=MR.pathToFileURL,PP=IP,DP=!(!AP||!TP),MP=!!(OP&&$P&&LP&&NP),zP=function(){function e(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}var t=e.prototype;return t.addAnnotation=function(){var e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"},t.applyPrevMaps=function(){for(var e,t=tS(this.previous());!(e=t()).done;){var r=e.value,n=this.toUrl(this.path(r.file)),o=r.root||OP(r.file),i=void 0;!1===this.mapOpts.sourcesContent?(i=new AP(r.text)).sourcesContent&&(i.sourcesContent=null):i=r.consumer(),this.map.applySourceMap(i,n,this.toUrl(this.path(o)))}},t.clearAnnotation=function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))},t.generate=function(){if(this.clearAnnotation(),MP&&DP&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]},t.generateMap=function(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=TP.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new TP({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},t.generateString=function(){var e=this;this.css="",this.map=new TP({file:this.outputFile(),ignoreInvalidMapping:!0});var t,r,n=1,o=1,i="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(a,l,c){if(e.css+=a,l&&"end"!==c&&(s.generated.line=n,s.generated.column=o-1,l.source&&l.source.start?(s.source=e.sourcePath(l),s.original.line=l.source.start.line,s.original.column=l.source.start.column-1,e.map.addMapping(s)):(s.source=i,s.original.line=1,s.original.column=0,e.map.addMapping(s))),(t=a.match(/\n/g))?(n+=t.length,r=a.lastIndexOf("\n"),o=a.length-r):o+=a.length,l&&"start"!==c){var d=l.parent||{raws:{}};("decl"!==l.type&&("atrule"!==l.type||l.nodes)||l!==d.last||d.raws.semicolon)&&(l.source&&l.source.end?(s.source=e.sourcePath(l),s.original.line=l.source.end.line,s.original.column=l.source.end.column-1,s.generated.line=n,s.generated.column=o-2,e.map.addMapping(s)):(s.source=i,s.original.line=1,s.original.column=0,s.generated.line=n,s.generated.column=o-1,e.map.addMapping(s)))}})},t.isAnnotation=function(){return!!this.isInline()||(typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))},t.isInline=function(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;var e=this.mapOpts.annotation;return!(typeof e<"u"&&!0!==e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))},t.isMap=function(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0},t.isSourcesContent=function(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})},t.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"},t.path=function(e){if(this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var r=this.opts.to?OP(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=OP($P(r,this.mapOpts.annotation)));var n=LP(r,e);return this.memoizedPaths.set(e,n),n},t.previous=function(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var r=t.source.input.map;e.previousMaps.includes(r)||e.previousMaps.push(r)}});else{var t=new PP(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps},t.setSourcesContent=function(){var e=this,t={};if(this.root)this.root.walk(function(r){if(r.source){var n=r.source.input.from;if(n&&!t[n]){t[n]=!0;var o=e.usesFileUrls?e.toFileUrl(n):e.toUrl(e.path(n));e.map.setSourceContent(o,r.source.input.css)}}});else if(this.css){var r=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(r,this.css)}},t.sourcePath=function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))},t.toBase64=function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))},t.toFileUrl=function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(RP){var r=RP(e).toString();return this.memoizedFileURLs.set(e,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")},t.toUrl=function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===NP&&(e=e.replace(/\\/g,"/"));var r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r},e}(),FP=zP,UP=function(e){function t(t){var r;return(r=e.call(this,t)||this).type="comment",r}return GC(t,e),t}(rP),BP=UP;UP.default=UP;var HP,jP,VP,WP,KP=HR.isClean,qP=HR.my,GP=oP,ZP=BP;
3066function YP(e){return e.map(function(e){return e.nodes&&(e.nodes=YP(e.nodes)),delete e.source,e})}function JP(e){if(e[KP]=!1,e.proxyOf.nodes)for(var t,r=tS(e.proxyOf.nodes);!(t=r()).done;)JP(t.value)}var QP=function(e){function t(){return e.apply(this,arguments)||this}GC(t,e);var r=t.prototype;return r.append=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n,o=tS(t);!(n=o()).done;)for(var i,s=n.value,a=tS(this.normalize(s,this.last));!(i=a()).done;){var l=i.value;this.proxyOf.nodes.push(l)}return this.markDirty(),this},r.cleanRaws=function(t){if(e.prototype.cleanRaws.call(this,t),this.nodes)for(var r,n=tS(this.nodes);!(r=n()).done;)r.value.cleanRaws(t)},r.each=function(e){if(this.proxyOf.nodes){for(var t,r,n=this.getIterator();this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],!1!==(r=e(this.proxyOf.nodes[t],t)));)this.indexes[n]+=1;return delete this.indexes[n],r}},r.every=function(e){return this.nodes.every(e)},r.getIterator=function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e},r.getProxyProcessor=function(){return{get:function(e,t){return"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];var i;return(i=e)[t].apply(i,[].concat(n.map(function(e){return"function"==typeof e?function(t,r){return e(t.toProxy(),r)}:e})))}:"every"===t||"some"===t?function(r){return e[t](function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return r.apply(void 0,[].concat([e.toProxy()],n))})}:"root"===t?function(){return e.root().toProxy()}:"nodes"===t?e.nodes.map(function(e){return e.toProxy()}):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]},set:function(e,t,r){return e[t]===r||(e[t]=r,("name"===t||"params"===t||"selector"===t)&&e.markDirty()),!0}}},r.index=function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))},r.insertAfter=function(e,t){var r,n=this.index(e),o=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(var i,s=tS(o);!(i=s()).done;){var a=i.value;this.proxyOf.nodes.splice(n+1,0,a)}for(var l in this.indexes)n<(r=this.indexes[l])&&(this.indexes[l]=r+o.length);return this.markDirty(),this},r.insertBefore=function(e,t){var r,n=this.index(e),o=0===n&&"prepend",i=this.normalize(t,this.proxyOf.nodes[n],o).reverse();n=this.index(e);for(var s,a=tS(i);!(s=a()).done;){var l=s.value;this.proxyOf.nodes.splice(n,0,l)}for(var c in this.indexes)n<=(r=this.indexes[c])&&(this.indexes[c]=r+i.length);return this.markDirty(),this},r.normalize=function(e,r){var n=this;if("string"==typeof e)e=YP(HP(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e))for(var o,i=tS(e=e.slice(0));!(o=i()).done;){var s=o.value;s.parent&&s.parent.removeChild(s,"ignore")}else if("root"===e.type&&"document"!==this.type)for(var a,l=tS(e=e.nodes.slice(0));!(a=l()).done;){var c=a.value;c.parent&&c.parent.removeChild(c,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new GP(e)]}else if(e.selector)e=[new jP(e)];else if(e.name)e=[new VP(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new ZP(e)]}var d=e.map(function(e){return e[qP]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[KP]&&JP(e),typeof e.raws.before>"u"&&r&&typeof r.raws.before<"u"&&(e.raws.before=r.raws.before.replace(/\S/g,"")),e.parent=n.proxyOf,e});return d},r.prepend=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n,o=tS(t=t.reverse());!(n=o()).done;){for(var i,s=n.value,a=this.normalize(s,this.first,"prepend").reverse(),l=tS(a);!(i=l()).done;){var c=i.value;this.proxyOf.nodes.unshift(c)}for(var d in this.indexes)this.indexes[d]=this.indexes[d]+a.length}return this.markDirty(),this},r.push=function(e){return e.parent=this,this.proxyOf.nodes.push(e),this},r.removeAll=function(){for(var e,t=tS(this.proxyOf.nodes);!(e=t()).done;)e.value.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this},r.removeChild=function(e){var t;for(var r in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[r])>=e&&(this.indexes[r]=t-1);return this.markDirty(),this},r.replaceValues=function(e,t,r){return r||(r=t,t={}),this.walkDecls(function(n){t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this}
3066,r.some=function(e){return this.nodes.some(e)},r.walk=function(e){return this.each(function(t,r){var n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n})},r.walkAtRules=function(e,t){return t?ZC(e,RegExp)?this.walk(function(r,n){if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk(function(r,n){if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk(function(e,r){if("atrule"===e.type)return t(e,r)}))},r.walkComments=function(e){return this.walk(function(t,r){if("comment"===t.type)return e(t,r)})},r.walkDecls=function(e,t){return t?ZC(e,RegExp)?this.walk(function(r,n){if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk(function(r,n){if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk(function(e,r){if("decl"===e.type)return t(e,r)}))},r.walkRules=function(e,t){return t?ZC(e,RegExp)?this.walk(function(r,n){if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk(function(r,n){if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk(function(e,r){if("rule"===e.type)return t(e,r)}))},WC(t,[{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),t}(rP);QP.registerParse=function(e){HP=e},QP.registerRule=function(e){jP=e},QP.registerAtRule=function(e){VP=e},QP.registerRoot=function(e){WP=e};var XP=QP;QP.default=QP,QP.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,VP.prototype):"rule"===e.type?Object.setPrototypeOf(e,jP.prototype):"decl"===e.type?Object.setPrototypeOf(e,GP.prototype):"comment"===e.type?Object.setPrototypeOf(e,ZP.prototype):"root"===e.type&&Object.setPrototypeOf(e,WP.prototype),e[qP]=!0,e.nodes&&e.nodes.forEach(function(e){QP.rebuild(e)})};var eD,tD,rD=function(e){function t(t){var r;return(r=e.call(this,KC({type:"document"},t))||this).nodes||(r.nodes=[]),r}return GC(t,e),t.prototype.toResult=function(e){return void 0===e&&(e={}),new eD(new tD,this,e).stringify()},t}(XP);rD.registerLazyResult=function(e){eD=e},rD.registerProcessor=function(e){tD=e};var nD=rD;rD.default=rD;var oD=function(){function e(e,t){if(void 0===t&&(t={}),this.type="warning",this.text=e,t.node&&t.node.source){var r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var n in t)this[n]=t[n]}return e.prototype.toString=function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},e}(),iD=oD;oD.default=oD;var sD=iD,aD=function(){function e(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}var t=e.prototype;return t.toString=function(){return this.css},t.warn=function(e,t){void 0===t&&(t={}),t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);var r=new sD(e,t);return this.messages.push(r),r},t.warnings=function(){return this.messages.filter(function(e){return"warning"===e.type})},WC(e,[{key:"content",get:function(){return this.css}}]),e}(),lD=aD;aD.default=aD;var cD=/[\t\n\f\r "#'()/;[\\\]{}]/g,dD=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,uD=/.[\r\n"'(/\\]/,hD=/[\da-f]/i,pD=XP,gD=function(e){function t(t){var r;return(r=e.call(this,t)||this).type="atrule",r}GC(t,e);var r=t.prototype;return r.append=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o;return this.proxyOf.nodes||(this.nodes=[]),(o=e.prototype.append).call.apply(o,[].concat([this],r))},r.prepend=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o;return this.proxyOf.nodes||(this.nodes=[]),(o=e.prototype.prepend).call.apply(o,[].concat([this],r))},t}(pD),fD=gD;gD.default=gD,pD.registerAtRule(gD);var mD,vD,bD=XP,yD=function(e){function t(t){var r;return(r=e.call(this,t)||this).type="root",r.nodes||(r.nodes=[]),r}GC(t,e);var r=t.prototype;return r.normalize=function(t,r,n){var o=e.prototype.normalize.call(this,t);if(r)if("prepend"===n)this.nodes.length>1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r)for(var i,s=tS(o);!(i=s()).done;)i.value.raws.before=r.raws.before;return o},r.removeChild=function(t,r){var n=this.index(t);return!r&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),e.prototype.removeChild.call(this,t)},r.toResult=function(e){return void 0===e&&(e={}),new mD(new vD,this,e).stringify()},t}(bD);yD.registerLazyResult=function(e){mD=e},yD.registerProcessor=function(e){vD=e};var wD=yD;yD.default=yD,bD.registerRoot(yD);var xD={comma:function(e){return xD.split(e,[","],!0)},space:function(e){return xD.split(e,[" ","\n","\t"])},split:function(e,t,r){for(var n,o=[],i="",s=!1,a=0,l=!1,c="",d=!1,u=tS(e);!(n=u()).done;){var h=n.value;d?d=!1:"\\"===h?d=!0:l?h===c&&(l=!1):'"'===h||"'"===h?(l=!0,c=h):"("===h?a+=1:")"===h?a>
30660&&(a-=1):0===a&&t.includes(h)&&(s=!0),s?(""!==i&&o.push(i.trim()),i="",s=!1):i+=h}return(r||""!==i)&&o.push(i.trim()),o}},_D=xD;xD.default=xD;var kD=XP,CD=_D,SD=function(e){function t(t){var r;return(r=e.call(this,t)||this).type="rule",r.nodes||(r.nodes=[]),r}return GC(t,e),WC(t,[{key:"selectors",get:function(){return CD.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}]),t}(kD),ED=SD;SD.default=SD,kD.registerRule(SD);var ID=oP,AD=BP,TD=fD,OD=wD,LD=ED,$D={empty:!0,space:!0},ND=function(){function e(e){this.input=e,this.root=new OD,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}var t=e.prototype;return t.atrule=function(e){var t=new TD;t.name=e[1].slice(1),""===t.name&&this.unnamedAtrule(t,e),this.init(t,e[2]);for(var r,n,o,i=!1,s=!1,a=[],l=[];!this.tokenizer.endOfFile();){if("("===(r=(e=this.tokenizer.nextToken())[0])||"["===r?l.push("("===r?")":"]"):"{"===r&&l.length>0?l.push("}"):r===l[l.length-1]&&l.pop(),0===l.length){if(";"===r){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}if("{"===r){s=!0;break}if("}"===r){if(a.length>0){for(n=a[o=a.length-1];n&&"space"===n[0];)n=a[--o];n&&(t.source.end=this.getPosition(n[3]||n[2]),t.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),i&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),s&&(t.nodes=[],this.current=t)},t.checkMissedSemicolon=function(e){var t=this.colon(e);if(!1!==t){for(var r,n=0,o=t-1;o>=0&&("space"===(r=e[o])[0]||2!==(n+=1));o--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}},t.colon=function(e){for(var t,r,n,o,i=0,s=tS(e.entries());!(o=s()).done;){var a=o.value,l=a[0];if("("===(r=(t=a[1])[0])&&(i+=1),")"===r&&(i-=1),0===i&&":"===r){if(n){if("word"===n[0]&&"progid"===n[1])continue;return l}this.doubleColon(t)}n=t}return!1},t.comment=function(e){var t=new AD;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{var n=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=n[2],t.raws.left=n[1],t.raws.right=n[3]}},t.createTokenizer=function(){this.tokenizer=function(e,t){void 0===t&&(t={});var r,n,o,i,s,a,l,c,d,u,h=e.css.valueOf(),p=t.ignoreErrors,g=h.length,f=0,m=[],v=[];function b(t){throw e.error("Unclosed "+t,f)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&f>=g},nextToken:function(e){if(v.length)return v.pop();if(!(f>=g)){var t=!!e&&e.ignoreUnclosed;switch(r=h.charCodeAt(f)){case 10:case 32:case 9:case 13:case 12:n=f;do{n+=1,r=h.charCodeAt(n)}while(32===r||10===r||9===r||13===r||12===r);u=["space",h.slice(f,n)],f=n-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:var y=String.fromCharCode(r);u=[y,y,f];break;case 40:if(c=m.length?m.pop()[1]:"",d=h.charCodeAt(f+1),"url"===c&&39!==d&&34!==d&&32!==d&&10!==d&&9!==d&&12!==d&&13!==d){n=f;do{if(a=!1,-1===(n=h.indexOf(")",n+1))){if(p||t){n=f;break}b("bracket")}for(l=n;
306692===h.charCodeAt(l-1);)l-=1,a=!a}while(a);u=["brackets",h.slice(f,n+1),f,n],f=n}else n=h.indexOf(")",f+1),i=h.slice(f,n+1),-1===n||uD.test(i)?u=["(","(",f]:(u=["brackets",i,f,n],f=n);break;case 39:case 34:o=39===r?"'":'"',n=f;do{if(a=!1,-1===(n=h.indexOf(o,n+1))){if(p||t){n=f+1;break}b("string")}for(l=n;92===h.charCodeAt(l-1);)l-=1,a=!a}while(a);u=["string",h.slice(f,n+1),f,n],f=n;break;case 64:cD.lastIndex=f+1,cD.test(h),n=0===cD.lastIndex?h.length-1:cD.lastIndex-2,u=["at-word",h.slice(f,n+1),f,n],f=n;break;case 92:for(n=f,s=!0;92===h.charCodeAt(n+1);)n+=1,s=!s;if(r=h.charCodeAt(n+1),s&&47!==r&&32!==r&&10!==r&&9!==r&&13!==r&&12!==r&&(n+=1,hD.test(h.charAt(n)))){for(;hD.test(h.charAt(n+1));)n+=1;32===h.charCodeAt(n+1)&&(n+=1)}u=["word",h.slice(f,n+1),f,n],f=n;break;default:47===r&&42===h.charCodeAt(f+1)?(0===(n=h.indexOf("*/",f+2)+1)&&(p||t?n=h.length:b("comment")),u=["comment",h.slice(f,n+1),f,n],f=n):(dD.lastIndex=f+1,dD.test(h),n=0===dD.lastIndex?h.length-1:dD.lastIndex-2,u=["word",h.slice(f,n+1),f,n],m.push(u),f=n)}return f++,u}},position:function(){return f}}}(this.input)},t.decl=function(e,t){var r=new ID;this.init(r,e[0][2]);var n,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(o[3]||o[2]||function(e){for(var t=e.length-1;t>=0;t--){var r=e[t],n=r[3]||r[2];if(n)return n}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){var i=e[0][0];if(":"===i||"space"===i||"comment"===i)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(":"===(n=e.shift())[0]){r.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1]}("_"===r.prop[0]||"*"===r.prop[0])&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));for(var s,a=[];e.length&&("space"===(s=e[0][0])||"comment"===s);)a.push(e.shift());this.precheckMissedSemicolon(e);for(var l=e.length-1;l>=0;l--){if("!important"===(n=e[l])[1].toLowerCase()){r.important=!0;var c=this.stringFrom(e,l);" !important"!==(c=this.spacesFromEnd(e)+c)&&(r.raws.important=c);break}if("important"===n[1].toLowerCase()){for(var d=e.slice(0),u="",h=l;h>0;h--){var p=d[h][0];if(0===u.trim().indexOf("!")&&"space"!==p)break;u=d.pop()[1]+u}0===u.trim().indexOf("!")&&(r.important=!0,r.raws.important=u,e=d)}if("space"!==n[0]&&"comment"!==n[0])break}var g=e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]});g&&(r.raws.between+=a.map(function(e){return e[1]}).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)},t.doubleColon=function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})},t.emptyRule=function(e){var t=new LD;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t},t.end=function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)},t.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())},t.freeSemicolon=function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}},t.getPosition=function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}},t.init=function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)},t.other=function(e){for(var t=!1,r=null,n=!1,o=null,i=[],s=e[1].startsWith("--"),a=[],l=e;l;){if(r=l[0],a.push(l),"("===r||"["===r)o||(o=l),i.push("("===r?")":"]");else if(s&&n&&"{"===r)o||(o=l),i.push("}");else if(0===i.length){if(";"===r){if(n)return void this.decl(a,s);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(o=null));l=this.tokenizer.nextToken()}
3066if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(o),t&&n){if(!s)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)},t.parse=function(){for(var e;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()},t.precheckMissedSemicolon=function(){},t.raw=function(e,t,r,n){for(var o,i,s,a,l=r.length,c="",d=!0,u=0;u<l;u+=1)"space"!==(i=(o=r[u])[0])||u!==l-1||n?"comment"===i?(a=r[u-1]?r[u-1][0]:"empty",s=r[u+1]?r[u+1][0]:"empty",$D[a]||$D[s]||","===c.slice(-1)?d=!1:c+=o[1]):c+=o[1]:d=!1;if(!d){var h=r.reduce(function(e,t){return e+t[1]},"");e.raws[t]={raw:h,value:c}}e[t]=c},t.rule=function(e){e.pop();var t=new LD;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t},t.spacesAndCommentsFromEnd=function(e){for(var t,r="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r},t.spacesAndCommentsFromStart=function(e){for(var t,r="";e.length&&("space"===(t=e[0][0])||"comment"===t);)r+=e.shift()[1];return r},t.spacesFromEnd=function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t},t.stringFrom=function(e,t){for(var r="",n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r},t.unclosedBlock=function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)},t.unclosedBracket=function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})},t.unexpectedClose=function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})},t.unknownWord=function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})},t.unnamedAtrule=function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})},e}(),RD=XP,PD=ND,DD=IP;function MD(e,t){var r=new DD(e,t),n=new PD(r);try{n.parse()}catch(e){throw e}return n.root}var zD=MD;MD.default=MD,RD.registerParse(MD);var FD=HR.isClean,UD=HR.my,BD=FP,HD=GR,jD=XP,VD=nD,WD=lD,KD=zD,qD=wD,GD={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ZD={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},YD={Once:!0,postcssPlugin:!0,prepare:!0};function JD(e){return"object"===(typeof e>"u"?"undefined":QC(e))&&"function"==typeof e.then}function QD(e){var t=!1,r=GD[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function XD(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:QD(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function eM(e){return e[FD]=!1,e.nodes&&e.nodes.forEach(function(e){return eM(e)}),e}var tM={},rM=function(){function e(t,r,n){var o,i=this;if(this.stringified=!1,this.processed=!1,"object"!==(typeof r>"u"?"undefined":QC(r))||null===r||"root"!==r.type&&"document"!==r.type)if(ZC(r,e)||ZC(r,WD))o=eM(r.root),r.map&&(typeof n.map>"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{var s=KD;n.syntax&&(s=n.syntax.parse),n.parser&&(s=n.parser),s.parse&&(s=s.parse);try{o=s(r,n)}catch(e){this.processed=!0,this.error=e}o&&!o[UD]&&jD.rebuild(o)}else o=eM(r);this.result=new WD(t,o,n),this.helpers=KC({},tM,{postcss:tM,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===(typeof e>"u"?"undefined":QC(e))&&e.prepare?KC({},e,e.prepare(i.result)):e})}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)},t.catch=function(e){return this.async().catch(e)},t.finally=function(e){return this.async().then(e,e)},t.getAsyncError=function(){throw new Error("Use process(css).then(cb) to work with async plugins")},t.handleError=function(e,t){var r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e},t.prepareVisitors=function(){var e=this;this.listeners={};for(var t,r=function(t,r,n){e.listeners[r]||(e.listeners[r]=[]),e.listeners[r].push([t,n])},n=tS(this.plugins);!(t=n()).done;){var o=t.value;if("object"===(typeof o>"u"?"undefined":QC(o)))for(var i in o){if(!ZD[i]&&/^[A-Z]/.test(i))throw new Error("Unknown event "+i+" in "+o.postcssPlugin+". Try to update PostCSS ("+this.processor.ver
3066sion+" now).");if(!YD[i])if("object"===QC(o[i]))for(var s in o[i])r(o,"*"===s?i:i+"-"+s.toLowerCase(),o[i][s]);else"function"==typeof o[i]&&r(o,i,o[i])}}this.hasListener=Object.keys(this.listeners).length>0},t.runAsync=function(){var e=this;return jC(function(){var t,r,n,o,i,s,a,l,c,d,u,h;return rS(this,function(p){switch(p.label){case 0:e.plugin=0,t=0,p.label=1;case 1:if(!(t<e.plugins.length))return[3,6];if(r=e.plugins[t],!JD(n=e.runOnRoot(r)))return[3,5];p.label=2;case 2:return p.trys.push([2,4,,5]),[4,n];case 3:return p.sent(),[3,5];case 4:throw o=p.sent(),e.handleError(o);case 5:return t++,[3,1];case 6:if(e.prepareVisitors(),!e.hasListener)return[3,18];i=e.result.root,p.label=7;case 7:if(i[FD])return[3,14];i[FD]=!0,s=[XD(i)],p.label=8;case 8:if(!(s.length>0))return[3,13];if(!JD(a=e.visitTick(s)))return[3,12];p.label=9;case 9:return p.trys.push([9,11,,12]),[4,a];case 10:return p.sent(),[3,12];case 11:throw l=p.sent(),c=s[s.length-1].node,e.handleError(l,c);case 12:return[3,8];case 13:return[3,7];case 14:if(!e.listeners.OnceExit)return[3,18];d=function(){var t,r,n,o,s;return rS(this,function(a){switch(a.label){case 0:t=h.value,r=t[0],n=t[1],e.result.lastPlugin=r,a.label=1;case 1:return a.trys.push([1,6,,7]),"document"!==i.type?[3,3]:(o=i.nodes.map(function(t){return n(t,e.helpers)}),[4,Promise.all(o)]);case 2:return a.sent(),[3,5];case 3:return[4,n(i,e.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw s=a.sent(),e.handleError(s);case 7:return[2]}})},u=tS(e.listeners.OnceExit),p.label=15;case 15:return(h=u()).done?[3,18]:[5,nS(d())];case 16:p.sent(),p.label=17;case 17:return[3,15];case 18:return e.processed=!0,[2,e.stringify()]}})})()},t.runOnRoot=function(e){var t=this;this.result.lastPlugin=e;try{if("object"===(typeof e>"u"?"undefined":QC(e))&&e.Once){if("document"===this.result.root.type){var r=this.result.root.nodes.map(function(r){return e.Once(r,t.helpers)});return JD(r[0])?Promise.all(r):r}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}},t.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=HD;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var r=new BD(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result},t.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var e,t=tS(this.plugins);!(e=t()).done;){var r=e.value;if(JD(this.runOnRoot(r)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var n=this.result.root;!n[FD];)n[FD]=!0,this.walkSync(n);if(this.listeners.OnceExit)if("document"===n.type)for(var o,i=tS(n.nodes);!(o=i()).done;){var s=o.value;this.visitSync(this.listeners.OnceExit,s)}else this.visitSync(this.listeners.OnceExit,n)}return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this.css},t.visitSync=function(e,t){for(var r,n=tS(e);!(r=n()).done;){var o=r.value,i=o[0],s=o[1];this.result.lastPlugin=i;var a=void 0;try{a=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(JD(a))throw this.getAsyncError()}},t.visitTick=function(e){var t=e[e.length-1],r=t.node,n=t.visitors;if("root"===r.type||"document"===r.type||r.parent){if(n.length>0&&t.visitorIndex<n.length){var o=n[t.visitorIndex],i=o[0],s=o[1];t.visitorIndex+=1,t.visitorIndex===n.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=i;try{return s(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){for(var a,l=t.iterator;a=r.nodes[r.indexes[l]];
3066)if(r.indexes[l]+=1,!a[FD])return a[FD]=!0,void e.push(XD(a));t.iterator=0,delete r.indexes[l]}for(var c=t.events;t.eventIndex<c.length;){var d=c[t.eventIndex];if(t.eventIndex+=1,0===d)return void(r.nodes&&r.nodes.length&&(r[FD]=!0,t.iterator=r.getIterator()));if(this.listeners[d])return void(t.visitors=this.listeners[d])}e.pop()}else e.pop()},t.walkSync=function(e){var t=this;e[FD]=!0;for(var r,n=tS(QD(e));!(r=n()).done;){var o=r.value;if(0===o)e.nodes&&e.each(function(e){e[FD]||t.walkSync(e)});else{var i=this.listeners[o];if(i&&this.visitSync(i,e.toProxy()))return}}},t.warnings=function(){return this.sync().warnings()},WC(e,[{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}]),e}();rM.registerPostcss=function(e){tM=e};var nM=rM;rM.default=rM,qD.registerLazyResult(rM),VD.registerLazyResult(rM);var oM=FP,iM=GR,sM=zD,aM=lD,lM=function(){function e(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;var n,o=iM;this.result=new aM(this._processor,n,this._opts),this.result.css=t;var i=this;Object.defineProperty(this.result,"root",{get:function(){return i.root}});var s=new oM(o,n,this._opts,t);if(s.isMap()){var a=s.generate(),l=a[0],c=a[1];l&&(this.result.css=l),c&&(this.result.map=c)}else s.clearAnnotation(),this.result.css=s.css}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)},t.catch=function(e){return this.async().catch(e)},t.finally=function(e){return this.async().then(e,e)},t.sync=function(){if(this.error)throw this.error;return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this._css},t.warnings=function(){return[]},WC(e,[{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=sM;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),e}(),cM=lM;lM.default=lM;var dM=cM,uM=nM,hM=nD,pM=wD,gM=function(){function e(e){void 0===e&&(e=[]),this.version="8.4.38",this.plugins=this.normalize(e)}var t=e.prototype;return t.normalize=function(e){for(var t,r=[],n=tS(e);!(t=n()).done;){var o=t.value;if(!0===o.postcss?o=o():o.postcss&&(o=o.postcss),"object"===(typeof o>"u"?"undefined":QC(o))&&Array.isArray(o.plugins))r=r.concat(o.plugins);else if("object"===(typeof o>"u"?"undefined":QC(o))&&o.postcssPlugin)r.push(o);else if("function"==typeof o)r.push(o);else if("object"!==(typeof o>
3066"u"?"undefined":QC(o))||!o.parse&&!o.stringify)throw new Error(o+" is not a PostCSS plugin")}return r},t.process=function(e,t){return void 0===t&&(t={}),this.plugins.length||t.parser||t.stringifier||t.syntax?new uM(this,e,t):new dM(this,e,t)},t.use=function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this},e}(),fM=gM;gM.default=gM,pM.registerProcessor(gM),hM.registerProcessor(gM);var mM=oP,vM=hP,bM=BP,yM=fD,wM=IP,xM=wD,_M=ED;function kM(e,t){if(Array.isArray(e))return e.map(function(e){return kM(e)});var r=e.inputs,n=YC(e,["inputs"]);if(r){t=[];for(var o,i=tS(r);!(o=i()).done;){var s=KC({},o.value,{__proto__:wM.prototype});s.map&&(s.map=KC({},s.map,{__proto__:vM.prototype})),t.push(s)}}if(n.nodes&&(n.nodes=e.nodes.map(function(e){return kM(e,t)})),n.source){var a=n.source,l=a.inputId,c=YC(a,["inputId"]);n.source=c,null!=l&&(n.source.input=t[l])}if("root"===n.type)return new xM(n);if("decl"===n.type)return new mM(n);if("rule"===n.type)return new _M(n);if("comment"===n.type)return new bM(n);if("atrule"===n.type)return new yM(n);throw new Error("Unknown node type: "+e.type)}var CM=kM;kM.default=kM;var SM=BR,EM=oP,IM=nM,AM=XP,TM=fM,OM=GR,LM=CM,$M=nD,NM=iD,RM=BP,PM=fD,DM=lD,MM=IP,zM=zD,FM=_D,UM=ED,BM=wD,HM=rP;function jM(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new TM(t)}jM.plugin=function(e,t){var r,n=!1;function o(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var s=t.apply(void 0,[].concat(o));return s.postcssPlugin=e,s.postcssVersion=(new TM).version,s}return Object.defineProperty(o,"postcss",{get:function(){return r||(r=o()),r}}),o.process=function(e,t,r){return jM([o(r)]).process(e,t)},o},jM.stringify=OM,jM.parse=zM,jM.fromJSON=LM,jM.list=FM,jM.comment=function(e){return new RM(e)},jM.atRule=function(e){return new PM(e)},jM.decl=function(e){return new EM(e)},jM.rule=function(e){return new UM(e)},jM.root=function(e){return new BM(e)},jM.document=function(e){return new $M(e)},jM.CssSyntaxError=SM,jM.Declaration=EM,jM.Container=AM,jM.Processor=TM,jM.Document=$M,jM.Comment=RM,jM.Warning=NM,jM.AtRule=PM,jM.Result=DM,jM.Input=MM,jM.Rule=UM,jM.Root=BM,jM.Node=HM,IM.registerPostcss(jM);var VM=jM;jM.default=jM;var WM=LR(VM);WM.stringify,WM.fromJSON,WM.plugin,WM.parse,WM.list,WM.document,WM.comment,WM.atRule,WM.rule,WM.decl,WM.root,WM.CssSyntaxError,WM.Declaration,WM.Container,WM.Processor,WM.Document,WM.Comment,WM.Warning,WM.AtRule,WM.Result,WM.Input,WM.Rule,WM.Root,WM.Node;var KM=Object.defineProperty,qM=function(e,t,r){return function(e,t,r){return t in e?KM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r}(e,"symbol"!==(typeof t>"u"?"undefined":QC(t))?t+"":t,r)},GM=function(){function e(e){qM(this,"fileName"),qM(this,"functionName"),qM(this,"lineNumber"),qM(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}return e.prototype.toString=function(){var e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+e+":"+t+")":this.fileName+":"+e+":"+t},e}(),ZM=/(^|@)\S+:\d+/,YM=/^\s*at .*(\S+:\d+|\(native\))/m,JM=/^(eval@)?(\[native code])?$/,QM={parse:function(e){return e?typeof e.stacktrace<"u"||typeof e["opera#sourceloc"]<"u"?this.parseOpera(e):e.stack&&e.stack.match(YM)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error("Cannot parse given url: "+e);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){var t=e.stack.split("\n").filter(function(e){return!!e.match(YM)},this);return t.map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=t.match(/ (\((.+):(\d+):(\d+)\)$)/),n=(t=r?t.replace(r[0],""):t).split(/\s+/).slice(1),o=this.extractLocation(r?r[1]:n.pop()),i=n.join(" ")||void 0,s=["eval","<anonymous>"].indexOf(o[0])>-1?void 0:o[0];return new GM({functionName:i,fileName:s,lineNumber:o[1],columnNumber:o[2]})},this)},parseFFOrSafari:function(e){var t=e.stack.split("\n").filter(function(e){return!e.match(JM)},this);return t.map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new GM({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),n=r&&r[1]?r[1]:void 0,o=this.extractLocation(e.replace(t,""));return new GM({functionName:n,fileName:o[0],lineNumber:o[1],columnNumber:o[2]})},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),n=[],o=2,i=r.length;o<i;o+=2){var s=t.exec(r[o]);s&&n.push(new GM({fileName:s[2],lineNumber:parseFloat(s[1])}))}return n},parseOpera10:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),n=[],o=0,i=r.length;o<i;o+=2){var s=t.exec(r[o]);s&&n.push(new GM({functionName:s[3]||void 0,fileName:s[2],lineNumber:parseFloat(s[1])}))}return n},parseOpera11:function(e){var t=e.stack.split("\n").filter(function(e){return!!e.match(ZM)&&!e.match(/^Error created at/)},this);return t.map(function(e){var t=e.split("@"),r=this.extractLocation(t.pop()),n=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new GM({functionName:n,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})},this)}};function XM(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var r=e.localName;if(!r)break;r=r.toLowerCase();var n=e.parentElement,o=[];if(n.children&&n.children.length>0)for(var i=0;i<n.children.length;i++){var s=n.children[i];s.localName&&s.localName.toLowerCase&&s.localName.toLowerCase()===r&&o.push(s)}o.length>1&&(r+=":eq("+o.indexOf(e)+")"),t=r+(t?">"+t:""),e=n}return t}function ez(e){return"[object Object]"===Object.prototype.toString.call(e)}function tz(e,t){if(0===t)return!0;for(var r,n=tS(Object.keys(e));!(r=n()).done;){var o=r.value;if(ez(e[o])&&tz(e[o],t-1))return!0}return!1}
3066function rz(e,t){var r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);var n=[],o=[];return JSON.stringify(e,function(e,t){if(n.length>0){var i=n.indexOf(this);~i?n.splice(i+1):n.push(this),~i?o.splice(i,1/0,e):o.push(e),~n.indexOf(t)&&(t=n[0]===t?"[Circular ~]":"[Circular ~."+o.slice(0,n.indexOf(t)).join(".")+"]")}else n.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){return!!(ez(e)&&Object.keys(e).length>r.numOfKeysLimit||"function"==typeof e||ez(e)&&tz(e,r.depthOfLimit))}(t))return function(e){var t=e.toString();return r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t=t.slice(0,r.stringLengthLimit)+"..."),t}(t);if("bigint"===(typeof t>"u"?"undefined":QC(t)))return t.toString()+"n";if(ZC(t,Event)){var s={};for(var a in t){var l=t[a];Array.isArray(l)?s[a]=XM(l.length?l[0]:null):s[a]=l}return s}return ZC(t,Node)?ZC(t,HTMLElement)?t?t.outerHTML:"":t.nodeName:ZC(t,Error)?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t})}var nz={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function oz(e,t,r){var n,o=r?Object.assign({},nz,r):nz,i=o.logger;if(!i)return function(){};n="string"==typeof i?t[i]:i;var s=0,a=!1,l=[];
3066if(o.level.includes("error")){var c=function(t){var r=t.message,n=t.error,i=QM.parse(n).map(function(e){return e.toString()}),s=[rz(r,o.stringifyOptions)];e({level:"error",trace:i,payload:s})};t.addEventListener("error",c),l.push(function(){t.removeEventListener("error",c)});var d=function(t){var r,n;ZC(t.reason,Error)?n=[rz("Uncaught (in promise) "+(r=t.reason).name+": "+r.message,o.stringifyOptions)]:(r=new Error,n=[rz("Uncaught (in promise)",o.stringifyOptions),rz(t.reason,o.stringifyOptions)]);var i=QM.parse(r).map(function(e){return e.toString()});e({level:"error",trace:i,payload:n})};t.addEventListener("unhandledrejection",d),l.push(function(){t.removeEventListener("unhandledrejection",d)})}for(var u,h=tS(o.level);!(u=h()).done;){var p=u.value;l.push(g(n,p))}return function(){l.forEach(function(e){return e()})};function g(t,r){var n=this;return t[r]?function(e,t,r){try{if(!(t in e))return function(){};var n=e[t],o=r(n);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,function(){e[t]=n}}catch{return function(){}}}(t,r,function(t){var i=n;return function(){for(var n=arguments.length,l=new Array(n),c=0;c<n;c++)l[c]=arguments[c];if(t.apply(i,l),!("assert"===r&&l[0]||a)){a=!0;try{var d=QM.parse(new Error).map(function(e){return e.toString()}).splice(1),u=("assert"===r?l.slice(1):l).map(function(e){return rz(e,o.stringifyOptions)});++s<o.lengthThreshold?e({level:r,trace:d,payload:u}):s===o.lengthThreshold&&e({level:"warn",trace:[],payload:[rz("The number of log records reached the threshold.")]})}catch(e){t.apply(void 0,[].concat(["rrweb logger error:",e],l))}finally{a=!1}
3066}}}):function(){}}}var iz,sz,az,lz=PC.setImmediate,cz=Object.prototype.toString,dz=typeof lz<"u"?function(e){return lz(e)}:setTimeout;try{Object.defineProperty({},"x",{}),iz=function(e,t,r,n){return Object.defineProperty(e,t,{value:r,writable:!0,configurable:!1!==n})}}catch{iz=function(e,t,r){return e[t]=r,e}}function uz(e,t){az.add(e,t),sz||(sz=dz(az.drain))}function hz(e){var t,r=typeof e;return null!==e&&("object"===r||"function"===r)&&(t=e.then),"function"==typeof t&&t}function pz(){for(var e=0;e<this.chain.length;e++)gz(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function gz(e,t,r){var n,o;try{!1===t?r.reject(e.msg):(n=!0===t?e.msg:t.call(void 0,e.msg))===r.promise?r.reject(TypeError("Promise-chain cycle")):(o=hz(n))?o.call(n,r.resolve,r.reject):r.resolve(n)}catch(e){r.reject(e)}}function fz(e){var t,r=this;if(!r.triggered){r.triggered=!0,r.def&&(r=r.def);try{(t=hz(e))?uz(function(){var n=new bz(r);try{t.call(e,function(){fz.apply(n,arguments)},function(){mz.apply(n,arguments)})}catch(e){mz.call(n,e)}}):(r.msg=e,r.state=1,r.chain.length>0&&uz(pz,r))}catch(e){mz.call(new bz(r),e)}}}function mz(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&uz(pz,t))}function vz(e,t,r,n){for(var o=0;o<t.length;o++)(function(o){e.resolve(t[o]).then(function(e){r(o,e)},n)})(o)}function bz(e){this.def=e,this.triggered=!1}function yz(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function wz(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var t=new yz(this);this.then=function(e,r){var n={success:"function"!=typeof e||e,failure:"function"==typeof r&&r};return n.promise=new this.constructor(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");n.resolve=e,n.reject=t}),t.chain.push(n),0!==t.state&&uz(pz,t),n.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,function(e){fz.call(t,e)},function(e){mz.call(t,e)})}catch(e){mz.call(t,e)}}az=function(){var e,t,r;function n(e,t){this.fn=e,this.self=t,this.next=void 0}return{add:function(o,i){r=new n(o,i),t?t.next=r:e=r,t=r,r=void 0},drain:function(){var r=e;for(e=t=sz=void 0;r;)r.fn.call(r.self),r=r.next}}}();var xz,_z=iz({},"constructor",wz,!1);wz.prototype=_z,iz(_z,"__NPO__",0,!1),iz(wz,"resolve",function(e){return e&&"object"==typeof e&&1===e.__NPO__?e:new this(function(t,r){if("function"!=typeof t||"function"!=typeof r)throw TypeError("Not a function");t(e)})}),iz(wz,"reject",function(e){return new this(function(t,r){if("function"!=typeof t||"function"!=typeof r)throw TypeError("Not a function");r(e)})}),iz(wz,"all",function(e){var t=this;return"[object Array]"!==cz.call(e)?t.reject(TypeError("Not an array")):0===e.length?t.resolve([]):new t(function(r,n){if("function"!=typeof r||"function"!=typeof n)throw TypeError("Not a function");var o=e.length,i=Array(o),s=0;vz(t,e,function(e,t){i[e]=t,++s===o&&r(i)},n)})}),iz(wz,"race",function(e){var t=this;return"[object Array]"!==cz.call(e)?t.reject(TypeError("Not an array")):new t(function(r,n){if("function"!=typeof r||"function"!=typeof n)throw TypeError("Not a function");vz(t,e,function(e,t){r(t)},n)})}),xz=typeof Promise<"u"&&-1!==Promise.toString().indexOf("[native code]")?Promise:wz;var kz=864e5,Cz=Array.prototype,Sz=Function.prototype,Ez=Object.prototype,Iz=Cz.slice,Az=Ez.toString,Tz=Ez.hasOwnProperty,Oz=PC.console,Lz=PC.navigator,$z=PC.document,Nz=PC.opera,Rz=PC.screen,Pz=Lz.userAgent,Dz=Sz.bind,Mz=Cz.forEach,zz=Cz.indexOf,Fz=Cz.map,Uz=Array.isArray,Bz={},Hz={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},jz={log:function(){if(MC.DEBUG&&!Hz.isUndefined(Oz)&&Oz)try{Oz.log.apply(Oz,arguments)}catch{Hz.each(arguments,function(e){Oz.log(e)})}},warn:function(){if(MC.DEBUG&&!Hz.isUndefined(Oz)&&Oz){var e=["Mixpanel warning:"].concat(Hz.toArray(arguments));try{Oz.warn.apply(Oz,e)}catch{Hz.each(e,function(e){Oz.warn(e)})}}},error:function(){if(MC.DEBUG&&!Hz.isUndefined(Oz)&&Oz){var e=["Mixpanel error:"].concat(Hz.toArray(arguments));try{Oz.error.apply(Oz,e)}catch{Hz.each(e,function(e){Oz.error(e)})}}},critical:function(){if(!Hz.isUndefined(Oz)&&Oz){var e=["Mixpanel error:"].concat(Hz.toArray(arguments));try{Oz.error.apply(Oz,e)}catch{Hz.each(e,function(e){Oz.error(e)})}}}},Vz=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(jz,arguments)}},Wz=function(e){return{log:Vz(jz.log,e),warn:Vz(jz.warn,e),error:Vz(jz.error,e),critical:Vz(jz.critical,e)}},Kz=function(e){return function(){try{return e.apply(this,arguments)}catch(e){jz.critical("Implementation error. Please turn on debug and contact [email protected]."),MC.DEBUG&&jz.critical(e)}}},qz=function(e){var t=e.prototype;for(var r in t)"function"==typeof t[r]&&(t[r]=Kz(t[r]))};Hz.bind=function(e,t){var r,n;
3066if(Dz&&e.bind===Dz)return Dz.apply(e,Iz.call(arguments,1));if(!Hz.isFunction(e))throw new TypeError;return r=Iz.call(arguments,2),n=function(){if(!(this instanceof n))return e.apply(t,r.concat(Iz.call(arguments)));var o={};o.prototype=e.prototype;var i=new o;o.prototype=null;var s=e.apply(i,r.concat(Iz.call(arguments)));return Object(s)===s?s:i},n},Hz.each=function(e,t,r){if(null!=e)if(Mz&&e.forEach===Mz)e.forEach(t,r);else if(e.length===+e.length){for(var n=0,o=e.length;n<o;n++)if(n in e&&t.call(r,e[n],n,e)===Bz)return}else for(var i in e)if(Tz.call(e,i)&&t.call(r,e[i],i,e)===Bz)return},Hz.extend=function(e){return Hz.each(Iz.call(arguments,1),function(t){for(var r in t)void 0!==t[r]&&(e[r]=t[r])}),e},Hz.isArray=Uz||function(e){return"[object Array]"===Az.call(e)},Hz.isFunction=function(e){return"function"==typeof e},Hz.isArguments=function(e){return!(!e||!Tz.call(e,"callee"))},Hz.toArray=function(e){return e?e.toArray?e.toArray():Hz.isArray(e)||Hz.isArguments(e)?Iz.call(e):Hz.values(e):[]},Hz.map=function(e,t,r){if(Fz&&e.map===Fz)return e.map(t,r);var n=[];return Hz.each(e,function(e){n.push(t.call(r,e))}),n},Hz.keys=function(e){var t=[];return null===e||Hz.each(e,function(e,r){t[t.length]=r}),t},Hz.values=function(e){var t=[];return null===e||Hz.each(e,function(e){t[t.length]=e}),t},Hz.include=function(e,t){var r=!1;return null===e?r:zz&&e.indexOf===zz?-1!=e.indexOf(t):(Hz.each(e,function(e){if(r||(r=e===t))return Bz}),r)},Hz.includes=function(e,t){return-1!==e.indexOf(t)},Hz.inherit=function(e,t){return e.prototype=new t,e.prototype.constructor=e,e.superclass=t.prototype,e},Hz.isObject=function(e){return e===Object(e)&&!Hz.isArray(e)},Hz.isEmptyObject=function(e){if(Hz.isObject(e)){for(var t in e)if(Tz.call(e,t))return!1;return!0}return!1},Hz.isUndefined=function(e){return void 0===e},Hz.isString=function(e){return"[object String]"==Az.call(e)},Hz.isDate=function(e){return"[object Date]"==Az.call(e)},Hz.isNumber=function(e){return"[object Number]"==Az.call(e)},Hz.isElement=function(e){return!(!e||1!==e.nodeType)},Hz.encodeDates=function(e){return Hz.each(e,function(t,r){Hz.isDate(t)?e[r]=Hz.formatDate(t):Hz.isObject(t)&&(e[r]=Hz.encodeDates(t))}),e},Hz.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},Hz.formatDate=function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())},Hz.strip_empty_properties=function(e){var t={};return Hz.each(e,function(e,r){Hz.isString(e)&&e.length>0&&(t[r]=e)}),t},Hz.truncate=function(e,t){var r;return"string"==typeof e?r=e.slice(0,t):Hz.isArray(e)?(r=[],Hz.each(e,function(e){r.push(Hz.truncate(e,t))})):Hz.isObject(e)?(r={},Hz.each(e,function(e,n){r[n]=Hz.truncate(e,t)})):r=e,r},Hz.JSONEncode=function(){return function(e){var t=function(e){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,r={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(e)?'"'+e.replace(t,function(e){var t=r[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'},r=function(e,n){var o="",i=0,s="",a="",l=0,c=o,d=[],u=n[e];switch(u&&"object"==typeof u&&"function"==typeof u.toJSON&&(u=u.toJSON(e)),typeof u){case"string":return t(u);case"number":return isFinite(u)?String(u):"null";case"boolean":case"null":return String(u);case"object":if(!u)return"null";if(o+="    ",d=[],"[object Array]"===Az.apply(u)){for(l=u.length,i=0;i<l;i+=1)d[i]=r(i,u)||"null";return a=0===d.length?"[]":o?"[\n"+o+d.join(",\n"+o)+"\n"+c+"]":"["+d.join(",")+"]",o=c,a}for(s in u)Tz.call(u,s)&&(a=r(s,u))&&d.push(t(s)+(o?": ":":")+a);return a=0===d.length?"{}":o?"{"+d.join(",")+c+"}":"{"+d.join(",")+"}",o=c,a}};return r("",{"":e})}}(),Hz.JSONDecode=function(){var e,t,r,n,o={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},i=function(t){var n=new SyntaxError(t);throw n.at=e,n.text=r,n},s=function(n){return n&&n!==t&&i("Expected '"+n+"' instead of '"+t+"'"),t=r.charAt(e),e+=1,t},a=function(){var e,r="";for("-"===t&&(r="-",s("-"));t>="0"&&t<="9";)r+=t,s();if("."===t)for(r+=".";s()&&t>="0"&&t<="9";)r+=t;if("e"===t||"E"===t)for(r+=t,s(),("-"===t||"+"===t)&&(r+=t,s());t>="0"&&t<="9";)r+=t,s();if(e=+r,isFinite(e))return e;i("Bad number")},l=function(){var e,r,n,a="";if('"'===t)for(;s();){if('"'===t)return s(),a;
3066if("\\"===t)if(s(),"u"===t){for(n=0,r=0;r<4&&(e=parseInt(s(),16),isFinite(e));r+=1)n=16*n+e;a+=String.fromCharCode(n)}else{if("string"!=typeof o[t])break;a+=o[t]}else a+=t}i("Bad string")},c=function(){for(;t&&t<=" ";)s()};return n=function(){switch(c(),t){case"{":return function(){var e,r={};if("{"===t){if(s("{"),c(),"}"===t)return s("}"),r;for(;t;){if(e=l(),c(),s(":"),Object.hasOwnProperty.call(r,e)&&i('Duplicate key "'+e+'"'),r[e]=n(),c(),"}"===t)return s("}"),r;s(","),c()}}i("Bad object")}();case"[":return function(){var e=[];if("["===t){if(s("["),c(),"]"===t)return s("]"),e;for(;t;){if(e.push(n()),c(),"]"===t)return s("]"),e;s(","),c()}}i("Bad array")}();case'"':return l();case"-":return a();default:return t>="0"&&t<="9"?a():function(){switch(t){case"t":return s("t"),s("r"),s("u"),s("e"),!0;case"f":return s("f"),s("a"),s("l"),s("s"),s("e"),!1;case"n":return s("n"),s("u"),s("l"),s("l"),null}i('Unexpected "'+t+'"')}()}},function(o){var s;return r=o,e=0,t=" ",s=n(),c(),t&&i("Syntax error"),s}}(),Hz.base64Encode=function(e){var t,r,n,o,i,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,l=0,c="",d=[];if(!e)return e;e=Hz.utf8Encode(e);do{t=(i=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,r=i>>12&63,n=i>>6&63,o=63&i,d[l++]=s.charAt(t)+s.charAt(r)+s.charAt(n)+s.charAt(o)}while(a<e.length);switch(c=d.join(""),e.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c},Hz.utf8Encode=function(e){var t,r,n,o,i="";for(t=r=0,n=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,o=0;o<n;o++){var s=e.charCodeAt(o),a=null;s<128?r++:a=s>127&&s<2048?String.fromCharCode(s>>6|192,63&s|128):String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128),null!==a&&(r>t&&(i+=e.substring(t,r)),i+=a,t=r=o+1)}return r>t&&(i+=e.substring(t,e.length)),i},Hz.UUID=function(){try{return PC.crypto.randomUUID()}catch{for(var e=new Array(36),t=0;t<36;t++)e[t]=Math.floor(16*Math.random());return e[14]=4,e[19]=e[19]&=-5,e[19]=e[19]|=8,e[8]=e[13]=e[18]=e[23]="-",Hz.map(e,function(e){return e.toString(16)}).join("")}};var Gz=["ahrefsbot","ahrefssiteaudit","amazonbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandex","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];Hz.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t<Gz.length;t++)if(-1!==e.indexOf(Gz[t]))return!0;return!1},Hz.HTTPBuildQuery=function(e,t){var r,n,o=[];return Hz.isUndefined(t)&&(t="&"),Hz.each(e,function(e,t){r=encodeURIComponent(e.toString()),n=encodeURIComponent(t),o[o.length]=n+"="+r}),o.join(t)},Hz.getQueryParam=function(e,t){t=t.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");var r=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);if(null===r||r&&"string"!=typeof r[1]&&r[1].length)return"";var n=r[1];try{n=decodeURIComponent(n)}catch{jz.error("Skipping decoding for malformed query param: "+n)}return n.replace(/\+/g," ")},Hz.cookie={get:function(e){for(var t=e+"=",r=$z.cookie.split(";"),n=0;n<r.length;n++){for(var o=r[n];" "==o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return decodeURIComponent(o.substring(t.length,o.length))}return null},parse:function(e){var t;try{t=Hz.JSONDecode(Hz.cookie.get(e))||{}}catch{}return t},set_seconds:function(e,t,r,n,o,i,s){var a="",l="",c="";if(s)a="; domain="+s;else if(n){var d=lF($z.location.hostname);a=d?"; domain=."+d:""}if(r){var u=new Date;u.setTime(u.getTime()+1e3*r),l="; expires="+u.toGMTString()}i&&(o=!0,c="; SameSite=None"),o&&(c+="; secure"),$z.cookie=e+"="+encodeURIComponent(t)+l+"; path=/"+a+c},set:function(e,t,r,n,o,i,s){var a="",l="",c="";if(s)a="; domain="+s;else if(n){var d=lF($z.location.hostname);a=d?"; domain=."+d:""}if(r){var u=new Date;u.setTime(u.getTime()+24*r*60*60*1e3),l="; expires="+u.toGMTString()}i&&(o=!0,c="; SameSite=None"),o&&(c+="; secure");var h=e+"="+encodeURIComponent(t)+l+"; path=/"+a+c;return $z.cookie=h,h},remove:function(e,t,r){Hz.cookie.set(e,"",-1,t,!1,!1,r)}};var Zz=function(e){var t=!0;
3066try{var r="__mplss_"+oF(8);e.setItem(r,"xyz"),"xyz"!==e.getItem(r)&&(t=!1),e.removeItem(r)}catch{t=!1}return t},Yz=null,Jz=function(e,t){return null===Yz||t?Yz=Zz(e):Yz},Qz=null;function Xz(e,t,r){var n=function(e){jz.error(t+" error: "+e)};return{is_supported:function(n){var o=r(e,n);return o||jz.error(t+" unsupported"),o},error:n,get:function(t){try{return e.getItem(t)}catch(e){n(e)}return null},parse:function(t){try{return Hz.JSONDecode(e.getItem(t))||{}}catch{}return null},set:function(t,r){try{e.setItem(t,r)}catch(e){n(e)}},remove:function(t){try{e.removeItem(t)}catch(e){n(e)}}}}var eF=function(){try{return PC.localStorage}catch{return null}};Hz.localStorage=Xz(eF(),"localStorage",Jz),Hz.sessionStorage=Xz(function(){try{return PC.sessionStorage}catch{return null}}(),"sessionStorage",function(e,t){return null===Qz||t?Qz=Zz(e):Qz}),Hz.register_event=function(){function e(t){return t&&(t.preventDefault=e.preventDefault,t.stopPropagation=e.stopPropagation),t}return e.preventDefault=function(){this.returnValue=!1},e.stopPropagation=function(){this.cancelBubble=!0},function(t,r,n,o,i){if(t)if(t.addEventListener&&!o)t.addEventListener(r,n,!!i);else{var s="on"+r,a=t[s];t[s]=function(t,r,n){return function(o){if(o=o||e(PC.event)){var i,s,a=!0;return Hz.isFunction(n)&&(i=n(o)),s=r.call(t,o),(!1===i||!1===s)&&(a=!1),a}}}(t,n,a)}else jz.error("No valid element provided to register_event")}}();var tF=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');Hz.dom_query=function(){function e(e){return e.all?e.all:e.getElementsByTagName("*")}var t=/[\t\r\n]/g;function r(e,r){var n=" "+r+" ";return(" "+e.className+" ").replace(t," ").indexOf(n)>=0}function n(t){if(!$z.getElementsByTagName)return[];var n,o,i,s,a,l,c,d,u,h,p=t.split(" "),g=[$z];for(l=0;l<p.length;l++)if((n=p[l].replace(/^\s+/,"").replace(/\s+$/,"")).indexOf("#")>-1){i=(o=n.split("#"))[0];var f=o[1],m=$z.getElementById(f);if(!m||i&&m.nodeName.toLowerCase()!=i)return[];g=[m]}else if(n.indexOf(".")>-1){i=(o=n.split("."))[0];var v=o[1];for(i||(i="*"),s=[],a=0,c=0;c<g.length;c++)for(u="*"==i?e(g[c]):g[c].getElementsByTagName(i),d=0;d<u.length;d++)s[a++]=u[d];for(g=[],h=0,c=0;c<s.length;c++)s[c].className&&Hz.isString(s[c].className)&&r(s[c],v)&&(g[h++]=s[c])}else{var b=n.match(tF);if(b){i=b[1];var y,w=b[2],x=b[3],_=b[4];for(i||(i="*"),s=[],a=0,c=0;c<g.length;c++)for(u="*"==i?e(g[c]):g[c].getElementsByTagName(i),d=0;d<u.length;d++)s[a++]=u[d];switch(g=[],h=0,x){case"=":y=function(e){return e.getAttribute(w)==_};break;case"~":y=function(e){return e.getAttribute(w).match(new RegExp("\\b"+_+"\\b"))};break;case"|":y=function(e){return e.getAttribute(w).match(new RegExp("^"+_+"-?"))};break;case"^":y=function(e){return 0===e.getAttribute(w).indexOf(_)};break;case"$":y=function(e){return e.getAttribute(w).lastIndexOf(_)==e.getAttribute(w).length-_.length};break;case"*":y=function(e){return e.getAttribute(w).indexOf(_)>-1};break;default:y=function(e){return e.getAttribute(w)}}for(g=[],h=0,c=0;c<s.length;c++)y(s[c])&&(g[h++]=s[c])}else{for(i=n,s=[],a=0,c=0;c<g.length;c++)for(u=g[c].getElementsByTagName(i),d=0;d<u.length;d++)s[a++]=u[d];g=s}}return g}return function(e){return Hz.isElement(e)?[e]:Hz.isObject(e)&&!Hz.isUndefined(e.length)?e:n.call(this,e)}}();var rF=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform","utm_campaign_id","utm_creative_format","utm_marketing_tactic"],nF=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"];Hz.info={campaignParams:function(e){var t="",r={};return Hz.each(rF,function(n){(t=Hz.getQueryParam($z.URL,n)).length?r[n]=t:void 0!==e&&(r[n]=e)}),r},clickParams:function(){var e="",t={};return Hz.each(nF,function(r){(e=Hz.getQueryParam($z.URL,r)).length&&(t[r]=e)}),t},marketingParams:function(){return Hz.extend(Hz.info.campaignParams(),Hz.info.clickParams())},searchEngine:function(e){return 0===e.search("https?://(.*)google.([^/?]*)")?"google":0===e.search("https?://(.*)bing.com")?"bing":0===e.search("https?://(.*)yahoo.com")?"yahoo":0===e.search("https?://(.*)duckduckgo.com")?"duckduckgo":null}
3066,searchInfo:function(e){var t=Hz.info.searchEngine(e),r="yahoo"!=t?"q":"p",n={};if(null!==t){n.$search_engine=t;var o=Hz.getQueryParam(e,r);o.length&&(n.mp_keyword=o)}return n},browser:function(e,t,r){return t=t||"",r||Hz.includes(e," OPR/")?Hz.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":Hz.includes(e,"IEMobile")||Hz.includes(e,"WPDesktop")?"Internet Explorer Mobile":Hz.includes(e,"SamsungBrowser/")?"Samsung Internet":Hz.includes(e,"Edge")||Hz.includes(e,"Edg/")?"Microsoft Edge":Hz.includes(e,"FBIOS")?"Facebook Mobile":Hz.includes(e,"Whale/")?"Whale Browser":Hz.includes(e,"Chrome")?"Chrome":Hz.includes(e,"CriOS")?"Chrome iOS":Hz.includes(e,"UCWEB")||Hz.includes(e,"UCBrowser")?"UC Browser":Hz.includes(e,"FxiOS")?"Firefox iOS":Hz.includes(t,"Apple")?Hz.includes(e,"Mobile")?"Mobile Safari":"Safari":Hz.includes(e,"Android")?"Android Mobile":Hz.includes(e,"Konqueror")?"Konqueror":Hz.includes(e,"Firefox")?"Firefox":Hz.includes(e,"MSIE")||Hz.includes(e,"Trident/")?"Internet Explorer":Hz.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,r){var n={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/,"Whale Browser":/Whale\/(\d+(\.\d+)?)/}[Hz.info.browser(e,t,r)];if(void 0===n)return null;var o=e.match(n);return o?parseFloat(o[o.length-2]):null},os:function(){var e=Pz;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var t=e.split("/");return t.length>=3?t[2]:""},currentUrl:function(){return PC.location.href},properties:function(e){return"object"!=typeof e&&(e={}),Hz.extend(Hz.strip_empty_properties({$os:Hz.info.os(),$browser:Hz.info.browser(Pz,Lz.vendor,Nz),$referrer:$z.referrer,$referring_domain:Hz.info.referringDomain($z.referrer),$device:Hz.info.device(Pz)}),{$current_url:Hz.info.currentUrl(),$browser_version:Hz.info.browserVersion(Pz,Lz.vendor,Nz),$screen_height:Rz.height,$screen_width:Rz.width,mp_lib:"web",$lib_version:MC.LIB_VERSION,$insert_id:oF(),time:Hz.timestamp()/1e3},Hz.strip_empty_properties(e))},people_properties:function(){return Hz.extend(Hz.strip_empty_properties({$os:Hz.info.os(),$browser:Hz.info.browser(Pz,Lz.vendor,Nz)}),{$browser_version:Hz.info.browserVersion(Pz,Lz.vendor,Nz)})},mpPageViewProperties:function(){return Hz.strip_empty_properties({current_page_title:$z.title,current_domain:PC.location.hostname,current_url_path:PC.location.pathname,current_url_protocol:PC.location.protocol,current_url_search:PC.location.search})}};var oF=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},iF=function(){return"00-"+Hz.UUID().replace(/-/g,"")+"-"+Hz.UUID().replace(/-/g,"").substring(0,16)+"-01"},sF=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,aF=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,lF=function(e){var t=aF,r=e.split("."),n=r[r.length-1];(n.length>4||"com"===n||"org"===n)&&(t=sF);var o=e.match(t);return o?o[0]:""},cF=function(){},dF=function(e,t){for(var r=!1,n=0;n<t.length;n++)if(e.match(t[n])){r=!0;break}return r},uF=null,hF=null;typeof JSON<"u"&&(uF=JSON.stringify,hF=JSON.parse),uF=uF||Hz.JSONEncode,hF=hF||Hz.JSONDecode,Hz.info=Hz.info,Hz.info.browser=Hz.info.browser,Hz.info.browserVersion=Hz.info.browserVersion,Hz.info.device=Hz.info.device,Hz.info.properties=Hz.info.properties,Hz.isBlockedUA=Hz.isBlockedUA,Hz.isEmptyObject=Hz.isEmptyObject,Hz.isObject=Hz.isObject,Hz.JSON
3066Decode=Hz.JSONDecode,Hz.JSONEncode=Hz.JSONEncode,Hz.toArray=Hz.toArray,Hz.NPO=wz;var pF=function(e,t,r){this.dbName=e,this.storeName=t,this.version=r.version,this.storeNamesInDb=r.storeNames,this.dbPromise=null};pF.prototype._openDb=function(){var e=this.dbName,t=this.version,r=this.storeNamesInDb;return new xz(function(n,o){var i=PC.indexedDB.open(e,t);i.onerror=function(){o(i.error)},i.onsuccess=function(){n(i.result)},i.onupgradeneeded=function(e){var t=e.target.result;r.forEach(function(e){t.objectStoreNames.contains(e)||t.createObjectStore(e)})}})},pF.prototype.init=function(){return PC.indexedDB?(this.dbPromise||(this.dbPromise=this._openDb()),this.dbPromise.then(function(e){return e instanceof PC.IDBDatabase?xz.resolve():xz.reject(e)})):xz.reject("indexedDB is not supported in this browser")},pF.prototype.isInitialized=function(){return!!this.dbPromise},pF.prototype.makeTransaction=function(e,t){var r=this.storeName,n=function(n){return new xz(function(o,i){var s=n.transaction(r,e);s.oncomplete=function(){o(s)},s.onabort=s.onerror=function(){i(s.error)},t(s.objectStore(r))})};return this.dbPromise.then(n).catch(function(e){return e&&"InvalidStateError"===e.name?(this.dbPromise=this._openDb(),this.dbPromise.then(n)):xz.reject(e)}.bind(this))},pF.prototype.setItem=function(e,t){return this.makeTransaction("readwrite",function(r){r.put(t,e)})},pF.prototype.getItem=function(e){var t;return this.makeTransaction("readonly",function(r){t=r.get(e)}).then(function(){return t.result})},pF.prototype.removeItem=function(e){return this.makeTransaction("readwrite",function(t){t.delete(e)})},pF.prototype.getAll=function(){var e;return this.makeTransaction("readonly",function(t){e=t.getAll()}).then(function(){return e.result})};var gF="mixpanelBrowserDb",fF="mixpanelRecordingEvents",mF="mixpanelRecordingRegistry",vF={version:1,storeNames:[fF,mF]};function bF(e,t){TF(!0,e,t)}function yF(e,t){TF(!1,e,t)}function wF(e,t){return"1"===AF(e,t)}function xF(e,t){if(function(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||PC,r=t.navigator||{},n=!1;return Hz.each([r.doNotTrack,r.msDoNotTrack,t.doNotTrack],function(e){Hz.includes([!0,1,"1","yes"],e)&&(n=!0)}),n}(t))return jz.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var r="0"===AF(e,t);return r&&jz.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),r}function _F(e){return OF(e,function(e){return this.get_config(e)})}function kF(e){return OF(e,function(e){return this._get_config(e)})}function CF(e){return OF(e,function(e){return this._get_config(e)})}function SF(e,t){EF(t=t||{}).remove(IF(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function EF(e){return"localStorage"===(e=e||{}).persistenceType?Hz.localStorage:Hz.cookie}function IF(e,t){return((t=t||{}).persistencePrefix||"__mp_opt_in_out_")+e}function AF(e,t){return EF(t).get(IF(e,t))}function TF(e,t,r){Hz.isString(t)&&t.length?(EF(r=r||{}).set(IF(t,r),e?1:0,Hz.isNumber(r.cookieExpiration)?r.cookieExpiration:null,!!r.crossSubdomainCookie,!!r.secureCookie,!!r.crossSiteCookie,r.cookieDomain),r.track&&e&&r.track(r.trackEventName||"$opt_in",r.trackProperties,{send_immediately:!0})):jz.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}function OF(e,t){return function(){var r=!1;try{var n=t.call(this,"token"),o=t.call(this,"ignore_dnt"),i=t.call(this,"opt_out_tracking_persistence_type"),s=t.call(this,"opt_out_tracking_cookie_prefix"),a=t.call(this,"window");n&&(r=xF(n,{ignoreDnt:o,persistenceType:i,persistencePrefix:s,window:a}))}catch(e){jz.error("Unexpected error when checking tracking opt-out status: "+e)}if(!r)return e.apply(this,arguments);var l=arguments[arguments.length-1];"function"==typeof l&&l(0)}}var LF=Wz("lock"),$F=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||eF(),this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3,this.promiseImpl=t.promiseImpl||xz};$F.prototype.withLock=function(e,t){return new(0,this.promiseImpl)(Hz.bind(function(r,n){var o=t||(new Date).getTime()+"|"+Math.random(),i=(new Date).getTime(),s=this.storageKey,a=this.pollIntervalMS,l=this.timeoutMS,c=this.storage,d=s+":X",u=s+":Y",h=s+":Z",p=function(e){if((new Date).getTime()-i>l)return LF.error("Timeout waiting for mutex on "+s+"; clearing lock. ["+o+"]"),c.removeItem(h),c.removeItem(u),void m();setTimeout(function(){try{e()}catch(e){n(e)}},a*(Math.random()+.1))},g=function(e,t){e()?t():p(function(){g(e,t)})},f=function(){var e=c.getItem(u);return!(e&&e!==o||(c.setItem(u,o),c.getItem(u)!==o&&(Jz(c,!0)||n(new Error("localStorage support dropped while acquiring lock")),1)))},m=function(){c.setItem(d,o),g(f,function(){c.getItem(d)!==o?p(function(){c.getItem(u)===o?g(function(){return!c.getItem(h)},v):m()}):v()})},v=function(){c.setItem(h,"1");var t=function(){c.removeItem(h),c.getItem(u)===o&&c.removeItem(u),c.getItem(d)===o&&c.removeItem(d)};e().then(function(e){t(),r(e)}).catch(function(e){t(),n(e)})};try{if(!Jz(c,!0))throw new Error("localStorage support check failed");m()}catch(e){n(e)}},this))};var NF=function(e){this.storage=e||eF()};NF.prototype.init=function(){return this.storage?xz.resolve():xz.reject(new Error("localStorage is not available"))},NF.prototype.isInitialized=function(){return!0},NF.prototype.setItem=function(e,t){return new xz(Hz.bind(function(r,n){try{this.storage.setItem(e,uF(t))}catch(e){n(e)}r()},this))},NF.prototype.getItem=function(e){return new xz(Hz.bind(function(t,r){var n;try{n=hF(this.storage.getItem(e))}catch(e){r(e)}t(n)},this))},NF.prototype.removeItem=function(e){return new xz(Hz.bind(function(t,r){try{this.storage.removeItem(e)}catch(e){r(e)}t()},this))};var RF=Wz("batch"),PF=function(e,t){t=t||{},this.storageKey=e,this.usePersistence=t.usePersistence,this.usePersistence&&(this.queueStorage=t.queueStorage||new NF,this.lock=new $F(e,{storage:t.sharedLockStorage,timeoutMS:t.sharedLockTimeoutMS})),this.reportError=t.errorReporter||Hz.bind(RF.error,RF),this.pid=t.pid||null,this.memQueue=[],this.initialized=!1,t.enqueueThrottleMs?this.enqueuePersisted=function(e,t){var r=null,n=[];return function(o){var i=this;return n.push(o),r||(r=new xz(function(o){setTimeout(function(){var t=e.apply(i,[n]);r=null,n=[],o(t)},t)}
vendor: 10,443 bytes, line 3066
3066)),r}}(Hz.bind(this._enqueuePersisted,this),t.enqueueThrottleMs):this.enqueuePersisted=Hz.bind(function(e){return this._enqueuePersisted([e])},this)};PF.prototype.ensureInit=function(){return this.initialized||!this.usePersistence?xz.resolve():this.queueStorage.init().then(Hz.bind(function(){this.initialized=!0},this)).catch(Hz.bind(function(e){this.reportError("Error initializing queue persistence. Disabling persistence",e),this.initialized=!0,this.usePersistence=!1},this))},PF.prototype.enqueue=function(e,t){var r={id:oF(),flushAfter:(new Date).getTime()+2*t,payload:e};return this.usePersistence?this.enqueuePersisted(r):(this.memQueue.push(r),xz.resolve(!0))},PF.prototype._enqueuePersisted=function(e){var t=Hz.bind(function(){return this.ensureInit().then(Hz.bind(function(){return this.readFromStorage()},this)).then(Hz.bind(function(t){return this.saveToStorage(t.concat(e))},this)).then(Hz.bind(function(t){return t&&(this.memQueue=this.memQueue.concat(e)),t},this)).catch(Hz.bind(function(t){return this.reportError("Error enqueueing items",t,e),!1},this))},this);return this.lock.withLock(t,this.pid).catch(Hz.bind(function(e){return this.reportError("Error acquiring storage lock",e),!1},this))},PF.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);return this.usePersistence&&t.length<e?this.ensureInit().then(Hz.bind(function(){return this.readFromStorage()},this)).then(Hz.bind(function(r){if(r.length){var n={};Hz.each(t,function(e){n[e.id]=!0});for(var o=0;o<r.length;o++){var i=r[o];if((new Date).getTime()>i.flushAfter&&!n[i.id]&&(i.orphaned=!0,t.push(i),t.length>=e))break}}return t},this)):xz.resolve(t)};var DF=function(e,t){var r=[];return Hz.each(e,function(e){e.id&&!t[e.id]&&r.push(e)}),r};PF.prototype.removeItemsByID=function(e){var t={};if(Hz.each(e,function(e){t[e]=!0}),this.memQueue=DF(this.memQueue,t),this.usePersistence){var r=Hz.bind(function(){return this.ensureInit().then(Hz.bind(function(){return this.readFromStorage()},this)).then(Hz.bind(function(e){return e=DF(e,t),this.saveToStorage(e)},this)).then(Hz.bind(function(){return this.readFromStorage()},this)).then(Hz.bind(function(e){for(var r=0;r<e.length;r++){var n=e[r];if(n.id&&t[n.id])throw new Error("Item not removed from storage")}return!0},this)).catch(Hz.bind(function(t){return this.reportError("Error removing items",t,e),!1},this))},this);return this.lock.withLock(r,this.pid).catch(Hz.bind(function(e){return this.reportError("Error acquiring storage lock",e),!Jz(this.lock.storage,!0)&&r().then(Hz.bind(function(e){return e||this.queueStorage.removeItem(this.storageKey).then(function(){return e})},this)).catch(Hz.bind(function(e){return this.reportError("Error clearing queue",e),!1},this))},this))}return xz.resolve(!0)};var MF=function(e,t){var r=[];return Hz.each(e,function(e){var n=e.id;if(n in t){var o=t[n];null!==o&&(e.payload=o,r.push(e))}else r.push(e)}),r};PF.prototype.updatePayloads=function(e){return this.memQueue=MF(this.memQueue,e),this.usePersistence?this.lock.withLock(Hz.bind(function(){return this.ensureInit().then(Hz.bind(function(){return this.readFromStorage()},this)).then(Hz.bind(function(t){return t=MF(t,e),this.saveToStorage(t)},this)).catch(Hz.bind(function(t){return this.reportError("Error updating items",e,t),!1},this))},this),this.pid).catch(Hz.bind(function(e){return this.reportError("Error acquiring storage lock",e),!1},this)):xz.resolve(!0)},PF.prototype.readFromStorage=function(){return this.ensureInit().then(Hz.bind(function(){return this.queueStorage.getItem(this.storageKey)},this)).then(Hz.bind(function(e){return e&&(Hz.isArray(e)||(this.reportError("Invalid storage entry:",e),e=null)),e||[]},this)).catch(Hz.bind(function(e){return this.reportError("Error retrieving queue",e),[]},this))},PF.prototype.saveToStorage=function(e){return this.ensureInit().then(Hz.bind(function(){return this.queueStorage.setItem(this.storageKey,e)},this)).then(function(){return!0}).catch(Hz.bind(function(e){return this.reportError("Error saving queue",e),!1},this))},PF.prototype.clear=function(){return this.memQueue=[],this.usePersistence?this.ensureInit().then(Hz.bind(function(){return this.queueStorage.removeItem(this.storageKey)},this)):xz.resolve()};var zF=Wz("batch"),FF=function(e,t){this.errorReporter=t.errorReporter,this.queue=new PF(e,{errorReporter:Hz.bind(this.reportError,this),queueStorage:t.queueStorage,sharedLockStorage:t.sharedLockStorage,sharedLockTimeoutMS:t.sharedLockTimeoutMS,usePersistence:t.usePersistence,enqueueThrottleMs:t.enqueueThrottleMs}),this.libConfig=t.libConfig,this.sendRequest=t.sendRequestFunc,this.beforeSendHook=t.beforeSendHook,this.stopAllBatching=t.stopAllBatchingFunc,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart,this.consecutiveRemovalFailures=0,this.itemIdsSentSuccessfully={},this.flushOnlyOnInterval=t.flushOnlyOnInterval||!1,this._flushPromise=null};FF.prototype.enqueue=function(e){return this.queue.enqueue(e,this.flushInterval)},FF.prototype.start=function(){return this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()},FF.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)},FF.prototype.clear=function(){return this.queue.clear()},FF.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size},FF.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)},FF.prototype.scheduleFlush=function(e){this.flushInterval=e,this.stopped||(this.timeoutID=setTimeout(Hz.bind(function(){this.stopped||(this._flushPromise=this.flush())},this),this.flushInterval))},FF.prototype.sendRequestPromise=function(e,t){return new xz(Hz.bind(function(r){this.sendRequest(e,t,r)},this))},FF.prototype.flush=function(e){if(this.requestInProgress)return zF.log("Flush: Request already in progress"),xz.resolve();this.requestInProgress=!0,e=e||{};var t=this.libConfig.batch_request_timeout_ms,r=(new Date).getTime(),n=this.batchSize;return this.queue.fillBatch(n).then(Hz.bind(function(o){var i=o.length===n,s=[],a={};if(Hz.each(o,function(e){var t=e.payload;if(this.beforeSendHook&&!e.orphaned&&(t=this.beforeSendHook(t)),t){t.event&&t.properties&&(t.properties=Hz.extend({},t.properties,{mp_sent_by_lib_version:MC.LIB_VERSION}));var r=!0,n=e.id;n?(this.itemIdsSentSuccessfully[n]||0)>5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:e,batchSize:o.length,timesSent:this.itemIdsSentSuccessfully[n]}),r=!1):this.reportError("[dupe] found item with no ID",{item:e}),r&&s.push(t)}a[e.id]=t},this),s.length<1)return this.requestInProgress=!1,this.resetFlush(),xz.resolve();var l=Hz.bind(function(){return this.queue.removeItemsByID(Hz.map(o,function(e){return e.id})).then(Hz.bind(function(e){return Hz.each(o,Hz.bind(function(e){var t=e.id;t?(this.itemIdsSentSuccessfully[t]=this.itemIdsSentSuccessfully[t]||0,this.itemIdsSentSuccessfully[t]++,this.itemIdsSentSuccessfully[t]>5&&this.reportError("[dupe] item ID sent too many times",{item:e,batchSize:o.length,timesSent:this.itemIdsSentSuccessfully[t]})):this.reportError("[dupe] found item with no ID while removing",{item:e})},this)),e?(this.consecutiveRemovalFailures=0,this.flushOnlyOnInterval&&!i?(this.resetFlush(),xz.resolve()):this.flush()):(++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush(),xz.resolve())},this))},this),c=Hz.bind(function(i){this.requestInProgress=!1;try{if(e.unloading)return this.queue.updatePayloads(a);if(Hz.isObject(i)&&"timeout"===i.error&&(new Date).getTime()-r>=t)return this.reportError("Network timeout; retrying"),this.flush();if(Hz.isObject(i)&&(i.httpStatusCode>=500||429===i.httpStatusCode||i.httpStatusCode<=0&&!function(){var e=PC.navigator.onLine;return Hz.isUndefined(e)||e}()||"timeout"===i.error)){var s=2*this.flushInterval;return i.retryAfter&&(s=1e3*parseInt(i.retryAfter,10)||s),s=Math.min(6e5,s),this.reportError("Error; retry in "+s+" ms"),this.scheduleFlush(s),xz.resolve()}if(Hz.isObject(i)&&413===i.httpStatusCode){if(o.length>1){var c=Math.max(1,Math.floor(n/2));return this.batchSize=Math.min(this.batchSize,c,o.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush(),xz.resolve()}return this.reportError("Single-event request too large; dropping",o),this.resetBatchSize(),l()}return l()}catch(e){this.reportError("Error handling API response",e),this.resetFlush()}},this),d={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};return e.unloading&&(d.transport="sendBeacon"),zF.log("MIXPANEL REQUEST:",s),this.sendRequestPromise(s,d).then(c)},this)).catch(Hz.bind(function(e){this.reportError("Error flushing request queue",e),this.resetFlush()},this))},FF.prototype.reportError=function(e,t){if(zF.error.apply(zF.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(e){zF.error(e)}};var UF=function(e){var t=Date.now();return!e||t>e.maxExpires||t>e.idleExpires},BF=function(e,t){if(!Hz.isArray(e))return e&&t.critical("record_allowed_iframe_origins must be an array of origin strings, cross-origin recording will be disabled."),[];for(var r=[],n=0;n<e.length;n++)try{var o=new URL(e[n]).origin;if("null"===o){t.critical(e[n]+" has an opaque origin. Skipping this entry.");continue}r.push(o)}catch{t.critical(e[n]+" is not a valid origin URL. Skipping this entry.")}return r},HF="change",jF="click",VF="hashchange",WF="load",KF="mp_locationchange",qF="popstate",GF="scrollend",ZF="scroll",YF="submit",JF="visibilitychange",QF=["clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","x","y"],XF=["mp-include"],eU=["mp-no-track"],tU=eU.concat(["mp-sensitive"]),rU=["aria-label","aria-labelledby","aria-describedby","href","name","role","title","type"],nU={button:!0,checkbox:!0,combobox:!0,grid:!0,link:!0,listbox:!0,menu:!0,menubar:!0,menuitem:!0,menuitemcheckbox:!0,menuitemradio:!0,navigation:!0,option:!0,radio:!0,radiogroup:!0,searchbox:!0,slider:!0,spinbutton:!0,switch:!0,tab:!0,tablist:!0,textbox:!0,tree:!0,treegrid:!0,treeitem:!0},oU={base:!0,head:!0,html:!0,link:!0,meta:!0,script:!0,style:!0,title:!0,br:!0,hr:!0,wbr:!0,noscript:!0,picture:!0,source:!0,template:!0,track:!0},iU={article:!0,div:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,p:!0,section:!0,span:!0}
3066,sU=["onclick","onmousedown","onmouseup","onpointerdown","onpointerup","ontouchend","ontouchstart"],aU=Wz("autocapture");function lU(e){for(var t={},r=cU(e).split(" "),n=0;n<r.length;n++){var o=r[n];o&&(t[o]=!0)}return t}function cU(e){switch(typeof e.className){case"string":return e.className;case"object":return e.className.baseVal||e.getAttribute("class")||"";default:return""}}function dU(e){if(e.previousElementSibling)return e.previousElementSibling;do{e=e.previousSibling}while(e&&!fU(e));return e}function uU(e,t,r,n,o,i){var s={$classes:cU(e).split(" "),$tag_name:e.tagName.toLowerCase()},a=e.id;a&&(s.$id=a),yU(e,t,o,i)&&Hz.each(rU.concat(n),function(t){if(e.hasAttribute(t)&&!r[t]){var n=e.getAttribute(t);wU(n)&&(s["$attr-"+t]=n)}});for(var l=1,c=1,d=e;d=dU(d);)l++,d.tagName===e.tagName&&c++;return s.$nth_child=l,s.$nth_of_type=c,s}function hU(e,t,r,n){var o="";return yU(e,t,r,n)&&e.childNodes&&e.childNodes.length&&Hz.each(e.childNodes,function(e){vU(e)&&e.textContent&&(o+=Hz.trim(e.textContent).split(/(\s+)/).filter(wU).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),Hz.trim(o)}function pU(e,t,r,n){if(r)try{if(!r(e,t))return!1}catch(e){return aU.critical("Error while checking element in allowElementCallback",e),!1}if(!n.length)return!0;for(var o=0;o<n.length;o++){var i=n[o];try{if(e.matches(i))return!0}catch(e){aU.critical("Error while checking selector: "+i,e)}}return!1}function gU(e,t,r,n){var o;if(r)try{if(r(e,t))return!0}catch(e){return aU.critical("Error while checking element in blockElementCallback",e),!0}if(n&&n.length)for(o=0;o<n.length;o++){var i=n[o];try{if(e.matches(i))return!0}catch(e){aU.critical("Error while checking selector: "+i,e)}}var s=lU(e);for(o=0;o<eU.length;o++)if(s[eU[o]])return!0;return!1}function fU(e){return e&&1===e.nodeType}function mU(e,t){return e&&e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function vU(e){return e&&3===e.nodeType}function bU(e){var t=(e.name||e.id||"").toString().toLowerCase();return!("string"!=typeof t||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(t.replace(/[^a-zA-Z0-9]/g,"")))}function yU(e,t,r,n){var o;if(!pU(e,t,r,n))return!1;for(var i=e;i.parentNode&&!mU(i,"body");i=i.parentNode){var s=lU(i);for(o=0;o<tU.length;o++)if(s[tU[o]])return!1}var a=lU(e);for(o=0;o<XF.length;o++)if(a[XF[o]])return!0;if(mU(e,"input")||mU(e,"select")||mU(e,"textarea")||"true"===e.getAttribute("contenteditable"))return!1;var l=e.type||"";if("string"==typeof l)switch(l.toLowerCase()){case"hidden":case"password":return!1}return!bU(e)}function wU(e){if(null===e||Hz.isUndefined(e))return!1;if("string"==typeof e){if(e=Hz.trim(e),/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((e||"").replace(/[- ]/g,"")))return!1;if(/(^\d{3}-?\d{2}-?\d{4}$)/.test(e))return!1}return!0}function xU(e){var t="onscrollend"in PC,r=Kz(e),n=GF;if(!t){var o=null;r=Kz(function(){clearTimeout(o),o=setTimeout(e,100)}),n=ZF}return{listener:r,eventType:n}}function _U(e){var t=e.tagName.toLowerCase();return!!("button"===t||"input"===t||"select"===t||"textarea"===t||"details"===t||"dialog"===t||e.isContentEditable||e.onclick||e.onmousedown||e.onmouseup||e.ontouchstart||e.ontouchend||function(e){for(var t=0;t<sU.length;t++)if(e.hasAttribute(sU[t]))return!0;return!1}(e)||function(e){var t=e.getAttribute("role");if(!t)return!1;var r=t.trim().split(/\s+/)[0].toLowerCase();return nU[r]}(e)||"a"===t&&e.hasAttribute("href")||e.hasAttribute("tabindex"))}function kU(e){if(!e||!e.tagName)return!0;var t=e.tagName.toLowerCase();if(oU[t])return!0;if(_U(e))return!1;for(var r=e.parentElement,n=0;r&&n<5;){if(_U(r))return!1;if(r.getRootNode&&r.getRootNode()!==$z){var o=r.getRootNode();if(o.host&&_U(o.host))return!1}r=r.parentElement,n++}return!!iU[t]}function CU(e){return"composedPath"in e?e.composedPath():[]}function SU(e){var t=CU(e);return t&&t.length>0?t[0]:e.target||e.srcElement}var EU=".mp-mask, .fs-mask, .amp-mask, .rr-mask, .ph-mask",IU=["password","email","tel","hidden"];function AU(e){return e?Array.isArray(e)?e:[e]:[]}function TU(e,t){return!!t&&!!e.closest(t)}function OU(e,t){var r=(e.getAttribute("type")||"").toLowerCase();if(-1!==IU.indexOf(r))return!0;var n=(e.getAttribute("autocomplete")||"").toLowerCase();return!(!(n&&""!==n&&"off"!==n||e.hasAttribute("data-rr-is-password")||bU(e))&&(t.input.maskAll?TU(e,t.input.unmaskingSelector):!TU(e,t.input.maskingSelector)&&!TU(e,EU)))}function LU(e,t){return!(!e||(!t.text._legacyClassRegex||!OR(e,t.text._legacyClassRegex))&&(t.text.maskAll?TU(e,t.text.unmaskingSelector):!TU(e,t.text.maskingSelector)&&!TU(e,EU)))}var $U=Wz("network-plugin");function NU(e){return Math.round(Date.now()-e.performance.now())}var RU={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],ignoreRequestFn:function(){return!1},recordHeaders:{request:[],response:[]},recordBodyUrls:{request:[],response:[]},recordInitialRequests:!1};function PU(e){return"resource"===e.entryType}function DU(e,t,r){if(!(t in e)||"function"!=typeof e[t])return function(){};var n=e[t],o=r(n);return e[t]=o,function(){e[t]=n}}var MU=1048576;function zU(e){return e&&"string"==typeof e&&e.length>MU?($U.error("Body truncated from "+e.length+" to "+MU+" characters"),e.substring(0,MU)+"... [truncated]"):e}function FU(e,t,r){return!(!t[e]||0===t[e].length)&&t[e].includes(r.toLowerCase())}function UU(e,t,r){return!(!t[e]||0===t[e].length)&&dF(r,t[e])}function BU(e){if(null==e)return null;var t;if("string"==typeof e)t=e;else if(e instanceof Document)t=e.textContent;else if(e instanceof FormData)t=Hz.HTTPBuildQuery(e);else{if(!Hz.isObject(e))return"Cannot read body of type "+typeof e;
3066try{t=JSON.stringify(e)}catch{return"Failed to stringify response object"}}return zU(t)}function HU(e){return new Promise(function(t){var r=setTimeout(function(){t("Timeout while trying to read body")},500);try{e.clone().text().then(function(e){clearTimeout(r),t(zU(e))},function(e){clearTimeout(r),t("Failed to read body: "+String(e))})}catch(e){clearTimeout(r),t("Failed to read body: "+String(e))}})}function jU(e,t,r,n,o,i){if(void 0===i&&(i=0),i>10)return $U.error("Cannot find performance entry"),Promise.resolve(null);var s=function(e,t){for(var r=e.length-1;r>=0;r-=1)if(t(e[r]))return e[r]}(e.performance.getEntriesByName(r),function(e){return PU(e)&&e.initiatorType===t&&(!n||e.startTime>=n)&&(!o||e.startTime<=o)});return s?Promise.resolve(s):new Promise(function(e){setTimeout(e,50*i)}).then(function(){return jU(e,t,r,n,o,i+1)})}function VU(e,t,r){if(!("performance"in t))return function(){};var n=Object.assign({},RU.recordHeaders,r.recordHeaders||{}),o=Object.assign({},RU.recordBodyUrls,r.recordBodyUrls||{});r=Object.assign({},r,{recordHeaders:n,recordBodyUrls:o});var i=Object.assign({},RU,r),s=function(t){var r=t.requests.filter(function(e){return!dF(e.url,i.ignoreRequestUrls||[])&&!i.ignoreRequestFn(e)});(r.length>0||t.isInitial)&&e(Object.assign({},t,{requests:r}))},a=function(e,t,r){if(!t.PerformanceObserver)return $U.error("PerformanceObserver not supported"),function(){};if(r.recordInitialRequests){var n=t.performance.getEntries().filter(function(e){return function(e){return"navigation"===e.entryType}(e)||PU(e)&&r.initiatorTypes.includes(e.initiatorType)});e({requests:n.map(function(e){return{url:e.name,initiatorType:e.initiatorType,status:"responseStatus"in e?e.responseStatus:void 0,startTime:Math.round(e.startTime),endTime:Math.round(e.responseEnd),timeOrigin:NU(t)}}),isInitial:!0})}var o=new t.PerformanceObserver(function(n){var o=n.getEntries().filter(function(e){return PU(e)&&r.initiatorTypes.includes(e.initiatorType)&&"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType});e({requests:o.map(function(e){return{url:e.name,initiatorType:e.initiatorType,status:"responseStatus"in e?e.responseStatus:void 0,startTime:Math.round(e.startTime),endTime:Math.round(e.responseEnd),timeOrigin:NU(t)}})})});return o.observe({entryTypes:["navigation","resource"]}),function(){o.disconnect()}}(s,t,i),l=function(e,t,r){if(!r.initiatorTypes.includes("xmlhttprequest"))return function(){};var n=DU(t.XMLHttpRequest.prototype,"open",function(n){return function(o,i,s,a,l){void 0===s&&(s=!0);var c,d,u=this,h=new Request(i,{method:o}),p={},g={},f=u.setRequestHeader.bind(u);u.setRequestHeader=function(e,t){return FU("request",r.recordHeaders,e)&&(g[e]=t),f(e,t)},p.requestHeaders=g;var m=u.send.bind(u);u.send=function(e){return UU("request",r.recordBodyUrls,h.url)&&(p.requestBody=BU(e)),c=t.performance.now(),m(e)},u.addEventListener("readystatechange",function(){if(u.readyState===u.DONE){d=t.performance.now();var n={},o=u.getAllResponseHeaders();o&&o.trim().split(/[\r\n]+/).forEach(function(e){if(e){var t=e.indexOf(": ");if(-1!==t){var o=e.substring(0,t),i=e.substring(t+2);o&&FU("response",r.recordHeaders,o)&&(n[o]=i)}}}),p.responseHeaders=n,UU("response",r.recordBodyUrls,h.url)&&(p.responseBody=BU(u.response)),jU(t,"xmlhttprequest",h.url,c,d).then(function(r){if(r){var n={url:r.name,method:h.method,initiatorType:r.initiatorType,status:u.status,startTime:Math.round(r.startTime),endTime:Math.round(r.responseEnd),timeOrigin:NU(t),requestHeaders:p.requestHeaders,requestBody:p.requestBody,responseHeaders:p.responseHeaders,responseBody:p.responseBody};e({requests:[n]})}else $U.error("Failed to get performance entry for XHR request to "+h.url)}).catch(function(e){$U.error("Error recording XHR request to "+h.url+": "+String(e))})}}),n.call(u,o,i,s,a,l)}});return function(){n()}}(s,t,i),c=function(e,t,r){if(!r.initiatorTypes.includes("fetch"))return function(){};var n=DU(t,"fetch",function(n){return function(){var o,i,s,a,l,c=new Request(arguments[0],arguments[1]),d={},u=Promise.resolve(void 0),h=new Promise(function(e){l=e});try{var p={};
3066c.headers.forEach(function(e,t){FU("request",r.recordHeaders,t)&&(p[t]=e)}),d.requestHeaders=p,UU("request",r.recordBodyUrls,c.url)&&(u=HU(c).then(function(e){d.requestBody=e})),i=t.performance.now(),a=n.apply(t,arguments).then(function(e){o=e,s=t.performance.now();var n={};return o.headers.forEach(function(e,t){FU("response",r.recordHeaders,t)&&(n[t]=e)}),d.responseHeaders=n,UU("response",r.recordBodyUrls,c.url)?HU(o).then(function(e){d.responseBody=e,l()}):l(),o})}catch(e){a=Promise.reject(e)}return Promise.all([u,h,a]).then(function(){return jU(t,"fetch",c.url,i,s)}).then(function(r){if(r){var n={url:r.name,method:c.method,initiatorType:r.initiatorType,status:o?o.status:void 0,startTime:Math.round(r.startTime),endTime:Math.round(r.responseEnd),timeOrigin:NU(t),requestHeaders:d.requestHeaders,requestBody:d.requestBody,responseHeaders:d.responseHeaders,responseBody:d.responseBody};e({requests:[n]})}else $U.error("Failed to get performance entry for fetch request to "+c.url)}).catch(function(e){$U.error("Error recording fetch request to "+c.url+": "+String(e))}),a}});return function(){n()}}(s,t,i);return function(){a(),l(),c()}}var WU=Wz("recorder"),KU=PC.CompressionStream,qU={batch_size:1e3,batch_flush_interval_ms:1e4,batch_request_timeout_ms:9e4,batch_autostart:!0},GU=new Set([xN.MouseMove,xN.MouseInteraction,xN.Scroll,xN.ViewportResize,xN.Input,xN.TouchMove,xN.MediaInteraction,xN.Drag,xN.Selection]),ZU=function(e){this._mixpanel=e.mixpanelInstance,this._onIdleTimeout=e.onIdleTimeout||cF,this._onMaxLengthReached=e.onMaxLengthReached||cF,this._onBatchSent=e.onBatchSent||cF,this._rrwebRecord=e.rrwebRecord||null,this._stopRecording=null,this.replayId=e.replayId,this.batchStartUrl=e.batchStartUrl||null,this.replayStartUrl=e.replayStartUrl||null,this.idleExpires=e.idleExpires||null,this.maxExpires=e.maxExpires||null,this.replayStartTime=e.replayStartTime||null,this.lastEventTimestamp=e.lastEventTimestamp||null,this.seqNo=e.seqNo||0,this.idleTimeoutId=null,this.maxTimeoutId=null,this.recordMaxMs=kz,this.recordMinMs=0,this._recordMinMsCheckStart=null;var t=Jz(e.sharedLockStorage||eF(),!0)&&!this.getConfig("disable_persistence");this.batcherKey="__mprec_"+this.getConfig("name")+"_"+this.getConfig("token")+"_"+this.replayId,this.queueStorage=new pF(gF,fF,vF),this.batcher=new FF(this.batcherKey,{errorReporter:this.reportError.bind(this),flushOnlyOnInterval:!0,libConfig:qU,sendRequestFunc:this.flushEventsWithOptOut.bind(this),queueStorage:this.queueStorage,sharedLockStorage:e.sharedLockStorage,usePersistence:t,stopAllBatchingFunc:this.stopRecording.bind(this),enqueueThrottleMs:250,sharedLockTimeoutMS:1e4})};ZU.prototype.getUserIdInfo=function(){if(this.finalFlushUserIdInfo)return this.finalFlushUserIdInfo;var e={distinct_id:String(this._mixpanel.get_distinct_id())},t=this._mixpanel.get_property("$device_id");t&&(e.$device_id=t);var r=this._mixpanel.get_property("$user_id");return r&&(e.$user_id=r),e},ZU.prototype.unloadPersistedData=function(){return this.batcher.stop(),this.queueStorage.init().catch(function(){this.reportError("Error initializing IndexedDB storage for unloading persisted data.")}.bind(this)).then(function(){return this.getDurationMs()<this._getRecordMinMs()?this.queueStorage.removeItem(this.batcherKey):this.batcher.flush().then(function(){return this.queueStorage.removeItem(this.batcherKey)}.bind(this))}.bind(this))},ZU.prototype.getConfig=function(e){return this._mixpanel.get_config(e)},ZU.prototype.get_config=function(e){return this.getConfig(e)},ZU.prototype.startRecording=function(e){if(null!==this._rrwebRecord)if(null===this._stopRecording){this.recordMaxMs=this.getConfig("record_max_ms"),this.recordMaxMs>kz&&(this.recordMaxMs=kz,WU.critical("record_max_ms cannot be greater than "+kz+"ms. Capping value.")),this.maxExpires||(this.maxExpires=(new Date).getTime()+this.recordMaxMs),this.recordMinMs=this._getRecordMinMs(),this.replayStartTime||(this.replayStartTime=(new Date).getTime(),this.batchStartUrl=Hz.info.currentUrl(),this.replayStartUrl=Hz.info.currentUrl()),e||this.recordMinMs>0?(this.batcher.stop(),this._recordMinMsCheckStart=null):this.batcher.start();var t=function(){clearTimeout(this.idleTimeoutId);var e=this.getConfig("record_idle_timeout_ms");this.idleTimeoutId=setTimeout(this._onIdleTimeout,e),this.idleExpires=(new Date).getTime()+e}.bind(this);t();var r=this.getConfig("record_block_selector");(""===r||null===r)&&(r=void 0);var n=function(e){var t={input:{maskingSelector:"",unmaskingSelector:"",maskAll:!0},text:{maskingSelector:"",unmaskingSelector:"",maskAll:!0}},r=e.get_config("record_mask_input_selector"),n=e.get_config("record_unmask_input_selector"),o=e.get_config("record_mask_all_inputs");t.input.maskingSelector=AU(r).join(","),t.input.unmaskingSelector=AU(n).join(","),void 0!==o&&(t.input.maskAll=o);var i=e.get_config("record_mask_text_selector"),s=e.get_config("record_unmask_text_selector"),a=e.get_config("record_mask_all_text"),l=e.get_config("record_mask_text_class"),c=AU(i);if(l)if(l instanceof RegExp)t.text._legacyClassRegex=l;else{var d="."+l;-1===c.indexOf(d)&&c.push(d)}return t.text.maskingSelector=c.join(","),t.text.unmaskingSelector=AU(s).join(","),void 0===a&&void 0!==i?t.text.maskAll=!1:void 0!==a&&(t.text.maskAll=a),t}(this._mixpanel),o=[];if(this.getConfig("record_network")){var i=this.getConfig("record_network_options")||{},s=(i.ignoreRequestUrls||[]).slice();s.push(this._getApiRoute()),i.ignoreRequestUrls=s,o.push(function(e){return{name:"rrweb/[email protected]",observer:VU,options:e}}(i))}this.getConfig("record_console")&&o.push({name:"rrweb/console@1",observer:oz,options:{stringifyOptions:{stringLengthLimit:1e3,numOfKeysLimit:50,depthOfLimit:2}}});var a=BF(this.getConfig("record_allowed_iframe_origins"),WU);try{this._stopRecording=this._rrwebRecord({emit:function(e){this.idleExpires&&this.idleExpires<e.timestamp?this._onIdleTimeout():(null===this._recordMinMsCheckStart&&(this._recordMinMsCheckStart=e.timestamp),function(e){return e.type===wN.IncrementalSnapshot&&GU.has(e.data.source)}(e)&&(this.batcher.stopped&&e.timestamp-this._recordMinMsCheckStart>=this.recordMinMs&&this.batcher.start(),t()),this.__enqueuePromise=this.batcher.enqueue(e),(null===this.lastEventTimestamp||e.timestamp>this.lastEventTimestamp)&&(this.lastEventTimestamp=e.timestamp))}.bind(this),blockClass:this.getConfig("record_block_class"),blockSelector:r,collectFonts:this.getConfig("record_collect_fonts"),dataURLOptions:{type:"image/webp",quality:.6},maskAllInputs:!0,maskTextSelector:"*",maskInputFn:this._getMaskFn(OU,n),maskTextFn:this._getMaskFn(LU,n),recordCrossOriginIframes:a.length>0,allowedIframeOrigins:a,recordCanvas:this.getConfig("record_canvas"),sampling:{canvas:15},plugins:o})}catch(e){this.reportError("Unexpected error when starting rrweb recording.",e)}if("function"!=typeof this._stopRecording)return this.reportError("rrweb failed to start, skipping this recording."),this._stopRecording=null,void this.stopRecording();var l=this.maxExpires-(new Date).getTime();this.maxTimeoutId=setTimeout(this._onMaxLengthReached.bind(this),l)}else WU.log("Recording already in progress, skipping startRecording.");else this.reportError("rrweb record function not provided. ")},ZU.prototype.stopRecording=function(e){if(this.finalFlushUserIdInfo=this.getUserIdInfo(),!this.isRrwebStopped()){try{this._stopRecording()}catch(e){this.reportError("Error with rrweb stopRecording",e)}this._stopRecording=null}var t;return this.batcher.stopped?t=this.batcher.clear():e||(t=this.batcher.flush()),this.batcher.stop(),clearTimeout(this.idleTimeoutId),clearTimeout(this.maxTimeoutId),t},ZU.prototype.isRrwebStopped=function(){return null===this._stopRecording},ZU.prototype.flushEventsWithOptOut=function(e,t,r){var n=function(e){0===e&&(this.stopRecording(),r({error:"Tracking has been opted out, stopping recording."}))}.bind(this);this._flushEvents(e,t,r,n)},ZU.prototype.serialize=function(){var e;try{e=this._mixpanel.get_tab_id()}catch(t){this.reportError("Error getting tab ID for serialization ",t),e=null}return{replayId:this.replayId,seqNo:this.seqNo,replayStartTime:this.replayStartTime,batchStartUrl:this.batchStartUrl,replayStartUrl:this.replayStartUrl,lastEventTimestamp:this.lastEventTimestamp,idleExpires:this.idleExpires,maxExpires:this.maxExpires,tabId:e}},ZU.deserialize=function(e,t){return new ZU(Hz.extend({},t,{replayId:e.replayId,batchStartUrl:e.batchStartUrl,replayStartUrl:e.replayStartUrl,idleExpires:e.idleExpires,maxExpires:e.maxExpires,replayStartTime:e.replayStartTime,lastEventTimestamp:e.lastEventTimestamp,seqNo:e.seqNo,sharedLockStorage:t.sharedLockStorage}))},ZU.prototype._getApiRoute=function(){return this.getConfig("api_routes").record},ZU.prototype._sendRequest=function(e,t,r,n){var o=function(t,r){200===t.status&&this.replayId===e&&(this.seqNo++,this.batchStartUrl=Hz.info.currentUrl()),this._onBatchSent(),n({status:0,httpStatusCode:t.status,responseBody:r,retryAfter:t.headers.get("Retry-After")})}.bind(this),i=this._mixpanel.get_api_host&&this._mixpanel.get_api_host("record")||this.getConfig("api_host");PC.fetch(i+"/"+this._getApiRoute()+"?"+new URLSearchParams(t),{method:"POST",headers:{Authorization:"Basic "+btoa(this.getConfig("token")+":"),"Content-Type":"application/octet-stream"},body:r}).then(function(e){e.json().then(function(t){o(e,t)}).catch(function(e){n({error:e})})}).catch(function(e){n({error:e,httpStatusCode:0})})},ZU.prototype._flushEvents=_F(function(e,t,r){var n=e.length;if(n>0){for(var o=this.replayId,i=1/0,s=-1/0,a=!1,l=0;l<n;l++)i=Math.min(i,e[l].timestamp),s=Math.max(s,e[l].timestamp),e[l].type===wN.FullSnapshot&&(a=!0);if(0===this.seqNo){if(!a)return r({error:"First batch does not contain a full snapshot. Aborting recording."}),void this.stopRecording(!0);this.replayStartTime=i}else this.replayStartTime||(this.reportError("Replay start time not set but seqNo is not 0. Using current batch start time as a fallback."),this.replayStartTime=i);var c=s-this.replayStartTime,d={$current_url:this.batchStartUrl,$lib_version:MC.LIB_VERSION,batch_start_time:i/1e3,mp_lib:"web",replay_id:o,replay_length_ms:c,replay_start_time:this.replayStartTime/1e3,replay_start_url:this.replayStartUrl,seq:this.seqNo},u=JSON.stringify(e);if(Object.assign(d,this.getUserIdInfo()),function(e,t,r){if(!PC.CompressionStream)return!1;var n=Hz.info.browser(e,t,r),o=Hz.info.browserVersion(e,t,r);return!(("Safari"===n||"Mobile Safari"===n)&&o>=16.4&&o<16.6)}(Pz,Lz.vendor,Nz)){var h=new Blob([u],{type:"application/json"}).stream().pipeThrough(new KU("gzip"));new Response(h).blob().then(function(e){d.format="gzip",this._sendRequest(o,d,e,r)}.bind(this))}else d.format="body",this._sendRequest(o,d,u,r)}}),ZU.prototype.reportError=function(e,t){WU.error.apply(WU.error,arguments);try{!t&&!(e instanceof Error)&&(e=new Error(e)),this.getConfig("error_reporter")(e,t)}catch(e){WU.error(e)}},ZU.prototype.getDurationMs=function(){return null===this.replayStartTime?0:null===this.lastEventTimestamp?(new Date).getTime()-this.replayStartTime:this.lastEventTimestamp-this.replayStartTime},ZU.prototype._getRecordMinMs=function(){var e=this.getConfig("record_min_ms");return e>8e3?(WU.critical("record_min_ms cannot be greater than 8000ms. Capping value."),8e3):e},ZU.prototype._getMaskFn=function(e,t){return function(r,n){if(!r.trim().length)return"";var o=!0;try{o=e(n,t)}catch(e){this.reportError("Error checking if text should be masked, defaulting to masked",e)}if(o){var i=Math.min(r.length,1e4);return"*".repeat(i)}return r}.bind(this)};
3066var YU=function(e){this.idb=new pF(gF,mF,vF),this.errorReporter=e.errorReporter,this.mixpanelInstance=e.mixpanelInstance,this.sharedLockStorage=e.sharedLockStorage};YU.prototype.isPersistenceEnabled=function(){return!this.mixpanelInstance.get_config("disable_persistence")},YU.prototype.handleError=function(e){this.errorReporter("IndexedDB error: ",e)},YU.prototype.setActiveRecording=function(e){if(!this.isPersistenceEnabled())return xz.resolve();var t=e.tabId;return t?this.idb.init().then(function(){return this.idb.setItem(t,e)}.bind(this)).catch(this.handleError.bind(this)):(console.warn("No tab ID is set, cannot persist recording metadata."),xz.resolve())},YU.prototype.getActiveRecording=function(){return this.isPersistenceEnabled()?this.idb.init().then(function(){return this.idb.getItem(this.mixpanelInstance.get_tab_id())}.bind(this)).then(function(e){return UF(e)?null:e}.bind(this)).catch(this.handleError.bind(this)):xz.resolve(null)},YU.prototype.clearActiveRecording=function(){return this.isPersistenceEnabled()?this.markActiveRecordingExpired():this.deleteActiveRecording()},YU.prototype.markActiveRecordingExpired=function(){return this.getActiveRecording().then(function(e){if(e)return e.maxExpires=0,this.setActiveRecording(e)}.bind(this)).catch(this.handleError.bind(this))},YU.prototype.deleteActiveRecording=function(){return this.idb.isInitialized()?this.idb.removeItem(this.mixpanelInstance.get_tab_id()).catch(this.handleError.bind(this)):xz.resolve()},YU.prototype.flushInactiveRecordings=function(){return this.isPersistenceEnabled()?this.idb.init().then(function(){return this.idb.getAll()}.bind(this)).then(function(e){var t=e.filter(function(e){return UF(e)}).map(function(e){return ZU.deserialize(e,{mixpanelInstance:this.mixpanelInstance,sharedLockStorage:this.sharedLockStorage}).unloadPersistedData().then(function(){return this.idb.removeItem(e.tabId)}.bind(this)).catch(this.handleError.bind(this))}.bind(this));return xz.all(t)}.bind(this)).catch(this.handleError.bind(this)):xz.resolve([])};var JU=Wz("recorder"),QU=function(e,t,r){this.mixpanelInstance=e,this.rrwebRecord=t||_R,this.sharedLockStorage=r,this.recordingRegistry=new YU({mixpanelInstance:this.mixpanelInstance,errorReporter:JU.error,sharedLockStorage:r}),this._flushInactivePromise=this.recordingRegistry.flushInactiveRecordings(),this.activeRecording=null,this.stopRecordingInProgress=!1};function XU(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}QU.prototype.startRecording=function(e){if(e=e||{},!this.activeRecording||this.activeRecording.isRrwebStopped()){var t=function(){JU.log("Idle timeout reached, restarting recording."),this.resetRecording()}.bind(this),r=function(){JU.log("Max recording length reached, stopping recording."),this.resetRecording()}.bind(this),n=function(){this.recordingRegistry.setActiveRecording(this.activeRecording.serialize()),this.__flushPromise=this.activeRecording.batcher._flushPromise}.bind(this),o={mixpanelInstance:this.mixpanelInstance,onBatchSent:n,onIdleTimeout:t,onMaxLengthReached:r,replayId:Hz.UUID(),rrwebRecord:this.rrwebRecord,sharedLockStorage:this.sharedLockStorage};return e.activeSerializedRecording?this.activeRecording=ZU.deserialize(e.activeSerializedRecording,o):this.activeRecording=new ZU(o),this.activeRecording.startRecording(e.shouldStopBatcher),this.recordingRegistry.setActiveRecording(this.activeRecording.serialize())}JU.log("Recording already in progress, skipping startRecording.")},QU.prototype.stopRecording=function(){return this.stopRecordingInProgress=!0,this._stopCurrentRecording(!1,!0).then(function(){return this.recordingRegistry.clearActiveRecording()}.bind(this)).then(function(){this.stopRecordingInProgress=!1}.bind(this))},QU.prototype.pauseRecording=function(){return this._stopCurrentRecording(!1)},QU.prototype._stopCurrentRecording=function(e,t){if(this.activeRecording){var r=this.activeRecording.stopRecording(e);return t&&(this.activeRecording=null),r}return xz.resolve()},QU.prototype.resumeRecording=function(e){return this.activeRecording&&this.activeRecording.isRrwebStopped()?(this.activeRecording.startRecording(!1),xz.resolve(null)):this.recordingRegistry.getActiveRecording().then(function(t){return t&&!this.stopRecordingInProgress?this.startRecording({activeSerializedRecording:t}):e?this.startRecording({shouldStopBatcher:!1}):(JU.log("No resumable recording found."),null)}.bind(this))},QU.prototype.resetRecording=function(){this.stopRecording(),this.startRecording({shouldStopBatcher:!0})},QU.prototype.isRecording=function(){return this.activeRecording&&!this.activeRecording.isRrwebStopped()},QU.prototype.getActiveReplayId=function(){return this.isRecording()?this.activeRecording.replayId:null},Object.defineProperty(QU.prototype,"replayId",{get:function(){return this.getActiveReplayId()}}),PC[FC]=QU;var eB,tB={exports:{}},rB=(eB||(eB=1,function(e){e.exports=function(){Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)});var e={},t={"==":function(e,t){return e==t},"===":function(e,t){return e===t},"!=":function(e,t){return e!=t},"!==":function(e,t){return e!==t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"<":function(e,t,r){return void 0===r?e<t:e<t&&t<r},"<=":function(e,t,r){return void 0===r?e<=t:e<=t&&t<=r},"!!":function(t){return e.truthy(t)},"!":function(t){return!e.truthy(t)},"%":function(e,t){return e%t},log:function(e){return console.log(e),e},in:function(e,t){return!(!t||typeof t.indexOf>"u")&&-1!==t.indexOf(e)},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(e,t,r){if(r<0){var n=String(e).substr(t);return n.substr(0,n.length+r)}return String(e).substr(t,r)},"+":function(){return Array.prototype.reduce.call(arguments,function(e,t){return parseFloat(e,10)+parseFloat(t,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(e,t){return parseFloat(e,10)*parseFloat(t,10)})},"-":function(e,t){return void 0===t?-e:e-t},"/":function(e,t){return e/t},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(e,t){return e.concat(t)},[])},var:function(e,t){var r=void 0===t?null:t,n=this;if(typeof e>"u"||""===e||null===e)return n;for(var o=String(e).split("."),i=0;i<o.length;i++)if(null==n||void 0===(n=n[o[i]]))return r;return n},missing:function(){for(var t=[],r=Array.isArray(arguments[0])?arguments[0]:arguments,n=0;n<r.length;n++){var o=r[n],i=e.apply({var:o},this);(null===i||""===i)&&t.push(o)}return t},missing_some:function(t,r){var n=e.apply({missing:r},this);return r.length-n.length>=t?[]:n}};return e.is_logic=function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&1===Object.keys(e).length},e.truthy=function(e){return!(Array.isArray(e)&&0===e.length||!e)},e.get_operator=function(e){return Object.keys(e)[0]},e.get_values=function(t){return t[e.get_operator(t)]},e.apply=function(r,n){if(Array.isArray(r))return r.map(function(t){return e.apply(t,n)});if(!e.is_logic(r))return r;var o,i,s,a,l,c=e.get_operator(r),d=r[c];
3066if(Array.isArray(d)||(d=[d]),"if"===c||"?:"==c){for(o=0;o<d.length-1;o+=2)if(e.truthy(e.apply(d[o],n)))return e.apply(d[o+1],n);return d.length===o+1?e.apply(d[o],n):null}if("and"===c){for(o=0;o<d.length;o+=1)if(i=e.apply(d[o],n),!e.truthy(i))return i;return i}if("or"===c){for(o=0;o<d.length;o+=1)if(i=e.apply(d[o],n),e.truthy(i))return i;return i}if("filter"===c)return a=e.apply(d[0],n),s=d[1],Array.isArray(a)?a.filter(function(t){return e.truthy(e.apply(s,t))}):[];if("map"===c)return a=e.apply(d[0],n),s=d[1],Array.isArray(a)?a.map(function(t){return e.apply(s,t)}):[];if("reduce"===c)return a=e.apply(d[0],n),s=d[1],l=typeof d[2]<"u"?e.apply(d[2],n):null,Array.isArray(a)?a.reduce(function(t,r){return e.apply(s,{current:r,accumulator:t})},l):l;if("all"===c){if(a=e.apply(d[0],n),s=d[1],!Array.isArray(a)||!a.length)return!1;for(o=0;o<a.length;o+=1)if(!e.truthy(e.apply(s,a[o])))return!1;return!0}if("none"===c){if(a=e.apply(d[0],n),s=d[1],!Array.isArray(a)||!a.length)return!0;for(o=0;o<a.length;o+=1)if(e.truthy(e.apply(s,a[o])))return!1;return!0}if("some"===c){if(a=e.apply(d[0],n),s=d[1],!Array.isArray(a)||!a.length)return!1;for(o=0;o<a.length;o+=1)if(e.truthy(e.apply(s,a[o])))return!0;return!1}if(d=d.map(function(t){return e.apply(t,n)}),t.hasOwnProperty(c)&&"function"==typeof t[c])return t[c].apply(n,d);if(c.indexOf(".")>0){var u=String(c).split("."),h=t;for(o=0;o<u.length;o++){if(!h.hasOwnProperty(u[o]))throw new Error("Unrecognized operation "+c+" (failed at "+u.slice(0,o+1).join(".")+")");h=h[u[o]]}return h.apply(n,d)}throw new Error("Unrecognized operation "+c)},e.uses_data=function(t){var r=[];if(e.is_logic(t)){var n=e.get_operator(t),o=t[n];Array.isArray(o)||(o=[o]),"var"===n?r.push(o[0]):o.forEach(function(t){r.push.apply(r,e.uses_data(t))})}return function(e){for(var t=[],r=0,n=e.length;r<n;r++)-1===t.indexOf(e[r])&&t.push(e[r]);return t}(r)},e.add_operation=function(e,r){t[e]=r},e.rm_operation=function(e){delete t[e]},e.rule_like=function(t,r){if(r===t||"@"===r)return!0;if("number"===r)return"number"==typeof t;if("string"===r)return"string"==typeof t;if("array"===r)return Array.isArray(t)&&!e.is_logic(t);if(e.is_logic(r)){if(e.is_logic(t)){var n=e.get_operator(r),o=e.get_operator(t);if("@"===n||n===o)return e.rule_like(e.get_values(t,!1),e.get_values(r,!1))}return!1}if(Array.isArray(r)){if(Array.isArray(t)){if(r.length!==t.length)return!1;for(var i=0;i<r.length;i+=1)if(!e.rule_like(t[i],r[i]))return!1;return!0}return!1}return!1},e}()}(tB)),tB.exports),nB=XU(rB),oB={eventMatchesCriteria:function(e,t,r){if(e!==r.event_name)return{matches:!1};var n=r.property_filters,o=!0;if(n&&!Hz.isEmptyObject(n))try{o=nB.apply(n,t||{})}catch(e){return{matches:!1,error:e.toString()}}return{matches:o}}};function iB(){this.clicks=[]}function sB(e,t){this.changeCallback=e||function(){},this.observerConfig=t,this.observedShadowRoots=null,this.shadowObservers=[]}PC[zC]=Promise.resolve(oB),iB.prototype.isRageClick=function(e,t){var r=(t=t||{}).threshold_px||30,n=t.timeout_ms||1e3,o=t.click_count||4;if(t.interactive_elements_only){var i=SU(e);if(!i||kU(i))return!1}var s=Date.now(),a=e.pageX,l=e.pageY,c=this.clicks[this.clicks.length-1];if(c&&s-c.timestamp<n&&Math.sqrt(Math.pow(a-c.x,2)+Math.pow(l-c.y,2))<r){if(this.clicks.push({x:a,y:l,timestamp:s}),this.clicks.length>=o)return this.clicks=[],!0}else this.clicks=[{x:a,y:l,timestamp:s}];return!1},sB.prototype.getEventTarget=function(e){if(this.observedShadowRoots)return SU(e)},sB.prototype.observeFromEvent=function(e){if(this.observedShadowRoots)for(var t=CU(e),r=0;r<t.length;r++){var n=t[r];n&&n.shadowRoot&&this.observeShadowRoot(n.shadowRoot)}},sB.prototype.observeShadowRoot=function(e){if(this.observedShadowRoots&&!this.observedShadowRoots.has(e)){var t=this;try{this.observedShadowRoots.add(e);var r=new window.MutationObserver(function(){t.changeCallback()});r.observe(e,this.observerConfig),this.shadowObservers.push(r)}catch(e){aU.critical("Error while observing shadow root",e)}}},sB.prototype.start=function(){if(!this.observedShadowRoots){if(!(typeof WeakSet<"u"))return void aU.critical("Shadow DOM observation unavailable: WeakSet not supported");this.observedShadowRoots=new WeakSet}},sB.prototype.stop=function(){if(this.observedShadowRoots){for(var e=0;e<this.shadowObservers.length;e++)try{this.shadowObservers[e].disconnect()}catch(e){aU.critical("Error while disconnecting shadow DOM observer",e)}this.shadowObservers=[],this.observedShadowRoots=null}};var aB=[HF,"input",YF,"select","toggle"],lB=[GF],cB=[VF],dB={characterData:!0,childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class","hidden","checked","selected","value","display","visibility"]};function uB(e){this.eventListeners=[],this.mutationObserver=null,this.shadowDOMObserver=null,this.isTracking=!1,this.lastChangeEventTimestamp=0,this.pendingClicks=[],this.onDeadClickCallback=e,this.processingActive=!1,this.processingTimeout=null}uB.prototype.addClick=function(e){var t=this.shadowDOMObserver&&this.shadowDOMObserver.getEventTarget(e);return t||(t=e.target||e.srcElement),!(!t||kU(t)||(this.shadowDOMObserver&&this.shadowDOMObserver.observeFromEvent(e),this.pendingClicks.push({element:t,event:e,timestamp:Date.now()}),0))},uB.prototype.trackClick=function(e,t){if(!this.isTracking)return!1;var r=this.addClick(e);return r&&this.triggerProcessing(t),r},uB.prototype.getDeadClicks=function(e){if(0===this.pendingClicks.length)return[];var t=e.timeout_ms,r=Date.now(),n=this.pendingClicks.slice();this.pendingClicks=[];for(var o=[],i=0;i<n.length;i++){var s=n[i];r-s.timestamp>=t?this.hasChangesAfter(s.timestamp)||o.push(s):this.pendingClicks.push(s)}return o},uB.prototype.hasChangesAfter=function(e){return this.lastChangeEventTimestamp>=e-100},uB.prototype.recordChangeEvent=function(){this.lastChangeEventTimestamp=Date.now()},uB.prototype.triggerProcessing=function(e){this.processingActive||(this.processingActive=!0,this.processRecursively(e))},uB.prototype.processRecursively=function(e){if(this.isTracking&&this.onDeadClickCallback){var t=e.timeout_ms,r=this;this.processingTimeout=setTimeout(function(){if(r.processingActive){for(var t=r.getDeadClicks(e),n=0;n<t.length;n++)r.onDeadClickCallback(t[n].event);r.pendingClicks.length>0?r.processRecursively(e):r.processingActive=!1}},t)}else this.processingActive=!1},uB.prototype.startTracking=function(){if(!this.isTracking){this.isTracking=!0;var e=this;
vendor: 4,286 bytes, line 3066
3066aB.forEach(function(t){var r=function(){e.recordChangeEvent()};document.addEventListener(t,r,{capture:!0,passive:!0}),e.eventListeners.push({target:document,event:t,handler:r,options:{capture:!0,passive:!0}})}),cB.forEach(function(t){var r=function(){e.recordChangeEvent()};window.addEventListener(t,r),e.eventListeners.push({target:window,event:t,handler:r})}),lB.forEach(function(t){var r=function(){e.recordChangeEvent()};window.addEventListener(t,r,{passive:!0}),e.eventListeners.push({target:window,event:t,handler:r,options:{passive:!0}})});var t=function(){e.recordChangeEvent()};if(document.addEventListener("selectionchange",t),e.eventListeners.push({target:document,event:"selectionchange",handler:t}),window.MutationObserver)try{this.mutationObserver=new window.MutationObserver(function(){e.recordChangeEvent()}),this.mutationObserver.observe(document.body||document.documentElement,dB)}catch(e){aU.critical("Error while setting up mutation observer",e)}if(window.customElements)try{this.shadowDOMObserver=new sB(function(){e.recordChangeEvent()},dB),this.shadowDOMObserver.start()}catch(e){aU.critical("Error while setting up shadow DOM observer",e),this.shadowDOMObserver=null}}},uB.prototype.stopTracking=function(){if(this.isTracking){this.isTracking=!1,this.pendingClicks=[],this.lastChangeEventTimestamp=0,this.processingActive=!1,this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null);for(var e=0;e<this.eventListeners.length;e++){var t=this.eventListeners[e];try{t.target.removeEventListener(t.event,t.handler,t.options)}catch(e){aU.critical("Error while removing event listener",e)}}if(this.eventListeners=[],this.mutationObserver){try{this.mutationObserver.disconnect()}catch(e){aU.critical("Error while disconnecting mutation observer",e)}this.mutationObserver=null}if(this.shadowDOMObserver){try{this.shadowDOMObserver.stop()}catch(e){aU.critical("Error while stopping shadow DOM observer",e)}this.shadowDOMObserver=null}}};var hB="autocapture",pB="full-url",gB="allow_selectors",fB="allow_url_regexes",mB="block_attrs",vB="block_element_callback",bB="block_selectors",yB="block_url_regexes",wB="capture_extra_attrs",xB="capture_text_content",_B="scroll_capture_all",kB="scroll_depth_percent_checkpoints",CB="click",SB="dead_click",EB="input",IB="pageview",AB="rage_click",TB="scroll",OB="page_leave",LB="submit",$B={};$B[gB]=[],$B[fB]=[],$B[mB]=[],$B[vB]=null,$B[bB]=[],$B[yB]=[],$B[wB]=[],$B[xB]=!1,$B[_B]=!1,$B[kB]=[25,50,75,100],$B[CB]=!0,$B[SB]=!0,$B[EB]=!0,$B[IB]=pB,$B[AB]=!0,$B[TB]=!0,$B[OB]=!1,$B[LB]=!0;var NB={$mp_autocapture:!0},RB="$mp_click",PB="$mp_dead_click",DB="$mp_rage_click",MB=function(e){this.mp=e,this.maxScrollViewDepth=0,this.hasTrackedScrollSession=!1,this.previousScrollHeight=0};MB.prototype.init=function(){!function(){try{return!!$z.createElement("div").matches}catch{return!1}}()?aU.critical("Autocapture unavailable: missing required DOM APIs"):(this.initPageListeners(),this.initPageviewTracking(),this.initClickTracking(),this.initDeadClickTracking(),this.initInputTracking(),this.initScrollTracking(),this.initSubmitTracking(),this.initRageClickTracking(),this.initPageLeaveTracking())},MB.prototype.getFullConfig=function(){var e=this.mp.get_config(hB);return e?Hz.isObject(e)?Hz.extend({},$B,e):$B:{}},MB.prototype.getConfig=function(e){return this.getFullConfig()[e]},MB.prototype.currentUrlBlocked=function(){var e=Hz.info.currentUrl(),t=this.getConfig(fB)||[];if(t.length)try{return!dF(e,t)}catch(e){return aU.critical("Error while checking block URL regexes: ",e),!0}var r=this.getConfig(yB)||[];if(!r||!r.length)return!1;try{return dF(e,r)}catch(e){return aU.critical("Error while checking block URL regexes: ",e),!0}},MB.prototype.pageviewTrackingConfig=function(){return this.mp.get_config(hB)?this.getConfig(IB):this.mp.get_config("track_pageview")},MB.prototype.trackDomEvent=function(e,t){if(!this.currentUrlBlocked()){var r=this.mp.is_recording_heatmap_data()&&(t===RB&&!this.getConfig(CB)||t===DB&&!this._getClickTrackingConfig(AB)||t===PB&&!this._getClickTrackingConfig(SB)),n=function(e,t){var r=t.allowElementCallback,n=t.allowSelectors||[],o=t.blockAttrs||[],i=t.blockElementCallback,s=t.blockSelectors||[],a=t.captureTextContent||!1,l=t.captureExtraAttrs||[],c=t.captured
3066ForHeatMap||!1,d={};Hz.each(o,function(e){d[e]=!0});var u=null,h=typeof e.target>"u"?e.srcElement:e.target;if(vU(h)&&(h=h.parentNode),function(e,t){if(!e||mU(e,"html")||!fU(e))return!1;switch(e.tagName.toLowerCase()){case"form":return t.type===YF;case"input":return-1===["button","submit"].indexOf(e.getAttribute("type"))?t.type===HF:t.type===jF;case"select":case"textarea":return t.type===HF;default:return t.type===jF}}(h,e)&&pU(h,e,r,n)&&!gU(h,e,i,s)){for(var p=[h],g=h;g.parentNode&&!mU(g,"body");)p.push(g.parentNode),g=g.parentNode;var f,m=[],v=!1;if(Hz.each(p,function(t){var o=yU(t,e,r,n);!d.href&&"a"===t.tagName.toLowerCase()&&(f=t.getAttribute("href"),f=o&&wU(f)&&f),gU(t,e,i,s)&&(v=!0),m.push(uU(t,e,d,l,r,n))},this),!v){var b=$z.documentElement;if(u={$event_type:e.type,$host:PC.location.host,$pathname:PC.location.pathname,$elements:m,$el_attr__href:f,$viewportHeight:Math.max(b.clientHeight,PC.innerHeight||0),$viewportWidth:Math.max(b.clientWidth,PC.innerWidth||0),$pageHeight:$z.body.offsetHeight||0,$pageWidth:$z.body.offsetWidth||0},Hz.each(l,function(e){if(!d[e]&&h.hasAttribute(e)){var t=h.getAttribute(e);wU(t)&&(u["$el_attr__"+e]=t)}}),a&&(y=hU(h,e,r,n))&&y.length&&(u.$el_text=y),e.type===jF&&(Hz.each(QF,function(t){t in e&&(u["$"+t]=e[t])}),c&&(u.$captured_for_heatmap=!0),h=function(e){for(var t=e.target,r=e.composedPath(),n=0;n<r.length;n++){var o=r[n];if(mU(o,"a")||mU(o,"button")||mU(o,"input")||mU(o,"select")||o.getAttribute&&"button"===o.getAttribute("role")){t=o;break}if(o===t)break}return t}(e)),a){var y=hU(h,e,r,n);y&&y.length&&(u.$el_text=y)}if(h){if(!pU(h,e,r,n)||gU(h,e,i,s))return null;var w=uU(h,e,d,l,r,n);u.$target=w,u.$el_classes=w.$classes,Hz.extend(u,Hz.strip_empty_properties({$el_id:w.$id,$el_tag_name:w.$tag_name}))}}}return u}(e,{allowElementCallback:this.getConfig("allow_element_callback"),allowSelectors:this.getConfig(gB),blockAttrs:this.getConfig(mB),blockElementCallback:this.getConfig(vB),blockSelectors:this.getConfig(bB),captureExtraAttrs:this.getConfig(wB),captureTextContent:this.getConfig(xB),capturedForHeatMap:r});n&&(Hz.extend(n,NB),this.mp.track(t,n))}},MB.prototype.initPageListeners=function(){if(PC.removeEventListener(qF,this.listenerPopstate),PC.removeEventListener(VF,this.listenerHashchange),this.pageviewTrackingConfig()||this.getConfig(OB)||this.mp.get_config("record_heatmap_data")){this.listenerPopstate=function(){PC.dispatchEvent(new Event(KF))},this.listenerHashchange=function(){PC.dispatchEvent(new Event(KF))},PC.addEventListener(qF,this.listenerPopstate),PC.addEventListener(VF,this.listenerHashchange);var e=PC.history.pushState;"function"==typeof e&&(PC.history.pushState=function(t,r,n){e.call(PC.history,t,r,n),PC.dispatchEvent(new Event(KF))});var t=PC.history.replaceState;"function"==typeof t&&(PC.history.replaceState=function(e,r,n){t.call(PC.history,e,r,n),PC.dispatchEvent(new Event(KF))})}},MB.prototype._getClickTrackingConfig=function(e){var t=this.getConfig(e);return t?!0===t?{}:"object"==typeof t?t:{}:null},MB.prototype._trackPageLeave=function(e,t,r){if(!this.hasTrackedScrollSession&&(this.getConfig(OB)||this.mp.is_recording_heatmap_data())){this.hasTrackedScrollSession=!0;var n=Math.max($z.documentElement.clientHeight,PC.innerHeight||0),o=Math.round(Math.max(this.maxScrollViewDepth-n,0)/(r-n)*100),i=Math.round(n/r*100);r<=n&&(o=100,i=100);var s=Hz.extend({$max_scroll_view_depth:this.maxScrollViewDepth,$max_scroll_percentage:o,$fold_line_percentage:i,$scroll_height:r,$event_type:e.type,$current_url:t||Hz.info.currentUrl(),$viewportHeight:n,$viewportWidth:Math.max($z.documentElement.clientWidth,PC.innerWidth||0),$captured_for_heatmap:this.mp.is_recording_heatmap_data()},NB);this.mp.track("$mp_page_leave",s,{transport:"sendBeacon"})}},MB.prototype._initScrollDepthTracking=function(){if(PC.removeEventListener(ZF,this.listenerScrollDepth),PC.removeEventListener(GF,this.listenerScrollDepth),this.mp.get_config("record_heatmap_data")){aU.log("Initializing scroll depth tracking"),this.maxScrollViewDepth=Math.max($z.documentElement.clientHeight,PC.innerHeight||0);var e=function(){if(!this.currentUrlBlocked()){var e=Math.max($z.documentElement.clientHeight,PC.innerHeight||0)+PC.scrollY;e>this.maxScrollViewDepth&&(this.maxScrollViewDepth=e),this.previousScrollHeight=$z.body.scrollHeight}}.bind(this),t=xU(e);this.listenerScrollDepth=t.listener,PC.addEventListener(t.eventType,this.listenerScrollDepth)}},MB.prototype.initClickTracking=function(){PC.removeEventListener(jF,this.listenerClick,!0),(this.getConfig(CB)||this.mp.get_config("record_heatmap_data"))&&(aU.log("Initializing click tracking"),this.listenerClick=function(e){!this.getConfig(CB)&&!this.mp.is_recording_heatmap_data()||this.trackDomEvent(e,RB)}.bind(this),PC.addEventListener(jF,this.listenerClick,!0))},MB.prototype.initDeadClickTracking=function(){this._getClickTrackingConfig(SB)||this.mp.get_config("record_heatmap_data")?(aU.log("Initializing dead click tracking"),this._deadClickTracker||(this._deadClickTracker=new uB(function(e){this.trackDomEvent(e,PB)}.bind(this)),this._deadClickTracker.startTracking()),this.listenerDeadClick||(this.listenerDeadClick=function(e){var t=this._getClickTrackingConfig(SB);if((t||this.mp.is_recording_heatmap_data())&&!this.currentUrlBlocked()){var r=t||{};r.timeout_ms||(r.timeout_ms=500),this._deadClickTracker.trackClick(e,r)}}.bind(this),PC.addEventListener(jF,this.listenerDeadClick,!0))):this.stopDeadClickTracking()},MB.prototype.initInputTracking=function(){PC.removeEventListener(HF,this.listenerChange,!0),this.getConfig(EB)&&(aU.log("Initializing input tracking"),this.listenerChange=function(e){this.getConfig(EB)&&this.trackDomEvent(e,"$mp_input_change")}.bind(this),PC.addEventListener(HF,this.listenerChange,!0))},MB.prototype.initPageviewTracking=function(){if(PC.removeEventListener(KF,this.listenerLocationchange),this.pageviewTrackingConfig()||this.mp.get_config("record_heatmap_data")){aU.log("Initializing pageview tracking");var e="",t=!1;(this.pageviewTrackingConfig()||this.mp.is_recording_heatmap_data())&&!this.currentUrlBlocked()&&(t=this.mp.track_pageview(NB)),t&&(e=Hz.info.currentUrl()),this.listenerLocationchange=Kz(function(){if(!this.currentUrlBlocked()){var t=Hz.info.currentUrl(),r=!1,n=t.split("#")[0].split("?")[0]!==e.split("#")[0].split("?")[0],o=this.pageviewTrackingConfig();!o&&this.mp.is_recording_heatmap_data()&&(o=pB),o===pB?r=t!==e:"url-with-path-and-query-string"===o?r=t.split("#")[0]!==e.split("#")[0]:"url-with-path"===o&&(r=n),r&&(this.mp.track_pageview(NB)&&(e=t),n&&(this.lastScrollCheckpoint=0,aU.log("Path change: re-initializing scroll depth checkpoints")))}}.bind(this)),PC.addEventListener(KF,this.listenerLocationchange)}},MB.prototype.initRageClickTracking=function(){PC.removeEventListener(jF,this.listenerRageClick,!0),!this._getClickTrackingConfig(AB)&&!this.mp.get_config("record_heatmap_data")||(aU.log("Initializing rage click tracking"),this._rageClickTracker||(this._rageClickTracker=new iB),this.listenerRageClick=function(e){var t=this._getClickTrackingConfig(AB);!t&&!this.mp.is_recording_heatmap_data()||this.currentUrlBlocked()||this._rageClickTracker.isRageClick(e,t)&&this.trackDomEvent(e,DB)}.bind(this),PC.addEventListener(jF,this.listenerRageClick,!0))},MB.prototype.initScrollTracking=function(){if(PC.removeEventListener(GF,this.listenerScroll),PC.removeEventListener(ZF,this.listenerScroll),this.getConfig(TB)){aU.log("Initializing scroll tracking"),this.lastScrollCheckpoint=0;var e=function(){if(this.getConfig(TB)&&!this.currentUrlBlocked()){var e=this.getConfig(_B),t=(this.getConfig(kB)||[]).slice().sort(function(e,t){return e-t}
3066),r=PC.scrollY,n=Hz.extend({$scroll_top:r},NB);try{var o=$z.body.scrollHeight,i=Math.round(r/(o-PC.innerHeight)*100);if(n.$scroll_height=o,n.$scroll_percentage=i,i>this.lastScrollCheckpoint)for(var s=0;s<t.length;s++){var a=t[s];i>=a&&this.lastScrollCheckpoint<a&&(n.$scroll_checkpoint=a,this.lastScrollCheckpoint=a,e=!0)}}catch(e){aU.critical("Error while calculating scroll percentage",e)}e&&this.mp.track("$mp_scroll",n)}}.bind(this),t=xU(e);this.listenerScroll=t.listener,PC.addEventListener(t.eventType,this.listenerScroll)}},MB.prototype.initSubmitTracking=function(){PC.removeEventListener(YF,this.listenerSubmit,!0),this.getConfig(LB)&&(aU.log("Initializing submit tracking"),this.listenerSubmit=function(e){this.getConfig(LB)&&this.trackDomEvent(e,"$mp_submit")}.bind(this),PC.addEventListener(YF,this.listenerSubmit,!0))},MB.prototype.initPageLeaveTracking=function(){if($z.removeEventListener(JF,this.listenerPageLeaveVisibilitychange),PC.removeEventListener(KF,this.listenerPageLeaveLocationchange),PC.removeEventListener(WF,this.listenerPageLoad),this.getConfig(OB)||this.mp.get_config("record_heatmap_data")){aU.log("Initializing page visibility tracking."),this._initScrollDepthTracking();var e=Hz.info.currentUrl();this.listenerPageLoad=function(){this.previousScrollHeight=$z.body.scrollHeight}.bind(this),PC.addEventListener(WF,this.listenerPageLoad),this.listenerPageLeaveLocationchange=Kz(function(t){if(!this.currentUrlBlocked()){var r=Hz.info.currentUrl();r!==e&&(this._trackPageLeave(t,e,this.previousScrollHeight),e=r,this.maxScrollViewDepth=Math.max($z.documentElement.clientHeight,PC.innerHeight||0),this.previousScrollHeight=$z.body.scrollHeight,this.hasTrackedScrollSession=!1)}}.bind(this)),PC.addEventListener(KF,this.listenerPageLeaveLocationchange),this.listenerPageLeaveVisibilitychange=function(t){$z.hidden&&this._trackPageLeave(t,e,this.previousScrollHeight)}.bind(this),$z.addEventListener(JF,this.listenerPageLeaveVisibilitychange)}},MB.prototype.stopDeadClickTracking=function(){this.listenerDeadClick&&(PC.removeEventListener(jF,this.listenerDeadClick,!0),this.listenerDeadClick=null),this._deadClickTracker&&(this._deadClickTracker.stopTracking(),this._deadClickTracker=null)},qz(MB);var zB=function(e,t){return PC[zC]&&"function"==typeof PC[zC].then||(PC[zC]=new Promise(function(r){e(t,r)}).then(function(){var e=PC[zC];if(e&&"function"==typeof e.then)return e;throw new Error("targeting failed to load")}).catch(function(e){throw delete PC[zC],e})),PC[zC]},FB=Wz("flags"),UB="mixpanelFlags",BB={version:1,storeNames:[UB]},HB=864e5,jB=Object.freeze({NETWORK_ONLY:"networkOnly",NETWORK_FIRST:"networkFirst",PERSISTENCE_UNTIL_NETWORK_SUCCESS:"persistenceUntilNetworkSuccess"}),VB=[jB.NETWORK_ONLY,jB.NETWORK_FIRST,jB.PERSISTENCE_UNTIL_NETWORK_SUCCESS],WB=function(e,t,r){this.idb=new pF("mixpanelFlagsDb",UB,BB),this.persistenceConfig=e,this.persistedVariantsKey="persisted_variants_for_"+t,this.isGloballyDisabled=r||function(){return!1}};WB.prototype.getPolicy=function(){return this.isGloballyDisabled()||!this._isConfigValid()?jB.NETWORK_ONLY:this.persistenceConfig.variantLookupPolicy},WB.prototype.getTtlMs=function(){return this._isConfigValid()?this.persistenceConfig.persistenceTtlMs??HB:HB},WB.prototype._isConfigValid=function(){var e=this.persistenceConfig;return!(!e||(-1===VB.indexOf(e.variantLookupPolicy)?(FB.error("Invalid variantLookupPolicy:",e.variantLookupPolicy),1):void 0!==e.persistenceTtlMs&&null!==e.persistenceTtlMs&&e.persistenceTtlMs<=0&&(FB.error("If provided, persistenceTtlMs must be a positive number. Provided value:",e.persistenceTtlMs),1)))},WB.prototype.loadFlagsFromStorage=function(e){var t=Hz.bind(function(){return this.clear().then(function(){return null}).catch(function(){return null})},this);if(this.getPolicy()===jB.NETWORK_ONLY)return t();var r=this.getTtlMs();return this.idb.init().then(Hz.bind(function(){return this.idb.getItem(this.persistedVariantsKey)},this)).then(Hz.bind(function(n){if(!n)return FB.log("No persisted variants found in IndexedDB"),null;if(r&&Date.now()-n.persistedAt>=r)return FB.log("Persisted variants are expiring"),null;if(!e||n.distinctId!==e.distinct_id)return FB.log("Persisted variants found, but for a different distinct_id so clearing."),t();var o=new Map;return Hz.each(n.flagVariants,function(e,t){o.set(t,{key:e.variant_key,value:e.variant_value,experiment_id:e.experiment_id,is_experiment_active:e.is_experiment_active,is_qa_tester:e.is_qa_tester,variant_source:"persistence",persisted_at_in_ms:n.persistedAt,ttl_in_ms:r})}),FB.log("Loaded",o.size,"variants from IndexedDB for distinct_id",n.distinctId),{flags:o,pendingFirstTimeEvents:n.pendingFirstTimeEvents||{},persistedAtMs:n.persistedAt,ttlMs:r}},this)).catch(Hz.bind(function(e){return FB.error("Failed to load persisted variants from IndexedDB, so clearing",e),t()},this))},WB.prototype.save=function(e,t,r){if(this.getPolicy()===jB.NETWORK_ONLY)return Promise.resolve();var n={};t.forEach(function(e,t){n[t]={variant_key:e.key,variant_value:e.value,experiment_id:e.experiment_id,is_experiment_active:e.is_experiment_active,is_qa_tester:e.is_qa_tester}});var o={persistedAt:Date.now(),distinctId:e&&e.distinct_id,context:e,flagVariants:n,pendingFirstTimeEvents:r||{}};return this.idb.init().then(Hz.bind(function(){return this.idb.setItem(this.persistedVariantsKey,o)},this)).then(function(){FB.log("Saved",t.size,"variants to IndexedDB for distinct_id",o.distinctId)}).catch(function(e){FB.error("Failed to persist variants to IndexedDB:",e)})},WB.prototype.clear=function(){return this.isGloballyDisabled()?Promise.resolve():this.idb.init().then(Hz.bind(function(){return this.idb.removeItem(this.persistedVariantsKey)},this)).then(function(){FB.log("Cleared persisted variants from IndexedDB")}).catch(function(e){FB.error("Failed to clear persisted variants from IndexedDB:",e)})};var KB=Wz("flags"),qB="flags",GB="context",ZB={};ZB[GB]={};var YB="NOT_READY",JB="BACKEND_ERROR",QB=function(e,t){var r={variant_source:"fallback"};return t&&(r.fallback_reason=t),Hz.isObject(e)?Hz.extend({},e,r):Hz.extend({value:e},r)},XB=function(e){this.fetch=PC.fetch,this.getFullApiRoute=e.getFullApiRoute,this.getMpConfig=e.getConfigFunc,this.setMpConfig=e.setConfigFunc,this.getMpProperty=e.getPropertyFunc,this.track=e.trackingFunc,this.loadExtraBundle=e.loadExtraBundle||function(){},this.targetingSrc=e.targetingSrc||""};function eH(e){return null!=e}XB.prototype.init=function(){if(this.minApisSupported())return this.flags=null,this.trackedFeatures=new Set,this.pendingFirstTimeEvents={},this.activatedFirstTimeEvents={},this._loadedPersistedAtMs=null,this._loadedTtlMs=null,this.persistence=new WB(this.getConfig("persistence"),this.getMpConfig("token"),Hz.bind(function(){return this.getMpConfig("disable_persistence")}
3066,this)),this.persistenceLoadedPromise=this.persistence.loadFlagsFromStorage(this._buildContext()).then(Hz.bind(function(e){e&&(this.flags=e.flags,this.pendingFirstTimeEvents=e.pendingFirstTimeEvents,this._loadedPersistedAtMs=e.persistedAtMs,this._loadedTtlMs=e.ttlMs)},this)),this.persistenceLoadedPromise.then(Hz.bind(function(){return this.fetchFlags()},this)).catch(function(){KB.error("Error initializing feature flags")});KB.critical("Feature Flags unavailable: missing minimum required APIs")},XB.prototype._buildContext=function(){return Hz.extend({distinct_id:this.getMpProperty("distinct_id"),device_id:this.getMpProperty("$device_id")},this.getConfig(GB))},XB.prototype.reset=function(){return this.persistence?(this.flags=null,this.pendingFirstTimeEvents={},this.activatedFirstTimeEvents={},this.trackedFeatures=new Set,this.fetchPromise=null,this._fetchInProgressStartTime=null,this._loadedPersistedAtMs=null,this._loadedTtlMs=null,this.persistence.clear().then(Hz.bind(function(){return this.fetchFlags()},this)).catch(function(){KB.error("Error during flags reset")})):Promise.resolve()},XB.prototype.getFullConfig=function(){var e=this.getMpConfig(qB);return e?Hz.isObject(e)?Hz.extend({},ZB,e):ZB:{}},XB.prototype.getConfig=function(e){return this.getFullConfig()[e]},XB.prototype.isSystemEnabled=function(){return!!this.getMpConfig(qB)},XB.prototype.updateContext=function(e,t){if(!this.isSystemEnabled())return KB.critical("Feature Flags not enabled, cannot update context"),Promise.resolve();var r=this.getMpConfig(qB);Hz.isObject(r)||(r={});var n=t&&t.replace?{}:this.getConfig(GB);r[GB]=Hz.extend({},n,e);var o={};return o[qB]=r,this.setMpConfig(o),this.fetchFlags().catch(function(){KB.error("Error fetching flags during updateContext")})},XB.prototype.areFlagsReady=function(){return this.isSystemEnabled()||KB.error("Feature Flags not enabled"),!!this.flags},XB.prototype.fetchFlags=function(){if(!this.isSystemEnabled())return Promise.resolve();var e=this._buildContext(),t=e.distinct_id,r=iF();KB.log("Fetching flags for distinct ID: "+t);var n=new URLSearchParams;n.set("context",JSON.stringify(e)),n.set("token",this.getMpConfig("token")),n.set("mp_lib","web"),n.set("$lib_version",MC.LIB_VERSION);var o=this.getFullApiRoute()+"?"+n.toString();return this._fetchInProgressStartTime=Date.now(),this.fetchPromise=this.fetch.call(PC,o,{method:"GET",headers:{Authorization:"Basic "+btoa(this.getMpConfig("token")+":"),traceparent:r}}).then(function(e){return this.markFetchComplete(),e.json()}.bind(this)).then(function(t){var n=t.flags;if(!n)throw new Error("No flags in API response");var o=new Map,i={};Hz.each(n,function(e,t){var r=!1,n=t+":";if(Hz.each(this.activatedFirstTimeEvents,function(e,t){t.startsWith(n)&&(r=!0)}),r){var i=this.flags&&this.flags.get(t);i&&o.set(t,i)}else o.set(t,{key:e.variant_key,value:e.variant_value,experiment_id:e.experiment_id,is_experiment_active:e.is_experiment_active,is_qa_tester:e.is_qa_tester,variant_source:"network"})},this);var s=t.pending_first_time_events;s&&s.length>0&&Hz.each(s,function(e){var t=e.flag_key,r=function(e,t){return e+":"+t}(t,e.first_time_event_hash);this.activatedFirstTimeEvents[r]||(i[r]={flag_key:t,flag_id:e.flag_id,project_id:e.project_id,first_time_event_hash:e.first_time_event_hash,event_name:e.event_name,property_filters:e.property_filters,pending_variant:e.pending_variant})},this),this.activatedFirstTimeEvents&&Hz.each(this.activatedFirstTimeEvents,function(e,t){var r=function(e){return e.split(":")[0]}(t);e&&!o.has(r)&&this.flags&&this.flags.has(r)&&o.set(r,this.flags.get(r))},this),this.flags=o,this.trackedFeatures=new Set,this.pendingFirstTimeEvents=i,this._loadedPersistedAtMs=null,this._loadedTtlMs=null,this._traceparent=r,this._loadTargetingIfNeeded(),this.persistence.save(e,this.flags,this.pendingFirstTimeEvents)}.bind(this)).catch(function(e){throw this._fetchInProgressStartTime&&this.markFetchComplete(),KB.error(e),e}.bind(this)),this.fetchPromise},XB.prototype.loadFlags=function(){return this.isSystemEnabled()?this.trackedFeatures?this._fetchInProgressStartTime?this.fetchPromise:this.fetchFlags():(KB.error("loadFlags called before init"),Promise.resolve()):Promise.resolve()},XB.prototype.markFetchComplete=function(){this._fetchInProgressStartTime?(this._fetchStartTime=this._fetchInProgressStartTime,this._fetchCompleteTime=Date.now(),this._fetchLatency=this._fetchCompleteTime-this._fetchStartTime,this._fetchInProgressStartTime=null):KB.error("Fetch in progress started time not set, cannot mark fetch complete")},XB.prototype._loadTargetingIfNeeded=function(){var e=!1;Hz.each(this.pendingFirstTimeEvents,function(t){t.property_filters&&!Hz.isEmptyObject(t.property_filters)&&(e=!0)}),e&&this.getTargeting().then(function(){KB.log("targeting loaded for property filter evaluation")})},XB.prototype.getTargeting=function(){return zB(this.loadExtraBundle.bind(this),this.targetingSrc).catch(function(e){KB.error("Failed to load targeting: "+e)}.bind(this))},XB.prototype.checkFirstTimeEvents=function(e,t){!this.pendingFirstTimeEvents||Hz.isEmptyObject(this.pendingFirstTimeEvents)||(PC[zC]&&Hz.isFunction(PC[zC].then)?PC[zC].then(function(r){this._processFirstTimeEventCheck(e,t,r)}.bind(this)).catch(function(){this._processFirstTimeEventCheck(e,t,null)}.bind(this)):this._processFirstTimeEventCheck(e,t,null))},XB.prototype._processFirstTimeEventCheck=function(e,t,r){Hz.each(this.pendingFirstTimeEvents,function(n,o){if(!this.activatedFirstTimeEvents[o]){var i,s=n.flag_key;if(!r&&n.property_filters&&!Hz.isEmptyObject(n.property_filters))return void KB.warn('Skipping event check for "'+s+'" - property filters require targeting library');if(r){var a={event_name:n.event_name,property_filters:n.property_filters};i=r.eventMatchesCriteria(e,t,a)}else i={matches:e===n.event_name,error:null};if(i.error)return void KB.error('Error checking first-time event for flag "'+s+'": '+i.error);if(i.matches){KB.log('First-time event matched for flag "'+s+'": '+e);var l={key:n.pending_variant.variant_key,value:n.pending_variant.variant_value,experiment_id:n.pending_variant.experiment_id,is_experiment_active:n.pending_variant.is_experiment_active};this.flags.set(s,l),this.trackedFeatures.delete(s),this.activatedFirstTimeEvents[o]=!0,this.recordFirstTimeEvent(n.flag_id,n.project_id,n.first_time_event_hash)}}},this)},XB.prototype.getFirstTimeEventApiRoute=function(e){return this.getFullApiRoute().replace(/\/$/,"")+"/"+e+"/first-time-events"},XB.prototype.recordFirstTimeEvent=function(e,t,r){var n=this.getMpProperty("distinct_id"),o=iF(),i=new URLSearchParams;i.set("mp_lib","web"),i.set("$lib_version",MC.LIB_VERSION);var s=this.getFirstTimeEventApiRoute(e)+"?"+i.toString(),a={distinct_id:n,project_id:t,first_time_event_hash:r};KB.log("Recording first-time event for flag: "+e),this.fetch.call(PC,s,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Basic "+btoa(this.getMpConfig("token")+":"),traceparent:o},body:JSON.stringify(a)}).catch(function(t){KB.error("Failed to record first-time event for flag "+e+": "+t)})},XB.prototype.getVariant=function(e,t){if(!this.persistenceLoadedProm
3066ise)return new Promise(function(e){KB.critical("Feature Flags not initialized"),e(QB(t,YB))});var r=this.persistence.getPolicy();return this.persistenceLoadedPromise.then(Hz.bind(function(){if(r===jB.PERSISTENCE_UNTIL_NETWORK_SUCCESS)return this.areFlagsReady()&&!this._loadedPersistenceIsStale()?this.getVariantSync(e,t):this.fetchPromise?this.fetchPromise.then(Hz.bind(function(){return this.getVariantSync(e,t)},this)).catch(function(e){return KB.error(e),QB(t,JB)}):QB(t,YB);var n=Hz.bind(function(){return this.getVariantSync(e,t)},this);return this.fetchPromise?this.fetchPromise.then(n).catch(Hz.bind(function(e){return KB.error(e),this.areFlagsReady()?n():QB(t,JB)},this)):QB(t,YB)},this))},XB.prototype._loadedPersistenceIsStale=function(){return!(!this._loadedPersistedAtMs||!this._loadedTtlMs)&&Date.now()-this._loadedPersistedAtMs>=this._loadedTtlMs},XB.prototype.getVariantSync=function(e,t){if(this._loadedPersistenceIsStale())return KB.log('Loaded persisted variants are past TTL so returning fallback for "'+e+'"'),QB(t,YB);if(!this.areFlagsReady())return KB.log("Flags not loaded yet"),QB(t,YB);var r=this.flags.get(e);return r?(this.trackFeatureCheck(e,r),r):(KB.log('No flag found: "'+e+'"'),QB(t,"FLAG_NOT_FOUND"))},XB.prototype.getAllVariants=function(){if(!this.persistenceLoadedPromise)return KB.critical("Feature Flags not initialized"),Promise.resolve(new Map);var e=this.persistence.getPolicy();return this.persistenceLoadedPromise.then(Hz.bind(function(){if(e===jB.PERSISTENCE_UNTIL_NETWORK_SUCCESS)return this.areFlagsReady()&&!this._loadedPersistenceIsStale()?this.getAllVariantsSync():this.fetchPromise?this.fetchPromise.then(Hz.bind(function(){return this.getAllVariantsSync()},this)).catch(function(e){return KB.error(e),new Map}):new Map;var t=Hz.bind(this.getAllVariantsSync,this);return this.fetchPromise?this.fetchPromise.then(t).catch(t):new Map},this))},XB.prototype.getAllVariantsSync=function(){return this._loadedPersistenceIsStale()?(KB.log("Loaded persisted variants are past TTL so returning empty Map"),new Map):this.flags||new Map},XB.prototype.getVariantValue=function(e,t){return this.getVariant(e,{value:t}).then(function(e){return e.value}).catch(function(e){return KB.error(e),t})},XB.prototype.getFeatureData=function(e,t){return KB.critical("mixpanel.flags.get_feature_data() is deprecated and will be removed in a future release. Use mixpanel.flags.get_variant_value() instead."),this.getVariantValue(e,t)},XB.prototype.getVariantValueSync=function(e,t){return this.getVariantSync(e,{value:t}).value},XB.prototype.isEnabled=function(e,t){return this.getVariantValue(e).then(function(){return this.isEnabledSync(e,t)}.bind(this)).catch(function(e){return KB.error(e),t})},XB.prototype.isEnabledSync=function(e,t){t=t||!1;var r=this.getVariantValueSync(e,t);return!0!==r&&!1!==r&&(KB.error('Feature flag "'+e+'" value: '+r+" is not a boolean; returning fallback value: "+t),r=t),r},XB.prototype.trackFeatureCheck=function(e,t){if(!this.trackedFeatures.has(e)){this.trackedFeatures.add(e);var r={"Experiment name":e,"Variant name":t.key,$experiment_type:"feature_flag","Variant fetch start time":eH(this._fetchStartTime)?new Date(this._fetchStartTime).toISOString():null,"Variant fetch complete time":eH(this._fetchCompleteTime)?new Date(this._fetchCompleteTime).toISOString():null,"Variant fetch latency (ms)":this._fetchLatency,"Variant fetch traceparent":this._traceparent};eH(t.experiment_id)&&(r.$experiment_id=t.experiment_id),eH(t.is_experiment_active)&&(r.$is_experiment_active=t.is_experiment_active),eH(t.is_qa_tester)&&(r.$is_qa_tester=t.is_qa_tester),eH(t.variant_source)&&(r.$variant_source=t.variant_source),eH(t.persisted_at_in_ms)&&(r.$persisted_at_in_ms=t.persisted_at_in_ms),eH(t.ttl_in_ms)&&(r.$ttl_in_ms=t.ttl_in_ms),this.track("$experiment_started",r)}},XB.prototype.whenReady=function(){return this.fetchPromise?this.fetchPromise:Promise.resolve()},XB.prototype.minApisSupported=function(){return!!this.fetch&&typeof Promise<"u"&&typeof Map<"u"&&typeof Set<"u"},qz(XB),XB.prototype.are_flags_ready=XB.prototype.areFlagsReady,XB.prototype.get_variant=XB.prototype.getVariant,XB.prototype.get_variant_sync=XB.prototype.getVariantSync,XB.prototype.get_all_variants=XB.prototype.getAllVariants,XB.prototype.get_all_variants_sync=XB.prototype.getAllVariantsSync,XB.prototype.get_variant_value=XB.prototype.getVariantValue,XB.prototype.get_variant_value_sync=XB.prototype.getVariantValueSync,XB.prototype.is_enabled=XB.prototype.isEnabled,XB.prototype.is_enabled_sync=XB.prototype.isEnabledSync,XB.prototype.load_flags=XB.prototype.loadFlags,XB.prototype.update_context=XB.prototype.updateContext,XB.prototype.when_ready=XB.prototype.whenReady,XB.prototype.get_feature_data=XB.prototype.getFeatureData,
vendor: 13,327 bytes, line 3066
3066XB.prototype.getTargeting=XB.prototype.getTargeting;var tH=Wz("recorder"),rH="mp_iframe_handshake_request",nH="mp_iframe_handshake_response",oH=function(e){this.mixpanelInstance=e.mixpanelInstance,this.getMpConfig=e.getConfigFunc,this.getTabId=e.getTabIdFunc,this.reportError=e.reportErrorFunc,this.getDistinctId=e.getDistinctIdFunc,this.loadExtraBundle=e.loadExtraBundle,this.recorderSrc=e.recorderSrc,this.targetingSrc=e.targetingSrc,this.libBasePath=e.libBasePath,this._recorder=null,this._parentReplayId=null,this._parentFrameRetryInterval=null};oH.prototype.shouldLoadRecorder=function(){if(this.getMpConfig("disable_persistence"))return jz.log("Load recorder check skipped due to disable_persistence config"),xz.resolve(!1);var e=new pF(gF,mF,vF),t=this.getTabId();return e.init().then(function(){return e.getAll()}).then(function(e){for(var r=0;r<e.length;r++)if(UF(e[r])||e[r].tabId===t)return!0;return!1}).catch(Hz.bind(function(e){return this.reportError("Error checking recording registry",e),!1},this))},oH.prototype.checkAndStartSessionRecording=function(e,t){if(!PC.MutationObserver)return jz.critical("Browser does not support MutationObserver; skipping session recording"),xz.resolve();var r=Hz.bind(function(e){return new xz(Hz.bind(function(t){var r=Kz(Hz.bind(function(){this._recorder=this._recorder||new PC[FC](this.mixpanelInstance),this._recorder.resumeRecording(e),t()},this));if(Hz.isUndefined(PC[FC])){var n=this.recorderSrc||this.libBasePath+"__MP_RECORDER_FILENAME__";this.loadExtraBundle(n,r)}else r()},this))},this),n=BF(this.getMpConfig("record_allowed_iframe_origins"),tH);if(n.length>0&&(this._setupParentFrameListener(n),PC.parent!==PC))return this._setupChildFrameListener(n,r),this._sendParentFrameRequestWithRetry(n),xz.resolve();var o=Hz.isUndefined(t)?this.getMpConfig("record_sessions_percent"):t,i=o>0&&100*Math.random()<=o;return e||i?r(!0):this.shouldLoadRecorder().then(Hz.bind(function(e){return e?r(!1):xz.resolve()},this))},oH.prototype.isRecording=function(){if(!this._recorder||!Hz.isFunction(this._recorder.isRecording))return!1;try{return this._recorder.isRecording()}catch(e){return this.reportError("Error checking if recording is active",e),!1}},oH.prototype.startRecordingOnEvent=function(e,t){var r=this.isRecording(),n=this.getMpConfig("recording_event_triggers");if(!r&&n){var o=n[e];if(o&&"number"==typeof o.percentage){var i=o.percentage,s=o.property_filters;if(s&&!Hz.isEmptyObject(s)){var a=this.targetingSrc||this.libBasePath+UC;zB(this.loadExtraBundle,a).then(function(r){try{r.eventMatchesCriteria(e,t,{event_name:e,property_filters:s}).matches&&this.checkAndStartSessionRecording(!1,i)}catch(e){jz.critical("Could not parse recording event trigger properties logic:",e)}}.bind(this)).catch(function(e){jz.critical("Failed to load targeting library:",e)})}else this.checkAndStartSessionRecording(!1,i)}}},oH.prototype.stopSessionRecording=function(){return this._recorder?this._recorder.stopRecording():xz.resolve()},oH.prototype.pauseSessionRecording=function(){return this._recorder?this._recorder.pauseRecording():xz.resolve()},oH.prototype.resumeSessionRecording=function(){return this._recorder?this._recorder.resumeRecording():xz.resolve()},oH.prototype.isRecordingHeatmapData=function(){return this.getSessionReplayId()&&this.getMpConfig("record_heatmap_data")},oH.prototype.getSessionRecordingProperties=function(){var e={},t=this.getSessionReplayId();return t&&(e.$mp_replay_id=t),e},oH.prototype.getSessionReplayUrl=function(){var e=null,t=this.getSessionReplayId();return t&&(e="https://mixpanel.com/projects/replay-redirect?"+Hz.HTTPBuildQuery({replay_id:t,distinct_id:this.getDistinctId(),token:this.getMpConfig("token")})),e},oH.prototype.getSessionReplayId=function(){if(this._parentReplayId)return this._parentReplayId;var e=null;return this._recorder&&(e=this._recorder.replayId),e||null},oH.prototype.getRecorder=function(){return this._recorder},oH.prototype._setupChildFrameListener=function(e,t){if(!this._childFrameMessageHandler){var r=this;this._childFrameMessageHandler=function(n){if(-1!==e.indexOf(n.origin)){var o=n.data;o&&o.type===nH&&o.token===r.getMpConfig("token")&&o.replayId&&(r._parentReplayId=o.replayId,o.distinctId&&r.mixpanelInstance.identify(o.distinctId),r._parentFrameRetryActive=!1,PC.removeEventListener("message",r._childFrameMessageHandler),r._childFrameMessageHandler=null,t(!0))}},PC.addEventListener("message",this._childFrameMessageHandler)}},oH.prototype._sendParentFrameRequest=function(e){var t={};t.type=rH,t.token=this.getMpConfig("token");for(var r=0;r<e.length;r++)try{PC.parent.postMessage(t,e[r])}catch{}},oH.prototype._sendParentFrameRequestWithRetry=function(e){var t=this,r=0,n=50;this._parentFrameRetryActive=!0,this._sendParentFrameRequest(e),function o(){setTimeout(function(){!t._parentFrameRetryActive||t._parentReplayId||++r>=10||(t._sendParentFrameRequest(e),n*=2,o())},n)}()},oH.prototype._setupParentFrameListener=function(e){if(!this._parentFrameMessageHandler){var t=this;this._parentFrameMessageHandler=function(r){if(-1!==e.indexOf(r.origin)){var n=r.data;if(n&&n.type===rH&&n.token===t.getMpConfig("token")){var o=t.getSessionReplayId();if(o){var i={};i.type=nH,i.token=t.getMpConfig("token"),i.replayId=o,i.distinctId=t.getDistinctId(),r.source.postMessage(i,r.origin)}}}},PC.addEventListener("message",this._parentFrameMessageHandler)}},qz(oH);var iH=function(){};iH.prototype.create_properties=function(){},iH.prototype.event_handler=function(){},iH.prototype.after_track_handler=function(){},iH.prototype.init=function(e){return this.mp=e,this},iH.prototype.track=function(e,t,r,n){var o=this,i=Hz.dom_query(e);if(0!==i.length)return Hz.each(i,function(e){Hz.register_event(e,this.override_event,function(e){var i={},s=o.create_properties(r,this),a=o.mp.get_config("track_links_timeout");o.event_handler(e,this,i),window.setTimeout(o.track_callback(n,s,i,!0),a),o.mp.track(t,s,o.track_callback(n,s,i))})},this),!0;jz.error("The DOM query ("+e+") returned 0 elements")},iH.prototype.track_callback=function(e,t,r,n){n=n||!1;var o=this;return function(){r.callback_fired||(r.callback_fired=!0,(!e||!1!==e(n,t))&&o.after_track_handler(t,r,n))}},iH.prototype.create_properties=function(e,t){return"function"==typeof e?e(t):Hz.extend({},e)};var sH=function(){this.override_event="click"};Hz.inherit(sH,iH),sH.prototype.create_properties=function(e,t){var r=sH.superclass.create_properties.apply(this,arguments);return t.href&&(r.url=t.href),r},sH.prototype.event_handler=function(e,t,r){r.new_tab=2===e.which||e.metaKey||e.ctrlKey||"_blank"===t.target,r.href=t.href,r.new_tab||e.preventDefault()},sH.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout(function(){window.location=t.href},0)};var aH=function(){this.override_event="submit"};Hz.inherit(aH,iH),aH.prototype.event_handler=function(e,t,r){r.element=t,e.preventDefault()},aH.prototype.after_track_handler=function(e,t){setTimeout(function(){t.element.submit()},0)};var lH="$set",cH="$set_once",dH="$unset",uH="$add",hH="$append",pH="$union",gH="$remove",fH={set_action:function(e,t){var r={},n={};return Hz.isObject(e)?Hz.each(e,function(e,t){this._is_reserved_property(t)||(n[t]=e)},this):n[e]=t,r[lH]=n,r},unset_action:function(e){var t={},r=[];return Hz.isArray(e)||(e=[e]),Hz.each(e,function(e){this._is_reserved_property(e)||r.push(e)},this),t[dH]=r,t},set_once_action:function(e,t){var r={},n={};return Hz.isObject(e)?Hz.each(e,function(e,t){this._is_reserved_property(t)||(n[t]=e)},this):n[e]=t,r[cH]=n,r},union_action:function(e,t){var r={},n={};return Hz.isObject(e)?Hz.each(e,function(e,t){this._is_reserved_property(t)||(n[t]=Hz.isArray(e)?e:[e])},this):n[e]=Hz.isArray(t)?t:[t],r[pH]=n,r},append_action:function(e,t){var r={},n={};return Hz.isObject(e)?Hz.each(e,function(e,t){this._is_reserved_property(t)||(n[t]=e)},this):n[e]=t,r[hH]=n,r},remove_action:function(e,t){var r={},n={};return Hz.isObject(e)?Hz.each(e,function(e,t){this._is_reserved_property(t)||(n[t]=e)},this):n[e]=t,r[gH]=n,r},delete_action:function(){return{$delete:""}}},mH=function(){};Hz.extend(mH.prototype,fH),mH.prototype._init=function(e,t,r){this._mixpanel=e,this._group_key=t,this._group_id=r},mH.prototype.set=CF(function(e,t,r){var n=this.set_action(e,t);return Hz.isObject(e)&&(r=t),this._send_request(n,r)}),mH.prototype.set_once=CF(function(e,t,r){var n=this.set_once_action(e,t);return Hz.isObject(e)&&(r=t),this._send_request(n,r)}),mH.prototype.unset=CF(function(e,t){var r=this.unset_action(e);return this._send_request(r,t)}),mH.prototype.union=CF(function(e,t,r){Hz.isObject(e)&&(r=t);var n=this.union_action(e,t);return this._send_request(n,r)}),mH.prototype.delete=CF(function(e){var t=this.delete_action();return this._send_request(t,e)}),mH.prototype.remove=CF(function(e,t,r){var n=this.remove_action(e,t);return this._send_request(n,r)}),mH.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var r=Hz.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:r,endpoint:this._mixpanel.get_api_host("groups")+"/"+this._get_config("api_routes").groups,batcher:this._mixpanel.request_batchers.groups},t)},mH.prototype._is_reserved_property=function(e){return"$group_key"===e||"$group_id"===e},mH.prototype._get_config=function(e){return this._mixpanel.get_config(e)},mH.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id},mH.prototype.remove=mH.prototype.remove,mH.prototype.set=mH.prototype.set,mH.prototype.set_once=mH.prototype.set_once,mH.prototype.union=mH.prototype.union,mH.prototype.unset=mH.prototype.unset,mH.prototype.toString=mH.prototype.toString;var vH=function(){};Hz.extend(vH.prototype,fH),vH.prototype._init=function(e){this._mixpanel=e},vH.prototype.set=kF(function(e,t,r){var n=this.set_action(e,t);return Hz.isObject(e)&&(r=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),n[lH]=Hz.extend({},Hz.info.people_properties(),n[lH]),this._send_request(n,r)}),vH.prototype.set_once=kF(function(e,t,r){var n=this.set_once_action(e,t);return Hz.isObject(e)&&(r=t),this._send_request(n,r)}),vH.prototype.unset=kF(function(e,t){var r=this.unset_action(e);return this._send_request(r,t)}),vH.prototype.increment=kF(function(e,t,r){var n={},o={};return Hz.isObject(e)?(Hz.each(e,function(e,t){if(!this._is_reserved_property(t)){if(isNaN(parseFloat(e)))return void jz.error("Invalid increment value passed to mixpanel.people.increment - must be a number");o[t]=e}},this),r=t):(Hz.isUndefined(t)&&(t=1),o[e]=t),n[uH]=o,this._send_request(n,r)}),vH.prototype.append=kF(function(e,t,r){Hz.isObject(e)&&(r=t);var n=this.append_action(e,t);return this._send_request(n,r)}),vH.prototype.remove=kF(function(e,t,r){Hz.isObject(e)&&(r=t);var n=this.remove_action(e,t);return this._send_request(n,r)}),vH.prototype.union=kF(function(e,t,r){Hz.isObject(e)&&(r=t);var n=this.union_action(e,t);return this._send_request(n,r)}),vH.prototype.track_charge=kF(function(){jz.error("mixpanel.people.track_charge() is deprecated and no longer has any effect.")}),vH.prototype.clear_charges=function(e){return this.set("$transactions",[],e)},vH.prototype.delete_user=function(){if(this._identify_called()){var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)}jz.error("mixpanel.people.delete_user() requires you to call identify() first")},vH.prototype.toString=function(){return this._mixpanel.toString()+".people"},vH.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var r=this._mixpanel.get_property("$device_id"),n=this._mixpanel.get_property("$user_id"),o=this._mixpanel.get_property("$had_persisted_distinct_id");r&&(e.$device_id=r),n&&(e.$user_id=n),o&&(e.$had_persisted_distinct_id=o);var i=Hz.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:i,endpoint:this._mixpanel.get_api_host("people")+"/"+this._get_config("api_routes").engage,batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),Hz.isUndefined(t)||(this._get_config("verbose")?t({status:-1,error:null}):t(-1)),Hz.truncate(i,255))},vH.prototype._get_config=function(e){return this._mixpanel.get_config(e)},vH.prototype._identify_called=function(){return!0===this._mixpanel._flags.identify_called},vH.prototype._enqueue=function(e){lH in e?this._mixpanel.persistence._add_to_people_queue(lH,e):cH in e?this._mixpanel.persistence._add_to_people_queue(cH,e):dH in e?this._mixpanel.persistence._add_to_people_queue(dH,e):uH in e?this._mixpanel.persistence._add_to_people_queue(uH,e):hH in e?this._mixpanel.persistence._add_to_people_queue(hH,e):gH in e?this._mixpanel.persistence._add_to_people_queue(gH,e):pH in e?this._mixpanel.persistence._add_to_people_queue(pH,e):jz.error("Invalid call to _enqueue():",e)},vH.prototype._flush_one_queue=function(e,t,r,n){var o=this,i=Hz.extend({},this._mixpanel.persistence.load_queue(e)),s=i;!Hz.isUndefined(i)&&Hz.isObject(i)&&!Hz.isEmptyObject(i)&&(o._mixpanel.persistence._pop_from_people_queue(e,i),o._mixpanel.persistence.save(),n&&(s=n(i)),t.call(o,s,function(t,n){0===t&&o._mixpanel.persistence._add_to_people_queue(e,i),Hz.isUndefined(r)||r(t,n)}
3066))},vH.prototype._flush=function(e,t,r,n,o,i,s){var a=this;this._flush_one_queue(lH,this.set,e),this._flush_one_queue(cH,this.set_once,n),this._flush_one_queue(dH,this.unset,i,function(e){return Hz.keys(e)}),this._flush_one_queue(uH,this.increment,t),this._flush_one_queue(pH,this.union,o);var l=this._mixpanel.persistence.load_queue(hH);if(!Hz.isUndefined(l)&&Hz.isArray(l)&&l.length)for(var c,d=function(e,t){0===e&&a._mixpanel.persistence._add_to_people_queue(hH,c),Hz.isUndefined(r)||r(e,t)},u=l.length-1;u>=0;u--)l=this._mixpanel.persistence.load_queue(hH),c=l.pop(),a._mixpanel.persistence.save(),Hz.isEmptyObject(c)||a.append(c,d);var h=this._mixpanel.persistence.load_queue(gH);if(!Hz.isUndefined(h)&&Hz.isArray(h)&&h.length)for(var p,g=function(e,t){0===e&&a._mixpanel.persistence._add_to_people_queue(gH,p),Hz.isUndefined(s)||s(e,t)},f=h.length-1;f>=0;f--)h=this._mixpanel.persistence.load_queue(gH),p=h.pop(),a._mixpanel.persistence.save(),Hz.isEmptyObject(p)||a.remove(p,g)},vH.prototype._is_reserved_property=function(e){return"$distinct_id"===e||"$token"===e||"$device_id"===e||"$user_id"===e||"$had_persisted_distinct_id"===e},vH.prototype.set=vH.prototype.set,vH.prototype.set_once=vH.prototype.set_once,vH.prototype.unset=vH.prototype.unset,vH.prototype.increment=vH.prototype.increment,vH.prototype.append=vH.prototype.append,vH.prototype.remove=vH.prototype.remove,vH.prototype.union=vH.prototype.union,vH.prototype.track_charge=vH.prototype.track_charge,vH.prototype.clear_charges=vH.prototype.clear_charges,vH.prototype.delete_user=vH.prototype.delete_user,vH.prototype.toString=vH.prototype.toString;var bH="__mps",yH="__mpso",wH="__mpus",xH="__mpa",_H="__mpap",kH="__mpr",CH="__mpu",SH="$people_distinct_id",EH="__alias",IH="__timers",AH=[bH,yH,wH,xH,_H,kH,CH,SH,EH,IH],TH=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;"cookie"!==t&&"localStorage"!==t&&(jz.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),"localStorage"===t&&Hz.localStorage.is_supported()?this.storage=Hz.localStorage:this.storage=Hz.cookie,this.load(),this.update_config(e),this.upgrade(),this.save()};TH.prototype.properties=function(){var e={};return this.load(),Hz.each(this.props,function(t,r){Hz.include(AH,r)||(e[r]=t)}),e},TH.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=Hz.extend({},e))}},TH.prototype.upgrade=function(){var e,t;this.storage===Hz.localStorage?(e=Hz.cookie.parse(this.name),Hz.cookie.remove(this.name),Hz.cookie.remove(this.name,!0),e&&this.register_once(e)):this.storage===Hz.cookie&&(t=Hz.localStorage.parse(this.name),Hz.localStorage.remove(this.name),t&&this.register_once(t))},TH.prototype.save=function(){this.disabled||this.storage.set(this.name,uF(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)},TH.prototype.load_prop=function(e){return this.load(),this.props[e]},TH.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},TH.prototype.clear=function(){this.remove(),this.props={}},TH.prototype.register_once=function(e,t,r){return!!Hz.isObject(e)&&(typeof t>"u"&&(t="None"),this.expire_days=typeof r>"u"?this.default_expiry:r,this.load(),Hz.each(e,function(e,r){(!this.props.hasOwnProperty(r)||this.props[r]===t)&&(this.props[r]=e)},this),this.save(),!0)},TH.prototype.register=function(e,t){return!!Hz.isObject(e)&&(this.expire_days=typeof t>"u"?this.default_expiry:t,this.load(),Hz.extend(this.props,e),this.save(),!0)},TH.prototype.unregister=function(e){this.load(),e in this.props&&(delete this.props[e],this.save())},TH.prototype.update_search_keyword=function(e){this.register(Hz.info.searchInfo(e))},TH.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:Hz.info.referringDomain(e)||"$direct"},"")},TH.prototype.get_referrer_info=function(){return Hz.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},TH.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},TH.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},TH.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())},TH.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())},TH.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},TH.prototype.get_cross_subdomain=function(){return this.cross_subdomain},TH.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},TH.prototype._add_to_people_queue=function(e,t){var r=this._get_queue_key(e),n=t[e],o=this._get_or_create_queue(lH),i=this._get_or_create_queue(cH),s=this._get_or_create_queue(dH),a=this._get_or_create_queue(uH),l=this._get_or_create_queue(pH),c=this._get_or_create_queue(gH,[]),d=this._get_or_create_queue(hH,[]);r===bH?(Hz.extend(o,n),this._pop_from_people_queue(uH,n),this._pop_from_people_queue(pH,n),this._pop_from_people_queue(dH,n)):r===yH?(Hz.each(n,function(e,t){t in i||(i[t]=e)}),this._pop_from_people_queue(dH,n)):r===wH?Hz.each(n,function(e){Hz.each([o,i,a,l],function(t){e in t&&delete t[e]}),Hz.each(d,function(t){e in t&&delete t[e]}),s[e]=!0}):r===xH?(Hz.each(n,function(e,t){t in o?o[t]+=e:(t in a||(a[t]=0),a[t]+=e)},this),this._pop_from_people_queue(dH,n)):r===CH?(Hz.each(n,function(e,t){Hz.isArray(e)&&(t in l||(l[t]=[]),Hz.each(e,function(e){Hz.include(l[t],e)||l[t].push(e)}))}),this._pop_from_people_queue(dH,n)):r===kH?(c.push(n),this._pop_from_people_queue(hH,n)):r===_H&&(d.push(n),this._pop_from_people_queue(dH,n)),jz.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),jz.log(t),this.save()},TH.prototype._pop_from_people_queue=function(e,t){var r=this.props[this._get_queue_key(e)];Hz.isUndefined(r)||Hz.each(t,function(t,n){e===hH||e===gH?Hz.each(r,function(e){e[n]===t&&delete e[n]}):delete r[n]},this)},TH.prototype.load_queue=function(e){return this.load_prop(this._get_queue_key(e))},TH.prototype._get_queue_key=function(e){return e===lH?bH:e===cH?yH:e===dH?wH:e===uH?xH:e===hH?_H:e===gH?kH:e===pH?CH:void jz.error("Invalid queue:",e)},TH.prototype._get_or_create_queue=function(e,t){var r=this._get_queue_key(e);return t=Hz.isUndefined(t)?{}:t,this.props[r]||(this.props[r]=t)},TH.prototype.set_event_timer=function(e,t){var r=this.load_prop(IH)||{};r[e]=t,this.props[IH]=r,this.save()},TH.prototype.remove_event_timer=function(e){var t=(this.load_prop(IH)||{})[e];return Hz.isUndefined(t)||(delete this.props[IH][e],this.save()),t};var OH,LH,$H=function(e,t){throw new Error(e+" not available in this build.")},NH="mixpanel",RH="base64",PH="$device:",DH=PC.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,MH=!DH&&-1===Pz.indexOf("MSIE")&&-1===Pz.indexOf("Mozilla"),zH=null;Lz.sendBeacon&&(zH=function(){return Lz.sendBeacon.apply(Lz,arguments)});var FH={track:"track/",engage:"engage/",groups:"groups/",record:"record/",flags:"flags/",settings:"settings/"},UH={api_host:"https://api-js.mixpanel.com",api_hosts:{},api_routes:FH,api_extra_query_params:{},api_method:"POST",api_transport:"XHR",api_payload_format:RH,app_host:"https://mixpanel.com",autocapture:!1,cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:cF,flags:!1,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:cF,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose
3066:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{},record_allowed_iframe_origins:[],record_block_class:new RegExp("^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$"),record_block_selector:"img, video, audio",record_canvas:!1,record_collect_fonts:!1,record_console:!0,record_heatmap_data:!1,recording_event_triggers:{},record_idle_timeout_ms:18e5,record_mask_inputs:!0,record_max_ms:kz,record_min_ms:0,record_network:!1,record_network_options:{},record_sessions_percent:0,recorder_src:null,targeting_src:null,lib_base_path:"https://cdn.mxpnl.com/libs/",remote_settings_mode:"disabled"},BH=!1,HH=function(){},jH=function(e,t,r){var n,o=r===NH?LH:LH[r];if(o&&0===OH)n=o;else{if(o&&!Hz.isArray(o))return void jz.error("You have already initialized "+r);n=new HH}if(n._cached_groups={},n._init(e,t,r),n.people=new vH,n.people._init(n),!n.get_config("skip_first_touch_marketing")){var i=Hz.info.campaignParams(null),s={},a=!1;Hz.each(i,function(e,t){s["initial_"+t]=e,e&&(a=!0)}),a&&n.people.set_once(s)}MC.DEBUG=MC.DEBUG||n.get_config("debug");var l=0===OH?"module":"snippet";return PC.dispatchEvent(new PC.CustomEvent("$mp_sdk_to_extension_event",{detail:{instance:n,source:l,token:e,name:r,info:Hz.info}})),!Hz.isUndefined(o)&&Hz.isArray(o)&&(n._execute_array.call(n.people,o.people),n._execute_array(o)),n};HH.prototype.init=function(e,t,r){if(Hz.isUndefined(r))this.report_error("You must name your new library: init(token, config, name)");else{if(r!==NH){var n=jH(e,t,r);return LH[r]=n,n._loaded(),n}this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet")}},HH.prototype._init=function(e,t,r){t=t||{},this.__loaded=!0,this.config={};var n={};if("api_payload_format"in t||(t.api_host||UH.api_host).match(/\.mixpanel\.com/)&&(n.api_payload_format="json"),this.hooks={},this.set_config(Hz.extend({},UH,n,t,{name:r,token:e,callback_fn:(r===NH?r:NH+"."+r)+"._jsc"})),this.recorderManager=new oH({mixpanelInstance:this,getConfigFunc:Hz.bind(this.get_config,this),setConfigFunc:Hz.bind(this.set_config,this),getTabIdFunc:Hz.bind(this.get_tab_id,this),reportErrorFunc:Hz.bind(this.report_error,this),getDistinctIdFunc:Hz.bind(this.get_distinct_id,this),recorderSrc:this.get_config("recorder_src"),targetingSrc:this.get_config("targeting_src"),libBasePath:this.get_config("lib_base_path"),loadExtraBundle:$H}),this._jsc=cF,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this._remote_settings_strict_disabled=!1,this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests)if(Hz.localStorage.is_supported(!0)&&DH){if(this.init_batchers(),zH&&PC.addEventListener){var o=Hz.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);PC.addEventListener("pagehide",function(e){e.persisted&&o()}),PC.addEventListener("visibilitychange",function(){"hidden"===$z.visibilityState&&o()})}}else this._batch_requests=!1,jz.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),Hz.each(this.get_batcher_configs(),function(e){jz.log("Clearing batch queue "+e.queue_key),Hz.localStorage.remove(e.queue_key)});this.persistence=this.cookie=new TH(this.config),this.unpersisted_superprops={},this._gdpr_init();var i=Hz.UUID();this.get_distinct_id()||this.register_once({distinct_id:PH+i,$device_id:i},""),this.flags=new XB({getFullApiRoute:Hz.bind(function(){return this.get_api_host("flags")+"/"+this.get_config("api_routes").flags},this),getConfigFunc:Hz.bind(this.get_config,this),setConfigFunc:Hz.bind(this.set_config,this),getPropertyFunc:Hz.bind(this.get_property,this),trackingFunc:Hz.bind(this.track,this),loadExtraBundle:$H,targetingSrc:this.get_config("targeting_src")||this.get_config("lib_base_path")+UC}),this.flags.init(),this.flags=this.flags,this._init_tab_id();var s=this.get_config("remote_settings_mode");this.__session_recording_init_promise="strict"===s||"fallback"===s?this._fetch_remote_settings(s).then(Hz.bind(function(){return this._check_and_start_session_recording()},this)):this._check_and_start_session_recording(),this.autocapture=new MB(this),this.autocapture.init()},HH.prototype._init_tab_id=function(){if(this.get_config("disable_persistence"))jz.log("Tab ID initialization skipped due to disable_persistence config");
3066else if(Hz.sessionStorage.is_supported())try{var e=this.get_config("name")+"_"+this.get_config("token"),t="mp_tab_id_"+e,r="mp_gen_new_tab_id_"+e;(Hz.sessionStorage.get(r)||!Hz.sessionStorage.get(t))&&Hz.sessionStorage.set(t,"$tab-"+Hz.UUID()),Hz.sessionStorage.set(r,"1"),this.tab_id=Hz.sessionStorage.get(t),PC.addEventListener("beforeunload",function(){Hz.sessionStorage.remove(r)})}catch(e){this.report_error("Error initializing tab id",e)}else this.report_error("Session storage is not supported, cannot keep track of unique tab ID.")},HH.prototype.get_tab_id=function(){return this.tab_id||null},HH.prototype._check_and_start_session_recording=_F(function(e){return this.recorderManager.checkAndStartSessionRecording(e)}),HH.prototype._start_recording_on_event=Kz(function(e,t){this.__session_recording_init_promise&&this.__session_recording_init_promise.then(Hz.bind(function(){if(!this._remote_settings_strict_disabled)return this.recorderManager.startRecordingOnEvent(e,t)},this))}),HH.prototype.start_session_recording=function(){return this._check_and_start_session_recording(!0)},HH.prototype.stop_session_recording=function(){return this.recorderManager.stopSessionRecording()},HH.prototype.pause_session_recording=function(){return this.recorderManager.pauseSessionRecording()},HH.prototype.resume_session_recording=function(){return this.recorderManager.resumeSessionRecording()},HH.prototype.is_recording_heatmap_data=function(){return this.recorderManager.isRecordingHeatmapData()},HH.prototype.get_session_recording_properties=function(){return this.recorderManager.getSessionRecordingProperties()},HH.prototype.get_session_replay_url=function(){return this.recorderManager.getSessionReplayUrl()},HH.prototype.__get_recorder=function(){return this.recorderManager.getRecorder()},HH.prototype.__get_recording_init_promise=function(){return this.__session_recording_init_promise},HH.prototype._loaded=function(){if(this.get_config("loaded")(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config("store_google")&&this.get_config("stop_utm_persistence")){var e=Hz.info.campaignParams(null);Hz.each(e,function(e,t){this.unregister(t)}.bind(this))}},HH.prototype._set_default_superprops=function(){this.persistence.update_search_keyword($z.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(Hz.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info($z.referrer)},HH.prototype._dom_loaded=function(){Hz.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),this.has_opted_out_tracking()||Hz.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue},HH.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!BH)return this.__dom_loaded_queue.push([e,t]),!1;var r=(new e).init(this);return r.track.apply(r,t)},HH.prototype._prepare_callback=function(e,t){if(Hz.isUndefined(e))return null;if(DH)return function(r){e(r,t)};var r=this._jsc,n=""+Math.floor(1e8*Math.random()),o=this.get_config("callback_fn")+"["+n+"]";return r[n]=function(o){delete r[n],e(o,t)},o},HH.prototype._send_request=function(e,t,r,n){var o=!0;if(MH)return this.__request_queue.push(arguments),o;var i={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},s=null;!n&&(Hz.isFunction(r)||"string"==typeof r)&&(n=r,r=null),r=Hz.extend(i,r||{}),DH||(r.method="GET");var a="POST"===r.method,l=zH&&a&&"sendbeacon"===r.transport.toLowerCase(),c=r.verbose;t.verbose&&(c=!0),this.get_config("test")&&(t.test=1),c&&(t.verbose=1),this.get_config("img")&&(t.img=1),DH||(n?t.callback=n:(c||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=(new Date).getTime().toString(),a&&(s="data="+encodeURIComponent(t.data),delete t.data),Hz.extend(t,this.get_config("api_extra_query_params")),e+="?"+Hz.HTTPBuildQuery(t);var d=this;if("img"in t){var u=$z.createElement("img");u.src=e,$z.body.appendChild(u)}else if(l){try{o=zH(e,s)}catch(e){d.report_error(e),o=!1}try{n&&n(o?1:0)}catch(e){d.report_error(e)}}else if(DH)try{var h=new XMLHttpRequest;h.open(r.method,e,!0);var p=this.get_config("xhr_headers");
3066if(a&&(p["Content-Type"]="application/x-www-form-urlencoded"),Hz.each(p,function(e,t){h.setRequestHeader(t,e)}),r.timeout_ms&&typeof h.timeout<"u"){h.timeout=r.timeout_ms;var g=(new Date).getTime()}h.withCredentials=!0,h.onreadystatechange=function(){if(4===h.readyState)if(200===h.status){if(n)if(c){var e;try{e=Hz.JSONDecode(h.responseText)}catch(t){if(d.report_error(t),!r.ignore_json_errors)return;e=h.responseText}n(e)}else n(Number(h.responseText))}else{var t;if(t=h.timeout&&!h.status&&(new Date).getTime()-g>=h.timeout?"timeout":"Bad HTTP status: "+h.status+" "+h.statusText,d.report_error(t),n)if(c){var o=h.responseHeaders||{};n({status:0,httpStatusCode:h.status,error:t,retryAfter:o["Retry-After"]})}else n(0)}},h.send(s)}catch(e){d.report_error(e),o=!1}else{var f=$z.createElement("script");f.type="text/javascript",f.async=!0,f.defer=!0,f.src=e;var m=$z.getElementsByTagName("script")[0];m.parentNode.insertBefore(f,m)}return o},HH.prototype._fetch_remote_settings=function(e){var t=this,r=function(){"strict"===e&&(t.set_config({record_sessions_percent:0}),t._remote_settings_strict_disabled=!0)};if(!PC.AbortController)return jz.critical("Remote settings unavailable: missing minimum required APIs"),r(),Promise.resolve();var n=this.get_api_host("settings")+"/"+this.get_config("api_routes").settings,o={$lib_version:MC.LIB_VERSION,mp_lib:"web",sdk_config:"1"},i=n+"?"+Hz.HTTPBuildQuery(o),s=new AbortController,a=setTimeout(function(){s.abort()},500),l={method:"GET",headers:{Authorization:"Basic "+btoa(t.get_config("token")+":")},signal:s.signal};return PC.fetch(i,l).then(function(e){return clearTimeout(a),e.ok?e.json():(jz.critical("Network response was not ok"),void r())}).then(function(e){if(e&&e.sdk_config&&e.sdk_config.config){var n=e.sdk_config.config,o={};Hz.each(n,function(e,t){UH.hasOwnProperty(t)&&(o[t]=e)}),Hz.isEmptyObject(o)?(jz.critical("No valid config keys found in remote settings."),r()):t.set_config(o)}else r()}).catch(function(e){clearTimeout(a),jz.critical("Failed to fetch remote settings",e),r()})},HH.prototype._execute_array=function(e){var t,r=[],n=[],o=[];Hz.each(e,function(e){e&&(t=e[0],Hz.isArray(t)?o.push(e):"function"==typeof e?e.call(this):Hz.isArray(e)&&"alias"===t?r.push(e):Hz.isArray(e)&&-1!==t.indexOf("track")&&"function"==typeof this[t]?o.push(e):n.push(e))},this);var i=function(e,t){Hz.each(e,function(e){if(Hz.isArray(e[0])){var r=t;Hz.each(e,function(e){r=r[e[0]].apply(r,e.slice(1))})}else this[e[0]].apply(this,e.slice(1))},t)};i(r,this),i(n,this),i(o,this)},HH.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},HH.prototype.get_batcher_configs=function(){var e="__mpq_"+this.get_config("token");return this._batcher_configs=this._batcher_configs||{events:{type:"events",api_name:"track",queue_key:e+"_ev"},people:{type:"people",api_name:"engage",queue_key:e+"_pp"},groups:{type:"groups",api_name:"groups",queue_key:e+"_gr"}},this._batcher_configs},HH.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var e=Hz.bind(function(e){return new FF(e.queue_key,{libConfig:this.config,errorReporter:this.get_config("error_reporter"),sendRequestFunc:Hz.bind(function(t,r,n){var o=this.get_config("api_routes");this._send_request(this.get_api_host(e.api_name)+"/"+o[e.api_name],this._encode_data_for_request(t),r,this._prepare_callback(n,t))},this),beforeSendHook:Hz.bind(function(t){var r=this._run_hook("before_send_"+e.type,t);return r?r[0]:null},this),stopAllBatchingFunc:Hz.bind(this.stop_batch_senders,this),usePersistence:!0})},this),t=this.get_batcher_configs();this.request_batchers={events:e(t.events),people:e(t.people),groups:e(t.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()},HH.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,Hz.each(this.request_batchers,function(e){e.start()}))},HH.prototype.stop_batch_senders=function(){this._batch_requests=!1,Hz.each(this.request_batchers,function(e){e.stop(),e.clear()})},HH.prototype.push=function(e){this._execute_array([e])},HH.prototype.enable=function(e){var t,r,n,o;if(typeof e>"u")this._flags.disable_all_events=!1;else{for(t={},r=[],n=0;n<e.length;n++)t[e[n]]=!0;for(o=0;o<this.__disabled_events.length;o++)t[this.__disabled_events[o]]||r.push(this.__disabled_events[o]);this.__disabled_events=r}},HH.prototype.disable=function(e){typeof e>"u"?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)},HH.prototype._encode_data_for_request=function(e){var t=uF(e);return this.get_config("api_payload_format")===RH&&(t=Hz.base64Encode(t)),{data:t}},HH.prototype._track_or_batch=function(e,t){var r=Hz.truncate(e.data,255),n=e.endpoint,o=e.batcher,i=e.should_send_immediately,s=e.send_request_options||{};t=t||cF;var a=!0,l=Hz.bind(function(){return s.skip_hooks||(r=this._run_hook("before_send_"+e.type,r))&&(r=r[0]),r?(jz.log("MIXPANEL REQUEST:"),jz.log(r),this._send_request(n,this._encode_data_for_request(r),s,this._prepare_callback(t,r))):null},this);return this._batch_requests&&!i?o.enqueue(r).then(function(e){e?t(1,r):l()}):a=l(),a&&r},HH.prototype.track=_F(function(e,t,r,n){var o;if(!r||!r.skip_hooks){if(null===(o=this._run_hook("before_track",e,t)))return;e=o[0],t=o[1]}!n&&"function"==typeof r&&(n=r,r=null);var i=(r=r||{}).transport;i&&(r.transport=i);var s=r.send_immediately;if("function"!=typeof n&&(n=cF),Hz.isUndefined(e))this.report_error("No event name provided to mixpanel.track");else{if(!this._event_is_disabled(e)){(t=Hz.extend({},t)).token=this.get_config("token");var a=this.persistence.remove_event_timer(e);if(!Hz.isUndefined(a)){var l=(new Date).getTime()-a;t.$duration=parseFloat((l/1e3).toFixed(3))}this._set_default_superprops();var c=this.get_config("track_marketing")?Hz.info.marketingParams():{};t=Hz.extend({},Hz.info.properties({mp_loader:this.get_config("mp_loader")}),c,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),t);var d=this.get_config("property_blacklist");Hz.isArray(d)?Hz.each(d,function(e){delete t[e]}):this.report_error("Invalid value for property_blacklist config: "+d),this._start_recording_on_event(e,t);var u={event:e,properties:t};return o=this._track_or_batch({type:"events",data:u,endpoint:this.get_api_host("events")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:s,send_request_options:r},n),this.flags&&this.flags.checkFirstTimeEvents&&this.flags.checkFirstTimeEvents(e,t),o}n(0)}}),HH.prototype.set_group=_F(function(e,t,r){Hz.isArray(t)||(t=[t]);var n={};return n[e]=t,this.register(n),this.people.set(e,t,r)}),HH.prototype.add_group=_F(function(e,t,r){var n=this.get_property(e),o={};return void 0===n?(o[e]=[t],this.register(o)):-1===n.indexOf(t)&&(n.push(t),o[e]=n,this.register(o)),this.people.union(e,t,r)}),HH.prototype.remove_group=_F(function(e,t,r){var n=this.get_property(e);if(void 0!==n){var o=n.indexOf(t);o>
3066-1&&(n.splice(o,1),this.register({group_key:n})),0===n.length&&this.unregister(e)}return this.people.remove(e,t,r)}),HH.prototype.track_with_groups=_F(function(e,t,r,n){var o=Hz.extend({},t||{});return Hz.each(r,function(e,t){null!=e&&(o[t]=e)}),this.track(e,o,n)}),HH.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)},HH.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]},HH.prototype.get_group=function(e,t){var r=this._create_map_key(e,t),n=this._cached_groups[r];return(void 0===n||n._group_key!==e||n._group_id!==t)&&((n=new mH)._init(this,e,t),this._cached_groups[r]=n),n},HH.prototype.track_pageview=_F(function(e,t){"object"!=typeof e&&(e={});var r=(t=t||{}).event_name||"$mp_web_page_view",n=Hz.extend(Hz.info.mpPageViewProperties(),Hz.info.campaignParams(),Hz.info.clickParams()),o=Hz.extend({},n,e);return this.is_recording_heatmap_data()&&(o.$captured_for_heatmap=!0),this.track(r,o)}),HH.prototype.track_links=function(){return this._track_dom.call(this,sH,arguments)},HH.prototype.track_forms=function(){return this._track_dom.call(this,aH,arguments)},HH.prototype.time_event=function(e){Hz.isUndefined(e)?this.report_error("No event name provided to mixpanel.time_event"):this._event_is_disabled(e)||this.persistence.set_event_timer(e,(new Date).getTime())};var VH={persistent:!0},WH=function(e){var t;return t=Hz.isObject(e)?e:Hz.isUndefined(e)?{}:{days:e},Hz.extend({},VH,t)};HH.prototype.register=function(e,t){var r=this._run_hook("before_register",e,t);if(null!==r){e=r[0],t=r[1];var n=WH(t);n.persistent?this.persistence.register(e,n.days):Hz.extend(this.unpersisted_superprops,e)}},HH.prototype.register_once=function(e,t,r){var n=this._run_hook("before_register_once",e,t,r);if(null!==n){e=n[0],t=n[1],r=n[2];var o=WH(r);o.persistent?this.persistence.register_once(e,t,o.days):(typeof t>"u"&&(t="None"),Hz.each(e,function(e,r){(!this.unpersisted_superprops.hasOwnProperty(r)||this.unpersisted_superprops[r]===t)&&(this.unpersisted_superprops[r]=e)},this))}},HH.prototype.unregister=function(e,t){var r=this._run_hook("before_unregister",e,t);null!==r&&(e=r[0],t=r[1],(t=WH(t)).persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e])},HH.prototype._register_single=function(e,t){var r={};r[e]=t,this.register(r)},HH.prototype.identify=function(e,t,r,n,o,i,s,a){var l=this._run_hook("before_identify",e);if(null===l)return-1;e=l[0];var c=this.get_distinct_id();if(e&&c!==e){if("string"==typeof e&&0===e.indexOf(PH))return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var d=c;this.register_once({$had_persisted_distinct_id:!0,$device_id:d},"")}e!==c&&e!==this.get_property(EH)&&(this.unregister(EH),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,r,n,o,i,s,a),e!==c&&this.track("$identify",{distinct_id:e,$anon_distinct_id:c},{skip_hooks:!0}),e!==c&&this.flags.fetchFlags().catch(function(){jz.error("[flags] Error fetching flags during identify")})},HH.prototype.reset=function(){this.stop_session_recording(),this.persistence.clear(),this._flags.identify_called=!1;var e=Hz.UUID();this.register_once({distinct_id:PH+e,$device_id:e},""),this._check_and_start_session_recording(),this.flags.reset()},HH.prototype.get_distinct_id=function(){return this.get_property("distinct_id")}
3066,HH.prototype.alias=function(e,t){if(e===this.get_property(SH))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var r=this;return Hz.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(EH,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},function(){r.identify(e)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},HH.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)},HH.prototype.set_config=function(e){Hz.isObject(e)&&(Hz.extend(this.config,e),e.batch_size&&Hz.each(this.request_batchers,function(e){e.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),MC.DEBUG=MC.DEBUG||this.get_config("debug"),("autocapture"in e||"record_heatmap_data"in e)&&this.autocapture&&this.autocapture.init(),Hz.isObject(e.hooks)&&(this.hooks={},Hz.each(e.hooks,function(e,t){if(Hz.isFunction(e))this.hooks[t]=[e];else if(Hz.isArray(e)){this.hooks[t]=[];for(var r=0;r<e.length;r++)Hz.isFunction(e[r])||jz.critical("Invalid hook added. Hook is not a function"),this.hooks[t].push(e[r])}else jz.critical("Invalid hooks added. Ensure that the hook values passed into config.hooks are functions or arrays of functions.")},this)))},HH.prototype.get_config=function(e){return this.config[e]},HH.prototype._run_hook=function(e){var t=Iz.call(arguments,1);return Hz.each(this.hooks[e],function(r){if(null===t)return null;var n=r.apply(this,t);typeof n>"u"?(this.report_error(e+" hook did not return a valid value"),t=null):(Hz.isArray(n)||(n=[n]),t.splice.apply(t,[0,n.length].concat(n)))},this),t},HH.prototype.get_property=function(e){return this.persistence.load_prop([e])},HH.prototype.get_api_host=function(e){return this.get_config("api_hosts")[e]||this.get_config("api_host")},HH.prototype.toString=function(){var e=this.get_config("name");return e!==NH&&(e=NH+"."+e),e},HH.prototype._event_is_disabled=function(e){return Hz.isBlockedUA(Pz)||this._flags.disable_all_events||Hz.include(this.__disabled_events,e)},HH.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_tracking_persistence_type")&&Hz.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):!this.has_opted_in_tracking()&&(this.get_config("opt_out_tracking_by_default")||Hz.cookie.get("mp_optout"))&&(Hz.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},HH.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}!this.get_config("disable_persistence")&&this.persistence.disabled!==t&&this.persistence.set_disabled(t),t?(this.stop_batch_senders(),this.stop_session_recording()):this._batchers_were_started&&this.start_batch_senders()},HH.prototype._gdpr_call_func=function(e,t){return t=Hz.extend({track:Hz.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),Hz.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie
3066:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})},HH.prototype.opt_in_tracking=function(e){e=Hz.extend({enable_persistence:!0},e),this._gdpr_call_func(bF,e),this._gdpr_update_persistence(e)},HH.prototype.opt_out_tracking=function(e){(e=Hz.extend({clear_persistence:!0,delete_user:!0},e)).delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(yF,e),this._gdpr_update_persistence(e)},HH.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(wF,e)},HH.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(xF,e)},HH.prototype.clear_opt_in_out_tracking=function(e){e=Hz.extend({enable_persistence:!0},e),this._gdpr_call_func(SF,e),this._gdpr_update_persistence(e)},HH.prototype.report_error=function(e,t){jz.error.apply(jz.error,arguments);try{!t&&!(e instanceof Error)&&(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(e){jz.error(e)}},HH.prototype.add_hook=function(e,t){this.hooks[e]||(this.hooks[e]=[]),this.hooks[e].push(t)},HH.prototype.remove_hook=function(e,t){var r;this.hooks[e]&&(-1!==(r=this.hooks[e].indexOf(t))?this.hooks[e].splice(r,1):jz.log("remove_hook failed. Matching hook was not found"))},HH.prototype.init=HH.prototype.init,HH.prototype.reset=HH.prototype.reset,HH.prototype.enable=HH.prototype.enable,HH.prototype.disable=HH.prototype.disable,HH.prototype.time_event=HH.prototype.time_event,HH.prototype.track=HH.prototype.track,HH.prototype.track_links=HH.prototype.track_links,HH.prototype.track_forms=HH.prototype.track_forms,HH.prototype.track_pageview=HH.prototype.track_pageview,HH.prototype.register=HH.prototype.register,HH.prototype.register_once=HH.prototype.register_once,HH.prototype.unregister=HH.prototype.unregister,HH.prototype.identify=HH.prototype.identify,HH.prototype.alias=HH.prototype.alias,HH.prototype.name_tag=HH.prototype.name_tag,HH.prototype.set_config=HH.prototype.set_config,HH.prototype.get_config=HH.prototype.get_config,HH.prototype.get_api_host=HH.prototype.get_api_host,HH.prototype.get_property=HH.prototype.get_property,HH.prototype.get_distinct_id=HH.prototype.get_distinct_id,HH.prototype.toString=HH.prototype.toString,HH.prototype.opt_out_tracking=HH.prototype.opt_out_tracking,HH.prototype.opt_in_tracking=HH.prototype.opt_in_tracking,HH.prototype.has_opted_out_tracking=HH.prototype.has_opted_out_tracking,HH.prototype.has_opted_in_tracking=HH.prototype.has_opted_in_tracking,HH.prototype.clear_opt_in_out_tracking=HH.prototype.clear_opt_in_out_tracking,HH.prototype.get_group=HH.prototype.get_group,HH.prototype.set_group=HH.prototype.set_group,HH.prototype.add_group=HH.prototype.add_group,HH.prototype.remove_group=HH.prototype.remove_group,HH.prototype.add_hook=HH.prototype.add_hook,HH.prototype.remove_hook=HH.prototype.remove_hook,HH.prototype.track_with_groups=HH.prototype.track_with_groups,HH.prototype.start_batch_senders=HH.prototype.start_batch_senders,HH.prototype.stop_batch_senders=HH.prototype.stop_batch_senders,HH.prototype.start_session_recording=HH.prototype.start_session_recording,HH.prototype.stop_session_recording=HH.prototype.stop_session_recording,HH.prototype.pause_session_recording=HH.prototype.pause_session_recording,HH.prototype.resume_session_recording=HH.prototype.resume_session_recording,HH.prototype.get_session_recording_properties=HH.prototype.get_session_recording_properties,HH.prototype.get_session_replay_url=HH.prototype.get_session_replay_url,HH.prototype.get_tab_id=HH.prototype.get_tab_id,HH.prototype.DEFAULT_API_ROUTES=FH,HH.prototype.__get_recorder=HH.prototype.__get_recorder,HH.prototype.__get_recording_init_promise=HH.prototype.__get_recording_init_promise,TH.prototype.properties=TH.prototype.properties,TH.prototype.update_search_keyword=TH.prototype.update_search_keyword,TH.prototype.update_referrer_info=TH.prototype.update_referrer_info,TH.prototype.get_cross_subdomain=TH.prototype.get_cross_subdomain,TH.prototype.clear=TH.prototype.clear;var KH={},qH=($H=function(e,t){t()},OH=0,(LH=new HH).init=function(e,t,r){if(r)return LH[r]||(LH[r]=KH[r]=jH(e,t,r),LH[r]._loaded()),LH[r];var n=LH;KH[NH]?n=KH[NH]:e&&((n=jH(e,t,NH))._loaded(),KH[NH]=n),LH=n,1===OH&&(PC[NH]=LH),Hz.each(KH,function(e,t){t!==NH&&(LH[t]=e)}),LH._=Hz},LH.init(),function(){function e(){e.done||(e.done=!0,BH=!0,MH=!1,Hz.each(KH,function(e){e._dom_loaded()}))}if($z.addEventListener)"complete"===$z.readyState?e():$z.addEventListener("DOMContentLoaded",e,!1);else if($z.attachEvent){$z.attachEvent("onreadystatechange",e);var t=!1;try{t=null===PC.frameElement}catch{}$z.documentElement.doScroll&&t&&function t(){try{$z.documentElement.doScroll("left")}catch{return void setTimeout(t,1)}e()}()}Hz.register_event(PC,"load",e,!0)}(),LH);const GH=(e,t)=>{const{mixpanelToken:r,jiveApiBaseUrl:n}=(0,Dv.an)(),o=`${n}/analytics/v1`;qH.init(r,{api_host:o,api_routes:{track:"act/",engage:"connect/"}}),qH.set_config({cross_subdomain_cookie:!1,disable_persistence:!0,ip:!1,ignore_dnt:!0}),qH.identify(e);const{Entitlements:i=[],...s}=t??{},a={businessUnit:"goto",application:"goto-app",Entitlements:i,...s};qH.register(a),qH?.people?.set({Entitlements:i,ExternalUserkey:e})},ZH={track:(e,t)=>{const r={};for(const n in t)if("object"!=typeof t[n]||Array.isArray(t[n]))r[n]=t[n];else{const t=`The mixpanel event named "${e}" contain an object in ${n}`;(0,Dv.g)().warn("Invalid property type",new Error(t))}qH.track(e,r)}},YH={getBrandValue:Dv.by,BrandVariationKeys:Dv.bx,getBrandAssetsPath:Dv.bw};var JH=(e=>(e.initialize="initialize",e.identify="identify",e.updateOptions="updateOptions",e.pageLoad="pageLoad",e.track="track",e))(JH||{});const QH=(e=[])=>e.map(e=>e.description).filter(e=>!!e),XH=(e=[])=>e.flatMap(e=>("roles"in e?e.roles:void 0)??[]).filter(e=>!!e),ej=(e=[])=>e.map(e=>"sku"in e?e.sku:void 0).filter(e=>!!e),tj=e=>e.map(e=>({...e,enabledDate:e.enabledDate?.toISOString()})),rj=async e=>{const t=(0,Dv.bp)(),r=t.document,{userKey:n,accountKey:o,entitlements:i,locale:s,product:a,pbxId:l,isContainer:c,licenses:d,isCalendarConnected:u,productEnabledDates:h,machineId:p,runId:g,pendoSrc:f}=e;
3066await new Promise((e,n)=>((t,r,o,i)=>{const s=t.pendo??{};t.pendo=s,s._q=s._q||[];for(const e of Object.values(JH))s[e]||(s[e]=(...t)=>s._q.push([e,[...t]]));const a=r.createElement("script");a.defer=!0,a.src=`https://content.ipd.goto.com/agent/static/09a65695-6563-4c7c-6349-ba8728f926f3/${i}`,a.onload=()=>e(),a.onerror=()=>n();const l=r.getElementsByTagName("script")[0];l.parentNode?.insertBefore(a,l)})(t,r,0,f)),t.pendo?.initialize({visitor:{id:n,entitlements:i,locale:s,product:a,goto_isContainer:c,goto_licenses_descriptions:QH(d),goto_licenses_roles:XH(d),goto_licenses_skus:ej(d),goto_isCalendarConnected:await u,goto_productEnabledDates:tj(h),goto_machineId:p,goto_runId:g},account:{id:o,pbxId:l}})};class nj{constructor(){}updateData({userData:e,accountData:t}){(({userData:e,accountData:t})=>{(0,Dv.bp)().pendo?.updateOptions({visitor:e,account:t})})({userData:e,accountData:t})}}let oj,ij;const sj=()=>(oj||aj(),oj),aj=()=>{oj={updateData:lj().updateData}},lj=()=>(ij||(ij=new nj),ij);class cj{async quit(){if(!Dv.bz.isPluginAvailable("LifeCycle"))throw(0,Dv.bB)()?new Error("In container but LifeCycle plugin is not available."):new Error("We are in a browser.");try{await(Dv.bA.LifeCycle.quit?.())}catch(e){throw(0,Dv.g)().error("Impossible to close the application."),new Error(e)}}}let dj,uj;const hj=()=>(dj||pj(),dj),pj=()=>{const{quit:e}=gj();dj={quit:e.bind(uj),state:(0,Dv.bC)()}},gj=()=>(uj||(uj=new cj),uj),fj=()=>{const{badgeNumberUpdated:e}=(0,Dv.au)().subscribeTo("badge");e.addListener(mj),(0,Dv.av)(()=>{e.removeListener(mj)})},mj=e=>{const t={id:(0,Dv.bH)(e.route),value:e.value,showInNavigation:e.route===Dv.bE||e.route===Dv.bF||e.route===Dv.bG,showInDock:e.route===Dv.bE||e.route===Dv.bF};shell.badgeNumbers.setBadgeNumber(t)};let vj="0.0.0-development-SNAPSHOT",bj="0.0.0-development-SNAPSHOT",yj="0.0.0-development-SNAPSHOT";const wj=()=>yj;class xj{getAppVersion(){return wj()}getShellVersion(){return Dv.h}getChameleonWebVersion(){return vj}getChameleonCoreVersion(){return bj}getContainerVersion(){return(0,Dv.bI)()}getExtensions(){return(0,Dv.bJ)().getExtensions().map(e=>e.getMetadata())}}let _j,kj;const Cj=()=>(_j||(_j=Sj()),_j),Sj=()=>{const e=Ej();return Object.freeze({get appVersion(){return e.getAppVersion()},get shellVersion(){return e.getShellVersion()},get chameleonWebVersion(){return e.getChameleonWebVersion()},get chameleonCoreVersion(){return e.getChameleonCoreVersion()},get getContainerVersion(){return()=>e.getContainerVersion()},get useExtensions(){return!0},get extensions(){return e.getExtensions()}})},Ej=()=>(kj||(kj=new xj),kj);class Ij{constructor(){this.dialogContainerSelector=Dv.bK}open(e){const t=(0,Dv.bL)().querySelector(this.dialogContainerSelector);0===t?.childNodes.length?t?.appendChild(e):(0,Dv.g)().error("Cannot display more than 1 dialog at a time.")}close(){const e=(0,Dv.bL)().querySelector(this.dialogContainerSelector);e&&(e.innerHTML="")}}let Aj,Tj;const Oj=()=>(Aj||(Aj=Lj()),Aj),Lj=()=>{const e=$j();return Object.freeze({open(t){return e.open(t)},close(){return e.close()}})},$j=()=>(Tj||(Tj=new Ij),Tj),Nj=["@logmein.com","@goto.com","@jive.com","@jedix.com","@guthrie.com"],Rj=e=>!!e&&!!Nj.find(t=>e.toLowerCase().endsWith(t)),Pj=async()=>{let{name:e,version:t}=(0,Dv.J)();try{if(Dv.bz.isPluginAvailable("ContainerInfo")){const{appVersion:r,name:n}=await Dv.bA.ContainerInfo.getInfo();e=n,t=r,(0,Dv.g)().info("getDeviceInfo: resolved from ContainerInfo plugin",{deviceBrand:e,deviceModel:t})}else(0,Dv.g)().info("getDeviceInfo: ContainerInfo plugin unavailable, using browser fallback",{deviceBrand:e,deviceModel:t});return{deviceBrand:e,deviceModel:t}}catch(e){(0,Dv.g)().error("Container Plugins caused an error",e)}},Dj=e=>e?.userDetails?.userInfo?.user?.key,Mj=e=>e?.userDetails?.userInfo?.accounts?.map(e=>e.key)??[],zj=e=>e?.userDetails?.userInfo?.user?.locale,Fj=e=>e?.pbxData?.pbxId??"",Uj=e=>e?.pbxData?.pbxOrganizationInfo?.region??"",Bj=e=>[...qj(e)?.licenses?.map(e=>e).flat(1/0)??[]],Hj=e=>Bj(e).map(e=>e.description),jj=e=>{const t=e?.userDetails?.userInfo?.user?.email;return Rj(t)},Vj=e=>{const t=new Set;
3066return e?.userDetails?.userInfo?.accounts?.forEach(e=>e.licenses?.forEach(e=>{e.enabled&&(0,Dv.bM)(e.roles??[]).forEach(e=>t.add(e))})),Array.from(t.values())},Wj=e=>e?.userDetails?.userInfo?.user?.timeZone,Kj=e=>e?.userDetails?.userInfo?.user?.createTime??"",qj=e=>{let t=e?.userDetails?.userInfo?.accounts[0]??void 0;const r=(0,Dv.bN)();return r?.key&&e?.userDetails?.userInfo?.accounts?.forEach(e=>{e.key===r.key&&(t=e)}),t},Gj=e=>qj(e)?.key??"guest",Zj=e=>qj(e)?.name??"",Yj=e=>qj(e)?.licenses?.map(e=>e.key)??[],Jj=e=>{const t=new Set;return e?.userDetails?.userInfo?.accounts.forEach(e=>e.licenses?.forEach(e=>e.roles?.forEach(e=>t.add(e)))),Array.from(t.values())},Qj=e=>qj(e)?.partnerAccountKey??"",Xj=()=>(0,Dv.Z)().calendar?.isConnected().catch(()=>!1)??Promise.resolve(!1),eV=e=>e?.featureFlags??{},tV=e=>{const t=(e=>e?.pbxData?.pbxUserLocation)(e);if(t?.desired)return{locationName:t.desired.locationName,postalCode:t.desired.address?.postalCode,contactNumber:t.desired.callbackPhoneNumber?.callerIdNumber,contactNumberId:t.desired.callbackPhoneNumber?.callbackPhoneNumberId}},rV=e=>e?.userDetails?.userInfo?.user?.createTime?new Date(+e.userDetails.userInfo.user.createTime):null,nV=e
3066=>({get key(){return e.key},get name(){return e.name},get meta(){return e.meta},get locale(){return e.locale},get emails(){return e.emails},get location(){return e.location},get accounts(){return e.accounts},get avatar(){return e.avatar},get entitlements(){return e.entitlements},get roles(){return e.roles},getAccountByKey(t){return e.getAccountByKey(t)},hasPermissions(t){return e.hasPermissions(t)},hasLicenses(t){return e.hasLicenses(t)},getUserContextLicenses(){return e.getUserContextLicenses()}}),oV=e=>({get key(){return Dj(e)??null},get name(){return(e=>({givenName:e?.userDetails?.userInfo?.user?.firstName??"",lastName:e?.userDetails?.userInfo?.user?.lastName??""}))(e)},get meta(){return(e=>({createdDate:rV(e)}))(e)},get locale(){return zj(e)??null},get emails(){return(e=>e?.userDetails?.userInfo?.user?.email?[{value:e.userDetails.userInfo.user.email,type:"primary",primary:!0}]:[])(e)},get location(){return(e=>({city:e?.userDetails?.userInfo?.user?.location??"",timeZone:e?.userDetails?.userInfo?.user?.timeZone??""}))(e)},get accounts(){return(e=>(0,Dv.bO)(e?.userDetails?.userInfo?.accounts))(e)},get avatar(){return(e=>e?.userDetails?.avatar)(e)},get entitlements(){return Vj(e)},get roles(){return Jj(e)},getAccountByKey(e){return this.accounts.find(t=>t.key===e)},hasPermissions(t){return!t.find(t=>!(e?.userDetails?.permissions??[]).includes(t))},hasLicenses(e){const t=(0,Dv.bN)(),r=this.getAccountByKey(t?.key??""),n=[...this.getUserContextLicenses(),...r?.licenses.map(e=>e.channel).flat(1/0)??[]];return!e.find(e=>!n.includes(e))},getUserContextLicenses(){return e?.userDetails?.licenses??[]}});var iV=Object.defineProperty;const sV=class extends Dv.bP{constructor(){super(...arguments),this.breakpointChangeListener=e=>{this.classList.toggle("floating-panel",e.active)},this.transitionOverrideToken=0}connectedCallback(){super.connectedCallback(),this.unsubscribeFunctions.push(Xv("xs","lg",this.breakpointChangeListener))}createRenderRoot(){return this}open(e,t){this.panelContentContainer.innerHTML="",this.panelContentContainer.appendChild(e),this.setOpen(!0,t?.animate??!0)}close(e){this.panelContentContainer.innerHTML="",this.setOpen(!1,e?.animate??!0)}isOpen(){return this.classList.contains("open")}setOpen(e,t){if(this.transitionOverrideToken++,t)return this.classList.remove("no-transition"),void this.classList.toggle("open",e);const r=this.transitionOverrideToken;this.classList.add("no-transition"),this.classList.toggle("open",e),requestAnimationFrame(()=>{requestAnimationFrame(()=>{this.transitionOverrideToken===r&&this.classList.remove("no-transition")})})}handleClosePanelClick(){(0,Dv.Z)().inspectorPanel.close()}render(){return Dv.aH`<div class="panel-container">
3067      <div class="close-panel-container">
3068        <chameleon-icon-button
3069          label=${(0,Dv.bQ)("Hide panel")}
3070          data-testid="inspector-panel-close"
3071          size="small"
3072          variant="primary"
3073          @click=${this.handleClosePanelClick}
3074        >
3075          <chameleon-svg>${(0,Dv.bR)(_b)}</chameleon-svg></chameleon-icon-button
3076        >
3077      </div>
3078      <div class="panel-content-container"></div>
3079    </div> `}};sV.tagName="goto-inspector-panel";let aV,lV,cV=sV;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&iV(t,r,o)})([(0,Dv.bS)(".panel-content-container")],cV.prototype,"panelContentContainer");class dV{isOpen(){const e=(0,Dv.bL)().querySelector(cV.tagName);return!!e&&e.isOpen()}open(e,t){const r=(0,Dv.bL)().querySelector(cV.tagName);r&&(r.open(e,t),(0,Dv.bT)())}close(e){const t=(0,Dv.bL)().querySelector(cV.tagName);t&&(t.close(e),(0,Dv.bU)())}}const uV=()=>(aV||(aV=hV()),aV),hV=()=>{const e=pV();return Object.freeze({isOpen(){return e.isOpen()},open(t,r){return e.open(t,r)},close(t){return e.close(t)}})},pV=()=>(lV||(lV=new dV),lV);class gV{constructor(e){this.userPreferencesConnector=e,this.getPreferences=async e=>await this.userPreferencesConnector.getPreferences(e),this.getPreference=async(e,t,r)=>await this.userPreferencesConnector.getPreference(e,t,r),this.setPreference=async(e,t,r=Dv.U.LOCAL_STORAGE)=>await this.userPreferencesConnector.setPreference(e,t,r),this.deletePreference=async e=>await this.userPreferencesConnector.deletePreference(e)}}const fV=async()=>{try{const{context:{account:{key:e}={}}={},user:{key:t}={}}=(0,Dv.Z)();if(!e||!t)throw new Error(`[User Preferences] - Account or user key not found. Skipping user preferences fetch and merge. accountKey: ${e}, userKey: ${t}`);const r=await(await(0,Dv.y)(`${(0,Dv.an)().getShellBffServiceBaseUrl()}/user-settings/accounts/${e}/users/${t}`,{method:"GET",headers:{"Content-Type":"application/json"},credentials:void 0})).json();return(0,Dv.bs)(Dv.bt.SHELL_BFF_OPTIMIZATION)||(r?(0,Dv.aW)(Dv.bV,JSON.stringify(r)):(0,Dv.bW)(Dv.bV)),r}catch(e){(0,Dv.g)().info(`[User Preferences] - Error fetching and merging user preferences:${e}`)}};let mV,vV;const bV=e=>(mV||(mV=yV(e)),mV),yV=e=>{const t=wV(e);return Object.freeze({async getPreferences(e){return await t.getPreferences(e)},async getPreference(e,r,n){return await t.getPreference(e,r,n)},async setPreference(e,r,n){return await t.setPreference(e,r,n)},async deletePreference(e){return await t.deletePreference(e)}})},wV=e=>(vV||(vV=new gV(e)),vV),xV="user-preferences-connector";class _V{constructor(e){this.userPreferencesConnector=e,this.handleMessage=e=>{switch(e.method){case"deletePreference":this.userPreferencesConnector.deletePreference(e.path);break;case"setPreference":this.userPreferencesConnector.setPreference(e.path,e.data,e.storageOption)}},this.getPreferences=e=>this.userPreferencesConnector.getPreferences(e),this.getPreference=(e,t,r)=>this.userPreferencesConnector.getPreference(e,t,r),this.setPreference=(e,t,r)=>((0,Dv.O)().send({type:xV,payload:{method:"setPreference",path:e,data:t,storageOption:r}}),this.userPreferencesConnector.setPreference(e,t)),this.deletePreference=e=>((0,Dv.O)().send({type:xV,payload:{method:"deletePreference",path:e}}),this.userPreferencesConnector.deletePreference(e)),(0,Dv.O)().addCallback(xV,this.handleMessage),(0,Dv.av)(()=>{(0,Dv.O)().removeCallback(xV,this.handleMessage)})}}const kV="UserPreferences",CV={userPreferencesUpdatedEvent:(0,Dv.F)()},{emit:SV}=(0,Dv.au)().register(kV,CV),EV=e=>{SV.userPreferencesUpdatedEvent(e)};class IV{deletePreferenceByPath(e,t){const[r,...n]=t.split(".");return n.length?{...e,[r]:this.deletePreferenceByPath(e[r],n.join("."))}:(delete e[r],e)}setPreferenceByPath(e,t,r){const[n,...o]=t.split(".");return{...e,[n]:o.length?this.setPreferenceByPath(e[n]||{},o.join("."),r):r}}getPreferencesFromLocalStorage(){const e=(0,Dv.aZ)(Dv.bX);return(0,Dv.bY)(e,{})}getPreferenceByPath(e,t){const r=(t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split(".");for(let t=0,n=r.length;t<n;++t){const n=r[t];if(!(n in e))return;e=e[n]}return e}deletePreferenceFromLocalStorage(e,t){const r=this.deletePreferenceByPath(e,t);(0,Dv.aW)(Dv.bX,JSON.stringify(r)),EV({path:t,data:null})}}class AV extends IV{constructor(e){super(),this.getPreferences=async e=>this.apiBaseUrl&&e!==Dv.U.LOCAL_STORAGE?e===Dv.U.CLOUD_PER_ACCOUNT?this.getPreferencesRemote():{...this.getPreferencesFromLocalStorage(),...await this.getPreferencesRemote()}:this.getPreferencesFromLocalStorage(),this.getPreference=async(e,t,r)=>{if(!this.apiBaseUrl){const r=await this.getPreferencesFromLocalStorage();return this.getPreferenceFromLocalStorage(r,e,t)}if(r===Dv.U.LOCAL_STORAGE){const r=await this.getPreferences(Dv.U.LOCAL_STORAGE);return this.getPreferenceFromLocalStorage(r,e,t)}if(r===Dv.U.CLOUD_PER_ACCOUNT){const r={method:"GET",body:{path:e,defaultValue:t}};return await this.queryAPI(`${this.apiBaseUrl}/preference`,r)}const n={method:"GET",body:{path:e,defaultValue:t}},o=await this.queryAPI(`${this.apiBaseUrl}/preference`,n);if(null!=o)return o;const i=await this.getPreferences(Dv.U.LOCAL_STORAGE);return this.getPreferenceFromLocalStorage(i,e,void 0)??t},this.setPreference=async(e,t)=>{if(!this.apiBaseUrl){const r=await this.getPreferences();return this.setPreferenceInLocalStorage(r,e,t)}const r={method:"POST",body:{path:e,data:t}};await this.queryAPI(`${this.apiBaseUrl}/preference`,r)},this.deletePreference=async e=>{if(!this.apiBaseUrl){const t=await this.getPreferencesFromLocalStorage();return this.deletePreferenceFromLocalStorage(t,e)}const t={method:"DELETE",body:{path:e}};await this.queryAPI(`${this.apiBaseUrl}/preference`,t)},this.queryAPI=async(e,t)=>await(await(0,Dv.y)(e,t)).json(),this.getPreferencesRemote=async()=>await this.queryAPI(`${this.apiBaseUrl}/preferences`,{method:"GET"})??{},this.getPreferenceFromLocalStorage=(e,t,r)=>this.getPreferenceByPath(e,t)??r,this.setPreferenceInLocalStorage=(e,t,r)=>{const n=this.setPreferenceByPath(e,t,r);(0,Dv.aW)(Dv.bX,JSON.stringify(n)),EV({path:t,data:r})},this.apiBaseUrl=e?.apiUrl??""}}var TV,OV,LV=function(){if(OV)return TV;OV=1;var e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,n=/^0o[0-7]+$/i,o=parseInt,i="object"==typeof Dv.bZ&&Dv.bZ&&Dv.bZ.Object===Object&&Dv.bZ,s="object"==typeof self&&self&&self.Object===Object&&self,a=i||s||Function("return this")(),l=Object.prototype.toString,c=Math.max,d=Math.min,u=function(){return a.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function p(i){if("number"==typeof i)return i;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(i))return NaN;if(h(i)){var s="function"==typeof i.valueOf?i.valueOf():i;i=h(s)?s+"":s}if("string"!=typeof i)return 0===i?i:+i;i=i.replace(e,"");var a=r.test(i);return a||n.test(i)?o(i.slice(2),a?2:8):t.test(i)?NaN:+i}return TV=function(e,t,r){var n,o,i,s,a,l,g=0,f=!1,m=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var r=n,i=o;return n=o=void 0,g=t,s=e.apply(i,r)}function y(e){var r=e-l;return void 0===l||r>=t||r<0||m&&e-g>=i}function w(){var e=u();if(y(e))return x(e);a=setTimeout(w,function(e){var r=t-(e-l);return m?d(r,i-(e-g)):r}(e))}function x(e){return a=void 0,v&&n?b(e):(n=o=void 0,s)}function _(){var e=u(),r=y(e);if(n=arguments,o=this,l=e,r){if(void 0===a)return function(e){return g=e,a=setTimeout(w,t),f?b(e):s}(l);if(m)return a=setTimeout(w,t),b(l)}return void 0===a&&(a=setTimeout(w,t)),s}return t=p(t)||0,h(r)&&(f=!!r.leading,i=(m="maxWait"in r)?c(p(r.maxWait)||0,t):i,v="trailing"in r?!!r.trailing:v),_.cancel=function(){void 0!==a&&clearTimeout(a),g=0,n=l=o=a=void 0},_.flush=function(){return void 0===a?s:x(u())},_},TV}();const $V=(0,Dv._)(LV);class NV extends IV{constructor(){super(...arguments),this.unsentPatches=new Map,this.inflightPatches=new Map,this.isFlushInProgress=!1,this.DEBOUNCE_DELAY_MS=500,this.debouncedFlushUnsentPatches=$V(async()=>{try{await this.flushUnsentPatches()}catch(e){(0,Dv.g)().error(`[User Preferences] - Error in batch patch timer callback: ${e}`)}},this.DEBOUNCE_DELAY_MS),this.shouldRetryPatchUserSettingsCall=async e=>{const{error:t,value:{status:r}={}}=e;return!!(r&&r>=500||t)}}async getPreferences(e){return e===Dv.U.LOCAL_STORAGE?this.getPreferencesFromLocalStorage():e===Dv.U.CLOUD_PER_ACCOUNT?this.getPreferencesRemote():{...this.getPreferencesFromLocalStorage(),...this.getPreferencesRemote()}}async getPreference(e,t,r){if(r===Dv.U.LOCAL_STORAGE)return this.getValueFromSpecificLocalStorage(Dv.bX,e)??t;if(r===Dv.U.CLOUD_PER_ACCOUNT){const r=this.unsentPatches.get(e);if(void 0!==r)return r.value??t;
3079const n=this.inflightPatches.get(e);return void 0!==n?n.value??t:this.getValueFromSpecificLocalStorage(Dv.bV,e)??t}const n=this.getValueFromSpecificLocalStorage(Dv.bV,e);return void 0!==n?n:this.getValueFromSpecificLocalStorage(Dv.bX,e)??t}async setPreference(e,t,r){r===Dv.U.CLOUD_PER_ACCOUNT?await this.setUserSettingsProperty(e,t):this.setPreferencesLocally(e,t),EV({path:e,data:t})}setPreferencesLocally(e,t){const r=this.getPreferencesFromLocalStorage();try{const n=this.setPreferenceByPath(r??{},e,t);(0,Dv.aW)(Dv.bX,JSON.stringify(n))}catch{(0,Dv.g)().info(`[User Preferences] - Failed to save local preference (path: ${e})`)}}async deletePreference(e){try{const t=this.getPreferencesFromLocalStorage();this.deletePreferenceFromLocalStorage(t,e)}catch{}}async setUserSettingsProperty(e,t){const r={path:`/${e.includes(".")?e.replace(/\./g,"/"):e}`,value:t};this.unsentPatches.set(e,r),!this.isFlushInProgress&&this.debouncedFlushUnsentPatches()}async flushUnsentPatches(){if(0===this.unsentPatches.size||this.isFlushInProgress)return;this.isFlushInProgress=!0,this.inflightPatches=new Map(this.unsentPatches);const e=Array.from(this.unsentPatches.values()),t=Array.from(this.unsentPatches.keys());this.clearUnsentPatches();try{const t=await this.patchUserSettingsBatch(e);if(t.ok)return void await this.handleBatchPatchSuccess(t);throw new Error("Failure during the patchUserSettingsBatch")}catch(e){(0,Dv.g)().error(`[User Preferences] - [paths: ${t.join(", ")}] - The PATCH call failed (error: ${e}).`)}finally{this.clearInflightPatches(),this.isFlushInProgress=!1,this.retryFlushIfNeeded()}}async handleBatchPatchSuccess(e){const t=await e.json();(0,Dv.aW)(Dv.bV,JSON.stringify(t))}clearInflightPatches(){this.inflightPatches=new Map}clearUnsentPatches(){this.unsentPatches=new Map}retryFlushIfNeeded(){this.unsentPatches.size>0&&this.debouncedFlushUnsentPatches()}async patchUserSettingsBatch(e){const{context:{account:{key:t}={}},user:{key:r}}=(0,Dv.Z)(),n=`${(0,Dv.an)().getShellBffServiceBaseUrl()}/user-settings/accounts/${t}/users/${r}`;return await(0,Dv.y)(n,{method:"PATCH",headers:{"content-type":"application/json"},retry:{maxRetryNumber:3,retryAfterInMilliseconds:500,retryOn:this.shouldRetryPatchUserSettingsCall},credentials:void 0,body:JSON.stringify(e)})}getValueFromSpecificLocalStorage(e,t){const r=(0,Dv.aZ)(e),n=(0,Dv.bY)(r,{});return this.getPreferenceByPath(n,t)}getPreferencesRemote(){return(0,Dv.bY)((0,Dv.aZ)(Dv.bV),{})}}let RV;const PV=e=>(RV||(RV=(e=>{const t=(0,Dv.bs)(Dv.bt.SHELL_USER_PREFERENCES_V2_ENABLED)?new NV:new AV(e);return(0,Dv.O)().isCompanion||(0,Dv.O)().isIntegration&&(0,Dv.b_)()?new _V(t):t})(e)),RV);var DV;!function(e){e.OPEN="open",e.MESSAGE="message",e.CLOSE="close",e.ERROR="error",e.RESTART_REQUIRED="restart-required",e.UPDATE_CHANNEL_LIFETIME="update-channel-lifetime"}(DV||(DV={}));const MV={log:(...e)=>console.log(...e),info:(...e)=>console.info(...e),debug:(...e)=>console.debug(...e),warn:(...e)=>console.warn(...e),error:(...e)=>console.error(...e)};let zV;const FV=()=>zV??MV;class UV{constructor(){this.correlationId=0,this.pingRequests=new Map,this.isTerminated=!1,this.ws=null,this.handleOnOpen=e=>this.onOpen(e),this.handleOnClose=e=>this.onClose(e),this.handleOnError=e=>this.onError(e),this.handleOnMessage=e=>this.onMessage(e)}isConnecting(){return!!this.ws&&this.ws.readyState===WebSocket.CONNECTING}isOpen(){return!!this.ws&&this.ws.readyState===WebSocket.OPEN}isClosed(){return!this.ws||[WebSocket.CLOSED,WebSocket.CLOSING].includes(this.ws.readyState)}disconnect(){if(this.isTerminated=!0,this.isClosed())return this.removeEventListeners(),void(this.ws=null);try{this.ws?.removeEventListener("message",this.handleOnMessage),this.ws?.close()}catch(e){FV().error("WebSocket:Error trying to close WebSocket",e)}finally{this.removeEventListeners(),this.ws=null}}ping(){const e={correlationId:this.correlationId++,command:"ping"};this.pingRequests.set(e.correlationId,e);try{this.ws?.send(JSON.stringify(e))}catch(e){FV().error("WebSocket:Ping fail to execute",e)}}handlePongMessage(e){typeof e<"u"?this.pingRequests.delete(e):this.pingRequests.clear()}isPongMessage(e){return this.pingRequests.has(e)}internalConnect(e){this.isTerminated=!1,this.ws=(e=>new WebSocket(e))(e),this.addEventListeners()}addEventListeners(){this.ws?.addEventListener("open",this.handleOnOpen),this.ws?.addEventListener("close",this.handleOnClose),this.ws?.addEventListener("error",this.handleOnError),this.ws?.addEventListener("message",this.handleOnMessage)}removeEventListeners(){this.ws?.removeEventListener("open",this.handleOnOpen),this.ws?.removeEventListener("close",this.handleOnClose),this.ws?.removeEventListener("error",this.handleOnError),this.ws?.removeEventListener("message",this.handleOnMessage)}}const BV={stack:[],log:function(e,t,...r){try{const n={message:e,channelId:t.channelId,readyState:t.readyState,timestamp:(new Date).toISOString(),args:r??void 0};this.stack.push(n),this.stack.length>80&&this.stack.shift()}catch{}},getData:function(){return this.stack},clear:function(){this.stack=[]}},HV=()=>BV,jV=[];class VV extends UV{constructor(e){super(),this.pongTimeout=null,this.pingInterval=null,this.connectionTimeout=null,this.connectionAttemptsCount=0,this.channelStartTimestamp=0;const t={channelId:e?.channelInfo?.channelId,readyState:void 0};HV().log("WSNH creation",t),this.emitter=e.emitter,this.updateChannelInfo(e.channelInfo)}disconnect(){this._log("WSNH Disconnect"),FV().log("NotificationChannel: Disconnecting",{channelId:this.channelInfo?.channelId}),super.disconnect()}get isConnected(){return this.isOpen()}connect(){FV().log("NotificationChannel: Connecting"),this.connectionAttemptsCount=0,this.keepAlive()}get channelInfo(){return this._channelInfo}updateChannelInfo(e){this._channelInfo={...this._channelInfo||{},...e},this.channelStartTimestamp=(new Date).valueOf(),FV().log("NotificationChannel: Channel info updated",{channelId:this._channelInfo?.channelId,channelLifetime:this._channelInfo?.channelLifetime})}delete(){FV().log("NotificationChannel: Deleting handler",{channelId:this.channelInfo?.channelId}),this.pause(),this.disconnect(),this.connectionTimeout?.stop()}pause(){FV().log("NotificationChannel: Pausing connection",{channelId:this.channelInfo?.channelId}),this.pongTimeout?.pause(),this.pingInterval?.pause()}resume(){FV().log("NotificationChannel: Resuming connection",{channelId:this.channelInfo?.channelId}),this.pongTimeout?.stop(),this.pingInterval?.reset()}_log(e,...t){const r={channelId:this.channelInfo?.channelId,readyState:this.ws?.readyState};HV().log(e,r,...t)}onOpen(e){this._log("WSNH open"),FV().log("NotificationChannel: Connection established",{channelId:this.channelInfo?.channelId}),this.connectionAttemptsCount=0,this.connectionTimeout?.stop(),this.startInternalPing(),this.emitter.emit(DV.OPEN,e)}onClose(e){this._log("WSNH close",e?.reason,e?.code),FV().log("NotificationChannel: Connection closed",{reason:e?.reason,code:e?.code,channelId:this.channelInfo?.channelId}),!this.isOpen()&&!this.isConnecting()&&"Kicked by newer connection"!==e?.reason&&1001!==e?.code&&(this._log("WSNH stoping interval"),this.pingInterval?.stop(),this.emitter.emit(DV.CLOSE,e))}onError(e){this._log("WSNH error"),FV().log("NotificationChannel: Connection error",{channelId:this.channelInfo?.channelId}),this.emitter.emit(DV.ERROR,e)}onMessage(e){let t;try{t=JSON.parse(e.data)}catch(e){FV().error("WebSocket: Invalid JSON",e)}if(this.isTerminated&&FV().log("Receiving a message from a terminated WebSocket",t),t){if((e=>"object"==typeof e&&!!e&&"code"in e&&"correlationId"in e&&"data"in e)(t)&&this.isPongMessage(t.correlationId))return void this.handlePongMessage(t.correlationId);if(t.code<200||t.code>299)FV().error(`WebSocket:Message contains ErrorCode ${t.code}`,t);else{if(this.isRefreshRequiredMessage(t))return void this.emitUpdate
3079ChannelLifetimeEvent();if(!this.isTerminated){const e=t.data,r={type:e?.type,source:e?.source,usage:e?.usage,timestamp:e?.timestamp};FV().log("NotificationChannel: Message processed",r),this.trackForDuplicateMessages(t),this.emitter.emit(DV.MESSAGE,t)}}}}trackForDuplicateMessages(e){const t=e.data,r=this.channelInfo.channelId;if("messaging"===t.source&&"message"===t.type&&t.content?.id){const n=jV.find(e=>t.content.id===e.message.data.content.id);if(n){const o=n?.message.data;if(o&&o.content.body===t.content.body){const i=e=>{const t={...e};return"body"in t&&(t.body="N/A"),"content"in t&&(t.content=i({...t.content})),t},s={error:"NC Duplicate Message detected",currentMessage:JSON.stringify(i(t)),currentCorrelationId:e.correlationId,previousMessage:JSON.stringify(i(o)),previousCorrelationId:n.message.correlationId,currentChannelId:r,previousChannelId:n.channelId,stack:JSON.stringify(HV().getData())};FV().error("Shell detected duplicate messages in Notification Channel",s),HV().clear()}}jV.push({message:e,channelId:r}),jV.length>20&&jV.shift()}}startInternalPing(){this.stopPingPong(),this.pingInterval=new Vv(()=>{this.internalPing()},8e3)}stopPingPong(){this.pongTimeout?.stop(),this.pingInterval?.stop()}internalPing(){this.isChannelLifeTimeOutdated()||this.isClosed()?(this.stopPingPong(),this.emitRestartRequiredEvent()):(this.pongTimeout?.stop(),this.pongTimeout=new Wv(()=>{this.handlePongMessageTimeout()},4e3),this.ping(),this.checkForChannelLifeTimeUpdate())}handlePongMessageTimeout(){this.handlePongMessage(),FV().error("WebSocket:Pong timeout")}handlePongMessage(e){this.pongTimeout?.stop(),super.handlePongMessage(e)}checkForChannelLifeTimeUpdate(){const e=this.getTimeSpentSinceLastChannelLifetimeUpdate();.75*this.channelInfo.channelLifetime<e&&(this._log("WSNH emitUpdateChannelLifetimeEvent"),this.emitUpdateChannelLifetimeEvent())}isChannelLifeTimeOutdated(){return this.getTimeSpentSinceLastChannelLifetimeUpdate()>this.channelInfo.channelLifetime}keepAlive(){this.connectionAttemptsCount++,this.connectionAttemptsCount>3?(this._log("WSNH Too many connection attempts"),this.emitRestartRequiredEvent()):this.tryConnecting()}tryConnecting(){if(this._log("WSNH try connecting"),this.channelInfo.channelData)try{this.internalConnect(this.channelInfo.channelData.channelURL)}catch(e){FV().error("WebSocket:Connection failed",e)}else FV().error("WebSocket:ChannelData required");const e=this.connectionAttemptsCount**2,t=1e3*((e,t)=>(e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e)+e)))(2+e,5+e)+1e4;this.connectionTimeout?.stop(),this.connectionTimeout=new Wv(()=>{this.keepAlive()},t)}emitRestartRequiredEvent(){this.emitter.emit(DV.RESTART_REQUIRED)}emitUpdateChannelLifetimeEvent(){this.emitter.emit(DV.UPDATE_CHANNEL_LIFETIME)}getTimeSpentSinceLastChannelLifetimeUpdate(){return Math.floor(((new Date).valueOf()-this.channelStartTimestamp)/1e3)}isRefreshRequiredMessage(e){return"type"in e.data&&"WEBSOCKET_REFRESH_REQUIRED"===e.data.type}}const WV=e=>new VV(e);let KV;const qV=()=>KV;var GV;let ZV;!function(e){e[e.WEBSOCKET=0]="WEBSOCKET",e[e.PUSH=1]="PUSH"}(GV||(GV={}));const YV=async(e,t)=>{const r="string"==typeof e?e:e.url,n=t?.method||("string"==typeof e?"GET":e.method),o={url:(0,Dv.b$)(r),method:n};FV().log("NotificationChannel InternalFetch: Request started",o);const i=await ZV(),s=await fetch(e,{...t,headers:{...t?.headers,Authorization:`Bearer ${i}`}}),{status:a,statusText:l}=s;return a>=400?FV().log("NotificationChannel InternalFetch: Request failed",{...o,status:a,statusText:l}):FV().log("NotificationChannel InternalFetch: Request successful",{...o,status:a}),s},JV=async()=>await YV(`${qV()}/channels`,{method:"GET",headers:{"Content-Type":"application/json"}}),QV=async({attempts:e,delayMs:t})=>{let r;for(let n=0;n<e;n++)try{return void await JV()}catch(o){r=o,n<e-1&&await new Promise(e=>new Wv(e,t))}throw r};let XV;class eW{_log(e,...t){const r={channelId:this.channelInfo?.channelId,readyState:void 0};HV().log(e,r,...t)}constructor(e,t){this.handlerFactory=e,this.externalUserKey=t,this.notificationSource=GV.WEBSOCKET,this.notificationHandler=null,this.started=!1,this.verifyOnlineStatusTimer=null,this.isUpdatingLifetime=!1,this.handleWindowOnlineEvent=()=>{this._log("Window Online"),QV({attempts:10,delayMs:750}).then(()=>{this.notificationHandler?.resume(),FV().log("WebSocket:You are now connected to the network")}).catch(()=>{FV().error("WebSocket:Too many attempt trying to retrieve the internet connection")})},this.handleWindowOfflineEvent=()=>{this._log("Window Offline"),this.notificationHandler?.pause();
3079const e=new CloseEvent("close",{code:4e3,reason:"ERR_INTERNET_DISCONNECTED: No Internet"});this.emitter.emit(DV.CLOSE,e)},this.handleCloseEvent=()=>{this.watchForBackOnline()},this.handleRestartRequiredEvent=e=>{FV().error("WebSocket:Restart Required",e),this.internalRestart()},this.handleUpdateChannelLifetime=async()=>{if(!this.isUpdatingLifetime){this.isUpdatingLifetime=!0;try{const e=await(async(e,t)=>await YV(`${qV()}/channels/${e}/${t}/channel-lifetime`,{method:"PUT",headers:{"Content-Type":"application/json"}}).then(e=>e.json()))(this.externalUserKey,this.id);this.notificationHandler?.updateChannelInfo(e),FV().log("WebSocket:Lifetime updated")}catch(e){FV().error("WebSocket:Lifetime failed to update",e),this.internalRestart()}finally{this.isUpdatingLifetime=!1}}},this._log("NC Created"),this.emitter=(XV||(XV=new Dv.c0.EventEmitter),XV),this.emitter.addListener(DV.CLOSE,this.handleCloseEvent),this.emitter.addListener(DV.UPDATE_CHANNEL_LIFETIME,this.handleUpdateChannelLifetime),this.emitter.addListener(DV.RESTART_REQUIRED,this.handleRestartRequiredEvent)}start(){this.started=!0,this._log("NC Start"),this.destroyChannelInfo(),this.initializeHandler().then(()=>{this.notificationHandler?.connect()}).catch(()=>{FV().error("WebSocket:Failed to initialize notification channel, scheduling restart"),new Wv(this.internalRestart.bind(this),4e3)})}get channelInfo(){return this.notificationHandler?.channelInfo}get isStarted(){return this.started}get isConnected(){return!!this.notificationHandler?.isConnected}get id(){return this.notificationHandler?.channelInfo.channelId??""}setNotificationSource(e){switch(this.clearHandler(),this.notificationSource=e,this.notificationSource){case GV.WEBSOCKET:this.handlerFactory=WV;break;case GV.PUSH:throw new Error("push notification are not supported yet")}this.initializeHandler()}addListener(e,t){this.emitter.addListener(e,t)}removeListener(e,t){this.emitter.removeListener(e,t)}async initializeHandler(){this._log("Initialize handler"),this.clearHandler();const e=await(async e=>await YV(`${qV()}/channels/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({channelLifetime:3600})}).then(e=>e.json()))(this.externalUserKey),t={channelId:e?.channelId,readyState:void 0};HV().log("Initialize handler channel info",t),this.notificationHandler=this.handlerFactory({channelInfo:e,emitter:this.emitter}),window.addEventListener("online",this.handleWindowOnlineEvent),window.addEventListener("offline",this.handleWindowOfflineEvent)}internalRestart(){this._log("NC internal restart"),this.clearHandler(),this.start()}clearHandler(){this.notificationHandler&&this._log("Clear handler"),this.notificationHandler?.delete(),this.verifyOnlineStatusTimer?.stop(),this.verifyOnlineStatusTimer=null,window.removeEventListener("online",this.handleWindowOnlineEvent),window.removeEventListener("offline",this.handleWindowOfflineEvent)}watchForBackOnline(){this.verifyOnlineStatusTimer||this.scheduleBackOnlineCheck()}scheduleBackOnlineCheck(){this.verifyOnlineStatusTimer=new Wv(async()=>{if(this.verifyOnlineStatusTimer=null,window.navigator.onLine)try{await QV({attempts:1,delayMs:0}),FV().log("WebSocket:Back online, restart required"),this._log("Back online restart required"),this.emitter.emit(DV.RESTART_REQUIRED)}catch{this.scheduleBackOnlineCheck()}else this.scheduleBackOnlineCheck()},4e3)}destroyChannelInfo(){this.channelInfo&&this.channelInfo.channelId&&(this._log("destroy channel info"),(async(e,t)=>await YV(`${qV()}/channels/${e}/${t}`,{method:"DELETE"}))(this.externalUserKey,this.channelInfo.channelId).catch(e=>{FV().error("WebSocket:Failed to remove previous notification channel",e)}))}}var tW,rW,nW=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},oW=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class iW{constructor(e){if(tW.set(this,void 0),rW.set(this,void 0),nW(this,tW,e,"f"),!oW(this,tW,"f").baseURL)throw new Error("GotoNotificationChannel: You need to provide a base URL");if(!oW(this,tW,"f").tokenResolver)throw new Error("GotoNotificationChannel: You need to provide a tokenResolver");if(!oW(this,tW,"f").userKey)throw new Error("GotoNotificationChannel: You need to provide an userKey");(e=>{KV=e})(oW(this,tW,"f").baseURL),(e=>{ZV=e})(oW(this,tW,"f").tokenResolver),(e=>{zV=e})(oW(this,tW,"f").logger);const t=oW(this,tW,"f").factory??WV;nW(this,rW,new eW(t,oW(this,tW,"f").userKey),"f")}get id(){return oW(this,rW,"f").id}get channelInfo(){return oW(this,rW,"f").channelInfo}get isStarted(){return oW(this,rW,"f").isStarted}get isConnected(){return!!oW(this,rW,"f").isConnected}start(){oW(this,rW,"f").start()}addListener(e,t){return oW(this,rW,"f").addListener(e,t)}removeListener(e,t){return oW(this,rW,"f").removeListener(e,t)}}tW=new WeakMap,rW=new WeakMap;const sW=()=>new Promise((e,t)=>
3079{(0,Dv.c1)().then(r=>{r?.access_token?e(r.access_token):t()}).catch(t)});class aW{constructor(e){this.notificationChannel=e,this.notificationNamespace=(0,Dv.au)().register(Dv.r,Dv.N),this.addListeners()}get id(){return this.notificationChannel.id}get channelInfo(){return this.notificationChannel.channelInfo}get isStarted(){return this.notificationChannel.isStarted}get isConnected(){return this.notificationChannel.isConnected}start(){this.notificationChannel.start()}addListener(e,t){this.notificationChannel.addListener(e,t)}removeListener(e,t){this.notificationChannel.removeListener(e,t)}subscribe(e){this.notificationChannel.addListener(DV.MESSAGE,e)}unsubscribe(e){this.notificationChannel.removeListener(DV.MESSAGE,e)}addListeners(){this.notificationChannel.addListener(DV.OPEN,this.handleOpenEvent.bind(this)),this.notificationChannel.addListener(DV.CLOSE,this.handleCloseEvent.bind(this)),this.notificationChannel.addListener(DV.MESSAGE,this.handleMessageEvent.bind(this)),this.notificationChannel.addListener(DV.ERROR,this.handleErrorEvent.bind(this))}handleOpenEvent(){const e={callbackURL:this.channelInfo?.callbackURL??"",channelId:this.channelInfo?.channelId??"",channelLifetime:this.channelInfo?.channelLifetime??0};this.notificationNamespace.emit.connected(e)}handleCloseEvent(e){this.notificationNamespace.emit.disconnected(e),(0,Dv.g)().error(e)}handleMessageEvent(e){this.notificationNamespace.emit.message(e)}handleErrorEvent(e){(0,Dv.g)().error("WebSocket:Error",e),this.notificationNamespace.emit.error(e)}}class lW extends aW{constructor(){super(...arguments),this._id="",this.connectionStatus="disconnected",this.handleNotificationChannelOpenCheckEvent=()=>{this.isConnected&&this.handleOpenEvent()}}addListeners(){super.addListeners();const e=(0,Dv.O)(),t=e=>{switch(e.topic){case"open-check":this.handleNotificationChannelOpenCheckEvent();break;case"open":this.handleNotificationChannelOpenEvent(e);break;case"close":this.handleNotificationChannelCloseEvent(e);break;case"error":this.handleNotificationChannelErrorEvent(e);break;case"message":this.handleNotificationChannelMessageEvent(e)}};e.addCallback("notification-channel",t);const r=t=>{t&&e.send({type:"notification-channel",payload:{topic:"open-check",data:{}}})};r(e.available);const n=e=>{r(e.connectionStatus===Dv.bl.connected)};e.addConnectionCallback(n),(0,Dv.av)(()=>{e.removeCallback("notification-channel",t),e.removeConnectionCallback(n)})}get id(){return this._id}get isConnected(){return"connected"===this.connectionStatus}get channelInfo(){return this._channelInfo}start(){}handleNotificationChannelOpenEvent(e){this.connectionStatus="connected",this._id=e.data.id,this._channelInfo=e.data.channelInfo,super.handleOpenEvent()}handleNotificationChannelCloseEvent(e){this.connectionStatus="disconnected",super.handleCloseEvent(new CloseEvent("close",e.data.error))}handleNotificationChannelErrorEvent(e){super.handleErrorEvent(e.data.event)}handleNotificationChannelMessageEvent(e){super.handleMessageEvent(e.data.message)}}class cW extends aW{addListeners(){super.addListeners(),(0,Dv.O)().addCallback("notification-channel",e=>{"open-check"===e.topic&&this.id&&this.handleOpenEvent()})}handleOpenEvent(){super.handleOpenEvent(),(0,Dv.O)().send({type:"notification-channel",payload:{topic:"open",data:{id:this.id,channelInfo:this.channelInfo}}})}handleCloseEvent(e){super.handleCloseEvent(e),(0,Dv.O)().send({type:"notification-channel",payload:{topic:"close",data:{error:e}}})}handleMessageEvent(e){super.handleMessageEvent(e),(0,Dv.O)().send({type:"notification-channel",payload:{topic:"message",data:{message:e}}})}handleErrorEvent(e){super.handleErrorEvent(e),(0,Dv.O)().send({type:"notification-channel",payload:{topic:"error",data:{event:e}}})}}const dW=e=>{const t={userKey:e,baseURL:(0,Dv.an)().notificationChannelUrl,tokenResolver:sW,logger:(0,Dv.g)()};return(e=>(0,Dv.O)().isIntegration&&(0,Dv.b_)()?new lW(e):(0,Dv.O)().isCompanion?new cW(e):new aW(e))(new iW(t))};let uW;class hW extends Error{constructor(e,t,r,n=""){super(),this.key=e,this.actualType=t,this.expectedType=r,this.message=n}}const pW=()=>(uW||(uW={queryInterface:e=>{const t=(0,Dv.bJ)().getExtensions().reduce((t,r)=>{if((0,Dv.c2)(r)&&r.supportsInterface(e)){const n=r.queryInterface(e);("string"==typeof e||((e,t,r)=>{try{const r=(e=>{if("string"==typeof e)return{};{const t={...e};return delete t.uid,t}})(t);(0,Dv.c3)(e,r)}catch(e){const n=`The extension (${r.id}) is not compliant with the ShellExtension interface (uid: '${(e=>"string"==typeof e?e:e.uid)(t)}'). The implementation ${e.key} type should be ${e.expectedType} instead of ${e.actualType}.`;return(0,Dv.g)().error(new hW(e.key,e.actualType,e.expectedType,n)),!1}return!0})(n,e,r))&&t.push({impl:n,extension:r})}return t},[]);return Promise.resolve(t)},getModules:e=>(0,Dv.bJ)().getModules(e),isStandaloneRoute:e=>(0,Dv.bJ)().isStandaloneRoute(e),isExtensionReady:e=>(0,Dv.bJ)().isExtensionReady(e),onExtensionReady:e=>(0,Dv.bJ)().onExtensionReady(e)}),uW);class gW{canHandleEvent(e,t){return e===Dv.c4&&this.isEventInDisplayNotification(t)}canForwardToCompanion(e,t,r){return!r.target}canForwardToIntegration(e,t,r){return!r.target||(0,Dv.c5)(r.target)}toEventBusEventPayload(e){const{isMainWindow:t,...r}=e;return t?{...r,target:window.document.defaultView}:r}toMessageEventPayload(e){const{target:t,...r}=e;return{...r,isMainWindow:!(!t||!(0,Dv.c5)(t))}}isEventInDisplayNotification(e){return-1!==Object.keys(Dv.c6).findIndex(t=>t===e)}}class fW{constructor(e){this.strategies=[];const t=({namespace:t,eventName:r,args:n,callerId:o})=>{const i=this.getStrategy({namespace:t,eventName:r,eventPayload:n}).toEventBusEventPayload(n);e.emitEvent(t,r,i,o)};(0,Dv.O)().addCallback("eventbus",t),(0,Dv.av)(()=>{(0,Dv.O)().removeCallback("eventbus",t)})}addStrategy(e){this.strategies.push(e)}removeStrategy(e){const t=this.strategies.indexOf(e);-1!==t&&this.strategies.splice(t,1)}canHandleEvent(e,t,r){return!0}handleEvent(e,t,r){const n=this.getStrategy({namespace:e,eventName:t,eventPayload:r});
3079if(this.shouldSendToExternalInterface(n,e,t,r)){const o={type:"eventbus",payload:{namespace:e,eventName:t,args:n.toMessageEventPayload(r)}};(0,Dv.O)().send(o)}}canForwardToCompanion(e,t,r){return(0,Dv.c7)().reduce((r,n)=>n.namespace===e?!n.eventNames||!n.eventNames.length||!!n.eventNames.find(e=>e===t):r,!1)}canForwardToIntegration(e,t,r){return!0}toEventBusEventPayload(e){return e}toMessageEventPayload(e){return e}getStrategy(e){return this.strategies.find(t=>t.canHandleEvent(e.namespace,e.eventName,e.eventPayload))??this}shouldSendToExternalInterface(e,t,r,n){return(0,Dv.O)().isCompanion?e.canForwardToIntegration(t,r,n):!!(0,Dv.O)().isIntegration&&e.canForwardToCompanion(t,r,n)}}const mW=e=>{const t=new fW(e),r=new gW;t.addStrategy(r),e.setEventAdapter(t),(0,Dv.av)(()=>{t.removeStrategy(r),e.removeEventAdapter()})};class vW{constructor(e){this.presenceService=e,this.subscriptions=new Map,this.handlePresenceServiceEvents=async e=>{switch(e.topic){case"subscribe":{const t=e;await this.subscribe(t.data.externalUserKey).catch(()=>{}),this.send({topic:"subscribe-response",data:{requestId:t.data.requestId}});break}case"get-user-presence":{const t=await this.getUserPresence().catch(()=>{});this.send({topic:"get-user-presence-response",data:{requestId:e.data.requestId,presence:t}});break}case"set-user-presence":{const t=e,r=await this.setUserPresence(t.data.presence).catch(()=>{});this.send({topic:"set-user-presence-response",data:{requestId:t.data.requestId,presence:r}});break}case"get-presence-snapshots":{const t=e,r=await this.getPresenceSnapshots(t.data.externalUserKey).catch(()=>{});this.send({topic:"get-presence-snapshots-response",data:{requestId:t.data.requestId,presenceSnapshot:r}});break}}},this.initEvents(),this.subscribeToCurrentUserPresence()}subscribe(e){return this.presenceService.subscribe(e)}unsubscribe(e){this.presenceService.unsubscribe(e)}getUserPresence(){return this.presenceService.getUserPresence()}setUserPresence(e){return this.presenceService.setUserPresence(e)}getPresenceSnapshots(e){return this.presenceService.getPresenceSnapshots(e)}initEvents(){const e=(0,Dv.O)();e.addCallback("presence-service",this.handlePresenceServiceEvents),(0,Dv.av)(()=>{e.removeCallback("presence-service",this.handlePresenceServiceEvents)})}send(e){(0,Dv.O)().send({type:"presence-service",payload:e})}subscribeToCurrentUserPresence(){(0,Dv.c8)().then(e=>{e&&this.subscribe(e)})}}let bW=1;const yW=()=>(bW++,bW);class wW{constructor(){this.subscriptions=new Map,this.promisesToResolve=new Map,this.handlePresenceServiceEvents=e=>{switch(e.topic){case"subscribe-response":{const t=e;this.resolvePromise(t.data.requestId,void 0);break}case"get-user-presence-response":{const t=e;this.resolvePromise(t.data.requestId,t.data.presence);break}case"set-user-presence-response":{const t=e;this.resolvePromise(t.data.requestId,t.data.presence);break}case"get-presence-snapshots-response":{const t=e;this.resolvePromise(t.data.requestId,t.data.presenceSnapshot);break}}},this.initEvents()}subscribe(e){return new Promise(t=>{const r=this.addPromiseToResolve(t);this.send({topic:"subscribe",data:{requestId:r,externalUserKey:e}})})}unsubscribe(e){const t=yW();this.send({topic:"unsubscribe",data:{requestId:t,externalUserKey:e}})}getUserPresence(){return new Promise(e=>{const t=this.addPromiseToResolve(e);this.send({topic:"get-user-presence",data:{requestId:t}})})}setUserPresence(e){return new Promise(t=>{const r=this.addPromiseToResolve(t);this.send({topic:"set-user-presence",data:{requestId:r,presence:e}})})}getPresenceSnapshots(e){return new Promise(t=>{const r=this.addPromiseToResolve(t);this.send({topic:"get-presence-snapshots",data:{requestId:r,externalUserKey:e}})})}initEvents(){const e=(0,Dv.O)();e.addCallback("presence-service",this.handlePresenceServiceEvents),(0,Dv.av)(()=>{e.removeCallback("presence-service",this.handlePresenceServiceEvents)})}send(e){(0,Dv.O)().send({type:"presence-service",payload:e})}resolvePromise(e,t){const r=this.promisesToResolve.get(e);r&&(r.resolve(t),this.promisesToResolve.delete(e))}addPromiseToResolve(e){const t=yW();return this.promisesToResolve.set(t,{resolve:e}),t}}class xW{constructor(e){this.apiBaseUrl=e,this.endpoints={presence:`${this.apiBaseUrl}/presence`,subscriptions:`${this.apiBaseUrl}/subscriptions`,subscriptionsById:e=>`${this.apiBaseUrl}/subscriptions/${e}`,userPresence:`${this.apiBaseUrl}/user-presence`}}getUserPresence(){return(0,Dv.y)(this.endpoints.userPresence,{method:"GET"})}setUserPresence(e){return(0,Dv.y)(this.endpoints.userPresence,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}getPresence(e){const t=new URLSearchParams;
3079return e.forEach(e=>t.append("userKey",e)),(0,Dv.y)(`${this.endpoints.presence}?${t.toString()}`,{method:"GET"})}createSubscription(e){return(0,Dv.y)(this.endpoints.subscriptions,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(async e=>await e.json())}deleteSubscriptionByChannelId(e){return(0,Dv.y)(`${this.endpoints.subscriptions}?channelId=${e}`,{method:"DELETE",retry:{maxRetryNumber:3,retryAfterInMilliseconds:300}})}deleteSubscriptionBySubscriptionId(e){return(0,Dv.y)(this.endpoints.subscriptionsById(e),{method:"DELETE"})}}const _W=e=>{if((0,Dv.O)().isIntegration&&(0,Dv.b_)())return new wW;const t=new xW((0,Dv.an)().presenceServiceUrl),r=new Bb(t,e);return(0,Dv.O)().isCompanion?new vW(r):r},kW=e=>({hasPrerequisites:Dv.ci,policyDecisionPoint:(0,Dv.cj)(e)});var CW=Object.defineProperty,SW=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&CW(t,r,i),i};const EW=class extends Dv.bP{constructor(){super(...arguments),this.searchString="",this.searchResult={title:"",preview:"",subtitle:"",userKey:"",icon:"",detailInfo:"",detailIcon:"",actions:[],originalResult:{},defaultAction:{}},this.hasDeleteAction=!1}static get styles(){return(0,Dv.ck)(":host{display:flex;cursor:pointer}:host(:hover),:host(:focus){background-color:var(--goto-background-color-default)}:host(:hover) .search-result-preview-actions,:host(:focus) .search-result-preview-actions,:host(.selected) .search-result-preview-actions{display:flex;max-width:100%}.search-result-preview-actions{display:none;max-width:0;padding-right:var(--goto-spacing-02)}.search-result-preview-item{margin:0 var(--goto-spacing-02) var(--goto-spacing-02) var(--goto-spacing-02);border:1px solid var(--goto-border-color-secondary);border-radius:var(--goto-radius-small)}.search-result-preview-item,.search-result-preview-item goto-search-result-item{display:flex;width:100%}.search-result-preview-item goto-search-result-item{background-color:transparent;border:none}.search-result-preview-item:hover,:host(.selected) .search-result-preview-item{background-color:var(--goto-interactive-color-secondary-hover);border:1px solid var(--goto-interactive-color-secondary-hover)}.search-result-preview-item:active,.search-result-preview-item:focus{background-color:var(--goto-surface-color-secondary);border:1px solid var(--goto-surface-color-secondary)}")}handlePreviewItemActionClick(e){e.stopPropagation(),this.dispatchEvent(new Event("preview-item-action-click")),(0,Dv.cl)({resultItem:this.searchResult.originalResult})}renderPreviewActions(){return Dv.aH` ${this.searchResult.actions.length||this.hasDeleteAction?Dv.aH`<div class="search-result-preview-actions">
3080          <goto-global-search-actions
3081            @click=${this.handlePreviewItemActionClick}
3082            .actions=${this.searchResult.actions}
3083            .originalResult=${this.searchResult.originalResult}
3084            searchString=${this.searchString}
3085            .hasDeleteAction=${this.hasDeleteAction}
3086            @delete-history-item-click=${e=>this.dispatchEvent(e)}
3087          ></goto-global-search-actions>
3088        </div>`:Dv.cm}`}render(){return Dv.aH`<div role="tab" tabindex="-1" class="search-result-preview-item">
3089      <goto-search-result-item .searchResult=${this.searchResult} .searchString=${this.searchString}>
3090      </goto-search-result-item>
3091      ${this.renderPreviewActions()}
3092    </div>`}};EW.tagName="goto-search-result-preview-item";let IW=EW;SW([(0,Dv.cn)({type:String})],IW.prototype,"searchString"),SW([(0,Dv.cn)({type:Object})],IW.prototype,"searchResult"),SW([(0,Dv.cn)({type:Boolean})],IW.prototype,"hasDeleteAction");var AW=Object.defineProperty,TW=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&AW(t,r,i),i};const OW=class extends Dv.co{constructor(){super(...arguments),this.externalUserKey="",this.pbxs=[],this.pbxId=""}static get styles(){return(0,Dv.ck)(".vertical-divider{border-left:1px solid var(--goto-border-color-default);height:var(--goto-spacing-06);margin-left:var(--goto-spacing-02);margin-right:var(--goto-spacing-05)}.account-switcher{--max-height: calc(100vh - 60px) ;align-items:center;display:flex}")}firstUpdated(e){super.firstUpdated(e),this.externalUserKey=(0,Dv.Z)()?.user?.key??"",this.pbxs=(0,Dv.cp)(),this.setSelectedAccountKey()}setSelectedAccountKey(){const e=(0,Dv.Z)().context.account?.key,t=this.pbxs[0],r=this.pbxs.some(t=>t.accountKey===e);this.selectedAccountKey=r?e:t?.accountKey}getSelectedAccountName(){return this.pbxs.find(e=>e.accountKey===this.selectedAccountKey)?.name??""}renderOption(e){return Dv.aH` <chameleon-option value=${(0,Dv.cq)(e.accountKey)}>${e.name}</chameleon-option>`}handleAccountChange(e){(0,Dv.cr)().track("GoTo > Account Switcher",{action:"select"});const t=e.target.value;let r="";if(t){if((0,Dv.Z)().context.account?.updateAccountKey(t),this.pbxs.length>0){const e=this.pbxs.find(e=>e.accountKey===t);this.pbxId=e?.id??"",r=e?.userInfo?.userId??"";const n=(0,Dv.Z)();n.context.pbx?.updateId(this.pbxId),n.context.pbx?.updateUserId(r)}else this.pbxId="";this.selectedAccountKey=t;const e={accountKey:t,accountName:this.getSelectedAccountName(),pbxId:this.pbxId,pbxUserId:r,externalUserKey:this.externalUserKey};(0,Dv.ab)(e)}}render(){return this.pbxs.length>1?Dv.aH` <div class="account-switcher">
3093          ${(0,Dv.bB)()||(0,Dv.cs)()===Dv.p.SIDE_PANEL||(0,Dv.O)().isIntegration?Dv.cm:Dv.aH`<div class="vertical-divider"></div>`}
3094          <chameleon-select
3095            ?fit-content=${!(0,Dv.O)().isIntegration}
3096            ?fullwidth=${(0,Dv.O)().isIntegration}
3097            no-border
3098            selected-value=${(0,Dv.cq)(this.selectedAccountKey)}
3099            @change=${this.handleAccountChange}
3100          >
3101            ${Nb(this.pbxs,this.renderOption)}
3102          </chameleon-select>
3103        </div>`:Dv.cm}};OW.tagName="goto-account-switcher";let LW=OW;TW([(0,Dv.ct)()],LW.prototype,"externalUserKey"),TW([(0,Dv.ct)()],LW.prototype,"pbxs"),TW([(0,Dv.ct)()],LW.prototype,"pbxId"),TW([(0,Dv.cn)({type:String,attribute:"selected",reflect:!0})],LW.prototype,"selectedAccountKey");var $W=Object.defineProperty,NW=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&$W(t,r,i),i};const RW=[{value:"off",labelKey:(0,Dv.cu)("Launch manually")},{value:"foreground",labelKey:(0,Dv.cu)("Launch in foreground")},{value:"background",labelKey:(0,Dv.cu)("Launch in background"),canShow:()=>!!Dv.cf.containerSettings?.getMinimizedAtLogin}],PW=class extends Dv.co{constructor(){super(...arguments),this.isOpenContainerAtStartupDisabled=!0,this.appLaunchSelectValue=void 0}static get styles(){return(0,Dv.ck)(".settings-wrapper{display:flex;flex-direction:column;min-height:100%}.settings-header{border-bottom:1px solid var(--goto-border-color-default);padding:32px 32px 16px}.settings-container{max-width:720px;min-width:260px;padding:0 32px 32px}.top-settings{padding-top:var(--goto-layout-01)}.settings-section-container{margin-bottom:var(--goto-spacing-06);margin-top:var(--goto-spacing-06)}.settings-section-container .default-content{display:flex;flex-direction:column;gap:var(--goto-spacing-01)}.settings-section-container .settings-section-child-right{margin-top:var(--goto-spacing-06)}.select-skeleton{width:250px}")}async connectedCallback(){super.connectedCallback(),await this.initValues()}disconnectedCallback(){super.disconnectedCallback()}async initValues(){this.isOpenContainerAtStartupDisabled=!(0,Dv.bB)()||!Dv.bz.isPluginAvailable("ContainerSettings");const e=await(Dv.cf.containerSettings?.getOpenAtLogin?.())??!1,t=await(Dv.cf.containerSettings?.getMinimizedAtLogin?.())??!1;this.setAppLaunchSelectedValue(e,t)}setAppLaunchSetting(e){Dv.cf.containerSettings.setOpenAtLogin?.("foreground"==e||"background"==e),Dv.cf.containerSettings.setMinim
3103izedAtLogin?.("background"==e)}setAppLaunchSelectedValue(e,t){this.appLaunchSelectValue=e&&t?"background":e&&!t?"foreground":"off"}getAppLaunchSelectOptions(){const e=[];return RW.forEach(t=>{(!t.canShow||t.canShow())&&e.push(Dv.aH`<chameleon-option value=${t.value}>${(0,Dv.bQ)(t.labelKey)}</chameleon-option>`)}),e}async handleAppLaunchChangeEvent(){const e=this.appLaunchSelect?.value??"off";this.setAppLaunchSetting(e)}getAppLaunchSelect(){return this.appLaunchSelectValue?Dv.aH` <chameleon-select
3104          id="App-launch-select"
3105          selected-value=${this.appLaunchSelectValue}
3106          ?disabled=${this.isOpenContainerAtStartupDisabled}
3107          @change=${this.handleAppLaunchChangeEvent}
3108        >
3109          ${this.getAppLaunchSelectOptions()}
3110        </chameleon-select>`:Dv.aH`<div class="select-skeleton"><chameleon-skeleton variant="rectangle"></chameleon-skeleton></div>`}render(){return Dv.aH`
3111      <div class="settings-wrapper">
3112        <div class="settings-header">
3113          <chameleon-typography tag="h1" variant="heading-large">${(0,Dv.bQ)("App launch")} </chameleon-typography>
3114        </div>
3115        <div class="settings-container">
3116          <div class="top-settings">
3117            <chameleon-typography tag="p" variant="body-medium"
3118              >${(0,Dv.bQ)("Configure app launch settings")}
3119            </chameleon-typography>
3120          </div>
3121          <div class="settings-section-container">
3122            <div class="default-content">
3123              <chameleon-typography class="content-headers" tag="p" variant="body-large"
3124                >${(0,Dv.bQ)("Launch the GoTo app when computer starts")}
3125              </chameleon-typography>
3126              <chameleon-typography
3127                class="content-description"
3128                tag="p"
3129                variant="caption-medium"
3130                color="type-color-secondary"
3131              >
3132                ${(0,Dv.bQ)("Choose how to launch the GoTo App when your computer starts.")}
3133              </chameleon-typography>
3134            </div>
3135            <div class="settings-section-child-right">${this.getAppLaunchSelect()}</div>
3136          </div>
3137        </div>
3138      </div>
3139    `}};PW.tagName="goto-app-launch-settings";let DW=PW;NW([(0,Dv.ct)()],DW.prototype,"isOpenContainerAtStartupDisabled"),NW([(0,Dv.ct)()],DW.prototype,"appLaunchSelectValue"),NW([(0,Dv.bS)("#App-launch-select")],DW.prototype,"appLaunchSelect");var MW=Object.defineProperty;const zW=class extends Dv.bP{constructor(){super(...arguments),this.appSwitcherMenuItems=[]}static get styles(){return(0,Dv.ck)(":host{width:100%}.menu-trigger{align-items:center;display:flex;justify-content:center;width:100%;background:none;border:none}.app-switcher-popover-menu{border-radius:var(--goto-radius-small)}chameleon-svg{--goto-icon-size: 24px}")}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",e=>this.handleKeyDown(e))}disconnectedCallback(){this.removeEventListener("keydown",e=>this.handleKeyDown(e)),super.disconnectedCallback()}handleKeyDown(e){("Enter"===e.code||"Space"===e.code)&&this.toggleIsOpenAttribute()}toggleIsOpenAttribute(){const e=this.shadowRoot?.querySelector(".popover-menu");null===e?.getAttribute("is-open")&&e?.setAttribute("is-open","true")}async firstUpdated(e){super.firstUpdated(e);const t=await this.getApplications();this.setAppSwitcherMenuItems(t),t.length>0&&this.subscribeToLocaleChange(t)}subscribeToLocaleChange(e){const{localeChanged:t}=(0,Dv.au)().subscribeTo("I18N"),r=()=>{this.setAppSwitcherMenuItems(e)};t.on(r),this.unsubscribeFunctions.push(()=>{t.removeListener(r)})}setAppSwitcherMenuItems(e){this.appSwitcherMenuItems=this.getAppSwitcherMenuItems(e)}async getApplications(){let e=[];try{if("rc"===(0,Dv.an)().environment)throw"rc not set up";const t=(await(await(0,Dv.y)(`${(0,Dv.ao)()}/applications/v1/applications`,{credentials:void 0})).json()).items;e=Array.isArray(t)?t:[]}catch(e){(0,Dv.g)().error("could not fetch Applications",e)}return e}getAppSwitcherMenuItems(e){return e.map(e=>({text:this.getLocalizedAppName(e),href:e.url,isExternalLink:!0,dataTest:e.id.toLowerCase(),origin:"App Switcher"}))}getLocalizedAppName(e){return((t=>
3139e.localizedDetails.find(e=>e.language.replace("-","_")===t))((0,Dv.L)())??e.localizedDetails[0]).name}render(){return this.appSwitcherMenuItems.length>0?Dv.aH` <chameleon-typography
3140            class="menu-trigger"
3141            id="app-switcher-trigger"
3142            aria-label=${(0,Dv.bQ)("App Switcher")}
3143            data-testid="app-switcher"
3144            tag="p"
3145            variant="body-small"
3146          >
3147            <chameleon-svg> ${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M4 4H8V8H4V4ZM4 10H8V14H4V10ZM8 16H4V20H8V16ZM10 4H14V8H10V4ZM14 10H10V14H14V10ZM10 16H14V20H10V16ZM20 4H16V8H20V4ZM16 10H20V14H16V10ZM20 16H16V20H20V16Z" fill="currentColor"></path></svg>')}</chameleon-svg>
3148          </chameleon-typography>
3149          <chameleon-popover
3150            class="popover-menu"
3151            position="right-end"
3152            arrow=""
3153            menu
3154            z-index="70"
3155            trigger-id="app-switcher-trigger"
3156            label=${(0,Dv.bQ)("App Switcher Popover")}
3157          >
3158            <goto-popover-menu .menuItems=${this.appSwitcherMenuItems} class="app-switcher-popover-menu">
3159            </goto-popover-menu>
3160          </chameleon-popover>`:Dv.cm}};zW.tagName="goto-app-switcher";let FW=zW;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&MW(t,r,o)})([(0,Dv.ct)()],FW.prototype,"appSwitcherMenuItems");var UW=(e=>(e.SMALL="small",e.MEDIUM="medium",e.LARGE="large",e.X_LARGE="xlarge",e))(UW||{});async function BW(e="",t=""){const r=Date.now();let n,o="";if(e)n=(e=>(t=UW.SMALL)=>`${(0,Dv.an)().avatarBaseUrl}/${e}_${t}.jpg`)(e),jW(n(),e)&&(HW(n()),o=`?cacheBuster=${r}`);else{if(!t)throw new Error("Cannot get avatar without a user key or email address");n=(e=>(t=UW.SMALL)=>`${(0,Dv.an)().avatarBaseUrl}/emails/${e}/${t}.jpg`)(t),jW(n(),void 0,t)&&(HW(n()),o=`?cacheBuster=${r}`)}const{headers:i}=await fetch(`${n()}`+o,{method:"GET",cache:"no-store"});return{isDefault:"default"===i.get("x-amz-meta-type"),urlSmall:n(UW.SMALL),urlMedium:n(UW.MEDIUM),urlLarge:n(UW.LARGE),urlXLarge:n(UW.X_LARGE)}}const HW=e=>{const t=KW(e);(0,Dv.aW)(t,Date.now().toString())},jW=(e,t,r)=>VW(t,r)&&WW(e),VW=(e,t)=>e?zb(e):t?(0,Dv.cw)(t):void 0,WW=e=>{const t=KW(e),r=(0,Dv.aZ)(t);return!r||Date.now()-parseInt(r,10)>3e5},KW=e=>`avatar-timestamp-${e}`,qW=["goto-avatar-color-00","goto-avatar-color-01","goto-avatar-color-02","goto-avatar-color-10","goto-avatar-color-11","goto-avatar-color-12","goto-avatar-color-20","goto-avatar-color-21","goto-avatar-color-22","goto-avatar-color-30","goto-avatar-color-31","goto-avatar-color-32","goto-avatar-color-40","goto-avatar-color-41","goto-avatar-color-42","goto-avatar-color-50","goto-avatar-color-51","goto-avatar-color-52"];var GW=Object.defineProperty,ZW=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&GW(t,r,i),i};const YW=class extends Dv.bP{constructor(){super(...arguments),this.showPresence=!1,this.hidePresenceTooltip=!1,this.usePresenceSnapshot=!1,this.givenName="",this.familyName="",this.profileImageUrl="",this.externalUserKey=void 0,this.icon="",this.emailAddress="",this.onClick=Dv.cx}static get styles(){return(0,Dv.ck)(":host{outline:none;display:flex}:host chameleon-avatar{border:none}:host goto-presence-indicator:focus{outline:none}")}connectedCallback(){super.connectedCallback(),this.getAvatar()}update(e){e.get("avatar")||this.getAvatar(),super.update(e)}createRenderRoot(){return this.attachShadow({mode:"open",delegatesFocus:!0})}get computedLabel(){return this.label?this.label:this.givenName||this.familyName?(0,Dv.cz)({givenName:this.givenName,familyName:this.familyName}):void 0}getFirstChar(e){return e?.trim().charAt(0)}getInitials(){const e=this.givenName??"",t=this.familyName??"";return`${this.getFirstChar(e)}${this.getFirstChar(t)}`.toUpperCase()}get avatarColorToken(){const e=this.givenName??"",t=this.familyName??"",r=this.externalUserKey?this.externalUserKey:e+t;if("primary"===this.variant&&(e||t)&&r)return(e=>qW[(e=>{let t=0;for(let r=0;r<e.length;r++)t+=e.charCodeAt(r);return t})(e??"")%qW.length])(r)}getFallbackAvatar(){return this.givenName||this.familyName?this.getInitials():this.getPersonIconTemplate()}async getProfileImageUrl(e="",t){const{urlMedium:r,isDefault:n=!0}
3160=await BW(e,t);if(n)throw"using default";return r}async getAvatar(){if(this.profileImageUrl||this.externalUserKey||this.emailAddress)try{const e=this.profileImageUrl||await this.getProfileImageUrl(this.externalUserKey,this.emailAddress);this.avatar=this.createImage(e)}catch{this.avatar=this.getFallbackAvatar()}else this.avatar=this.getFallbackAvatar()}createImage(e){const t=(0,Dv.bL)().createElement("img");return t.alt=`${this.givenName} ${this.familyName}`,t.src=e,t.onerror=()=>this.avatar=this.getFallbackAvatar(),t}getPersonIconTemplate(){return Dv.aH`<chameleon-svg data-test-person-icon> ${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M15 7C15 8.65685 13.6569 10 12 10C10.3431 10 9 8.65685 9 7C9 5.34315 10.3431 4 12 4C13.6569 4 15 5.34315 15 7ZM17 7C17 9.76142 14.7614 12 12 12C9.23858 12 7 9.76142 7 7C7 4.23858 9.23858 2 12 2C14.7614 2 17 4.23858 17 7ZM12 13C7.71683 13 4.13247 15.992 3.22302 20C3.07706 20.6432 3 21.3126 3 22H5C5 18.134 8.13401 15 12 15C15.866 15 19 18.134 19 22H21C21 21.3126 20.9229 20.6432 20.777 20C19.8675 15.992 16.2832 13 12 13Z" fill="currentColor"></path></svg>')} </chameleon-svg>`}render(){return Dv.aH`
3161      <chameleon-avatar
3162        size=${(0,Dv.cq)(this.size)}
3163        type=${(0,Dv.cq)(this.type)}
3164        @click=${this.onClick}
3165        data-testid="avatar"
3166        variant=${(0,Dv.cq)(this.variant)}
3167        color-token=${(0,Dv.cq)(this.avatarColorToken)}
3168        label=${(0,Dv.cq)(this.computedLabel)}
3169      >
3170        ${this.icon?Dv.aH`<chameleon-svg>${(0,Dv.bR)(this.icon)}</chameleon-svg>`:this.avatar}
3171        ${this.iconBadge?Dv.aH`<chameleon-icon-badge size="small" slot="badge" label=${this.iconBadge}></chameleon-icon-badge>`:Dv.cm}
3172        ${this.showPresence&&this.externalUserKey?Dv.aH`<goto-presence-indicator
3173              tabindex="-1"
3174              slot="presence"
3175              .externalUserKey=${this.externalUserKey}
3176              .presenceSnapshot=${this.usePresenceSnapshot}
3177              .hidePresenceTooltip=${this.hidePresenceTooltip}
3178            ></goto-presence-indicator>`:Dv.cm}
3179      </chameleon-avatar>
3180    `}};YW.tagName=Dv.cy;let JW=YW;ZW([(0,Dv.bS)("chameleon-avatar")],JW.prototype,"chameleonAvatar"),ZW([(0,Dv.ct)()],JW.prototype,"avatar"),ZW([(0,Dv.cn)({type:Boolean})],JW.prototype,"showPresence"),ZW([(0,Dv.cn)({type:Boolean})],JW.prototype,"hidePresenceTooltip"),ZW([(0,Dv.cn)({type:Boolean})],JW.prototype,"usePresenceSnapshot"),ZW([(0,Dv.cn)({type:String})],JW.prototype,"size"),ZW([(0,Dv.cn)({type:String})],JW.prototype,"type"),ZW([(0,Dv.cn)({type:String})],JW.prototype,"givenName"),ZW([(0,Dv.cn)({type:String})],JW.prototype,"familyName"),ZW([(0,Dv.cn)({type:String})],JW.prototype,"profileImageUrl"),ZW([(0,Dv.cn)({type:String})],JW.prototype,"externalUserKey"),ZW([(0,Dv.cn)({type:String})],JW.prototype,"icon"),ZW([(0,Dv.cn)({type:String})],JW.prototype,"emailAddress"),ZW([(0,Dv.cn)({type:String})],JW.prototype,"variant"),ZW([(0,Dv.cn)({type:String})],JW.prototype,"iconBadge"),ZW([(0,Dv.cn)({type:String})],JW.prototype,"label"),ZW([(0,Dv.cn)({attribute:!1})],JW.prototype,"onClick");const QW="CLOSE_AVATAR_CONTAINER_EVENT";var XW=Object.defineProperty,eK=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&XW(t,r,i),i};const tK=class extends Dv.co{constructor(){super(),this.size=UW.MEDIUM,this.hideAvatarTooltip=!1,this.givenName=(0,Dv.Z)().user.name.givenName??"",this.familyName=(0,Dv.Z)().user.name.lastName??"",this.url=(0,Dv.Z)().user.avatar?.isDefault?"":(0,Dv.Z)().user.avatar?.urlMedium??"",this.externalUserKey=(0,Dv.Z)().user.key??"",this.toolTipLabelKey=(0,Dv.cu)("View profile and more"),this.focusBackToAvatar=(e=!1)=>{e?this.hideAvatarTooltip=!0:(this.renderRoot.querySelector("goto-avatar")?.focus(),this.hideAvatarTooltip=!1)},this.getInitialPopoverFocus=()=>this.avatarPopoverMenu?.getFirstMenuItem(),this.addEventListener(QW,()=>this.closeChameleonPopover())}static get styles(){return(0,Dv.ck)(".avatar-in-topbar{margin-right:-3px}.avatar-in-topbar::part(control){border-width:0px}.avatar-in-topbar::part(control):focus{border-width:1px}:host chameleon-popover{--z-index: 50010}")}handlePopoverChange(e){const{isOpen:t=!1}=e.detail,r=t?"Open":"Close";(0,Dv.cr)().track("GoTo > Avatar menu",{action:"click",event:r}),this.focusBackToAvatar(t)}closeChameleonPopover(){this.chameleonPopover?.close()}render(){return Dv.aH`<goto-user-note-icon
3181        buttonSize="large"
3182        externalUserKey=${this.externalUserKey}
3183        canEditStatus
3184        tooltipZIndex="60000"
3185      ></goto-user-note-icon>
3186
3187      <goto-avatar
3188        type="button"
3189        showPresence
3190        .familyName=${this.familyName}
3191        .givenName=${this.givenName}
3192        .profileImageUrl=${this.url}
3193        .externalUserKey=${this.externalUserKey}
3194        .size=${this.size}
3195        variant="primary"
3196        ?hidePresenceTooltip="${!0}"
3197        id="avatar-popover"
3198        label=${(0,Dv.bQ)("Open user profile menu")}
3199      ></goto-avatar>
3200
3201      <chameleon-tooltip delay="0" position="bottom-end" ?hidden=${this.hideAvatarTooltip} trigger-id="avatar-popover">
3202        ${(0,Dv.bQ)(this.toolTipLabelKey)}
3203      </chameleon-tooltip>
3204
3205      <chameleon-popover
3206        menu
3207        @popoverchange=${this.handlePopoverChange}
3208        .initialFocus=${this.getInitialPopoverFocus}
3209        data-testid="avatar-popover-menu"
3210        trigger-id="avatar-popover"
3211        position="bottom-center"
3212        label=${(0,Dv.bQ)("User profile menu")}
3213      >
3214        <goto-avatar-popover-menu
3215          .familyName=${this.familyName}
3216          .givenName=${this.givenName}
3217          .profileImageUrl=${this.url}
3218        ></goto-avatar-popover-menu>
3219      </chameleon-popover> `}};tK.tagName="goto-avatar-container";let rK=tK;eK([(0,Dv.cn)({type:String})],rK.prototype,"size"),eK([(0,Dv.bS)("chameleon-popover")],rK.prototype,"chameleonPopover"),eK([(0,Dv.bS)("goto-avatar-popover-menu")],rK.prototype,"avatarPopoverMenu"),eK([(0,Dv.ct)()],rK.prototype,"hideAvatarTooltip");var nK,oK,iK=(e=>(e.NORMAL="text",e.SEPARATOR="separator",e.CHECKBOX="checkbox",e.CUSTOM="custom",e))(iK||{}),sK=(e=>(e.SUCCESS="success",e.FAILURE="failure",e))(sK||{}),aK=(e=>
3219(e.TICKET_SUBMIT="GoTo > Ticket Submit",e.TICKET_ERROR="GoTo > Ticket Error",e.TICKET_CANCEL="GoTo > Ticket Cancel",e))(aK||{}),lK=function(){if(oK)return nK;oK=1;var e="object"==typeof Dv.bZ&&Dv.bZ&&Dv.bZ.Object===Object&&Dv.bZ,t="object"==typeof self&&self&&self.Object===Object&&self,r=e||t||Function("return this")(),n=Object.prototype,o=0,i=n.toString,s=r.Symbol,a=s?s.prototype:void 0,l=a?a.toString:void 0;return nK=function(e){var t=++o;return function(e){return null==e?"":function(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==i.call(e)}(e))return l?l.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(e)+t},nK}();const cK=(0,Dv._)(lK),dK=e=>{let t;if(t={data:{type:"incidents",attributes:{title:e.title},relationships:{service:{data:{type:"service",id:e.serviceId}},category:{data:{type:"category",id:e.categoryId}},priority:{data:{type:"priority",id:e.priorityId}}}}},e.date&&(t={...t,data:{...t.data,attributes:{...t.data.attributes,due_date:e.date}}}),e.description){const r=cK().toString();t={...t,data:{...t.data,relationships:{...t.data.relationships,symptoms:{data:{"temp-id":r,type:"symptoms",method:"create"}}}},included:[{"temp-id":r,type:"symptoms",attributes:{note:e.description??"",note_type:"Symptom"}}]}}return e.file&&(t={...t,included:[{...t.included,attributes:{...t.included?.[0]?.attributes,attachments:[{filename:e.file.name,content_type:e.file.type,data:e.file.data}]}}]}),t};let uK;const hK=new Map,pK=async()=>{uK??=(async()=>(await(await(0,Dv.y)(`${(0,Dv.an)().gotoResolveUrl}/incidents/services.json`,{method:"GET",headers:{AccountKey:(0,Dv.Z)()?.context?.account?.key??"","Content-Type":"application/json"},credentials:void 0})).json()).data)();try{return await uK}catch(e){return uK=void 0,(0,Dv.g)().error("Failed to fetch incidents services",e),[]}},gK=async e=>{const t=hK.get(e)??(async e=>(await(await(0,Dv.y)(`${(0,Dv.an)().gotoResolveUrl}/incidents/services.json?include=categories,service_priorities,incident_statuses&service_id=${e}`,{method:"GET",headers:{AccountKey:(0,Dv.Z)()?.context?.account?.key??"","Content-Type":"application/json"},credentials:void 0})).json()).data[0])(e);hK.set(e,t);try{return await t}catch(t){return hK.delete(e),(0,Dv.g)().error(t),{}}},fK=(e,t,r)=>void 0===t?void 0:e.find(e=>r(e).toLowerCase()===t.toLowerCase()),mK={serviceName:void 0,categoryName:void 0,priorityName:void 0,subject:"",description:""};var vK=Object.defineProperty,bK=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&vK(t,r,i),i};const yK=class extends Dv.co{constructor(){super(...arguments),this.selectedFiles=[],this.availableServices=[],this.serviceData={},this.categories=[],this.priorities=[],this.subject="",this.description="",this.selectedServiceId=0,this.selectedCategoryId=0,this.selectedPriorityId=0,this.attachedFileSizeError=!1,this.disableFilePicker=!1,this.isServiceSelected=!1,this.showAlertBox=!1,this.submitted=!1,this.attachmentSizeInBytes=5242880,this.handleFileAttachment=e=>{this.selectedFiles=e.detail.selectedFiles},this.setCategoriesAndPriorities=async e=>{this.serviceData=await gK(e),this.categories=this.serviceData?.categories??[],this.priorities=this.serviceData?.service_priorities??[],this.isServiceSelected=!0}}async firstUpdated(e){super.firstUpdated(e),this.availableServices=await pK(),this.prefill?await this.applyPrefill(this.prefill):1===this.availableServices?.length&&this.setCategoriesAndPriorities(this.availableServices[0].id)}async applyPrefill(e){this.subject=e.subject,this.description=e.description,this.selectedCategoryId=e.categoryId,this.selectedPriorityId=e.priorityId,e.serviceId&&(this.selectedServiceId=e.serviceId,await this.setCategoriesAndPriorities(e.serviceId))}updated(){this.alertBox&&this.alertBox.scrollIntoView()}static get styles(){return(0,Dv.ck)(".incident-spacing{padding-bottom:var(--goto-spacing-06)}.subtitle{padding:var(--goto-spacing-06) 0}.alert-box{margin-top:var(--goto-spacing-02);scroll-margin-top:var(--goto-spacing-02)}.priority-due-date{display:flex;justify-content:space-between;align-items:flex-end}.due-date{width:290px;height:var(--goto-spacing-07);margin-left:var(--goto-spacing-03)}.due-date-label{margin-left:var(--goto-spacing-03)}chameleon-select{width:290px}.file-upload{align-items:flex-start;display:flex;margin-top:var(--goto-spacing-07)}.file-picker-description{margin:var(--goto-spacing-01) 0}.attached-files{align-self:center;margin-left:var(--goto-spacing-04)}.category-priority{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--goto-spacing-03)}")}createCategoryPlaceholder(){const e=document.createElement("chameleon-option");return e.id="category-placeholder",e.value="category-placeholder",e.innerText=(0,Dv.cB)("Not set"),e}createPriorityPlaceholder(){const e=document.createElement("chameleon-option");return e.id="priority-placeholder",e.value="priority-placeholder",e.innerText=(0,Dv.cB)("Not set"),e}async handleSelectService(e){this.selectedServiceId=parseInt(e.target.value),0!=this.selectedServiceId&&(this.servicePlaceholder?.remove(),this.categorySelect&&!this.categoryPlaceholder&&(this.categorySelect.prepe
3219nd(this.createCategoryPlaceholder()),this.selectedCategoryId=0),this.prioritySelect&&!this.priorityPlaceholder&&(this.prioritySelect.prepend(this.createPriorityPlaceholder()),this.selectedPriorityId=0),this.setCategoriesAndPriorities(this.selectedServiceId))}handleCategoryChange(e){this.selectedCategoryId=parseInt(e.target.value),this.categoryPlaceholder?.remove()}handlePriorityChange(e){this.selectedPriorityId=parseInt(e.target.value),this.priorityPlaceholder?.remove()}handleSubjectKeyup(e){this.subject=e.target.value}handleDescriptionKeyup(e){this.description=e.target.value}close(){this.submitted||this.tracking({name:aK.TICKET_CANCEL}),$j().close()}tracking(e){switch(e.name){case aK.TICKET_SUBMIT:return void(0,Dv.cr)().track(e.name,{action:"Click",event:"Submit",ticketPriority:this.selectedPriorityId,ticketCategory:this.selectedCategoryId,ticketDate:this.getDueDate(),ticketTitle:this.subject,ticketDescription:this.description,ticketAttach:this.selectedFiles.length>=1});case aK.TICKET_ERROR:return void(0,Dv.cr)().track(e.name,{event:"Validation error",error:e.payload.message});case aK.TICKET_CANCEL:return void(0,Dv.cr)().track(e.name,{action:"Click",event:"Cancel"})}}renderSubtitle(){return Dv.aH` <chameleon-typography variant="body-medium" class="subtitle"
3220      >${(0,Dv.bQ)("Share any helpful details, and an admin from your organization will get back to you soon.")}</chameleon-typography
3221    >`}renderServices(){return this.availableServices?.length>1?Dv.aH`
3222          <chameleon-select
3223            data-testid="create-incident-service"
3224            label=${(0,Dv.bQ)("Service")}
3225            class="incident-spacing"
3226            selected-value=${(0,Dv.cq)(this.selectedServiceId||void 0)}
3227            @change=${this.handleSelectService}
3228          >
3229            <chameleon-option id="service-placeholder">${(0,Dv.bQ)("Select a service")}</chameleon-option>
3230            ${Nb(this.availableServices,e=>e.name,e=>Dv.aH`<chameleon-option value=${e.id}>${e.name}</chameleon-option>`)}
3231          </chameleon-select>
3232        `:Dv.cm}renderCategoryAndPriority(){return Dv.aH` <div class="category-priority incident-spacing">${this.renderCategory()}${this.renderPriority()}</div>`}renderCategory(){return Dv.aH`
3233      <chameleon-select
3234        disabled=${!this.isServiceSelected}
3235        @change=${this.handleCategoryChange}
3236        selected-value=${(0,Dv.cq)(this.selectedCategoryId)}
3237        data-testid="create-incident-category"
3238        id="create-incident-category"
3239        label=${(0,Dv.bQ)("Category")}
3240        size="medium"
3241        ><chameleon-option id="category-placeholder" value="category-placeholder">${(0,Dv.bQ)("Not set")}</chameleon-option>
3242        ${Nb(this.categories,e=>e.name,e=>Dv.aH`<chameleon-option value=${e.id}>${e.name}</chameleon-option>`)}
3243      </chameleon-select>
3244    `}renderPriority(){return Dv.aH`
3245      <chameleon-select
3246        disabled=${!this.isServiceSelected}
3247        @change=${this.handlePriorityChange}
3248        selected-value=${(0,Dv.cq)(this.selectedPriorityId)}
3249        data-testid="create-incident-priority"
3250        id="create-incident-priority"
3251        label=${(0,Dv.bQ)("Priority")}
3252        size="medium"
3253        ><chameleon-option id="priority-placeholder" value="priority-placeholder">${(0,Dv.bQ)("Not set")}</chameleon-option>
3254        ${Nb(this.priorities,e=>e.description,e=>Dv.aH`<chameleon-option value=${e.id}>${e.description}</chameleon-option>`)}
3255      </chameleon-select>
3256    `}renderSubject(){return Dv.aH`
3257      <chameleon-text-field
3258        disabled=${!this.isServiceSelected}
3259        fullwidth
3260        placeholder="Enter something"
3261        data-testid="create-incident-subject"
3262        class="incident-spacing"
3263        value=${this.subject}
3264        @keyup=${this.handleSubjectKeyup}
3265      >
3266        ${(0,Dv.bQ)("Subject")}*
3267        <span slot="helpertext">Required</span>
3268      </chameleon-text-field>
3269    `}renderAlert(){return this.showAlertBox?Dv.aH` <chameleon-alert variant="danger" class="alert-box">
3270          <chameleon-svg slot="icon">${(0,Dv.bR)(bb)}</chameleon-svg>
3271          ${(0,Dv.bQ)("Couldn't submit your ticket. Go ahead and try again.")}
3272        </chameleon-alert>`:Dv.cm}renderDescription(){return Dv.aH`
3273      <chameleon-text-area
3274        disabled=${!this.isServiceSelected}
3275        fullwidth
3276        resize="vertical"
3277        maxlength="280"
3278        data-testid="create-incident-description"
3279        class="incident-spacing"
3280        value=${this.description}
3281        @keyup=${this.handleDescriptionKeyup}
3282      >
3283        ${(0,Dv.bQ)("Description (Optional)")}
3284      </chameleon-text-area>
3285    `}renderDueDate(){return Dv.aH` <goto-date-picker
3286      ?disabled=${!this.isServiceSelected}
3287      class="incident-spacing"
3288      label=${(0,Dv.bQ)("Needed by (optional)")}
3289      ?requirefuturedate=${!0}
3290    ></goto-date-picker>`}renderFilePickerSection(){return Dv.aH`
3291      <div class="file-upload" data-testid="create-incident-filePicker">
3292        <goto-file-picker
3293          @change=${this.handleFileAttachment}
3294          ?disabled=${this.disableFilePicker||!this.isServiceSelected}
3295        ></goto-file-picker>
3296        ${this.selectedFiles.length>0?this.renderSelectedFileChips():Dv.cm}
3297      </div>
3298      <div class="file-picker-description">${this.renderAttachFileMessage()}</div>
3299    `}renderActionButtons(){return Dv.aH`
3300      <div slot="actions" data-testid="create-incident-actionButtons">
3301        <chameleon-button
3302          class="submit-button"
3303          @click=${()=>this.handleSubmit()}
3304          ?disabled=${this.attachedFileSizeError||!this.isServiceSelected}
3305          >${(0,Dv.bQ)("Submit")}</chameleon-button
3306        >
3307        <chameleon-button data-testid="cancel-button" @click=${()=>this.close()} variant="secondary"
3308          >${(0,Dv.bQ)("Cancel")}</chameleon-button
3309        >
3310      </div>
3311    `}renderAttachFileMessage(){return this.attachedFileSizeError?Dv.aH`<chameleon-typography
3312          data-testid="attached-file-message-error"
3313          variant="caption-medium"
3314          color="type-color-danger"
3315          tag="label"
3316          class="image-upload-description"
3317        >
3318          ${(0,Dv.bQ)("A file smaller than 5MB is required")}</chameleon-typography
3319        >`:Dv.aH`<chameleon-typography
3320          data-testid="attached-file-message"
3321          variant="caption-medium"
3322          color=${this.isServiceSelected?"type-color-secondary":"type-color-disabled"}
3323          tag="label"
3324          class="image-upload-description"
3325        >
3326          ${(0,Dv.bQ)("5MB max file size")}</chameleon-typography
3327        >`}renderSelectedFileChips(){return Dv.aH`<div class="attached-files">
3328      ${Nb(this.selectedFiles,e=>e.name,e=>this.renderFileChip(e.name,e.size))}
3329    </div>`}renderFileChip(e,t){return this.disableFilePicker=!0,t>this.attachmentSizeInBytes&&(this.attachedFileSizeError=!0),Dv.aH`
3330      <chameleon-chip closable @close=${()=>this.removeFileHandler(e)} ?error=${this.attachedFileSizeError}
3331        >${e}</chameleon-chip
3332      >
3333    `}removeFileHandler(e){this.selectedFiles=this.selectedFiles.filter(t=>t.name!==e),this.disableFilePicker=!1,this.attachedFileSizeError=!1}async handleSubmit(){this.showAlertBox=!1;const e=await this.getFileAttachmentInfo(this.selectedFiles[0]),t=await(async e=>{try{return await(0,Dv.y)(`${(0,Dv.an)().gotoResolveUrl}/incidents`,{method:"POST",headers:{AccountKey:(0,Dv.Z)()?.context?.account?.key??"","Content-Type":"application/json"},body:JSON.stringify(dK(e)),credentials:void 0}),{status:sK.SUCCESS}}catch(e){(0,Dv.g)().error("Post incident ticket error",e);let t="Post";return e instanceof Error&&(t=e.message),{status:sK.FAILURE,message:t}}})({serviceId:this.selectedServiceId,categoryId:this.selectedCategoryId,priorityId:this.selectedPriorityId,title:this.subject,description:this.description,date:this.getDueDate(),file:e?.attachmentError?void 0:e});
3333t.status===sK.SUCCESS&&this.tracking({name:aK.TICKET_SUBMIT}),t.status===sK.FAILURE&&this.tracking({name:aK.TICKET_ERROR,payload:{message:t.message}}),t.status!==sK.SUCCESS||e?.attachmentError?this.showAlertBox=!0:((0,Dv.cA)({id:"resolve-success-snackbar",title:(0,Dv.cB)("Service ticket submitted"),message:(0,Dv.cB)("Status updates will be sent by email.")}),this.submitted=!0,this.close())}async getFileAttachmentInfo(e){if(e)return await(async e=>{try{const t=await(e=>new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(n.result),n.onerror=e=>r(e)}))(e);return{name:e.name,type:e.type,data:`data: '${t}'`,attachmentError:!1}}catch{return{name:e.name,type:e.type,attachmentError:!0}}})(e)}getDueDate(){return this.datePicker?.date}render(){return Dv.aH`
3334      <chameleon-dialog open closable size="large" @closed=${this.close} close-button-label=${(0,Dv.bQ)("Close dialog")}>
3335        <span slot="title">${(0,Dv.bQ)("New service ticket")}</span>
3336        ${this.renderAlert()} ${this.renderSubtitle()}${this.renderServices()} ${this.renderCategoryAndPriority()}
3337        ${this.renderSubject()} ${this.renderDescription()} ${this.renderDueDate()}
3338        ${(0,Dv.bs)(Dv.bt.SHELL_RESOLVE_USER_ACCESS_ATTACHMENT)?this.renderFilePickerSection():Dv.cm}
3339        ${this.renderActionButtons()}
3340      </chameleon-dialog>
3341    `}};yK.tagName="goto-create-incident";let wK=yK;bK([(0,Dv.bS)("#service-placeholder")],wK.prototype,"servicePlaceholder"),bK([(0,Dv.bS)("#create-incident-category")],wK.prototype,"categorySelect"),bK([(0,Dv.bS)("#create-incident-priority")],wK.prototype,"prioritySelect"),bK([(0,Dv.bS)("#category-placeholder")],wK.prototype,"categoryPlaceholder"),bK([(0,Dv.bS)("#priority-placeholder")],wK.prototype,"priorityPlaceholder"),bK([(0,Dv.bS)("goto-date-picker")],wK.prototype,"datePicker"),bK([(0,Dv.bS)("chameleon-alert")],wK.prototype,"alertBox"),bK([(0,Dv.cn)({attribute:!1})],wK.prototype,"prefill"),bK([(0,Dv.ct)()],wK.prototype,"selectedFiles"),bK([(0,Dv.ct)()],wK.prototype,"availableServices"),bK([(0,Dv.ct)()],wK.prototype,"serviceData"),bK([(0,Dv.ct)()],wK.prototype,"categories"),bK([(0,Dv.ct)()],wK.prototype,"priorities"),bK([(0,Dv.ct)()],wK.prototype,"subject"),bK([(0,Dv.ct)()],wK.prototype,"description"),bK([(0,Dv.ct)()],wK.prototype,"selectedServiceId"),bK([(0,Dv.ct)()],wK.prototype,"selectedCategoryId"),bK([(0,Dv.ct)()],wK.prototype,"selectedPriorityId"),bK([(0,Dv.ct)()],wK.prototype,"attachedFileSizeError"),bK([(0,Dv.ct)()],wK.prototype,"disableFilePicker"),bK([(0,Dv.ct)()],wK.prototype,"isServiceSelected"),bK([(0,Dv.ct)()],wK.prototype,"showAlertBox"),bK([(0,Dv.ct)()],wK.prototype,"submitted");const xK=async e=>{if((0,Dv.aa)()&&e)try{return await(await(0,Dv.y)(`${(0,Dv.ao)()}/contact-center-authority/v1/organizations/${e}/user/context${(()=>{let e="";const t=(0,Dv.aZ)("contact-center-settings");if(t){const{urlSearchParams:r}=JSON.parse(t);if(r){const t=Object.keys(r),n=new URLSearchParams;t.forEach(e=>{const t=r[e];(Array.isArray(t)?t:[t]).forEach(t=>{n.append(e,t)})}),e=`?${n.toString()}`}}return e})()}`,{credentials:"omit"})).json()}catch(e){(0,Dv.g)().error("error in API call for Contact Center Permissions",e)}return{permissions:[],license:null}},_K="resolve",kK=e=>{(async e=>{const t=await(async(e={})=>{const t={...mK,...e},r=t.subject??"",n=t.description??"",o=await pK(),i=fK(o,t.serviceName,({name:e})=>e)??(1===o.length?o[0]:void 0);if(!i)return{serviceId:0,categoryId:0,priorityId:0,subject:r,description:n};const s=await gK(i.id);return{serviceId:i.id,categoryId:fK(s.categories??[],t.categoryName,({name:e})=>e)?.id??0,priorityId:fK(s.service_priorities??[],t.priorityName,({description:e})=>e)?.id??0,subject:r,description:n}})(e),r=(0,Dv.bL)().createElement(wK.tagName);r.prefill=t,$j().open(r)})(e)},CK={type:iK.SEPARATOR},SK={type:iK.SEPARATOR,dataTest:"integration-separator-item",isVisible:()=>(0,Dv.O)().isIntegration},EK={href:"#",type:iK.NORMAL,executeFunction:()=>(0,Dv.bk)((0,Dv.an)().profileUrl),labelKey:(0,Dv.cu)("Edit Profile"),isExternalLink:!0,dataTest:"edit-profile"},IK={type:iK.CUSTOM,render:()=>Dv.aH`<goto-avatar-update-menu-item role=${"menuitem"} id="update-menu-item"></goto-avatar-update-menu-item>`,dataTest:"update"},AK={type:iK.NORMAL,href:Dv.aB,executeFunction:()=>(0,Dv.bj)(Dv.aB),labelKey:(0,Dv.cu)("Keyboard shortcuts"),isVisible:()=>!!(0,Dv.bs)(Dv.bt.SHELL_HOTKEY_SETTINGS)&&!(0,Dv.O)().isIntegration,dataTest:"keyboard-shortcuts"},TK={type:iK.NORMAL,href:Dv.aI,executeFunction:()=>(0,Dv.bj)(Dv.aI),labelKey:(0,Dv.cu)("Settings"),isVisible:()=>!0,dataTest:"settings"},OK={type:iK.NORMAL,href:"#",executeFunction:()=>{Mv().retrieve(_K).commands.openCreateIncidentDialog.execute(),(0,Dv.cr)().track("GoTo > Open Ticket Resolve",{action:"Click",event:"Open",from:"Topbar"})},labelKey:(0,Dv.cu)("Contact my admin"),isVisible:()=>Mv().retrieve(_K).commands.openCreateIncidentDialog.isHandled(),dataTest:"createResolveIncident"},LK={type:iK.NORMAL,href:"#",executeFunction:()=>(0,Dv.bk)((0,Dv.an)().gotoConnectQuickStartGuideUrl),labelKey:(0,Dv.cu)("Quick start guide"),isExternalLink:!0,isVisible:()=>(0,Dv.O)().isIntegration&&!!(0,Dv.bs)(Dv.bt.SHELL_SHOW_GTC_QUICK_START_GUIDE),dataTest:"gtc-quick-start-guide"},$K={type:iK.NORMAL,href:"#",executeFunction:()=>(0,Dv.bk)((0,Dv.an)().helpUrl),labelKey:(0,Dv.cu)("Get help"),isExternalLink:!0,isVisible:()=>(0,Dv.O)().isIntegration,dataTest:"help"},NK={type:iK.NORMAL,href:"#",executeFunction:()=>(0,Dv.bk)((0,Dv.an)().tutorialsAndVideosUrl),labelKey:(0,Dv.cu)("Tutorials and videos"),isExternalLink:!0,isVisible:()=>(0,Dv.O)().isIntegration,dataTest:"tutorials-and-videos"},RK={type:iK.NORMAL,href:"#",executeFunction:()=>(0,Dv.bk)((0,Dv.cE)()),labelKey:(0,Dv.cu)("Community forum"),isExternalLink:!0,isVisible:()=>(0,Dv.O)().isIntegration,dataTest:"community-forum"},PK={type:iK.NORMAL,href:"#",executeFunction:()=>(0,Dv.bk)((0,Dv.an)().feedbackGoToMeetingUrl),isExternalLink:!0,labelKey:(0,Dv.cu)("Give feedback"),isVisible:()=>(0,Dv.cF)()&&(0,Dv.O)().isIntegration,dataTest:"feedbackG2M"},DK={type:iK.NORMAL,href:"#",executeFunction:()=>{const{openFeedbackDialog:e}=jb(window);e()},labelKey:(0,Dv.cu)("Give feedback"),isVisible:()=>!(0,Dv.cF)()&&(0,Dv.O)().isIntegration,dataTest:"feedback"},MK={type:iK.NORMAL,href:"#",executeFunction:()=>((0,Dv.g)().info("logout: user clicked Sign out from avatar menu"),((0,Dv.Z)()?.auth).logout()),labelKey:(0,Dv.cu)("Sign out"),dataTest:"logout"},zK=[IK,AK,TK,OK,SK,LK,$K,NK,RK,PK,DK,CK,MK],FK=[$K,NK,RK,DK,CK,MK],UK={dialogTitle:(0,Dv.cu)("Set a status message"),inputPlaceholder:(0,Dv.cu)("Update status message"),inputHelperText:(0,Dv.cu)("Maximum length is {{maxLength}} characters"),saveButton:(0,Dv.cu)("Save"),cancelButton:(0,Dv.cu)("Cancel")};var BK=Object.defineProperty,HK=Object.getOwnPropertyDescriptor,jK=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?HK(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&BK(t,r,i),i};const VK=class extends Dv.co{constructor(){super(...arguments),this._value="",this.canClearNoteInput=!1,this._hasErrors=!1,this.disabled=!1}get hasErrors(){return this._hasErrors}get value(){return this._value}set value(e){this._value=`${e??""}`.trim(),this.validate(),this.updateCanClearNoteInput()}static get styles(){return(0,Dv.ck)(":host{--goto-focus: var(--goto-border-color-default)}chameleon-text-field{width:100%;margin-top:var(--goto-spacing-03)}.inline{display:inline-flex}.pointer{cursor:pointer}.text-left{text-align:left}")}focus(){this.noteInput?.focus()}reset(){this.value=""}render(){return Dv.aH`
3342      <chameleon-text-field
3343        .value=${this._value}
3344        placeholder=${(0,Dv.bQ)(UK.inputPlaceholder)}
3345        ?error=${this.hasErrors}
3346        fieldsize="large"
3347        ?disabled=${this.disabled}
3348        @input=${this.handleInputChangeValueUpdate}
3349        @click=${()=>{(0,Dv.cr)().track("GoTo > Custom Status Modal",{action:"UI Tap",event:"Input"})}}
3350        label-id="user-note-dialog-title"
3351      >
3352        <span slot="start" class="inline">
3353          <chameleon-svg>${(0,Dv.bR)(Ib)}</chameleon-svg>
3354        </span>
3355        ${this.renderClearButton()}
3356        <span slot="helpertext" class="text-left">
3357          ${(0,Dv.bQ)(UK.inputHelperText,()=>({maxLength:80}))}
3358        </span>
3359      </chameleon-text-field>
3360    `}renderClearButton(){return this.canClearNoteInput?Dv.aH`<chameleon-icon-button
3361          slot="end"
3362          class="inline"
3363          @click=${this.reset}
3364          @keydown=${e=>e.stopPropagation()}
3365          label=${(0,Dv.bQ)("Clear status message")}
3366        >
3367          <chameleon-svg>${(0,Dv.bR)(wb)}</chameleon-svg>
3368        </chameleon-icon-button>`:Dv.cm}handleInputChangeValueUpdate(){this.noteInput&&(this.value=this.noteInput.value)}updateCanClearNoteInput(){this.canClearNoteInput=this.value.length>0}validate(){const e=this._hasErrors;this._hasErrors=this.value.length>80,e!==this._hasErrors&&this.hasErrorsState&&this.hasErrorsState(this._hasErrors)}};VK.tagName="goto-user-presence-note-field";let WK=VK;jK([(0,Dv.cn)({type:String})],WK.prototype,"_value",2),jK([(0,Dv.bS)("chameleon-text-field")],WK.prototype,"noteInput",2),jK([(0,Dv.cn)({type:Boolean})],WK.prototype,"canClearNoteInput",2),jK([(0,Dv.cn)({type:Boolean})],WK.prototype,"_hasErrors",2),jK([(0,Dv.cn)({type:Boolean})],WK.prototype,"hasErrors",1),jK([(0,Dv.cn)({type:Boolean,attribute:!0,reflect:!0})],WK.prototype,"disabled",2),jK([(0,Dv.cn)({type:String,attribute:!0,reflect:!0})],WK.prototype,"value",1);var KK=Object.defineProperty,qK=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&KK(t,r,i),i};const GK=class extends Dv.co{constructor(){super(...arguments),this.handleClosingEvent=()=>{this.noteInput.reset(),this.saveButton.disabled=!0,(0,Dv.cr)().track("GoTo > Custom Status Modal",{action:"UI Tap",event:"Close"})},this.handleClosedEvent=()=>{$j().close()}}static get styles(){return(0,Dv.ck)("goto-user-presence-note-field{display:block;margin-bottom:var(--goto-spacing-09)}:host chameleon-dialog{--goto-dialog-z-index: 60000}")}connectedCallback(){super.connectedCallback(),this.fetchUserNote().then(e=>{this.saveButton.disabled=!1,this.noteInput.disabled=!1,this.noteInput.value=e,this.timer=setTimeout(()=>this.noteInput.focus(),100)})}disconnectedCallback(){super.disconnectedCallback(),typeof this.timer<"u"&&clearTimeout(this.timer)}close(){$j().close()}render(){return Dv.aH`
3369      <chameleon-dialog
3370        open
3371        closable
3372        size="large"
3373        @closing=${this.handleClosingEvent}
3374        @closed=${this.handleClosedEvent}
3375        close-button-label=${(0,Dv.bQ)("Close status dialog")}
3376      >
3377        <span slot="title" id="user-note-dialog-title">${(0,Dv.bQ)(UK.dialogTitle)}</span>
3378        <goto-user-presence-note-field
3379          @keydown=${this.handleOnKeydown}
3380          .hasErrorsState=${this.handleHasErrorsState.bind(this)}
3381          disabled
3382        ></goto-user-presence-note-field>
3383        ${this.renderActionButtons()}
3384      </chameleon-dialog>
3385    `}renderActionButtons(){return Dv.aH`
3386      <div slot="actions">
3387        <chameleon-button
3388          id="btn-save"
3389          @click=${()=>{(0,Dv.cr)().track("GoTo > Custom Status Modal",{action:"Click",event:"Save"}),this.save()}}
3390          disabled
3391          >${(0,Dv.bQ)(UK.saveButton)}</chameleon-button
3392        >
3393        <chameleon-button
3394          id="btn-cancel"
3395          variant="neutral"
3396          @click=${()=>{(0,Dv.cr)().track("GoTo > Custom Status Modal",{action:"UI Tap",event:"Cancel"}),this.close()}}
3397        >
3398          ${(0,Dv.bQ)(UK.cancelButton)}
3399        </chameleon-button>
3400      </div>
3401    `}handleHasErrorsState(e){this.saveButton.disabled=e}handleOnKeydown(e){"Enter"!==e.code||e.repeat||this.saveButton.disabled||(e.preventDefault(),(0,Dv.cr)().track("GoTo > Custom Status Modal",{action:"Enter",event:"Save"}),this.save())}save(){this.saveButton.disabled=!0,this.noteInput.hasErrors||this.persistUserNote(this.noteInput.value).then(()=>this.close())}async fetchUserNote(){const{presence:e}=(0,Dv.Z)();try{return(await(e?.getUserPresence()))?.userNote?.trim()??""}catch(e){(0,Dv.g)().error(`Couldn't fetch userNote: ${e}`)}}async persistUserNote(e){const{presence:t}=(0,Dv.Z)();try{await(t?.setUserPresence({userNote:e}))}catch(e){(0,Dv.g)().error(`Couldn't update userNote: ${e}`)}}};GK.tagName="goto-edit-user-presence-note-dialog";let ZK=GK;qK([(0,Dv.bS)(WK.tagName)],ZK.prototype,"noteInput"),qK([(0,Dv.bS)("#btn-save")],ZK.prototype,"saveButton");const YK={dialogTitle:(0,Dv.cu)("Do not disturb timer"),statusInputBefore:(0,Dv.cu)("Status"),statusInputPlaceholder:(0,Dv.cu)("Do not disturb"),statusInputHelperText:(0,Dv.cu)("Silence r
3401inging, alerts, and notifications on all devices"),resetInputBefore:(0,Dv.cu)("Reset after"),saveButton:(0,Dv.cu)("Save"),cancelButton:(0,Dv.cu)("Cancel")},JK=[{value:15},{value:30},{value:60},{value:120},{value:240},{value:1440}],QK=e=>{if(null===e||e<=0)return null;if(e<60)return(0,Dv.cB)("{{minutes}} minutes",{minutes:e});const t=Math.floor(e/60);return 1===t?(0,Dv.cB)("{{hours}} hour",{hours:t}):(0,Dv.cB)("{{hours}} hours",{hours:t})},XK=class extends Dv.co{constructor(){super(...arguments),this.selectedDuration=JK[0].value,this.handleClosingEvent=()=>{(0,Dv.cr)().track("GoTo > Custom Status Modal",{action:"UI Tap",event:"Close"})},this.handleClosedEvent=()=>{$j().close()}}static get styles(){return(0,Dv.ck)(".dnd-timer-select{padding-top:var(--goto-spacing-06);padding-bottom:var(--goto-spacing-07)}chameleon-input-field::part(root){background:var(--goto-surface-color-default)}")}handleSelectChange(e){const t=e.target.value;this.selectedDuration=Number(t),this.requestUpdate()}close(){$j().close()}render(){return Dv.aH`
3402      <chameleon-dialog
3403        open
3404        closable
3405        size="large"
3406        @closing=${this.handleClosingEvent}
3407        @closed=${this.handleClosedEvent}
3408        close-button-label=${(0,Dv.bQ)("Close do not disturb dialog")}
3409      >
3410        <span slot="title">${(0,Dv.bQ)(YK.dialogTitle)}</span>
3411
3412        <chameleon-input-field
3413          placeholder="${(0,Dv.bQ)(YK.statusInputPlaceholder)}"
3414          fieldsize="large"
3415          readonly="true"
3416          fullwidth="true"
3417          >${(0,Dv.bQ)(YK.statusInputBefore)}
3418          <span slot="start">
3419            <chameleon-svg>${Ab}</chameleon-svg>
3420          </span>
3421          <span slot="helpertext">${(0,Dv.bQ)(YK.statusInputHelperText)}</span>
3422        </chameleon-input-field>
3423
3424        <chameleon-select
3425          class="dnd-timer-select"
3426          selected-value="${String(this.selectedDuration)}"
3427          label="${(0,Dv.bQ)(YK.resetInputBefore)}"
3428          size="large"
3429          fullwidth="true"
3430          in-dialog="true"
3431          @change=${this.handleSelectChange}
3432        >
3433          ${JK.map(e=>Dv.aH`
3434              <chameleon-option .value="${String(e.value)}"> ${QK(e.value)} </chameleon-option>
3435            `)}
3436        </chameleon-select>
3437
3438        ${this.renderActionButtons()}
3439      </chameleon-dialog>
3440    `}renderActionButtons(){return Dv.aH`
3441      <div slot="actions">
3442        <chameleon-button
3443          data-testid="btn-save"
3444          variant="primary"
3445          size="medium"
3446          @click=${()=>{(0,Dv.cr)().track("GoTo > DND Timer Modal",{action:"Click",event:"Save"}),this.save()}}
3447          >${(0,Dv.bQ)(YK.saveButton)}</chameleon-button
3448        >
3449        <chameleon-button
3450          data-testid="btn-cancel"
3451          size="medium"
3452          variant="neutral"
3453          @click=${()=>{(0,Dv.cr)().track("GoTo > DND Timer Modal",{action:"UI Tap",event:"Cancel"}),this.close()}}
3454          >${(0,Dv.bQ)(YK.cancelButton)}</chameleon-button
3455        >
3456      </div>
3457    `}save(){const e=this.selectedDuration;(0,Dv.Z)().presence?.setUserPresence({userDoNotDisturb:ub.DO_NOT_DISTURB,userDoNotDisturbExpiration:new Date(Date.now()+60*e*1e3).toISOString()}),this.close()}};XK.tagName="goto-edit-dnd-timer-dialog";let eq=XK;const tq="presence";var rq=Object.defineProperty,nq=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&rq(t,r,i),i};const oq=e=>{if(e.isVisible?.()??!0)switch(e.type){case iK.SEPARATOR:return Dv.aH`<chameleon-menu-separator data-testid=${(0,Dv.cq)(e.dataTest)}></chameleon-menu-separator>`;case iK.CUSTOM:return e.render();case iK.NORMAL:return(e=>{const{labelKey:t,executeFunction:r,dataTest:n}=e;return Dv.aH`
3458    <chameleon-menu-item
3459      @menuitemclick=${()=>{(0,Dv.cr)().track("GoTo > Avatar menu",{action:"Click",target:t,from:"Topbar"}),r()}}
3460      aria-label=${(0,Dv.bQ)(t)}
3461      data-testid=${(0,Dv.cq)(n)}
3462    >
3463      ${(0,Dv.bQ)(t)} ${(e=>{const{type:t,isExternalLink:r}=e;return t===iK.NORMAL&&r?Dv.aH`<chameleon-svg slot="${"end"}" data-testid="external-link">
3464          ${(0,Dv.bR)(Sb)}
3465        </chameleon-svg>`:Dv.cm})(e)}
3466    </chameleon-menu-item>
3467  `})(e)}return Dv.cm},iq=class extends Dv.bP{constructor(){super(...arguments),this.givenName="",this.familyName="",this.profileImageUrl="",this.pbxs=[],this.handleRemoveUpdateMenuItem=()=>{this.updateMenuItem?.remove()}}static get styles(){return(0,Dv.ck)("goto-user-note-input{padding:var(--goto-spacing-04) var(--goto-spacing-04) var(--goto-spacing-03)}goto-account-switcher{margin-left:var(--goto-spacing-03);margin-right:var(--goto-spacing-03)}goto-avatar-update-menu-item:focus-visible{outline-offset:2px;outline:1px solid var(--goto-focus-color-highlight-default)}goto-avatar-popover-menu-info,goto-presence-selector-submenu,goto-account-switcher-submenu{outline:none}")}connectedCallback(){super.connectedCallback(),this.addEventListener("removeUpdateMenuItem",this.handleRemoveUpdateMenuItem),this.pbxs=(0,Dv.cp)()}disconnectedCallback(){this.removeEventListener("removeUpdateMenuItem",this.handleRemoveUpdateMenuItem),super.disconnectedCallback()}getFirstMenuItem(){return this.menu?.querySelector(':scope > [role="menuitem"]:not([hidden])')??void 0}render(){return Dv.aH`
3468      <chameleon-menu label=${(0,Dv.bQ)("User profile menu")} data-testid="avatar-popover-menu">
3469        <goto-avatar-popover-menu-info
3470          .givenName=${this.givenName}
3471          .familyName=${this.familyName}
3472          .profileImageUrl=${this.profileImageUrl}
3473        ></goto-avatar-popover-menu-info>
3474        ${(e=>(0,Dv.bs)(Dv.bt.SHELL_PRESENCE_SELECTOR_SUBMENU)?Dv.cm:Dv.aH` <goto-user-note-input @click=${e}></goto-user-note-input>`)(this.handleOpenEditUserNoteDialog.bind(this))} ${(0,Dv.bs)(Dv.bt.SHELL_PRESENCE_SELECTOR_SUBMENU)?Dv.aH`
3475        <goto-presence-selector-submenu
3476          role="menuitem"
3477          aria-label=${(0,Dv.bQ)("Presence selector submenu")}
3478        ></goto-presence-selector-submenu>
3479      `:Dv.cm}
3480        <chameleon-menu-separator></chameleon-menu-separator>
3481        ${this.renderAccountSwitcher()} ${oq(EK)}
3482        ${Nb((0,Dv.cD)()?FK:zK,oq)}
3483        <chameleon-menu-separator></chameleon-menu-separator>
3484        <chameleon-menu-section>
3485          <goto-version></goto-version>
3486          <goto-shell-agent-state-indicator></goto-shell-agent-state-indicator>
3487        </chameleon-menu-section>
3488      </chameleon-menu>
3489    `}renderAccountSwitcher(){return this.pbxs.length>1?Dv.aH`<chameleon-menu-section>${(0,Dv.bQ)("Account")}</chameleon-menu-section>
3490          <goto-account-switcher-submenu
3491            role="menuitem"
3492            aria-label=${(0,Dv.bQ)("Account switcher submenu")}
3493          ></goto-account-switcher-submenu>
3494          <chameleon-menu-separator></chameleon-menu-separator>`:Dv.cm}handleOpenEditUserNoteDialog(){(0,Dv.cr)().track("GoTo > Custom Status Modal",{action:"Click",event:"Open",from:"Avatar menu"}),this.dispatchEvent(new CustomEvent(QW,{bubbles:!0,composed:!0})),(0,Dv.Z)().namespaces.retrieve(tq).commands.openPresenceNoteDialog.execute()}};iq.tagName="goto-avatar-popover-menu";let sq=iq;nq([(0,Dv.cn)({type:String})],sq.prototype,"givenName"),nq([(0,Dv.cn)({type:String})],sq.prototype,"familyName"),nq([(0,Dv.cn)({type:String})],sq.prototype,"profileImageUrl"),nq([(0,Dv.bS)("chameleon-menu")],sq.prototype,"menu"),nq([(0,Dv.bS)("#update-menu-item")],sq.prototype,"updateMenuItem"),nq([(0,Dv.ct)()],sq.prototype,"pbxs");const aq=class extends Dv.co{static get styles(){return(0,Dv.ck)(":host{align-items:center;display:flex;justify-content:center;width:100vw;height:100vh}.check-icon{--goto-icon-color: var(--goto-green-500)}")}render(){return Dv.aH`
3495      <chameleon-empty-state size="medium">
3496        <chameleon-svg class="check-icon" slot="icon">${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M20.8726 6.59192L9.17452 18.29L3 12.1155L4.30192 10.8136L9.17452 15.6862L19.5707 5.29L20.8726 6.59192Z" fill="currentColor"></path></svg>')}</chameleon-svg>
3497        <chameleon-typography variant="heading-medium" tag="h1" slot="title">
3498          ${(0,Dv.bQ)("Calendar successfully connected")}
3499        </chameleon-typography>
3500        ${(0,Dv.bQ)("You're almost done. After closing this window, restart GoTo to see all your meetings and events appear.")}
3501        <div slot="actions">
3502          <chameleon-button size="small" @click=${()=>(0,Dv.bp)().close()}> ${(0,Dv.bQ)("Close")} </chameleon-button>
3503        </div>
3504      </chameleon-empty-state>
3505    `}};aq.tagName="goto-calendar-connected";let lq=aq;class cq extends Dv.cG{render(e){return e.then(e=>{this.setValue(e)}).catch(e=>{this.setValue(e)}),Dv.ak}}const dq=(0,Dv.ad)(cq);var uq=Object.defineProperty;const hq=class extends Dv.co{constructor(){super(),this.calendarSettings=null,this.getCalendarSettings()}static get styles(){return(0,Dv.ck)(":host{display:block}
3505.calendar-settings-section{box-sizing:border-box;max-width:720px;padding:var(--goto-spacing-02) var(--goto-spacing-07)}.settings-header{border-bottom:1px solid var(--goto-border-color-default);margin-top:var(--goto-spacing-07);margin-bottom:var(--goto-spacing-03);padding-left:var(--goto-spacing-07);padding-bottom:var(--goto-spacing-04)}.loading-text{margin-top:var(--goto-spacing-06);padding-left:var(--goto-spacing-07)}.calendar-item-wrapper{align-items:flex-start;box-sizing:border-box;display:flex;flex-direction:row;margin-top:var(--goto-spacing-06)}.calendar-item-wrapper .icon{--goto-icon-size: var(--goto-spacing-07);width:var(--goto-icon-size);height:var(--goto-icon-size)}.calendar-item-wrapper .text{display:flex;flex-direction:column;padding-left:var(--goto-spacing-03);padding-right:var(--goto-spacing-04);flex:1}.calendar-options{max-width:768px}@media(max-width:1200px){.calendar-options{flex-direction:column;align-items:flex-start}.connect-button,.disconnect-button{width:100%;margin-top:var(--goto-spacing-04)}}.disconnect-button,.connect-button{width:110px}img{height:var(--goto-layout-06);width:auto}")}async renderCalendarOptions(){return this.calendarSettings?Dv.aH`${this.createCalendarTemplate(this.calendarSettings.office365Settings,this.calendarSettings.calendar,this.calendarSettings.id)}
3506    ${this.createCalendarTemplate(this.calendarSettings.googleSettings,this.calendarSettings.calendar,this.calendarSettings.id)}`:Dv.aH` <chameleon-typography class="loading-text" tag="p" variant="body-medium"
3507        >${(0,Dv.bQ)("Loading your calendar settings...")}</chameleon-typography
3508      >`}async getCalendarSettings(){const e=TC(),{user:t}=(0,Dv.Z)();if(!t.key||!e)return Dv.cm;let r;try{r=await e.getConnection(t.key)}catch{}const n={displayName:(0,Dv.cu)("Office 365"),calendarName:"Office 365",icon:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M10.14 1.98962L10.0333 2.05449C9.8635 2.15768 9.70357 2.27305 9.55432 2.39911L9.86217 2.18154H12.475L12.95 5.79545L10.575 8.18182L8.2 9.84053V11.7532C8.2 13.0891 8.89488 14.3278 10.0323 15.0196L12.5325 16.5402L7.25 19.6365H6.23117L4.33225 18.4816C3.19486 17.7898 2.5 16.551 2.5 15.2151V8.78347C2.5 7.44715 3.1953 6.20806 4.33327 5.51644L10.0333 2.05214C10.0686 2.03067 10.1042 2.00984 10.14 1.98962Z" fill="url(#office-365_svg__a)"></path><path d="M10.14 1.98962L10.0333 2.05449C9.8635 2.15768 9.70357 2.27305 9.55432 2.39911L9.86217 2.18154H12.475L12.95 5.79545L10.575 8.18182L8.2 9.84053V11.7532C8.2 13.0891 8.89488 14.3278 10.0323 15.0196L12.5325 16.5402L7.25 19.6365H6.23117L4.33225 18.4816C3.19486 17.7898 2.5 16.551 2.5 15.2151V8.78347C2.5 7.44715 3.1953 6.20806 4.33327 5.51644L10.0333 2.05214C10.0686 2.03067 10.1042 2.00984 10.14 1.98962Z" fill="url(#office-365_svg__b)"></path><path d="M15.8 9.61364V11.752C15.8 13.0878 15.1051 14.3266 13.9677 15.0184L8.26774 18.4851C7.10171 19.1943 5.65091 19.2198 4.46436 18.5619L10.0322 21.9483C11.2419 22.684 12.7581 22.684 
350813.9677 21.9483L19.6677 18.4815C20.8051 17.7897 21.5 16.551 21.5 15.2151V13.6705L21.025 12.9545L15.8 9.61364Z" fill="url(#office-365_svg__c)"></path><path d="M15.8 9.61364V11.752C15.8 13.0878 15.1051 14.3266 13.9677 15.0184L8.26774 18.4851C7.10171 19.1943 5.65091 19.2198 4.46436 18.5619L10.0322 21.9483C11.2419 22.684 12.7581 22.684 13.9677 21.9483L19.6677 18.4815C20.8051 17.7897 21.5 16.551 21.5 15.2151V13.6705L21.025 12.9545L15.8 9.61364Z" fill="url(#office-365_svg__d)"></path><path d="M19.6667 5.51639L13.9667 2.0521C12.7951 1.33998 11.336 1.31792 10.1465 1.98592L10.0333 2.05474C8.8953 2.74636 8.2 3.98543 8.2 5.32176V9.84817L10.0333 8.73393C11.2424 7.99907 12.7576 7.99907 13.9667 8.73393L19.6667 12.1982C20.7691 12.8683 21.4561 14.052 21.498 15.3402C21.4993 15.2986 21.5 15.2569 21.5 15.2151V8.78342C21.5 7.4471 20.8047 6.20801 19.6667 5.51639Z" fill="url(#office-365_svg__e)"></path><path d="M19.6667 5.51639L13.9667 2.0521C12.7951 1.33998 11.336 1.31792 10.1465 1.98592L10.0333 2.05474C8.8953 2.74636 8.2 3.98543 8.2 5.32176V9.84817L10.0333 8.73393C11.2424 7.99907 12.7576 7.99907 13.9667 8.73393L19.6667 12.1982C20.7691 12.8683 21.4561 14.052 21.498 15.3402C21.4993 15.2986 21.5 15.2569 21.5 15.2151V8.78342C21.5 7.4471 20.8047 6.20801 19.6667 5.51639Z" fill="url(#office-365_svg__f)"></path><defs><radialGradient id="office-365_svg__a" cx="0" cy="0" r="1" gradientTransform="matrix(-5.55759 14.9133 -25.8881 -9.73995 8.87384 5.62282)" gradientUnits="userSpaceOnUse"><stop offset="0.06441" stop-color="#AE7FE2"></stop><stop offset="1" stop-color="#0078D4"></stop></radialGradient><linearGradient id="office-365_svg__b" x1="8.91815" y1="18.6191" x2="6.64065" y2="14.6987" gradientUnits="userSpaceOnUse"><stop stop-color="#114A8B"></stop><stop offset="1" stop-color="#0078D4" stop-opacity="0"></stop></linearGradient><radialGradient id="office-365_svg__c" cx="0" cy="0" r="1" gradientTransform="matrix(14.5919 -2.15647 1.41771 9.68505 5.5542 17.8948)" gradientUnits="userSpaceOnUse"><stop offset="0.133928" stop-color="#D59DFF"></stop><stop offset="1" stop-color="#5E438F"></stop></radialGradient><linearGradient id="office-365_svg__d" x1="19.7694" y1="12.6571" x2="17.3306" y2="16.1373" gradientUnits="userSpaceOnUse"><stop stop-color="#493474"></stop><stop offset="1" stop-color="#8C66BA" stop-opacity="0"></stop></linearGradient><radialGradient id="office-365_svg__e" cx="0" cy="0" r="1" gradientTransform="matrix(-11.4752 -2.92356 4.8981 -19.4098 20.1012 13.1951)" gradientUnits="userSpaceOnUse"><stop offset="0.0584996" stop-color="#50E6FF"></stop><stop offset="1" stop-color="#436DCD"></stop></radialGradient><linearGradient id="office-365_svg__f" x1="8.6635" y1="2.00426" x2="12.2312" y2="2.00426" gradientUnits="userSpaceOnUse"><stop stop-color="#2D3F80"></stop><stop offset="1" stop-color="#436DCD" stop-opacity="0"></stop></linearGradient></defs></svg>',providerName:Dv.cH.OFFICE365_DIRECT,connected:r?.providerSubType===Dv.cH.OFFICE365_DIRECT,disabled:r?.providerSubType===Dv.cH.GOOGLE_DIRECT,dataTest:"office-365",description:"View your events in the Meetings tab and sync your GoTo availability to your calendar status"},o={displayName:(0,Dv.cu)("Google"),calendarName:"Google",icon:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M21.6 12.2273C21.6 11.5182 21.5364 10.8364 21.4182 10.1818H12V14.05H17.3818C17.15 15.3 16.4455 16.3591 15.3864 17.0682V19.5773H18.6182C20.5091 17.8364 21.6 15.2727 21.6 12.2273Z" fill="#4285F4"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C14.7 22 16.9636 21.1045 18.6182 19.5773L15.3864 17.0682C14.4909 17.6682 13.3454 18.0227 12 18.0227C9.39545 18.0227 7.1909 16.2636 6.40454 13.9H3.06363V16.4909C4.70908 19.7591 8.0909 22 12 22Z" fill="#34A853"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M6.40455 13.9C6.20455 13.3 6.09091 12.6591 6.09091 12C6.09091 11.3409 6.20455 10.7 6.40455 10.1V7.50909H3.06364C2.38636 8.85909 2 10.3864 2 12C2 13.6136 2.38636 15.1409 3.06364 16.4909L6.40455 13.9Z" fill="#FBBC05"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M12 5.97727C13.4682 5.97727 14.7864 6.48182 15.8227 7.47273L18.6909 4.60455C16.9591 2.99091 14.6954 2 12 2C8.0909 2 4.70908 4.24091 3.06363 7.50909L6.40454 10.1C7.1909 7.73636 9.39545 5.97727 12 5.97727Z" fill="#EA4335"></path></svg>',providerName:Dv.cH.GOOGLE_DIRECT,connected:r?.providerSubType===Dv.cH.GOOGLE_DIRECT,disabled:r?.providerSubType===Dv.cH.OFFICE365_DIRECT,dataTest:"google",description:"View your events in the Meetings tab"};this.calendarSettings={office365Settings:n,googleSettings:o,id:t.key,calendar:e}}createCalendarTemplate(e,t,r){const n=e.disabled?`disabled-${e.dataTest}`:`connect-${e.dataTest}`,o=`disconnect-${e.dataTest}`;return Dv.aH`
3509      <div class="calendar-item-wrapper" data-testid="${(0,Dv.cq)(e.dataTest)}">
3510        <chameleon-svg class="icon">${e.icon}</chameleon-svg>
3511        <div class="text">
3512          <chameleon-typography class="name" tag="h2" variant="heading-small">
3513            ${(0,Dv.bQ)(e.displayName)} Calendar
3514          </chameleon-typography>
3515          <chameleon-typography class="description" color="type-color-secondary"
3516            >${(0,Dv.bQ)(e.description)}</chameleon-typography
3517          >
3518        </div>
3519        ${e.connected?Dv.aH`<chameleon-button
3520              class="disconnect-button"
3521              data-testid="${o}"
3522              variant="secondary"
3523              @click=${()=>{this.disconnectCalendar(t,r,e.providerName).then(()=>{this.dispatchEvent(new CustomEvent("calendar",{bubbles:!0,detail:{eventName:"disconnect"}}))})}}
3524            >
3525              ${(0,Dv.bQ)("Disconnect")}
3526            </chameleon-button>`:Dv.aH`<chameleon-button
3527              class="connect-button"
3528              data-testid="${n}"
3529              @click=${()=>{this.connectCalendar(t,r,e.providerName),this.verifyCalendarConnection(t,r)}}
3530              title="${e.disabled?(0,Dv.bQ)("You can only connect one calendar at a time"):(0,Dv.bQ)("Connect {{calendarName}}",()=>({calendarName:e.calendarName}))}"
3531              ?disabled=${e.disabled}
3532              >${(0,Dv.bQ)("Connect")}
3533              <chameleon-svg slot="end">${(0,Dv.bR)(Sb)}</chameleon-svg>
3534            </chameleon-button>`}
3535      </div>
3536    `}async disconnectCalendar(e,t,r){try{await e.disconnect(t),this.calendarSettings={...this.calendarSettings,office365Settings:{...this.calendarSettings?.office365Settings,connected:!1,disabled:!1},googleSettings:{...this.calendarSettings?.googleSettings,connected:!1,disabled:!1}},(0,Dv.cr)().track("GoTo > Settings - Calendar",{action:"Click",button:"Disconnect",calendar:r})}catch{throw new Error}}async connectCalendar(e,t,r){const{protocol:n,host:o}=globalThis.location,i=`${n}//${o}${Dv.aL}`;try{const n=await e.connect(t,r,i);(0,Dv.cI)(n,{height:"571px",width:"708px",left:"200px",top:"200px"}),(0,Dv.cA)({id:"snackbar_calendar",title:(0,Dv.cB)("Restart your app to see your calendar integrated in GoTo."),actions:[{label:(0,Dv.cB)("Restart app"),handler(){(0,Dv.cJ)()}}]}),(0,Dv.cr)().track("GoTo > Settings - Calendar",{action:"Click",button:"Connect",calendar:r})}catch{}}verifyCalendarConnection(e,t){(0,Dv.cK)(async()=>(await e.isConnected(t)&&this.getCalendarSettings(),!(!this.calendarSettings?.office365Settings.connected&&!this.calendarSettings?.googleSettings.connected)),{retryAfterInMilliseconds:500,maxRetryNumber:60,retryOn:e=>Promise.resolve(!e.value)})}render(){return Dv.aH`
3537      <chameleon-typography class="settings-header" tag="h1" variant="heading-large"
3538        >${(0,Dv.bQ)("Calendar")}</chameleon-typography
3539      >
3540      <div class="calendar-settings-section">
3541        <chameleon-typography class="settings-description" tag="p" variant="body-medium">
3542          ${(0,Dv.bQ)("Connect your calendar to see all your events in GoTo. You can sync only 1 calendar at a time.")}
3543          ${(0,Dv.bB)()?(0,Dv.bQ)("Restart the GoTo App after connecting to finish."):(0,Dv.bQ)("Reload your browser after connecting to finish.")}
3544        </chameleon-typography>
3545        <div class="calendar-options">${dq(this.renderCalendarOptions())}</div>
3546      </div>
3547    `}};hq.tagName="goto-calendar-settings";let pq=hq;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&uq(t,r,o)})([(0,Dv.ct)()],pq.prototype,"calendarSettings");var gq=Object.defineProperty;const fq=class extends Dv.co{constructor(){super(...arguments),this.menuItems=[]}static get styles(){return(0,Dv.ck)(":host{background-color:var(--goto-surface-color-default);display:flex;flex-direction:column;width:100%;text-align:justify}ul{list-style-type:none;margin:0;padding:0}ul:first-child{flex-grow:1}nav{--goto-icon-color: var(--goto-icon-color-default);display:flex;flex-direction:column;flex-grow:1}nav a{color:var(--goto-border-color-default);text-decoration:none}")}renderMenuItem(e){return Dv.aH`
3548      <chameleon-menu-item
3549        @menuitemclick=${()=>(e=>{(0,Dv.cr)().track(`GoTo > ${e.origin}`,{action:"click",event:e.text}),e.isExternalLink?(0,Dv.bk)(e.href):(0,Dv.bj)(e.href)})(e)}
3550        aria-label=${e.text}
3551        data-testid=${(0,Dv.cq)(e.dataTest)}
3552      >
3553        ${e.icon?Dv.aH`<chameleon-svg slot="leading-icon">${(0,Dv.bR)(e.icon)}</chameleon-svg>`:Dv.cm}
3554        ${e.text}
3555      </chameleon-menu-item>
3556    `}render(){return Dv.aH`
3557      <nav>
3558        <chameleon-menu label=${(0,Dv.bQ)("GoTo menu")}>
3559          ${Nb(this.menuItems,e=>e.href,this.renderMenuItem)}
3560        </chameleon-menu>
3561      </nav>
3562    `}};fq.tagName="goto-popover-menu";let mq=fq;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&gq(t,r,o)})([(0,Dv.cn)({type:Array})],mq.prototype,"menuItems");const vq={newItem:[{keyCombination:{code:"KeyN",altKey:!1,ctrlKey:!1,metaKey:!0,shiftKey:!1},global:!1}],toggleMute:[{keyCombination:{code:"KeyM",altKey:!1,ctrlKey:!1,metaKey:!0,shiftKey:!0},global:!1}],toggleCamera:[{keyCombination:{code:"KeyK",altKey:!1,ctrlKey:!1,metaKey:!0,shiftKey:!0},global:!1}],leaveMeetingOrHangUpCall:[{keyCombination:{code:"Backspace",altKey:!1,ctrlKey:!1,metaKey:!0,shiftKey:!1},global:!1}],search:[{keyCombination:{code:"KeyF",altKey:!1,ctrlKey:!1,metaKey:!0,shiftKey:!1},global:!1}],jumpTo:[{keyCombination:{code:"KeyG",altKey:!1,ctrlKey:!1,metaKey:!0,shiftKey:!1},global:!1}],callCurrentContact:[{keyCombination:{code:"Enter",altKey:!0,ctrlKey:!1,metaKey:!0,shiftKey:!0},global:!1}],openSoftphone:[{keyCombination:{code:"Digit1",altKey:!1,ctrlKey:!1,metaKey:!0,shiftKey:!0},global:!1}],openSettings:[{keyCombination:{code:"Comma",altKey:!0,ctrlKey:!1,metaKey:!0,shiftKey:!1},global:!1}],answerCall:[{keyCombination:{code:"KeyA",altKey:!1,ctrlKey:!1,metaKey:!0,shiftKey:!0},global:!1}],declineCall:[{keyCombination:{code:"KeyD",altKey:!1,ctrlKey:!1,metaKey:!0,shiftKey:!0},global:!1}],navigation1:[{keyCombination:{code:"Digit1",altKey:!0,ctrlKey:!1,metaKey:!0,shiftKey:!1},global:!1}],navigation2:[{keyCombination:{code:"Digit2",altKey:!0,ctrlKey:!1,metaKey:!0,shiftKey:!1},global:!1}],navigation3:[{keyCombination:{code:"Digit3",altKey:!0,ctrlKey:!1,metaKey:!0,shiftKey:!1},global:!1}],navigation4:[{keyCombination:{code:"Digit4",altKey:!0,ctrlKey:!1,metaKey:!0,shiftKey:!1},global:!1}],navigation5:[{keyCombination:{code:"Digit5",altKey:!0,ctrlKey:!1,metaKey:!0,shiftKey:!1},global:!1}],navigation6:[{keyCombination:{code:"Digit6",altKey:!0,ctrlKey:!1,metaKey:!0,shiftKey:!1},global:!1}],navigation7:[{keyCombination:{code:"Digit7",altKey:!0,ctrlKey:!1,metaKey:!0,shiftKey:!1},global:!1}],navigation8:[{keyCombination:{code:"Digit8",altKey:!0,ctrlKey:!1,metaKey:!0,shiftKey:!1},global:!1}],navigation9:[{keyCombination:{code:"Digit9",altKey:!0,ctrlKey:!1,metaKey:!0,shiftKey:!1},global:!1}],showMeetingParticipants:[{keyCombination:{code:"Digit1",altKey:!1,ctrlKey:!1,metaKey:!0,shiftKey:!0},global:!1}],showMeetingChatMessages:[{keyCombination:{code:"Digit2",altKey:!1,ctrlKey:!1,metaKey:!0,shiftKey:!0},global:!1}],showSettings:[{keyCombination:{code:"Digit3",altKey:!1,ctrlKey:!1,metaKey:!0,shiftKey:!0},global:!1}],showNotes:[{keyCombination:{code:"Digit4",altKey:!1,ctrlKey:!1,metaKey:!0,shiftKey:!0},global:!1}],toggleViewMode:[{keyCombination:{code:"KeyY",altKey:!1,ctrlKey:!1,metaKey:!0,shiftKey:!1},global:!1}],holdCall:[{keyCombination:{code:"KeyH",altKey:!1,ctrlKey:!1,metaKey:!0,shiftKey:!0},global:!1}],transferCall:[{keyCombination:{code:"KeyR",altKey:!0,ctrlKey:!1,metaKey:!0,shiftKey:!0},global:!1}],dial:[{keyCombination:{code:"KeyD",altKey:!1,ctrlKey:!1,metaKey:!0,shiftKey:!1},global:!1}],addParticipants:[{keyCombination:{code:"Equal",altKey:!0,ctrlKey:!1,metaKey:!0,shiftKey:!0},global:!1}],parkCall:[{keyCombination:{code:"KeyP",altKey:!1,ctrlKey:!1,metaKey:!0,shiftKey:!0},global:!1}],unparkCall:[{keyCombination:{code:"KeyK",altKey:!1,ctrlKey:!1,metaKey:!0,shiftKey:!0},global:!1}],recoverLastTransferCall:[{keyCombination:{code:"KeyU",altKey:!1,ctrlKey:!1,metaKey:!0,shiftKey:!0},global:!1}
3562],focusDialInput:[{keyCombination:{code:"KeyE",altKey:!1,ctrlKey:!1,metaKey:!0,shiftKey:!0},global:!1}]},bq={newItem:[{keyCombination:{code:"KeyN",altKey:!1,ctrlKey:!0,metaKey:!1,shiftKey:!1},global:!1}],toggleMute:[{keyCombination:{code:"KeyM",altKey:!1,ctrlKey:!0,metaKey:!1,shiftKey:!0},global:!1}],toggleCamera:[{keyCombination:{code:"KeyK",altKey:!1,ctrlKey:!0,metaKey:!1,shiftKey:!0},global:!1,useKeyUp:!0}],leaveMeetingOrHangUpCall:[{keyCombination:{code:"Backspace",altKey:!1,ctrlKey:!0,metaKey:!1,shiftKey:!1},global:!1}],search:[{keyCombination:{code:"KeyF",altKey:!1,ctrlKey:!0,metaKey:!1,shiftKey:!1},global:!1}],jumpTo:[{keyCombination:{code:"KeyG",altKey:!1,ctrlKey:!0,metaKey:!1,shiftKey:!1},global:!1}],callCurrentContact:[{keyCombination:{code:"Enter",altKey:!0,ctrlKey:!0,metaKey:!1,shiftKey:!0},global:!1}],openSoftphone:[{keyCombination:{code:"Digit1",altKey:!1,ctrlKey:!0,metaKey:!1,shiftKey:!0},global:!1}],openSettings:[{keyCombination:{code:"Comma",altKey:!0,ctrlKey:!0,metaKey:!1,shiftKey:!1},global:!1}],answerCall:[{keyCombination:{code:"KeyA",altKey:!1,ctrlKey:!0,metaKey:!1,shiftKey:!0},global:!1}],declineCall:[{keyCombination:{code:"KeyD",altKey:!1,ctrlKey:!0,metaKey:!1,shiftKey:!0},global:!1}],navigation1:[{keyCombination:{code:"Digit1",altKey:!0,ctrlKey:!0,metaKey:!1,shiftKey:!1},global:!1}],navigation2:[{keyCombination:{code:"Digit2",altKey:!0,ctrlKey:!0,metaKey:!1,shiftKey:!1},global:!1}],navigation3:[{keyCombination:{code:"Digit3",altKey:!0,ctrlKey:!0,metaKey:!1,shiftKey:!1},global:!1}],navigation4:[{keyCombination:{code:"Digit4",altKey:!0,ctrlKey:!0,metaKey:!1,shiftKey:!1},global:!1}],navigation5:[{keyCombination:{code:"Digit5",altKey:!0,ctrlKey:!0,metaKey:!1,shiftKey:!1},global:!1}],navigation6:[{keyCombination:{code:"Digit6",altKey:!0,ctrlKey:!0,metaKey:!1,shiftKey:!1},global:!1}],navigation7:[{keyCombination:{code:"Digit7",altKey:!0,ctrlKey:!0,metaKey:!1,shiftKey:!1},global:!1}],navigation8:[{keyCombination:{code:"Digit8",altKey:!0,ctrlKey:!0,metaKey:!1,shiftKey:!1},global:!1}],navigation9:[{keyCombination:{code:"Digit9",altKey:!0,ctrlKey:!0,metaKey:!1,shiftKey:!1},global:!1}],showMeetingParticipants:[{keyCombination:{code:"Digit1",altKey:!1,ctrlKey:!0,metaKey:!1,shiftKey:!0},global:!1}],showMeetingChatMessages:[{keyCombination:{code:"Digit2",altKey:!1,ctrlKey:!0,metaKey:!1,shiftKey:!0},global:!1}],showSettings:[{keyCombination:{code:"Digit3",altKey:!1,ctrlKey:!0,metaKey:!1,shiftKey:!0},global:!1}],showNotes:[{keyCombination:{code:"Digit4",altKey:!1,ctrlKey:!0,metaKey:!1,shiftKey:!0},global:!1}],toggleViewMode:[{keyCombination:{code:"KeyY",altKey:!1,ctrlKey:!0,metaKey:!1,shiftKey:!1},global:!1}],holdCall:[{keyCombination:{code:"KeyH",altKey:!1,ctrlKey:!0,metaKey:!1,shiftKey:!0},global:!1}],transferCall:[{keyCombination:{code:"KeyR",altKey:!0,ctrlKey:!0,metaKey:!1,shiftKey:!0},global:!1}],dial:[{keyCombination:{code:"KeyD",altKey:!1,ctrlKey:!0,metaKey:!1,shiftKey:!1},global:!1}],addParticipants:[{keyCombination:{code:"Equal",altKey:!0,ctrlKey:!0,metaKey:!1,shiftKey:!0},global:!1}],parkCall:[{keyCombination:{code:"KeyP",altKey:!1,ctrlKey:!0,metaKey:!1,shiftKey:!0},global:!1}],unparkCall:[{keyCombination:{code:"KeyK",altKey:!1,ctrlKey:!0,metaKey:!1,shiftKey:!0},global:!1}],recoverLastTransferCall:[{keyCombination:{code:"KeyU",altKey:!1,ctrlKey:!0,metaKey:!1,shiftKey:!0},global:!1}],focusDialInput:[{keyCombination:{code:"KeyE",altKey:!1,ctrlKey:!0,metaKey:!1,shiftKey:!0},global:!1}]},yq=()=>(0,Dv.cL)()?vq:bq,wq="goto-keyboard-shortcut";function xq(){const e=(0,Dv.aZ)(wq);if(e)try{const t=JSON.parse(e);if(t&&Dv.bA.KeyboardShortcuts.systemInterface.isValidConfiguration(t))return t;throw console.error("KeyboardShortcut plugin","KeyboardShortcut configuration is invalid"),new Error("KeyboardShortcut configuration is invalid, one or more parameter do not follow the structure required")}catch(e){return void console.error("KeyboardShortcut plugin",e)}}const _q=()=>xq()||yq();async function kq(e){Dv.bz.isPluginAvailable("KeyboardShortcuts")?await Dv.bA.KeyboardShortcuts.systemInterface.updateConfigurations(Eq(e)):(console.error("KeyboardShortcut plugin","Parsing error with the configuration in JSON format"),(0,Dv.g)().error("KeyboardShortcut plugin is not available"))}const Cq=e=>e?.code.length>0,Sq=e=>e.filter(e=>Cq(e.keyCombination)),Eq=e=>{const t={};return Object.keys(e).forEach(r=>{t[r]=Sq(e[r])}),t};class Iq{constructor(){this.listOfKeyCombinationsUsed=[],this.isCombinationBeingUsed=e=>-1!==this.listOfKeyCombinationsUsed.findIndex(t=>this.combinationsAreEqual(t,e))}combinationsAreEqual(e,t){return e.code===t.code&&e.altKey===t.altKey&&e.shiftKey===t.shiftKey&&e.metaKey===t.metaKey&&e.ctrlKey===t.ctrlKey}fillListOfUsedCombinationsFromConfig(e){this.listOfKeyCombinationsUsed=[],Object.values(e).forEach(e
3562=>e?.forEach(e=>this.listOfKeyCombinationsUsed.push(e.keyCombination)))}}var Aq=Object.defineProperty,Tq=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&Aq(t,r,i),i};const Oq=class extends Dv.co{constructor(){super(...arguments),this.hotkeyActionList=[],this.keyCombinationValidator=new Iq}static get styles(){return(0,Dv.ck)(".hotkey-section-list{list-style:none;padding:0;margin-top:0;margin-bottom:0}.hotkey-section-list li{padding-top:var(--goto-spacing-01);padding-bottom:var(--goto-spacing-01);border-top:1px solid var(--goto-border-color-default)}.hotkey-section-list li:first-child{border-top:none}")}render(){return Dv.aH`
3563      <ul class="hotkey-section-list">
3564        ${Nb(this.hotkeyActionList,e=>e.id+"_child",e=>Dv.aH`<li>
3565              <goto-keyboard-shortcut-section-row
3566                .hotkeyAction=${e}
3567                .keyCombinationValidator=${this.keyCombinationValidator}
3568              ></goto-keyboard-shortcut-section-row>
3569            </li>`)}
3570      </ul>
3571    `}};Oq.tagName="goto-keyboard-shortcut-section";let Lq=Oq;Tq([(0,Dv.cn)({type:Array})],Lq.prototype,"hotkeyActionList"),Tq([(0,Dv.cn)({type:Object})],Lq.prototype,"keyCombinationValidator");const $q={isGlobalEditable:!0,isLocalEditable:!0},Nq={isGlobalEditable:!1,isLocalEditable:!1,isGlobalDisabled:!0},Rq=(e,t,r=!0)=>({keyboardShortcutId:e,labelKey:t,...r?$q:Nq}),Pq=(e,t)=>({sectionLabelKey:e,keyboardShortcutIdsConfiguration:t}),Dq=Pq((0,Dv.cu)("Call notifications"),[Rq("answerCall",(0,Dv.cu)("Answer a call")),Rq("declineCall",(0,Dv.cu)("Decline a call"))]),Mq=Pq((0,Dv.cu)("Navigation"),[Rq("navigation1",(0,Dv.cu)("Navigation (1 to 9)"),!1)]),zq=Pq((0,Dv.cu)("Phone"),[Rq("holdCall",(0,Dv.cu)("Hold call")),Rq("transferCall",(0,Dv.cu)("Transfer call")),Rq("addParticipants",(0,Dv.cu)("Add participants")),Rq("parkCall",(0,Dv.cu)("Park call")),Rq("unparkCall",(0,Dv.cu)("Pick up parked call")),Rq("focusDialInput",(0,Dv.cu)("Set focus on dial pad")),Rq("recoverLastTransferCall",(0,Dv.cu)("Undo transfer"))]),Fq={navigation1:"⌘⌥ + 1 to 9"},Uq={navigation1:"Ctrl + Alt + 1 to 9"},Bq=class extends Dv.co{constructor(){super(...arguments),this.keyCombinationValidator=new Iq}connectedCallback(){super.connectedCallback(),this.keyCombinationValidator.fillListOfUsedCombinationsFromConfig(_q())}static get styles(){return(0,Dv.ck)(".hotkey-settings-header{border-bottom:1px solid var(--goto-border-color-default);margin-top:var(--goto-spacing-07);margin-bottom:var(--goto-spacing-03);padding-left:var(--goto-spacing-07);padding-bottom:var(--goto-spacing-04)}.header-description{margin-bottom:var(--goto-spacing-10)}.hotkey-description{margin-bottom:var(--goto-spacing-05)}.hotkey-header-description{margin-bottom:var(--goto-spacing-04)}.hotkey-settings-section{box-sizing:border-box;max-width:720px;padding:var(--goto-spacing-02) var(--goto-spacing-07)}.hotkey-settings{display:flex;flex-direction:column;border:solid 1px var(--goto-border-color-default);border-radius:var(--goto-radius-small);padding:var(--goto-spacing-04)}.hotkey-settings-column-headers{display:grid;margin-bottom:var(--goto-spacing-02);margin-left:var(--goto-spacing-04)}.hotkey-settings-column-headers>*:nth-child(3){text-align:right}.hotkey-settings-column-headers.in-container{grid-template-columns:4fr 4fr 2fr}.hotkey-settings-column-headers.in-web{grid-template-columns:repeat(2,1fr)}chameleon-accordion-item::part(heading){border-bottom:1px solid var(--goto-border-color-default)}chameleon-accordion-item::part(region){padding:0}")}extractLocalAndGlobalKeyboardShortcutConfigurations(e){if(e){const t=[],r=[];return e.forEach(e=>e.global?r.push(e):t.push(e)),{globalKeyBoardConfigurationList:r,localKeyBoardConfigurationList:t}}return{globalKeyBoardConfigurationList:[],localKeyBoardConfigurationList:[]}}getHotkeySections(){const e=[],t=_q();return t?([Pq((0,Dv.cu)("Main Shortcuts"),[Rq("toggleMute",(0,Dv.cu)("Toggle mute")),Rq("leaveMeetingOrHangUpCall",(0,Dv.cu)("Hang up call")),Rq("openSoftphone",(0,Dv.cu)("Open softphone")),Rq("openSettings",(0,Dv.cu)("Open settings"))]),Dq,Mq,zq].forEach(r=>{const n=r.keyboardShortcutIdsConfiguration.map(e=>{const{globalKeyBoardConfigurationList:r,localKeyBoardConfigurationList:n}=this.extractLocalAndGlobalKeyboardShortcutConfigurations(t[e.keyboardShortcutId]);return{id:e.keyboardShortcutId,label:(0,Dv.cB)(e.labelKey),globalKeyCombination:r,localKeyCombination:n,configuration:{isGlobalDisabled:!!e.isGlobalDisabled,isGlobalEditable:e.isGlobalEditable,isLocalEditable:e.isLocalEditable}}});e.push({sectionLabelKey:r.sectionLabelKey,hotkeyAction:n})}),e):[]}getGlobalHotkeyColumHeaders(){const e=[(0,Dv.bQ)("Action"),(0,Dv.bQ)("Key combination")];return(0,Dv.bB)()&&e.push((0,Dv.bQ)("Add a global shortcut")),Dv.aH`
3572      <div class=${"hotkey-settings-column-headers "+(3===e.length?"in-container":"in-web")}>
3573        ${e.map(e=>Dv.aH`
3574            <chameleon-typography
3575              class="header-labels"
3576              tag="p"
3577              variant="caption-medium-strong"
3578              color="type-color-secondary"
3579              >${e}</chameleon-typography
3580            >
3581          `)}
3582      </div>
3583    `}render(){return Dv.aH` <chameleon-typography class="hotkey-settings-header" tag="h1" variant="heading-large"
3584        >${(0,Dv.bQ)("Keyboard shortcuts")}</chameleon-typography
3585      >
3586      <div class="hotkey-settings-section">
3587        <chameleon-typography class="header-description" tag="p" variant="body-medium"
3588          >${(0,Dv.bQ)("Use these quick keystrokes to carry out common actions in your daily work")}</chameleon-typography
3589        >
3590        <chameleon-typography class="hotkey-header-description" tag="h2" variant="heading-medium"
3591          >${(0,Dv.bQ)("Assigned shortcuts")}</chameleon-typography
3592        >
3593        <chameleon-typography class="hotkey-description" tag="p" variant="body-small"
3594          >${(0,Dv.bQ)("Customize your keyboard shortcuts to make them more convenient. On the desktop app, you can also add global shortcuts that work even when the app is running in the background.")}</chameleon-typography
3595        >
3596        <div class="hotkey-settings">
3597          ${this.getGlobalHotkeyColumHeaders()}
3598          <div class="hotkey-settings-row">
3599            <chameleon-accordion divider="top-bottom" outlined size="large">
3600              ${Nb(this.getHotkeySections(),e=>`${e.sectionLabelKey}_section`,e=>Dv.aH`<chameleon-accordion-item chevron-position="right" ?expanded=${!0}>
3601                    <div slot="heading">
3602                      <chameleon-typography class="hotkey-section-label" tag="h3" variant="body-medium-strong"
3603                        >${(0,Dv.bQ)(e.sectionLabelKey)}</chameleon-typography
3604                      >
3605                    </div>
3606                    <goto-keyboard-shortcut-section
3607                      class="keyboard-shortcuts-section"
3608                      .hotkeyActionList=${e.hotkeyAction}
3609                      .keyCombinationValidator=${this.keyCombinationValidator}
3610                    ></goto-keyboard-shortcut-section>
3611                  </chameleon-accordion-item>`)}
3612            </chameleon-accordion>
3613          </div>
3614        </div>
3615      </div>`}};
3615Bq.tagName="goto-keyboard-shortcut-settings";let Hq=Bq;const jq={AlreadyUsedAnotherShortcut:(0,Dv.cu)("AlreadyUsedAnotherShortcut"),AlreadyUsedGoTo:(0,Dv.cu)("AlreadyUsedGoTo"),AlreadyUsedSystem:(0,Dv.cu)("AlreadyUsedSystem"),GlobalSubscribeError:""};var Vq=Object.defineProperty,Wq=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&Vq(t,r,i),i};const Kq=class extends Dv.co{constructor(){super(...arguments),this.initialKeyCombination={code:"",altKey:!1,shiftKey:!1,metaKey:!1,ctrlKey:!1},this.customValue=void 0,this.keyCombination={code:"",altKey:!1,shiftKey:!1,metaKey:!1,ctrlKey:!1},this.position=-1,this.isLocal=!0,this.isEditable=!0,this.labelId="",this.buttonKeyboardCombination={code:"",altKey:!1,shiftKey:!1,metaKey:!1,ctrlKey:!1},this.isHover=!1,this.errorState={errorCodes:[],isInvalid:!1},this.handleKeyDown=e=>{this.buttonKeyboardCombination={code:e.code,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey}},this.handleKeyUp=async()=>{!this.combinationsAreEqualFn(this.buttonKeyboardCombination,this.initialKeyCombination)&&(this.errorState=this.validateKeyCombinationFn(),await this.checkForErrorAndSaveKeyCombination()),this.isHover=!0,this.removeEventListenerToHandleKeyEvents()}}connectedCallback(){super.connectedCallback(),this.buttonKeyboardCombination=this.keyCombination,this.initialKeyCombination=this.keyCombination}static get styles(){return(0,Dv.ck)(".hotkey-shortcut-keys-input{min-width:120px;max-width:230px;width:100%;caret-color:transparent}.clear-key-combination-button{cursor:pointer;margin-left:0;margin-right:var(--goto-spacing-01)}.clear-key-combination-button.visible{opacity:1}.clear-key-combination-button.hidden{opacity:0;pointer-events:none}.input-left-space{margin-left:5px}")}combinationsAreEqualFn(e,t){return!!this.combinationsAreEqual&&this.combinationsAreEqual(e,t)}validateKeyCombinationFn(){return this.validateKeyCombination?this.validateKeyCombination(this.buttonKeyboardCombination):{errorCodes:[],isInvalid:!1}}async saveKeyCombinationFn(){return!this.saveKeyCombination||await this.saveKeyCombination(this.buttonKeyboardCombination,this.position,this.isLocal)}async clearKeyCombinationFn(){return!this.clearKeyCombination||await this.clearKeyCombination()}onMouseEnter(){this.isEditable&&(this.isHover=!0)}onMouseLeave(){this.isEditable&&(this.isHover=!1)}
3615addEventListenerToHandleKeyEvents(){window.document.addEventListener("keydown",this.handleKeyDown),window.document.addEventListener("keyup",this.handleKeyUp)}removeEventListenerToHandleKeyEvents(){window.document.removeEventListener("keydown",this.handleKeyDown),window.document.removeEventListener("keyup",this.handleKeyUp)}onClick(){this.isEditable&&(this.isHover&&this.addEventListenerToHandleKeyEvents(),this.isHover=!1)}async onClickClearIcon(e){e.stopPropagation(),e.preventDefault(),await this.clearKeyCombinationFn()&&(this.errorState={errorCodes:[],isInvalid:!1},this.buttonKeyboardCombination={code:"",altKey:!1,shiftKey:!1,metaKey:!1,ctrlKey:!1},this.initialKeyCombination={code:"",altKey:!1,shiftKey:!1,metaKey:!1,ctrlKey:!1})}onFocusOut(){this.isEditable&&(this.removeEventListenerToHandleKeyEvents(),this.isHover=!1)}async checkForErrorAndSaveKeyCombination(){this.errorState.isInvalid?this.buttonKeyboardCombination=this.initialKeyCombination:await this.saveKeyCombinationFn()?this.initialKeyCombination=this.buttonKeyboardCombination:this.buttonKeyboardCombination=this.initialKeyCombination}getInputValue(){return this.customValue?this.customValue:(e=>Cq(e)?(e=>(0,Dv.cL)()?e.macOSKey.map(e=>e?.toString()??e).join(""):e.otherOSKey.join("+"))((e=>{const t=[],r=[],n=["AltLeft","AltRight","ControlLeft","ControlRight","MetaLeft","MetaRight","ShiftLeft","ShiftRight"],o={shiftKey:{macOS:"⇧",otherOS:"Shift"},ctrlKey:{macOS:"⌃",otherOS:"Ctrl"},altKey:{macOS:"⌥",otherOS:"Alt"},metaKey:{macOS:"⌘",otherOS:"Windows"}};if(["shiftKey","ctrlKey","altKey","metaKey"].forEach(r=>{e[r]&&t.push(o[r].macOS)}),["ctrlKey","shiftKey","altKey","metaKey"].forEach(t=>{e[t]&&r.push(o[t].otherOS)}),e.code){let o="";o=-1!==e.code.indexOf("Key")?e.code?.split("Key").pop()??"":-1!==e.code.indexOf("Digit")?e.code?.split("Digit").pop()??"":"Comma"===e.code?",":"Equal"===e.code?"'+'":"Backspace"===e.code&&(0,Dv.cL)()?"⌫":-1!==n.indexOf(e.code)?"":e.code,o.length>0&&(t.push(o),r.push(o))}return{macOSKey:t,otherOSKey:r}})(e)):(0,Dv.cu)("Not set"))(this.buttonKeyboardCombination)}render(){return Dv.aH`
3616      <chameleon-text-field
3617        class=${"hotkey-shortcut-keys-input "+(this.position>0?"input-left-space":"")}
3618        value=${this.getInputValue()}
3619        @click=${()=>this.onClick()}
3620        @mouseenter=${this.onMouseEnter}
3621        @mouseleave=${this.onMouseLeave}
3622        @focusout=${this.onFocusOut}
3623        ?error=${this.errorState.errorCodes.length>0}
3624        readonly=${!0}
3625        placeholder=${(0,Dv.cu)("Not set")}
3626        label-id=${this.labelId}
3627      >
3628        ${this.errorState.errorCodes.length>0?Dv.aH`<span slot="helpertext" class="helper-text"
3629              >${(0,Dv.cB)(jq[this.errorState.errorCodes[0]])}</span
3630            >`:null}
3631        ${this.buttonKeyboardCombination&&this.isEditable?Dv.aH`<span
3632              slot="end"
3633              class="clear-key-combination-button ${this.isHover?"visible":"hidden"}"
3634              @click=${e=>this.onClickClearIcon(e)}
3635            >
3636              <chameleon-svg>${(0,Dv.bR)(_b)}</chameleon-svg>
3637            </span>`:null}
3638      </chameleon-text-field>
3639    `}};Kq.tagName="goto-keyboard-shortcut-input";let qq=Kq;Wq([(0,Dv.bS)("chameleon-text-field")],qq.prototype,"input"),Wq([(0,Dv.cn)({type:String})],qq.prototype,"customValue"),Wq([(0,Dv.cn)({type:Object})],qq.prototype,"keyCombination"),Wq([(0,Dv.cn)({type:Number})],qq.prototype,"position"),Wq([(0,Dv.cn)({type:Boolean})],qq.prototype,"isLocal"),Wq([(0,Dv.cn)({type:Boolean})],qq.prototype,"isEditable"),Wq([(0,Dv.cn)({type:String})],qq.prototype,"labelId"),Wq([(0,Dv.cn)()],qq.prototype,"combinationsAreEqual"),Wq([(0,Dv.cn)()],qq.prototype,"validateKeyCombination"),Wq([(0,Dv.cn)()],qq.prototype,"saveKeyCombination"),Wq([(0,Dv.cn)()],qq.prototype,"clearKeyCombination"),Wq([(0,Dv.ct)()],qq.prototype,"buttonKeyboardCombination"),Wq([(0,Dv.ct)()],qq.prototype,"isHover"),Wq([(0,Dv.ct)()],qq.prototype,"errorState");var Gq=Object.defineProperty,Zq=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&Gq(t,r,i),i};const Yq=class extends Dv.co{constructor(){super(...arguments),this.locales=[]}render(){return Dv.aH`
3640      <chameleon-select
3641        size="large"
3642        value=${(0,Dv.cq)(this.selectedLocale)}
3642
3643        selectedValue=${(0,Dv.cq)(this.selectedLocale)}
3644        @change=${this.handleLanguageChange}
3645      >
3646        ${Nb((()=>(this.locales??[]).map(Dv.cO).filter(Boolean))(),e=>e,e=>((e,t)=>Dv.aH`
3647  <chameleon-option value=${e} selected=${t}>${(e=>(0,Dv.cM)(e)?(0,Dv.cB)(Dv.cN[e]):void 0)(e)}</chameleon-option>
3648`)(e,e===this.selectedLocale))}
3649      </chameleon-select>
3650    `}handleLanguageChange(e){e.stopPropagation(),e.cancelBubble=!0;const t=e.target;(0,Dv.cr)().track("GoTo > Settings - Language",{action:"Selected",event:"Changed",language:t.value}),this.updateLocale((0,Dv.cO)(t.value))}updateLocale(e){this.selectedLocale=e,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:e}))}};Yq.tagName="goto-language-select";let Jq=Yq;Zq([(0,Dv.cn)({type:Array,attribute:"locales",reflect:!0})],Jq.prototype,"locales"),Zq([(0,Dv.cn)({type:String,attribute:"selected",reflect:!0})],Jq.prototype,"selectedLocale");const Qq=e=>e??[],Xq=e=>e??"";var eG=Object.defineProperty;const tG=class extends Dv.co{constructor(){super(...arguments),this._locale=(0,Dv.L)()}render(){return Dv.aH`
3651      <div class="settings-page">
3652        <chameleon-typography class="page-header" tag="h1" variant="heading-large">
3653          ${(0,Dv.bQ)("Language")}
3654        </chameleon-typography>
3655        <div class="page-content">
3656          <chameleon-typography class="header-description" tag="p" variant="body-medium">
3657            ${(0,Dv.bQ)("Pick what language you see app-wide.")}
3658          </chameleon-typography>
3659          <goto-language-select
3660            @change=${this.handleLanguageSelected}
3661            .selectedLocale=${this._locale}
3662            .locales=${[...Dv.cP]}
3663          ></goto-language-select>
3664        </div>
3665      </div>
3666    `}async handleLanguageSelected(e){const t=(0,Dv.cO)(e.detail);try{t&&(await(async e=>{if(!(0,Dv.cM)(e))throw new TypeError(`Unsupported locale ${e}`);try{await ib(`${(0,Dv.an)().iamBaseUrl}/identity/v1/Users/me`,{credentials:void 0,method:"PATCH",body:JSON.stringify({locale:e}),headers:[["Content-Type","application/json"]]})}catch(t){const r=`Unable to update user profile's locale with value: '${e}'.`;throw(0,Dv.g)().error(r,t),new Error(r)}})(t),this._locale=t,(0,Dv.cQ)(t))}catch(e){(0,Dv.g)().error(`Unable to update user profile locale '${t}'`,e)}}};tG.tagName="goto-language-settings",tG.styles=(0,Dv.ck)(".settings-page .page-header{border-bottom:1px solid var(--goto-border-color-default);padding:var(--goto-spacing-07) var(--goto-spacing-07) var(--goto-spacing-04) var(--goto-spacing-07)}.settings-page .page-content{margin:var(--goto-spacing-04) var(--goto-spacing-07)}.settings-page .page-content .header-description{margin-bottom:var(--goto-spacing-06)}:host .settings-page .page-content{max-width:45rem}:host goto-language-switcher{margin-bottom:var(--goto-spacing-06);margin-right:var(--goto-spacing-06)}");let rG=tG;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&eG(t,r,o)})([(0,Dv.ct)()],rG.prototype,"_locale");var nG=Object.defineProperty,oG=(e,t,r)=>(((e,t,r)=>{t in e?nG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);const iG=(e,t)=>t&&t.message?`${e}(${t.message})`:e;let sG=class e extends Error{constructor(t){super(iG("ConferenceFinderError",t)),this.cause=t,Object.setPrototypeOf(this,e.prototype)}},aG=class e extends Error{constructor(t){super(iG(`NotFoundError: ${t}`)),oG(this,"query"),this.query=t,Object.setPrototypeOf(this,e.prototype)}};var lG=(e=>(e[e.ED=0]="ED",e[e.RC=1]="RC",e[e.STAGE=2]="STAGE",e[e.LIVE=3]="LIVE",e))(lG||{});const cG={[lG.ED]:{meetingFinderService:"https://meetingfinder.services-ed.goto.com"},[lG.RC]:{meetingFinderService:"https://meetingfinder.services-rc.goto.com"},[lG.STAGE]:{meetingFinderService:"https://meetingfinder.services-stage.goto.com"},[lG.LIVE]:{meetingFinderService:"https://meetingfinder.services.goto.com"}},dG=e=>100*Math.pow(2,2*e),uG=e=>new Promise(t=>{setTimeout(()=>{t()},e)});let hG=class e extends Error{constructor(t,r){super("RetryError"),oG(this,"retryCount"),this.cause=r,this.retryCount=t,Object.setPrototypeOf(this,e.prototype)}};const pG=e=>{switch(e){case Dv.E.ED:return lG.ED;case Dv.E.PROD:case Dv.E.NIGHTLY:return lG.LIVE;case Dv.E.STAGING:return lG.STAGE;case Dv.E.RC:return lG.RC}},gG=/^(\d{1,3})-?(\d{1,3})?-?(\d{1,3})?/,fG={supportedPrefixes:["gotomeet.me","meet.goto.com","app.goto.com/meet","a
3666pp.goto.com/meeting","global.gotomeeting.com/join"],invalidCharacters:/[^\u00C0-\u1FFF\u2C00-\uD7FF\w0-9_\/-]/gi},mG=e=>(e=>e.replace((()=>{const e=fG.supportedPrefixes.map(e=>e.replace("/","\\/").replace(".","\\.")).map(e=>`(${e})`).join("|");return new RegExp(`^(https?:\\/\\/)?(www\\.)?(${e})\\/`,"gi")})(),"").replace(fG.invalidCharacters,""))(e);var vG=Object.defineProperty,bG=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&vG(t,r,i),i};const yG=/^(https?:\/\/|)(www\.|)(meet\.goto\.com|gotomeet\.me|app\.goto\.com\/meeting|)\/?\/[/äöüÄÖÜßa-zA-Z_\-\d]+$/,wG=/^\d{1,3}$|^\d{3}-?\d{0,3}$|^\d{3}-?\d{3}-?\d{0,3}$/,xG=/(^(\d{3})-?(\d{3})-?(\d{4,})$)/,_G=class extends Dv.bP{constructor(){super(...arguments),this.invalidMeetingId=!1,this.meetingLoading=!1}static get styles(){return(0,Dv.ck)(".text-field-container{width:320px;display:grid}.alert-icon{--goto-icon-size: 24px;--goto-icon-color: var(--goto-icon-color-danger)}.invalid-id-message{margin-top:5px}.loading-icon{animation:spin 1s linear infinite}chameleon-text-field::part(label){margin-bottom:0}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media(max-width:653px){.text-field-container{margin-top:var(--goto-spacing-04)}}")}isPossibleMeetingId(e){return wG.test(e)}isPossibleMeetingUrl(e){return yG.test(e)}isTooLongForMeetingId(e){return xG.test(e)}formatInputDisplay(e){let t=e;return this.isPossibleMeetingUrl(e)&&(t=mG(e)),this.isPossibleMeetingId(t)&&(t=(e=>(e=>{const t=(e=>e.replace(gG,"$1$2$3"))(e).match(/.{1,3}/g)?.join("-");return e.endsWith("-")?t+"-":t})(e))(t)),this.isTooLongForMeetingId(t)?t.replace(/-/g,""):t}handleMeetingIdInputButtonClick(){this.handleMeetingId()}handleMeetingIdInputKeydown(e){"Enter"===e.key&&this.handleMeetingId()}async handleMeetingId(){if(!this.meetingIdInputField?.value)return void(this.invalidMeetingId=!0);const e=await(async e=>{const t=(0,Dv.an)().environment;try{return(await(async(e,t)=>{const r=cG[t.environment].meetingFinderService,n=t.fetch||globalThis.fetch,o=t.encodeURIComponent||globalThis.encodeURIComponent;try{const i=await(await(async(e,t,r,n)=>{let o,i=0;for(let s=0;s<=r;s++){try{const r=await e();if(!t(r))return r}catch(e){o=e}if(s<r){const e=dG(s);await uG(e),i++,n?.(i,o)}}throw new hG(i,o)})(()=>n(`${r}/find?id=${o(e)}`,{headers:{"accept-header":"application/json","x-client-name":t.clientName},method:"GET"}),e=>200!==e.status&&404!==e.status,t.retries,t.onRetry)).json();if(i[0])return i[0];throw new aG(e)}catch(e){throw new sG(e)}})(e,{clientName:"shell-landing-page",environment:pG(t),retries:3})).meetingId}catch{return}})(this.meetingIdInputField.value);e?(this.meetingLoading=!0,this.invalidMeetingId=!1,(e=>{(0,Dv.cR)({namespace:"meeting-experience",commandName:"launchConference"},{id:e,type:"meeting"})})(e)):this.invalidMeetingId=!0}handleInput(e){const t=e.target.value;this.meetingIdInputField&&(this.meetingIdInputField.value=this.formatInputDisplay(t)),this.invalidMeetingId=!1}render(){return Dv.aH`
3667      <div class="text-field-container">
3668        <chameleon-text-field
3669          class="meeting-id-input-field"
3670          placeholder="${(0,Dv.bQ)("Enter meeting name or ID")}"
3671          fieldsize="xlarge"
3672          fullwidth
3673          @keydown=${this.handleMeetingIdInputKeydown}
3674          @input=${this.handleInput}
3675          ?error=${this.invalidMeetingId}
3676          label=${(0,Dv.bQ)("Enter meeting name or ID")}
3677        >
3678          ${this.invalidMeetingId?Dv.aH` <chameleon-svg class="alert-icon" slot="end">${(0,Dv.bR)(bb)}</chameleon-svg>`:Dv.cm}
3679          ${this.meetingLoading?Dv.aH`<chameleon-icon-button size="large" variant="primary" slot="end" label=${(0,Dv.bQ)("Meeting loading")}>
3680                <chameleon-svg class="loading-icon">${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22V18.3636C8.48546 18.3636 5.63636 15.5145 5.63636 12C5.63636 8.48546 8.48546 5.63636 12 5.63636V2Z" fill="currentColor"></path></svg>')}</chameleon-svg></chameleon-icon-button
3681              >`:Dv.aH`
3682                <chameleon-icon-button
3683                  slot="end"
3684                  class="join-icon-button"
3685                  id="join-icon-button"
3686                  size="large"
3687                  variant="primary"
3688                  @click=${this.handleMeetingIdInputButtonClick}
3689                  label=${(0,Dv.bQ)("Join")}
3690                >
3691                  <chameleon-svg>${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M22 2H8.99999V5H11V4H20V20H11V19H8.99999V22H22V2ZM11.2929 16.2929L12.7071 17.7071L18.4142 12L12.7071 6.29289L11.2929 7.7071L14.5858 11L2 11V13L14.5858 13L11.2929 16.2929Z" fill="currentColor"></path></svg>')}</chameleon-svg>
3692                </chameleon-icon-button>
3693                <chameleon-tooltip position="bottom-center" trigger-id="join-icon-button">
3694                  ${(0,Dv.bQ)("Join")}</chameleon-tooltip
3695                >
3696              `}
3697        </chameleon-text-field>
3698        ${this.invalidMeetingId?Dv.aH` <chameleon-typography class="invalid-id-message" variant="caption-medium" color="type-color-danger"
3699              >${(0,Dv.bQ)("A valid meeting name or ID is required")}</chameleon-typography
3700            >`:Dv.cm}
3701      </div>
3702    `}};_G.tagName="goto-meeting-id-input";let kG=_G;bG([(0,Dv.bS)(".meeting-id-input-field")],kG.prototype,"meetingIdInputField"),bG([(0,Dv.ct)()],kG.prototype,"invali
3702dMeetingId"),bG([(0,Dv.ct)()],kG.prototype,"meetingLoading");const CG=e=>{const t=(0,Dv.cT)();if(t.match(new RegExp(`^[^?#]*${Dv.cS}`,"g")))return!1;const r=e.replace(/\/$/g,"").replace(/\?/g,"\\?");return new RegExp(`^(${r})(?:\\/|&|$)`,"g").test(t)},SG=(e,t)=>"string"==typeof e?e:t.active?e.active:e.inactive,EG={"sidepanel.goto.com":"app.goto.com","sidepanel.nightly.goto.com":"app.nightly.goto.com","sidepanel.stage.gtc.goto.com":"app.stage.gtc.goto.com","sidepanel.rc.gtc.goto.com":"app.rc.gtc.goto.com","sidepanel.ed.gtc.goto.com":"app.ed.gtc.goto.com"},IG=e=>{if((0,Dv.cs)()!==Dv.p.SIDE_PANEL)return e;try{const t=new URL(e,(0,Dv.cU)());for(const[e,r]of Object.entries(EG))if(t.hostname===e){t.hostname=r;break}return t.toString()}catch(t){return(0,Dv.g)().error(`nonSidePanelIntegrationUrl: failed to parse URL: ${e}`,t),e}};var AG=Object.defineProperty,TG=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&AG(t,r,i),i};class OG extends Dv.bP{constructor(){super(...arguments),this.navigationItems=[],this.staticNavigationItems=[],this.unsubscribeBadgeEvents=[],this.rerenderNavrail=()=>{this.requestUpdate()}}connectedCallback(){super.connectedCallback(),this.subscribeToRouteChangeEvent(),this.subscribeToLocaleChangeEvent()}subscribeToRouteChangeEvent(){const{routeChanged:e}=(0,Dv.au)().subscribeTo("Shell");e.on(this.rerenderNavrail),this.unsubscribeFunctions.push(()=>e.removeListener(this.rerenderNavrail))}subscribeToLocaleChangeEvent(){const{localeChanged:e}=(0,Dv.au)().subscribeTo("I18N");e.on(this.rerenderNavrail),this.unsubscribeFunctions.push(()=>e.removeListener(this.rerenderNavrail))}subscribeToBadgeEvent(){this.unsubscribeFromAllBadgeEvents(),this.navigationItems.concat(this.staticNavigationItems).map(e=>{const t=()=>{this.rerenderNavrail()};(0,Dv.H)().addEventListener("change",t,{id:e.id,showInNavigation:!0}),this.unsubscribeBadgeEvents.push(()=>{(0,Dv.H)().removeEventListener("change",t)})})}unsubscribeFromAllBadgeEvents(){this.unsubscribeBadgeEvents.forEach(e=>e()),this.unsubscribeBadgeEvents=[]}getBadgeCount(e){return(0,Dv.H)().getBadgeNumberValue({id:e.id,showInNavigation:!0})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromAllBadgeEvents()}}TG([(0,Dv.ct)()],OG.prototype,"navigationItems"),TG([(0,Dv.ct)()],OG.prototype,"staticNavigationItems");const LG="NavigationNamespace",$G={linksUpdated:(0,Dv.F)()},{emit:NG}=(0,Dv.au)().register(LG,$G),RG=()=>{NG.linksUpdated()},PG="shell.navRail.order",DG=new class{constructor(){this.navigationOrder=[],this.defaultOrder=[]}sortNavigationItems(e){const t=this.navigationOrder.length;return e.sort((e,r)=>{let n=this.navigationOrder.indexOf(e.id);n=-1===n?t:n;let o=this.navigationOrder.indexOf(r.id);return o=-1===o?t:o,n-o})}getNavigationOrder(){return this.navigationOrder}async getNavigationOrderFromUserPreferences(){return await((0,Dv.Z)().userPreferences?.getPreference(PG,null))}setNavigationOrder(e){const t=0===this.defaultOrder.length;t&&(this.defaultOrder=[...e]),(this.navigationOrder.length!==e.length||this.navigationOrder.some((t,r)=>t!==e[r]))&&(this.navigationOrder=[...e],t||this.setNavigationOrderInUserPreferences(e))}async setNavigationOrderInUserPreferences(e){const t=(0,Dv.Z)();t?.userPreferences&&await t.userPreferences.setPreference(PG,e,Dv.U.CLOUD_PER_ACCOUNT)}async validateAndCleanOrder(e){const t=await this.getNavigationOrderFromUserPreferences();if(!t||0===t.length)return[];const r=new Set(e.map(e=>e.id)),n=t.filter(e=>r.has(e));if(0===n.length)return await this.setNavigationOrderInUserPreferences([]),[];const o=[...n],i=new Set(o);return e.forEach((e,t)=>{if(i.has(e.id))return;const r=Math.min(t,o.length);o.splice(r,0,e.id),i.add(e.id)}),(o.length!==t.length||o.some((e,r)=>e!==t[r]))&&await this.setNavigationOrderInUserPreferences(o),o}async resetNavigationOrder(){this.navigationOrder=this.defaultOrder,await((0,Dv.Z)().userPreferences?.setPreference(PG,null,Dv.U.CLOUD_PER_ACCOUNT))}getNavigationItemsFromCache(){const e=[],t=(0,Dv.cV)();return t?.length&&t.forEach(t=>
3702{t.navigationItems?.length&&t.navigationItems.forEach(t=>{e.push(t)})}),this.sortNavigationItems(e)}},MG=()=>DG;var zG=Object.defineProperty;class FG extends OG{constructor(){super(),this.links=[],this.handleLinksUpdated=async()=>{this.setNavLinks()},this.navigationItemsService=MG()}connectedCallback(){super.connectedCallback(),this.setNavLinks();const{linksUpdated:e}=(0,Dv.au)().subscribeTo(LG);e.on(this.handleLinksUpdated),this.unsubscribeFunctions.push(()=>{e.removeListener(this.handleLinksUpdated)})}setNavLinks(){this.links=this.navigationItemsService.getNavigationItemsFromCache(),this.linksUpdated()}}((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&zG(t,r,o)})([(0,Dv.ct)()],FG.prototype,"links");class UG{async subscribeNavItemShortcuts(e){const t=[];for(let r=0;r<9;r++){const n=`navigation${r+1}`;try{const o=await Dv.bA.KeyboardShortcuts.subscribe(n,window,()=>e(r));t.push(o)}catch(e){(0,Dv.g)().error("Failed to subscribe a navigation item to keyboard shortcut",e)}}return t}}class BG{constructor(){this.sidebarContainerSelector=Dv.cW}createSidebarElement(){return(0,Dv.bL)().createElement(aZ.tagName)}show(){this.sidebarElement||(this.sidebarElement=this.createSidebarElement());const e=(0,Dv.bL)().querySelector(this.sidebarContainerSelector);this.sidebarElement?.parentElement!==e&&e?.appendChild(this.sidebarElement)}hide(){this.sidebarElement?.parentElement&&this.sidebarElement?.remove()}isVisible(){return!!this.sidebarElement&&null!==this.sidebarElement.parentNode}}let HG,jG;const VG=()=>(HG||(HG=WG()),HG),WG=()=>{const e=KG();return Object.freeze({show(){return e.show()},hide(){return e.hide()},isVisible(){return e.isVisible()}})},KG=()=>(jG||(jG=new BG),jG);class qG{constructor(){this.gridMode="sm",this.navigationState={isOpen:!1,isNavrailFloating:!1,isSidebarFloating:!1},this.gridModeChangeListeners=new Set,this.navigationStateChangeListeners=new Set,this.responsiveBreakpointChangeListener=e=>{const{routeChanged:t}=(0,Dv.au)().subscribeTo("Shell");e.active?t.addListener(this.toggleOpenStateOnRouteChange):(t.removeListener(this.toggleOpenStateOnRouteChange),this.resetNavigationOpenState()),this.updateIsSidebarFloatingState(e.active),VG().isVisible()&&!(0,Dv.cX)()&&(0,Dv.bs)(Dv.bt.SHELL_HIDDEN_FLOATING_NAVRAIL)&&this.updateIsNavrailFloatingState(e.active)},this.toggleOpenStateOnRouteChange=()=>{(0,Dv.bs)(Dv.bt.SHELL_HIDDEN_FLOATING_SIDEBAR)&&(0,Dv.bg)()===Dv.aI&&!this.navigationState.isOpen&&this.toggleNavigationOpenState()},this.handleOutsideClick=e=>{const t=e.composedPath(),r=!!t.find(e=>e instanceof HTMLElement&&e.classList.contains("shell-sidebar")),n=!!t.find(e=>e instanceof HTMLElement&&["goto-nav-rail","goto-integration-topbar"].includes(e.tagName.toLowerCase())),o=(0,Dv.bs)(Dv.bt.SHELL_HIDDEN_FLOATING_SIDEBAR),i=(0,Dv.bs)(Dv.bt.SHELL_HIDDEN_FLOATING_NAVRAIL);o||!i?!r&&!n&&this.resetNavigationOpenState():n||this.resetNavigationOpenState()};const e=Xv(void 0,"sm",this.responsiveBreakpointChangeListener);(0,Dv.cY)(()=>{e()})}updateGridMode(e){this.gridMode!==e&&(this.gridMode=e,this.notifyGridModeChange())}resetNavigationOpenState(){this.navigationState.isOpen&&(this.navigationState.isOpen=!1,this.notifyNavigationStateChange()),(0,Dv.bL)().removeEventListener("click",this.handleOutsideClick)}updateIsNavrailFloatingState(e){this.navigationState.isNavrailFloating!==e&&(this.navigationState.isNavrailFloating=e,this.notifyNavigationStateChange())}updateIsSidebarFloatingState(e){this.navigationState.isSidebarFloating!==e&&(this.navigationState.isSidebarFloating=e,this.notifyNavigationStateChange())}toggleNavigationOpenState(){this.navigationState.isOpen=!this.navigationState.isOpen,this.notifyNavigationStateChange(),this.navigationState.isOpen?(0,Dv.cZ)().then(()=>(0,Dv.bL)().addEventListener("click",this.handleOutsideClick)):(0,Dv.bL)().removeEventListener("click",this.handleOutsideClick)}subscribeToGridModeChange(e){const t=()=>{e(this.gridMode)};return this.gridModeChangeListeners.add(t),t(),()=>{this.gridModeChangeListeners.delete(t)}}subscribeToNavigationState(e){const t=()=>{e({...this.navigationState})};return this.navigationStateChangeListeners.add(t),t(),()=>{this.navigationStateChangeListeners.delete(t)}}
3702notifyGridModeChange(){this.gridModeChangeListeners.forEach(e=>e(this.gridMode))}notifyNavigationStateChange(){this.navigationStateChangeListeners.forEach(e=>e({...this.navigationState}))}}let GG;const ZG=()=>(GG||(GG=new qG),GG);class YG{constructor(){this.activeDragTarget=null,this.registeredDropZones=new Map}registerDropZone(e){this.registeredDropZones.set(e,!1)}startDrag(e){this.activeDragTarget=e}endDrag(){this.resetDropZones(),this.activeDragTarget=null}handleDragOver(e){this.resetDropZones(),this.registeredDropZones.set(e,!0)}handleDrop(){if(!this.activeDragTarget)return null;const e=this.getActiveDropZone();if(!e)return null;const t=this.activeDragTarget;return this.endDrag(),{draggedId:t,dropZoneId:e}}getActiveDropZone(){for(const[e,t]of this.registeredDropZones.entries())if(t)return e;return null}getActiveDragTarget(){return this.activeDragTarget}resetDropZones(){this.registeredDropZones.forEach((e,t)=>{this.registeredDropZones.set(t,!1)})}}const JG=(e,t)=>Array.isArray(e)&&0!==e.length?[...e.map(e=>t.find(t=>t.id===e)).filter(Boolean),...t.filter(t=>!e.includes(t.id))]:t;var QG=Object.defineProperty,XG=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&QG(t,r,i),i};const eZ="expanded",tZ="collapsed",rZ="navrail-toggle",nZ="nav-rail-area",oZ=()=>(0,Dv.bs)(Dv.bt.SHELL_NAVRAIL_CUSTOMIZATION);var iZ;const sZ=(iZ=class extends FG{constructor(){super(),this.state=eZ,this.forceCollapsed=!1,this.contextHoveredItemId=null,this.handleDragOverItem=(e,t)=>{this.isValidNavRailDrag({activeDragTarget:this.dragManager.getActiveDragTarget()})&&(e.preventDefault(),this.dragManager.handleDragOver(this.getDropZoneIdForIndex(t)),this.requestUpdate())},this.handleDragStart=e=>{const t=e.target?.closest("[data-drag-target]"),r=t?.getAttribute("data-drag-target");r&&(this.dragManager.startDrag(r),e.dataTransfer&&(e.dataTransfer.setData("text/plain",r.replace("nav-item-","")),e.dataTransfer.setData("drag-target-id",nZ)),t?.classList.add("dragging"))},this.handleDragEnd=()=>{this.dragManager.endDrag(),this.requestUpdate(),this.navItems?.forEach(e=>{e.classList.remove("dragging")}),this.navLinks?.forEach(e=>{e.classList.remove("dragging")})},this.handleDropItem=e=>{if(e.preventDefault(),!this.isValidNavRailDrag({dataTransfer:e.dataTransfer}))return;const t=this.dragManager.handleDrop();if(!t)return;const r=t.draggedId.replace("nav-item-",""),n=parseInt(t.dropZoneId.replace("nav-drop-zone-",""),10),o=this.navigationItems.map(e=>e.id),i=function(e,t,r){const n=e.indexOf(t);if(-1===n)return e;let o;if(o=n<r?r-1:r,n===o)return e;const i=[...e];return i.splice(n,1),i.splice(o,0,t),i}(o,r,n);(0,Dv.cr)().track("GoTo > Nav Rail > Change Order",{source:"dragAndDrop"}),this.updateNavigationOrder(i),this.requestUpdate()},this.handleBreakpointChange=e=>{this.forceCollapsed=e.active},this.handleKeyboardShortcutPressed=e=>{const t=this.navigationItems[e];if(t)if(t.externalLink){const e=IG(t.pathname);(0,Dv.bk)(e)}else(0,Dv.bj)(t.pathname);else(0,Dv.g)().warn(`No navigation item found for index ${e}`)},this.handleNavigationStateChange=e=>{this.classList.toggle("floating-navrail",e.isNavrailFloating),this.classList.toggle("show",e.isOpen)},this.renderStaticNavItems=()=>this.staticNavigationItems.map(e=>this.renderStaticNavRailItem(e)),this.handleContextMenuNavItem=(e,t)=>{const r=t.id;this.contextHoveredItemId=t.id;const n=e=>()=>{const t=this.navigationItems.map(e=>e.id),n=t.indexOf(r),o=function(e,t,r){const n=[...e];if(t<0||t>=e.length||t===r)return n;let o=r;o<0?o=n.length-1:o>=n.length&&(o=0);const i=e[t];return n.splice(t,1),n.splice(o,0,i),n}(t,n,e(t,n));(0,Dv.cr)().track("GoTo > Nav Rail > Change Order",{source:"contextMenu"}),this.updateNavigationOrder(o)},o={label:(0,Dv.cB)("Move up"),icon:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M20.7071 10.2929L19.2929 11.7071L13 5.41421L13 22H11L11 5.41421L4.70711 11.7071L3.29289 10.2929L12 1.58578L20.7071 10.2929Z" fill="currentColor"></path></svg>',executeFunction:n((e,t)=>t-1)},i={label:(0,Dv.cB)("Move down"),icon:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.29289 13.7071L4.70711 12.2929L11 18.5858L11 2L13 2L13 18.5858L19.2929 12.2929L20.7071 13.7071L12 22.4142L3.29289 13.7071Z" fill="currentColor"></path></svg>',executeFunction:n((e,t)=>t+1)},s={label:(0,Dv.cB)("Move to top"),icon:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 4.58579L19.7071 12.2929L18.2929 13.7071L13 8.41421V22H11V8.41421L5.70711 13.7071L4.29289 12.2929L12 4.58579Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M20 4H4V2H20V4Z" fill="currentColor"></path></svg>',executeFunction:n((e,t)=>0)},a={label:(0,Dv.cB)("Move to bottom"),icon:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 19.4142L4.29289 11.7071L5.70711 10.2929L11 15.5858L11 2L13 2L13 15.5858L18.2929 10.2929L19.7071 11.7071L12 19.4142Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M4 20H20V22H4L4 20Z" fill="currentColor"></path></svg>',executeFunction:n((e,t)=>e.length-1)},l={label:(0,Dv.cB)("Reset to default"),icon:Tb,executeFunction:async()=>{this.resetNavigationOrder()}};Zv(e,s),Zv(e,o),Zv(e,i),Zv(e,a),Zv(e,l),document.addEventListener("click",()=>{this.contextHoveredItemId=null,this.requestUpdate()},{once:!0})}
3702,this.navigationKeyboardShortcutService=new UG,this.dragManager=new YG}static get styles(){return(0,Dv.ck)(":host{height:100%}:host .nav-rail{height:100%}:host .nav-rail.force-collapsed::part(toggle-button){display:none}:host chameleon-popover{--z-index: 99999}:host .chameleon-custom-navigation-rail-item{width:inherit}:host(.floating-navrail){position:relative;display:block}:host(.floating-navrail) .nav-rail{--goto-navigation-rail-hidden-offset: -128px;position:absolute;left:var(--goto-navigation-rail-hidden-offset);top:0;height:100%;z-index:2;transition:all var(--goto-duration-modest-02) var(--goto-entrance-easing)}:host(.floating-navrail.show) .nav-rail{--goto-navigation-rail-hidden-offset: 0}chameleon-svg{--goto-icon-size: 24px}chameleon-badge-counter{align-content:center}.fade-in{animation:fadeIn var(--goto-duration-snappy-02)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.drop-indicator{display:contents}.drop-indicator-wrapper{position:relative;display:flex;height:14px;min-height:unset}.drop-indicator-line{position:absolute;top:50%;left:14px;right:14px;height:2px;transform:translateY(-50%);background:var(--goto-icon-color-brand-persistent)}.drop-indicator-circle{position:absolute;top:50%;transform:translateY(-50%);width:6px;height:6px;background:var(--goto-icon-color-brand-persistent);border-radius:50%}.drop-indicator-circle.left{left:7px}.drop-indicator-circle.right{right:7px}.dragging{opacity:.4}.end-drop-zone{opacity:0;cursor:default;margin-block-end:calc(-1 * var(--goto-spacing-02))}chameleon-navigation-rail-item[data-context-hover=true],chameleon-navigation-rail-link[data-context-hover=true]{background:var(--goto-interactive-color-persistent-hover)}")}connectedCallback(){super.connectedCallback(),this.subscribeToNavrailToggle(),this.subscribeToResponsiveNavrailAdjustment(),this.subscribeNavigationToKeyboardShortcutByIndex(),this.subscribeToOpenNavAndSidebarChange(),this.setupDragAndDrop();const{navrailOrderReset:e}=(0,Dv.au)().subscribeTo("Shell");e.on(()=>this.resetNavigationOrder())}disconnectedCallback(){super.disconnectedCallback(),(0,Dv.bs)(Dv.bt.SHELL_HIDDEN_FLOATING_NAVRAIL)&&ZG().updateIsNavrailFloatingState(!1)}linksUpdated(){if(oZ()){const e=this.links.filter(e=>!e.staticItem);MG().validateAndCleanOrder(e).then(e=>{this.updateNavigationItems(e)})}else this.updateNavigationItems()}getDropZoneIdForIndex(e){return`nav-drop-zone-${e}`}isValidNavRailDrag(e){if("activeDragTarget"in e){const{activeDragTarget:t}=e;return!!t&&t.startsWith("nav-item-")}if("dataTransfer"in e){const{dataTransfer:t}=e;return!!t&&t.getData("drag-target-id")===nZ}return!1}setupDragAndDrop(){for(let e=0;e<=this.navigationItems.length;++e)this.dragManager.registerDropZone(this.getDropZoneIdForIndex(e))}async subscribeToNavrailToggle(){const e=(0,Dv.Z)().userPreferences;this.state=await(e?.getPreference(`shell.${aZ.tagName}.state`,eZ));const t=()=>{this.state=this.toggleState(this.state),e?.setPreference("shell",{[iZ.tagName]:{state:this.state}}),this.requestUpdate()};this.addEventListener(rZ,t),this.unsubscribeFunctions.push(()=>{this.removeEventListener(rZ,t)})}subscribeToResponsiveNavrailAdjustment(){this.unsubscribeFunctions.push(Xv(void 0,"lg",this.handleBreakpointChange))}toggleState(e){return e===eZ?tZ:eZ}async subscribeNavigationToKeyboardShortcutByIndex(){const e=await this.navigationKeyboardShortcutService.subscribeNavItemShortcuts(this.handleKeyboardShortcutPressed);this.unsubscribeFunctions.push(...e)}subscribeToOpenNavAndSidebarChange(){(0,Dv.bs)(Dv.bt.SHELL_HIDDEN_FLOATING_NAVRAIL)&&this.unsubscribeFunctions.push(ZG().subscribeToNavigationState(this.handleNavigationStateChange))}updateNavigationItems(e=MG().getNavigationOrder()){const t=[...this.links];this.navigationItems=JG(e,t.filter(e=>!e.staticItem)),this.staticNavigationItems=t.filter(e=>e.staticItem),this.subscribeToBadgeEvent()}updateNavigationOrder(e){MG().setNavigationOrder(e),this.updateNavigationItems(e)}resetNavigationOrder(){MG().resetNavigationOrder(),(0,Dv.cr)().track("GoTo > Nav Rail > Reset Order",{}),this.updateNavigationItems()}render(){return(0,Dv.O)().isIntegration?Dv.cm:Dv.aH`
3703          <chameleon-navigation-rail
3704            class="nav-rail fade-in ${this.forceCollapsed?"force-collapsed":""}"
3705            size="medium"
3706            collapse-label="${(0,Dv.bQ)("Collapse")}"
3707            expand-label="${(0,Dv.bQ)("Expand")}"
3708            state="${this.forceCollapsed?tZ:this.state}"
3709            label=${(0,Dv.bQ)("Left navigation menu")}
3710          >
3711            ${this.renderNavItems()}${this.renderEndDropZone(this.navigationItems.length)}${this.renderStaticNavItems()}
3712            ${this.renderAppSwitcher()}</chameleon-navigation-rail
3713          >
3714        `}renderNavItems(){const e=this.navigationItems,t=[];for(let r=0;r<=e.length;r++)if(t.push(this.renderDropIndicator(r)),r<e.length){const n=e[r];t.push(n.externalLink?this.renderNavRailLink(n,r):this.renderNavRailItem(n,r))}return t}renderEndDropZone(e){return Dv.aH`
3715      <div
3716        class="end-drop-zone"
3717        slot="secondary-items"
3718        draggable="false"
3719        @dragover=${t=>this.handleDragOverItem(t,e)}
3720        @drop=${this.handleDropItem}
3721      ></div>
3722    `}renderDropIndicator(e){if(!oZ())return Dv.cm;const t=this.dragManager.getActiveDropZone()===this.getDropZoneIdForIndex(e);return Dv.aH`
3723      <div
3724        class="drop-indicator"
3725        @dragover=${t=>this.handleDragOverItem(t,e)}
3726        @drop=${this.handleDropItem}
3727      >
3728        ${t?Dv.aH`
3729              <div class="drop-indicator-wrapper">
3730                <div class="drop-indicator-line"></div>
3731                <div class="drop-indicator-circle left"></div>
3732                <div class="drop-indicator-circle right"></div>
3733              </div>
3734            `:Dv.cm}
3735      </div>
3736    `}renderNavRailLink(e,t){const r=CG(e.pathname),n=IG(e.pathname),o=this.contextHoveredItemId===e.id&&!r;return Dv.aH`
3737      <chameleon-navigation-rail-link
3738        href="${n}"
3739        data-testid="${(0,Dv.cq)(e.dataTest)}"
3740        navigation-id="${e.id}"
3741        ?selected=${r}
3742        data-context-hover=${o?"true":Dv.cm}
3743        draggable=${oZ()?"true":"false"}
3744        data-drag-target="nav-item-${e.id}"
3745        @dragstart=${oZ()?this.handleDragStart:void 0}
3746        @dragend=${oZ()?this.handleDragEnd:void 0}
3747        @dragover=${oZ()?e=>this.handleDragOverItem(e,t):void 0}
3748        @drop=${oZ()?this.handleDropItem:void 0}
3749        @contextmenu=${oZ()?t=>this.handleContextMenuNavItem(t,e):void 0}
3750      >
3751        ${e.displayName}
3752        <chameleon-svg slot="start">${(0,Dv.bR)(SG(e.icon,{active:r}))} </chameleon-svg>
3753        ${this.renderBadge(e)}
3754      </chameleon-navigation-rail-link>
3755    `}renderStaticNavRailItem(e){const t=CG(e.pathname),r=this.contextHoveredItemId===e.id&&!t;return Dv.aH`
3756      <chameleon-navigation-rail-item
3757        slot="secondary-items"
3758        @change=${()=>{t||((0,Dv.d1)(e.pathname),(0,Dv.bj)(e.pathname))}}
3759        data-testid="${(0,Dv.cq)(e.dataTest)}"
3760        navigation-id="${e.id}"
3761        ?selected=${t}
3762        data-context-hover=${r?"true":Dv.cm}
3763      >
3764        ${e.displayName}
3765        <chameleon-svg slot="start">${(0,Dv.bR)(SG(e.icon,{active:t}))} </chameleon-svg>
3766        ${this.renderBadge(e)}
3767      </chameleon-navigation-rail-item>
3768    `}renderNavRailItem(e,t){const r=CG(e.pathname),n=this.contextHoveredItemId===e.id&&!r;return Dv.aH`
3769      <chameleon-navigation-rail-item
3770        @change=${()=>{r||((0,Dv.d1)(e.pathname),(0,Dv.bj)(e.pathname))}}
3771        data-testid="${(0,Dv.cq)(e.dataTest)}"
3772        navigation-id="${e.id}"
3773        ?selected=${r}
3774        data-context-hover=${n?"true":Dv.cm}
3775        draggable=${oZ()?"true":"false"}
3776        data-drag-target="nav-item-${e.id}"
3777        @dragstart=${this.handleDragStart}
3778        @dragend=${this.handleDragEnd}
3779        @dragover=${e=>this.handleDragOverItem(e,t)}
3780        @drop=${this.handleDropItem}
3781        @contextmenu=${oZ()?t=>this.handleContextMenuNavItem(t,e):void 0}
3782      >
3783        ${e.displayName}
3784        <chameleon-svg slot="start">${(0,Dv.bR)(SG(e.icon,{active:r}))} </chameleon-svg>
3785        ${this.renderBadge(e)}
3786      </chameleon-navigation-rail-item>
3787    `}renderBadge(e){const t=this.getBadgeCount(e);return t&&t>0?Dv.aH`
3788          <chameleon-badge-counter
3789            size="small"
3790            slot="end"
3791            data-testid="badge-${(0,Dv.cq)(e.dataTest)}"
3792            label=${(0,Dv.bQ)("New notifications")}
3793          >
3794            ${t}
3795            <span slot="max">${(0,Dv.bQ)("{{badgeCount}}+",()=>({badgeCount:99}))}</span>
3796          </chameleon-badge-counter>
3797        `:Dv.cm}renderAppSwitcher(){return(0,Dv.bs)(Dv.bt.SHELL_APPLICATION_SWITCHER)?Dv.aH`
3798          <goto-app-switcher
3799            role=${"menuitem"}
3800            class="chameleon-custom-navigation-rail-item"
3801            slot="secondary-items"
3802          ></goto-app-switcher>
3803        `:Dv.cm}},iZ.tagName="goto-nav-rail",iZ);XG([(0,Dv.ct)()],sZ.prototype,"state"),XG([(0,Dv.ct)()],sZ.prototype,"forceCollapsed"),XG([(0,Dv.ct)()],sZ.prototype,"contextHoveredItemId"),XG([mb("chameleon-navigation-rail-item")],sZ.prototype,"navItems"),XG([mb("chameleon-navigation-rail-link")],sZ.prototype,"navLinks");let aZ=sZ;var lZ=Object.defineProperty;const cZ=e=>e.checked,dZ=class extends Dv.bP{constructor(){super(...arguments),this.notificationSettings={general:{message:!0,call:!0,meeting:!0},doNotDisturb:{message:!0,meeting:!0}},this.switchTurnedOffFromCheckbox=!1,this.switchTurnedOnFromCheckbox=!1,this.generalCheckboxArray=[{id:"#general-message",notification:"message",category:"general"},{id:"#general-call",notification:"call",category:"general"},{id:"#general-meeting",notification:"meeting",category:"general"}],this.dndCheckboxArray=[{id:"#dnd-message",notification:"message",category:"dnd"},{id:"#dnd-meeting",notification:"meeting",category:"dnd"}],this.handleSwitch=()=>{const e=this.shadowRoot?.querySelector(".general-switch");e&&(e.addEventListener("change",this.handleSwitchEventListener),this.unsubscribeFunctions.push(()=>{e.removeEventListener("change",this.handleSwitchEventListener)}))},this.handleSwitchEventListener=e=>{e.target.checked?this.switchTurnedOnFromCheckbox?this.switchTurnedOnFromCheckbox=!1:this.setGeneralSettings(!0):this.switchTurnedOffFromCheckbox?this.switchTurnedOffFromCheckbox=!1:this.setGeneralSettings(!1)},this.setGeneralSettings=e=>{this.notificationSettings.general.message=e,this.notificationSettings.general.call=e,this.notificationSettings.general.meeting=e,this.setNotificationSettingsInLocalStorage(),this.updateCheckboxes(),$C(this.notificationSettings)},this.handleCheckboxes=()=>
3803{this.generalCheckboxArray.forEach(e=>{const t=this.shadowRoot?.querySelector(e.id);if(!t)return;const r=t=>this.generalCheckboxEvent(t.target,e);t.addEventListener("change",r),this.unsubscribeFunctions.push(()=>t.removeEventListener("change",r))}),this.dndCheckboxArray.forEach(e=>{const t=this.shadowRoot?.querySelector(e.id);if(!t)return;const r=t=>this.dndCheckboxEvent(t.target,e);t.addEventListener("change",r),this.unsubscribeFunctions.push(()=>t.removeEventListener("change",r))})}}static get styles(){return(0,Dv.ck)(":host{display:block}.notifications-settings-section{max-width:720px}.notifications-header{border-bottom:1px solid var(--goto-border-color-default);margin-top:var(--goto-spacing-07);padding-left:var(--goto-spacing-07);padding-bottom:var(--goto-spacing-04)}.header-description{margin-bottom:var(--goto-spacing-06);margin-left:var(--goto-spacing-07);margin-top:var(--goto-spacing-04)}.content-description{margin-top:var(--goto-spacing-01)}.notifications-content{margin-right:var(--goto-layout-05);margin-bottom:var(--goto-spacing-08);margin-left:var(--goto-spacing-07)}.notifications-content .content-headers{margin-bottom:0;margin-top:var(--goto-spacing-02)}.notifications-content .switch-block{display:flex;justify-content:space-between;max-width:45rem;margin-top:var(--goto-spacing-04);margin-bottom:var(--goto-spacing-06)}.notifications-content .switch-block .switch-text-block{display:block}.notifications-content .switch-block .general-switch,.notifications-content .switch-block .dnd-switch{align-items:flex-start;margin-left:var(--goto-spacing-09);margin-top:var(--goto-spacing-06)}.notifications-content .checkbox{margin-bottom:var(--goto-spacing-04)}.notifications-content .general-checkboxes,.notifications-content .dnd-checkboxes{display:flex;flex-direction:column;margin-top:var(--goto-spacing-04)}")}getLocalNotificationSettings(){return this.notificationSettings}firstUpdated(e){super.firstUpdated(e),this.notificationSettings=RC(),this.updateCheckboxes(),this.handleSwitch(),this.handleCheckboxes(),this.toggleSwitchOn()}generalCheckboxEvent(e,t){const r=cZ(e);this.notificationSettings.general[t.notification]=r,r?this.toggleSwitchOn():this.toggleSwitchOff(),this.setNotificationSettingsInLocalStorage(),$C(this.notificationSettings)}dndCheckboxEvent(e,t){const r=cZ(e);this.notificationSettings.doNotDisturb[t.notification]=r,this.setNotificationSettingsInLocalStorage(),$C(this.notificationSettings)}updateCheckboxes(){const e=e=>this.shadowRoot?.querySelector(e);this.generalCheckboxArray.forEach(t=>{const r=e(t.id);r&&(r.checked=this.notificationSettings.general[t.notification])}),this.dndCheckboxArray.forEach(t=>{const r=e(t.id);r&&(r.checked=this.notificationSettings.doNotDisturb[t.notification])})}toggleSwitchOff(){const e=this.shadowRoot?.querySelector(".general-switch");e.checked&&(this.switchTurnedOffFromCheckbox=!0,e.checked=!1)}toggleSwitchOn(){const e=this.shadowRoot?.querySelector(".general-switch"),t=Array.from(this.shadowRoot?.querySelectorAll(".general-checkboxes chameleon-checkbox")??[]);!e.checked&&t.length&&t.every(e=>e.checked)&&(this.switchTurnedOnFromCheckbox=!0,e.checked=!0)}setNotificationSettingsInLocalStorage(){(0,Dv.aW)(Dv.aX.notificationSettings,JSON.stringify(this.notificationSettings))}render(){return Dv.aH`
3804      <chameleon-typography class="notifications-header" tag="h1" variant="heading-large">
3805        ${(0,Dv.bQ)("Notifications")}
3806      </chameleon-typography>
3807      <div class="notifications-settings-section">
3808        <chameleon-typography class="header-description" tag="p" variant="body-medium">
3809          ${(0,Dv.bQ)("Decide which notifications to show and when, depending on how busy you are.")}
3810        </chameleon-typography>
3811        <div class="notifications-content">
3812          <chameleon-typography tag="p" variant="heading-small">${(0,Dv.bQ)("General")}</chameleon-typography>
3813          <div class="switch-block">
3814            <div class="switch-text-block">
3815              <chameleon-typography class="content-headers" tag="p" variant="body-large">
3816                ${(0,Dv.bQ)("Show all")}
3817              </chameleon-typography>
3818              <chameleon-typography
3819                class="content-description"
3820                tag="p"
3821                variant="caption-medium"
3822                color="type-color-secondary"
3823              >
3824                ${(0,Dv.bQ)("Receive in-app banner notifications for messages, calls, and meeting reminders.")}
3825              </chameleon-typography>
3826              <chameleon-typography class="content-headers" tag="p" variant="body-large">
3827                ${(0,Dv.bQ)("Customize")}
3828              </chameleon-typography>
3829              <chameleon-typography
3830                class="content-description"
3831                tag="p"
3832                variant="caption-medium"
3833                color="type-color-secondary"
3834              >
3835                ${(0,Dv.bQ)("Choose what you would like to receive in-app banner notifications for.")}
3836              </chameleon-typography>
3837              <div class="general-checkboxes">
3838                <chameleon-checkbox class="checkbox" id="general-message" size="large">
3839                  ${(0,Dv.bQ)("New message")}
3840                </chameleon-checkbox>
3841                <chameleon-checkbox class="checkbox" id="general-call" size="large"
3842                  >${(0,Dv.bQ)("New call")}</chameleon-checkbox
3843                >
3844                <chameleon-checkbox class="checkbox" id="general-meeting" size="large">
3845                  ${(0,Dv.bQ)("Meeting reminders")}
3846                </chameleon-checkbox>
3847              </div>
3848            </div>
3849            <chameleon-switch class="general-switch"></chameleon-switch>
3850          </div>
3851        </div>
3852
3853        <div class="notifications-content">
3854          <chameleon-typography tag="p" variant="heading-small">${(0,Dv.bQ)("Do not disturb")}</chameleon-typography>
3855          <div class="switch-block">
3856            <div class="switch-text-block">
3857              <chameleon-typography class="content-headers" tag="p" variant="body-large">
3858                ${(0,Dv.bQ)("Customize")}
3859              </chameleon-typography>
3860              <chameleon-typography
3861                class="content-description"
3862                tag="p"
3863                variant="caption-medium"
3864                color="type-color-secondary"
3865              >
3866                ${(0,Dv.bQ)("Choose which notifications will still show in do n
3866ot disturb mode.")}
3867              </chameleon-typography>
3868              <chameleon-typography
3869                class="content-description"
3870                tag="p"
3871                variant="caption-medium"
3872                color="type-color-secondary"
3873              >
3874                ${(0,Dv.bQ)("When Do Not Disturb is activated, calls will always be directed straight to voicemail.")}
3875              </chameleon-typography>
3876              <div class="dnd-checkboxes">
3877                <chameleon-checkbox class="checkbox" id="dnd-message" size="large"
3878                  >${(0,Dv.bQ)("New message")}</chameleon-checkbox
3879                >
3880                <chameleon-checkbox class="checkbox" id="dnd-meeting" size="large">
3881                  ${(0,Dv.bQ)("Meeting reminders")}
3882                </chameleon-checkbox>
3883              </div>
3884            </div>
3885          </div>
3886        </div>
3887      </div>
3888    `}};dZ.tagName="goto-notifications-settings";let uZ=dZ;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&lZ(t,r,o)})([(0,Dv.ct)()],uZ.prototype,"notificationSettings");class hZ extends Dv.bP{constructor(){super(...arguments),this.notifications=[]}connectedCallback(){super.connectedCallback(),this.setupEventHandlers()}addNotification(e){const{target:t,...r}=e;if((t??this.ownerDocument.defaultView)===this.ownerDocument.defaultView){const e={...r};this.notifications.push(e),this.requestUpdate()}}}const pZ="goto-banner-no-drag",gZ=class extends hZ{constructor(){super(...arguments),this.removeNotificationThroughEmitter=e=>{const t=this.notifications.findIndex(t=>t.id===e.id);t>=0&&(this.notifications.splice(t,1),this.requestUpdate())}}connectedCallback(){super.connectedCallback(),(0,Dv.d2)()&&this.classList.add("draggable")}updated(){if(!(0,Dv.d2)())return;const e=this.shadowRoot?.querySelector("chameleon-banner");if(!e?.shadowRoot||e.shadowRoot.querySelector(`#${pZ}`))return;const t=document.createElement("style");t.id=pZ,t.textContent="chameleon-icon-button, chameleon-button.dismiss-button { -webkit-app-region: no-drag; }",e.shadowRoot.appendChild(t)}setupEventHandlers(){const e=(0,Dv.au)(),{banner:t,removeBanner:r}=e.subscribeTo(Dv.c4),n=e=>{!this.notifications.some(t=>t.id===e.id)&&(e=>!!e.id&&zv.includes(e.id))(e)&&this.addNotification(e)};t.on(n),r.on(this.removeNotificationThroughEmitter),this.unsubscribeFunctions.push(()=>{t.removeListener(n),r.removeListener(this.removeNotificationThroughEmitter)})}removeNotification(){this.notifications.length>0&&(this.notifications.splice(0,1),this.requestUpdate())}render(){const e=e=>zv.indexOf(e.id),t=this.notifications.sort((t,r)=>e(t)-e(r))[0];if(!t)return this.classList.remove("show"),Dv.cm;this.classList.add("show");const{description:r,icon:n,variant:o,link:i}=t,s=n?Dv.aH` <chameleon-svg slot="icon"> ${(0,Dv.bR)(n)} </chameleon-svg> `:Dv.cm,a=i?Dv.aH`<chameleon-link
3889          slot="action"
3890          target="_blank"
3891          href=${(0,Dv.cq)(i.href)}
3892          @click=${i?.onClick??Dv.cm}
3893          >${i.text}</chameleon-link
3894        >`:Dv.cm,l=Dv.aH`${s} ${a}`,c={closable:!!t.closable,variant:o??"neutral",description:Dv.aH`${r}`};return Dv.aH`${((e,t,r)=>Dv.aH`<chameleon-banner variant=${e.variant??"neutral"} ?closable=${e.closable} @close=${r}>
3895    ${t}
3896    <p>${e.description}</p>
3897  </chameleon-banner>`)(c,l,()=>{this.removeNotification(),t?.onClose?.()})}`}};gZ.tagName="goto-banner-notification",gZ.styles=(0,Dv.ck)(":host.draggable{-webkit-app-region:drag}chameleon-link{-webkit-app-region:no-drag}");let fZ=gZ;const mZ=class extends hZ{constructor(){super(...arguments),this.addNotification=e=>{super.addNotification(e),this.eitherShowOrClose()},this.removeNotification=()=>{this.notifications.length>0&&(this.notifications.splice(0,1),this.requestUpdate())},this.renderButton=({label:e,handler:t,variant:r,size:n})=>Dv.aH`<chameleon-button variant=${(0,Dv.cq)(r)} size=${(0,Dv.cq)(n)} @click=${t}>
3898      ${e}
3899    </chameleon-button>`}get dialog(){return this.shadowRoot?.querySelector("chameleon-dialog")}setupEventHandlers(){const e=(0,Dv.au)(),{modal:t,removeModal:r}=e.subscribeTo(Dv.c4);t.on(this.addNotification),r.on(this.removeNotification),this.unsubscribeFunctions.push(()=>{t.removeListener(this.addNotification),r.removeListener(this.removeNotification)})}static get styles(){return(0,Dv.ck)(":host{position:relative;z-index:var(--goto-z-index-modal)}")}eitherShowOrClose(){try{this.notifications.length>0?this.dialog?.show():this.dialog?.close()}catch{}}handleClosedDialogEvent(){this.notifications[0]&&(this.removeNotification(),this.eitherShowOrClose(),this.requestUpdate())}render(){const e=this.notifications[0];e||this.eitherShowOrClose();const t=e?.title,r=e?.content,n=e?.closable,o=e?.actions??[];return Dv.aH`<chameleon-dialog
3900      ?open=${!1}
3901      @closed=${this.handleClosedDialogEvent}
3902      ?closable=${n}
3903      close-button-label=${(0,Dv.bQ)("Close dialog")}
3904      aria-label=${t||(0,Dv.bQ)("Notification")}
3905    >
3906      <h2 slot="title">${t}</h2>
3907      <div class="content">
3908        <p>${r}</p>
3909      </div>
3910      <div slot="actions">${Nb(o,e=>e.label,this.renderButton)}</div>
3911    </chameleon-dialog>`}};mZ.tagName="goto-modal-notification";let vZ=mZ;const bZ=e=>{let t=0;if(e){for(const r of e.timeoutCancelers??[])++t,r();e.timeoutCancelers=void 0}return t},yZ=class extends hZ{constructor(){super(...arguments),this.addNotification=e=>{const t={...e};t.id=t.id??(0,Dv.d3)();const r=-1,{progress:n=r}=t,o=n!==r;if(t.timeoutCancelers||(t.timeoutCancelers=[]),!o){const e=this.ownerDocument?.defaultView?.setTimeout(()=>{this.removeNotification(t)},8e3);if(t.timeoutCancelers){const r=this.ownerDocument?.defaultView?.clearTimeout;e&&r&&t.timeoutCancelers.push(()=>{r(e)})}}super.addNotification(t)},this.removeNotification=e=>{const t=this.createNotificationPredicate(e),r=this.notifications.findIndex(t);r>=0&&(this.notifications.splice(r,1),this.requestUpdate())},this.updateProgress=e=>{const t=this.createNotificationPredicate(e),r=this.notifications.findIndex(t),n=this.notifications[r]??{},o=e.progress??-1;this.notifications[r]&&(o>99?(this.notifications[r].progress=100,bZ(this.notifications[r]),this.removeNotification(n)):Number.isFinite(o)&&
3911(bZ(this.notifications[r]),this.notifications[r].progress=o,super.requestUpdate("notifications",n)))},this.renderButton=({label:e,handler:t})=>Dv.aH`<chameleon-button variant="inverted" size="small" @click=${t}> ${e} </chameleon-button>`}setupEventHandlers(){const e=(0,Dv.au)(),{snackbar:t,removeSnackbar:r,updateSnackbarProgress:n}=e.subscribeTo(Dv.c4);t.on(this.addNotification),r.on(this.removeNotification),n.on(this.updateProgress),this.unsubscribeFunctions.push(()=>{t.removeListener(this.addNotification),r.removeListener(this.removeNotification),n.removeListener(this.updateProgress)}),this.unsubscribeFunctions.push(()=>{this.notifications.forEach(e=>bZ(e)),this.notifications=[]})}createNotificationPredicate(e){const{id:t}=e;return e=>{const{id:r}=e;return t===r}}render(){const e=this.notifications[0];if(!e)return Dv.cm;const{title:t,message:r,variant:n,actions:o=[]}=e??{},i=e.progress??-1;return Dv.aH`<chameleon-snackbar role="alert" variant=${n??"info"}>
3912      <h2 slot="title">${t}</h2>
3913      <p slot="message">${r}</p>
3914      ${-1!==i?Dv.aH`<chameleon-progress-indicator
3915              value="${i}"
3916              slot="progress"
3917              inverse
3918            ></chameleon-progress-indicator>`:Dv.cm}
3919      <div slot="action">${Nb(o,e=>e.label,this.renderButton)}</div>
3920    </chameleon-snackbar>`}};yZ.tagName="goto-snackbar-notification",yZ.styles=(0,Dv.ck)(":host{z-index:202;align-self:center;bottom:var(--goto-spacing-06);left:var(--goto-spacing-06);list-style-type:none;position:absolute}");let wZ=yZ;const xZ=(e,t,r)=>{switch(e){case cb.ONLINE:return(0,Dv.cu)("Available");case cb.BUSY:return kZ(r);case cb.DO_NOT_DISTURB:return(0,Dv.cu)("Do not disturb");case cb.AWAY:return(0,Dv.cu)("Away");case cb.AUTO_UPDATE:return(0,Dv.cu)("Auto-update");default:return t?(0,Dv.cu)("Appear offline"):(0,Dv.cu)("Offline")}},_Z=e=>{switch(e){case db.ONLINE:return(0,Dv.cu)("Available");case db.BUSY:return(0,Dv.cu)("Busy");case db.AWAY:return(0,Dv.cu)("Away");case db.NONE:return(0,Dv.cu)("Auto-update");default:return(0,Dv.cu)("Offline")}},kZ=e=>{switch(e){case hb.IN_A_CALL:return(0,Dv.cu)("On a call");case hb.IN_A_MEETING:return(0,Dv.cu)("In a meeting");case hb.IN_A_CALENDAR_EVENT:return(0,Dv.cu)("Calendar event");default:return(0,Dv.cu)("Busy")}};var CZ=(e=>(e.tooltip="1100",e.contextMenu="1000000",e))(CZ||{}),SZ=Object.defineProperty,EZ=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&SZ(t,r,i),i};const IZ=class extends Dv.bP{constructor(){super(...arguments),this.presence=Rb.OFFLINE,this.status=void 0,this.externalUserKey="",this.presenceSnapshot=!1,this.achromatic=!1,this.tooltipPosition="bottom-center",this.hidePresenceTooltip=!1}connectedCallback(){super.connectedCallback(),this.externalUserKey&&this.loadUserPresence()}updated(e){e.has("externalUserKey")&&(this.unsubscribe(),this.loadUserPresence())}loadUserPresence(){const{eventBus:e,presence:t}=(0,Dv.Z)();this.presenceSnapshot&&t?this.getPresenceSnapshot(t):t&&(this.listenForPresenceUpdatedEvent(e),this.subscribeToPresence(t))}listenForPresenceUpdatedEvent(e){const{presenceUpdate:t}=e.subscribeTo(Dv.s),r=e=>{const{userKey:t,presence:r=Rb.OFFLINE,status:n}=e;t===this.externalUserKey&&(this.presence=r,this.status=n)};t.on(r),this.unsubscribeFunctions.push(()=>{t.removeListener(r)})}subscribeToPresence(e){e&&e.subscribe(this.externalUserKey).then(()=>{this.unsubscribeFunctions.push(()=>{e.unsubscribe(this.externalUserKey)})}).catch(()=>{(0,Dv.g)().error(`failed to subscribe to presence for external user key ${this.externalUserKey}`)})}getPresenceSnapshot(e){if(e)return e.getPresenceSnapshots(this.externalUserKey).then(e=>{this.presence=e.presence??Rb.OFFLINE});this.presence=Rb.OFFLINE}getTranslatedAppearanceLabel(){return xZ(Mb(this.presence),!1,this.status)}getPresenceIndicatorTemplate(){return Dv.aH`<chameleon-presence-indicator
3921      .presence=${this.presence}
3922      ?achromatic=${this.achromatic}
3923      label=${(0,Dv.bQ)(this.getTranslatedAppearanceLabel())}
3924      id="presence-indicator"
3925    ></chameleon-presence-indicator>`}getChameleonTooltipTemplate(){return Dv.aH`
3926      ${this.getPresenceIndicatorTemplate()}
3927      <chameleon-tooltip
3928        delay="0"
3929        position="${this.tooltipPosition}"
3930        z-index="${CZ.tooltip}"
3931        trigger-id="presence-indicator"
3932      >
3933        ${(0,Dv.bQ)(this.getTranslatedAppearanceLabel())}
3934      </chameleon-tooltip>
3935    `}render(){return Dv.aH`${this.hidePresenceTooltip?this.getPresenceIndicatorTemplate():this.getChameleonTooltipTemplate()}`}};IZ.tagName=Dv.d4;let AZ=IZ;EZ([(0,Dv.ct)()],AZ.prototype,"presence"),EZ([(0,Dv.ct)()],AZ.prototype,"status"),EZ([(0,Dv.cn)({type:String})],AZ.prototype,"externalUserKey"),EZ([(0,Dv.cn)({type:Boolean})],AZ.prototype,"presenceSnapshot"),EZ([(0,Dv.cn)({type:Boolean})],AZ.prototype,"achromatic"),EZ([(0,Dv.cn)({type:String})],AZ.prototype,"tooltipPosition"),EZ([(0,Dv.cn)({type:Boolean})],AZ.prototype,"hidePresenceTooltip");const TZ=":host chameleon-popover{--z-index: 60000;display:flex}:host .presence-menu-trigger{display:flex;align-items:center}:host .presence-selector{max-width:150px;display:flex;align-items:center;text-overflow:ellipsis}:host .presence-selector .selected-value{overflow:hidden;text-overflow:ellipsis}:host .presence-selector::part(control){width:100%;padding-right:0;display:flex;align-items:center}.sync-svg{margin-left:var(--goto-spacing-04);--goto-icon-size: var(--goto-spacing-03)}";var OZ=Object.defineProperty,LZ=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&OZ(t,r,i),i};class $Z extends Dv.bP{constructor(){super(...arguments),this.currentUserExternalUserKey=(0,Dv.Z)().user.key??"",this.presence=(0,Dv.Z)().presence,this.selectedAppearance=cb.OFFLINE,this.status=void 0,this.appearanceList=[cb.ONLINE,cb.AWAY,cb.BUSY,cb.DO_NOT_DISTURB,cb.OFFLINE]}static get styles(){return(0,Dv.ck)(TZ)}connectedCallback(){super.connectedCallback(),this.currentUserExternalUserKey&&this.presence&&(this.subscribeToPresence(this.presence),this.listenForPresenceUpdatedEvent())}subscribeToPresence(e){e.subscribe(this.currentUserExternalUserKey).then(()=>{this.unsubscribeFunctions.push(()=>{e.unsubscribe(this.currentUserExternalUserKey)})}).catch(()=>{(0,Dv.g)().error(`failed to subscribe to presence for external user key ${this.currentUserExternalUserKey}`)})}listenForPresenceUpdatedEvent(){const{eventBus:e}=(0,Dv.Z)(),{userPresenceUpdate:t}=e.subscribeTo(Dv.s),r=e=>{const{userAppearance:t,appearance:r,status:n,userDoNotDisturb:o}=e;t===db.NONE&&o===ub.NONE?(this.selectedAppearance=cb.AUTO_UPDATE,this.status=n):r&&(this.selectedAppearance=r,this.status=n)};t.on(r),this.unsubscribeFunctions.push(()=>{t.removeListener(r)})}setNewPresence(e){try{(0,Dv.d5)(this.presence,"shell presence service is undefined"),this.presence.setUserPresence(e)}catch{}}setArgumentsForNewPresence(e){switch(e){case cb.ONLINE:this.setNewPresence({userAppearance:(0,Dv.bs)(Dv.bt.SHELL_ENABLE_PRESENCE_AUTO_UPDATE)?db.ONLINE:db.NONE,userDoNotDisturb:ub.NONE});break;case cb.AWAY:this.setNewPresence({userAppearance:db.AWAY,userDoNotDisturb:ub.NONE});break;case cb.BUSY:this.setNewPresence({userAppearance:db.BUSY,userDoNotDisturb:ub.NONE});break;case cb.DO_NOT_DISTURB:this.setNewPresence({userAppearance:db.NONE,userDoNotDisturb:ub.DO_NOT_DISTURB});break;case cb.OFFLINE:this.setNewPresence({userAppearance:db.OFFLINE,userDoNotDisturb:ub.NONE});break;case cb.AUTO_UPDATE:this.setNewPresence({userAppearance:db.NONE,userDoNotDisturb:ub.NONE})}}handleChangeEvent(e){(0,Dv.cr)().track("GoTo > Presence Selector",{action:"Click",target:e.target.value}),this.dispatchEvent(new CustomEvent("presenceClicked",{detail:{presence:e.target.value},bubbles:!0,composed:!0})),this.setArgumentsForNewPresence(e.target.value)}}LZ([(0,Dv.ct)()],$Z.prototype,"selectedAppearance"),LZ([(0,Dv.ct)()],$Z.prototype,"status");const NZ=class extends $Z{static get styles(){return(0,Dv.ck)(TZ)}renderPresenceOption(e){return e!==cb.BUSY||(0,Dv.bs)(Dv.bt.SHELL_ADVANCED_PRESENCE_BUSY)?Dv.aH`
3936      <chameleon-option
3937        value=${e}
3938        data-testid=${e}
3939        aria-label=${(0,Dv.bQ)(xZ(e,!0))}
3940      >
3941        ${(0,Dv.bQ)(xZ(e,!0))}
3942        <chameleon-presence-indicator
3943          presence=${Db(e)}
3944          label=${xZ(e,!0)}
3945          slot="start"
3946        ></chameleon-presence-indicator>
3947      </chameleon-option>
3948    `:Dv.cm}renderAutoUpdateOption(){return(0,Dv.bs)(Dv.bt.SHELL_ENABLE_PRESENCE_AUTO_UPDATE)?Dv.a
3948H` <chameleon-option
3949      style="height:unset;"
3950      value=${cb.AUTO_UPDATE}
3951      data-testid=${cb.AUTO_UPDATE}
3952      aria-label=${(0,Dv.bQ)("Auto-update")}
3953      id="auto-update"
3954    >
3955      ${(0,Dv.bQ)("Auto-update")}
3956      <chameleon-svg class="sync-svg" slot="start"> ${(0,Dv.bR)(Lb)}</chameleon-svg>
3957    </chameleon-option>`:Dv.cm}render(){return Dv.aH`
3958      <chameleon-select
3959        class="presence-selector"
3960        no-border
3961        size="small"
3962        selected-value=${this.selectedAppearance}
3963        @change=${this.handleChangeEvent}
3964      >
3965        ${this.renderAutoUpdateOption()}
3966        ${Nb(this.appearanceList,e=>e,e=>this.renderPresenceOption(e))}
3967        <div slot="selected-value" class="selected-value">
3968          ${(0,Dv.bQ)(xZ(this.selectedAppearance,!0,this.status))}
3969        </div>
3970      </chameleon-select>
3971    `}};NZ.tagName="goto-presence-selector";let RZ=NZ;const PZ=async e=>{let t=e._isVisible;if(void 0===t){const r=(0,Dv.Z)().user;t=await(e.isVisible?.((e=>e.entitlements??[])((0,Dv.Z)().user),r.emails)),e._isVisible=t}return t},DZ="settings-is-dirty",MZ=(e,t)=>{const r=e.name?(0,Dv.d6)(e.name,{raw:!0}):e.name,n=(0,Dv.H)().getBadgeNumberValue({id:DZ,settingsName:r})>0,o=(0,Dv.bg)().startsWith(e.href);return Dv.aH` <chameleon-navigation-drawer-item
3972    data-testid=${r}
3973    title=${(0,Dv.bQ)(e.name)}
3974    ?selected=${o}
3975    @click=${()=>{const r=t&&(0,Dv.d6)(t,{raw:!0}),n=(0,Dv.d6)(e.name,{raw:!0});(0,Dv.cr)().track("GoTo > Settings",{action:"Click",linkName:r,target:n}),(0,Dv.bj)(e.href)}}
3976  >
3977    ${e.icon?Dv.aH`<chameleon-svg slot="start">${zZ(e.icon,o)}</chameleon-svg>`:Dv.cm}
3978    ${(0,Dv.bQ)(e.name)}
3979    ${n?Dv.aH`<chameleon-text-badge slot="end" variant="warning" border="fill">${(0,Dv.bQ)("Not saved")}</chameleon-text-badge>`:Dv.cm}
3980  </chameleon-navigation-drawer-item>`},zZ=(e,t)=>{const r="function"==typeof e?e(t):SG(e,{active:t});return(0,Dv.bR)(r)};var FZ=(e=>(e.USER="USER",e.PBX="PBX",e.STATIC="STATIC",e))(FZ||{});const UZ=["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"];var BZ=(e=>(e.WORK_SCHEDULE="work_schedule",e.NO_HOURS_SET="no_hours_set",e))(BZ||{});const HZ="09:00:00",jZ="17:00:00",VZ=["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY"],WZ={hour:"numeric",minute:"numeric"},KZ={month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},qZ={MONDAY:(0,Dv.cu)("Monday"),TUESDAY:(0,Dv.cu)("Tuesday"),WEDNESDAY:(0,Dv.cu)("Wednesday"),THURSDAY:(0,Dv.cu)("Thursday"),FRIDAY:(0,Dv.cu)("Friday"),SATURDAY:(0,Dv.cu)("Saturday"),SUNDAY:(0,Dv.cu)("Sunday")},GZ=()=>VZ.map(e=>({dayOfWeek:e,startTime:HZ,endTime:jZ})),ZZ=e=>(e=>/^([0-9]|[01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/.test(e))(e)?e.split(":").map(Number):null,YZ=e=>{const t=ZZ(e);if(t){const[e,r,n]=t;return(new Date).setHours(e,r,n,0)}},JZ=e=>{const t=YZ(e)??(new Date).setHours(0,0,0,0);return(0,Dv.d8)(t,WZ)},QZ=e=>e.replace(/(\d{1,2}):00\b/g,"$1"),XZ="00:00:00",eY="23:45:00",tY=e=>{const t=[],r=new Date;r.setHours(0,0,0,0);const n=r.getDay();for(;r.getDay()===n;)t.push(r.toTimeString().split(" ")[0]),r.setMinutes(r.getMinutes()+e);return t},rY=e=>!!(e.dayOfWeek&&e.startTime&&e.endTime),nY=(e,t,r,n)=>e<n&&t>r,oY=()=>tY(15).map(e=>({value:e,hidden:!1})),iY=(e,t)=>{const r=t.findIndex(({value:t})=>t===e);return t.map((e,t)=>({...e,hidden:t<=r}))},sY=(e,t,r)=>{const n=new Intl.DateTimeFormat("UTC",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(e).reduce((e,t)=>(e[t.type]=t.value,e),{});"24"===n.hour&&(n.hour="00");const{year:o,month:i,day:s,hour:a,minute:l,second:c}=n;return"date"===r?`${o}-${i}-${s}`:"time"===r?`${a}:${l}:${c}`:`${o}-${i}-${s}T${a}:${l}:${c}`},aY=e=>{const t=(0,Dv.da)();return sY(new Date,t,e)},lY=()=>(0,Dv.d9)((0,Dv.L)(),"-"),cY=["%","&","<",">","[","]","\\","{","}"],dY=()=>`${(0,Dv.Z)()?.user?.key}-schedule-settings-saved`,uY=e=>{const[t,r]=e.startDate.split("T"),[n,o]=e.endDate.split("T");let i=!1,s=n,a=o;return r===XZ&&a===XZ&&((e,t)=>lC.fromISO(t,{zone:"utc"}).toMillis()>lC.fromISO(e,{zone:"utc"}
3980).toMillis())(t,s)&&(i=!0,s=(e=>bC(e,-1))(n),a=eY),{id:e.id,name:e.name,startDay:t,endDay:s,startTime:r,endTime:a,dndEnabled:e.dndEnabled,allDay:i}},hY=e=>{const{startDay:t,startTime:r,endDay:n,endTime:o,allDay:i}=e;let s=n,a=o;i&&(s=(e=>bC(e,1))(n),a=XZ);const l=`${t}T${r}`,c=`${s}T${a}`;return{id:e.id,name:e.name,startDate:l,endDate:c,dndEnabled:e.dndEnabled}},pY=(e,t)=>new Date(`${e}T${t}`),gY=e=>cY.some(t=>e.includes(t)),fY=e=>e<aY("datetime"),mY=()=>!(0,Dv.cF)()&&!!(0,Dv.bs)(Dv.bt.SHELL_SCHEDULE_SETTINGS),vY={id:"@settings/app-launch",href:Dv.az,isVisible:async()=>(0,Dv.bB)(),name:(0,Dv.cu)("App launch"),icon:{active:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M4 10.8293V22H6V10.8293C7.16519 10.4175 8 9.30622 8 8C8 6.69378 7.16519 5.58254 6 5.17071V2H4V5.17071C2.83481 5.58254 2 6.69378 2 8C2 9.30622 2.83481 10.4175 4 10.8293ZM11 2V12.1707C9.83481 12.5825 9 13.6938 9 15C9 16.3062 9.83481 17.4175 11 17.8293V22H13V17.8293C14.1652 17.4175 15 16.3062 15 15C15 13.6938 14.1652 12.5825 13 12.1707V2H11ZM18 6.17071V2H20V6.17071C21.1652 6.58254 22 7.69378 22 9C22 10.3062 21.1652 11.4175 20 11.8293V22H18V11.8293C16.8348 11.4175 16 10.3062 16 9C16 7.69378 16.8348 6.58254 18 6.17071Z" fill="currentColor"></path></svg>',inactive:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M4 8C4 8.55228 4.44772 9 5 9C5.55228 9 6 8.55228 6 8C6 7.44772 5.55228 7 5 7C4.44772 7 4 7.44772 4 8ZM6 5.17071C7.16519 5.58254 8 6.69378 8 8C8 9.30622 7.16519 10.4175 6 10.8293V22H4V10.8293C2.83481 10.4175 2 9.30622 2 8C2 6.69378 2.83481 5.58254 4 5.17071V2H6V5.17071ZM11 12.1707V2H13V12.1707C14.1652 12.5825 15 13.6938 15 15C15 16.3062 14.1652 17.4175 13 17.8293V22H11V17.8293C9.83481 17.4175 9 16.3062 9 15C9 13.6938 9.83481 12.5825 11 12.1707ZM11 15C11 15.5523 11.4477 16 12 16C12.5523 16 13 15.5523 13 15C13 14.4477 12.5523 14 12 14C11.4477 14 11 14.4477 11 15ZM18 11.8293C16.8348 11.4175 16 10.3062 16 9C16 7.69378 16.8348 6.58254 18 6.17071V2H20V6.17071C21.1652 6.58254 22 7.69378 22 9C22 10.3062 21.1652 11.4175 20 11.8293V22H18V11.8293ZM20 9C20 8.44772 19.5523 8 19 8C18.4477 8 18 8.44772 18 9C18 9.55228 18.4477 10 19 10C19.5523 10 20 9.55228 20 9Z" fill="currentColor"></path></svg>'}},bY={id:"@settings/calendar",href:Dv.aA,isVisible:async()=>!!(0,Dv.Z)().user.key,name:(0,Dv.cu)("Calendar"),icon:{active:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M8 2H6V7H8V2Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M19 4V8H15V4H9V8H5V4H2V22H22V4H19ZM11 19H9V17H11V19ZM15 19H13V17H15V19ZM15 15H13V13H15V15ZM19 17V19H17V17H19ZM19 13V15H17V13H19Z" fill="currentColor"></path><path d="M16 2H18V7H16V2Z" fill="currentColor"></path></svg>',inactive:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M8 2H6V7H8V2Z" fill="currentColor"></path><path d="M18 2H16V7H18V2Z" fill="currentColor"></path><path d="M16 16H18V18H16V16Z" fill="currentColor"></path><path d="M14 16H12V18H14V16Z" fill="currentColor"></path><path d="M8 18V16H10V18H8Z" fill="currentColor"></path><path d="M14 12H12V14H14V12Z" fill="currentColor"></path><path d="M16 12H18V14H16V12Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M19 6V4H22V22H2V4H5V6H4V8H20V6H19ZM20 20V10H4V20H20Z" fill="currentColor"></path><path d="M15 4H9V6H15V4Z" fill="currentColor"></path></svg>'}},yY={id:"@settings/appearance",href:Dv.ax,isVisible:async()=>!(0,Dv.O)().isIntegration,name:(0,Dv.cu)("Appearance"),icon:{active:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 5.5C16.4539 5.5 20.287 8.1685 22 12C20.287 15.8315 16.4539 18.5 12 18.5C7.5461 18.5 3.71296 15.8315 2 12C3.71296 8.1685 7.5461 5.5 12 5.5ZM15 12C15 13.6569 13.6569 15 12 15C10.3431 15 9 13.6569 9 12C9 10.3431 10.3431 9 12 9C13.6569 9 15 10.3431 15 12Z" fill="currentColor"></path><path d="M13 12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12Z" fill="currentColor"></path></svg>',inactive:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M15 12C15 13.6569 13.6569 15 12 15C10.3431 15 9 13.6569 9 12C9 10.3431 10.3431 9 12 9C13.6569 9 15 10.3431 15 12ZM13 12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M12 5.5C16.4539 5.5 20.287 8.1685 22 12C20.287 15.8315 16.4539 18.5 12 18.5C7.5461 18.5 3.71296 15.8315 2 12C3.71296 8.1685 7.5461 5.5 12 5.5ZM12 7.5C15.3092 7.5 18.2066 9.30467 19.7581 12C18.2066 14.6953 15.3092 16.5 12 16.5C8.69076 16.5 5.79339 14.6953 4.2419 12C5.79339 9.30467 8.69076 7.5 12 7.5Z" fill="currentColor"></path></svg>'}},wY=(0,Dv.cu)("Schedule"),xY=[vY,bY,yY,{id:"@settings/schedule",href:Dv.aE,isVisible:async()=>mY(),name:wY,icon:{active:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM13 11.4412V5H11V12.5588L17.9759 16.8517L19.0241 15.1483L13 11.4412Z" fill="currentColor"></path></svg>',inactive:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12ZM13 11.4412V5H11V12.5588L16.4518 16.2033L17.5 14.5L13 11.4412Z" fill="currentColor"></path></svg>'}},{id:"@settings/hotkeys",href:Dv.aB,isVisible:async()=>!!(0,Dv.bs)(Dv.bt.SHELL_HOTKEY_SETTINGS),name:(0,Dv.cu)("Keyboard shortcuts"),icon:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M5 10H7V8H5V10Z" fill="currentColor"></path><path d="M8 10H10V8H8V10Z" fill="currentColor"></path><path d="M11 10H13V8H11V10Z" fill="currentColor"></path><path d="M14 10H16V8H14V10Z" fill="currentColor"></path><path d="M17 10H19V8H17V10Z" fill="currentColor"></path><path d="M5 13H7V11H5V13Z" fill="currentColor"></path><path d="M8 13H10V11H8V13Z" fill="currentColor"></path><path d="M11 13H13V11H11V13Z" fill="currentColor"></path><path d="M14 13H16V11H14V13Z" fill="currentColor"></path>
3980<path d="M17 13H19V11H17V13Z" fill="currentColor"></path><path d="M5 16H7V14H5V16Z" fill="currentColor"></path><path d="M8 16H16V14H8V16Z" fill="currentColor"></path><path d="M17 16H19V14H17V16Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M2 5H22V19H2V5ZM4 7H20V17H4V7Z" fill="currentColor"></path></svg>'},{id:"@settings/notifications",href:Dv.aD,isVisible:async()=>(0,Dv.bB)()&&!!(0,Dv.bs)(Dv.bt.SHELL_NOTIFICATION_SETTINGS),name:(0,Dv.cu)("Notifications"),icon:{active:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M13 3.07089C16.3923 3.55612 19 6.47353 19 10V17H20V19H4V17H5V10C5 6.47353 7.60771 3.55612 11 3.07089V2H13V3.07089ZM9.17071 20C9.58254 21.1652 10.6938 22 12 22C13.3062 22 14.4175 21.1652 14.8293 20H9.17071Z" fill="currentColor"></path></svg>',inactive:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M13 3.07195C16.4062 3.5667 19 6.5519 19 10.125V17H20V19H4V17H5V10.125C5 6.5519 7.59377 3.5667 11 3.07195V2H13V3.07195ZM7 17V10.125C7 7.275 9.25791 5 12 5C14.7421 5 17 7.275 17 10.125V17H7ZM9.17071 20C9.58254 21.1652 10.6938 22 12 22C13.3062 22 14.4175 21.1652 14.8293 20H9.17071Z" fill="currentColor"></path></svg>'}},{id:"@settings/language",href:Dv.aC,isVisible:async()=>!!(0,Dv.bs)(Dv.bt.SHELL_LANGUAGE_SETTINGS),name:(0,Dv.cu)("Language"),icon:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M18.5526 9.80821C19.1037 9.80821 19.5937 9.89226 20.0227 10.0603C20.4516 10.2284 20.8117 10.4658 21.1029 10.7725C21.3941 11.0792 21.6164 11.4434 21.7699 11.8651C21.8926 12.2024 21.9662 12.5691 21.9908 12.9649L22 13.2673V19H21.0982C20.9041 19 20.7569 18.972 20.6567 18.916C20.5816 18.8739 20.5152 18.7996 20.4577 18.6929L20.4031 18.5754L20.2059 17.8411C19.9616 18.0475 19.7205 18.2318 19.4826 18.394C19.2446 18.5562 18.9988 18.6933 18.7452 18.8054C18.4915 18.9174 18.2191 19.0015 17.9279 19.0575C17.6367 19.1135 17.3158 19.1415 16.9651 19.1415C16.5768 19.1415 16.2152 19.0914 15.8802 18.9912C15.5451 18.8909 15.2555 18.739 15.0113 18.5355C14.767 18.3321 14.5745 18.0799 14.4336 17.7791C14.2927 17.4784 14.2222 17.1245 14.2222 16.7175C14.2222 16.3696 14.3209 16.0304 14.5181 15.7002C14.7154 15.3699 15.041 15.0735 15.495 14.8111C15.9491 14.5486 16.5471 14.3319 17.2892 14.1608C17.9385 14.0112 18.7209 13.9179 19.6363 13.8812L20.0368 13.8689V13.2673C20.0368 12.6185 19.8896 12.1349 19.5953 11.8164C19.3009 11.4979 18.8689 11.3387 18.299 11.3387C17.9107 11.3387 17.5851 11.3844 17.3221 11.4758C17.059 11.5672 16.8305 11.666 16.6363 11.7722L16.2773 
398011.9747C16.2223 12.0068 16.1698 12.0381 16.1197 12.0686C15.9694 12.16 15.8097 12.2057 15.6406 12.2057C15.5029 12.2057 15.3854 12.1718 15.2884 12.1039C15.2237 12.0587 15.1666 12.0063 15.1172 11.9467L15.0488 11.8518L14.6825 11.2325C15.7659 10.283 17.0559 9.80821 18.5526 9.80821ZM8.16139 5L13.2222 19H11.618C11.4348 19 11.2871 18.9498 11.1748 18.8493C11.0906 18.774 11.0214 18.6849 10.9671 18.5822L10.9178 18.475L9.85424 15.3833H4.35912L3.29554 18.475C3.24827 18.6046 3.16555 18.7245 3.04738 18.8347C2.95284 18.9229 2.83939 18.9758 2.70703 18.9934L2.60422 19H1L6.06083 5H8.16139ZM20.0368 15.0543C19.3166 15.0779 18.7092 15.1325 18.2144 15.218C17.7197 15.3035 17.3189 15.4126 17.0121 15.5453C16.7052 15.678 16.4845 15.8358 16.3498 16.0186C16.2152 16.2015 16.1479 16.402 16.1479 16.6202C16.1479 16.8325 16.1839 17.0139 16.2559 17.1643C16.3279 17.3147 16.4281 17.4385 16.5565 17.5359C16.6849 17.6332 16.8352 17.7039 17.0074 17.7482C17.1796 17.7924 17.369 17.8145 17.5757 17.8145C18.1017 17.8145 18.5542 17.7216 18.933 17.5359C19.2361 17.3872 19.5322 17.1848 19.8213 16.9286L20.0368 16.7264V15.0543ZM7.10668 7.12917C7.04168 7.4338 6.97078 7.71412 6.89397 7.97014L6.74822 8.44113L6.68125 8.64583L4.92636 13.75H9.29587L7.54097 8.63611C7.39916 8.24074 7.2544 7.73843 7.10668 7.12917Z" fill="currentColor"></path></svg>'}];var _Y=Object.defineProperty;const kY=class extends Dv.bP{constructor(){super(...arguments),this.extensionGeneralSettingsSections=[],this.updateGeneralSettingsSections=()=>{this.extensionGeneralSettingsSections=(()=>{const e=(0,Dv.bJ)().getExtensions(),t=[];return e.forEach(e=>
3980{e.getSettings().forEach(e=>{e.isGeneralSection&&t.push(e)})}),t})()},this.rerenderGeneralSettings=()=>{this.requestUpdate()}}static get styles(){return(0,Dv.ck)(":host{display:inherit;flex-direction:inherit}chameleon-navigation-drawer-item[selected] chameleon-svg{--goto-icon-color: var(--goto-type-color-inverted)}chameleon-navigation-drawer-item[selected] chameleon-text-badge{color:var(--goto-type-color-inverted);box-shadow:0 0 0 2px var(--goto-interactive-color-brand-hover)}")}connectedCallback(){super.connectedCallback(),this.subscribeToRoutingChanges(),this.subscribeToIsDirtyBadgeEvent();const{applicationReady:e}=(0,Dv.au)().subscribeTo("Shell");e.on(this.updateGeneralSettingsSections),this.unsubscribeFunctions.push(()=>{e.removeListener(this.updateGeneralSettingsSections)}),this.updateGeneralSettingsSections()}render(){return Dv.aH`
3981      <chameleon-navigation-drawer-section>${(0,Dv.bQ)("General")}</chameleon-navigation-drawer-section>
3982      ${Nb(xY,e=>e.name,e=>dq(this.renderLink(e)))}
3983      ${Nb(this.extensionGeneralSettingsSections,e=>e.displayNameKey,e=>this.renderGeneralSection(e))}
3984    `}renderGeneralSection(e){const t=`${Dv.aI}${e.route}`,r=(0,Dv.d6)(e.displayNameKey,{raw:!0}),n=(0,Dv.bg)().startsWith(t);return Dv.aH`
3985      <chameleon-navigation-drawer-item
3986        is-general-section
3987        title=${r}
3988        ?selected=${n}
3989        @click=${()=>{qv(t)}}
3990      >
3991        ${e.icon?Dv.aH`<chameleon-svg slot="start">${zZ(e.icon,n)}</chameleon-svg>`:Dv.cm}
3992        ${r}
3993      </chameleon-navigation-drawer-item>
3994    `}async renderLink(e){return await PZ(e)?MZ(e):Dv.cm}subscribeToRoutingChanges(){const{routeChanged:e}=(0,Dv.au)().subscribeTo("Shell");e.on(this.rerenderGeneralSettings),this.unsubscribeFunctions.push(()=>e.removeListener(this.rerenderGeneralSettings))}subscribeToIsDirtyBadgeEvent(){const e=()=>{this.requestUpdate()};(0,Dv.H)().addEventListener("change",e,{id:DZ}),this.unsubscribeFunctions.push(()=>{(0,Dv.H)().removeEventListener("change",e)})}};kY.tagName="goto-general-settings";let CY=kY;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&_Y(t,r,o)})([(0,Dv.ct)()],CY.prototype,"extensionGeneralSettingsSections");var SY=Object.defineProperty;const EY=class extends Dv.bP{constructor(){super(...arguments),this.settingLinks=[],this.redirectToDefaultSettings=async()=>{if((0,Dv.bg)().replace(/\/$/,"")===Dv.aI)for(const e of xY)if(await PZ(e))return void(0,Dv.cZ)().then(()=>(0,Dv.bj)(e.href))}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.subscribeToRouteChanged()}subscribeToRouteChanged(){const{routeChanged:e}=(0,Dv.au)().subscribeTo("Shell");e.on(this.redirectToDefaultSettings),this.unsubscribeFunctions.push(()=>e.removeListener(this.redirectToDefaultSettings))}render(){return Dv.aH`
3995      <goto-main-module-layout>
3996        <goto-settings-sidebar slot="sidebar" .settingLinks=${this.settingLinks}></goto-settings-sidebar>
3997        <div class="settings-content sm-6 lg-12">
3998          <!-- This is the hook for sub settings page -->
3999          <div id="goto--settings-content"></div>
4000        </div>
4001      </goto-main-module-layout>
4002    `}};EY.tagName="goto-settings";let IY=EY;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&SY(t,r,o)})([(0,Dv.cn)({type:Array})],IY.prototype,"settingLinks");var AY=Object.defineProperty;const TY=class extends Dv.bP{constructor(){super(...arguments),this.links=[],this.rerenderSpecificSettings=()=>{this.requestUpdate()}}static get styles(){return(0,Dv.ck)(":host{display:inherit;flex-direction:inherit}")}connectedCallback(){super.connectedCallback(),this.processLinksAndSubscribe()}subscribeToRoutingChanges(){const{routeChanged:e}=(0,Dv.au)().subscribeTo("Shell");e.on(this.rerenderSpecificSettings),this.unsubscribeFunctions.push(()=>e.removeListener(this.rerenderSpecificSettings))}buildMenuItemLink(e){const{settingsIcon:t,settingsLinksInfo:r}=e,{name:n,href:o}=r[0];return{href:o,icon:t,name:n}}processLinksAndSubscribe(){this.links.forEach(e=>{1===e.settingsLinksInfo.length&&this.subscribeToRoutingChanges()})}async renderLink(e){return await PZ(e)?1===e.settingsLinksInfo.length?MZ(this.buildMenuItemLink(e)):Dv.aH`<goto-specific-settings-accordion .link=${e}></goto-specific-settings-accordion>`:Dv.cm}render(){const e=(0,Dv.cu)("Capabilities");return this.links.length?Dv.aH`
4003          <chameleon-navigation-drawer-section>${(0,Dv.bQ)(e)}</chameleon-navigation-drawer-section>
4004          ${Nb(this.links,e=>e.settingsIcon,e=>dq(this.renderLink(e)))}
4005        `:Dv.cm}};TY.tagName="goto-specific-settings";let OY=TY;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&AY(t,r,o)})([(0,Dv.cn)({type:Array})],OY.prototype,"links");var LY=Object.defineProperty;const $Y=class extends Dv.bP{constructor(){super(...arguments),this.rerenderSpecificSettings=()=>{this.requestUpdate()}}static get styles(){return(0,Dv.ck)(":host chameleon-accordion-item{border-color:transparent;border-style:solid;border-width:1px;outline:0}:host chameleon-accordion-item chameleon-navigation-drawer-item{padding-inline-start:var(--goto-spacing-07)}:host chameleon-accordion-item::part(heading){height:2.25rem;padding-block:0;gap:0;padding-left:var(--goto-spacing-05)}
4005:host chameleon-accordion-item::part(start){--goto-icon-size: var(--goto-spacing-04);--design-unit: 0;margin-right:var(--goto-spacing-04)}:host chameleon-accordion-item::part(region){padding-block-start:0;padding-block-end:0;padding-inline:var(--goto-spacing-05)}:host([chevron-position=left]){padding-inline-start:0}")}connectedCallback(){super.connectedCallback(),this.subscribeToRoutingChanges()}subscribeToRoutingChanges(){const{routeChanged:e}=(0,Dv.au)().subscribeTo("Shell");e.on(this.rerenderSpecificSettings),this.unsubscribeFunctions.push(()=>e.removeListener(this.rerenderSpecificSettings))}extractAccordionSectionFromRoute(e){const t=new RegExp(`${Dv.aI}/([^/]+)`),r=e.match(t);return r?r[1]:null}expandAccordion(){const e=(0,Dv.bg)(),t=this.extractAccordionSectionFromRoute(e);return!!t&&this.link.settingsLinksInfo.some(e=>this.extractAccordionSectionFromRoute(e.href)===t)}render(){return this.link?.accordionName?Dv.aH`
4006          <chameleon-accordion role="menuitem">
4007            <chameleon-accordion-item
4008              fullwidth
4009              title=${(0,Dv.d6)(this.link.accordionName)}
4010              ?expanded=${this.expandAccordion()}
4011            >
4012              <chameleon-typography class="accordion-item-heading" slot="heading">
4013                ${(0,Dv.d6)(this.link.accordionName)}
4014              </chameleon-typography>
4015              <chameleon-svg slot="start">${zZ(this.link.settingsIcon,!1)}</chameleon-svg>
4016              ${Nb(this.link.settingsLinksInfo,e=>(0,Dv.d6)(e.name,{raw:!0}),({name:e,href:t})=>MZ({name:e,href:t},this.link?.accordionName))}
4017            </chameleon-accordion-item>
4018          </chameleon-accordion>
4019        `:Dv.cm}};$Y.tagName="goto-specific-settings-accordion";let NY=$Y;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&LY(t,r,o)})([(0,Dv.cn)({type:Object})],NY.prototype,"link");const RY=e=>{const t=["text","password","number","email","tel","url","search","date","datetime","datetime-local","time","month","week"],r=e?.tagName??"";if("INPUT"===r){const r=e.type;return t.includes(r)}return"TEXTAREA"===r},PY=e=>!!RY(e)&&"password"===e.type,DY=()=>((0,Dv.bp)().getSelection()?.toString()??"").trim(),MY=e=>RY(e),zY=e=>!PY(e)&&RY(e)&&!!DY();const FY=e=>{const t=[],r=(e=>[...e].sort((e,t)=>(e.category??"").localeCompare(t.category??"")))(e);return r.forEach((e,n)=>{const o=r[n-1],i="-"===e.label;(i||o?.category!==e.category)&&t.push({separator:!0}),i||t.push(BY(e))}),UY(t)},UY=e=>e.filter((t,r)=>!t.separator||r>0&&r<e.length-1&&!e[r-1]?.separator),BY=e=>(e=>(Object.keys(e).forEach(t=>void 0===e[t]&&delete e[t]),e))({label:e.label,enabled:void 0===e.enabled||e.enabled,icon:e.icon,execute:()=>{e.command?(0,Dv.cR)(e.command):e.executeFunction&&e.executeFunction()},children:e.children?.length?FY(e.children):void 0});var HY=Object.defineProperty;const jY=class extends Dv.bP{constructor(){super(...arguments),this.menuItems=[],this.renderSeparator=()=>Dv.aH` <chameleon-menu-separator></chameleon-menu-separator>`,this.renderItemIcon=e=>e.icon?Dv.aH`<chameleon-svg slot="start">${(0,Dv.bR)(e.icon)}</chameleon-svg>`:Dv.aH`<div slot="start" style="width:1.25rem;height:1.25rem;"></div>`,this.renderSubMenu=(e,t,r)=>Dv.aH`
4020    <chameleon-menu-item aria-label=${(0,Dv.cq)(e.label)}>
4021      ${r?this.renderItemIcon(e):Dv.cm} ${e.label}
4022      <chameleon-svg slot="end">${yb}</chameleon-svg>
4023      <chameleon-menu label=${e.label??""} slot="submenu"> ${this.renderMenuItems(t)} </chameleon-menu>
4024    </chameleon-menu-item>
4025  `,this.renderMenuItem=(e,t)=>{if(e.separator)return this.renderSeparator();if(e.children?.length)return this.renderSubMenu(e,e.children,t);const r=e=>{e.execute&&e.execute(),this.remove()};return void 0===e.enabled||e.enabled?Dv.aH`
4026        <chameleon-menu-item @menuitemclick=${()=>r(e)} aria-label=${(0,Dv.cq)(e.label)}>
4027          ${t?this.renderItemIcon(e):Dv.cm} ${e.label}
4028        </chameleon-menu-item>
4029      `:Dv.aH` <chameleon-menu-item disabled aria-label=${(0,Dv.cq)(e.label)}>
4030      ${t?this.renderItemIcon(e):Dv.cm} ${e.label}
4031    </chameleon-menu-item>`},this.renderMenuItems=e=>{const t=e.some(e=>!!e.icon);return Dv.aH`
4032      ${Nb(e,e=>e,e=>this.renderMenuItem(e,t))}
4033    `}}static get styles(){return(0,Dv.ck)("chameleon-menu{border:1px solid var(--goto-border-color-secondary);background-color:var(--goto-background-color-default);box-shadow:var(--goto-elevation-medium)}")}render(){return Dv.aH`
4034      <chameleon-menu label=${(0,Dv.cB)("Context menu")}> ${this.renderMenuItems(this.menuItems)} </chameleon-menu>
4035    `}};jY.tagName="goto-shell-context-menu";let VY=jY;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&HY(t,r,o)})([(0,Dv.cn)({type:Array})],VY.prototype,"menuItems");const WY=(e,t)=>
4035({...e,children:e.children?e.children.map(e=>WY(e,t)):[],label:e.label??t(e.labelKey??"")}),KY=class extends Dv.bP{constructor(){super(...arguments),this.initialized=!1,this.extensionIntegrations=[],this.updateLocale=()=>{(0,Dv.di)((0,Dv.L)(),document)},this.getActionsForContexts=e=>this.extensionIntegrations.reduce((t,r)=>{const n=r.impl.getContextMenuActionsForContext(e)?.map(e=>WY(e,r.extension.getString));return[...t,...n??[]]},[]),this.handleContextMenu=e=>{if(this.canShowShellContextMenu(e)){(function(e){const t=((0,Dv.bp)().getSelection()?.toString()??"").trim();t&&((e,t,r)=>{const n=e,o=Yv(n);o.push({type:"string",value:r}),n.contextItems=o})(e,0,t)})(e),function(e){const t=e;(function(e){const t=e.composedPath()[0]??e.target,r=RY(t);if(r){const r={id:"cut",labelKey:(0,Dv.cu)("Cut"),icon:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M6 2L14.3247 16.4188C14.1157 16.9038 14 17.4384 14 18C14 20.2091 15.7909 22 18 22C20.2091 22 22 20.2091 22 18C22 15.7909 20.2091 14 18 14C17.1306 14 16.3259 14.2774 15.6697 14.7485L8.3094 2H6ZM20 18C20 19.1046 19.1046 20 18 20C16.8954 20 16 19.1046 16 18C16 16.8954 16.8954 16 18 16C19.1046 16 20 16.8954 20 18Z" fill="currentColor"></path><path d="M15.6906 2L12.5773 7.39235L13.732 9.39235L18 2H15.6906Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.33026 14.7485L10.2676 11.3929L11.4223 13.3929L9.67531 16.4188C9.88425 16.9038 10 17.4384 10 18C10 20.2091 8.20914 22 6 22C3.79086 22 2 20.2091 2 18C2 15.7909 3.79086 14 6 14C6.86943 14 7.67407 14.2774 8.33026 14.7485ZM8 18C8 19.1046 7.10457 20 6 20C4.89543 20 4 19.1046 4 18C4 16.8954 4.89543 16 6 16C7.10457 16 8 16.8954 8 18Z" fill="currentColor"></path></svg>',category:Dv.de,enabled:zY(t),executeFunction:()=>{(async e=>{const t=e.selectionStart??0,r=e.selectionEnd??t,n=e.value,o=n.substring(t,r);await(0,Dv.dd)().clipboard.writeText(o);const i=n.substring(0,t)+n.substring(r,n.length);e.value=i})(t)}};Zv(e,r)}const n=(e=>!PY(e)&&!!DY())(t);if(n){const t=DY(),r={id:"copy",labelKey:(0,Dv.cu)("Copy"),icon:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 2H19V4L4 4V19H2V2ZM7 7H20V20H7V7ZM5 22V5H22V22H5Z" fill="currentColor"></path></svg>',category:Dv.de,enabled:n,executeFunction:()=>{(async e=>{const t=void 0===e?DY():e;await(0,Dv.dd)().clipboard.writeText(t)})(t)}};Zv(e,r)}if(r){const r={id:"paste",labelKey:(0,Dv.cu)("Paste"),icon:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M6 7H21V16H19V9H8V20H15V22H6V7Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M10.9146 3H13V4H16V6H5V19H3V4H6V3H8.08535C8.29127 2.4174 8.84689 2 9.5 2C10.1531 2 10.7087 2.4174 10.9146 3Z" fill="currentColor"></path><path d="M16 17V22L21 17H16Z" fill="currentColor"></path></svg>',category:Dv.de,enabled:MY(t),executeFunction:async()=>{(async e=>{const t=await(0,Dv.dd)().clipboard.readText(),r=e.selectionStart??0,n=e.selectionEnd??r,o=e.value,i=o.substring(0,r)+t+o.substring(n,o.length);e.value=i,e.selectionStart=r+t.length,e.selectionEnd=r+t.length,e.focus()})(t)}};Zv(e,r)}})(t),(e=>{if((0,Dv.bs)(Dv.bt.SHELL_SEARCH_CONTEXT_MENU)){const t=(e=>Yv(e).find(e=>"string"===e.type)?.value??void 0)(e);if(t){const r={label:(0,Dv.cB)('Search for "{{searchString}}"',{searchString:(0,Dv.df)(t,12,!0)}),icon:Ob,enabled:!0,category:Dv.dg,executeFunction:()=>{(0,Dv.dh)({query:t})}};Zv(e,r)}}})(t)}(e);const t=Jv(e).map(e=>WY(e,e=>(0,Dv.cB)(e))),r=Yv(e),n=[...t,...this.getActionsForContexts(r)];this.hasCustomActions(n)&&(e.preventDefault(),this.showContextMenu(e,FY(n)))}},this.showContextMenu=(e,t)=>{const r=document.createElement(VY.tagName);r.menuItems=t,r.style.zIndex=CZ.contextMenu,r.style.position="absolute",this.appendChild(r),setTimeout(()=>{const t=Math.max(0,Math.min(e.pageX,this.clientWidth-r.clientWidth)),n=Math.max(0,Math.min(e.pageY,this.clientHeight-r.clientHeight));r.style.left=`${t}px`,r.style.top=`${n}px`});const n=()=>{r.remove(),s()},o=()=>{n()},i=e=>{"Escape"===e.key&&n()},s=()=>{document.removeEventListener("click",o),document.removeEventListener("contextmenu",o),document.removeEventListener("keydown",i)};document.addEventListener("click",o),document.addEventListener("keydown",i),setTimeout(()=>document.addEventListener("contextmenu",o))},this.updateTheme=e=>{Iy((0,Dv.bL)().getElementsByTagName(Dv.dj)[0],e),Ay(e)}}initializeController(){this.initialized=!0,this.isConnected&&this.init()}init(){this.updateContextMenuIntegrations(),this.updateLocale(),this.addContextMenuListener(),this.subscribeToLocaleChange(),this.subscribeToThemeChange(),this.subscribeToApplicationReady(),(0,Dv.O)().isIntegration&&Promise.resolve().then(r.bind(r,769)).then(e=>e.gt).then(({app:e})=>e.initialize().then(()=>e.getContext().then(t=>{(0,Dv.aY)(Ly(t.app.theme)),e.registerOnThemeChangeHandler(e=>{(0,Dv.aY)(Ly(e))})}))).catch(e=>{(0,Dv.g)().error("Could not initialize msteams sdk",e)})}connectedCallback(){super.connectedCallback(),this.initialized&&this.init()}render(){return Dv.aH`<slot></slot>`}subscribeToLocaleChange(){const{localeChanged:e}=(0,Dv.au)().subscribeTo("I18N");e.on(this.updateLocale),this.unsubscribeFunctions.push(()=>{e.removeListener(this.updateLocale)})}addContextMenuListener(){this.addEventListener("contextmenu",this.handleContextMenu),this.unsubscribeFunctions.push(()=>{this.removeEventListener("contextmenu",this.handleContextMenu)})}canShowShellContextMenu(e){const t=e.composedPath()[0]??e.target;return!(e.shiftKey||e.showNativeMenu||e.defaultPrevented||PY(t))}hasCustomActions(e){const t=["cut","copy","paste"];return e.some(e=>!t.includes(e.id??""))}subscribeToThemeChange(){const{themeChanged:e}=(0,Dv.au)().subscribeTo("Shell");e.on(this.updateTheme),this.unsubscribeFunctions.push(()=>{e.removeListener(this.updateTheme)})}async updateContextMenuIntegrations(){this.extensionIntegrations=await(0,Dv.Z)().extensions.queryInterface(Dv.dk)}subscribeToApplicationReady(){const{applicationReady:e}=(0,Dv.au)().subscribeTo("Shell"),t=()=>this.updateContextMenuIntegrations();e.on(t),this.unsubscribeFunctions.push(()=>{e.removeListener(t)})}};KY.tagName="goto-shell-controller";let qY=KY;var GY=Object.defineProperty,ZY=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&GY(t,r,i),i};const YY=class extends Dv.bP{constructor(){super(...arguments),this.hasStartedSignIn=!1,this.isAuthServiceOutage=(0,Dv.a6)()}static get styles(){return(0,Dv.ck)("chameleon-goto-logo{--goto-icon-size: 92px}.landing-container{padding-left:120px;padding-right:var(--goto-spacing-07);padding-top:120px;background-color:var(--goto-background-color-default);background-image:url(\"data:image/svg+xml,%3csvg%20width='1208'%20height='698'%20viewBox='0%200%201208%20698'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_510_340004)'%3e%3cpath%20d='M1134.78%20377.017C1077.66%20376.937%201021.09%20388.127%20968.308%20409.947C915.525%20431.766%20867.565%20463.785%20827.177%20504.17C786.789%20544.555%20754.766%20592.512%2
40350732.943%20645.293C711.12%20698.075%20699.925%20754.643%20700%20811.759C700%201051.38%20895.057%201246.53%201134.78%201246.53C1192.19%201247.04%201249.14%201236.17%201302.33%201214.54C1355.52%201192.92%201403.9%201160.98%201444.68%201120.56C1485.46%201080.14%201517.82%201032.04%201539.91%20979.039C1562%20926.041%201573.37%20869.193%201573.37%20811.775C1573.37%20754.358%201562%20697.509%201539.91%20644.511C1517.82%20591.513%201485.46%20543.415%201444.68%20502.994C1403.9%20462.573%201355.52%20430.629%201302.33%20409.007C1249.14%20387.384%201192.19%20376.512%201134.78%20377.017ZM1134.78%201053.33C1087%201053.33%201040.29%201039.17%201000.56%201012.63C960.828%20986.091%20929.861%20948.366%20911.572%20904.226C893.283%20860.086%20888.494%20811.513%20897.812%20764.652C907.129%20717.79%20930.133%20674.743%20963.916%20640.956C997.698%20607.169%201040.74%20584.158%201087.6%20574.835C1134.46%20565.511%201183.04%20570.293%201227.18%20588.576C1271.32%20606.858%201309.05%20637.821%201335.6%20677.547C1362.14%20717.273%201376.31%20763.979%201376.31%20811.759C1376.29%20875.815%201350.84%20937.243%201305.55%20982.541C1260.26%201027.84%201198.83%201053.3%201134.78%201053.33Z'%20fill='%23FFE900'/%3e%3cpath%20d='M-572.571%201340.62L606.5%20750.158L519.499%20576.43L-659.572%201166.9L-572.571%201340.62Z'%20fill='%238CB4C8'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_510_340004'%3e%3crect%20width='1208'%20height='698'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e\");background-position:right bottom;background-repeat:no-repeat;background-size:cover;background-attachment:fixed;box-sizing:border-box;overflow:auto;height:100%}.container-title{width:100%}.container-description{margin-bottom:var(--goto-spacing-07);margin-top:var(--goto-spacing-07);width:100%;max-width:571px}.user-action-container{display:flex}.or-text{padding:var(--goto-spacing-03)}.download-description{padding-top:var(--goto-spacing-07);padding-bottom:var(--goto-spacing-03)}.message-info-container{gap:var(--goto-spacing-01);margin-top:var(--goto-spacing-04);display:flex;align-items:center}@media(max-width:770px){.landing-container{padding-left:var(--goto-spacing-07)}.user-action-container{display:block}.or-text{display:none}.text-field-container{margin-top:0}}@media(max-width:530px){:host{overflow-x:scroll}}@media(max-width:432px){.landing-container{width:100vw;padding:var(--goto-spacing-07);display:block}.container-title,.user-action-container{width:100%}}")}connectedCallback(){super.connectedCallback(),this.unsubscribeFunctions.push((0,Dv.dl)(e=>{this.isAuthServiceOutage=e}))}login(){if(this.isAuthServiceOutage)return;this.hasStartedSignIn=!0;const e=(0,Dv.dm)()??(0,Dv.dn)()??"/";(0,Dv.Z)().auth.login({inflightPathname:e,restartFlow:!0})}renderSignInStartedInfoMessage(){return this.hasStartedSignIn&&(0,Dv.bB)()?Dv.aH`
4036          <div class="message-info-container">
4037            <chameleon-svg>${(0,Dv.bR)(Eb)}</chameleon-svg>
4038            <chameleon-typography variant="caption-medium">
4039              ${(0,Dv.bQ)("Sign in using the last tab we opened in your browser.")}
4040            </chameleon-typography>
4041          </div>
4042        `:Dv.cm}renderMobileAppDownloadPrompt(){return(0,Dv.dp)()?Dv.aH`
4043          <chameleon-typography variant="body-large" class="download-description">
4044            ${(0,Dv.bQ)("Get the most out of GoTo on the mobile app.")} </chameleon-typography
4045          ><goto-mobile-badge></goto-mobile-badge>
4046        `:Dv.cm}renderMeetingIdInput(){return(0,Dv.O)().isIntegration&&(0,Dv.dp)()?Dv.cm:Dv.aH`<goto-meeting-id-input></goto-meeting-id-input>`}getDescriptionText(){return(0,Dv.O)().isIntegration&&(0,Dv.dp)()?(0,Dv.cB)("Sign in to see your calls."):(0,Dv.cB)("Sign in to see your meetings and more or enter session ID or name to join a meeting.")}render(){return Dv.aH` <div class="landing-container">
4047      <div class="landing-content">
4048        <chameleon-goto-logo></chameleon-goto-logo>
4049        <chameleon-typography variant="heading-large" class="container-title">
4050          ${(0,Dv.bQ)("Tools to help you work together better")}
4051        </chameleon-typography>
4052        <chameleon-typography variant="body-large" class="container-description">
4053          ${this.getDescriptionText()}
4054        </chameleon-typography>
4055        <div class="user-action-container">
4056          <chameleon-button
4057            id="sign-in-to-goto"
4058            variant="primary"
4059            size="xlarge"
4060            ?disabled=${this.isAuthServiceOutage}
4061            @click=${this.login}
4062          >
4063            ${(0,Dv.bQ)("Sign in to GoTo")}
4064          </chameleon-button>
4065          <chameleon-typography variant="body-large" class="or-text">${(0,Dv.bQ)("Or")}</chameleon-typography>
4066          ${this.renderMeetingIdInput()}
4067        </div>
4068        ${this.renderSignInStartedInfoMessage()} ${this.renderMobileAppDownloadPrompt()}
4069      </div>
4070    </div>`}};YY.tagName="goto-shell-landing";let JY=YY;ZY([(0,Dv.ct)()],JY.prototype,"hasStartedSignIn"),ZY([(0,Dv.ct)()],JY.prototype,"isAuthServiceOutage");const QY={activeTrialMessage:(0,Dv.cu)("Your trial expires in {{trialDaysLeft}} days."),activeFreeMessage:(0,Dv.cu)("You are using a free version of GoTo."),expiredTrialMessage:(0,Dv.cu)("Your trial has expired"),buyButtonText:(0,Dv.cu)("Buy Now"),upgradeButtonText:(0,Dv.cu)("Upgrade Now")};var XY=Object.defineProperty,eJ=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&XY(t,r,i),i};const tJ=class extends Dv.bP{constructor(){super(...arguments),this.isFreeUser=!1,this.isTrialUser=!1}connectedCallback(){super.connectedCallback(),this.isFreeUser=(0,Dv.dq)(),this.isTrialUser=(0,Dv.dr)()}getTrialDaysLeft(){const e=(0,Dv.ds)();if(!e)return 0;const t=(0,Dv.dt)(new Date,e);return t<0?0:t}getBannerMessage(){return this.isTrialUser?this.getTrialMessage():this.isFreeUser?this.getFreeMessage():Dv.cm}getBannerLinkText(){return this.isTrialUser?this.getTrialLinkText():this.isFreeUser?this.getFreeLinkText():Dv.cm}getTrialMessage(){const e=this.getTrialDaysLeft();return e?(0,Dv.cB)(QY.activeTrialMessage,{trialDaysLeft:e}):(0,Dv.cB)(QY.expiredTrialMessage)}getFreeMessage(){return(0,Dv.cB)(QY.activeFreeMessage)}getTrialLinkText(){return(0,Dv.cB)(QY.buyButtonText)}getFreeLinkText(){return(0,Dv.cB)(QY.upgradeButtonText)}getEventText(){return this.isTrialUser?"Visit purchase site":this.isFreeUser?"Visit upgrade site":""}getTrackingText(){return this.isTrialUser?"GoTo > GTM Trial Banner":this.isFreeUser?"GoTo > GTM Free Banner":""}render(){return Dv.aH`<chameleon-banner variant="marketing">
4071      <chameleon-svg slot="icon">${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 1C18.075 1 23 5.925 23 12C23 18.075 18.075 23 12 23C5.925 23 1 18.075 1 12C1 5.925 5.925 1 12 1ZM9.58572 9C9.03343 9 8.58572 9.44771 8.58572 10C8.58572 10.5523 9.03343 11 9.58572 11L9.96756 11.0009L10.0087 11.0044L10.5616 11.0056L9.63136 16.0381L9.58735 16.3374C9.57825 16.466 9.57825 16.5947 9.59646 16.7219C9.6086 16.8236 9.62681 16.9179 9.6602 17.0137C9.94398 17.9338 10.9137 18.7208 12.1778 
407118.9408C13.8289 19.228 15.3495 18.4425 15.5741 17.1887C15.6469 16.7817 15.3707 16.3927 14.9579 16.3209C14.6034 16.2597 14.2714 16.4557 14.1376 16.7695L14.085 16.9131L13.9882 17.072C13.9457 17.1289 13.8926 17.1767 13.838 17.2216C13.797 17.2501 13.7485 17.277 13.6969 17.3039C13.5588 17.3713 13.404 17.4102 13.2416 17.3817C12.8379 17.3114 12.5724 16.9029 12.63 16.5049L13.6771 10.4962C13.6771 9.6703 12.9973 9 12.1596 9H9.58572ZM12.7774 5.00273C11.949 5.00273 11.2774 5.67431 11.2774 6.50273C11.2774 7.33116 11.949 8.00273 12.7774 8.00273C13.6058 8.00273 14.2774 7.33116 14.2774 6.50273C14.2774 5.67431 13.6058 5.00273 12.7774 5.00273Z" fill="currentColor"></path></svg>')}</chameleon-svg>
4072      <span>${this.getBannerMessage()}</span>
4073      <chameleon-link
4074        slot="action"
4075        href="${Dv.du}"
4076        target="_blank"
4077        @click=${()=>{(0,Dv.cr)().track(`${this.getTrackingText()}`,{action:"Click",event:this.getEventText()})}}
4078      >
4079        ${this.getBannerLinkText()}
4080      </chameleon-link>
4081    </chameleon-banner>`}};tJ.tagName="goto-trial-banner";let rJ=tJ;eJ([(0,Dv.ct)()],rJ.prototype,"isFreeUser"),eJ([(0,Dv.ct)()],rJ.prototype,"isTrialUser");const nJ="TOS_PREVIOUS_URL",oJ=async()=>{try{await(0,Dv.y)(`${(0,Dv.an)().caPSBaseUrl}/rest/v1/members/me/tcagreement`,{method:"POST"})}catch(e){(0,Dv.g)().error("acceptTermsOfService failed",e)}},iJ="terms-of-service",sJ=class extends Dv.co{static get styles(){return(0,Dv.ck)(".tos-list{margin-top:var(--goto-spacing-02);line-height:var(--goto-layout-02)}")}acceptTerms(){const e=Mv().retrieve(iJ);e.commands.singleFireAccept.isHandled()?(e.commands.singleFireAccept.execute(),e.commands.singleFireAccept.removeHandler(),e.commands.singleFireRefuse.removeHandler()):oJ().then(()=>{const e=(0,Dv.dv)(nJ);e?((0,Dv.bj)(e),(0,Dv.cJ)()):((0,Dv.bj)("/"),(0,Dv.cJ)())})}refuseTerms(){const e=Mv().retrieve(iJ);if(e.commands.singleFireRefuse.isHandled())e.commands.singleFireRefuse.execute(),e.commands.singleFireAccept.removeHandler(),e.commands.singleFireRefuse.removeHandler();else{const e=(0,Dv.an)().myAccountPageUrl;(0,Dv.bB)()?((0,Dv.bk)(e),Dv.bA.LifeCycle.quit?.()):(0,Dv.dw)(e)}}render(){return Dv.aH`<chameleon-dialog open close-button-label=${(0,Dv.bQ)("Close dialog")}>
4082      <span slot="title">${(0,Dv.bQ)("Terms of Service")}</span>
4083      <chameleon-typography tag="p" variant="body-medium"
4084        >${(0,Dv.bQ)("Please read and acknowledge the terms of service governing the use of this application:")}
4085      </chameleon-typography>
4086      <chameleon-typography tag="p" variant="body-medium" class="tos-list">
4087        <a href="${Dv.dx}" target="_blank">English ${(0,Dv.bQ)("English")}</a><br />
4088        <a href="${Dv.dy}" target="_blank">Español ${(0,Dv.bQ)("Spanish")}</a><br />
4089        <a href="${Dv.dz}" target="_blank">Deutsch ${(0,Dv.bQ)("German")}</a><br />
4090        <a href="${Dv.dA}" target="_blank">Français ${(0,Dv.bQ)("French")}</a><br />
4091        <a href="${Dv.dB}" target="_blank">Português ${(0,Dv.bQ)("Portuguese")}</a>
4092      </chameleon-typography>
4093      <div slot="actions">
4094        <chameleon-button @click=${this.acceptTerms} data-testid="agree">${(0,Dv.bQ)("I agree")}</chameleon-button>
4095        <chameleon-button variant="secondary" @click=${this.refuseTerms} data-testid="disagree"
4096          >${(0,Dv.bQ)("I disagree")}</chameleon-button
4097        >
4098      </div>
4099    </chameleon-dialog>`}};sJ.tagName="goto-terms-of-service";let aJ=sJ;var lJ=Object.defineProperty;const cJ=class extends Dv.co{constructor(){super(...arguments),this.isCompact=!1}static get styles(){return(0,Dv.ck)(":host(.standalone){position:absolute;left:var(--goto-spacing-04);top:0}img{display:block;height:var(--goto-spacing-06);width:auto}chameleon-goto-logo{--goto-icon-size: var(--goto-layout-05)}chameleon-goto-logo[compact]{--goto-icon-size: var(--goto-layout-03)}")}render(){return Dv.aH`<chameleon-goto-logo ?compact=${this.isCompact}></chameleon-goto-logo>`}};cJ.tagName="topbar-logo";let dJ=cJ;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&lJ(t,r,o)})([(0,Dv.cn)({type:Boolean})],dJ.prototype,"isCompact");const uJ="li{align-items:center;display:flex;height:100%;margin-bottom:var(--goto-spacing-00);margin-top:var(--goto-spacing-00)}.container{align-items:center;background-color:var(--goto-surface-color-default);border-bottom:1px solid var(--goto-border-color-default);display:flex;height:var(--goto-layout-04);padding-right:var(--goto-spacing-04);padding-left:var(--goto-spacing-04)}chameleon-icon-button{-webkit-app-region:no-drag;display:inline-flex}.nav-sidebar-toggle{margin-right:var(--goto-spacing-02)}goto-avatar-container{-webkit-app-region:no-drag;border-radius:var(--goto-spacing-05);display:flex;align-items:center;height:2rem;margin-left:var(--goto-spacing-02)}goto-avatar-container.has-note{background-color:var(--goto-interactive-color-neutral-default)}topbar-logo{align-items:center;display:flex;margin:var(--goto-spacing-00) var(--goto-spacing-04) var(--goto-spacing-00) var(--goto-spacing-00)}ul{align-items:center;display:flex;height:100%;justify-content:flex-end;list-style-type:none;margin:var(--goto-spacing-00);padding:var(--goto-spacing-00)}nav{height:100%}nav ul.topbar-ul li chameleon-icon-button.pendo-icon div.pendo-resource-center-badge-notification-bubble{background-color:var(--goto-surface-color-danger-default)!important;margin-left:21px!important;margin-top:6px!important;width:11px!important;height:11px!important;left:0!important;top:0!important}nav ul.topbar-ul li chameleon-icon-button.pendo-icon div.pendo-resource-center-badge-notification-bubble .pendo-notification-bubble-unread-count{visibility:hidden!important}goto-topbar-global-search{flex:1}goto-topbar-global-search::part(full-search){margin-right:var(--goto-spacing-03)}goto-topbar-global-search::part(compact-search){margin-right:0}goto-account-switcher,shell-topbar-call-card-container,shell-asm-topbar-button{-webkit-app-region:no-drag}goto-update-chip{-webkit-app-region:no-drag;margin-left:var(--goto-spacing-02)}",hJ=":host{-webkit-app-region:drag;display:block}",pJ="UpdateNotifications",gJ={updateAvailable:(0,Dv.F)(),noUpdateAvailable:(0,Dv.F)(),checkForUpdatesStartedOrStopped:(0,Dv.F)(),resetUpdateStatus:(0,Dv.F)()},{emit:fJ}=(0,Dv.au)().register(pJ,gJ),mJ=e=>{fJ.updateAvailable(e)},vJ=()=>{(0,Dv.O)().send({type:"companion-update",payload:{topic:"get-update-status"}})},bJ=e=>{(0,Dv.O)().send({type:"companion-update",payload:{topic:"update-available",data:{updateInfo:e}}})},yJ=(e,t)=>{const r=new Date(e);r.setHours(0,0,0,0);const n=new Date(t);n.setHours(0,0,0,0);const o=r.getTime()-n.getTime();return Math.trunc(o/864e5)};let wJ,xJ,_J,kJ;const CJ=async()=>(void 0===xJ&&(xJ=Dv.bz.isPluginAvailable("AutoUpdater2")&&await Dv.bA.AutoUpdater2.areUpdatesEnabled()),xJ),SJ=()=>
4099{const e=(0,Dv.dC)("AutoUpdater2","quitAndInstall");e&&e()},EJ=e=>{wJ=e,(e=>{fJ.checkForUpdatesStartedOrStopped(e)})(e),!e&&!_J&&(Dv.bA.AutoUpdater2.onUpdateAvailable(IJ),_J=!0)},IJ=e=>{kJ=e,mJ(e)},AJ=()=>kJ,TJ=()=>{const e=window.shell.display.modal({id:"update-modal",title:(0,Dv.cB)("Update GoTo now?"),closable:!0,content:(0,Dv.cB)("Your GoTo app will restart during the update."),actions:[{label:(0,Dv.cB)("Update & restart"),handler:()=>{SJ()},size:"medium"},{label:(0,Dv.cB)("Ask me later"),handler:()=>{e.close()},variant:"tertiary",size:"medium"}]})},OJ=()=>{(0,Dv.dD)(()=>(((0,Dv.Z)()?.display)?.snackbar)?.({id:"update-error-snackbar",title:(0,Dv.cB)("Update unsuccessful"),message:(0,Dv.cB)("Try again or contact us for help."),variant:"error",actions:[{label:(0,Dv.cB)("Contact support"),handler:()=>(0,Dv.bk)((0,Dv.an)().containerUpdateSupportUrl)}]}))},LJ=e=>{(0,Dv.g)().error("Container update failed",e),OJ()},$J=()=>{window.shell.display.snackbar({id:"update-snackbar",title:(0,Dv.cB)("GoTo app is up to date")})},NJ=e=>{const t=Date.now();return yJ(t,Date.parse(e.releaseDate))},RJ=["en_AU","en_CA","en_GB","en_IE","en_US"],PJ=e=>"LI"===e.nodeName&&e.firstChild instanceof HTMLElement&&"peekaboo-popover-id"===e.firstChild.id,DJ=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),MJ="CurrentWindow",zJ=e=>e instanceof Element&&(e.classList.contains("js-no-maximize")||DJ.has(e.nodeName)||e.nodeName.includes("-")),FJ=e=>{!(e=>{const t=e.findIndex(e=>e instanceof Element&&e.classList.contains("container"));return t>=0?e.slice(0,t):e})(e.composedPath()).some(zJ)&&!(0,Dv.dF)()&&Dv.bz.isPluginAvailable(MJ)&&Dv.cf.currentWindow.handleTitleBarDoubleClick&&Dv.cf.currentWindow.handleTitleBarDoubleClick()};var UJ=Object.defineProperty,BJ=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&UJ(t,r,i),i};const HJ=class extends Dv.bP{constructor(){super(...arguments),this.hasNote=!1,this.unsubscribeUpdateAvailable=Dv.cx,this.handlePresenceClick=e=>{(0,Dv.cr)().track("GoTo > Topbar - Presence",{from:"Topbar",action:"Selected",presence:e.detail.presence})},this.handleNavSidebarToggleClick=()=>{ZG().toggleNavigationOpenState()}}async connectedCallback(){super.connectedCallback(),await CJ()&&this.listenToUpdateAvailableEvent(),this.addEventListener("presenceClicked",this.handlePresenceClick);const{presenceUpdate:e}=(0,Dv.au)().subscribeTo(Dv.s),t=e=>{const{userKey:t,userNote:r}=e;(0,Dv.Z)().user.key===t&&(this.hasNote=!!r?.length)};e.on(t),this.unsubscribeFunctions.push(()=>{e.removeListener(t)})}async firstUpdated(e){super.firstUpdated(e),(0,Dv.d2)()&&this.adaptToTrafficLightPosition(),this.topbarUL&&(e=>{(0,Dv.dE)(PJ,e).then(t=>{const r=e.children[2];e.insertBefore(t,r);const n=t.querySelector?.("#peekaboo-popover-id");n&&n.setAttribute("size","large")})})(this.topbarUL)}disconnectedCallback(){this.unsubscribeUpdateAvailable(),this.unsubscribeUpdateAvailable=Dv.cx,this.removeEventListener("presenceClicked",this.handlePresenceClick),super.disconnectedCallback()}async adaptToTrafficLightPosition(){const e=(0,Dv.dC)(MJ,"getTrafficLightPosition");if(!e)return;const t=await e();!t||!this.container||this.style.setProperty("--traffic-light-x-position",`${t.x}px`)}listenToUpdateAvailableEvent(){const{eventBus:e}=(0,Dv.Z)(),{updateAvailable:t}=e.subscribeTo(pJ),r=e=>{this.updateAge=NJ(e)};t.on(r),this.unsubscribeUpdateAvailable=()=>{t.removeListener(r)};const n=AJ();n&&r(n)}static get styles(){return(0,Dv.dF)()?[(0,Dv.ck)(uJ)]:(0,Dv.d2)()?[(0,Dv.ck)(uJ),(0,Dv.ck)(hJ),(0,Dv.ck)(":host{--traffic-light-x-position: 0px;--traffic-light-width: 52px}.container{padding-left:calc(var(--goto-spacing-04) + var(--traffic-light-x-position) + var(--traffic-light-width))}")]:[(0,Dv.ck)(uJ),(0,Dv.ck)(hJ)]}renderAvatarContainerListItem(){return Dv.aH`
4100      <li>
4101        <goto-avatar-container
4102          class=${this.hasNote?"js-no-maximize has-note":"js-no-maximize"}
4103          size=${UW.MEDIUM}
4104        ></goto-avatar-container>
4105      </li>
4106    `}renderNavSidebarHamburgerMenu(){return(0,Dv.bs)(Dv.bt.SHELL_HIDDEN_FLOATING_SIDEBAR)||(0,Dv.bs)(Dv.bt.SHELL_HIDDEN_FLOATING_NAVRAIL)?Dv.aH`<goto-responsive-view max="sm"
4107          ><chameleon-icon-button
4108            label=${(0,Dv.bQ)("Show/hide navigation and sidebar")}
4109            size="large"
4110            variant="primary"
4111            class="nav-sidebar-toggle"
4112            @click=${this.handleNavSidebarToggleClick}
4113            ><chameleon-svg>${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M3 8V6H20.9995C20.9995 6 21 6 21 7C21 8 20.9999 8 20.9999 8H3Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M3 13V11H20.9995C20.9995 11 21 11 21 12C21 13 20.9999 13 20.9999 13H3Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M3 18V16H20.9995C20.9995 16 21 16 21 17C21 18 20.9999 18 20.9999 18H3Z" fill="currentColor"></path></svg>')}</chameleon-svg></chameleon-icon-button
4114          ></goto-responsive-view
4115        >`:Dv.cm}renderBrand(){return(0,Dv.bB)()||(0,Dv.cs)()===Dv.p.SIDE_PANEL?Dv.cm:Dv.aH`<goto-responsive-view min="xs" max="xs"
4116        ><topbar-logo ?iscompact=${!0} class="goto-logo-compact"></topbar-logo></goto-responsive-view
4117      ><goto-responsive-view min="sm"
4118        ><topbar-logo ?iscompact=${!1} class="goto-logo"></topbar-logo
4119      ></goto-responsive-view>`}renderUpdateButton(e){return null!=e?Dv.aH`<goto-responsive-view class="update-chip-responsive-view" min="sm"
4120          ><li>
4121            <goto-update-chip
4122              .updateAge=${e}
4123              @click=${TJ}
4124              @keyup=${TJ}
4125            ></goto-update-chip>
4126          </li>
4127        </goto-responsive-view>`:Dv.cm}renderAccountSwitcher(){return(0,Dv.bs)(Dv.bt.SHELL_HIDE_TOPBAR_ACCOUNT_SWITCHER)?Dv.cm:Dv.aH`<goto-responsive-view min="sm">
4128      <goto-account-switcher></goto-account-switcher>
4129    </goto-responsive-view>`}renderGlobalSearch(){return Dv.aH`<goto-topbar-global-search></goto-topbar-global-search>`}renderCallCardListItem(){return Dv.aH`
4130      <li>
4131        <shell-topbar-call-card-container></shell-topbar-call-card-container>
4132      </li>
4133    `}renderASMListItem(){return Dv.aH`
4134      <li>
4135        <shell-asm-topbar-button></shell-asm-topbar-button>
4136      </li>
4137    `}renderHelpIcon(){return Dv.aH`<li>
4138      <chameleon-icon-button aria-label=${(0,Dv.bQ)("Help")} variant="primary" size="large" id="help-trigger" class="help-icon">
4139        <chameleon-svg>${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M13.9801 12.3101C13.3886 12.7565 12.8543 13.1597 12.8733 13.9263H10.987C10.987 12.398 11.8142 11.7675 12.5118 11.2358C13.0204 10.8482 13.4601 10.513 13.4601 9.92072C13.4601 9.26704 12.9431 8.82197 12.0908 8.82197C11.1407 8.82197 10.5679 9.3783 10.5679 10.3936H8.5C8.5 8.26565 9.99501 7 12.0908 7C14.2146 7 15.5 8.15438 15.5 9.76773C15.5 11.1631 14.6979 11.7684 13.9801 12.3101Z" fill="currentColor"></path><path d="M11.9232 17C11.3084 17 10.7914 16.4715 10.7914 15.8734C10.7914 15.2476 11.3084 14.733 11.9232 14.733C12.5519 14.733 13.0689 15.2476 13.0689 15.8734C13.0689 16.4715 12.5519 17 11.9232 17Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z" fill="currentColor"></path></svg>')}</chameleon-svg>
4140      </chameleon-icon-button>
4141      <chameleon-popover trigger-id="help-trigger" label=${(0,Dv.bQ)("Help menu")} id="help-popover" menu>
4142        <goto-topbar-help-menu></goto-topbar-help-menu>
4143      </chameleon-popover>
4144    </li>`}renderPendoIcon(){return(()=>{const e=(0,Dv.Z)().i18n.selectedLocale;return!!(0,Dv.bs)(Dv.bt.TOPBAR_PENDO_ICON)&&RJ.includes(e)})()?Dv.aH`<li>
4145          <chameleon-icon-button aria-label="Resource Center" variant="primary" size="large" class="pendo-icon">
4146            <chameleon-svg>${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M4 10.1099C6.93771 10.4346 9.66234 11.4663 12 13.0311C14.3377 11.4663 17.0623 10.4346 20 10.1099C20.6567 10.0373 21.324 10 22 10V19C18.3198 19 14.8975 20.1045 12.0466 22H11.9534C9.10247 20.1045 5.68021 19 2 19V10C2.67602 10 3.34333 10.
41460373 4 10.1099ZM13.1125 14.6931C15.1308 13.3421 17.4725 12.4384 20 12.1236V17.0989C17.5043 17.347 15.1417 18.0542 13 19.1351V14.7684L13.1125 14.6931ZM11 14.7684L10.8875 14.6931C8.86923 13.3421 6.52746 12.4384 4 12.1236V17.0989C6.49574 17.347 8.85826 18.0542 11 19.1351V14.7684ZM14 6C14 7.10457 13.1046 8 12 8C10.8954 8 10 7.10457 10 6C10 4.89543 10.8954 4 12 4C13.1046 4 14 4.89543 14 6ZM12 10C14.2091 10 16 8.20914 16 6C16 3.79086 14.2091 2 12 2C9.79086 2 8 3.79086 8 6C8 8.20914 9.79086 10 12 10Z" fill="currentColor"></path></svg>')}</chameleon-svg>
4147          </chameleon-icon-button>
4148        </li>`:Dv.cm}render(){return Dv.aH`
4149      <div class="container" @dblclick=${FJ}>
4150        ${this.renderNavSidebarHamburgerMenu()} ${this.renderBrand()} ${this.renderAccountSwitcher()}
4151        ${this.renderGlobalSearch()}
4152        <nav aria-label=${(0,Dv.bQ)("GoTo top bar")}>
4153          <ul class="topbar-ul">
4154            ${this.renderCallCardListItem()}${this.renderASMListItem()}${this.renderHelpIcon()}${this.renderPendoIcon()}${this.renderUpdateButton(this.updateAge)}
4155            ${this.renderAvatarContainerListItem()}
4156          </ul>
4157        </nav>
4158      </div>
4159    `}};HJ.tagName="goto-topbar";let jJ=HJ;BJ([(0,Dv.ct)()],jJ.prototype,"updateAge"),BJ([(0,Dv.ct)()],jJ.prototype,"hasNote"),BJ([(0,Dv.bS)(".container")],jJ.prototype,"container"),BJ([(0,Dv.bS)(".topbar-ul")],jJ.prototype,"topbarUL");const VJ=class extends Dv.bP{static get styles(){return(0,Dv.ck)(":host{background-color:var(--goto-background-color-default);display:flex}")}connectedCallback(){super.connectedCallback(),(0,Dv.cr)().track("GoTo > Unauthenticated error page",{action:"page visited"})}renderTopbarLogo(){return(0,Dv.bB)()?Dv.cm:Dv.aH` <topbar-logo class="standalone"></topbar-logo> `}handleSignInClick(){(0,Dv.bj)("/"),(0,Dv.a7)()}render(){return Dv.aH`${this.renderTopbarLogo()}<chameleon-empty-state>
4160        <chameleon-svg slot="icon" class="error-pictogram">${Dv.dG}</chameleon-svg>
4161        <p slot="title">${(0,Dv.bQ)("Something went wrong")}</p>
4162        ${(0,Dv.bQ)("Go ahead and try signing back in.")}
4163        <div slot="actions">
4164          <chameleon-button @click=${this.handleSignInClick} variant="secondary">${(0,Dv.bQ)("Sign in")}</chameleon-button>
4165          <chameleon-link
4166            @click=${()=>(0,Dv.bk)("https://link.goto.com/cannot-access-account-something-went-wrong-error")}
4167            >${(0,Dv.bQ)("Contact us")}</chameleon-link
4168          >
4169        </div></chameleon-empty-state
4170      >`}};VJ.tagName="goto-unauthenticated-error";let WJ=VJ;var KJ=Object.defineProperty,qJ=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&KJ(t,r,i),i};const GJ=class extends Dv.co{constructor(){super(...arguments),this.updateInProgress=!1,this.shellUpdatesEnabled=!1,this.unsubscribeUpdateAvailable=Dv.cx,this.updateMenuState="check-for-updates"}static get styles(){return(0,Dv.ck)(".with-spinner{display:flex;justify-content:space-between;align-items:center}.update-spinner{border:2px solid transparent;border-left:2px solid var(--goto-neutral-500);border-top:2px solid var(--goto-neutral-500);border-radius:50%;width:10px;height:10px;animation:spin 2s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}")}async connectedCallback(){super.connectedCallback(),await CJ()?(this.shellUpdatesEnabled=!0,this.listenToUpdateAvailableEvent(),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick)):this.dispatchEvent(new CustomEvent("removeUpdateMenuItem",{bubbles:!0,composed:!0}))}disconnectedCallback(){this.unsubscribeUpdateAvailable(),this.unsubscribeUpdateAvailable=Dv.cx,this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("click",this.handleClick),super.disconnectedCallback()}handleKeyDown(e){("Enter"===e.code||"Space"===e.code)&&this.triggerAction(e)}handleClick(e){this.triggerAction(e)}triggerAction(e){"check-for-updates"===this.updateMenuState&&(e.preventDefault(),this.triggerCheck()),"update-available"===this.updateMenuState&&TJ()}listenToUpdateAvailableEvent(){const{eventBus:e}=(0,Dv.Z)(),{updateAvailable:t,checkForUpdatesStartedOrStopped:r}=e.subscribeTo(pJ),n=e=>{this.updateAge=NJ(e)},o=e=>{this.updateInProgress=e};t.on(n),r.on(o),this.updateInProgress=!!wJ,this.unsubscribeUpdateAvailable=()=>{t.removeListener(n),r.removeListener(o)};const i=AJ();i&&n(i)}renderMenuItem(){return this.updateMenuState="update-available",Dv.aH`
4171      <chameleon-menu-item data-testid="update-button" class="update-button" aria-label=${(0,Dv.bQ)("Update GoTo app")}>
4172        ${(0,Dv.bQ)("Update GoTo app")}
4173        <goto-update-icon .updateAge=${this.updateAge} slot="end"></goto-update-icon>
4174      </chameleon-menu-item>
4175    `}handleupdateAvailable(e){mJ(e),TJ()}
4175triggerCheck(){((e=mJ,t=Dv.cx,r=Dv.cx)=>{Dv.bA.AutoUpdater2.checkForUpdates(e,()=>{fJ.noUpdateAvailable(),t()},r)})(this.handleupdateAvailable,$J,LJ)}renderCheckForUpdatesButton(){return this.updateMenuState="check-for-updates",Dv.aH`<chameleon-menu-item
4176      class="check-button"
4177      data-testid="check-button"
4178      aria-label=${(0,Dv.bQ)("Check for updates")}
4179    >
4180      ${(0,Dv.bQ)("Check for updates")}</chameleon-menu-item
4181    >`}renderCheckingForUpdatesButton(){return this.updateMenuState="checking-for-updates",Dv.aH`<chameleon-menu-item class="with-spinner" data-testid="checking-button" disabled>
4182      ${(0,Dv.bQ)("Checking for updates...")}
4183      <div slot="end" class="update-spinner"></div>
4184    </chameleon-menu-item>`}render(){return this.shellUpdatesEnabled?void 0!==this.updateAge?this.renderMenuItem():this.updateInProgress?this.renderCheckingForUpdatesButton():this.renderCheckForUpdatesButton():Dv.cm}};GJ.tagName="goto-avatar-update-menu-item";let ZJ=GJ;qJ([(0,Dv.ct)()],ZJ.prototype,"updateAge"),qJ([(0,Dv.ct)()],ZJ.prototype,"updateInProgress"),qJ([(0,Dv.ct)()],ZJ.prototype,"shellUpdatesEnabled");var YJ=Object.defineProperty;const JJ=class extends Dv.co{constructor(){super(...arguments),this.updateAge=0}static get styles(){return(0,Dv.ck)("chameleon-chip{cursor:pointer}")}render(){return Dv.aH`<chameleon-chip
4185      ><chameleon-svg slot="icon">${(0,Dv.bR)(kb)}</chameleon-svg>${(0,Dv.bQ)("Update Available")}</chameleon-chip
4186    >`}};JJ.tagName="goto-update-chip";let QJ=JJ;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&YJ(t,r,o)})([(0,Dv.cn)({type:Number})],QJ.prototype,"updateAge");var XJ=Object.defineProperty;const eQ=class extends Dv.co{constructor(){super(...arguments),this.updateAge=0}static get styles(){return(0,Dv.ck)(".green-icon{--goto-icon-color: var(--goto-icon-color-success)}.yellow-icon{--goto-icon-color: var(--goto-icon-color-warning)}.red-icon{--goto-icon-color: var(--goto-icon-color-danger)}")}render(){let e="green-icon";return this.updateAge>7?e="red-icon":this.updateAge>4&&(e="yellow-icon"),Dv.aH`<div class=${e}><chameleon-svg>${(0,Dv.bR)(kb)}</chameleon-svg></div>`}};eQ.tagName="goto-update-icon";let tQ=eQ;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&XJ(t,r,o)})([(0,Dv.cn)({type:Number})],tQ.prototype,"updateAge");var rQ=Object.defineProperty,nQ=Object.getOwnPropertyDescriptor,oQ=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?nQ(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&rQ(t,r,i),i};const iQ=class extends Dv.bP{constructor(){super(...arguments),this._externalUserKey="",this.tooltipPosition="bottom-center",this.tooltipZIndex=CZ.tooltip,this.buttonSize="small",this.buttonVariant="tertiary",this.canEditStatus=!1,this.userNote="",this.currentUserExternalUserKey=(0,Dv.Z)().user.key??""}static get styles(){return(0,Dv.ck)(":host{line-height:0px}:host .user-note-icon-behind-avatar{display:block;padding-left:4px;padding-right:2px}:host chameleon-svg{pointer-events:fill}")}set externalUserKey(e){if(e!==this._externalUserKey){const t=this._externalUserKey;t&&this.isConnected&&this.unsubscribe(),this._externalUserKey=e,this.isConnected&&this.addListenerAndSubscribe(),this.requestUpdate("externalUserKey",t)}}connectedCallback(){super.connectedCallback(),this.addListenerAndSubscribe()}addListenerAndSubscribe(){this._externalUserKey&&(this.listenForPresenceUpdatedEvent(),this.subscribeToPresence())}subscribeToPresence(){const{presence:e}=(0,Dv.Z)();e&&e.subscribe(this._externalUserKey).then(()=>{this.unsubscribeFunctions.push(()=>{e.unsubscribe(this._externalUserKey)})}).catch(()=>{(0,Dv.g)().error(`failed to subscribe to presence for external user key ${this._externalUserKey}`)})}listenForPresenceUpdatedEvent(){const{eventBus:e}=(0,Dv.Z)(),{presenceUpdate:t}=e.subscribeTo(Dv.s),r=e=>{const{userKey:t,userNote:r}=e;this._externalUserKey===t&&(this.userNote=r)};t.on(r),this.unsubscribeFunctions.push(()=>{t.removeListener(r)})}getTranslatedButtonLabel(){return`${(0,Dv.cB)("Status message")}: ${this.userNote}`}getUserNoteIconButtonTemplate(){return Dv.aH`<chameleon-round-button
4187      id="user-note-icon"
4188      class="user-note-icon-behind-avatar"
4189      size=${this.buttonSize}
4190      variant=${this.buttonVariant}
4191      label=${this.getTranslatedButtonLabel()}
4192      @click=${()=>{(0,Dv.cr)().track("GoTo > Custom Status Modal",{action:"Click",event:"Open",from:"Topbar"}),(0,Dv.Z)().namespaces.retrieve(tq).commands.openPresenceNoteDialog.execute()}}
4193      >
4193${this.getSVGChatDotInactiveTemplate()}</chameleon-round-button
4194    >`}getSVGChatDotInactiveTemplate(){return Dv.aH`<chameleon-svg id="user-note-icon">${(0,Dv.bR)(Ib)}</chameleon-svg>`}render(){return this.userNote?Dv.aH` ${this.currentUserExternalUserKey===this._externalUserKey&&this.canEditStatus?this.getUserNoteIconButtonTemplate():this.getSVGChatDotInactiveTemplate()}
4195          <chameleon-tooltip position=${this.tooltipPosition} z-index=${this.tooltipZIndex} trigger-id="user-note-icon">
4196            ${this.userNote}
4197          </chameleon-tooltip>`:Dv.cm}};iQ.tagName=Dv.dH;let sQ=iQ;oQ([(0,Dv.cn)({type:String})],sQ.prototype,"externalUserKey",1),oQ([(0,Dv.cn)({type:String})],sQ.prototype,"tooltipPosition",2),oQ([(0,Dv.cn)({type:String})],sQ.prototype,"tooltipZIndex",2),oQ([(0,Dv.cn)({type:String})],sQ.prototype,"buttonSize",2),oQ([(0,Dv.cn)({type:String})],sQ.prototype,"buttonVariant",2),oQ([(0,Dv.cn)({type:Boolean})],sQ.prototype,"canEditStatus",2),oQ([(0,Dv.ct)()],sQ.prototype,"userNote",2);var aQ=Object.defineProperty;const lQ=class extends Dv.bP{constructor(){super(...arguments),this.unsubscribePresenceUpdate=Dv.cx}static get styles(){return(0,Dv.ck)(":host{display:flex}.chat-dots-icon{height:var(--goto-spacing-04);width:19px;color:var(--goto-icon-color-default)}.clear-user-note-icon{padding-right:var(--goto-spacing-02);visibility:hidden}chameleon-text-field{cursor:pointer}chameleon-text-field::part(control){cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}chameleon-text-field:hover .clear-user-note-icon{visibility:visible}")}connectedCallback(){super.connectedCallback(),this.listenForPresenceUpdatedEvent()}disconnectedCallback(){this.unsubscribePresenceUpdate(),this.unsubscribePresenceUpdate=Dv.cx,super.disconnectedCallback()}listenForPresenceUpdatedEvent(){const{eventBus:e}=(0,Dv.Z)(),{userPresenceUpdate:t}=e.subscribeTo(Dv.s),r=e=>{const{userNote:t}=e;this.userNoteInput=t};t.on(r),this.unsubscribeFunctions.push(()=>{t.removeListener(r)})}renderClearUserNoteIcon(){return this.userNoteInput?Dv.aH`
4198          <span class="clear-user-note-icon" slot="end" @click=${this.clearUserNote} @keyup=${this.clearUserNote}>
4199            <chameleon-svg id="clear-user-note">${(0,Dv.bR)(wb)}</chameleon-svg>
4200            <chameleon-tooltip label="${(0,Dv.bQ)("Clear status")}" position="top-center" trigger-id="clear-user-note">
4201              ${(0,Dv.bQ)("Clear status")}
4202            </chameleon-tooltip>
4203          </span>
4204        `:Dv.cm}async clearUserNote(e){e.stopPropagation();const{presence:t}=(0,Dv.Z)();try{await(t?.setUserPresence({userNote:""}))}catch(e){(0,Dv.g)().error(`Couldn't update userNote: ${e}`)}}getUserNoteInputTemplate(e){return Dv.aH`<chameleon-text-field
4205      readonly
4206      fieldsize="small"
4207      id="user-note-input"
4208      placeholder=${(0,Dv.bQ)("Set a status message")}
4209      value=${(0,Dv.cq)(this.userNoteInput)}
4210      .fullwidth=${!0}
4211      slot=${(0,Dv.cq)(e)}
4212    >
4213      <chameleon-svg class="chat-dots-icon" slot="start">${(0,Dv.bR)(Ib)}</chameleon-svg>
4214      ${this.renderClearUserNoteIcon()}${(0,Dv.bQ)("Status message")}
4215    </chameleon-text-field>`}getChameleonTooltipTemplate(){return Dv.aH`
4216      ${this.getUserNoteInputTemplate()}
4217      <chameleon-tooltip delay="0" position="bottom-center" trigger-id="user-note-input">
4218        ${this.userNoteInput}
4219      </chameleon-tooltip>
4220    `}render(){return Dv.aH`${this.userNoteInput?this.getChameleonTooltipTemplate():this.getUserNoteInputTemplate()}`}};lQ.tagName="goto-user-note-input";let cQ=lQ;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&aQ(t,r,o)})([(0,Dv.ct)()],cQ.prototype,"userNoteInput");const dQ=e=>e?e.split(".").splice(0,3).join("."):"",uQ=(e,t)=>{const r=e.split(".").map(Number),n=t.split(".").map(Number),o=Math.max(r.length,n.length);for(let e=0;e<o;e++){const t=r[e]??0,o=n[e]??0;if(t>o)return 1;if(t<o)return-1}return 0},hQ=class extends Dv.co{render(){return Dv.aH`${dq((async()=>{const e=["GoTo",dQ(wj())];try{Dv.bz.isPluginAvailable("ContainerInfo")&&e.push((await Dv.bA.ContainerInfo.getInfo())?.appVersion)}catch(e){(0,Dv.g)().error("Cannot get container appVersion from Plugins.ContainerInfo.getInfo()",e)}return e.join(" ").trim()})())}`}};hQ.tagName="goto-version";let pQ=hQ;const gQ=class extends Dv.co{constructor(){super(...arguments),this.getASIndicatorMessage=()=>(0,Dv.bs)("ccc-new-agent-state-model")?(0,Dv.cB)("Agent state sync enabled"):(0,Dv.bs)("ccc-new-agent-state-model-headsup")?(0,Dv.cB)("Agent state sync pending"):void 0}static get styles(){return(0,Dv.ck)(":host{display:block}")}render(){const e=this.getASIndicatorMessage();return e?Dv.aH`${e}`:Dv.cm}};gQ.tagName="goto-shell-agent-state-indicator";let fQ=gQ;const mQ=e=>{const{action:t,eventName:r,eventType:n,properties:o,searchString:i,searchResult:s}=e,a=(0,Dv.dI)(i),l=(0,Dv.dJ)(i),c=(0,Dv.dK)(i),d=(0,Dv.dL)(i),u=i.length,h=(0,Dv.dM)(i),p=(0,Dv.dP)(i),g=(0,Dv.dO)(i),f=(0,Dv.dN)(i),m=t?bQ(t):void 0,v=s?vQ(s):void 0;(0,Dv.cr)().track(r,{...o,eventType:n,isPhoneNumber:a,digits:l,letters:c,specialCharacters:d,characterCount:u,wordCount:h,email:p,meetingUrl:g,isMeetingId:f,actionInfo:m,searchResultInfo:v})},vQ=e=>({application:e.application,score:e.score}),bQ=e=>({actionID:e.id,commandName:e.command.commandName,commandNamespace:e.command.namespace});var yQ=Object.defineProperty;const wQ=class extends Dv.bP{constructor(){super(...arguments),this.searchString=""}close(){$j().close()}render(){return Dv.aH`
4221      <chameleon-dialog open closable size="large" @closed=${this.close} close-button-label=${(0,Dv.bQ)("Close dialog")}>
4222        <div class="goto-assistant">
4223          <iframe
4224            title="goto-assistant"
4225            src=${"https://app.dante-ai.com/embed/?kb_id=aeb24871-d2ff-42eb-a1dc-e081dd83f088&token=e7b3f4b3-a064-4191-ac6f-6e3c56cf5eba"}
4226            allow="clipboard-write; microphone"
4227            height="500"
4228            width="600"
4229            frameborder="0"
4230          ></iframe>
4231        </div>
4232      </chameleon-dialog>
4233    `}};wQ.tagName="goto-assistant";let xQ=wQ;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&yQ(t,r,o)})([(0,Dv.cn)({type:String})],xQ.prototype,"searchString");const _Q=class extends Dv.bP{close(){$j().close()}render(){return Dv.aH`
4234      <chameleon-dialog open closable size="large" @closed=${this.close} close-button-label=${(0,Dv.bQ)("Close dialog")}>
4235        <div class="goto-global-search-survey">
4236          <iframe
4237            title="goto-global-search-survey"
4238            src=${"https://feedback.goto.com/jfe/form/SV_cRSxpLXMJwHb1sy"}
4239            height="500"
4240            width="600"
4241            frameborder="0"
4242            style="overflow: hidden"
4243          ></iframe>
4244        </div>
4245      </chameleon-dialog>
4246    `}};_Q.tagName="goto-global-search-survey-modal";let kQ=_Q;const CQ="ShellHelp";var SQ=Object.defineProperty,EQ=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&SQ(t,r,i),i};const IQ=class extends Dv.bP{constructor(){super(...arguments),this.searchString="",this.searchResponses=[],this.suggestions=[],this.currentCategorySearchResultsTotal=0,this.convertedSearchResults=[],this.noResultFoundSearch=(0,Dv.cu)("No results found")}static get styles(){return(0,Dv.ck)(":host{margin:var(--goto-spacing-02) 0;display:block}:host chameleon-listbox-item{background-color:var(--goto-background-color-default)}:host chameleon-svg{--goto-icon-color: var(--goto-icon-color-secondary);--goto-icon-size: 20px}:host chameleon-button.selected{background-color:var(--goto-interactive-color-secondary-hover)}:host .search-result-not-found{align-items:center;box-sizing:border-box;display:flex;margin-left:var(--goto-spacing-05);padding-right:var(--goto-spacing-03)}:host .search-result-not-found .center{flex:auto;margin-left:var(--goto-spacing-03)}:host .search-result-not-found--header{padding-top:var(--goto-spacing-02);padding-bottom:var(--goto-spacing-01)}:host .search-result-not-found--body{padding-bottom:var(--goto-spacing-02)}:host .more-results-button{display:flex;margin:0 var(--goto-spacing-02) var(--goto-spacing-02) var(--goto-spacing-02)}:host .search-result-category-header{padding:var(--goto-spacing-02)}:host .search-result-category-header chameleon-typography{padding-left:var(--goto-spacing-02)}:host .search-result-category-divider{height:1px;background:var(--goto-border-color-default);margin:var(--goto-spacing-02)}:host .give-feedback-listbox-item{display:flex;justify-content:center}")}getListbox(){return this.chameleonListbox}updated(e){this.dispatchEvent(new CustomEvent("listboxrendered",{detail:{listbox:this.getListbox()}})),e.has("searchResponses")&&(this.convertedSearchResults=[],this.currentCategory=void 0,this.currentCategorySearchResultsTotal=0,this.hasResults()&&(this.setGlobalSearchSuggestions(),this.handleSearchResponses().catch(()=>{this.convertedSearchResults=[]})))}handleActionClick(e){e.stopPropagation(),this.dispatchEvent(new Event("item-click"))}handleGiveFeedbackClick(){Mv().retrieve(CQ).commands.openGlobalSearchSurvey.execute(),this.dispatchEvent(new Event("item-click"))}renderNoResultsActions(){const e=(0,Dv.Q)().getActionsForSearchString(this.searchString,"preview");return Dv.aH`
4247      ${e?.length?Dv.aH`<goto-global-search-actions
4248            @click=${this.handleActionClick}
4249            .actions=${e}
4250            searchString=${this.searchString}
4251          ></goto-global-search-actions> `:Dv.cm}
4252    `}renderNoResultsFoundElement(){return Dv.aH`
4253      <chameleon-listbox-item>
4254        <div class="search-result-not-found search-result-not-found--header">
4255          <chameleon-typography color="type-color-disabled">${this.noResultFoundSearch}</chameleon-typography>
4256        </div>
4257        <div class="search-result-not-found  search-result-not-found--body">
4258          <chameleon-svg slot="start" class="right">${(0,Dv.bR)(Ob)}</chameleon-svg>
4259          <chameleon-typography color="type-color-secondary" class="center">
4260            ${this.searchString}
4261          </chameleon-typography>
4262          ${this.renderNoResultsActions()}
4263        </div></chameleon-listbox-item
4264      >
4265    `}hasSuggestionsForCategoryHeader(){return this.suggestions.length>0&&!this.categoryFilter&&this.hasMoreThanOneCategory()}renderCategoryHeader(){const e=this.currentCategory?.displayName;return e?Dv.aH`
4266          ${this.hasSuggestionsForCategoryHeader()?Dv.aH`<div class="search-result-category-divider"></div>`:Dv.cm}
4267          <div class="search-result-category-header">
4268            <chameleon-typography variant="caption-small-strong" color="type-color-secondary"
4269              >${e}</chameleon-typography
4270            >
4271          </div>
4272        `:Dv.cm}renderSearchResultsPreviewList(e){return Dv.aH` ${this.renderSuggestions()} ${this.renderCategoryHeader()}
4273    ${Nb(e,e=>e.title,e=>this.renderSearchResultPreviewItem(e))}`}renderSearchResultsPreviewListWithMore(e){const t=e.slice(0,5);return Dv.aH` ${this.renderSuggestions()} ${this.renderCategoryHeader()}
4274      ${Nb(t,e=>e.title,e=>this.renderSearchResultPreviewItem(e))}
4275      <chameleon-listbox-item class="more-results-listbox-item" @click=${this.handleMoreResultsClick}>
4276        <chameleon-button class="more-results-button" variant="secondary" size="medium"
4277          >${(0,Dv.bQ)("View more results")} (${this.getSearchResultsCount()})</chameleon-button
4278        >
4279      </chameleon-listbox-item>`}getSearchResultsCount(){return this.currentCategorySearchResultsTotal<100?this.currentCategorySearchResultsTotal:"99+"}async handleSearchResponses(){const e=this.categoryFilter?.application??this.findFirstResponseWithItems().application;this.currentCategory=(0,Dv.Q)().getCategories().find(t=>t.application===e);const t=this.findResponseForSelectedCategory()??this.findFirstResponseWithItems();this.currentCategorySearchResultsTotal=t?.total?.value??0,this.convertedSearchResults=await(0,Dv.Q)().convertToGlobalSearchResultUI(t.items,"preview")}findResponseForSelectedCategory(){return this.searchResponses.find(e=>e.application===this.categoryFilter?.application)}findFirstResponseWithItems(){return this.searchResponses.find(e=>e?.items?.length>0)??this.searchResponses[0]}handleMoreResultsClick(e){const t=e.detail?"click":"keydown";mQ({searchString:this.searchString,eventName:"GoTo > Global Search Result Preview View More",eventType:t,properties:{}});const{base64SearchQuery:r,query:n}=(0,Dv.dQ)(this.searchString,this.categoryFilter);"function"==typeof this.searchFieldAction?this.searchFieldAction(r):(0,Dv.dh)(n),this.dispatchEvent(new Event("item-click"))}handleResultClick(e,t){const r=e.detail?"click":"keydown",n={searchString:this.searchString,eventName:"GoTo > Global Search Result Preview Item",eventType:r,action:t.defaultAction,searchResult:t.originalResult,properties:{}};mQ(n),(0,Dv.cl)({resultItem:t.originalResult}),(0,Dv.dR)(t,this.searchString),this.dispatchEvent(new Event("item-click"))}handlePreviewItemActionClick(){this.dispatchEvent(new Event("item-click"))}renderSearchResultPreviewItem(e){return Dv.aH` <chameleon-listbox-item @click=${t=>this.handleResultClick(t,e)}>
4280      <goto-search-result-preview-item
4281        @preview-item-action-click=${this.handlePreviewItemActionClick}
4282        .searchResult=${e}
4283        .searchString=${this.searchString}
4284      ></goto-search-result-preview-item>
4285    </chameleon-listbox-item>`}setGlobalSearchSuggestions(){if(this.categoryFilter)return;const e=(0,Dv.Q)().getCategories(),t=(0,Dv.Q)().getSuggestions(),r=[];e.forEach(e=>{if(this.searchResponses.find(t=>t.application===e.application)?.total?.value&&this.hasSuggestionItems(e)&&this.currentCategory?.application!==e.application){const n=t.find(({application:t})=>t===e.application);n&&r.push(n)}}),this.suggestions=[...r]}hasSuggestionItems({suggestionIcon:e,suggestionLabelKey:t}){return!(!e||!t)}hasResults(){return this.searchResponses?.some(e=>e.items&&e.items.length>0)??!1}hasMoreThanOneCategory(){return new Set(this.searchResponses?.map(e=>e.application)).size>1}renderSuggestions(){return!this.categoryFilter&&this.hasMoreThanOneCategory()?Dv.aH`
4286          ${Nb(this.suggestions,e=>Dv.aH`<chameleon-listbox-item
4287                ><goto-global-search-suggestion .searchSuggestion=${e}></goto-global-search-suggestion
4288              ></chameleon-listbox-item>`)}
4289        `:Dv.cm}renderListboxItems(){return this.hasResults()?0===this.convertedSearchResults.length?Dv.aH`<chameleon-listbox-item aria-busy="true"></chameleon-listbox-item>`:this.convertedSearchResults.length<=6?this.renderSearchResultsPreviewList(this.convertedSearchResults):this.renderSearchResultsPreviewListWithMore(this.convertedSearchResults):Dv.aH`${this.renderNoResultsFoundElement()}`}render(){return Dv.aH`<chameleon-listbox>
4290      ${this.renderListboxItems()}
4291      <chameleon-listbox-item @click=${this.handleGiveFeedbackClick} class="give-feedback-listbox-item">
4292        <goto-global-search-survey-link
4293          ?isButton=${!0}
4294          @click=${()=>this.dispatchEvent(new Event("item-click"))}
4295        ></goto-global-search-survey-link>
4296      </chameleon-listbox-item>
4297    </chameleon-listbox>`}};IQ.tagName="goto-search-result";let AQ=IQ;EQ([(0,Dv.cn)({type:String})],AQ.prototype,"searchString"),EQ([(0,Dv.cn)({type:Array})],AQ.prototype,"searchResponses"),EQ([(0,Dv.cn)({type:Object})],AQ.prototype,"categoryFilter"),EQ([(0,Dv.cn)({attribute:!1})],AQ.prototype,"searchFieldAction"),EQ([(0,Dv.bS)("chameleon-listbox")],AQ.prototype,"chameleonListbox"),EQ([(0,Dv.ct)()],AQ.prototype,"suggestions"),EQ([(0,Dv.ct)()],AQ.prototype,"currentCategory"),EQ([(0,Dv.ct)()],AQ.prototype,"currentCategorySearchResultsTotal"),EQ([(0,Dv.ct)()],AQ.prototype,"convertedSearchResults");const TQ=["Backspace","Paste"],OQ=(e,t=TQ)=>1===e.length||t.includes(e),LQ=(e,t,r,n)=>{if(!e)return!1;const o="Enter"===t&&!!r.trim(),i="Backspace"===t&&!r.trim()&&!n;return o||i},$Q=(e,t)=>{const r={query:e};return t&&(r.categoryFilterApplicationNames=[t.application]),r},NQ=e=>{if(!e)return;const t=e.selectedIndex,r=e.querySelectorAll("chameleon-listbox-item");r&&r.forEach((e,r)=>{RQ(e,r===t)})},RQ=(e,t)=>{const r=e.querySelector("goto-search-result-preview-item"),n=e.querySelector("chameleon-button.more-results-button"),o=e.querySelector("goto-global-search-suggestion"),i=e.querySelector("goto-global-search-survey-link")?.shadowRoot?.querySelector("chameleon-button");t?(e.classList.add("selected"),r?.classList.add("selected"),n?.classList.add("selected"),o?.classList.add("selected"),i?.classList.add("selected")):(e.classList.remove("selected"),r?.classList.remove("selected"),n?.classList.remove("selected"),o?.classList.remove("selected"),i?.classList.remove("selected"))},PQ=(e,t)=>{e&&(e.selectedIndex=t,NQ(e))},DQ=e=>{PQ(e,-1)},MQ=e=>(e?.selectedIndex??-1)>=0,zQ=e=>{const t=e?.selectedIndex??-1;if(e&&t>=0)return e.querySelectorAll("goto-global-search-suggestion")?.[t]},FQ=e=>void 0!==zQ(e),UQ=(e,t)=>{e.stopImmediatePropagation();const r=((e,t={})=>new KeyboardEvent(e.type,{key:e.key,code:e.code,location:e.location,repeat:e.repeat,isComposing:e.isComposing,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,...t}))(e,{bubbles:!0,composed:!0});FQ(t)?zQ(t)?.dispatchEvent(new KeyboardEvent(e.type,r)):t?.dispatchEvent(new KeyboardEvent(e.type,r))},BQ=(e,t)=>{UQ(e,t),MQ(t)&&e.preventDefault()},HQ=e=>(e?.selectedIndex??-1)<0,jQ=(e,t)=>{const r=Math.max(280,t?.clientWidth??0);e?.setAttribute("width",r.toString())},VQ=e=>{e?.isOpen&&e.close()};var WQ=Object.defineProperty,KQ=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&WQ(t,r,i),i};const qQ={query:"",categoryFilterIds:[]},GQ=class extends Dv.bP{constructor(){super(...arguments),this.loading=!1,this.searchString="",this.searchHistory=[],this.activeTrigger="",this.searchError=!1,this.globalSearchAvailable=!1,this.categories=[],this.previousSearchQuery=qQ,this.observedSearchField=null,this.clearAllSelected=!1,this.resizeObserver=new ResizeObserver(()=>{jQ(this.chameleonPopover,this.searchField)}),this.queryListener=e=>{this.searchString=e.query.query,this.searchField&&(this.searchField.value=this.searchString),this.listbox&&DQ(this.listbox)},this.categoriesUpdatedListener=()=>{this.globalSearchAvailable=!0,this.categories=(0,Dv.Q)().getCategories()},this.userPreferencesUpdatedListener=async e=>{(0,Dv.dU)(e.path)&&(await this.setSearchHistory(),this.searchHistory.length||VQ(this.chameleonPopover))},this.onApplicationReady=async()=>{const e=(0,Dv.dV)();e.query.length>0&&this.searchField&&(this.searchField.value=e.query,e.categoryFilterApplicationNames&&e.categoryFilterApplicationNames.length>0&&(this.categoryFilter=(e=>{const t=this.categories.find(t=>t.application===e);return t?{application:t.application,displayNameKey:t.displayNameKey}:void 0})(e.categoryFilterApplicationNames[0])))},this.handlePasteEvent=e=>{(e=>{mQ({searchString:e,eventName:"GoTo > Global Search Input Field Paste",eventType:"paste",properties:{}})})(e.clipboardData?.getData("text")??""),this.activeTrigger="Paste",setTimeout(()=>{const e=this.searchField?.value??"";this.searchString=e;const t=$Q(this.searchString,this.categoryFilter);(0,Dv.dW)({query:t}),this.invalidateQuery(),this.activeTrigger=""},0)},this.triggerSearch=()=>
4297{if(this.previousSearchQuery=$Q(this.searchString,this.categoryFilter),this.closeOrOpenPopover(),jQ(this.chameleonPopover,this.searchField),this.searchString.trim()){this.loading=!0,(e=>{mQ({searchString:e,eventName:"GoTo > Global Search Input Field Search Preview",eventType:"keyup",properties:{}})})(this.searchString);const e=$Q(this.searchString,this.categoryFilter);(0,Dv.Q)().searchFor(e,Dv.D).then(this.handleSearchResponse,this.handleSearchError)}else this.loading=!1},this.invalidateQuery=$V(this.validateQuery,1e3),this.handleSearchError=()=>{this.loading=!1,this.searchError=!0},this.handleSearchResponse=e=>{this.searchError=!1,this.loading=!1,this.searchResponses=e},this.handleListboxRendered=e=>{this.listbox=e.detail.listbox},this.closePopoverAndExecuteSearch=()=>{VQ(this.chameleonPopover),(e=>{mQ({searchString:e,eventName:"GoTo > Global Search Input Field Enter",eventType:"keydown",properties:{}})})(this.searchString),((e,t)=>{const r=$Q(e,t);(0,Dv.dh)(r)})(this.searchString,this.categoryFilter)}}getPlaceholder(){return(0,Dv.bQ)("Search")}static get styles(){return(0,Dv.ck)(":host{--global-search-field-max-width: 568px;--global-search-field-min-width: 134px;--global-search-field-available-width: calc(100% - var(--goto-spacing-07));--global-search-field-final-max-width: min( var(--global-search-field-max-width), var(--global-search-field-available-width) );--global-search-field-final-min-width: min( var(--global-search-field-min-width), var(--global-search-field-available-width) );width:100%;display:flex;justify-content:center}:host chameleon-popover{width:100%;display:flex;justify-content:center;max-width:var(--global-search-field-final-max-width);min-width:var(--global-search-field-final-min-width);margin:0}:host .popover-trigger{max-width:var(--global-search-field-final-max-width);min-width:var(--global-search-field-final-min-width);width:100%;-webkit-app-region:no-drag}:host .popover-trigger chameleon-search-field{width:100%;text-overflow:ellipsis}:host .popover-trigger chameleon-svg{--goto-icon-color: var(--goto-icon-color-secondary)}")}async connectedCallback(){super.connectedCallback(),(0,Dv.Q)().hasCategories()&&(this.globalSearchAvailable=!0);const{searchFieldQueryChange:e,categoriesUpdated:t}=(0,Dv.au)().subscribeTo(Dv.dX);e.addListener(this.queryListener),t.addListener(this.categoriesUpdatedListener),this.unsubscribeFunctions.push(()=>{e.removeListener(this.queryListener),t.removeListener(this.categoriesUpdatedListener)}),await this.setSearchHistory(),this.subscribeToGlobalSearchHistory(),this.subscribeToApplicationReady()}disconnectedCallback(){super.disconnectedCallback(),this.invalidateQuery&&this.invalidateQuery.cancel(),this.resizeObserver.disconnect()}subscribeToGlobalSearchHistory(){const{userPreferencesUpdatedEvent:e}=(0,Dv.au)().subscribeTo(kV);e.addListener(this.userPreferencesUpdatedListener),this.unsubscribeFunctions.push(()=>{e.removeListener(this.userPreferencesUpdatedListener)})}updated(){if(this.searchField&&this.searchField!==this.observedSearchField){this.observedSearchField&&this.resizeObserver.unobserve(this.observedSearchField);const e=this.searchField;this.resizeObserver.observe(e),this.observedSearchField=e}}handleItemClick(){this.closePopover()}handleSuggestionClick({detail:e}){const{application:t,label:r,eventType:n}=e;if(mQ({searchString:this.searchString,eventName:"GoTo > Global Search Suggestion",eventType:n||"click",properties:{action:"keydown"===n?"Keyboard":"Click",category:t,categoryLabel:r}}),!this.categoryFilter||this.categoryFilter.application!==t){const e=(0,Dv.Q)().getCategories().find(e=>e.application===t);if(!e)return void(0,Dv.g)().warn("No category found for application",{application:t});this.categoryFilter={application:t,displayNameKey:e.displayNameKey},this.invalidateQuery()}}render(){return this.searchString=this.searchField?.value??"",this.globalSearchAvailable?Dv.aH`
4298          <form class="popover-trigger" tabindex="-1" autocomplete="off">
4299            <chameleon-search-field
4300              label=${this.getPlaceholder()}
4301              autocomplete="off"
4302              placeholder=${this.getPlaceholder()}
4303              @contextmenu=${this.handleContextMenuEvent}
4304              @click=${this.handleClickEvent}
4305              @close=${this.handleCloseEvent}
4306              @focus=${this.handleFocus}
4307              @keydown=${this.handleKeydownEvent}
4308              @keyup=${this.handleKeyupEvent}
4309              @paste=${this.handlePasteEvent}
4310              id="global-search-popover-trigger"
4311            >
4312              ${this.renderFilters()}
4313            </chameleon-search-field>
4314          </form>
4315          <chameleon-popover
4316            part="popover"
4317            disable-focus-trap
4318            data-testid="global-search-popover"
4319            menu
4320            trigger-id="global-search-popover-trigger"
4321            z-index="60000"
4322          >
4323            <div class="search-popover-content">${this.renderPopoverContent()}</div>
4324          </chameleon-popover>
4325        `:Dv.cm}renderFilters(){return((e,t)=>e?Dv.aH` <goto-global-search-filters
4326        .categoryFilter=${e}
4327        .deleteCategory=${t}
4328        slot="start"
4329      ></goto-global-search-filters>`:Dv.cm)(this.categoryFilter,e=>this.removeCategoryFilter(e))}renderPopoverContent(){return(({loading:e,searchError:t,searchString:r,searchResponses:n,searchHistory:o,categoryFilter:i,categories:s,searchFieldAction:a,itemClickHandler:l,suggestionClickHandler:c,listboxRenderedHandler:d})=>e&&r?Dv.aH`<goto-search-loading-state loadingRows=${2}></goto-search-loading-state>`:t?Dv.aH` <goto-search-error size="small"></goto-search-error> `:r&&n?((e,t,r,n,o,i,s,a)=>Dv.aH`<goto-search-result
4330    @item-click=${i}
4331    @suggestion-click=${s}
4332    @listboxrendered=${a}
4333    searchString=${e}
4334    .searchResponses=${t}
4335    .categoryFilter=${r}
4336    .searchFieldAction=${n}
4337    ?searchError=${o}
4338  ></goto-search-result>`)(r,n,i,a,t,l,c,d):o.length&&!r?((e,t,r,n)=>Dv.aH` <goto-search-history
4339    @item-click=${r}
4340    @listboxrendered=${n}
4341    .searchHistory=${e}
4342    .categories=${t}
4343  ></goto-search-history>`)(o,s,l,d):Dv.cm)({loading:this.loading,searchError:this.searchError,searchString:this.searchString,searchResponses:this.searchResponses,searchHistory:this.searchHistory,categoryFilter:this.categoryFilter,categories:this.categories,searchFieldAction:this.searchFieldAction,itemClickHandler:()=>
4343this.handleItemClick(),suggestionClickHandler:e=>this.handleSuggestionClick(e),listboxRenderedHandler:e=>this.handleListboxRendered(e)})}subscribeToApplicationReady(){const{applicationReady:e}=(0,Dv.au)().subscribeTo("Shell");e.on(this.onApplicationReady),this.unsubscribeFunctions.push(()=>{e.removeListener(this.onApplicationReady)})}async setSearchHistory(){this.searchHistory=await(0,Dv.dY)()}async handleFocus(){if(this.activeTrigger="",this.searchString){this.loading=!0;const e=$Q(this.searchString,this.categoryFilter);try{const t=await(0,Dv.Q)().searchFor(e,Dv.D);this.handleSearchResponse(t)}catch{this.handleSearchError()}}await this.setSearchHistory(),(this.searchString||this.searchHistory.length)&&setTimeout(()=>{this.chameleonPopover?.open()},100)}updateSelectionState(){NQ(this.listbox)}updateClearAllSelectionState(e){this.clearAllSelected=e,(0,Dv.dZ)(this.shadowRoot)?.updateClearAllSelected(e)}handleKeyupEvent(e){if(this.activeTrigger=e.key,this.searchString=this.searchField?.value??"",this.searchString.trim()||(this.loading=!1),OQ(e.key,TQ)){const e=$Q(this.searchString,this.categoryFilter);(0,Dv.dW)({query:e}),this.invalidateQuery()}else{if(FQ(this.listbox)||this.categoryFilter)return;LQ(this.chameleonPopover?.isOpen??!1,this.activeTrigger,this.searchString,this.searchHistory.length>0)&&VQ(this.chameleonPopover)}}getInputElementSelectionStart(){return this.searchField?.shadowRoot?.querySelector("input")?.selectionStart??-1}handleKeydownEvent(e){if(this.activeTrigger=e.key,"Tab"!==e.key)if("Enter"!==e.key)if("Backspace"===e.key&&((e,t)=>0===e.length||0===t)(this.searchString,(e=>e?.shadowRoot?.querySelector("input")?.selectionStart??-1)(this.searchField)))this.removeCategoryFilter();else{if(this.listbox)switch(e.key){case"ArrowLeft":case"ArrowRight":case" ":BQ(e,this.listbox);break;case"ArrowUp":this.handleArrowUpEvent(e);break;case"ArrowDown":this.handleArrowDownEvent(e)}e.stopImmediatePropagation()}else this.handleEnterEvent(e);else VQ(this.chameleonPopover)}createNavigationContext(){return{state:{clearAllSelected:this.clearAllSelected,listbox:this.listbox},callbacks:{updateClearAllSelectionState:e=>this.updateClearAllSelectionState(e),deselectListboxItems:()=>DQ(this.listbox),navigateToStartOfListbox:()=>(e=>{PQ(e,0)})(this.listbox),navigateToEndOfListbox:()=>(e=>{PQ(e,(e?.length??0)-1)})(this.listbox),dispatchEventToListbox:e=>UQ(e,this.listbox),updateSelectionState:()=>this.updateSelectionState()}}}handleArrowUpEvent(e){const{state:t,callbacks:r}=this.createNavigationContext();this.searchHistory.length&&!this.searchString?((e,t,r)=>{e.preventDefault();const n=HQ(t.listbox),o=0===t.listbox?.selectedIndex;n&&!t.clearAllSelected?r.navigateToEndOfListbox():t.clearAllSelected?(r.updateClearAllSelectionState(!1),r.deselectListboxItems()):o?(r.updateClearAllSelectionState(!0),r.deselectListboxItems()):(r.dispatchEventToListbox(e),r.updateSelectionState())})(e,t,r):((e,t,r)=>{e.preventDefault();const n=HQ(t.listbox);0===t.listbox?.selectedIndex?r.deselectListboxItems():n?r.navigateToEndOfListbox():(r.dispatchEventToListbox(e),r.updateSelectionState())})(e,t,r)}handleArrowDownEvent(e){const{state:t,callbacks:r}=this.createNavigationContext();this.searchHistory.length&&!this.searchString?((e,t,r)=>{e.preventDefault();const n=HQ(t.listbox),o=t.listbox?.selectedIndex===(t.listbox?.length??0)-1;n&&!t.clearAllSelected?(r.updateClearAllSelectionState(!0),r.deselectListboxItems()):t.clearAllSelected?(r.updateClearAllSelectionState(!1),r.navigateToStartOfListbox()):o?r.deselectListboxItems():(r.dispatchEventToListbox(e),r.updateSelectionState())})(e,t,r):((e,t,r)=>{e.preventDefault(),t.listbox?.selectedIndex===(t.listbox?.length??0)-1?r.deselectListboxItems():(r.dispatchEventToListbox(e),r.updateSelectionState())})(e,t,r)}handleEnterEvent(e){if(MQ(this.listbox)){if(BQ(e,this.listbox),FQ(this.listbox))return;this.closePopoverAndResetListbox()}else if(this.clearAllSelected)(0,Dv.dZ)(this.shadowRoot)?.clearAllHistory("keydown");else{if("function"==typeof this.searchFieldAction)return void((e,t,r)=>{const{base64SearchQuery:n}=(0,Dv.dQ)(e,t);r(n)})(this.searchString,this.categoryFilter,this.searchFieldAction);setTimeout(()=>{this.searchString=this.searchField?.value??"",this.searchString.trim()&&(DQ(this.listbox),this.closePopoverAndExecuteSearch())})}}removeCategoryFilter(e){this.categoryFilter=void 0,(e=>{(0,Dv.dT)(">>> input",e)?.focus()})(this.searchField)}
4343closePopoverAndResetListbox(){VQ(this.chameleonPopover),DQ(this.listbox),this.updateSelectionState()}handleContextMenuEvent(e){(e=>{(e=>{e.showNativeMenu=!0})(e)})(e)}handleClickEvent(e){e.stopPropagation(),e.preventDefault(),this.activeTrigger="",this.searchString=this.searchField?.value??"",((e,t,r)=>e||!t&&!r)(this.chameleonPopover?.isOpen??!1,this.searchString.trim().length>0,this.searchHistory.length>0)&&e.stopImmediatePropagation()}handleCloseEvent(){this.categoryFilter=void 0}closePopover(){VQ(this.chameleonPopover)}validateQuery(){((e,t,r)=>{const n=e===t.query,o=[r?.application??""],i=t?.categoryFilterApplicationNames,s=(0,Dv.dS)(o,i);return!n||!s})(this.searchString,this.previousSearchQuery,this.categoryFilter)&&this.triggerSearch()}closeOrOpenPopover(){const e=LQ(this.chameleonPopover?.isOpen??!1,this.activeTrigger,this.searchString,this.searchHistory.length>0),t=((e,t,r,n)=>!e&&(r.trim()||n)&&(e=>OQ(e,TQ))(t))(this.chameleonPopover?.isOpen??!1,this.activeTrigger,this.searchString,this.searchHistory.length>0);((e,t,r)=>{t?VQ(e):r&&(e=>{e&&!e.isOpen&&e.open()})(e)})(this.chameleonPopover,e,t)}};GQ.tagName="goto-global-search";let ZQ=GQ;KQ([(0,Dv.ct)()],ZQ.prototype,"searchResponses"),KQ([(0,Dv.ct)()],ZQ.prototype,"loading"),KQ([(0,Dv.ct)()],ZQ.prototype,"searchString"),KQ([(0,Dv.ct)()],ZQ.prototype,"searchHistory"),KQ([(0,Dv.ct)()],ZQ.prototype,"activeTrigger"),KQ([(0,Dv.ct)()],ZQ.prototype,"searchError"),KQ([(0,Dv.ct)()],ZQ.prototype,"globalSearchAvailable"),KQ([(0,Dv.ct)()],ZQ.prototype,"categoryFilter"),KQ([(0,Dv.ct)()],ZQ.prototype,"categories"),KQ([(0,Dv.ct)()],ZQ.prototype,"previousSearchQuery"),KQ([(0,Dv.cn)({attribute:!1})],ZQ.prototype,"searchFieldAction"),KQ([(0,Dv.bS)("chameleon-search-field")],ZQ.prototype,"searchField"),KQ([(0,Dv.bS)("chameleon-popover")],ZQ.prototype,"chameleonPopover");var YQ=Object.defineProperty,JQ=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&YQ(t,r,i),i};class QQ extends CustomEvent{constructor(){super("delete-history-item-click",{bubbles:!0,composed:!0})}}const XQ=class extends Dv.bP{constructor(){super(...arguments),this.actions=[],this.searchString="",this.hasDeleteAction=!1,this.handleActionClick=(e,t)=>{const r=e.detail?"click":"keydown",n=this.originalResult?"GoTo > Global Search Result Preview Action":"GoTo > Global Search No Result Action";mQ({searchString:this.searchString,eventName:n,eventType:r,action:t,searchResult:this.originalResult,properties:{}}),(0,Dv.d_)(t.command,this.searchString,this.originalResult?.data)}}static get styles(){return(0,Dv.ck)(":host{--goto-icon-color: var(--goto-icon-color-secondary);display:flex;flex-direction:row}:host chameleon-round-button::part(end){--goto-icon-color: var(--goto-type-color-default)}.action-sub-item,.delete-sub-item{margin-left:var(--goto-spacing-02)}")}renderAction(e){return Dv.aH`<chameleon-interactive-sub-item
4344      class="action-sub-item"
4345      label=${e.displayName}
4346      @click=${t=>this.handleActionClick(t,e)}
4347    >
4348      <chameleon-round-button
4349        id=${`action-sub-item-icon-${e.id}`}
4350        variant="secondary"
4351        label=${e.displayName||(0,Dv.bQ)("Action button")}
4352        ><chameleon-svg slot="end" class="left">${(0,Dv.bR)(e.icon)}</chameleon-svg></chameleon-round-button
4353      ></chameleon-interactive-sub-item
4354    >`}renderDeleteAction(){return Dv.aH`<chameleon-interactive-sub-item
4355      class="delete-sub-item"
4356      label=${(0,Dv.bQ)("Delete")}
4357      @click=${e=>{e.stopPropagation(),this.dispatchEvent(new QQ)}}
4358      ><chameleon-icon-button
4359        size="small"
4360        variant="primary"
4361        id="delete-sub-item-icon"
4362        class="delete-search-history-item"
4363        label=${(0,Dv.bQ)("Delete search history item")}
4364        ><chameleon-svg>${(0,Dv.bR)(xb)}</chameleon-svg></chameleon-icon-button
4365      ></chameleon-interactive-sub-item
4366    >`}render(){return Dv.aH`
4367      ${Nb(this.actions,e=>e.id,e=>this.renderAction(e))}
4368      ${this.hasDeleteAction?this.renderDeleteAction():Dv.cm}
4369    `}};XQ.tagName="goto-global-search-actions";let eX=XQ;JQ([(0,Dv.cn)({type:Array})],eX.prototype,"actions"),JQ([(0,Dv.cn)({type:Object})],eX.prototype,"originalResult"),JQ([(0,Dv.cn)({type:String})],eX.prototype,"searchString"),JQ([(0,Dv.cn)({type:Boolean})],eX.prototype,"hasDeleteAction");let tX=class{constructor(e){this.G=e}disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}},rX=class{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??=new Promise(e=>this.Z=e)}resume(){this.Z?.(),this.Y=this.Z=void 0}};const nX=e=>!(0,Dv.d$)(e)&&"function"==typeof e.then,oX=1073741823;let iX=class extends Dv.cG{constructor(){super(...arguments),this._$Cwt=oX,this._$Cbt=[],this._$CK=new tX(this),this._$CX=new rX}render(...e){return e.find(e=>!nX(e))??Dv.ak}update(e,t){const r=this._$Cbt;let n=r.length;this._$Cbt=t;const o=this._$CK,i=this._$CX;this.isConnected||this.disconnected();for(let e=0;e<t.length&&!(e>this._$Cwt);e++){const s=t[e];if(!nX(s))return this._$Cwt=e,s;e<n&&s===r[e]||(this._$Cwt=oX,n=0,Promise.resolve(s).then(async e=>{for(;i.get();)await i.get();const t=o.deref();if(void 0!==t){const r=t._$Cbt.indexOf(s);r>-1&&r<t._$Cwt&&(t._$Cwt=r,t.setValue(e))}}))}return Dv.ak}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}};const sX=(0,Dv.ad)(iX);var aX=Object.defineProperty,lX=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&aX(t,r,i),i};const cX=class extends Dv.bP{constructor(){super(...arguments),this.searchResults=[],this.loading=!1,this.searchQuery={query:""},this.showEmptyState=!1}static get styles(){return(0,Dv.ck)("chameleon-data-table{outline-offset:-1px;width:100%}chameleon-empty-state{height:-moz-available;height:-webkit-fill-available;height:fill-available;justify-content:center}chameleon-data-table-row{cursor:pointer}.results-table{margin-left:var(--goto-spacing-06);margin-right:var(--goto-spacing-06)}.cell-container{align-items:center;display:flex}.avatar-icon,.round-icon{margin-right:var(--goto-spacing-03)}.column-data-icon{margin-right:var(--goto-spacing-03);--goto-icon-color: var(--goto-type-color-secondary)}goto-search-result-preview-item{margin:0}chameleon-listbox-item{margin-bottom:var(--goto-spacing-02)}")}executeDefaultActionCommand(e,t){const r=e.detail?"click":"keydown";mQ({searchString:this.searchQuery.query,eventName:"GoTo > Global Search Result Page Item",eventType:r,action:t.defaultAction,searchResult:t.originalResult,properties:{}});const n=t.defaultAction;n?.command&&(0,Dv.d_)(n.command,this.searchQuery.query,t.originalResult.data)}
4369getKeywords(){return(0,Dv.e0)(this.searchQuery.query)}getColumnStyle(e){return e.displayOptions?.width?`width: ${e.displayOptions.width}`:""}renderTableHeader(){return this.category?.columns?Dv.aH`<chameleon-data-table-header>
4370          <chameleon-data-table-row header>
4371            ${Nb(this.category.columns,e=>e.id,e=>Dv.aH`<chameleon-data-table-header-cell class="column-header" style=${this.getColumnStyle(e)}
4372                  >${e.displayName}</chameleon-data-table-header-cell
4373                >`)}
4374          </chameleon-data-table-row>
4375        </chameleon-data-table-header>`:Dv.cm}renderTableBody(){return Dv.aH`<chameleon-data-table-body>
4376      ${Nb(this.searchResults,e=>Dv.aH`<chameleon-data-table-row
4377            class="table-body-data-row"
4378            @click=${t=>this.executeDefaultActionCommand(t,e)}
4379            >${this.renderDataTableCells(e)}</chameleon-data-table-row
4380          >`)}
4381    </chameleon-data-table-body>`}renderDataTableCells(e){const t=this.getKeywords(),r=this.renderAllCells(e,t);return sX(r,this.renderLoadingCells())}async renderAllCells(e,t){const r=await Promise.all(this.category?.columns.map(r=>this.renderCell(r,e,t))??[]);return Dv.aH`${r}`}renderLoadingCells(){return Dv.aH`
4382      ${this.category?.columns.map(()=>Dv.aH`<chameleon-data-table-cell aria-busy="true"></chameleon-data-table-cell>`)}
4383    `}async renderCell(e,t,r){let n="";try{const r=await(0,Dv.Q)().getResultFieldValue(t.originalResult,e.valueField)??"";n=Array.isArray(r)?r.join(", "):r}catch(e){(0,Dv.g)().error("Error getting result field value:",e)}const o=(0,Dv.e1)(n),i=this.getColumnStyle(e),s=this.renderCellValue(e,o,r);return 0===this.category?.columns.indexOf(e)?Dv.aH` <chameleon-data-table-cell class="table-body-data-cells with-avatar-or-icon" style=${i}
4384        ><div class="cell-container">
4385          ${this.renderIconOrAvatar(t)} ${s}
4386        </div></chameleon-data-table-cell
4387      >`:Dv.aH`<chameleon-data-table-cell class="table-body-data-cells" style=${i}
4388      ><div class="cell-container">${await this.renderColumnIcon(e,t)} ${s}</div>
4389    </chameleon-data-table-cell>`}async renderColumnIcon(e,t){const r=e.valueIconField?await(0,Dv.Q)().getResultFieldValue(t.originalResult,e.valueIconField):void 0;return r?Dv.aH`<chameleon-svg class="column-data-icon">${(0,Dv.bR)(r)}</chameleon-svg>`:Dv.cm}renderCellValue(e,t,r){return e.displayOptions?.hideHighlight?Dv.aH`<span>${t}</span>`:Dv.aH`<goto-text-highlight
4390          ignoreCase
4391          ignoreAccents
4392          phoneNumbers
4393          .value=${t}
4394          .keywords=${r}
4395        ></goto-text-highlight>`}renderParticipantsAvatarGroup(e){return Dv.aH`<goto-participants-avatar-group
4396      .participants=${e}
4397      .size=${UW.MEDIUM}
4398      .showLabel=${!0}
4399    ></goto-participants-avatar-group>`}renderPersonAvatar(e){return Dv.aH`
4400      <goto-avatar
4401        .showPresence=${!0}
4402        .externalUserKey=${e.userKey}
4403        .familyName=${e.familyName??""}
4404        .givenName=${e.givenName??""}
4405        .size=${UW.MEDIUM}
4406        variant="primary"
4407        class="avatar-icon"
4408      ></goto-avatar>
4409    `}renderIconAvatar(e){return Dv.aH`
4410      <chameleon-avatar .size=${UW.MEDIUM} class="round-icon" aria-hidden="true" label="">
4411        <chameleon-svg>${(0,Dv.bR)(e)}</chameleon-svg>
4412      </chameleon-avatar>
4413    `}renderFallbackAvatar(){return Dv.aH` <goto-avatar .size=${UW.MEDIUM} variant="primary" class="avatar-icon"></goto-avatar> `}renderIconOrAvatar(e){return e.participants?.length?this.renderParticipantsAvatarGroup(e.participants):e.userKey||e.givenName||e.familyName?this.renderPersonAvatar(e):e.icon?this.renderIconAvatar(e.icon):this.renderFallbackAvatar()}renderLoadingTable(){const e=[];for(let t=0;t<5;t++)e[t]=[],this.category?.columns.map(r=>{0===this.category?.columns.indexOf(r)?e[t].push(Dv.aH`
4414            <chameleon-data-table-cell class="table-body-data-cells with-avatar-or-icon">
4415              <div class="cell-container">
4416                <goto-loading-state avatar size="small" iteration=${t}></goto-loading-state>
4417              </div>
4418            </chameleon-data-table-cell>
4419          `):e[t].push(Dv.aH`
4420            <chameleon-data-table-cell class="table-body-data-cells">
4421              <goto-loading-state iteration=${t} size="small"></goto-loading-state>
4422            </chameleon-data-table-cell>
4423          `)});return Dv.aH`
4424      <chameleon-data-table>
4425        ${this.renderTableHeader()}
4426        <chameleon-data-table-body>
4427          ${Nb(e,e=>Dv.aH`<chameleon-data-table-row class="table-body-data-row"> ${e} </chameleon-data-table-row>`)}
4428        </chameleon-data-table-body>
4429      </chameleon-data-table>
4430    `}renderNoResultsAction(e){return Dv.aH`<div class="no-results-action">
4431      <chameleon-button
4432        size="small"
4433        variant="tertiary"
4434        @click=${t=>{this.handleNoResultsActionclick(t,e)}}
4435      >
4436        <chameleon-svg slot="start">${(0,Dv.bR)(e.icon)}</chameleon-svg>
4437        ${e.displayName}
4438      </chameleon-button>
4439    </div>`}handleNoResultsActionclick(e,t){e.stopPropagation();const r=e.detail?"click":"keydown";mQ({searchString:this.searchQuery.query,eventName:"GoTo > Global Search Result Page No Result Action",eventType:r,action:t,properties:{}}
4439),(0,Dv.d_)(t.command,this.searchQuery.query)}renderEmptyState(){return this.category?.emptyState&&this.showEmptyState?Dv.aH`<chameleon-empty-state size="small">
4440          <chameleon-svg slot="icon" class="search-pictogram">${'<svg pictogram="pictogram" width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 4H26V6H6V36H4V4Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M11.5 23.5C11.5 16.3203 17.3203 10.5 24.5 10.5C31.6797 10.5 37.5 16.3203 37.5 23.5C37.5 30.6797 31.6797 36.5 24.5 36.5C21.2701 36.5 18.3153 35.3221 16.0418 33.3724L5.70718 43.707L4.29297 42.2928L14.6276 31.9582C12.6779 29.6847 11.5 26.7299 11.5 23.5ZM24.5 12.5C18.4249 12.5 13.5 17.4249 13.5 23.5C13.5 29.5751 18.4249 34.5 24.5 34.5C30.5751 34.5 35.5 29.5751 35.5 23.5C35.5 17.4249 30.5751 12.5 24.5 12.5Z" fill="currentColor"/><path d="M42 22V42H12V44H44V22H42Z" fill="currentColor"/><g clip-path="url(#search-static_svg__a)"><path d="M42 6H28V4H44V20H42V6Z" class="search-static_svg__brand-color"/></g><defs><clipPath id="search-static_svg__a"><rect width="16" height="16" fill="white" transform="translate(28 4)"/></clipPath></defs></svg>'}</chameleon-svg>
4441          <div slot="actions">
4442            ${Nb(this.category?.emptyState?.actions,e=>e.id,e=>this.renderNoResultsAction(e))}
4443          </div>
4444          ${this.category.emptyState.message}
4445        </chameleon-empty-state>`:Dv.cm}renderSearchResultPreviewItem(e){return Dv.aH` <chameleon-listbox-item @click=${t=>this.executeDefaultActionCommand(t,e)}>
4446      <goto-search-result-preview-item
4447        .searchResult=${e}
4448        .searchString=${this.searchQuery.query}
4449      ></goto-search-result-preview-item>
4450    </chameleon-listbox-item>`}renderSearchResultsPreviewCards(){return Dv.aH`<chameleon-listbox>
4451      ${Nb(this.searchResults,e=>e.title,e=>this.renderSearchResultPreviewItem(e))}</chameleon-listbox
4452    >`}renderResults(){return Dv.aH`<goto-responsive-view class="results-view-xs" min="xs" max="xs"
4453        >${this.renderSearchResultsPreviewCards()}</goto-responsive-view
4454      ><goto-responsive-view min="sm"
4455        ><chameleon-data-table class="results-view">
4456          ${this.renderTableHeader()} ${this.renderTableBody()}
4457        </chameleon-data-table></goto-responsive-view
4458      >`}renderNoResults(){return Dv.aH`<goto-responsive-view class="no-results-view-xs" min="xs" max="xs"
4459        >${this.renderEmptyState()}</goto-responsive-view
4460      ><goto-responsive-view class="no-results-view" min="sm"
4461        ><chameleon-data-table>
4462          ${this.renderTableHeader()}
4463          <chameleon-data-table-row empty-state> ${this.renderEmptyState()} </chameleon-data-table-row>
4464        </chameleon-data-table>
4465      </goto-responsive-view> `}render(){return this.loading?this.renderLoadingTable():this.searchResults.length?this.renderResults():this.renderNoResults()}};cX.tagName="goto-search-results-display";let dX=cX;lX([(0,Dv.cn)({type:Array})],dX.prototype,"searchResults"),lX([(0,Dv.cn)({type:Boolean})],dX.prototype,"loading"),lX([(0,Dv.cn)({type:Object})],dX.prototype,"searchQuery"),lX([(0,Dv.cn)({type:Object})],dX.prototype,"category"),lX([(0,Dv.cn)({type:Boolean})],dX.prototype,"showEmptyState");var uX=Object.defineProperty,hX=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&uX(t,r,i),i};const pX=class extends Dv.bP{constructor(){super(...arguments),this.searchHistory=[],this.categories=[]}static get styles(){return(0,Dv.ck)(":host{margin:var(--goto-spacing-02) 0;display:block}.search-history-item{cursor:pointer}.delete-search-history-item{display:none}.delete-search-history-item.selected-interactive-item{display:block}.search-history-item:hover .delete-search-history-item,.search-history-item:focus .delete-search-history-item,.selected .delete-search-history-item{display:block}chameleon-listbox-item.has-search-preview-content{background:none}goto-search-result-preview-item{display:flex;width:100%;max-width:100%;box-sizing:border-box}.preview-search-history-content{display:flex}.preview-search-history-content:hover{background-color:transparent}.listbox-item-container{align-items:center;display:flex;min-height:var(--goto-spacing-08);margin-right:var(--goto-spacing-03)}.listbox-item-container .history-icon{--goto-icon-size: 20px;margin-left:var(--goto-spacing-04)}.listbox-item-container .history-query{flex-grow:1;align-items:center;margin-left:var(--goto-spacing-03);margin-right:var(--goto-spacing-03);min-width:0}.recent-searches-header{display:flex;align-items:center;justify-content:space-between;
4465height:var(--goto-spacing-06);margin-left:var(--goto-spacing-05);margin-right:var(--goto-spacing-03);margin-bottom:var(--goto-spacing-01)}.clear-all-button::part(content){font-size:10px}chameleon-button.clear-all-button.selected{outline:1px solid var(--goto-focus-color-highlight-default);border-radius:var(--goto-radius-small)}chameleon-chip{margin-left:var(--goto-spacing-03)}")}getListbox(){return this.chameleonListbox}updated(){this.dispatchEvent(new CustomEvent("listboxrendered",{detail:{listbox:this.getListbox()}}))}updateClearAllSelected(e){const t=this.renderRoot.querySelector(".clear-all-button");t&&(t.classList.toggle("selected",e),e?t.setAttribute("aria-selected","true"):t.removeAttribute("aria-selected"))}async clearAllHistory(e){mQ({searchString:"",eventName:"GoTo > Global Search Result Clear All History",eventType:e,properties:{}}),await(0,Dv.e2)(),this.searchHistory=await(0,Dv.e3)()}handleClearAllClick(e){e.stopPropagation(),e.preventDefault(),this.clearAllHistory(e.detail?"click":"keydown")}async handleDeleteClick(e,t){const r=e.detail?"click":"keydown";mQ({searchString:t.query??"",eventName:"GoTo > Global Search Result Delete History Item",eventType:r,properties:{}}),e.stopPropagation(),e.preventDefault(),await(0,Dv.e4)(t),this.searchHistory=await(0,Dv.e3)()}handleSearchHistoryItemClick(e,t){const r=e.detail?"click":"keydown";mQ({searchString:t.query??"",eventName:"GoTo > Global Search Result History Item",eventType:r,properties:{}}),(0,Dv.dh)({query:t.query??"",categoryFilterApplicationNames:t.categoryFilterApplicationNames??[]}),this.dispatchEvent(new Event("item-click"))}handlePreviewItemActionClick(){this.dispatchEvent(new Event("item-click"))}handleResultClick(e,t){const r=e.detail?"click":"keydown";mQ({searchString:"",eventName:"GoTo > Global Search Result Preview Item",eventType:r,action:t.defaultAction,searchResult:t.originalResult,properties:{}}),(0,Dv.cl)({resultItem:t.originalResult}),(0,Dv.dR)(t,""),this.dispatchEvent(new Event("item-click"))}renderSearchResultPreviewItem(e){const t=(0,Dv.Q)().convertToGlobalSearchResultUI([e.resultItem],"preview").then(e=>e[0]).then(t=>Dv.aH` <chameleon-listbox-item
4466            class="has-search-preview-content"
4467            @click=${e=>this.handleResultClick(e,t)}
4468          >
4469            <div class="preview-search-history-content">
4470              <goto-search-result-preview-item
4471                @preview-item-action-click=${this.handlePreviewItemActionClick}
4472                .searchResult=${t}
4473                .hasDeleteAction=${!0}
4474                @delete-history-item-click=${t=>this.handleDeleteClick(t,e)}
4475              ></goto-search-result-preview-item>
4476            </div>
4477          </chameleon-listbox-item>`).catch(e=>((0,Dv.g)().error("Failed to convert search history item to UI",e),Dv.cm));return Dv.aH`${sX(t,Dv.aH`<chameleon-listbox-item aria-busy="true"></chameleon-listbox-item>`)}`}renderCategoryFilters(e){if(e.categoryFilterApplicationNames?.length){const t=[];return e.categoryFilterApplicationNames.forEach(e=>{const r=this.categories.find(t=>t.application===e);r?.displayName&&t.push(r.displayName)}),Nb(t,e=>e,e=>this.renderCategoryFilterChip(e))}return Dv.cm}getChipTranslationString(e){return(0,Dv.cB)("In: {{displayName}}",{displayName:e})}renderCategoryFilterChip(e){return Dv.aH`<chameleon-chip size="xsmall">${this.getChipTranslationString(e)}</chameleon-chip>`}renderSearchHistoryItem(e){return e.resultItem?this.renderSearchResultPreviewItem(e):Dv.aH` <chameleon-listbox-item
4478      @click=${t=>this.handleSearchHistoryItemClick(t,e)}
4479      class="search-history-item"
4480      ><div class="listbox-item-container">
4481        <chameleon-svg class="history-icon">${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M17.6569 6.34315C14.9981 3.68434 10.9334 3.28828 7.85571 5.15495L9.3507 6.25641L4.06082 8.56952L4.70255 2.83179L6.14287 3.89298C10.0523 1.06122 15.5487 1.40654 19.0711 4.92893C22.9763 8.83418 22.9763 15.1658 19.0711 19.0711C15.1658 22.9763 8.83418 22.9763 4.92893 19.0711C2.92145 17.0636 1.94585 14.413 2.00232 11.784L4.00186 11.827C3.95661 13.9334 4.73699 16.0507 6.34315 17.6569C9.46734 20.781 14.5327 20.781 17.6569 
448117.6569C20.781 14.5327 20.781 9.46734 17.6569 6.34315ZM13 12.677V6H11V11.323L6.6286 13.0715L7.37138 14.9285L13 12.677Z" fill="currentColor"></path></svg>')}</chameleon-svg>
4482        ${this.renderCategoryFilters(e)}
4483        <chameleon-typography variant="body-medium" nowrap class="history-query"
4484          >${e.query}</chameleon-typography
4485        >
4486        <chameleon-interactive-sub-item
4487          class="delete-sub-item"
4488          @click=${t=>this.handleDeleteClick(t,e)}
4489          label=${(0,Dv.bQ)("Delete")}
4490          ><chameleon-icon-button
4491            size="small"
4492            variant="primary"
4493            id="delete-sub-item-icon"
4494            class="delete-search-history-item"
4495            label=${(0,Dv.bQ)("Delete search history item")}
4496          >
4497            <chameleon-svg>${(0,Dv.bR)(xb)}</chameleon-svg></chameleon-icon-button
4498          ></chameleon-interactive-sub-item
4499        >
4500      </div></chameleon-listbox-item
4501    >`}render(){return Dv.aH`${this.searchHistory?.length?Dv.aH` <div class="recent-searches-header">
4502            <chameleon-typography
4503              class="recent-searches-label"
4504              variant="caption-small-strong"
4505              color="type-color-secondary"
4506              >${(0,Dv.bQ)("Recent searches")}</chameleon-typography
4507            >
4508            <chameleon-button
4509              class="clear-all-button"
4510              size="small"
4511              variant="tertiary"
4512              tabindex="-1"
4513              @click=${e=>this.handleClearAllClick(e)}
4514              >${(0,Dv.bQ)("Clear all")}</chameleon-button
4515            >
4516          </div>
4517          <chameleon-listbox class="search-history" tabindex="-1">
4518            ${Nb(this.searchHistory.slice(0,5),e=>e,e=>this.renderSearchHistoryItem(e))}</chameleon-listbox
4519          >`:Dv.cm}`}};pX.tagName="goto-search-history";let gX=pX;hX([(0,Dv.cn)({type:Array})],gX.prototype,"searchHistory"),hX([(0,Dv.cn)({type:Array})],gX.prototype,"categories"),hX([(0,Dv.bS)("chameleon-listbox")],gX.prototype,"chameleonListbox");var fX=Object.defineProperty;const mX=class extends Dv.bP{constructor(){super(...arguments),this.size="medium"}static get styles(){return(0,Dv.ck)(":host([size=medium]),:host([size=large]){display:flex;height:calc(100% - 144px)}:host([size=small]) .error-pictogram{--goto-icon-size: var(--goto-layout-04)}:host chameleon-empty-state{max-width:100%}")}firstLineText(){return"small"===this.size?Dv.aH`${(0,Dv.bQ)("Something went wrong.")}<br />`:Dv.aH` <p slot="title">${(0,Dv.bQ)("Something went wrong")}</p> `}render(){return Dv.aH`
4520      <chameleon-empty-state size=${this.size}>
4521        <chameleon-svg slot="icon" class="error-pictogram">${Dv.dG}</chameleon-svg>
4522        ${this.firstLineText()}${(0,Dv.bQ)("Go ahead and try again, or try searching from the ")}
4523        <chameleon-link href="https://app.goto.com/contacts">${(0,Dv.bQ)("Contacts page")}</chameleon-link>
4524      </chameleon-empty-state>
4525    `}};mX.tagName="goto-search-error";let vX=mX;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&fX(t,r,o)})([(0,Dv.cn)({type:String})],vX.prototype,"size");const bX="keyboard-shortcut",yX={updateConfiguration:(0,Dv.F)(),updateConfigurations:(0,Dv.F)()},{emit:wX}=(0,Dv.au)().register(bX,yX);var xX=Object.defineProperty,_X=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&xX(t,r,i),i};const kX=class extends Dv.co{constructor(){super(...arguments),this.customKeyboardShortcutValues=(0,Dv.cL)()?Fq:Uq,this.hotkeyAction={globalKeyCombination:[],localKeyCombination:[],label:"",id:"newItem",configuration:{isLocalEditable:!0,isGlobalEditable:!0}},this.keyCombinationValidator=new Iq,this.hasInputError=!1,this.localKeyCombinationEdited=[],this.globalKeyCombinationEdited=[]}static get styles(){return(0,Dv.ck)(".hotkey-shortcut{padding:var(--goto-spacing-03)}.key-combine-global-section{display:grid;grid-template-columns:40% 60%;margin-top:var(--goto-spacing-03)}.global-label-section{display:flex;align-items:center}.key-combine-global-svg{--goto-icon-size: 25px;--goto-icon-color: var(--goto-icon-color-secondary);padding-right:5px;display:flex}.key-combine-global-box-section{background-color:var(--goto-background-color-secondary);padding-left:var(--goto-spacing-01);padding-top:var(--goto-spacing-01);padding-bottom:var(--goto-spacing-01);width:100%}.hotkey-shortcut-global-switch-key{align-content:end;margin-left:auto}
4525.hotkey-shortcut-local-section{display:grid}.hotkey-shortcut-local-section.in-container{grid-template-columns:4fr 4fr 2fr}.hotkey-shortcut-local-section.in-web{grid-template-columns:repeat(2,1fr)}.hotkey-shortcut-local-label{align-self:center}goto-keyboard-shortcut-input{display:flex;align-items:center}")}connectedCallback(){super.connectedCallback(),this.localKeyCombinationEdited=[...this.hotkeyAction.localKeyCombination],this.globalKeyCombinationEdited=(0,Dv.bB)()?[...this.hotkeyAction.globalKeyCombination]:[]}async updateAndSave(e){const t=await((e,t)=>wX.updateConfiguration({shortcutId:e,config:t}))(this.hotkeyAction.id,e);if(t){const t=function(e,t){let r=xq();return r||(r=yq()),r[e]=t,localStorage.setItem(wq,JSON.stringify(r)),r}(this.hotkeyAction.id,e);this.keyCombinationValidator.fillListOfUsedCombinationsFromConfig?.(t),this.displaySaveMessage("success")}else this.displaySaveMessage("error");return t}async onGlobalHotKeySwitchChange(e){e.currentTarget.checked?this.globalKeyCombinationEdited=[{global:!0,keyCombination:{code:"",altKey:!1,shiftKey:!1,metaKey:!1,ctrlKey:!1}}]:this.globalKeyCombinationEdited=[];const t=[...this.localKeyCombinationEdited,...this.globalKeyCombinationEdited];await this.updateAndSave(t)}combinationsAreEqual(e,t){return this.keyCombinationValidator.combinationsAreEqual(e,t)}onValidateKeyCombination(e){if(this.keyCombinationValidator.isCombinationBeingUsed(e))return this.hasInputError=!0,{errorCodes:["AlreadyUsedAnotherShortcut"],isInvalid:!0};const t=Dv.bA.KeyboardShortcuts.systemInterface.isValidKeyboardShortcutKeyCombination(e);return this.hasInputError=!!t.errorCodes.length,t}async onSaveKeyCombination(e,t,r){const n=r?[...this.localKeyCombinationEdited]:[...this.globalKeyCombinationEdited],{code:o,shiftKey:i,ctrlKey:s,altKey:a,metaKey:l}=e;n[t]={keyCombination:{code:o,shiftKey:i,ctrlKey:s,altKey:a,metaKey:l},global:!r},r?n.push(...this.globalKeyCombinationEdited):n.push(...this.localKeyCombinationEdited);const c=await this.updateAndSave(n);return c&&(this.localKeyCombinationEdited=n.filter(e=>!e.global),this.globalKeyCombinationEdited=n.filter(e=>e.global)),c}async onClearKeyCombination(e,t){const r=t?[...this.localKeyCombinationEdited]:[...this.globalKeyCombinationEdited];r[e]={keyCombination:{code:"",altKey:!1,shiftKey:!1,metaKey:!1,ctrlKey:!1},global:!t},t?r.push(...this.globalKeyCombinationEdited):r.push(...this.localKeyCombinationEdited);const n=await this.updateAndSave(r);return n&&(this.hasInputError=!1,this.localKeyCombinationEdited=r.filter(e=>!e.global),this.globalKeyCombinationEdited=r.filter(e=>e.global)),n}displaySaveMessage(e){(0,Dv.Z)().display.snackbar({...{success:{id:"keyboard-shortcut-input-snackbar",title:"Keyboard shortcut saved"},error:{id:"keyboard-shortcut-input-snackbar",title:"Error",message:"Cannot save the configuration"}}[e]})}render(){return Dv.aH`<div class="hotkey-shortcut">
4526      <div class=${"hotkey-shortcut-local-section "+((0,Dv.bB)()?"in-container":"in-web")}>
4527        <div class="hotkey-shortcut-local-label">
4528          <chameleon-typography
4529            id="hotkey-action-label"
4530            variant="body-large"
4531            color=${this.hasInputError?"type-color-danger":"type-color-secondary"}
4532            >${this.hotkeyAction.label}</chameleon-typography
4533          >
4534        </div>
4535        <div class="hotkey-shortcut-keys">
4536          ${Nb(this.localKeyCombinationEdited,e=>Object.values(e).join("_")+"_local",(e,t)=>Dv.aH`
4537              <goto-keyboard-shortcut-input
4538                labelId="hotkey-action-label"
4539                .keyCombination=${e.keyCombination}
4540                .position=${t}
4541                .customValue=${this.customKeyboardShortcutValues[this.hotkeyAction.id]}
4542                .isEditable=${this.hotkeyAction.configuration.isLocalEditable}
4543                .isLocal=${e.global}
4544                .combinationsAreEqual=${(e,t)=>this.combinationsAreEqual(e,t)}
4545                .validateKeyCombination=${e=>this.onValidateKeyCombination(e)}
4546                .saveKeyCombination=${e=>this.onSaveKeyCombination(e,t,!0)}
4547                .clearKeyCombination=${()=>this.onClearKeyCombination(t,!0)}
4548              ></goto-keyboard-shortcut-input>
4549            `)}
4550        </div>
4551        ${this.renderGlobalHotkeyEditSwitch()}
4552      </div>
4553      ${this.hotkeyAction.configuration.isGlobalDisabled?null:this.renderGlobalHotkeySection()}
4554    </div>`}getGlobalHotkeyEditSwitchLabel(){return`${this.globalKeyCombinationEdited.length>0?(0,Dv.bQ)("Remove global shortcut for"):(0,Dv.bQ)("Add a global shortcut for")} ${this.hotkeyAction}`}renderGlobalHotkeyEditSwitch(){return(0,Dv.bB)()&&!this.hotkeyAction.configuration.isGlobalDisabled?Dv.aH` <div class="hotkey-shortcut-global-switch-key">
4555        <chameleon-switch
4556          slot="trigger"
4557          @change=${e=>this.onGlobalHotKeySwitchChange(e)}
4558          ?checked=${this.globalKeyCombinationEdited.length>0}
4559          ?disabled=${!this.hotkeyAction.configuration.isGlobalEditable}
4560          label-id=${this.getGlobalHotkeyEditSwitchLabel()}
4561          id="hotkey-switch"
4562        ></chameleon-switch>
4563        <chameleon-tooltip position="bottom-center" trigger-id="hotkey-switch"
4564          >${this.globalKeyCombinationEdited.length>0?(0,Dv.bQ)("Remove global shortcut"):(0,Dv.bQ)("Add a global shortcut")}</chameleon-tooltip
4565        >
4566      </div>`:null}renderGlobalHotkeySection(){return this.globalKeyCombinationEdited.length?Dv.aH`
4567          <div class="key-combine-global-section">
4568            <div class="global-label-section">
4569              <div class="key-combine-global-svg"><chameleon-svg>${'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M6 6H4V15H17.9599L14.7069 18.2928L16.1211 19.7071L21.8282 14L16.1211 8.29285L14.7069 9.70706L17.9997 12.9999H6V6Z" fill="currentColor"></path></svg>'}</chameleon-svg></div>
4570              <div class="key-combine-global-box-section">
4571                <chameleon-typography
4572                  class="key-combine-global-label-section"
4573                  variant="body-medium"
4574                  color="type-color-secondary"
4575                  >${(0,Dv.cu)("Global shortcut")}</chameleon-typography
4576                >
4577              </div>
4578            </div>
4579            <div class="hotkey-shortcut-keys">
4580              ${Nb(this.globalKeyCombinationEdited,e=>Object.values(e).join("_")+"_global",(e,t)=>Dv.aH`<goto-keyboard-shortcut-input
4581                    .keyCombination=${e.keyCombination}
4582                    .position=${t}
4583                    .isEditable=${this.hotkeyAction.configuration.isGlobalEditable}
4584                    .isLocal=${e.global}
4585                    .combinationsAreEqual=${(e,t)=>this.combinationsAreEqual(e,t)}
4586                    .validateKeyCombination=${e=>this.onValidateKeyCombination(e)}
4587                    .saveKeyCombination=${e=>this.onSaveKeyCombination(e,t,!1)}
4588                    .clearKeyCombination=${()=>this.onClearKeyCombination(t,!1)}
4589                  ></goto-keyboard-shortcut-input>`)}
4590            </div>
4591            <div class="hotkey-shortcut-global-switch-key"></div>
4592          </div>
4593        `:null}};kX.tagName="goto-keyboard-shortcut-section-row";let CX=kX;_X([(0,Dv.cn)({type:Object})],CX.prototype,"hotkeyAction"),_X([(0,Dv.cn)({type:Object})],CX.prototype,"keyCombinationValidator"),_X([(0,Dv.ct)()],CX.prototype,"hasInputError"),_X([(0,Dv.ct)()],CX.prototype,"localKeyCombinationEdited"),_X([(0,Dv.ct)()],CX.prototype,"globalKeyCombinationEdited");class SX{show(){this.trialBannerElement||(this.trialBannerElement=(0,Dv.e5)());const e=(0,Dv.bL)().querySelector(Dv.e6);e?.insertBefore(this.trialBannerElement,e.firstChild)}hide(){this.trialBannerElement&&this.trialBannerElement.remove()}}const EX=()=>{const e=!!(0,Dv.Z)()?.user?.key,t=!!(0,Dv.e7)();return!(!e||!t)&&((0,Dv.dq)()||(0,Dv.dr)())};var IX=Object.defineProperty;const AX=class extends Dv.co{constructor(){super(...arguments),this.learnMoreLink="https://support.goto.com/connect/help/how-do-i-download-and-install-the-goto-app"}getBannerMessage(){return(0,Dv.cB)("Your OS is no longer supported. For new GoTo updates, you'll need Windows 10 or higher.")}getBannerLinkText(){return(0,Dv.cB)("Learn more")}getClosable(){return!!EX()}render(){return Dv.aH`<chameleon-banner ?closable=${this.getClosable()} @close=${()=>this.chameleonBanner.remove()}>
4594      <chameleon-svg slot="icon">${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M11.504 11.504H2V2H11.504V11.504Z" fill="currentColor"></path><path d="M22 11.504H12.496V2H21.9992L22 11.504Z" fill="currentColor"></path><path d="M11.504 22H2V12.496H11.504V22Z" fill="currentColor"></path><path d="M22 22H12.496V12.496H21.9992L22 22Z" fill="currentColor"></path></svg>')}</chameleon-svg>
4595      <span>${this.getBannerMessage()}</span>
4596      <chameleon-link slot="action" class="windows-support-banner-link" href=${this.learnMoreLink} target="_blank"
4597        >${this.getBannerLinkText()}</chameleon-link
4598      >
4599    </chameleon-banner>`}};AX.tagName="goto-windows-support";let TX=AX;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&IX(t,r,o)})([(0,Dv.bS)("chameleon-banner")],TX.prototype,"chameleonBanner");var OX=Object.defineProperty,LX=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&OX(t,r,i),i};const $X=class extends Dv.bP{constructor(){super(...arguments),this.selectedTheme=Ty()}static get styles(){return(0,Dv.ck)(":host{display:block}.settings-header{border-bottom:1px solid var(--goto-border-color-default);margin-top:var(--goto-spacing-07);padding-left:var(--goto-spacing-07);padding-bottom:var(--goto-spacing-04)}.settings-description{margin-bottom:var(--goto-spacing-06);margin-left:var(--goto-spacing-07);margin-top:var(--goto-spacing-04)}.settings-section{max-width:720px;margin-left:var(--goto-spacing-07);margin-top:var(--goto-spacing-06)}.section-title{margin-bottom:var(--goto-spacing-03)}.theme-option-group{margin-left:var(--goto-spacing-02);display:grid}.theme-option-group::part(positioning-region){display:flow}.theme-illustration{margin-left:calc(0px - var(--goto-spacing-06));margin-top:var(--goto-spacing-04)}.theme-radio-button{margin-left:var(--goto-spacing-06);margin-top:0}.theme-radio-button::part(control){margin-top:132px}.radio-button-content .label{margin-top:var(--goto-spacing-02)}.navrail-row{display:flex;align-items:center;gap:var(--goto-spacing-09)}.navrail-description{flex:1}.navrail-row chameleon-button{margin-right:var(--goto-spacing-07)}")}async firstUpdated(e){super.firstUpdated(e),this.selectedTheme=await Oy()}async handleThemeChangeEvent(e){const t=e.currentTarget;this.selectedTheme=t.value,await async function(e){await Oy()!==e&&(Ay(e),(0,Dv.aY)(e))}(this.selectedTheme)}handleResetNavRailOrder(){(0,Dv.e8)()}renderRadioButtonContent(e,t){return Dv.aH`<div class="radio-button-content">
4600      <div>${e}</div>
4601      <div class="label">${t}</div>
4602    </div>`}renderLightRadioButtonContent(){const e=Dv.aH`<img
4603      alt=${(0,Dv.bQ)("Light Mode")}
4604      class="theme-illustration light-image"
4605      src="/assets/theme/Light_Theme_illustration.svg"
4606    />`,t=Dv.aH`${(0,Dv.bQ)("Light")}`;return this.renderRadioButtonContent(e,t)}renderDarkRadioButtonContent(){const e=Dv.aH`<img
4607      alt=${(0,Dv.bQ)("Dark Mode")}
4608      class="theme-illustration dark-image"
4609      src="/assets/theme/Dark_Theme_illustration.svg"
4610    />`,t=Dv.aH`${(0,Dv.bQ)("Dark")}`;return this.renderRadioButtonContent(e,t)}renderSystemRadioButtonContent(){const e=Dv.aH`<img
4611      alt=${(0,Dv.bQ)("System Mode")}
4612      class="theme-illustration system-image"
4613      src="/assets/theme/System_Theme_illustration.svg"
4614    />`,t=Dv.aH`${(0,Dv.bQ)("System")}`;return this.renderRadioButtonContent(e,t)}render(){return Dv.aH`
4615      <chameleon-typography tag="h1" class="settings-header" variant="heading-large"
4616        >${(0,Dv.bQ)("Appearance")}</chameleon-typography
4617      >
4618      <chameleon-typography
4619        id="appearance-settings-description"
4620        class="settings-description"
4621        tag="p"
4622        variant="body-medium"
4623        >${(0,Dv.bQ)("Customize how the GoTo app looks for you.")}</chameleon-typography
4624      >
4625
4626      <div class="settings-section">
4627        <chameleon-radio-group
4628          label-id="appearance-settings-description"
4629          @change=${this.handleThemeChangeEvent}
4630          value=${this.selectedTheme}
4631          orientation="horizontal"
4632          class="theme-option-group"
4633        >
4634          <chameleon-radio-button value="light" class="theme-radio-button light-button"
4635            >${this.renderLightRadioButtonContent()}</chameleon-radio-button
4636          >
4637
4638          <chameleon-radio-button value="dark" class="theme-radio-button dark-button"
4639            >${this.renderDarkRadioButtonContent()}</chameleon-radio-button
4640          >
4641
4642          <chameleon-radio-button value="system" class="theme-radio-button system-button" id="system-radio-button"
4643            >${this.renderSystemRadioButtonContent()}</chameleon-radio-button
4644          >
4645          <chameleon-tooltip trigger-id="system-radio-button">
4646            ${(0,Dv.bQ)("Automatically match the theme your system uses")}
4647          </chameleon-tooltip>
4648        </chameleon-radio-group>
4649      </div>
4650
4651      ${(0,Dv.bs)(Dv.bt.SHELL_NAVRAIL_CUSTOMIZATION)?Dv.aH`
4652            <div class="settings-section">
4653              <chameleon-typography tag="h2" variant="body-medium-strong" class="section-title">
4654                ${(0,Dv.bQ)("Reorder navigation menu")}
4655              </chameleon-typography>
4656              <div class="navrail-row">
4657                <chameleon-typography tag="p" variant="body-small" color="type-color-secondary" class="navrail-description">
4658                  ${(0,Dv.bQ)("Drag and drop items from the main navigation menu to order them in a way that’s convenient for you.")}
4659                </chameleon-typography>
4660                <chameleon-button variant="secondary" @click=${this.handleResetNavRailOrder}>
4661                  ${(0,Dv.bQ)("Reset to default")}
4662                </chameleon-button>
4663              </div>
4664            </div>
4665          `:Dv.cm}
4666    `}};$X.tagName="goto-appearance-settings";let NX=$X;LX([(0,Dv.bS)("chameleon-radio-group")],NX.prototype,"radioGroup"),LX([(0,Dv.ct)()],NX.prototype,"selectedTheme");var RX=Object.defineProperty,PX=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&RX(t,r,i),i};const DX=class extends Dv.bP{constructor(){super(...arguments),this.avatar=!1,this.contact=!1,this.iteration=0,this.width="100%",this.size="medium",this.variant="rectangle"}static get styles(){return(0,Dv.ck)(":host{width:100%;display:block}:host .loading-sentence{width:100%}:host .loading-skeleton.contact,:host .loading-skeleton.avatar{width:100%;display:flex;align-items:center;justify-content:left;column-gap:var(--goto-spacing-03)}:host .loading-skeleton.contact .loading-sentence,:host .loading-skeleton.contact .loading-avatar,:host .loading-skeleton.avatar .loading-sentence,:host .loading-skeleton.avatar .loading-avatar{display:flex;flex-direction:column}:host .loading-skeleton.contact .loading-sentence chameleon-skeleton:first-child{margin-bottom:var(--goto-spacing-02)}")}renderLoadingStateWithAvatar(){const e=this.iteration%2==0?55:75;return Dv.aH`
4667      <div class="loading-skeleton avatar">
4668        <div class="loading-avatar">
4669          <chameleon-skeleton variant="circle"></chameleon-skeleton>
4670        </div>
4671        <div class="loading-sentence">
4672          <chameleon-skeleton variant="rectangle" size="${this.size}" width="${e}%"></chameleon-skeleton>
4673        </div>
4674      </div>
4675    `}renderLoadingStateWithContact(){const e=this.iteration%2==0?55:75,t=this.iteration%2==0?45:65;return Dv.aH`
4676      <div class="loading-skeleton contact">
4677        <div class="loading-avatar">
4678          <chameleon-skeleton variant="circle" size="large"></chameleon-skeleton>
4679        </div>
4680        <div class="loading-sentence">
4681          <chameleon-skeleton variant="rectangle" size="xsmall" width="${e}%"></chameleon-skeleton>
4682          <chameleon-skeleton variant="rectangle" size="xxsmall" width="${t}%"></chameleon-skeleton>
4683        </div>
4684      </div>
4685    `}renderDefaultLoadingState(){let e;return this.iteration&&(e=this.iteration%2==0?55:75),Dv.aH`<chameleon-skeleton
4686      variant="${this.variant}"
4687      size="${this.size}"
4688      width="${e?e+"%":this.width}"
4689    ></chameleon-skeleton>`}render(){return this.avatar?this.renderLoadingStateWithAvatar():this.contact?this.renderLoadingStateWithContact():this.renderDefaultLoadingState()}};DX.tagName="goto-loading-state";let MX=DX;PX([(0,Dv.cn)({type:Boolean})],MX.prototype,"avatar"),PX([(0,Dv.cn)({type:Boolean})],MX.prototype,"contact"),PX([(0,Dv.cn)({type:Number})],MX.prototype,"iteration"),PX([(0,Dv.cn)({type:String})],MX.prototype,"width"),PX([(0,Dv.cn)()],MX.prototype,"size"),PX([(0,Dv.cn)()],MX.prototype,"variant");var zX=Object.defineProperty;const FX=class extends Dv.bP{constructor(){super(...arguments),this.loadingRows=2}static get styles(){return(0,Dv.ck)(":host .results-loading{box-sizing:border-box;margin:0 var(--goto-spacing-02) var(--goto-spacing-02) var(--goto-spacing-02);width:inherit}:host goto-loading-state{padding:var(--goto-spacing-02) var(--goto-spacing-03) var(--goto-spacing-02) var(--goto-spacing-02);border:1px solid var(--goto-border-color-secondary);border-radius:var(--goto-radius-small);width:inherit}:host goto-loading-state.odd{margin-top:var(--goto-spacing-02)}")}getLoadingItems(){const e=[];for(let t=0;t<this.loadingRows;t++){const r=t%2==0?"even":"odd";e.push(Dv.aH`<goto-loading-state class="${r}" iteration=${t} contact></goto-loading-state>`)}return e}render(){return Dv.aH`
4690      <chameleon-listbox>
4691        <chameleon-listbox-item>
4692          <div class="results-loading">${this.getLoadingItems()}</div>
4693        </chameleon-listbox-item>
4694      </chameleon-listbox>
4695    `}};FX.tagName="goto-search-loading-state";let UX=FX;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&zX(t,r,o)})([(0,Dv.cn)({type:Number})],UX.prototype,"loadingRows");const BX={executeFunction:()=>(0,Dv.bk)((0,Dv.an)().gotoConnectQuickStartGuideUrl),labelKey:(0,Dv.cu)("Quick start guide"),dataTest:"gtc-quick-start-guide",isExternal:()=>!0},HX=[{executeFunction:()=>(0,Dv.bk)((0,Dv.an)().helpUrl),labelKey:(0,Dv.cu)("Get help"),dataTest:"get-help",isExternal:()=>!0},{executeFunction:()=>(0,Dv.bk)((0,Dv.an)().tutorialsAndVideosUrl),labelKey:(0,Dv.cu)("Tutorials and videos"),dataTest:"tutorials-and-videos",isExternal:()=>!0},{executeFunction:()=>(0,Dv.bk)((0,Dv.cE)()),labelKey:(0,Dv.cu)("Community forum"),dataTest:"community-forum",isExternal:()=>!0}],jX={executeFunction:()=>
4695{if((0,Dv.cF)())(0,Dv.bk)((0,Dv.an)().feedbackGoToMeetingUrl);else{const{openFeedbackDialog:e}=jb(window);e()}},labelKey:(0,Dv.cu)("Give feedback"),dataTest:"feedback",isExternal:()=>(0,Dv.cF)()},VX={executeFunction:()=>{Mv().retrieve(CQ).commands.openGotoAssistant.execute()},labelKey:(0,Dv.cu)("Ask the GoTo assistant"),dataTest:"goto-assistant",isExternal:()=>!1},WX=class extends Dv.co{constructor(){super(...arguments),this.gotoAssistantIsHandled=()=>this.shellHelpNamespace?.commands.openGotoAssistant.isHandled(),this.renderAssistantMenuItem=()=>this.gotoAssistantIsHandled()?Dv.aH`${this.renderMenuItem(VX)} <chameleon-menu-separator></chameleon-menu-separator>`:Dv.cm,this.renderGotoConnectQuickStartGuideMenuItem=()=>(0,Dv.bs)(Dv.bt.SHELL_SHOW_GTC_QUICK_START_GUIDE)?this.renderMenuItem(BX):Dv.cm,this.createExternalLinkEndSlot=e=>e()?Dv.aH` <chameleon-svg slot="end">${(0,Dv.bR)(Sb)}</chameleon-svg>`:Dv.cm,this.createAssistantStartSlot=e=>"goto-assistant"===e?Dv.aH` <chameleon-svg slot="start">${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M2 4H11V6H4V17H8V18.8242L11.8242 17H20V15H22V19H12.2852L6 22V19H2V4Z" fill="currentColor"></path><path d="M16.5 0L17.7154 3.28459L21 4.5L17.7154 5.71541L16.5 9L15.2846 5.71541L12 4.5L15.2846 3.28459L16.5 0Z" fill="currentColor"></path><path d="M21 7L21.8103 9.18973L24 10L21.8103 10.8103L21 13L20.1897 10.8103L18 10L20.1897 9.18973L21 7Z" fill="currentColor"></path></svg>')}</chameleon-svg>`:Dv.cm}connectedCallback(){super.connectedCallback(),this.shellHelpNamespace=Mv().retrieve(CQ)}renderMenuItem(e){const{labelKey:t,executeFunction:r,dataTest:n,isExternal:o}=e;return Dv.aH`
4696      <chameleon-menu-item
4697        @menuitemclick=${()=>{(0,Dv.cr)().track("GoTo > Help menu",{action:"Click",target:t,from:"Topbar"}),r()}}
4698        aria-label=${(0,Dv.bQ)(t)}
4699        data-testid=${n}
4700      >
4701        ${(0,Dv.bQ)(t)} ${this.createAssistantStartSlot(n)} ${this.createExternalLinkEndSlot(o)}
4702      </chameleon-menu-item>
4703    `}render(){return Dv.aH`
4704      <chameleon-menu label=${(0,Dv.bQ)("Help menu")}>
4705        <chameleon-menu-section>${(0,Dv.bQ)("Help")}</chameleon-menu-section>
4706        ${this.renderAssistantMenuItem()} ${this.renderGotoConnectQuickStartGuideMenuItem()}
4707        ${Nb(HX,e=>e.dataTest,e=>this.renderMenuItem(e))}
4708        <chameleon-menu-separator></chameleon-menu-separator>
4709        ${this.renderMenuItem(jX)}
4710      </chameleon-menu>
4711    `}};WX.tagName="goto-topbar-help-menu";let KX=WX;var qX=Object.defineProperty;const GX=class extends Dv.co{constructor(){super(...arguments),this.learnMoreLink="https://support.goto.com/connect/help/how-do-i-download-and-install-the-goto-app"}getBannerMessage(){return(0,Dv.cB)("The GoTo app no longer supports your macOS version. For new GoTo updates, you'll need macOS 11.0 (Big Sur) or higher.")}getBannerLinkText(){return(0,Dv.cB)("Learn more")}getClosable(){return!!EX()}render(){return Dv.aH`<chameleon-banner ?closable=${this.getClosable()} @close=${()=>this.chameleonBanner.remove()}>
4712      <chameleon-svg slot="icon">${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.1369 2.59159C13.8951 1.70439 15.1733 1.04248 16.2304 1C16.365 2.22955 15.8714 3.46528 15.1381 4.35297C14.4047 5.24121 13.2011 5.93109 12.0229 5.83994C11.8623 4.63472 12.4574 3.37724 13.1369 2.59159ZM20.5958 16.417C20.5973 16.4118 20.5985 16.408 20.5992 16.4056C20.5992 16.4056 20.5972 16.4048 20.5948 16.4038C20.4677 16.3523 17.8097 15.2759 17.7808 12.1566C17.7574 9.55478 19.8608 8.27608 20.0414 8.16633C20.0452 8.164 20.0482 8.1622 20.0502 8.16093C18.8161 6.35444 16.8941 6.10636 16.2094 6.07786C15.209 5.97648 14.2384 6.35933 13.4458 6.67196C12.9426 6.87046 12.5111 7.04065 12.1893 7.04065C11.8303 7.04065 11.3866 6.86469 10.8889 6.66727C10.2371 6.40876 9.49251 6.11344 8.72345 6.12811C6.94029 6.15402 5.29744 7.16446 4.37815 8.76014C2.52764 11.9733 3.90579 16.7335 5.70917 19.3407C6.59171 20.6153 7.64356 22.0509 9.02486 21.9986C9.643 21.9743 10.0824 21.7872 10.5368 21.5937C11.0608 21.3705 11.6046 21.1389 12.4654 21.1389C13.2877 21.1389 13.8077 21.3638 14.3077 21.5801C14.7852 21.7867 15.2444 21.9854 15.9313 21.9727C17.3623 21.9463 18.2707 20.6717 19.146 19.3925C20.126 17.9603 20.5485 16.5723 20.5958 16.417Z" fill="currentColor"></path></svg>')}</chameleon-svg>
4713      <span>${this.getBannerMessage()}</span>
4714      <chameleon-link slot="action" href="${this.learnMoreLink}" target="_blank">
4715        ${this.getBannerLinkText()}
4716      </chameleon-link>
4717    </chameleon-banner>`}};GX.tagName="goto-macos-support";let ZX=GX;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&qX(t,r,o)})([(0,Dv.bS)("chameleon-banner")],ZX.prototype,"chameleonBanner");var YX=Object.defineProperty,JX=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&YX(t,r,i),i};const QX=class extends FG{constructor(){super(...arguments),this.isNavigationMenuOpen=!1,this.navigationStateChangeHandler=e=>{this.isNavigationMenuOpen=e.isOpen},this.handleNavSidebarToggleClick=e=>{e.preventDefault(),ZG().toggleNavigationOpenState()}}static get styles(){return(0,Dv.ck)("li{align-items:center;display:flex}shell-topbar-call-card-container{margin-left:var(--goto-spacing-02);z-index:1}.container{align-items:center;background-color:var(--goto-surface-color-default);border-bottom:1px solid var(--goto-border-color-default);display:flex;height:var(--goto-layout-04)}chameleon-icon-button{-webkit-app-region:no-drag;display:inline-flex;margin-right:var(--goto-spacing-02)}ul{align-items:center;display:flex;height:100%;justify-content:flex-end;list-style-type:none;margin-bottom:var(--goto-spacing-00);margin-top:var(--goto-spacing-00);padding:var(--goto-spacing-00)}goto-integration-navigation-rail{flex-grow:1;overflow:hidden;min-width:0;height:100%}.dynamic-width:focus-within{width:315px}.dynamic-width{width:174px;transition:width cubic-bezier(.4,.14,1,1) .25s,min-width cubic-bezier(.4,.14,1,1) .25s}.navigation-drawer-button{margin-left:var(--goto-spacing-02)}")}connectedCallback(){super.connectedCallback(),this.listenToUpdateAvailableEvent(),this.listenToNavigationStateChange()}resetUpdateAge(){this.updateAge=void 0}listenToUpdateAvailableEvent(){const{updateAvailable:e}=(0,Dv.au)().subscribeTo(pJ),{resetUpdateStatus:t}=(0,Dv.au)().subscribeTo(pJ),r=e=>{this.updateAge=NJ(e)};e.on(r),t.on(this.resetUpdateAge.bind(this)),this.unsubscribeFunctions.push(()=>{e.removeListener(r),t.removeListener(this.resetUpdateAge)}),vJ()}listenToNavigationStateChange(){(0,Dv.bs)(Dv.bt.SHELL_HIDDEN_FLOATING_SIDEBAR)&&this.unsubscribeFunctions.push(ZG().subscribeToNavigationState(this.navigationStateChangeHandler))}handleUpdateChipClick(){(()=>{const e=window.shell.display.modal({id:"update-modal",title:(0,Dv.cB)("Update GoTo for Teams plugin now?"),closable:!0,content:(0,Dv.cB)("Both your GoTo app and your GoTo for Teams plugin will restart during the update."),actions:[{label:(0,Dv.cB)("Update & restart"),handler:()=>{fJ.resetUpdateStatus(),e.close(),(0,Dv.O)().send({type:"companion-update",payload:{topic:"install-update"}})},size:"medium"},{label:(0,Dv.cB)("Ask me later"),handler:()=>{e.close()},variant:"tertiary",size:"medium"}]})})()}renderUpdateButton(e){return null==e||(0,Dv.cD)()?Dv.cm:Dv.aH`<li>
4718          <goto-update-chip .updateAge=${e} @click=${this.handleUpdateChipClick}></goto-update-chip>
4719        </li>`}renderNavigationDrawerButton(){return(0,Dv.bs)(Dv.bt.SHELL_HIDDEN_FLOATING_SIDEBAR)?Dv.aH` <goto-responsive-view max="sm">
4720          <chameleon-icon-button
4721            size="large"
4722            variant=${this.isNavigationMenuOpen?"secondary":"primary"}
4723            class="navigation-drawer-button"
4724            @click=${this.handleNavSidebarToggleClick}
4725            label=${(0,Dv.bQ)(this.isNavigationMenuOpen?"Close menu":"Open menu")}
4726          >
4727            <chameleon-svg>${(0,Dv.bR)(this.getMenuIcon())}</chameleon-svg>
4728          </chameleon-icon-button></goto-responsive-view
4729        >`:Dv.cm}render(){return Dv.aH`
4730      <div class="container">
4731        ${this.renderNavigationDrawerButton()} ${this.renderHorizontalNavRail()}
4732        <nav aria-label=${(0,Dv.bQ)("GoTo topbar")}>
4733          <ul>
4734            ${this.renderGlobalSearch()}${this.renderCallCardListItem()}${this.renderUpdateButton(this.updateAge)}${this.renderUserProfileMenu()}
4735          </ul>
4736        </nav>
4737      </div>
4738    `}getMenuIcon(){return this.isNavigationMenuOpen?'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M8 4H2V20H8V4ZM8 6H20V18H8V6ZM8 4H22V20H8V4Z" fill="currentColor"></path></svg>':'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 4H22V20H2V4ZM4 6V18H7V6H4ZM9 6V18H20V6H9Z" fill="currentColor"></path></svg>'}linksUpdated(){}renderHorizontalNavRail(){return Dv.aH` <goto-nav-bar .links=${this.links}></goto-nav-bar>`}renderGlobalSearch(){return(0,Dv.cD)()?Dv.cm:Dv.aH`<li><goto-global-search class="dynamic-width"></goto-global-search></li>`}renderCallCardListItem(){return Dv.aH`
4739      <li>
4740        <shell-topbar-call-card-container></shell-topbar-call-card-container>
4741      </li>
4742    `}renderUserProfileMenu(){return Dv.aH`
4743      <li>
4744        <chameleon-icon-button size="xlarge" id="user-menu-trigger" label=${(0,Dv.bQ)("User profile menu")}
4745          ><chameleon-svg> ${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M9 19.418V22H15V19.418C15.6954 19.1365 16.3416 18.7605 16.9228 18.3063L19.2321 19.6395L22.2321 14.4434L19.9233 13.1104C19.9739 12.747 20 12.3762 20 12C20 11.6238 19.9739 11.253 19.9233 10.8896L22.2321 9.55663L19.2321 4.36048L16.9228 5.69371C16.3416 5.23952 15.6954 4.86348 15 4.58203V2H9V4.58203C8.3046 4.86348 7.65838 5.23952 7.
474507718 5.69371L4.76795 4.36047L1.76795 9.55662L4.07669 10.8896C4.0261 11.253 4 11.6238 4 12C4 12.3762 4.0261 12.747 4.07669 13.1104L1.76795 14.4434L4.76795 19.6395L7.07719 18.3063C7.65839 18.7605 8.3046 19.1365 9 19.418ZM16.6236 15.8241C15.7246 16.9099 14.4506 17.6737 13 17.917V20H11V17.917C9.54945 17.6737 8.27538 16.9099 7.37639 15.8242L5.5 16.9075L4.5 15.1754L6.3751 14.0928C6.13256 13.4412 6 12.7361 6 12C6 11.2639 6.13256 10.5588 6.3751 9.90716L4.5 8.82457L5.5 7.09252L7.37639 8.17585C8.27538 7.09015 9.54945 6.32632 11 6.08296V4H13V6.08296C14.4506 6.32632 15.7246 7.09015 16.6236 8.17586L18.5 7.09253L19.5 8.82458L17.6249 9.90716C17.8674 10.5588 18 11.2639 18 12C18 12.7361 17.8674 13.4412 17.6249 14.0928L19.5 15.1754L18.5 16.9075L16.6236 15.8241ZM13 12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12ZM15 12C15 13.6569 13.6569 15 12 15C10.3431 15 9 13.6569 9 12C9 10.3431 10.3431 9 12 9C13.6569 9 15 10.3431 15 12Z" fill="currentColor"></path></svg>')}</chameleon-svg></chameleon-icon-button
4746        >
4747      </li>
4748      <chameleon-popover trigger-id="user-menu-trigger" menu position="bottom-end" label=${(0,Dv.bQ)("User profile menu")}
4749        ><goto-integration-user-menu></goto-integration-user-menu
4750      ></chameleon-popover>
4751    `}};QX.tagName="goto-integration-topbar";let XX=QX;JX([(0,Dv.ct)()],XX.prototype,"updateAge"),JX([(0,Dv.ct)()],XX.prototype,"isNavigationMenuOpen");const e0=class extends Dv.bP{constructor(){super(...arguments),this.givenName=(0,Dv.Z)().user.name.givenName,this.familyName=(0,Dv.Z)().user.name.lastName,this.url=(0,Dv.Z)().user.avatar?.isDefault?"":(0,Dv.Z)().user.avatar?.urlMedium??""}render(){return Dv.aH`<goto-avatar-popover-menu
4752      .familyName=${this.familyName}
4753      .givenName=${this.givenName}
4754      .profileImageUrl=${this.url}
4755    ></goto-avatar-popover-menu>`}};e0.tagName="goto-integration-user-menu";let t0=e0;var r0=Object.defineProperty;const n0=class extends Dv.co{constructor(){super(...arguments),this.firstTimeUser=!0}static get styles(){return(0,Dv.ck)("chameleon-goto-logo{--goto-icon-size: 74px;left:var(--goto-spacing-06);position:relative;top:var(--goto-spacing-01)}:host{display:flex;flex-direction:column;justify-content:center;background-color:var(--goto-background-color-default);background-image:url(\"data:image/svg+xml,%3csvg%20width='1208'%20height='698'%20viewBox='0%200%201208%20698'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_510_340004)'%3e%3cpath%20d='M1134.78%20377.017C1077.66%20376.937%201021.09%20388.127%20968.308%20409.947C915.525%20431.766%20867.565%20463.785%20827.177%20504.17C786.789%20544.555%20754.766%20592.512%20732.943%20645.293C711.12%20698.075%20699.925%20754.643%20700%20811.759C700%201051.38%20895.057%201246.53%201134.78%201246.53C1192.19%201247.04%201249.14%201236.17%201302.33%201214.54C1355.52%201192.92%201403.9%201160.98%201444.68%201120.56C1485.46%201080.14%201517.82%201032.04%201539.91%20979.039C1562%20926.041%201573.37%20869.193%201573.37%20811.775C1573.37%20754.358%201562%20697.509%201539.91%20644.511C1517.82%20591.513%201485.46%20543.415%201444.68%20502.994C1403.9%20462.573%201355.52%20430.629%201302.33%20409.007C1249.14%20387.384%201192.19%20376.512%201134.78%20377.017ZM1134.78%201053.33C1087%201053.33%201040.29%201039.17%201000.56%201012.63C960.828%20986.091%20929.861%20948.366%20911.572%20904.226C893.283%20860.086%20888.494%20811.513%20897.812%20764.652C907.129%20717.79%20930.133%20674.743%20963.916%20640.956C997.698%20607.169%201040.74%20584.158%201087.6%20574.835C1134.46%20565.511%201183.04%20570.293%201227.18%20588.576C1271.32%20606.858%201309.05%20637.821%201335.6%20677.547C1362.14%20717.273%201376.31%20763.979%201376.31%20811.759C1376.29%20875.815%201350.84%20937.243%201305.55%20982.541C1260.26%201027.84%201198.83%201053.3%201134.78%201053.33Z'%20fill='%23FFE900'/%3e%3cpath%20d='M-572.571%201340.62L606.5%20750.158L519.499%20576.43L-659.572%201166.9L-572.571%201340.62Z'%20fill='%238CB4C8'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_510_340004'%3e%3crect%20width='1208'%20height='698'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e\");background-position:right bottom;background-repeat:no-repeat;background-size:cover;background-attachment:fixed;height:100%}.integration-disconnected-container{padding-left:120px;box-sizing:border-box;overflow:auto}.container-description{margin-bottom:var(--goto-spacing-07);margin-top:var(--goto-spacing-07);width:100%;max-width:570px}.user-action-container{margin-top:var(--goto-spacing-07)}.divider{margin-left:var(--goto-spacing-01);margin-right:var(--goto-spacing-01)}.contact-text{max-width:570px;margin-bottom:var(--goto-spacing-07)}@media(max-width:770px){.integration-disconnected-container{padding-left:var(--goto-spacing-07)}.user-action-container{display:block}}@media(max-width:530px){:host{overflow-x:scroll}}")}connectedCallback(){super.connectedCallback(),this.checkFirstTimeUserStatus()}checkFirstTimeUserStatus(){const e="teams-page-visited";"true"===(0,Dv.aZ)(e)?this.firstTimeUser=!1:(this.firstTimeUser=!0,(0,Dv.aW)(e,"true"))}getTitleText(){return this.firstTimeUser?(0,Dv.cB)("Download the GoTo for Teams plugin"):(0,Dv.cB)("Start the GoTo for Teams plugin")}getDescriptionText(){return this.firstTimeUser?(0,Dv.cB)("For calls to work in Microsoft Teams, you'll need to download and run the GoTo for Teams plugin on your desktop."):(0,Dv.cB)("For calls to work in Microsoft Teams, you must run the GoTo for Teams plugin on your desktop.")}renderContactText(){return this.firstTimeUser?Dv.aH`
4756          <chameleon-typography variant="body-large" class="contact-text"
4757            >${(0,Dv.bQ)("You'll also need a GoTo Connect account to continue. Don't have one?")}
4758            <chameleon-link id="contact" href=${"https://www.goto.com/learn-more"} target="_blank" variant="body-large"
4759              >${(0,Dv.bQ)("Contact sales")}</chameleon-link
4760            ></chameleon-typography
4761          >
4762        `:Dv.cm}getPluginButtonText(){return this.firstTimeUser?(0,Dv.cB)("Download"):(0,Dv.cB)("Start plugin")}trackPluginButtonClicked(){(0,Dv.cr)().track("GoTo > Integration > Plugin Button",{action:"Click",event:this.firstTimeUser?"First time user: Download plugin":"Returning user: Start plugin"})}pluginButtonHandler(){this.trackPluginButtonClicked(),this.firstTimeUser?(0,Dv.bk)(Dv.e9):(0,Dv.bk)(this.getStartPluginUrl())}getStartPluginUrl(){return new URL(Dv.aO,(0,Dv.cU)()).href}renderPluginButton(){return Dv.aH`
4763      <chameleon-button size="xlarge" @click=${this.pluginButtonHandler}
4764        ><chameleon-svg slot="end" data-testid="external-link"> ${Sb} </chameleon-svg
4765        >${this.getPluginButtonText()}</chameleon-button
4766      >
4767    `}getPluginLinkDescriptionText(){return this.firstTimeUser?(0,Dv.cB)("Already have the plugin?"):(0,Dv.cB)("Plugin not starting?")}getPluginLinkText(){return this.firstTimeUser?(0,Dv.cB)("Start plugin"):(0,Dv.cB)("Download again")}getLinkTrackingEventText(){return this.firstTimeUser?"First time user: Start plugin":"Returning user: Download again"}trackPluginLinkClicked(){(0,Dv.cr)().track("GoTo > Integration > Plugin link",{action:"Click",event:this.getLinkTrackingEventText()})}async login(){(0,Dv.ea)(!1),(0,Dv.Z)().auth.login()}getSignInNoPluginSection(){return(0,Dv.bs)(Dv.bt.SHELL_MS_TEAM_NO_PLUGIN,!1)?Dv.aH` <chameleon-typography variant="body-large"
4768        >${"Without plugin"}
4769        <chameleon-link id="start" variant="body-large" @click=${this.login}
4770          >${"login"}</chameleon-link
4771        ></chameleon-typography
4772      >`:null}render(){return Dv.aH` <div class="integration-disconnected-container">
4773      <chameleon-typography variant="heading-large" class="container-title">
4774        ${this.getTitleText()}
4775      </chameleon-typography>
4776      <chameleon-typography variant="body-large" class="container-description">
4777        ${this.getDescriptionText()}
4778      </chameleon-typography>
4779      ${this.renderContactText()}${this.renderPluginButton()}
4780      <div class="user-action-container">
4781        <chameleon-typography variant="body-large"
4782          >${this.getPluginLinkDescriptionText()}
4783          <chameleon-link
4784            id="start"
4785            href="${this.firstTimeUser?this.getStartPluginUrl():Dv.e9}"
4786            target="_blank"
4787            variant="body-large"
4788            @click=${this.trackPluginLinkClicked}
4789            >${this.getPluginLinkText()}</chameleon-link
4790          ></chameleon-typography
4791        >
4792        ${this.getSignInNoPluginSection()}
4793      </div>
4794    </div>`}};n0.tagName="goto-integration-disconnected-page";let o0=n0;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&r0(t,r,o)})([(0,Dv.ct)()],o0.prototype,"firstTimeUser");const i0="[SidePanelIntegration]";var s0=Object.defineProperty;const a0=class extends Dv.co{constructor(){super(...arguments),this.firstTimeUser=!0}static get styles(){return(0,Dv.ck)("chameleon-goto-logo{--goto-icon-size: 74px;left:var(--goto-spacing-06);position:relative;top:var(--goto-spacing-01)}:host{display:flex;flex-direction:column;justify-content:center;background-color:var(--goto-background-color-default);background-image:url(\"data:image/svg+xml,%3csvg%20width='1208'%20height='698'%20viewBox='0%200%201208%20698'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_510_340004)'%3e%3cpath%20d='M1134.78%20377.017C1077.66%20376.937%201021.09%20388.127%20968.308%20409.947C915.525%20431.766%20867.565%20463.785%20827.177%20504.17C786.789%20544.555%20754.766%20592.512%20732.943%20645.293C711.12%20698.075%20699.925%20754.643%20700%20811.759C700%201051.38%20895.057%201246.53%201134.78%201246.53C1192.19%201247.04%201249.14%201236.17%201302.33%201214.54C1355.52%201192.92%201403.9%201160.98%201444.68%201120.56C1485.46%201080.14%201517.82%201032.04%201539.91%20979.039C1562%20926.041%201573.37%20869.193%201573.37%20811.775C1573.37%20754.358%201562%20697.509%201539.91%20644.511C1517.82%20591.513%201485.46%20543.415%201444.68%20502.994C1403.9%20462.573%201355.52%20430.629%201302.33%20409.007C1249.14%20387.384%201192.19%20376.512%201134.78%20377.017ZM1134.78%201053.33C1087%201053.33%201040.29%201039.17%201000.56%201012.63C960.828%20986.091%20929.861%20948.366%20911.572%20904.226C893.283%20860.086%20888.494%20811.513%20897.812%20764.652C907.129%20717.79%20930.133%20674.743%20963.916%20640.956C997.698%20607.169%201040.74%20584.158%201087.6%20574.835C1134.46%20565.511%201183.04%20570.293%201227.18%20588.576C1271.32%20606.858%201309.05%20637.821%201335.6%20677.547C1362.14%20717.273%201376.31%20763.979%201376.31%20811.759C1376.29%20875.815%201350.84%20937.243%201305.55%20982.541C1260.26%201027.84%201198.83%201053.3%201134.78%201053.33Z'%20fill='%23FFE900'/%3e%3cpath%20d='M-572.571%201340.62L606.5%20750.158L519.499%20576.43L-659.572%201166.9L-572.571%201340.62Z'%20fill='%238CB4C8'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_510_340004'%3e%3crect%20width='1208'%20height='698'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e\");background-position:right bottom;background-repeat:no-repeat;background-size:cover;background-attachment:fixed;height:100%}.disconnected-landing-container{padding-left:120px;box-sizing:border-box;overflow:auto}.container-description{margin-bottom:var(--goto-spacing-07);margin-top:var(--goto-spacing-07);width:100%;max-width:570px}.user-action-container{margin-top:var(--goto-spacing-07)}.contact-text{max-width:570px;margin-bottom:var(--goto-spacing-07)}@media(max-width:770px){.disconnected-landing-container{padding-left:var(--goto-spacing-07)}.user-action-container{display:block}}@media(max-width:530px){:host{overflow-x:scroll}}")}connectedCallback(){super.connectedCallback(),this.checkFirstTimeUserStatus()}checkFirstTimeUserStatus(){const e="side-panel-integration-disconnected-landing-shown";"true"===(0,Dv.aZ)(e)?this.firstTimeUser=!1:(this.firstTimeUser=!0,(0,Dv.aW)(e,"true"))}getTitleText(){return this.firstTimeUser?(0,Dv.cB)("Download the GoTo desktop app"):(0,Dv.cB)("Start the GoTo desktop app")}getDescriptionText(){return this.firstTimeUser?(0,Dv.cB)("For calls to work, you'll need to download and run the GoTo desktop app."):(0,Dv.cB)("For calls to work, you must run the GoTo desktop app.")}renderContactText(){return this.firstTimeUser?Dv.aH`
4795          <chameleon-typography variant="body-large" class="contact-text"
4796            >${(0,Dv.bQ)("You'll also need a GoTo Connect account to continue. Don't have one?")}
4797            <chameleon-link id="contact" href=${"https://www.goto.com/learn-more"} target="_blank" variant="body-large"
4798              >${(0,Dv.bQ)("Contact sales")}</chameleon-link
4799            ></chameleon-typography
4800          >
4801        `:Dv.cm}getButtonText(){return this.firstTimeUser?(0,Dv.cB)("Download"):(0,Dv.cB)("Start")}trackButtonClicked(){(0,Dv.cr)().track("GoTo > Side Panel Integration > GoTo desktop app button",{action:"Click",event:this.firstTimeUser?"First time user: Download GoTo desktop app":"Returning user: Start the GoTo desktop app"})}downloadDesktopApp(){(0,Dv.bk)("https://support.goto.com/connect/help/how-do-i-download-and-install-the-goto-app")}async openDesktopApp(){(0,Dv.bk)("goto://open"),"granted"!==(await navigator.permissions.query({name:"local-network-access"})).state&&(()=>{try{const e=(0,Dv.bp)().top;if(!e)return void(0,Dv.g)().error(`[${i0}] window.top is not available; cannot request connect to desktop app window`);e.postMessage({type:"SHELL_REQUEST_OPEN_CONNECT_TO_DESKTOP_APP_WINDOW"},"*")}catch(e){(0,Dv.g)().error(`[${i0}] Error requesting connect to desktop app window:`,e)}})()}buttonHandler(){this.trackButtonClicked(),this.firstTimeUser?this.downloadDesktopApp():this.openDesktopApp().catch(e=>{(0,Dv.g)().error("Failed to open desktop app:",e)})}renderButton(){return Dv.aH`
4802      <chameleon-button size="xlarge" @click=${this.buttonHandler}
4803        ><chameleon-svg slot="end" data-testid="external-link"> ${Sb} </chameleon-svg
4804        >${this.getButtonText()}</chameleon-button
4805      >
4806    `}getLinkDescriptionText(){return this.firstTimeUser?(0,Dv.cB)("Already have the GoTo desktop app?"):(0,Dv.cB)("GoTo desktop app not starting?")}getLinkText(){return this.firstTimeUser?(0,Dv.cB)("Start the GoTo desktop app"):(0,Dv.cB)("Download again")}trackLinkClicked(){(0,Dv.cr)().track("GoTo > Side Panel Integration > GoTo desktop app link",{action:"Click",event:this.firstTimeUser?"First time user: Start the GoTo desktop app":"Returning user: Download again"})}linkHandler(){this.trackLinkClicked(),this.firstTimeUser?this.openDesktopApp().catch(e=>{(0,Dv.g)().error("Failed to open desktop app:",e)}):this.downloadDesktopApp()}render(){return Dv.aH` <div class="disconnected-landing-container">
4807      <chameleon-typography variant="heading-large" class="container-title">
4808        ${this.getTitleText()}
4809      </chameleon-typography>
4810      <chameleon-typography variant="body-large" class="container-description">
4811        ${this.getDescriptionText()}
4812      </chameleon-typography>
4813      ${this.renderContactText()}${this.renderButton()}
4814      <div class="user-action-container">
4815        <chameleon-typography variant="body-large"
4816          >${this.getLinkDescriptionText()}
4817          <chameleon-link id="start" variant="body-large" @click=${this.linkHandler}
4818            >${this.getLinkText()}</chameleon-link
4819          ></chameleon-typography
4820        >
4821      </div>
4822    </div>`}};a0.tagName="goto-side-panel-integration-disconnected-landing";let l0=a0;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&s0(t,r,o)})([(0,Dv.ct)()],l0.prototype,"firstTimeUser");var c0=Object.defineProperty;const d0=class extends Dv.co{constructor(){super(...arguments),this.hasStartedSignIn=!1}static get styles(){return(0,Dv.ck)(":host{display:flex;flex-direction:column;justify-content:center;background-color:var(--goto-background-color-default);background-image:url(\"data:image/svg+xml,%3csvg%20width='1208'%20height='698'%20viewBox='0%200%201208%20698'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_510_340004)'%3e%3cpath%20d='M1134.78%20377.017C1077.66%20376.937%201021.09%20388.127%20968.308%20409.947C915.525%20431.766%20867.565%20463.785%20827.177%20504.17C786.789%20544.555%20754.766%20592.512%2
48220732.943%20645.293C711.12%20698.075%20699.925%20754.643%20700%20811.759C700%201051.38%20895.057%201246.53%201134.78%201246.53C1192.19%201247.04%201249.14%201236.17%201302.33%201214.54C1355.52%201192.92%201403.9%201160.98%201444.68%201120.56C1485.46%201080.14%201517.82%201032.04%201539.91%20979.039C1562%20926.041%201573.37%20869.193%201573.37%20811.775C1573.37%20754.358%201562%20697.509%201539.91%20644.511C1517.82%20591.513%201485.46%20543.415%201444.68%20502.994C1403.9%20462.573%201355.52%20430.629%201302.33%20409.007C1249.14%20387.384%201192.19%20376.512%201134.78%20377.017ZM1134.78%201053.33C1087%201053.33%201040.29%201039.17%201000.56%201012.63C960.828%20986.091%20929.861%20948.366%20911.572%20904.226C893.283%20860.086%20888.494%20811.513%20897.812%20764.652C907.129%20717.79%20930.133%20674.743%20963.916%20640.956C997.698%20607.169%201040.74%20584.158%201087.6%20574.835C1134.46%20565.511%201183.04%20570.293%201227.18%20588.576C1271.32%20606.858%201309.05%20637.821%201335.6%20677.547C1362.14%20717.273%201376.31%20763.979%201376.31%20811.759C1376.29%20875.815%201350.84%20937.243%201305.55%20982.541C1260.26%201027.84%201198.83%201053.3%201134.78%201053.33Z'%20fill='%23FFE900'/%3e%3cpath%20d='M-572.571%201340.62L606.5%20750.158L519.499%20576.43L-659.572%201166.9L-572.571%201340.62Z'%20fill='%238CB4C8'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_510_340004'%3e%3crect%20width='1208'%20height='698'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e\");background-position:right bottom;background-repeat:no-repeat;background-size:cover;background-attachment:fixed;height:100%}.connected-landing-container{padding-left:120px;box-sizing:border-box;overflow:auto}.container-title{width:100%}.container-description,.container-learn-more{margin-bottom:var(--goto-spacing-07);margin-top:var(--goto-spacing-07);width:100%;max-width:571px}.message-info-container{gap:var(--goto-spacing-01);margin-top:var(--goto-spacing-04);display:flex;align-items:center}@media(max-width:770px){.connected-landing-container{padding-left:var(--goto-spacing-07)}}@media(max-width:530px){:host{overflow-x:scroll}}@media(max-width:432px){.connected-landing-container{width:100vw;padding:var(--goto-spacing-07);display:block}.container-title{width:100%}}")}login(){this.hasStartedSignIn=!0;const e=(0,Dv.dm)()??"/";(0,Dv.Z)().auth.login({inflightPathname:e,restartFlow:!0})}renderSignInStartedInfoMessage(){return this.hasStartedSignIn?Dv.aH`
4823          <div class="message-info-container">
4824            <chameleon-svg>${(0,Dv.bR)(Eb)}</chameleon-svg>
4825            <chameleon-typography variant="caption-medium">
4826              ${(0,Dv.bQ)("We've opened a browser tab for you to sign in.")}
4827            </chameleon-typography>
4828          </div>
4829        `:Dv.cm}trackSignInClick(){(0,Dv.cr)().track("GoTo > Side Panel Integration > Sign in",{action:"click",event:"sign in"})}handleSignInClick(){this.trackSignInClick(),this.login()}trackContactSalesClick(){(0,Dv.cr)().track("GoTo > Side Panel Integration > Contact sales",{action:"click",event:"contact sales"})}render(){return Dv.aH` <div class="connected-landing-container">
4830      <div class="landing-content">
4831        <chameleon-typography variant="heading-large" class="container-title">
4832          ${(0,Dv.bQ)("Tools to help you work together better")}
4833        </chameleon-typography>
4834        <chameleon-typography variant="body-large" class="container-description">
4835          ${(0,Dv.bQ)("Sign in to see your calls, messages, and more.")}
4836        </chameleon-typography>
4837        <chameleon-button id="sign-in-to-goto" variant="primary" size="xlarge" @click=${this.handleSignInClick}>
4838          <chameleon-svg slot="end">${Sb}</chameleon-svg>${(0,Dv.bQ)("Sign in to GoTo")}
4839        </chameleon-button>
4840        ${this.renderSignInStartedInfoMessage()}
4841        <div class="container-learn-more">
4842          <chameleon-typography variant="body-large">${(0,Dv.bQ)("Don't have a GoTo Connect account?")}</chameleon-typography>
4843          <chameleon-link
4844            variant="body-large"
4845            appearance="primary"
4846            href="https://www.goto.com/learn-more"
4847            @click=${this.trackContactSalesClick}
4848            >${(0,Dv.bQ)("Contact sales")}</chameleon-link
4849          >
4850        </div>
4851      </div>
4852    </div>`}};d0.tagName="goto-side-panel-integration-connected-landing";let u0=d0;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&c0(t,r,o)})([(0,Dv.ct)()],u0.prototype,"hasStartedSignIn");var h0=Object.defineProperty,p0=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&h0(t,r,i),i};const g0=class extends Dv.bP{constructor(){super(),this.companionIsConnected=!1,this.connectedToDesktopApp=!1,this.obtainIntegrationAuthenticationMode=async()=>{try{this.integrationAuthenticationMode=await(0,Dv.eb)()}catch(e){(0,Dv.g)().error("Failed to obtain integration authentication mode",{error:e}),this.integrationAuthenticationMode=Dv.o.DEFAULT}},this.obtainIntegrationAuthenticationMode()}connectedCallback(){super.connectedCallback(),this.startMonitoringConnectionToCompanion(),this.startMonitoringConnectionToDesktopApp()}startMonitoringConnectionToCompanion(){this.companionIsConnected=(0,Dv.O)().available;const e=e=>{this.companionIsConnected=e.connectionStatus===Dv.bl.connected};(0,Dv.O)().addConnectionCallback(e),this.unsubscribeFunctions.push(()=>(0,Dv.O)().removeConnectionCallback(e))}startMonitoringConnectionToDesktopApp(){this.connectedToDesktopApp=(0,Dv.ec)()===Dv.bl.connected;const e=e=>{this.connectedToDesktopApp=e.connectionStatus===Dv.bl.connected};(0,Dv.ed)(e),this.unsubscribeFunctions.push(()=>(0,Dv.ee)(e))}render(){return(0,Dv.O)().supportsCompanion?this.renderMSTeamsLanding():(0,Dv.cs)()===Dv.p.SIDE_PANEL?this.renderSidePanelLanding():this.renderDefaultLanding()}renderMSTeamsLanding(){return this.companionIsConnected?Dv.aH`<goto-integration-connected-landing></goto-integration-connected-landing>`:Dv.aH`<goto-integration-disconnected-page></goto-integration-disconnected-page>`}renderSidePanelLanding(){return this.integrationAuthenticationMode?this.integrationAuthenticationMode===Dv.o.DESKTOP_APP?this.renderSidePanelDesktopAppAuthLanding():this.renderDefaultLanding():Dv.cm}renderSidePanelDesktopAppAuthLanding(){return this.connectedToDesktopApp?Dv.a
4852H`<goto-side-panel-integration-connected-landing></goto-side-panel-integration-connected-landing>`:Dv.aH`<goto-side-panel-integration-disconnected-landing></goto-side-panel-integration-disconnected-landing>`}renderDefaultLanding(){return Dv.aH`<goto-shell-landing></goto-shell-landing>`}};g0.tagName="goto-shell-landing-controller";let f0=g0;p0([(0,Dv.ct)()],f0.prototype,"companionIsConnected"),p0([(0,Dv.ct)()],f0.prototype,"connectedToDesktopApp"),p0([(0,Dv.ct)()],f0.prototype,"integrationAuthenticationMode");var m0=Object.defineProperty;const v0=class extends OG{constructor(){super(...arguments),this.links=[],this.setNavigationItems=async()=>{let e=[...this.links];const t=await MG().validateAndCleanOrder(this.links);e=JG(t,e),this.navigationItems=e,this.subscribeToBadgeEvent()},this.rendernavItem=e=>{const t=CG(e.pathname);return Dv.aH`
4853      <chameleon-nav-bar-item
4854        .href=${e.pathname}
4855        data-testid="${(0,Dv.cq)(e.dataTest)}"
4856        navigation-id="${e.id}"
4857        ?active=${t}
4858        ?external=${e.externalLink}
4859      >
4860        <chameleon-svg slot="icon">${(0,Dv.bR)(SG(e.icon,{active:t}))} </chameleon-svg>
4861        ${this.renderBadge(e)} ${e.displayName}
4862      </chameleon-nav-bar-item>
4863    `}}static get styles(){return(0,Dv.ck)(":host{flex-grow:1;height:100%}chameleon-nav-bar{height:var(--goto-layout-04)}chameleon-badge-counter{pointer-events:none}.fade-in{animation:fadeIn var(--goto-duration-snappy-02)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}")}attributeChangedCallback(e,t,r){super.attributeChangedCallback(e,t,r),"links"===e&&r&&this.setNavigationItems()}render(){return Dv.aH`
4864      <chameleon-nav-bar
4865        class="fade-in"
4866        label=${(0,Dv.bQ)("GoTo navigation menu")}
4867        @ch-nav-bar-change=${e=>{e.detail.target.external||((0,Dv.d1)(e.detail.target.href),(0,Dv.bj)(e.detail.target.href))}}
4868      >
4869        ${Nb(this.navigationItems,this.rendernavItem)}
4870      </chameleon-nav-bar>
4871    `}renderBadge(e){const t=this.getBadgeCount(e);return t&&t>0?Dv.aH`
4872          <chameleon-badge-counter
4873            size="small"
4874            slot="badge"
4875            data-testid="badge-${(0,Dv.cq)(e.dataTest)}"
4876            label=${(0,Dv.bQ)("New notifications")}
4877          >
4878            ${t}
4879            <span slot="max">${(0,Dv.bQ)("{{badgeCount}}+",()=>({badgeCount:99}))}</span>
4880          </chameleon-badge-counter>
4881        `:Dv.cm}};v0.tagName="goto-nav-bar";let b0=v0;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&m0(t,r,o)})([(0,Dv.cn)({type:Array,attribute:"links",reflect:!0})],b0.prototype,"links");const y0=class extends Dv.bP{render(){return Dv.aH` <chameleon-banner variant="${"danger"}">
4882      <span>
4883        ${(0,Dv.cB)("Some parts of GoTo didn't load correctly. We're working on fixing it, so wait a little while before you try to reload.")}
4884      </span>
4885      <chameleon-link slot="action" href="#" @click=${Dv.cJ}>${(0,Dv.cB)("Reload")}</chameleon-link>
4886    </chameleon-banner>`}};y0.tagName="goto-blocked-extensions-banner";let w0=y0;const x0=class extends Dv.co{constructor(){super(...arguments),this.redirectToStartMsTeamsPlugin=()=>{(0,Dv.dw)(Dv.ef)}}static get styles(){return(0,Dv.ck)("chameleon-goto-logo{--goto-icon-size: 74px;left:var(--goto-spacing-06);position:relative;top:var(--goto-spacing-01)}.integration-disconnected-container{padding-left:98px;padding-right:var(--goto-spacing-07);padding-top:225px;background-color:var(--goto-background-color-default);background-image:url(\"data:image/svg+xml,%3csvg%20width='1208'%20height='698'%20viewBox='0%200%201208%20698'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_510_340004)'%3e%3cpath%20d='M1134.78%20377.017C1077.66%20376.937%201021.09%20388.127%20968.308%20409.947C915.525%20431.766%20867.565%20463.785%20827.177%20504.17C786.789%20544.555%20754.766%20592.512%20732.943%20645.293C711.12%20698.075%20699.925%20754.643%20700%20811.759C700%201051.38%20895.057%201246.53%201134.78%201246.53C1192.19%201247.04%201249.14%201236.17%201302.33%201214.54C1355.52%201192.92%201403.9%201160.98%201444.68%201120.56C1485.46%201080.14%201517.82%201032.04%201539.91%20979.039C1562%20926.041%201573.37%20869.193%201573.37%20811.775C1573.37%20754.358%201562%20697.509%201539.91%20644.511C1517.82%20591.513%201485.46%20543.415%201444.68%20502.994C1403.9%20462.573%201355.52%20430.629%201302.33%20409.007C1249.14%20387.384%201192.19%20376.512%201134.78%20377.017ZM1134.78%201053.33C1087%201053.33%201040.29%201039.17%201000.56%201012.63C960.828%20986.091%20929.861%20948.366%20911.572%20904.226C893.283%20860.086%20888.494%20811.513%20897.812%20764.652C907.129%20717.79%20930.133%20674.743%20963.916%20640.956C997.698%20607.169%201040.74%20584.158%201087.6%20574.835C1134.46%20565.511%201183.04%20570.293%2
488601227.18%20588.576C1271.32%20606.858%201309.05%20637.821%201335.6%20677.547C1362.14%20717.273%201376.31%20763.979%201376.31%20811.759C1376.29%20875.815%201350.84%20937.243%201305.55%20982.541C1260.26%201027.84%201198.83%201053.3%201134.78%201053.33Z'%20fill='%23FFE900'/%3e%3cpath%20d='M-572.571%201340.62L606.5%20750.158L519.499%20576.43L-659.572%201166.9L-572.571%201340.62Z'%20fill='%238CB4C8'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_510_340004'%3e%3crect%20width='1208'%20height='698'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e\");background-position:right bottom;background-repeat:no-repeat;background-size:cover;background-attachment:fixed;box-sizing:border-box;overflow:auto;height:100%}.container-description{margin-bottom:var(--goto-spacing-07);margin-top:var(--goto-spacing-07);width:100%;max-width:571px}.user-action-container{display:flex}.divider{margin-left:var(--goto-spacing-01);margin-right:var(--goto-spacing-01)}@media(max-width:770px){.integration-disconnected-container{padding-left:var(--goto-spacing-07)}.user-action-container{display:block}}@media(max-width:530px){:host{overflow-x:scroll}}")}firstUpdated(e){super.firstUpdated(e),this.redirectToStartMsTeamsPlugin()}render(){return Dv.aH` <chameleon-goto-logo></chameleon-goto-logo>
4887      <div class="integration-disconnected-container">
4888        <chameleon-typography variant="heading-large" class="container-title">
4889          ${(0,Dv.bQ)("Start the GoTo plugin")}
4890        </chameleon-typography>
4891        <chameleon-typography variant="body-large" class="container-description">
4892          ${(0,Dv.bQ)("For calls to work in Microsoft Teams, you must run the GoTo for Teams plugin on your desktop.")}
4893        </chameleon-typography>
4894        <chameleon-typography variant="body-large" class="container-description">
4895          ${(0,Dv.bQ)("If prompted, allow your browser to open the plugin.")}
4896        </chameleon-typography>
4897        <chameleon-typography variant="body-large">${(0,Dv.bQ)("Plugin not starting?")}</chameleon-typography>
4898        <div class="user-action-container">
4899          <chameleon-link id="start" @click=${this.redirectToStartMsTeamsPlugin} variant="body-large"
4900            >${(0,Dv.bQ)("Try again")}</chameleon-link
4901          >
4902          <chameleon-typography variant="body-large" color="type-color-secondary-inverted" class="divider"
4903            >|</chameleon-typography
4904          >
4905          <chameleon-link id="download" href="${Dv.e9}" target="_blank" variant="body-large"
4906            >${(0,Dv.bQ)("Download again")}</chameleon-link
4907          >
4908        </div>
4909      </div>`}};x0.tagName="goto-integration-start-plugin";let _0=x0;const k0=class extends Dv.co{constructor(){super(...arguments),this.navigateToMobileApp=e=>{this.trackMobileLandingNavigation(e);const t=(0,Dv.ei)()?`com.logmein.gotoconnect.android://navigate/${e}`:`com.logmein.gotoconnect://navigate/${e}`,r=(0,Dv.cB)("Launching the GoTo mobile app"),n=(0,Dv.eg)({url:t,description:r}),o=new URLSearchParams({data:n});(0,Dv.bk)(this.getIntegrationRedirectProxyUrl(o))},this.getIntegrationRedirectProxyUrl=e=>{const t=new URL(Dv.aP,(0,Dv.cU)()).href;return e?`${t}?${e}`:t}}static get styles(){return(0,Dv.ck)(".landing-container{position:absolute;top:15%;padding-right:var(--goto-spacing-09);padding-left:var(--goto-spacing-09);background-color:var(--goto-background-color-default);background-image:url(\"data:image/svg+xml,%3csvg%20width='1208'%20height='698'%20viewBox='0%200%201208%20698'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_510_340004)'%3e%3cpath%20d='M1134.78%20377.017C1077.66%20376.937%201021.09%20388.127%20968.308%20409.947C915.525%20431.766%20867.565%20463.785%20827.177%20504.17C786.789%20544.555%20754.766%20592.512%20732.943%20645.293C711.12%20698.075%20699.925%20754.643%20700%20811.759C700%201051.38%20895.057%201246.53%201134.78%201246.53C1192.19%201247.04%201249.14%201236.17%201302.33%201214.54C1355.52%201192.92%201403.9%201160.98%201444.68%201120.56C1485.46%201080.14%201517.82%201032.04%201539.91%20979.039C1562%20926.041%201573.37%20869.193%201573.37%20811.775C1573.37%20754.358%201562%20697.509%201539.91%20644.511C1517.82%20591.513%201485.46%20543.415%201444.68%20502.994C1403.9%20462.573%201355.52%20430.629%201302.33%20409.007C1249.14%20387.384%201192.19%20376.512%201134.78%20377.017ZM1134.78%201053.33C1087%201053.33%201040.29%201039.17%201000.56%201012.63C960.828%20986.091%20929.861%20948.366%20911.572%20904.226C893.283%20860.086%20888.494%20811.513%20897.812%20764.652C907.129%20717.79%20930.133%20674.743%20963.916%20640.956C997.698%20607.169%201040.74%20584.158%201087.6%20574.835C1134.46%20565.511%201183.04%20570.293%2
490901227.18%20588.576C1271.32%20606.858%201309.05%20637.821%201335.6%20677.547C1362.14%20717.273%201376.31%20763.979%201376.31%20811.759C1376.29%20875.815%201350.84%20937.243%201305.55%20982.541C1260.26%201027.84%201198.83%201053.3%201134.78%201053.33Z'%20fill='%23FFE900'/%3e%3cpath%20d='M-572.571%201340.62L606.5%20750.158L519.499%20576.43L-659.572%201166.9L-572.571%201340.62Z'%20fill='%238CB4C8'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_510_340004'%3e%3crect%20width='1208'%20height='698'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e\");background-position:82%;background-repeat:no-repeat;background-size:cover;background-attachment:fixed;box-sizing:border-box;overflow:auto;height:100%}.container-title{width:100%}.container-description{margin-bottom:var(--goto-spacing-04);margin-top:var(--goto-spacing-04);width:100%}.grid-container{display:grid;grid-gap:10px;margin-top:var(--goto-spacing-04)}chameleon-button::part(control){justify-content:left;align-items:start}@media(max-width:432px){.landing-container{width:100vw;display:block}.container-title{width:100%}}")}handleDownloadMobileAppClick(){const{downloadUrl:e,type:t}=(0,Dv.eh)();(0,Dv.cr)().track("GoTo > MS Teams > Download Mobile",{action:"click",device:t}),window.open(e)}trackMobileLandingNavigation(e){(0,Dv.cr)().track("GoTo > MS Teams > Mobile Landing",{action:"click",event:`Navigate to mobile app: ${e}`})}render(){return Dv.aH` <div class="landing-container">
4910      <div class="landing-content">
4911        <chameleon-typography variant="heading-small" class="container-title">
4912          ${(0,Dv.bQ)("Call, message, and more on the GoTo mobile app")}
4913        </chameleon-typography>
4914        <div class="grid-container">
4915          <div class="grid-item">
4916            <chameleon-button
4917              fullwidth=${!0}
4918              size="xlarge"
4919              @click=${()=>{this.navigateToMobileApp("Phone")}}
4920            >
4921              <chameleon-svg slot="start">${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.5477 14.7535C9.53911 13.7934 8.67026 12.7044 7.97009 11.5173L10.7377 9.2575L9.68594 3.99642H4.00143C3.99901 4.11088 3.99779 4.22562 3.99779 4.34064C3.99779 4.45565 3.99901 4.57039 4.00143 4.68485C4.00373 4.79357 4.00713 4.90204 4.0116 5.01025C4.0253 5.34184 4.04912 5.67096 4.0828 5.99733C4.08473 6.01608 4.0867 6.03481 4.0887 6.05354C4.27449 7.79415 4.74035 9.45614 5.44279 10.9982C5.63367 11.4172 5.84201 11.8274 6.06695 12.2279C6.17489 12.4201 6.28665 12.61 6.40213 12.7976C7.17035 14.0457 8.10342 15.1911 9.17295 16.2068C9.73849 16.7439 10.3422 17.2447 10.9798 17.7053C11.0729 17.7725 11.1667 17.8389 11.2612 17.9044C11.7255 18.2261 12.2069 18.5269 12.7039 18.8053C14.188 19.6363 15.8111 20.2671 17.5321 20.6586C18.0015 20.7654 18.4782 20.8544 18.9614 20.9248C19.1435 20.9513 19.3266 20.9752 19.5105 20.9964L20.0022 15.2701L14.8514 13.7701L12.3999 16.2619C12.3157 16.2036 12.2323 16.1444 12.1495 16.0845C11.5835 15.6751 11.0483 15.2302 10.5477 14.7535ZM14.1654 17.3198C15.2705 17.8893 16.457 18.3372 17.7052 18.6436L17.8692 16.7329L15.4391 16.0252L14.1654 17.3198ZM7.05267 9.68369L8.54041 8.46889L8.04633 5.99733H6.09496C6.24669 7.28205 6.57316 8.51798 7.05267 9.68369Z" fill="currentColor"></path></svg>')}</chameleon-svg>
4922              ${(0,Dv.bQ)("Phone")}
4923            </chameleon-button>
4924          </div>
4925          <div class="grid-item">
4926            <chameleon-button fullwidth=${!0} size="xlarge" @click=${()=>this.navigateToMobileApp("Dialer")}>
4927              <chameleon-svg slot="start">${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M4 1H8V5H4V1Z" fill="currentColor"></path><path d="M10 1H14V5H10V1Z" fill="currentColor"></path><path d="M20 1H16V5H20V1Z" fill="currentColor"></path><path d="M4 7H8V11H4V7Z" fill="currentColor"></path><path d="M14 7H10V11H14V7Z" fill="currentColor"></path><path d="M16 7H20V11H16V7Z" fill="currentColor"></path><path d="M8 13H4V17H8V13Z" fill="currentColor"></path><path d="M10 13H14V17H10V13Z" fill="currentColor"></path><path d="M14 19H10V23H14V19Z" fill="currentColor"></path><path d="M16 13H20V17H16V13Z" fill="currentColor"></path></svg>')}</chameleon-svg>
4928              ${(0,Dv.bQ)("Dial")}
4929            </chameleon-button>
4930          </div>
4931          <div class="grid-item">
4932            <chameleon-button
4933              fullwidth=${!0}
4934              size="xlarge"
4935              @click=${()=>this.navigateToMobileApp("MessagingConversations")}
4936            >
4937              <chameleon-svg slot="start">${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.2857 19H22V4H2V19H6V22L12.2857 19ZM8 18.8293L11.8329 17H20V6H4V17H8V18.8293Z" fill="currentColor"></path></svg>')}</chameleon-svg>
4938              ${(0,Dv.bQ)("Messaging")}
4939            </chameleon-button>
4940          </div>
4941          <div class="grid-item">
4942            <chameleon-button fullwidth=${!0} size="xlarge" @click=${()=>this.navigateToMobileApp("Contacts")}
4942>
4943              <chameleon-svg slot="start">${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M13 6.5C13 8.433 11.433 10 9.5 10C7.567 10 6 8.433 6 6.5C6 4.567 7.567 3 9.5 3C11.433 3 13 4.567 13 6.5ZM11 6.5C11 7.32843 10.3284 8 9.5 8C8.67157 8 8 7.32843 8 6.5C8 5.67157 8.67157 5 9.5 5C10.3284 5 11 5.67157 11 6.5Z" fill="currentColor"></path><path d="M4 19C4 15.6152 6.53093 13 9.5 13C12.4691 13 15 15.6152 15 19V21H17V19C17 14.6528 13.7106 11 9.5 11C5.28937 11 2 14.6528 2 19V21H4V19Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M16 12C17.6569 12 19 10.6569 19 9C19 7.34315 17.6569 6 16 6C14.3431 6 13 7.34315 13 9C13 10.6569 14.3431 12 16 12ZM16 10C16.5523 10 17 9.55228 17 9C17 8.44772 16.5523 8 16 8C15.4477 8 15 8.44772 15 9C15 9.55228 15.4477 10 16 10Z" fill="currentColor"></path><path d="M15.8375 13.0022C15.8915 13.0007 15.9457 13 16 13C19.3137 13 22 15.6863 22 19V21H20V19C20 17.2089 18.8228 15.6928 17.2 15.1831C16.8466 14.3853 16.3859 13.6513 15.8375 13.0022Z" fill="currentColor"></path></svg>')}</chameleon-svg>
4944              ${(0,Dv.bQ)("Contacts")}
4945            </chameleon-button>
4946          </div>
4947        </div>
4948      </div>
4949      <chameleon-typography variant="body-medium" class="container-description">
4950        ${(0,Dv.bQ)("Don’t have the app? ")}
4951        <chameleon-link variant="body-medium" appearance="primary" @click=${this.handleDownloadMobileAppClick}
4952          >${(0,Dv.bQ)("Get it now")}</chameleon-link
4953        >
4954      </chameleon-typography>
4955    </div>`}};k0.tagName="goto-teams-mobile-landing";let C0=k0;const S0=class extends Dv.co{static get styles(){return(0,Dv.ck)(".download-badge-img{width:160px}")}handleDownloadMobileAppClick(){const e=(0,Dv.eh)();(0,Dv.cr)().track("GoTo > Download Mobile",{action:"click",device:e.type}),(0,Dv.bj)(e.downloadUrl)}render(){return Dv.aH`<div>
4956      <a href=${(0,Dv.eh)().downloadUrl} @click=${this.handleDownloadMobileAppClick}>
4957        <img class="download-badge-img" alt=${(0,Dv.bQ)("Download mobile app")} src=${(0,Dv.eh)().imageSrc}
4958      /></a>
4959    </div> `}};S0.tagName="goto-mobile-badge";let E0=S0;var I0=Object.defineProperty;const A0=class extends Dv.co{constructor(){super(...arguments),this.hasStartedSignIn=!1}static get styles(){return(0,Dv.ck)(":host{display:flex;flex-direction:column;justify-content:center;background-color:var(--goto-background-color-default);background-image:url(\"data:image/svg+xml,%3csvg%20width='1208'%20height='698'%20viewBox='0%200%201208%20698'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_510_340004)'%3e%3cpath%20d='M1134.78%20377.017C1077.66%20376.937%201021.09%20388.127%20968.308%20409.947C915.525%20431.766%20867.565%20463.785%20827.177%20504.17C786.789%20544.555%20754.766%20592.512%20732.943%20645.293C711.12%20698.075%20699.925%20754.643%20700%20811.759C700%201051.38%20895.057%201246.53%201134.78%201246.53C1192.19%201247.04%201249.14%201236.17%201302.33%201214.54C1355.52%201192.92%201403.9%201160.98%201444.68%201120.56C1485.46%201080.14%201517.82%201032.04%201539.91%20979.039C1562%20926.041%201573.37%20869.193%201573.37%20811.775C1573.37%20754.358%201562%20697.509%201539.91%20644.511C1517.82%20591.513%201485.46%20543.415%201444.68%20502.994C1403.9%20462.573%201355.52%20430.629%201302.33%20409.007C1249.14%20387.384%201192.19%20376.512%201134.78%20377.017ZM1134.78%201053.33C1087%201053.33%201040.29%201039.17%201000.56%201012.63C960.828%20986.091%20929.861%20948.366%20911.572%20904.226C893.283%20860.086%20888.494%20811.513%20897.812%20764.652C907.129%20717.79%20930.133%20674.743%20963.916%20640.956C997.698%20607.169%201040.74%20584.158%201087.6%20574.835C1134.46%20565.511%201183.04%20570.293%201227.18%20588.576C1271.32%20606.858%201309.05%20637.821%201335.6%20677.547C1362.14%20717.273%201376.31%20763.979%201376.31%20811.759C1376.29%20875.815%201350.84%20937.243%201305.55%20982.541C1260.26%201027.84%201198.83%201053.3%201134.78%201053.33Z'%20fill='%23FFE900'/%3e%3cpath%20d='M-572.571%201340.62L606.5%20750.158L519.499%20576.43L-659.572%201166.9L-572.571%201340.62Z'%20fill='%238CB4C8'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_510_340004'%3e%3crect%20width='1208'%20height='698'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e\");background-position:right bottom;background-repeat:no-repeat;background-size:cover;background-attachment:fixed;height:100%}.landing-container{padding-left:120px;box-sizing:border-box;overflow:auto}.container-title{width:100%}.container-description,.container-learn-more{margin-bottom:var(--goto-spacing-07);margin-top:var(--goto-spacing-07);width:100%;max-width:571px}.message-info-container{gap:var(--goto-spacing-01);margin-top:var(--goto-spacing-04);display:flex;align-items:center}@media(max-width:770px){.landing-container{padding-left:var(--goto-spacing-07)}}@media(max-width:530px){:host{overflow-x:scroll}}@media(max-width:432px){.landing-container{width:100vw;padding:var(--goto-spacing-07);
4959display:block}.container-title,.user-action-container{width:100%}}")}login(){this.hasStartedSignIn=!0;const e=(0,Dv.dm)()??"/";(0,Dv.ea)(!0),(0,Dv.Z)().auth.login({inflightPathname:e,restartFlow:!0})}renderSignInStartedInfoMessage(){return this.hasStartedSignIn?Dv.aH`
4960          <div class="message-info-container">
4961            <chameleon-svg>${(0,Dv.bR)(Eb)}</chameleon-svg>
4962            <chameleon-typography variant="caption-medium">
4963              ${(0,Dv.bQ)("We've opened a browser tab for you to sign in.")}
4964            </chameleon-typography>
4965          </div>
4966        `:Dv.cm}handleSignInClick(){(0,Dv.cr)().track("GoTo > Integration > Sign in",{action:"click",event:"sign in"}),this.login()}trackContactSalesClick(){(0,Dv.cr)().track("GoTo > Integration > Contact sales",{action:"click",event:"contact sales"})}render(){return Dv.aH` <div class="landing-container">
4967      <div class="landing-content">
4968        <chameleon-typography variant="heading-large" class="container-title">
4969          ${(0,Dv.bQ)("Tools to help you work together better")}
4970        </chameleon-typography>
4971        <chameleon-typography variant="body-large" class="container-description">
4972          ${(0,Dv.bQ)("Sign in to see your calls, messages, and more.")}
4973        </chameleon-typography>
4974        <chameleon-button id="sign-in-to-goto" variant="primary" size="xlarge" @click=${this.handleSignInClick}>
4975          <chameleon-svg slot="end">${Sb}</chameleon-svg>${(0,Dv.bQ)("Sign in to GoTo")}
4976        </chameleon-button>
4977        ${this.renderSignInStartedInfoMessage()}
4978        <div class="container-learn-more">
4979          <chameleon-typography variant="body-large">${(0,Dv.bQ)("Don't have a GoTo Connect account?")}</chameleon-typography>
4980          <chameleon-link
4981            variant="body-large"
4982            appearance="primary"
4983            href="https://www.goto.com/learn-more"
4984            @click=${this.trackContactSalesClick}
4985            >${(0,Dv.bQ)("Contact sales")}</chameleon-link
4986          >
4987        </div>
4988      </div>
4989    </div>`}};A0.tagName="goto-integration-connected-landing";let T0=A0;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&I0(t,r,o)})([(0,Dv.ct)()],T0.prototype,"hasStartedSignIn");var O0=Object.defineProperty;const L0=["com.logmein.gotoconnect.android://","com.logmein.gotoconnect://","gotoforteams://"],$0=class extends Dv.co{constructor(){super(...arguments),this.data={},this.proxyRedirect=()=>{const e=this.data?.url;this.isRedirectUrlValid(e)?(0,Dv.dw)(e):(0,Dv.g)().error("Invalid redirect URL: ",e)},this.isRedirectUrlValid=e=>L0.some(t=>e.startsWith(t))}static get styles(){return(0,Dv.ck)("chameleon-goto-logo{--goto-icon-size: 74px;position:relative;top:var(--goto-spacing-01)}.integration-redirect-proxy-container{position:absolute;top:15%;padding-right:var(--goto-spacing-10);padding-left:var(--goto-spacing-10);background-color:var(--goto-background-color-default);background-image:url(\"data:image/svg+xml,%3csvg%20width='1208'%20height='698'%20viewBox='0%200%201208%20698'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_510_340004)'%3e%3cpath%20d='M1134.78%20377.017C1077.66%20376.937%201021.09%20388.127%20968.308%20409.947C915.525%20431.766%20867.565%20463.785%20827.177%20504.17C786.789%20544.555%20754.766%20592.512%20732.943%20645.293C711.12%20698.075%20699.925%20754.643%20700%20811.759C700%201051.38%20895.057%201246.53%201134.78%201246.53C1192.19%201247.04%201249.14%201236.17%201302.33%201214.54C1355.52%201192.92%201403.9%201160.98%201444.68%201120.56C1485.46%201080.14%201517.82%201032.04%201539.91%20979.039C1562%20926.041%201573.37%20869.193%201573.37%20811.775C1573.37%20754.358%201562%20697.509%201539.91%20644.511C1517.82%20591.513%201485.46%20543.415%201444.68%20502.994C1403.9%20462.573%201355.52%20430.629%201302.33%20409.007C1249.14%20387.384%201192.19%20376.512%201134.78%20377.017ZM1134.78%201053.33C1087%201053.33%201040.29%201039.17%201000.56%201012.63C960.828%20986.091%20929.861%20948.366%20911.572%20904.226C893.283%20860.086%20888.494%20811.513%20897.812%20764.652C907.129%20717.79%20930.133%20674.743%20963.916%20640.956C997.698%20607.169%201040.74%20584.158%201087.6%20574.835C1134.46%20565.511%201183.04%20570.293%2
498901227.18%20588.576C1271.32%20606.858%201309.05%20637.821%201335.6%20677.547C1362.14%20717.273%201376.31%20763.979%201376.31%20811.759C1376.29%20875.815%201350.84%20937.243%201305.55%20982.541C1260.26%201027.84%201198.83%201053.3%201134.78%201053.33Z'%20fill='%23FFE900'/%3e%3cpath%20d='M-572.571%201340.62L606.5%20750.158L519.499%20576.43L-659.572%201166.9L-572.571%201340.62Z'%20fill='%238CB4C8'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_510_340004'%3e%3crect%20width='1208'%20height='698'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e\");background-position:73%;background-repeat:no-repeat;background-size:cover;background-attachment:fixed;box-sizing:border-box;overflow:auto;height:100%}chameleon-typography{margin-bottom:var(--goto-spacing-04);margin-top:var(--goto-spacing-04)}chameleon-button{margin-bottom:var(--goto-spacing-02);margin-top:var(--goto-spacing-02)}@media(max-width:770px){.integration-redirect-proxy-container{padding-left:var(--goto-spacing-07)}}@media(max-width:530px){:host{overflow-x:scroll}}")}firstUpdated(e){super.firstUpdated(e),this.proxyRedirect()}handleDownloadMobileAppClick(){const{downloadUrl:e}=(0,Dv.eh)();(0,Dv.bj)(e)}render(){return Dv.aH` <div class="integration-redirect-proxy-container">
4990      <chameleon-goto-logo></chameleon-goto-logo>
4991      <chameleon-typography variant="heading-large" class="container-title">
4992        ${this.data.description}
4993      </chameleon-typography>
4994      <!-- TODO: Make these values dynamic (https://jira.ops.expertcity.com/browse/SCORE-3044) -->
4995      <chameleon-typography variant="body-medium" class="container-description">
4996        ${(0,Dv.ej)("If prompted, allow your browser to open the GoTo app.")}
4997      </chameleon-typography>
4998      <chameleon-typography variant="body-medium" class="container-description"
4999        >${(0,Dv.ej)("Nothing happening? Try this button:")}</chameleon-typography
5000      >
5001      <chameleon-button @click=${this.proxyRedirect} variant="primary" size="large" class="user-action-container"
5002        >${(0,Dv.ej)("Open the app")}</chameleon-button
5003      >
5004      <chameleon-typography variant="body-medium" class="container-description">
5005        ${(0,Dv.ej)("Don’t have the app? ")}
5006        <chameleon-link variant="body-medium" appearance="primary" @click=${this.handleDownloadMobileAppClick}
5007          >${(0,Dv.ej)("Get it now")}</chameleon-link
5008        >
5009      </chameleon-typography>
5010      <!-- end of values to be made dynamic -->
5011    </div>`}};$0.tagName="goto-integration-redirect-proxy";let N0=$0;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&O0(t,r,o)})([(0,Dv.cn)({type:Object,attribute:"data"})],N0.prototype,"data");const R0=()=>{try{const e=(0,Dv.bp)().top;if(!e)return void(0,Dv.g)().error(`[${i0}] window.top is not available; cannot notify host of desktop app connection`);e.postMessage({type:"SHELL_NOTIFY_CONNECTED_TO_DESKTOP_APP"},"*")}catch(e){(0,Dv.g)().error(`[${i0}] Error notifying host of desktop app connection:`,e)}},P0=class extends Dv.bP{constructor(){super(...arguments),this.onConnectionStatusChanged=e=>{e.connectionStatus===Dv.bl.connected&&((0,Dv.ee)(this.onConnectionStatusChanged),R0())}}connectedCallback(){super.connectedCallback(),(0,Dv.ec)()===Dv.bl.connected?R0():((0,Dv.ed)(this.onConnectionStatusChanged),this.unsubscribeFunctions.push(()=>(0,Dv.ee)(this.onConnectionStatusChanged)))}render(){return Dv.cm}};P0.tagName="goto-connect-to-desktop-app";let D0=P0;const M0=new RegExp(`(${/https?:\/\/[^\s<>"'{}|\\^`[\]]+/.source})|(${/[a-zA-Z0-9._%+\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,}/.source})`,"g"),z0=/[.,!?;:'")\]>]+$/,F0=(e,t,r)=>{let n="",o=0;return t.forEach(t=>{n+=(0,Dv.el)(e.substring(o,t.start));const i={...t,value:(0,Dv.el)(t.value)};n+=r(i),o=t.start+t.length}),n+=(0,Dv.el)(e.substring(o)),n},U0=(e,t,r={})=>{const n=[],o=[...t].sort((e,t)=>t.length-e.length);let i=e;r.ignoreAccents&&(i=(0,Dv.ek)(e));const s=((e,t)=>e.length!==t.length?t=>((e,t)=>{let r=0,n=0;for(;r<t;)r+=(0,Dv.ek)(e[n]).length,n++;return n})(e,t):e=>e)(e,i),a=((e,t={})=>{const r=e.map(e=>((e,t)=>{let r=e;return t.phoneNumbers&&(0,Dv.dI)(e)!==Dv.em.FALSE?(e=>{const t=e.replace(/(extension:?|;?ext\\.?:?=?|x|#)|([^0-9])/gi,(e,t,r)=>t?"#":"");let r="([\\(\\#x+]{1,2}\\s?|ext\\.?:?=?\\s?|extension:?\\s?){0,2}",n="\\s*([\\(\\)\\#\\.\\-\\sx]{0,2}|;?ext\\.?:?=?|extension:?)";return t.indexOf("#")>=0&&(r="([\\(\\+]{1,2}\\s?){0,2}",n="\\s*[\\(\\)\\.\\-\\s]{0,2}"),t.replace(/(\d)|(#)/gi,(e,t,o,i)=>o?i?"\\s?([\\#x]{1,2}\\s?|;?ext\\.?:?=?\\s?|extension:?\\s?)":"([\\#x]{1,2}\\s?|ext\\.?:?=?\\s?|extension:?\\s?)":(i?n:r)+t)+"\\)?"})(e):(t.ignoreAccents&&(r=(0,Dv.ek)(r)),`(${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(r)})`)})(e,t));return new RegExp(`${r.join("|")}`,t.ignoreCase?"gi":"g")})(o,r),l=i.matchAll(a);for(const t of l){const r=t[0],i=t.findIndex((e,t)=>t>0&&e===r)-1,a=o[i],l=s(t.index??0),c=s((t.index??0)+t[0].length);n.push({value:e.substring(l,c),start:l,length:c-l,keyword:a})}return n};class B0{constructor(){this.highlights=new Map,this.subscriptions=new Map,this.countById=new Map,this.currentIndexById=new Map}subscribe(e,t){return this.subscriptions.set(e,t),t({totalMatches:this.countById.get(e)||0,currentMatch:this.currentIndexById.get(e)||0}),()=>{this.subscriptions.delete(e),this.clearMatches(e)}}updateCurrentMatch(e,t){const r=(this.countById.get(e)||1)-1;let n=t;t>r?n=0:t<0&&(n=r),this.currentIndexById.set(e,n),this.broadcastState(e)}
5011clearMatches(e){Array.from(this.highlights.get(e)||[]).forEach(e=>e.classList.remove("selected")),this.highlights.delete(e),this.countById.set(e,0),this.currentIndexById.set(e,0),this.broadcastState(e)}addMatches(e,t){t.forEach(t=>{this.highlights.has(e)||this.highlights.set(e,new Set),this.highlights.get(e).add(t)});const r=this.highlights.get(e)?.size||0;this.countById.set(e,r),this.postAddMatches(e)}postAddMatches(e){this.broadcastState(e)}broadcastState(e){const t=this.subscriptions.get(e);if(t){const r=this.currentIndexById.get(e)||0,n=this.countById.get(e)||0;this.updateStyles(e,r),t({totalMatches:n,currentMatch:r})}}updateStyles(e,t){Array.from(this.highlights.get(e)||[]).forEach((e,r)=>{r===t?(e.classList.add("selected"),e.scrollIntoView({block:"center",inline:"nearest"}),e.focus()):e.classList.remove("selected")})}}let H0=null;const j0=()=>(H0||(H0=new B0),H0);var V0=Object.defineProperty,W0=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&V0(t,r,i),i};const K0=class extends Dv.bP{constructor(){super(...arguments),this.ignoreCase=!1,this.ignoreAccents=!1,this.phoneNumbers=!1,this.linkify=!1,this.keywords=[],this.value=""}render(){return Dv.aH`
5012      <div class="highlight-container">
5013        ${(0,Dv.eo)(((e,t,r,n={})=>{const o=t.filter(e=>e.length>=1),i=o.length?U0(e,o,n):[];return n.linkify?((e,t,r)=>(e=>{const t=[];let r=0;for(const n of e.matchAll(M0)){const o=n[0],i=n.index??0,s=o.match(z0),a=s?o.slice(0,-s[0].length):o,l=s?s[0]:"";if(i>r){const n=e.substring(r,i);t.push({type:"text",value:n,start:r,length:n.length})}if(n[1]?t.push({type:"url",value:a,href:a,start:i,length:a.length}):t.push({type:"email",value:a,href:`mailto:${a}`,start:i,length:a.length}),l){const e=i+a.length;t.push({type:"text",value:l,start:e,length:l.length})}r=i+o.length}if(r<e.length){const n=e.substring(r);t.push({type:"text",value:n,start:r,length:n.length})}return t})(e).map(n=>{const o=((e,t,r,n)=>t.filter(e=>e.start<n&&e.start+e.length>r).map(t=>{const o=Math.max(t.start,r),i=Math.min(t.start+t.length,n);return{...t,start:o-r,length:i-o,value:e.substring(o,i)}}))(e,t,n.start,n.start+n.length);return((e,t)=>"text"===e.type?t:`<chameleon-link href="${(0,Dv.el)(e.href)}"${"url"===e.type?' target="_blank"':""}>${t}</chameleon-link>`)(n,F0(n.value,o,r))}).join(""))(e,i,r):F0(e,i,r)})(this.value,this.keywords,e=>`<span class="highlight">${e.value}</span>`,{ignoreAccents:this.ignoreAccents,ignoreCase:this.ignoreCase,phoneNumbers:this.phoneNumbers,linkify:this.linkify}))}
5014      </div>
5015    `}updated(){if(this.searchId){const e=this.shadowRoot?.querySelectorAll(".highlight")??[];j0().addMatches(this.searchId,Array.from(e))}}};K0.tagName=Dv.en,K0.styles=Dv.ep`
5016    .highlight {
5017      background-color: var(--goto-highlight-background-color);
5018      color: var(--goto-highlight-type-color);
5019      font-weight: bold;
5020
5021      &.selected {
5022        background-color: var(--goto-highlight-background-color-marked, var(--goto-orange-300));
5023        color: var(--goto-type-color-default);
5024      }
5025    }
5026  `;let q0=K0;W0([(0,Dv.cn)({type:Boolean})],q0.prototype,"ignoreCase"),W0([(0,Dv.cn)({type:Boolean})],q0.prototype,"ignoreAccents"),W0([(0,Dv.cn)({type:Boolean})],q0.prototype,"phoneNumbers"),W0([(0,Dv.cn)({type:Boolean})],q0.prototype,"linkify"),W0([(0,Dv.cn)({type:Array})],q0.prototype,"keywords"),W0([(0,Dv.cn)({type:String})],q0.prototype,"value"),W0([(0,Dv.cn)({type:String})],q0.prototype,"searchId");var G0=Object.defineProperty,Z0=Object.getOwnPropertyDescriptor,Y0=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?Z0(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&G0(t,r,i),i};const J0=class extends Dv.bP{constructor(){super(...arguments),this.placeholder="",this.ariaLabel="",this.clearLabel="",this.previousLabel="",this.nextLabel="",this.debounceMs=300,this.currentMatchIndex=0,this.totalMatches=0,this.internalValue="",this.highlightSubscription=e=>{this.currentMatchIndex=e.currentMatch,this.totalMatches=e.totalMatches}}set value(e){this.internalValue=e}get value(){return this.internalValue}static get styles(){return(0,Dv.ck)(":host{display:block;width:100%}:host .controls{display:flex;align-items:center;height:100%;margin-right:2px}:host .divider{width:1px;height:var(--goto-layout-01);background-color:var(--goto-border-color-default);margin-left:4px;margin-right:2px}:host .counter{color:var(--goto-type-color-secondary);white-space:nowrap;margin-right:0}:host .search-icon{color:var(--goto-icon-color-secondary)}:host .close-button{margin-left:2px;color:var(--goto-icon-color-secondary)}:host chameleon-svg{--goto-icon-color: var(--goto-icon-color-secondary)}")}connectedCallback(){super.connectedCallback(),this.internalValue=this.value,this.subscribeToHighlightManager()}subscribeToHighlightManager(){this.unsubscribeFunctions.push(j0().subscribe(this.id,this.highlightSubscription))}handleInput(){this.debouncedSearch()}debouncedSearch(){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{const e=this.textField?.value||"";this.internalValue!==e&&(this.internalValue=e,j0().clearMatches(this.id),this.searchChanged?.(this.internalValue))},this.debounceMs)}handleClear(){this.internalValue="",j0().clearMatches(this.id),this.searchChanged?.(this.internalValue)}handleNavigatePrevious(){j0().updateCurrentMatch(this.id,this.currentMatchIndex-1)}handleNavigateNext(){j0().updateCurrentMatch(this.id,this.currentMatchIndex+1)}render(){const e=this.totalMatches>0,t=this.internalValue;return Dv.aH`
5027      <chameleon-text-field
5028        class="highlight-search-input"
5029        autocomplete="off"
5030        .value=${this.internalValue}
5031        placeholder=${this.placeholder}
5032        aria-label=${this.ariaLabel}
5033        @input=${this.handleInput}
5034        fullwidth
5035        @keypress=${this.handleOnKeyPress}
5036        id="search-highlight-input"
5037      >
5038        <div slot="end" class="controls">
5039          ${t?Dv.aH`
5040                <chameleon-typography class="counter" variant="caption">
5041                  ${e?`${this.currentMatchIndex+1}/${this.totalMatches}`:"0/0"}
5042                </chameleon-typography>
5043                <div class="divider"></div>
5044              `:Dv.cm}
5045          ${this.internalValue&&e?Dv.aH`
5046                <chameleon-icon-button
5047                  class="nav-button"
5048                  @click=${this.handleNavigatePrevious}
5049                  label=${this.previousLabel}
5050                  size="small"
5051                >
5052                  <chameleon-svg>${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M18.7071 14.7071L17.2929 16.1213L12 10.8284L6.70709 16.1213L5.29288 14.7071L12 8L18.7071 14.7071Z" fill="currentColor"></path></svg>')}</chameleon-svg>
5053                </chameleon-icon-button>
5054                <chameleon-icon-button
5055                  class="nav-button"
5056                  @click=${this.handleNavigateNext}
5057                  label=${this.nextLabel}
5058                  size="small"
5059                >
5060                  <chameleon-svg>${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.29291 9.29291L6.70712 7.87869L12 13.1716L17.2929 7.87869L18.7071 9.29291L12 16L5.29291 9.29291Z" fill="currentColor"></path></svg>')}</chameleon-svg>
5061                </chameleon-icon-button>
5062              `:Dv.cm}
5063          ${this.internalValue?Dv.aH`
5064                <chameleon-icon-button
5065                  class="close-button"
5066                  @click=${this.handleClear}
5067                  label=${this.clearLabel}
5068                  size="small"
5069                >
5070                  <chameleon-svg>${(0,Dv.bR)(_b)}</chameleon-svg>
5071                </chameleon-icon-button>
5072              `:Dv.cm}
5073        </div>
5074      </chameleon-text-field>
5075      ${this.internalValue?Dv.aH`<chameleon-tooltip delay="0" position="top-center" trigger-id="search-highlight-input">
5076            ${this.internalValue}
5077          </chameleon-tooltip>`:Dv.cm}
5078    `}async handleOnKeyPress(e){"Enter"===e.code&&(e.shiftKey?this.handleNavigatePrevious():this.handleNavigateNext())}};J0.tagName="goto-highlight-search";let Q0=J0;Y0([(0,Dv.cn)({type:String})],Q0.prototype,"value",1),Y0([(0,Dv.cn)({type:String})],Q0.prototype,"placeholder",2),Y0([(0,Dv.cn)({type:String,attribute:"aria-label"})],Q0.prototype,"ariaLabel",2),Y0([(0,Dv.cn)({type:String,attribute:"clear-label"})],Q0.prototype,"clearLabel",2),Y0([(0,Dv.cn)({type:String,attribute:"previous-label"})],Q0.prototype,"previousLabel",2),Y0([(0,Dv.cn)({type:String,attribute:"next-label"})],Q0.prototype,"nextLabel",2),Y0([(0,Dv.cn)({type:Number})],Q0.prototype,"debounceMs",2),Y0([(0,Dv.cn)({attribute:!1})],Q0.prototype,"searchChanged",2),Y0([(0,Dv.ct)()],Q0.prototype,"currentMatchIndex",2),Y0([(0,Dv.ct)()],Q0.prototype,"totalMatches",2),Y0([(0,Dv.ct)()],Q0.prototype,"internalValue",2),Y0([(0,Dv.bS)("chameleon-text-field")],Q0.prototype,"textField",2);const X0=e=>`${(0,Dv.an)().gtcBffServiceBaseUrl()}/organizations/${e}`;class e1{async fetchUserSchedule(){const e=this.getUserScheduleUrl();return await(await(0,Dv.y)(e,{method:"GET"})).json()}async updateUserSchedule(e){const t=this.getUserScheduleUrl();return await(await(0,Dv.y)(t,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json()}getUserScheduleUrl(){const e=(0,Dv.eq)();if(!e?.id)throw new Error("Cannot call ScheduleService. Account id is missing");return`${X0(e.id)}/user-schedule`}}class t1{constructor(){this.isDirty=!1,this.subscriptions=[],this.scheduleService=new e1,this.persistedUserSchedule=this.convertUserScheduleToShellUserSchedule((()=>{const e=(0,Dv.Z)()?.user,t=(0,Dv.db)(e?.key??"");return{userId:t.pbxUserId??"",userKey:e?.key??"",orgId:t.pbxId??"",accountKey:t.accountKey??"",timezoneSource:FZ.USER,timezone:e?.location?.timeZone,workPeriods:[],oneTimePeriods:[],dndAutomationEnabled:!1,enabled:!1,userCanEdit:!0}})()),this.modifiedUserSchedule=(0,Dv.er)(this.persistedUserSchedule)}
5078subscribe(e){this.subscriptions.push(e),e({userSchedule:(0,Dv.er)(this.modifiedUserSchedule),state:{isDirty:this.isDirty}})}unsubscribe(e){this.subscriptions=this.subscriptions.filter(t=>t!==e)}resetUserSchedule(){this.updateModifiedUserSchedule(this.persistedUserSchedule,!1)}updateUserScheduleEnabled(e){this.modifiedUserSchedule.enabled!==e&&this.setModifiedUserSchedule("enabled",e)}updateDndAutomationEnabled(e){this.modifiedUserSchedule.dndAutomationEnabled!==e&&this.setModifiedUserSchedule("dndAutomationEnabled",e)}updateWorkPeriods(e){this.setModifiedUserSchedule("workPeriods",e)}createOrUpdateOneTimePeriod(e){const t=this.modifiedUserSchedule.oneTimePeriods.some(t=>t.id===e.id)?this.modifiedUserSchedule.oneTimePeriods.map(t=>t.id===e.id?e:t):[...this.modifiedUserSchedule.oneTimePeriods,e];this.setModifiedUserSchedule("oneTimePeriods",t)}deleteOneTimePeriod(e){const t=this.modifiedUserSchedule.oneTimePeriods.filter(t=>t.id!==e);this.setModifiedUserSchedule("oneTimePeriods",t)}async saveUserSchedule(){try{const e=await this.scheduleService.updateUserSchedule(this.convertToUserSchedule(this.modifiedUserSchedule));(0,Dv.cr)().track("GoTo > Schedule settings - Save",{action:"save successful",numberOneTimePeriods:this.modifiedUserSchedule.oneTimePeriods?.length,numberWorkPeriods:this.modifiedUserSchedule.workPeriods?.length}),this.persistedUserSchedule=this.convertUserScheduleToShellUserSchedule(e),this.updateModifiedUserSchedule(this.persistedUserSchedule,!1),(0,Dv.aW)(dY(),"true")}catch(e){throw(0,Dv.cr)().track("GoTo > Schedule settings - Save",{action:"save failed"}),(0,Dv.g)().error("Error sending user schedule",e),e}}async fetchUserSchedule(){try{const e=await this.scheduleService.fetchUserSchedule(),t=(0,Dv.aZ)(dY());0===e.workPeriods?.length&&!t&&(e.workPeriods=GZ()),this.persistedUserSchedule=this.convertUserScheduleToShellUserSchedule(e),this.updateModifiedUserSchedule(this.persistedUserSchedule,!1)}catch(e){throw(0,Dv.g)().error("Error getting user schedule",e),e}}getPersistedUserScheduleEnabled(){return this.persistedUserSchedule.enabled}getPersistedUserScheduleDndAutomationEnabled(){return this.persistedUserSchedule.dndAutomationEnabled}convertUserScheduleToShellUserSchedule(e){const t=e.oneTimePeriods??[];return{...e,oneTimePeriods:t.map(e=>({...e,id:(0,Dv.dc)()}))}}convertToUserSchedule(e){return{...e,oneTimePeriods:e.oneTimePeriods?.map(({id:e,...t})=>t)}}updateModifiedUserSchedule(e,t){this.modifiedUserSchedule=(0,Dv.er)(e),this.isDirty=t,this.subscriptions.forEach(r=>r({userSchedule:(0,Dv.er)(e),state:{isDirty:t}}))}setModifiedUserSchedule(e,t){switch(e){case"enabled":this.modifiedUserSchedule.enabled=t;break;case"dndAutomationEnabled":this.modifiedUserSchedule.dndAutomationEnabled=t;break;case"workPeriods":this.modifiedUserSchedule.workPeriods=t;break;case"oneTimePeriods":this.modifiedUserSchedule.oneTimePeriods=t}this.updateModifiedUserSchedule(this.modifiedUserSchedule,!0)}}let r1;const n1=()=>(r1||(r1=new t1),r1);var o1=Object.defineProperty,i1=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&o1(t,r,i),i};const s1=class extends Dv.bP{constructor(){super(...arguments),this.isDirty=!1,this.isSaving=!1,this.isLoading=!0,this.hasError=!1,this.displayMultipleAccountsAlert=!1,this.handleUserScheduleChange=e=>{this.modifiedUserSchedule=e.userSchedule,this.isDirty=e.state.isDirty,this.updateIsDirtyBadge()}}static get styles(){return(0,Dv.ck)(".schedule-settings-page{height:100%;display:flex;flex-direction:column;justify-content:space-between}.error-container{min-height:100%}.settings-header{border-bottom:1px solid var(--goto-border-color-default);margin-top:var(--goto-spacing-07);padding-left:var(--goto-spacing-07);padding-bottom:var(--goto-spacing-04)}.schedule-settings-container-content{padding:var(--goto-spacing-02) var(--goto-spacing-07);max-width:720px;flex-grow:1;box-sizing:border-box}.schedule-settings-container-error{padding:var(--goto-spacing-02) var(--goto-spacing-07);box-sizing:border-box;height:calc(100% - 150px)}.footer-visible{background-color:var(--goto-background-color-default);bottom:0;display:flex;justify-content:flex-end;padding:var(--goto-spacing-06);width:100%;box-sizing:border-box;border-top:1px solid var(--goto-border-color-default);gap:var(--goto-spacing-02);position:sticky}.work-section,.custom-section,.time-zone-section,.footer-visible{padding-top:var(--goto-spacing-06)}.settings-header,.small-header{margin-bottom:var(--goto-spacing-03)}.footer-hidden{display:none}.time-zone-set{display:flex;justify-content:space-between;gap:var(--goto-spacing-02)}.time-zone-set ::part(control){height:var(--goto-layout-02)}.error-empty-state{height:100%;display:flex;justify-content:center;align-items:center}.enable-section-loading{box-sizing:border-box;gap:var(--goto-spacing-02);flex-direction:column;display:inline-flex;width:360px;height:56px}chameleon-button-link{margin-left:var(--goto-spacing-04)}.multiple-accounts-alert{margin-top:var(--goto-spacing-06)}")}async connectedCallback(){super.connectedCallback(),n1().subscribe(this.handleUserScheduleChange),await this.getUserSchedule(),this.hasError||(this.displayMultipleAccountsAlert=(0,Dv.es)()),(0,Dv.cr)().track("GoTo >
5078 Schedule settings",{action:"page visited"})}disconnectedCallback(){super.disconnectedCallback(),n1().unsubscribe(this.handleUserScheduleChange)}async getUserSchedule(){this.isDirty?this.isLoading=!1:await this.fetchUserSchedule()}async fetchUserSchedule(){try{await n1().fetchUserSchedule(),this.hasError=!1}catch{this.hasError=!0}this.isLoading=!1}updateIsDirtyBadge(){(0,Dv.Z)().badgeNumbers.setBadgeNumber({id:DZ,settingsName:wY,value:this.isDirty?1:0})}getTimeZone(){return this.modifiedUserSchedule.timezone}getEnabled(){return this.modifiedUserSchedule.enabled}getFooterClass(){return this.isDirty?"schedule-footer footer-visible":"schedule-footer footer-hidden"}getTimeZoneColor(){return this.getEnabled()?"type-color-default":"type-color-disabled"}handleScheduleStatusChange(e){const t=e.currentTarget.value===BZ.WORK_SCHEDULE;n1().updateUserScheduleEnabled(t),(0,Dv.cr)().track("GoTo > Schedule settings - Status radio buttons",{action:"click",scheduleEnabledStatus:t})}showSuccessfulSaveNotification(){(0,Dv.Z)().display.snackbar({title:(0,Dv.cB)("Changes saved successfully"),id:"schedule-settings-successful-save-notification"})}showFailedSaveNotification(){(0,Dv.Z)().display.snackbar({title:(0,Dv.cB)("Your changes were not saved"),message:(0,Dv.cB)("There was a problem saving your changes. Try again later."),id:"schedule-settings-failed-save-notification"})}handleAlertCloseClicked(){this.displayMultipleAccountsAlert=!1}async handleScheduleSave(){this.isSaving=!0;try{await n1().saveUserSchedule(),this.showSuccessfulSaveNotification()}catch{this.showFailedSaveNotification()}finally{this.isSaving=!1}}handleScheduleCancel(){(0,Dv.cr)().track("GoTo > Schedule settings - Cancel button",{action:"click",button:"Cancel"}),n1().resetUserSchedule()}getScheduleSettingsContainerClass(){return"schedule-settings-container-"+(this.hasError?"error":"content")}render(){return Dv.aH`
5079      <form class="schedule-settings-page">
5080        <div class=${"schedule-settings-scrollable-content"+(this.hasError?" error-container":"")}>
5081          <chameleon-typography class="settings-header" tag="h1" variant="heading-large">
5082            ${(0,Dv.bQ)("Schedule")}
5083          </chameleon-typography>
5084          <div class=${this.getScheduleSettingsContainerClass()}>
5085            <chameleon-typography variant="body-medium" id="set-description"
5086              >${(0,Dv.bQ)("Choose when you’d like to receive calls and notifications. To allow your schedule to change your availability, your profile status must be set to auto-update.")}</chameleon-typography
5087            >
5088            ${this.renderMultipleAccountsAlert()} ${this.renderSchedulePage()}
5089          </div>
5090        </div>
5091        ${this.renderFooter()}
5092      </form>
5093    `}renderMultipleAccountsAlert(){return this.displayMultipleAccountsAlert?Dv.aH`<chameleon-alert class="multiple-accounts-alert" closable @close=${this.handleAlertCloseClicked}>
5094          ${(0,Dv.bQ)("Your do not disturb hours apply to all your accounts. To avoid schedule conflicts, we recommend maintaining 1 work schedule for all accounts.")}
5095        </chameleon-alert>`:Dv.cm}renderSchedulePage(){return this.hasError?this.renderSchedulePageError():this.renderSchedulePageContent()}renderSchedulePageError(){return Dv.aH`<div class="error-empty-state">
5096      <chameleon-empty-state>
5097        <chameleon-svg slot="icon" class="error-pictogram">${Dv.dG}</chameleon-svg>
5098        <p slot="title">${(0,Dv.bQ)("Something went wrong")}</p>
5099        ${(0,Dv.bQ)("Go ahead and give it another try.")}
5100        <div slot="actions">
5101          <chameleon-button @click=${Dv.cJ} variant="secondary">${(0,Dv.bQ)("Reload")}</chameleon-button>
5102        </div></chameleon-empty-state
5103      >
5104    </div> `}renderSchedulePageContent(){return Dv.aH` <div class="work-section">
5105        ${this.renderEnableSection()} <goto-schedule-work-hours ?isLoading=${this.isLoading}></goto-schedule-work-hours>
5106      </div>
5107      <div class="custom-section">
5108        <goto-schedule-custom-hours ?isLoading=${this.isLoading}></goto-schedule-custom-hours>
5109      </div>
5110      ${this.renderTimeZoneSection()}`}renderEnableSection(){return this.isLoading?Dv.aH`<div class="enable-section-loading">
5111          <chameleon-skeleton variant="rectangle" size="xsmall"></chameleon-skeleton>
5112          <chameleon-skeleton variant="rectangle" size="xsmall"></chameleon-skeleton>
5113        </div> `:Dv.aH`
5114          <chameleon-radio-group
5115            label-id="set-description"
5116            .value=${this.getEnabled()?BZ.WORK_SCHEDULE:BZ.NO_HOURS_SET}
5117            @change=${this.handleScheduleStatusChange}
5118          >
5119            <chameleon-radio-button value=${BZ.NO_HOURS_SET}>${(0,Dv.bQ)("No hours set")}</chameleon-radio-button>
5119
5120            <chameleon-radio-button value=${BZ.WORK_SCHEDULE}>
5121              ${(0,Dv.bQ)("Work schedule")}</chameleon-radio-button
5122            >
5123          </chameleon-radio-group>
5124        `}renderTimeZoneSection(){return Dv.aH`
5125      <div class="time-zone-section">
5126        <div class="time-zone-section-header">
5127          <chameleon-typography data-testid="timezone-header" class="small-header" variant="body-medium-strong"
5128            >${(0,Dv.bQ)("Time zone")}</chameleon-typography
5129          >
5130          <div class="time-zone-set">
5131            ${this.renderTimeZone()}
5132            <chameleon-button-link
5133              data-testid="change-timezone-link"
5134              href="${(0,Dv.an)().profileUrl}"
5135              target="blank"
5136              variant="secondary"
5137              size="medium"
5138              ?disabled=${!this.getEnabled()}
5139              >${(0,Dv.bQ)("Change my time zone")}</chameleon-button-link
5140            >
5141          </div>
5142        </div>
5143      </div>
5144    `}renderTimeZone(){return this.isLoading?Dv.aH`<chameleon-skeleton variant="rectangle" size="xsmall"></chameleon-skeleton>`:Dv.aH` <chameleon-typography
5145          data-testid="current-timezone"
5146          variant="body-medium"
5147          .color=${this.getTimeZoneColor()}
5148          >${(0,Dv.bQ)("Profile time zone: ")}${this.getTimeZone()}
5149        </chameleon-typography>`}renderFooter(){return Dv.aH`
5150      <div class=${this.getFooterClass()}>
5151        <chameleon-button
5152          data-testid="cancel-schedule"
5153          size="medium"
5154          variant="tertiary"
5155          @click=${this.handleScheduleCancel}
5156          >${(0,Dv.bQ)("Cancel")}</chameleon-button
5157        >
5158        <chameleon-button
5159          data-testid="save-schedule"
5160          size="medium"
5161          @click=${this.handleScheduleSave}
5162          is-loading=${this.isSaving}
5163          >${(0,Dv.bQ)("Save")}</chameleon-button
5164        >
5165      </div>
5166    `}};s1.tagName="goto-schedule-settings";let a1=s1;i1([(0,Dv.ct)()],a1.prototype,"isDirty"),i1([(0,Dv.ct)()],a1.prototype,"isSaving"),i1([(0,Dv.ct)()],a1.prototype,"isLoading"),i1([(0,Dv.ct)()],a1.prototype,"hasError"),i1([(0,Dv.ct)()],a1.prototype,"modifiedUserSchedule"),i1([(0,Dv.ct)()],a1.prototype,"displayMultipleAccountsAlert");var l1=Object.defineProperty,c1=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&l1(t,r,i),i};const d1="modified-work-periods",u1="close-work-hours-modal",h1=class extends Dv.bP{constructor(){super(...arguments),this.workPeriods=[],this.errorRowIndices=[],this.maxWorkPeriodsPerDayExceeded=!1,this.handleUserScheduleChange=e=>{this.workPeriods=(0,Dv.er)(e.userSchedule.workPeriods),this.addPlaceholderWorkPeriodIfEmpty()}}static get styles(){return(0,Dv.ck)(".modal-row{display:flex;align-items:flex-end;margin-bottom:var(--goto-spacing-03)}.modal-header{width:100%}.modal-header-title{padding:var(--goto-spacing-05) 0}goto-schedule-work-hours-modal-row{min-width:300px;width:calc(100% - 32px)}chameleon-dialog::part(content){max-height:75vh}chameleon-dialog::part(heading){min-height:fit-content}.modal-scrollable-content{overflow-y:auto}.modal-footer{display:flex;justify-content:space-between}.reset-button{color:var(--goto-)}.reset-button::part(start){--goto-icon-color: var(--goto-type-color-danger)}.reset-button::part(content){color:var(--goto-type-color-danger)}chameleon-alert{width:100%;margin-bottom:var(--goto-spacing-07)}")}connectedCallback(){super.connectedCallback(),n1().subscribe(this.handleUserScheduleChange)}disconnectedCallback(){super.disconnectedCallback(),n1().unsubscribe(this.handleUserScheduleChange)}render(){return Dv.aH`
5167      <chameleon-dialog open size="large">
5168        <div class="modal-header" slot="title">
5169          <chameleon-typography class="modal-header-title" variant="heading-small"
5170            >${(0,Dv.bQ)("Edit your work schedule")}</chameleon-typography
5171          >
5172          ${this.renderAlert()}
5173        </div>
5174        <div class="modal-scrollable-content">${this.renderWorkPeriods()}${this.renderAddRow()}</div>
5175        ${this.renderActions()}
5176      </chameleon-dialog>
5177    `}addPlaceholderWorkPeriodIfEmpty(){0===this.workPeriods.length&&this.addWorkPeriod()}updateWorkPeriod(e,t){this.workPeriods[t]=e,this.updateWorkPeriodErrors(),this.verifyMaxPeriodsPerDay()}deleteWorkPeriod(e){const t=[...this.workPeriods];t.splice(e,1),this.workPeriods=(0,Dv.er)(t),this.addPlaceholderWorkPeriodIfEmpty(),this.updateWorkPeriodErrors(),this.verifyMaxPeriodsPerDay()}addWorkPeriod(){this.workPeriods=[...this.workPeriods,{dayOfWeek:void 0,startTime:HZ,endTime:jZ}]}workPeriodHasError(e){return this.workPeriods.some((t,r)=>e!==r&&this.workPeriodHasOverlap(this.workPeriods[e],t))}updateWorkPeriodErrors(){const e=new Set;this.workPeriods.forEach((t,r)=>{this.workPeriodHasError(r)?e.add(r):e.delete(r)}),this.errorRowIndices=Array.from(e)}workPeriodHasOverlap(e,t){const r=YZ(t.startTime??""),n=YZ(t.endTime??""),o=YZ(e.startTime??""),i=YZ(e.endTime??"");return!!(t.dayOfWeek===e.dayOfWeek&&r&&n&&o&&i)&&nY(r,n,o,i)}verifyMaxPeriodsPerDay(){this.maxWorkPeriodsPerDayExceeded=!1,UZ.forEac
5177h(e=>{this.workPeriods.reduce((t,r)=>t+(r.dayOfWeek===e?1:0),0)>20&&(this.maxWorkPeriodsPerDayExceeded=!0)})}handleCancelClick(){this.dispatchEvent(new CustomEvent(u1))}handleConfirmClick(){const e=this.workPeriods.filter(e=>rY(e));this.dispatchEvent(new CustomEvent(d1,{detail:{modifiedWorkPeriods:e}}))}resetWorkHoursToDefault(){this.workPeriods=GZ(),this.errorRowIndices=[]}handleResetClick(){const e=(0,Dv.Z)().display.modal({id:"update-modal",title:(0,Dv.cB)("Reset to default?"),closable:!1,content:(0,Dv.cB)("Your work schedule will be set to Monday through Friday, 9 AM to 5 PM."),actions:[{label:(0,Dv.cB)("Reset"),handler:()=>{this.resetWorkHoursToDefault(),e.close()},size:"medium"},{label:(0,Dv.cB)("Cancel"),handler:()=>{e.close()},variant:"tertiary",size:"medium"}]}),t=document.querySelector("goto-modal-notification");t&&(t.style.zIndex="1000")}renderWorkPeriodRow(e,t){return Dv.aH`
5178      <div class="modal-row">
5179        <goto-schedule-work-hours-modal-row
5180          ?error=${this.errorRowIndices.includes(t)}
5181          .currentWorkPeriod=${e}
5182          .change=${e=>this.updateWorkPeriod(e,t)}
5183          .rowIndex=${t}
5184        ></goto-schedule-work-hours-modal-row>
5185        ${this.renderWorkPeriodDeleteButton(t)}
5186      </div>
5187    `}renderWorkPeriodDeleteButton(e){return 1===this.workPeriods.length&&this.noWorkHoursSet()?Dv.cm:Dv.aH`<chameleon-icon-button
5188            id="delete-work-hours-row"
5189            @click=${()=>this.deleteWorkPeriod(e)}
5190            label=${(0,Dv.bQ)("Delete row")}
5191            ><chameleon-svg>${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.1412 12L16 9.14116L14.8588 8L12 10.8588L9.14116 8L8 9.14116L10.8588 12L8 14.8588L9.14116 16L12 13.1412L14.8588 16L16 14.8588L13.1412 12Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" fill="currentColor"></path></svg>')}</chameleon-svg></chameleon-icon-button
5192          ><chameleon-tooltip position="bottom-center" trigger-id="delete-work-hours-row"
5193            >${(0,Dv.bQ)("Delete")}
5194          </chameleon-tooltip>`}renderWorkPeriods(){return Nb(this.workPeriods,e=>e,(e,t)=>this.renderWorkPeriodRow(e,t))}renderAddRow(){return Dv.aH`
5195      <chameleon-button class="add-row-button" variant="tertiary" @click=${()=>this.addWorkPeriod()}>
5196        <chameleon-svg slot="start">${(0,Dv.bR)(vb)}</chameleon-svg>
5197        ${(0,Dv.bQ)("Add time")}
5198      </chameleon-button>
5199    `}renderActions(){return Dv.aH` <div slot="actions" class="modal-footer">
5200      <div>
5201        <chameleon-button class="cancel-button" variant="tertiary" @click=${this.handleCancelClick}
5202          >${(0,Dv.bQ)("Cancel")}</chameleon-button
5203        >
5204        <chameleon-button
5205          ?disabled=${this.errorRowIndices.length>0||this.maxWorkPeriodsPerDayExceeded}
5206          class="confirm-button"
5207          @click=${this.handleConfirmClick}
5208          >${(0,Dv.bQ)("Confirm")}</chameleon-button
5209        >
5210      </div>
5211      <chameleon-button class="reset-button" variant="tertiary" @click=${this.handleResetClick}
5212        ><chameleon-svg slot="start">${Tb}</chameleon-svg>${(0,Dv.bQ)("Reset to default")}</chameleon-button
5213      >
5214    </div>`}noWorkHoursSet(){return this.workPeriods.every(e=>!rY(e))}renderAlert(){return this.noWorkHoursSet()?Dv.aH`<chameleon-alert> ${(0,Dv.bQ)("You have no weekly work hours.")} </chameleon-alert>`:this.errorRowIndices.length>0?Dv.aH` <chameleon-alert variant="danger" class="overlap-alert"
5215        ><chameleon-svg slot="icon">${bb}</chameleon-svg>${(0,Dv.bQ)("You can’t set overlapping hours as part of your schedule.")}</chameleon-alert
5216      >`:this.maxWorkPeriodsPerDayExceeded?Dv.aH` <chameleon-alert variant="danger" class="maximum-rows-alert"
5217        ><chameleon-svg slot="icon">${bb}</chameleon-svg>${(0,Dv.bQ)("You can’t have more than 20 time ranges in a single day.")}</chameleon-alert
5218      >`:Dv.cm}};h1.tagName="goto-schedule-work-hours-modal";let p1=h1;c1([(0,Dv.ct)()],p1.prototype,"workPeriods"),c1([(0,Dv.ct)()],p1.prototype,"errorRowIndices"),c1([(0,Dv.ct)()],p1.prototype,"maxWorkPeriodsPerDayExceeded");var g1=Object.defineProperty,f1=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&g1(t,r,i),i};const m1=(0,Dv.cu)("scheduleWorkHours.times.separator"),v1=class extends Dv.bP{constructor(){super(...arguments),this.isLoading=!1,this.workPeriods=[],this.isScheduleEnabled=!1,this.isDNDAutomationEnabled=!1,this.handleUserScheduleChange=e=>{this.workPeriods=e.userSchedule.workPeriods,this.isScheduleEnabled=e.userSchedule.enabled,this.isDNDAutomationEnabled=e.userSchedule.dndAutomationEnabled},this.handleModifiedWorkPeriods=e=>{n1().updateWorkPeriods(e.detail.modifiedWorkPeriods),this.closeWorkHoursModal()},this.handleCloseWorkHoursModal=()=>{this.closeWorkHoursModal()}}static get styles(){return(0,Dv.ck)(".work-hours-header{margin-top:var(--goto-spacing-06);margin-bottom:var(--goto-spacing-03)}.work-hours-body{padding:var(--goto-spacing-04);border:solid 1px var(--goto-border-color-default);border-radius:var(--goto-radius-small)}.work-hours-schedule{display:flex;justify-content:space-between;border-bottom:1px solid var(--goto-border-color-default);padding-bottom:var(--goto-spacing-04)}.work-hours-schedule-list-item{display:flex}.work-hours-schedule-list-item-day{min-width:120px}.work-hours-schedule-list-item-time{display:flex;flex-flow:row wrap}.work-hours-schedule-list-item-time-separator{margin-right:var(--goto-spacing-01)}.work-hours-schedule-edit{height:var(--goto-spacing-06);margin-left:var(--goto-spacing-02)}.dnd-section{margin-top:var(--goto-spacing-04)}.hidden{display:none}.align-item-center{align-items:center}.work-hours-schedule-loading,.dnd-loading{width:360px}")}connectedCallback(){super.connectedCallback(),n1().subscribe(this.handleUserScheduleChange)}disconnectedCallback(){super.disconnectedCallback(),n1().unsubscribe(this.handleUserScheduleChange)}render(){return Dv.aH`
5219      <div class="work-hours-header">
5220        <chameleon-typography class="small-header" variant="heading-small" tag="h3"
5221          >${(0,Dv.bQ)("Work hours")}</chameleon-typography
5222        >
5223        <chameleon-typography variant="body-small" color="type-color-secondary" id="set-work-hours-label"
5224          >${(0,Dv.bQ)("Set your regular availability for the week.")}</chameleon-typography
5225        >
5226      </div>
5227      <div class="work-hours-body">
5228        <div class="work-hours-schedule ${this.workPeriods.length||this.isLoading?"":"align-item-center"}">
5229          ${this.renderWorkHoursSection()} ${this.renderEditButton()}
5230        </div>
5231        <div class="work-hours-options">${this.renderDNDSection()}</div>
5232      </div>
5233    `}getDefaultTypographyColor(e){return e?"type-color-default":"type-color-disabled"}getSecondaryTypographyColor(e){return e?"type-color-secondary":"type-color-disabled"}renderWorkHoursScheduleList(){return Dv.aH`<div class="work-hours-schedule-list">
5234      ${Nb(UZ,e=>e,e=>{const t=this.workPeriods.filter(t=>t.dayOfWeek===e);return this.renderWorkHoursScheduleListItem(t,e)})}
5235    </div>`}renderWorkHoursScheduleListItem(e,t){return Dv.aH`
5236      <div class="work-hours-schedule-list-item ${e.length?"":"hidden"}">
5237        <chameleon-typography
5238          class="work-hours-schedule-list-item-day"
5239          color=${this.getDefaultTypographyColor(this.isScheduleEnabled)}
5240          tag="span"
5241        >
5242          ${(0,Dv.bQ)(qZ[t])}
5243        </chameleon-typography>
5244        ${this.renderWorkHoursScheduleListItemTime(e)}
5245      </div>
5246    `}renderWorkHoursScheduleListItemTime(e){return Dv.aH` <div class="work-hours-schedule-list-item-time">
5247      ${Nb(e,e=>`${e.startTime}-${e.endTime}`,(t,r)=>Dv.aH`
5248          <chameleon-typography
5249            class="work-hours-schedule-list-item-time-value"
5250            color=${this.getDefaultTypographyColor(this.isScheduleEnabled)}
5251            >${QZ(((e,t)=>{const r=ZZ(e),n=ZZ(t);if(r&&n){const[e,t,o]=r,[i,s,a]=n;return(0,Dv.d7)((new Date).setHours(e,t,o),(new Date).setHours(i,s,a),WZ)}return(0,Dv.d8)((new Date).setHours(0,0,0,0),WZ)})(t.startTime,t.endTime))}</chameleon-typography
5252          >
5253          ${e.length-1==r?Dv.cm:this.renderWorkHoursScheduleListItemTimeSeparator()}
5254        `)}
5255    </div>`}renderWorkHoursScheduleListItemTimeSeparator(){return Dv.aH`<div class="work-hours-schedule-list-item-time-separator">
5256      <chameleon-typography color=${this.getDefaultTypographyColor(this.isScheduleEnabled)} tag="span"
5257        >${(0,Dv.bQ)(m1)}</chameleon-typography
5258      >
5259    </div>`}renderWorkHoursNoSchedule(){return Dv.aH`<chameleon-alert> ${(0,Dv.bQ)("You have no weekly work hours.")} </chameleon-alert>`}renderEditButton(){return Dv.aH`<chameleon-icon-button
5260        id="edit-work-hours"
5261        size="small"
5262        class="work-hours-schedule-edit"
5263        variant="secondary"
5264        ?disabled=${!this.isScheduleEnabled}
5265        label-id="set-work-hours-label"
5266        @click=${()=>{$j().open(this.createWorkHoursModal())}}
5267        ><chameleon-svg>${Cb}</chameleon-svg></chameleon-icon-button
5268      ><chameleon-tooltip position="bottom-center" trigger-id="edit-work-hours">${(0,Dv.bQ)("Edit")} </chameleon-tooltip>`}handleDNDStatusChange(e){const t=e.currentTarget.checked;n1().updateDndAutomationEnabled(t)}getDNDIsChecked(){return!n1().getPersistedUserScheduleEnabled()&&!(0,Dv.aZ)(dY())||!!this.workPeriods.length&&this.isDNDAutomationEnabled}renderDNDSection(){const e=!!this.workPeriods.length&&this.isScheduleEnabled,t=this.getDNDIsChecked();return Dv.aH`
5269      <div class="dnd-section">
5270        ${this.isLoading?Dv.aH` <chameleon-skeleton variant="rectangle" size="medium" class="dnd-loading"></chameleon-skeleton>`:Dv.aH` <chameleon-checkbox
5271              ?disabled=${!e}
5272              .checked=${t}
5273              @change=${this.handleDNDStatusChange}
5274            >
5275              <chameleon-typography color=${this.getDefaultTypographyColor(this.isScheduleEnabled)} tag="span">
5276                ${(0,Dv.bQ)("Do not disturb after hours")}
5277              </chameleon-typography>
5278              <chameleon-typography
5279                color=${this.getSecondaryTypographyColor(this.isScheduleEnabled)}
5280                variant="caption-medium"
5281                >${(0,Dv.bQ)("Automatically turn off notifications outside this schedule.")}
5282              </chameleon-typography>
5283            </chameleon-checkbox>`}
5284      </div>
5285    `}createWorkHoursModal(){return this.workHoursModal=(0,Dv.bL)().createElement(p1.tagName),this.workHoursModal.addEventListener(d1,this.handleModifiedWorkPeriods),this.workHoursModal.addEventListener(u1,this.handleCloseWorkHoursModal),this.workHoursModal}closeWorkHoursModal(){this.workHoursModal?.removeEventListener(d1,this.handleModifiedWorkPeriods),this.workHoursModal?.removeEventListener(u1,this.handleCloseWorkHoursModal),this.workHoursModal=void 0,$j().close()}renderWorkHoursSection(){return this.isLoading?Dv.aH`<div class="work-hours-schedule-loading">
5286          ${Nb(Array(5),()=>Dv.aH` <chameleon-skeleton variant="rectangle" size="xsmall"></chameleon-skeleton> `)}
5287        </div> `:Dv.aH` ${this.renderWorkHoursScheduleSection()}`}renderWorkHoursScheduleSection(){return this.workPeriods.length?this.renderWorkHoursScheduleList():this.renderWorkHoursNoSchedule()}};v1.tagName="goto-schedule-work-hours";let b1=v1;f1([(0,Dv.cn)({type:Boolean})],b1.prototype,"isLoading"),f1([(0,Dv.ct)()],b1.prototype,"workPeriods"),f1([(0,Dv.ct)()],b1.prototype,"isScheduleEnabled"),f1([(0,Dv.ct)()],b1.prototype,"isDNDAutomationEnabled");var y1=Object.defineProperty,w1=Object.getOwnPropertyDescriptor,x1=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?w1(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&y1(t,r,i),i};const _1="edit-or-add-onetimeperiod",k1="close-custom-hours-modal",C1=class extends Dv.bP{constructor(){super(...arguments),this.shellOneTimePeriod=(()=>{const e=(0,Dv.da)(),t=(()=>{const e=new Date,t=e.getMinutes(),r=15*(Math.floor(t/15)+1),n=new Date(e);return n.setMinutes(r),n.setSeconds(0),n.setMilliseconds(0),n})(),r=new Date(t);return r.setMinutes(r.getMinutes()+15),{id:(0,Dv.dc)(),name:"",startDay:sY(t,e,"date"),endDay:sY(r,e,"date"),startTime:sY(t,e,"time"),endTime:sY(r,e,"time"),dndEnabled:!1,allDay:!1}})(),this.endTimeOptions=oY(),this.isFormValid=!1,this.hasOverlap=!1,this.errors={nameMissing:!1,nameWithUnsupportedCharacters:!1,startTime:!1,endTime:!1,startDay:!1,endDay:!1,dateRange:!1,dateRangeLength:!1},this.startTimeOptions=tY(15),this.originalShellOneTimePeriod=void 0,this.shellOneTimePeriods=[],this.handleUserScheduleChange=e=>{this.shellOneTimePeriods=e.userSchedule.oneTimePeriods.map(uY)}}set oneTimePeriod(e){this.originalShellOneTimePeriod=uY(e),this.shellOneTimePeriod=uY(e)}static get styles(){return(0,Dv.ck)("chameleon-text-field{max-width:320px}.name-input-section{margin-bottom:var(--goto-spacing-06)}.date-time-container{align-items:end;display:flex;gap:var(--goto-spacing-06)}.start-end-container{margin-right:var(--goto-spacing-07)}.all-day-container{margin-top:var(--goto-spacing-07)}.start-section{margin-bottom:var(--goto-spacing-02)}.error-state{align-items:center}chameleon-date-picker{width:178px}chameleon-date-range-picker{width:268px}chameleon-select{width:134px}.date-time-all-day-container{display:flex;flex-wrap:wrap}.dnd-section{margin-top:var(--goto-spacing-06)}.dnd-description{padding-left:28px}.hidden{display:none}chameleon-alert{margin-bottom:var(--goto-spacing-04)}")}connectedCallback(){super.connectedCallback(),this.subscribeToScheduleChanges()}firstUpdated(e){super.firstUpdated(e),this.shellOneTimePeriod.startTime&&(this.endTimeOptions=iY(this.shellOneTimePeriod.startTime,this.endTimeOptions))}updated(e){super.updated(e),e.has("shellOneTimePeriod")&&(this.validateForm(),this.adjustAlignment())}subscribeToScheduleChanges(){n1().subscribe(this.handleUserScheduleChange),this.unsubscribeFunctions.push(()=>n1().unsubscribe(this.handleUserScheduleChange))}updateModifiedOneTimePeriodData(e,t){this.shellOneTimePeriod={...this.shellOneTimePeriod,[e]:t}}updateError(e,t){this.errors={...this.errors,[e]:t},this.adjustAlignment()}adjustAlignment(){this.errors.startDay||this.errors.startTime?this.startSection?.classList.add("error-state"):this.startSection?.classList.remove("error-state"),this.errors.endDay||this.errors.endTime?this.endSection?.classList.add("error-state"):this.endSection?.classList.remove("error-state")}adjustEndTime(){this.shellOneTimePeriod.startDay===this.shellOneTimePeriod.endDay?(this.endTimeOptions=iY(this.shellOneTimePeriod.startTime,this.endTimeOptions),this.updateModifiedOneTimePeriodData("endTime",((e,t,r)=>{const n=r.findIndex(({value:t})=>t===e),o=r.findIndex(({value:e})=>e===t);return-1!==n&&-1!==o&&n>=o?r[n+1].value:t})(this.shellOneTimePeriod.startTime,this.shellOneTimePeriod.endTime,this.endTimeOptions))):this.endTimeOptions=oY()}adjustEndDate(){this.shellOneTimePeriod.startDay>this.shellOneTimePeriod.endDay&&this.updateModifiedOneTimePeriodData("endDay",this.shellOneTimePeriod.startDay)}handleNameInputUpdate(e){const t=e.currentTarget.value;this.updateModifiedOneTimePeriodData("name",t),this.updateError("nameMissing",!t),this.updateError("nameWithUnsupportedCharacters",gY(t))}handleStartDateChange(e){this.updateModifiedOneTimePeriodData("startDay",e.currentTarget.value),this.updateError("startDay",!e.currentTarget.value),this.adjustEndDate(),this.adjustEndTime()}handleEndDateChange(e){this.updateModifiedOneTimePeriodData("endDay",e.currentTarget.value),this.updateError("endDay",!e.currentTarget.value),this.adjustEndTime()}handleDateRangeChange(e){this.updateModifiedOneTimePeriodData("startDay",e.detail.start),this.updateModifiedOneTimePeriodData("endDay",e.detail.end),this.updateError("dateRange",!e.detail.start||!e.detail.end),this.updateError("dateRangeLength",!((e,t)=>{const r=new Date(e),n=new Date(t),o=new Date(r);return o.setDate(o.getDate()+366),n<=o})(e.detail.start,e.detail.end))}handleStartTimeChange(e){this.updateModifiedOneTimePeriodData("startTime",e.currentTarget.value),this.updateError("startTime",!e.currentTarget.value),this.adjustEndTime()}handleEndTimeChange(e){this.updateModifiedOneTimePeriodData("endTime",e.currentTarget.value),this.updateError("endTime",!e.currentTarget.value),this.adjustEndTime()}handleDNDCheckboxChange(e){this.updateModifiedOneTimePeriodData("dndEnabled",e.target.checked)}handleCancelClick(){this.dispatchEvent(new CustomEvent(k1))}handleAlldayCheckboxChange(e){e.target.checked&&(this.previousStartTime=this.shellOneTimePeriod.startTime,this.previousEndTime=this.shellOneTimePeriod.endTime),this.shellOneTimePeriod=e.target.checked?{...this.shellOneTimePeriod,allDay:!0,startTime:XZ,endTime:eY}:{...this.shellOneTimePeriod,allDay:!1,startTime:this.previousStartTime??XZ,endTime:this.previousEndTime??eY}}validateForm(){const e=(e=>{if(!e.name||gY(e.name))return!1;const t=!!e.startDay&&!!e.startTime,r=!!e.endDay&&!!e.endTime;return!(!t||!r)&&((e,t)=>e>t)(new Date(`${e.endDay}T${e.endTime}`),new Date(`${e.startDay}T${e.startTime}`))})(this.shellOneTimePeriod);if(this.hasOverlap=((e,t)=>{if(!(e.startDay&&e.startTime&&e.endDay&&e.endTime))return!1;const r=pY(e.startDay,e.startTime),n=pY(e.endDay,e.endTime);return t.some(t=>
5287{if(e.id!==t.id){const e=pY(t.startDay,t.startTime),o=pY(t.endDay,t.endTime);return nY(e.getTime(),o.getTime(),r.getTime(),n.getTime())}})})(this.shellOneTimePeriod,this.shellOneTimePeriods),this.originalShellOneTimePeriod){const t=!(0,Dv.et)(this.shellOneTimePeriod,this.originalShellOneTimePeriod);this.isFormValid=e&&t&&!this.hasOverlap}else this.isFormValid=e&&!this.hasOverlap}handleConfirmClick(){this.dispatchEvent(new CustomEvent(_1,{detail:{oneTimePeriod:hY(this.shellOneTimePeriod)}}))}getDatePickerHelperText(e){return"start"===e?this.errors.startDay?(0,Dv.bQ)("Enter a start date"):"":"end"===e?this.errors.endDay?(0,Dv.bQ)("Enter an end date"):"":void 0}renderSelectOption(e,t,r){return Dv.aH`<chameleon-option class=${r?"hidden":""} value=${e}>${t}</chameleon-option>`}getNameInputHelperText(){return this.errors.nameMissing?(0,Dv.bQ)("Enter a name for your custom hours"):this.errors.nameWithUnsupportedCharacters?(0,Dv.bQ)("The following characters aren't supported: {{unsupportedCharacters}}",()=>({unsupportedCharacters:cY.join(" ")})):""}renderCustomHoursNameInput(){return Dv.aH`
5288      <div class="name-input-section">
5289        <chameleon-text-field
5290          placeholder=${(0,Dv.bQ)("Enter a name")}
5291          fullwidth
5292          value=${this.shellOneTimePeriod.name}
5293          @keyup=${this.handleNameInputUpdate}
5294          @change=${this.handleNameInputUpdate}
5295          ?error=${this.errors.nameMissing||this.errors.nameWithUnsupportedCharacters}
5296          autocomplete="off"
5297        >
5298          ${(0,Dv.bQ)("Custom hours name")}
5299          <span slot="helpertext" class="name-input-helper-text">${this.getNameInputHelperText()}</span>
5300        </chameleon-text-field>
5301      </div>
5302    `}renderAllDayOrStartDateSection(){return Dv.aH`
5303      <div class=${(this.shellOneTimePeriod.allDay?"all-day-section":"start-section")+" date-time-container"}>
5304        ${this.shellOneTimePeriod.allDay?Dv.aH`${this.renderDateRangePicker()}`:Dv.aH` ${this.renderDatePicker("start")}
5305              <chameleon-select
5306                helper-text=${this.errors.startTime?(0,Dv.bQ)("Enter a start time"):""}
5307                in-dialog
5308                class="start-time-select"
5309                selected-value=${this.shellOneTimePeriod.startTime}
5310                @change=${this.handleStartTimeChange}
5311                ?error=${this.errors.startTime}
5312              >
5313                ${this.startTimeOptions.map(e=>this.renderSelectOption(e,JZ(e)))}
5314              </chameleon-select>`}
5315      </div>
5316    `}renderAllDayCheckbox(){return Dv.aH`
5317      <chameleon-checkbox
5318        class="all-day-checkbox"
5319        @change=${this.handleAlldayCheckboxChange}
5320        ?checked=${this.shellOneTimePeriod.allDay}
5321        >${(0,Dv.bQ)("All day")}</chameleon-checkbox
5322      >
5323    `}renderDateRangePicker(){return Dv.aH`
5324      <chameleon-date-range-picker
5325        input-label=${(0,Dv.bQ)("Date range")}
5326        locale=${lY()}
5327        timezone=${(0,Dv.da)()}
5328        calendar-toggle-label=${(0,Dv.bQ)("Toggle date range calendar")}
5329        min=${aY("date")}
5330        start=${this.shellOneTimePeriod.startDay}
5331        end=${this.shellOneTimePeriod.endDay}
5332        max-duration="366"
5333        @change=${this.handleDateRangeChange}
5334        ?error=${this.errors.dateRange||this.errors.dateRangeLength}
5335        helper-text=${this.errors.dateRange?(0,Dv.bQ)("Enter a date range"):this.errors.dateRangeLength?(0,Dv.bQ)("Your date range can't exceed 1 year"):""}
5336      ></chameleon-date-range-picker>
5337    `}renderEndDateSection(){return this.shellOneTimePeriod.allDay?Dv.cm:Dv.aH`
5338          <div class="end-section date-time-container">
5339            ${this.renderDatePicker("end")}
5340            <chameleon-select
5341              in-dialog
5342              class="end-time-select"
5343              selected-value=${this.shellOneTimePeriod.endTime}
5344              @change=${this.handleEndTimeChange}
5345              ?error=${this.errors.endTime}
5346              helper-text=${this.errors.endTime?(0,Dv.bQ)("Enter an end time"):""}
5347            >
5348              ${this.endTimeOptions.map(({value:e,hidden:t})=>this.renderSelectOption(e,JZ(e),t))}
5349            </chameleon-select>
5350          </div>
5351        `}renderDatePicker(e){return Dv.aH`
5352      <chameleon-date-picker
5353        input-label=${"start"===e?(0,Dv.bQ)("Start"):(0,Dv.bQ)("End")}
5354        class=${"start"===e?"start-date-picker":"end-date-picker"}
5355        locale=${lY()}
5356        timezone=${(0,Dv.da)()}
5357        calendar-toggle-label=${"start"===e?(0,Dv.bQ)("Toggle start date calendar"):(0,Dv.bQ)("Toggle end date calendar")}
5358        min=${aY("date")}
5359        max=${"end"===e?(e=>{const t=new Date(e);return t.setFullYear(t.getFullYear()+1),sY(t,(0,Dv.da)(),"date")})(this.shellOneTimePeriod.startDay):""}
5360        value=${"start"===e?this.shellOneTimePeriod.startDay:this.shellOneTimePeriod.endDay}
5361        @change=${"start"===e?this.handleStartDateChange:this.handleEndDateChange}
5362        ?error=${"start"===e?this.errors.startDay:this.errors.endDay}
5363        helper-text=${(0,Dv.cq)(this.getDatePickerHelperText(e))}
5364      ></chameleon-date-picker>
5365    `}renderDNDSection(){return Dv.aH` <div class="dnd-section">
5366      <chameleon-checkbox ?checked=${this.shellOneTimePeriod.dndEnabled} @change=${this.handleDNDCheckboxChange}
5367        >${(0,Dv.bQ)("Do not disturb during these hours")}</chameleon-checkbox
5368      >
5369      <chameleon-typography variant="caption-medium" color="type-color-secondary" class="dnd-description"
5370        >${(0,Dv.bQ)("Automatically turn off notifications for this time range.")}</chameleon-typography
5371      >
5372    </div>`}
5372renderAlert(){return this.hasOverlap?Dv.aH` <chameleon-alert variant="danger"
5373          >${(0,Dv.bQ)("You can't set custom hours that overlap previously scheduled custom hours")}</chameleon-alert
5374        >`:Dv.cm}render(){return Dv.aH`
5375      <form>
5376        <chameleon-dialog open size="large">
5377          <div class="modal-header" slot="title">
5378            <chameleon-typography variant="heading-small">${(0,Dv.bQ)("Set your custom hours")}</chameleon-typography>
5379          </div>
5380          <div class="modal-body">
5381            ${this.renderAlert()}${this.renderCustomHoursNameInput()}
5382            <div class="date-time-all-day-container">
5383              <div class="start-end-container">
5384                ${this.renderAllDayOrStartDateSection()} ${this.renderEndDateSection()}
5385              </div>
5386              <div class="all-day-container">${this.renderAllDayCheckbox()}</div>
5387            </div>
5388            ${this.renderDNDSection()}
5389          </div>
5390          <div class="modal-footer" slot="actions">
5391            <chameleon-button
5392              size="medium"
5393              @click=${this.handleConfirmClick}
5394              class="confirm-button"
5395              ?disabled=${!this.isFormValid}
5396              >${(0,Dv.bQ)("Confirm")}</chameleon-button
5397            >
5398            <chameleon-button size="medium" variant="tertiary" @click=${this.handleCancelClick} class="cancel-button"
5399              >${(0,Dv.bQ)("Cancel")}</chameleon-button
5400            >
5401          </div>
5402        </chameleon-dialog>
5403      </form>
5404    `}};C1.tagName="goto-schedule-custom-hours-modal";let S1=C1;x1([(0,Dv.cn)({type:Object})],S1.prototype,"oneTimePeriod",1),x1([(0,Dv.ct)()],S1.prototype,"shellOneTimePeriod",2),x1([(0,Dv.ct)()],S1.prototype,"endTimeOptions",2),x1([(0,Dv.ct)()],S1.prototype,"isFormValid",2),x1([(0,Dv.ct)()],S1.prototype,"hasOverlap",2),x1([(0,Dv.ct)()],S1.prototype,"errors",2),x1([(0,Dv.bS)(".start-section")],S1.prototype,"startSection",2),x1([(0,Dv.bS)(".end-section")],S1.prototype,"endSection",2);var E1=Object.defineProperty,I1=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&E1(t,r,i),i};const A1=class extends Dv.bP{constructor(){super(...arguments),this.isLoading=!1,this.isScheduleEnabled=!1,this.oneTimePeriods=[],this.sortedOneTimePeriods=[],this.maxOneTimePeriodsReached=!1,this.handleUserScheduleChange=e=>{this.oneTimePeriods=e.userSchedule.oneTimePeriods,this.isScheduleEnabled=e.userSchedule.enabled,this.updateSortedOneTimePeriods(),this.verifyMaxOneTimePeriods()},this.handleAddOrEditOneTimePeriod=e=>{this.saveOrUpdateCustomHoursSchedule(e.detail.oneTimePeriod),this.closeCustomHoursModal()},this.handleCloseCustomHoursModal=()=>{this.closeCustomHoursModal()},this.renderCustomHoursCard=e=>Dv.aH`<goto-schedule-custom-hours-card
5405      .oneTimePeriod=${e}
5406      ?isScheduleEnabled=${this.isScheduleEnabled}
5407      @edit=${()=>this.handleEditOneTimePeriod(e)}
5408      @delete=${()=>this.handleDeleteOneTimePeriod(e)}
5409    ></goto-schedule-custom-hours-card>`}static get styles(){return(0,Dv.ck)(".custom-hours-header{margin-bottom:var(--goto-spacing-03)}.custom-hours-set{align-items:flex-start;display:flex;justify-content:space-between}goto-schedule-custom-hours-card{display:block;margin-bottom:var(--goto-spacing-02)}goto-schedule-custom-hours-card:last-child{margin-bottom:0}.add-custom-hours{margin-left:var(--goto-spacing-04)}chameleon-alert{margin-top:var(--goto-spacing-03);margin-bottom:var(--goto-spacing-06)}")}connectedCallback(){super.connectedCallback(),n1().subscribe(this.handleUserScheduleChange)}disconnectedCallback(){super.disconnectedCallback(),n1().unsubscribe(this.handleUserScheduleChange)}render(){return Dv.aH`
5410      <div class="custom-hours-header">
5411        <chameleon-typography class="small-header" variant="body-medium-strong"
5412          >${(0,Dv.bQ)("Custom hours")}</chameleon-typography
5413        >
5414        <div class="custom-hours-set">
5415          <chameleon-typography variant="body-small" color="type-color-secondary"
5416            >${(0,Dv.bQ)("Add holidays, quiet hours, and other exceptions to your schedule availability.")}</chameleon-typography
5417          ><chameleon-button
5418            class="add-custom-hours"
5419            variant="secondary"
5420            size="medium"
5421            @click=${()=>{$j().open(this.createCustomHoursModal())}}
5422            ?disabled=${!this.isScheduleEnabled||this.maxOneTimePeriodsReached}
5423            ><chameleon-svg slot="start">${vb}</chameleon-svg>${(0,Dv.bQ)("Add custom hours")}</chameleon-button
5424          >
5425        </div>
5426      </div>
5427      ${this.renderCustomHoursSection()}
5428    `}updateSortedOneTimePeriods(){this.sortedOneTimePeriods=(e=>{const t=e.filter(e=>"id"===Object.keys(e)[0]),r=e.filter(e=>!fY(e.endDate)&&!t.includes(e)),n=e.filter(e=>fY(e.endDate)&&!t.includes(e)).sort((e,t)=>
5428t.endDate.localeCompare(e.endDate));return[...t.reverse(),...r,...n]})(this.oneTimePeriods)}renderCustomHoursSection(){return this.isLoading?Dv.aH` <chameleon-skeleton variant="rectangle" size="xlarge"></chameleon-skeleton> `:Dv.aH`<div class="custom-hours-schedule">
5429          ${this.maxOneTimePeriodsReached?this.renderMaxOneTimePeriodsAlert():Dv.cm}
5430          ${Nb(this.sortedOneTimePeriods,e=>e.id,e=>this.renderCustomHoursCard(e))}
5431        </div> `}renderMaxOneTimePeriodsAlert(){return Dv.aH` <chameleon-alert variant="warning"
5432      ><chameleon-svg slot="icon">${bb}</chameleon-svg>${(0,Dv.bQ)("You’ve set the maximum number of custom hours. To add more, delete existing custom hours.")}</chameleon-alert
5433    >`}verifyMaxOneTimePeriods(){this.maxOneTimePeriodsReached=this.oneTimePeriods.length>99}handleDeleteOneTimePeriod(e){(0,Dv.cr)().track("GoTo > Schedule settings - Custom hours",{action:"delete",oneTimePeriod:e}),n1().deleteOneTimePeriod(e.id)}handleEditOneTimePeriod(e){$j().open(this.createCustomHoursModal(e))}saveOrUpdateCustomHoursSchedule(e){n1().createOrUpdateOneTimePeriod(e)}createCustomHoursModal(e){return this.customHoursModal=(0,Dv.bL)().createElement(S1.tagName),e&&(this.customHoursModal.oneTimePeriod=(0,Dv.er)(e)),this.customHoursModal.addEventListener(_1,this.handleAddOrEditOneTimePeriod),this.customHoursModal.addEventListener(k1,this.handleCloseCustomHoursModal),this.customHoursModal}closeCustomHoursModal(){this.customHoursModal?.removeEventListener(_1,this.handleAddOrEditOneTimePeriod),this.customHoursModal?.removeEventListener(k1,this.handleCloseCustomHoursModal),this.customHoursModal=void 0,$j().close()}};A1.tagName="goto-schedule-custom-hours";let T1=A1;I1([(0,Dv.cn)({type:Boolean})],T1.prototype,"isLoading"),I1([(0,Dv.ct)()],T1.prototype,"isScheduleEnabled"),I1([(0,Dv.ct)()],T1.prototype,"oneTimePeriods"),I1([(0,Dv.ct)()],T1.prototype,"sortedOneTimePeriods"),I1([(0,Dv.ct)()],T1.prototype,"maxOneTimePeriodsReached");var O1=Object.defineProperty,L1=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&O1(t,r,i),i};const $1=class extends Dv.bP{constructor(){super(...arguments),this.error=!1,this.rowIndex=0,this.change=()=>"",this.endTimeOptions=[],this.isDirty=!1,this.startTimeOptions=[],this.daysOfTheWeek=[],this.modifiedWorkPeriod={}}static get styles(){return(0,Dv.ck)(".work-hours-row{display:flex;justify-content:space-between;width:100%}.time-select{width:28%;min-width:110px;max-width:170px}.day-select{width:33%;min-width:110px;max-width:210px}.hidden{display:none}::part(control){min-height:auto}")}connectedCallback(){super.connectedCallback(),this.modifiedWorkPeriod=this?.currentWorkPeriod??{},this.startTimeOptions=this.getStartTimeOptions(),this.endTimeOptions=this.getEndTimeOptions(),this.daysOfTheWeek=[...UZ],this.currentWorkPeriod?.startTime&&this.hideInvalidEndTimeOptions(this.currentWorkPeriod.startTime)}render(){return Dv.aH`
5434      <div class="work-hours-row">${this.renderDay()} ${this.renderStartTime()} ${this.renderEndTime()}</div>
5435    `}getStartTimeOptions(){return tY(15)}getEndTimeOptions(){return tY(15).map(e=>({value:e,hidden:!1})).concat({value:"23:59:59",hidden:!1}).slice(1)}hideInvalidEndTimeOptions(e){const t=this.endTimeOptions.findIndex(({value:t})=>t===e);this.endTimeOptions=this.endTimeOptions.map((e,r)=>({...e,hidden:r<=t}))}getValidEndTime(e){const t=this.endTimeOptions.findIndex(({value:t})=>t===e),r=this.endTimeOptions.findIndex(({value:e})=>e===this.modifiedWorkPeriod.endTime);return-1!==t&&-1!==r&&t>=r?this.endTimeOptions[t+1].value:this.modifiedWorkPeriod.endTime}handleChangeStartTime(e){this.isDirty=!0;const t=e.target.value;this.hideInvalidEndTimeOptions(t),this.modifiedWorkPeriod={...this.modifiedWorkPeriod,startTime:t,endTime:this.getValidEndTime(t)},this.triggerChangeEvent()}handleChangeEndTime(e){this.isDirty=!0;const t=e.target.value,r=this.endTimeOptions.find(({value:e})=>e===t);let n=t;(!r||r.hidden)&&(n=this.endTimeOptions.find(({hidden:e})=>!e)?.value??t),this.modifiedWorkPeriod={...this.modifiedWorkPeriod,endTime:n},this.triggerChangeEvent()}handleChangeDayOfTheWeek(e){this.isDirty=!0;const t=e.target.value;this.modifiedWorkPeriod={...this.modifiedWorkPeriod,dayOfWeek:t},this.triggerChangeEvent()}triggerChangeEvent(){this.change(this.modifiedWorkPeriod,this.isDirty)}renderSelectOption(e,t,r){return Dv.aH`<chameleon-option class=${r?"hidden":""} value=${e}>${t}</chameleon-option>`}isFirstRow(){return 0===this.rowIndex}renderDay(){return Dv.aH`
5436      <chameleon-select
5437        in-dialog
5438        label=${this.isFirstRow()?(0,Dv.bQ)("Day"):""}
5439        aria-label=${this.isFirstRow()?"":(0,Dv.bQ)("Day")}
5440        class="day-select"
5441        selected-value=${(0,Dv.cq)(this.modifiedWorkPeriod?.dayOfWeek)}
5442        ?error=${this.error}
5443        @change=${this.handleChangeDayOfTheWeek}
5444      >
5445        <chameleon-option class="hidden" value="">${(0,Dv.bQ)("Day")}</chameleon-option>
5446        ${this.daysOfTheWeek.map(e=>this.renderSelectOption(e,(0,Dv.cB)(qZ[e]),!1))}
5447      </chameleon-select>
5448    `}renderStartTime(){return Dv.aH` <chameleon-select
5449      in-dialog
5450      label=${this.isFirstRow()?(0,Dv.bQ)("Start"):""}
5451      aria-label=${this.isFirstRow()?"":(0,Dv.bQ)("Start")}
5452      class="select-start-time time-select"
5453      selected-value=${(0,Dv.cq)(this.modifiedWorkPeriod?.startTime)}
5454      ?error=${this.error}
5455      @change=${this.handleChangeStartTime}
5456    >
5457      <chameleon-option class="hidden" value="">${(0,Dv.bQ)("Time")}</chameleon-option>
5458      ${this.startTimeOptions.map(e=>this.renderSelectOption(e,JZ(e),!1))}
5459    </chameleon-select>`}renderEndTime(){return Dv.aH` <chameleon-select
5460      in-dialog
5461      label=${this.isFirstRow()?(0,Dv.bQ)("End"):""}
5462      aria-label=${this.isFirstRow()?"":(0,Dv.bQ)("End")}
5463      class="select-end-time time-select"
5464      selected-value=${(0,Dv.cq)(this.modifiedWorkPeriod?.endTime)}
5465      ?error=${this.error}
5466      @change=${this.handleChangeEndTime}
5467    >
5468      ${this.modifiedWorkPeriod?.endTime?Dv.cm:Dv.aH`<chameleon-option class="hidden" value="">${(0,Dv.bQ)("Time")}</chameleon-option>`}
5469      ${this.endTimeOptions.filter(({hidden:e})=>!e).map(({value:e})=>this.renderSelectOption(e,JZ(e),!1))}
5470    </chameleon-select>`}};$1.tagName="goto-schedule-work-hours-modal-row";let N1=$1;L1([(0,Dv.cn)({type:Object})],N1.prototype,"currentWorkPeriod"),L1([(0,Dv.cn)({type:Boolean})],N1.prototype,"error"),L1([(0,Dv.cn)({type:Number,attribute:!0,reflect:!0})],N1.prototype,"rowIndex"),L1([(0,Dv.cn)({type:Function})],N1.prototype,"change"),L1([(0,Dv.ct)()],N1.prototype,"modifiedWorkPeriod");var R1=Object.defineProperty,P1=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&R1(t,r,i),i};const D1=class extends Dv.bP{constructor(){super(...arguments),this.oneTimePeriod={name:"",startDate:"",endDate:"",dndEnabled:!1},this.isScheduleEnabled=!1,this.isScheduleInThePast=!1}static get styles(){return(0,Dv.ck)(".custom-hours-card{padding:var(--goto-spacing-04);border:solid 1px var(--goto-border-color-default);border-radius:var(--goto-radius-small);display:flex;justify-content:space-between}
5470.custom-hours-card-information{display:flex;flex-direction:column}.custom-hours-card-information-title{display:flex;align-items:center}.custom-hours-card-information-past{margin-left:var(--goto-spacing-02)}.custom-hours-card-dnd-enabled{display:flex;align-items:center}.custom-hours-card-dnd-enabled-icon{margin-right:var(--goto-spacing-02)}.custom-hours-card-information-row{margin-bottom:var(--goto-spacing-01)}.disabled-svg{opacity:.2}.custom-hours-card-actions{display:flex;gap:var(--goto-spacing-01)}")}updated(e){super.updated(e),e.has("oneTimePeriod")&&this.oneTimePeriodHasPassed()}oneTimePeriodHasPassed(){this.oneTimePeriod.endDate&&this.oneTimePeriod.startDate&&(this.isScheduleInThePast=fY(this.oneTimePeriod.endDate))}getTypographyColor(e){return e?"type-color-default":"type-color-disabled"}render(){return Dv.aH`<div class="custom-hours-card">
5471      <div class="custom-hours-card-information">
5472        <div class="custom-hours-card-information-title custom-hours-card-information-row">
5473          <chameleon-typography
5474            variant="body-small-strong"
5475            tag="h3"
5476            color=${this.getTypographyColor(this.isScheduleEnabled)}
5477            >${this.oneTimePeriod.name}</chameleon-typography
5478          >
5479          ${this.renderPastStatus()}
5480        </div>
5481        <chameleon-typography
5482          class="custom-hours-card-information-row"
5483          variant="caption-medium"
5484          color=${this.getTypographyColor(this.isScheduleEnabled)}
5485          >${this.getFormattedDate(this.oneTimePeriod.startDate,this.oneTimePeriod.endDate)}</chameleon-typography
5486        >
5487        ${this.renderDNDSection()}
5488      </div>
5489      <div class="custom-hours-card-actions">${this.renderDeleteButton()} ${this.renderEditButton()}</div>
5490    </div>`}handleEditClick(){this.dispatchEvent(new CustomEvent("edit",{bubbles:!0,detail:{oneTimePeriod:this.oneTimePeriod}}))}handleDeleteClick(){this.dispatchEvent(new CustomEvent("delete",{bubbles:!0,detail:{oneTimePeriod:this.oneTimePeriod}}))}renderEditButton(){return Dv.aH`<chameleon-icon-button
5491        label=${(0,Dv.bQ)("Edit")}
5492        id="edit-custom-hours"
5493        size="small"
5494        class="custom-hours-card-edit"
5495        variant="secondary"
5496        ?disabled=${!this.isScheduleEnabled}
5497        @click=${()=>this.handleEditClick()}
5498        ><chameleon-svg>${Cb}</chameleon-svg></chameleon-icon-button
5499      >
5500      <chameleon-tooltip position="bottom-center" trigger-id="edit-custom-hours">${(0,Dv.bQ)("Edit")} </chameleon-tooltip> `}renderDeleteButton(){return Dv.aH`<chameleon-icon-button
5501        label=${(0,Dv.bQ)("Delete")}
5502        id="delete-custom-hours"
5503        size="small"
5504        class="custom-hours-card-delete"
5505        variant="secondary"
5506        ?disabled=${!this.isScheduleEnabled}
5507        @click=${()=>this.handleDeleteClick()}
5508        ><chameleon-svg>${'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M9 2H15V4H21V6H3V4H9V2ZM7 20V7H5V22H19V7H17V20H7ZM9 9H11V18H9V9ZM15 9H13V18H15V9Z" fill="currentColor"></path></svg>'}</chameleon-svg></chameleon-icon-button
5509      >
5510      <chameleon-tooltip position="bottom-center" trigger-id="delete-custom-hours">${(0,Dv.bQ)("Delete")} </chameleon-tooltip> `}getSvgClass(){return"custom-hours-card-dnd-enabled-icon "+(this.isScheduleEnabled?"":"disabled-svg")}renderDNDSection(){return this.isScheduleInThePast?Dv.cm:this.oneTimePeriod.dndEnabled?Dv.aH`<div class="custom-hours-card-dnd-enabled">
5511        <chameleon-svg class=${this.getSvgClass()}>${Ab}</chameleon-svg
5512        ><chameleon-typography variant="caption-medium" color=${this.getTypographyColor(this.isScheduleEnabled)}
5513          >${(0,Dv.bQ)("Notifications will be turned off during this time")}</chameleon-typography
5514        >
5515      </div>`:Dv.aH`<chameleon-typography
5516      variant="caption-medium"
5517      class="custom-hours-card-dnd-disabled"
5518      color=${this.getTypographyColor(this.isScheduleEnabled)}
5519      >${(0,Dv.bQ)("Notifications may still come through, depending on your profile status")}</chameleon-typography
5520    >`}renderPastStatus(){return this.isScheduleInThePast?Dv.aH`<chameleon-chip
5521        size="xsmall"
5522        class="custom-hours-card-information-past"
5523        name="Past"
5524        disabled=${!this.isScheduleEnabled}
5525        >${(0,Dv.bQ)("Past")}</chameleon-chip
5526      >`:Dv.cm}getFormattedDate(e,t){return QZ((0,Dv.d7)(new Date(e),new Date(t),KZ))}};D1.tagName="goto-schedule-custom-hours-card";let M1=D1;P1([(0,Dv.cn)({type:Object})],M1.prototype,"oneTimePeriod"),P1([(0,Dv.cn)({type:Boolean})],M1.prototype,"isScheduleEnabled"),P1([(0,Dv.ct)()],M1.prototype,"isScheduleInThePast");const z1=class extends $Z{constructor(){super(...arguments),this.isPresenceSelectorDisabled=!!(0,Dv.bs)(Dv.bt.SHELL_DISABLE_PRESENCE_SELECTOR)}connectedCallback(){super.connectedCallback(),this.isPresenceSelectorDisabled&&this.removeAttribute("role")}getSubmenuTriggerItem(){return this.shadowRoot?.querySelector("chameleon-menu-item")}static get styles(){return(0,Dv.ck)(".presence-icon,.presence-selected{--goto-icon-size: var(--goto-spacing-03)}")}
5526focus(){this.getSubmenuTriggerItem()?.focus()}renderPresenceMenuItem(e){return e!==cb.BUSY||(0,Dv.bs)(Dv.bt.SHELL_ADVANCED_PRESENCE_BUSY)?Dv.aH`
5527      <chameleon-menu-item
5528        @menuitemclick=${()=>this.handleMenuItemClick(e)}
5529        class="presence-selector-menu-item"
5530        data-testid=${e}
5531      >
5532        ${(0,Dv.bQ)(xZ(e,!0))} ${this.renderIcon(e)}
5533        ${this.renderSelectedCheck(e)}
5534      </chameleon-menu-item>
5535    `:Dv.cm}renderSelectedCheck(e){return e===this.selectedAppearance?Dv.aH`
5536          <chameleon-svg
5537            aria-label=${(0,Dv.bQ)("{{appearanceTranslationKey}} status selected",()=>({appearanceTranslationKey:xZ(e,!0)}))}
5538            class="presence-selected"
5539            slot="end"
5540          >
5541            ${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M20.8726 6.59192L9.17452 18.29L3 12.1155L4.30192 10.8136L9.17452 15.6862L19.5707 5.29L20.8726 6.59192Z" fill="currentColor"></path></svg>')}</chameleon-svg
5542          >
5543        `:Dv.cm}renderIcon(e){return e===cb.AUTO_UPDATE?Dv.aH` <chameleon-svg class="presence-icon" slot="start"> ${(0,Dv.bR)(Lb)}</chameleon-svg> `:Dv.aH`<chameleon-presence-indicator
5544          class="presence-icon"
5545          presence=${Db(e)}
5546          label=${xZ(e,!0)}
5547          slot="start"
5548        ></chameleon-presence-indicator>`}renderAutoUpdateMenuItem(){return(0,Dv.bs)(Dv.bt.SHELL_ENABLE_PRESENCE_AUTO_UPDATE)?this.renderPresenceMenuItem(cb.AUTO_UPDATE):Dv.cm}handleMenuItemClick(e){this.isPresenceSelectorDisabled||((0,Dv.cr)().track("GoTo > Presence Selector",{action:"Click",target:e}),this.dispatchEvent(new CustomEvent("presenceClicked",{detail:{presence:e},bubbles:!0,composed:!0})),this.setArgumentsForNewPresence(e))}render(){const e=(0,Dv.bs)(Dv.bt.SHELL_ENABLE_DND_TIMER),t="presence-selector-set-status-menu-item";return Dv.aH`
5549      <chameleon-menu-item id=${t} tabindex="0" ?disabled=${this.isPresenceSelectorDisabled}>
5550        ${(0,Dv.bQ)("Set status")}
5551        <chameleon-svg slot="end">${yb}</chameleon-svg>
5552        <chameleon-menu label="Presence selector" slot="submenu">
5553          ${this.renderAutoUpdateMenuItem()}
5554          <chameleon-menu-separator></chameleon-menu-separator>
5555          ${Nb(this.appearanceList,e=>e,e=>this.renderPresenceMenuItem(e))}
5556          <chameleon-menu-separator></chameleon-menu-separator>
5557          ${e?Dv.aH`<chameleon-menu-item
5558  @menuitemclick=${()=>((0,Dv.cr)().track("GoTo > DND Timer Modal",{action:"Click",event:"Open",from:"Avatar submenu"}),void(0,Dv.Z)().namespaces.retrieve(tq).commands.openDndTimerDialog.execute())}
5559  class="presence-selector-menu-item"
5560  data-testid=${"option-set-dnd-timer"}
5561  >${(0,Dv.bQ)("Do not disturb timer")}</chameleon-menu-item
5562>`:Dv.cm}
5563          ${[Dv.aH` <chameleon-menu-item
5564  @menuitemclick=${()=>((0,Dv.cr)().track("GoTo > Custom Status Modal",{action:"Click",event:"Open",from:"Avatar submenu"}),void(0,Dv.Z)().namespaces.retrieve(tq).commands.openPresenceNoteDialog.execute())}
5565  class="presence-selector-menu-item"
5566  data-testid=${"option-set-status-message"}
5567  >${(0,Dv.bQ)("Set status message")}</chameleon-menu-item
5568>`,mY()?Dv.aH`<chameleon-menu-item
5569        @menuitemclick=${()=>(0,Dv.bj)(Dv.aE)}
5570        class="presence-selector-menu-item"
5571        data-testid=${"option-set-work-schedule"}
5572        >${(0,Dv.bQ)("Set work schedule")}</chameleon-menu-item
5573      >`:Dv.cm]}
5574        </chameleon-menu>
5575      </chameleon-menu-item>
5576      ${this.isPresenceSelectorDisabled?Dv.aH`<chameleon-tooltip trigger-id=${t}
5577            >${(0,Dv.bQ)("An admin has disabled setting your status")}</chameleon-tooltip
5578          >`:Dv.cm}
5579    `}};z1.tagName="goto-presence-selector-submenu";let F1=z1;const U1=class extends Dv.bP{render(){return Dv.aH`<slot></slot>`}};U1.tagName="goto-topbar-container";let B1=U1;const H1=class extends Dv.bP{static get styles(){return(0,Dv.ck)(":host{position:relative;--goto-navigation-drawer-width: 100%;display:flex}")}render(){return Dv.aH`<slot></slot>`}};H1.tagName="goto-main-content";let j1=H1;var V1=Object.defineProperty;const W1=class extends Dv.bP{constructor(){super(...arguments),this.handleNavAndSidebarStatusChange=async e=>{this.classList.toggle("floating-navrail",e.isNavrailFloating),this.classList.toggle("floating-sidebar",e.isSidebarFloating),await(0,Dv.cZ)(),this.classList.toggle("show",e.isOpen)},this.handleSidebarItemClick=e=>{e.composedPath().find(e=>e instanceof HTMLElement&&"chameleon-navigation-drawer-item"===e.tagName.toLowerCase())&&ZG().resetNavigationOpenState()},this.handleSidebarCloseEvent=()=>{ZG().resetNavigationOpenState()}}static get styles(){return(0,Dv.ck)(":host{--goto-sidebar-width: 0;--goto-sidebar-border-width: 0;--goto-navigation-drawer-width: 100%;display:block;height:100%}:host .container{display:flex;height:100%}:host .shell-sidebar{overflow-x:hidden;overflow-y:auto;min-width:var(--goto-sidebar-width);width:var(--goto-sidebar-width);background-color:var(--goto-background-color-secondary);border-right:var(--goto-sidebar-border-width) solid var(--goto-border-color-default);height:100%;
5579transition:all var(--goto-duration-modest-02) var(--goto-entrance-easing)}:host .content{display:grid;width:100%;overflow:auto}:host(.slotted-sidebar){--goto-sidebar-width: 270px;--goto-sidebar-border-width: 1px}:host(.slotted-sidebar.compact-sidebar){--goto-sidebar-width: 220px}:host(.slotted-sidebar.floating-sidebar) .container{position:relative}:host(.slotted-sidebar.floating-sidebar) .shell-sidebar{--goto-sidebar-hidden-offset: -300px;border-right:none;position:absolute;left:var(--goto-sidebar-hidden-offset);top:0;height:100%;z-index:2}:host(.slotted-sidebar.floating-sidebar.show) .shell-sidebar{--goto-sidebar-hidden-offset: 0px;box-shadow:var(--goto-elevation-medium);border-right:var(--goto-sidebar-border-width) solid var(--goto-border-color-default)}:host(.slotted-sidebar.floating-sidebar.show.floating-navrail) .shell-sidebar{--goto-sidebar-hidden-offset: 64px}")}connectedCallback(){super.connectedCallback(),this.checkForSlottedSidebar(),this.createAndObserveComponentResize(),(0,Dv.bs)(Dv.bt.SHELL_HIDDEN_FLOATING_SIDEBAR)&&this.unsubscribeFunctions.push(ZG().subscribeToNavigationState(this.handleNavAndSidebarStatusChange)),this.subscribeToSidebarCloseEvent()}firstUpdated(e){super.firstUpdated(e),(0,Dv.bs)(Dv.bt.SHELL_HIDDEN_FLOATING_SIDEBAR)&&this.sidebar.addEventListener("click",this.handleSidebarItemClick)}disconnectedCallback(){super.disconnectedCallback(),this.observer?.unobserve(this),(0,Dv.bs)(Dv.bt.SHELL_HIDDEN_FLOATING_SIDEBAR)&&this.sidebar.removeEventListener("click",this.handleSidebarItemClick)}render(){return Dv.aH`<div class="container">
5580      <div class="shell-sidebar">
5581        <slot name="sidebar"></slot>
5582      </div>
5583      <div class="content">
5584        <slot></slot>
5585      </div>
5586    </div>`}getContentWidth(){return this.shadowRoot?.querySelector(".content")?.clientWidth||0}sidebarContainsAssociatedNodes(){return!!this.querySelector('[slot="sidebar"]')}checkForSlottedSidebar(){this.sidebarContainsAssociatedNodes()?this.classList.add("slotted-sidebar"):this.classList.remove("slotted-sidebar")}createAndObserveComponentResize(){this.observer=new ResizeObserver(e=>{for(const t of e){const e=t.contentRect.width<=1162;this.classList.toggle("compact-sidebar",e);const r=t.contentRect.width<=640;this.dispatchEvent(new Dv.eu({collapsed:r}))}this.dispatchResizeEvent()}),this.observer.observe(this)}dispatchResizeEvent(){this.getContentWidth()<640?(this.classList.add("grid-small"),ZG().updateGridMode("sm")):(this.classList.remove("grid-small"),ZG().updateGridMode("lg"))}subscribeToSidebarCloseEvent(){this.addEventListener(Dv.ev,this.handleSidebarCloseEvent),this.unsubscribeFunctions.push(()=>{this.removeEventListener(Dv.ev,this.handleSidebarCloseEvent)})}};W1.tagName="goto-main-module-layout";let K1=W1;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&V1(t,r,o)})([(0,Dv.bS)(".shell-sidebar")],K1.prototype,"sidebar");var q1=Object.defineProperty;const G1=class extends Dv.bP{constructor(){super(...arguments),this.settingLinks=[]}render(){return Dv.aH`<chameleon-navigation-drawer class="settings-sidebar">
5587      <chameleon-navigation-drawer-header>${(0,Dv.bQ)("Settings")}</chameleon-navigation-drawer-header>
5588      <goto-general-settings></goto-general-settings>
5589      <goto-specific-settings .links=${this.settingLinks} role=${"menuitem"}></goto-specific-settings>
5590    </chameleon-navigation-drawer>`}};G1.tagName="goto-settings-sidebar";let Z1=G1;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&q1(t,r,o)})([(0,Dv.cn)({type:Array})],Z1.prototype,"settingLinks");var Y1=Object.defineProperty,J1=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&Y1(t,r,i),i};const Q1=class extends Dv.bP{constructor(){super(...arguments),this.presence=Rb.OFFLINE,this.status=void 0,this.userKey=""}connectedCallback(){super.connectedCallback(),this.userKey=(0,Dv.Z)().user.key??"",this.userKey&&this.loadUserPresence()}loadUserPresence(){const{eventBus:e,presence:t}=(0,Dv.Z)();t&&(this.listenForPresenceUpdatedEvent(e),this.subscribeToPresence(t))}listenForPresenceUpdatedEvent(e){const{presenceUpdate:t}=e.subscribeTo(Dv.s),r=e=>{const{userKey:t,presence:r=Rb.OFFLINE,status:n}=e;t===this.userKey&&(this.presence=r,this.status=n)};t.on(r),this.unsubscribeFunctions.push(()=>{t.removeListener(r)})}subscribeToPresence(e){e&&e.subscribe(this.userKey).then(()=>{this.unsubscribeFunctions.push(()=>{e.unsubscribe(this.userKey)})}).catch(()=>{(0,Dv.g)().error(`failed to subscribe to presence for external user key ${this.userKey}`)})}getTranslatedAppearanceLabel(){return xZ(Mb(this.presence),!1,this.status)}render(){return Dv.aH`<chameleon-typography variant="caption-medium"
5591      >${(0,Dv.bQ)(this.getTranslatedAppearanceLabel())}</chameleon-typography
5592    >`}};Q1.tagName="goto-presence-status";let X1=Q1;J1([(0,Dv.ct)()],X1.prototype,"presence"),J1([(0,Dv.ct)()],X1.prototype,"status");
5592var e2=Object.defineProperty,t2=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&e2(t,r,i),i};const r2=class extends Dv.bP{static get styles(){return(0,Dv.ck)(".presence-action-button-container{display:flex;justify-content:center;padding-top:var(--goto-spacing-01)}")}hasAction(){return this.userHasSetManualStatus()||this.userIsOnScheduledDND()}setPresenceToAutoUpdate(){try{const e=(0,Dv.Z)().presence;(0,Dv.d5)(e,"shell presence service is undefined"),e.setUserPresence({userAppearance:db.NONE,userDoNotDisturb:ub.NONE})}catch{}}handleClickClearStatus(){(0,Dv.cr)().track("GoTo > Avatar Menu Presence > Clear Status",{action:"Click",target:cb.AUTO_UPDATE}),this.setPresenceToAutoUpdate()}handleClickViewSchedule(){(0,Dv.cr)().track("GoTo > Avatar Menu Presence > View Schedule",{action:"Click"}),this.dispatchEvent(new CustomEvent(QW,{bubbles:!0,composed:!0})),(0,Dv.bj)(Dv.aE)}userHasSetManualStatus(){return!(this.userAppearance===db.NONE&&this.userDoNotDisturb===ub.NONE)}userIsOnScheduledDND(){return this.userAppearance===db.NONE&&this.userDoNotDisturb===ub.NONE&&this.appearance===cb.DO_NOT_DISTURB}render(){return this.hasAction()?Dv.aH` <div class="presence-action-button-container">
5593          <chameleon-button
5594            size="small"
5595            variant="secondary"
5596            @click=${this.userHasSetManualStatus()?this.handleClickClearStatus:this.handleClickViewSchedule}
5597            >${(0,Dv.bQ)(this.userHasSetManualStatus()?"Clear status":"View schedule")}
5598          </chameleon-button>
5599        </div>`:Dv.cm}};r2.tagName="goto-presence-action-button",r2.shadowRootOptions={...Dv.bP.shadowRootOptions,delegatesFocus:!0};let n2=r2;t2([(0,Dv.cn)({type:String})],n2.prototype,"userAppearance"),t2([(0,Dv.cn)({type:String})],n2.prototype,"appearance"),t2([(0,Dv.cn)({type:String})],n2.prototype,"userDoNotDisturb");const o2=class extends Dv.bP{render(){return Dv.aH` <chameleon-banner variant="${"danger"}">
5600      <span>
5601        ${(0,Dv.cB)("Some parts of GoTo didn't load correctly. Try reloading the app to ensure everything's up and running.")}
5602      </span>
5603      <chameleon-link slot="action" href="#" @click=${Dv.cJ}>${(0,Dv.cB)("Reload")}</chameleon-link>
5604    </chameleon-banner>`}};o2.tagName="goto-blocked-versions-banner";let i2=o2;const s2=class extends Dv.bP{render(){return Dv.aH` <chameleon-banner variant="danger">
5605      <span>
5606        ${(0,Dv.bQ)("We’re having trouble signing you in right now. You can still join meetings as an attendee while we fix things.")}
5607      </span>
5608      <chameleon-link slot="action" href="${"https://status.goto.com"}" target="_blank" rel="noopener noreferrer">
5609        ${(0,Dv.bQ)("Check service status")}
5610      </chameleon-link>
5611    </chameleon-banner>`}};s2.tagName="goto-auth-outage-banner";let a2=s2;var l2=Object.defineProperty,c2=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&l2(t,r,i),i};const d2=class extends Dv.bP{constructor(){super(...arguments),this.shouldRender=!1,this.breakpointListener=e=>{this.shouldRender=e.active}}connectedCallback(){super.connectedCallback(),this.unsubscribeFunctions.push(Xv(this.min,this.max,this.breakpointListener))}render(){return this.shouldRender?Dv.aH`<slot></slot>`:Dv.cm}};d2.tagName="goto-responsive-view";let u2=d2;c2([(0,Dv.ct)()],u2.prototype,"shouldRender"),c2([(0,Dv.cn)({type:String})],u2.prototype,"min"),c2([(0,Dv.cn)({type:String})],u2.prototype,"max");var h2=Object.defineProperty,p2=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&h2(t,r,i),i};const g2=class extends Dv.bP{constructor(){super(...arguments),this.givenName="",this.familyName="",this.profileImageUrl="",this.externalUserKey=(0,Dv.Z)().user.key??"",this.presence=(0,Dv.Z)().presence,this.avatarSize=UW.X_LARGE,this.typeVariant="body-medium-strong",this.handleOpenEditUserNoteDialog=()=>{(0,Dv.cr)().track("GoTo > Custom Status Modal",{action:"Click",event:"Open",from:"Avatar submenu"}),this.dispatchEvent(new CustomEvent(QW,{bubbles:!0,composed:!0})),(0,Dv.Z)().namespaces.retrieve(tq).commands.openPresenceNoteDialog.execute()},this.handleHeaderKeydown=e=>{if("ArrowUp"!==e.key&&"ArrowDown"!==e.key)return;const t=this.getHeaderActions(),r=t.findIndex(t=>e.composedPath().includes(t)),n=-1===r?void 0:t[r+("ArrowDown"===e.key?1:-1)];n&&(n.focus(),e.preventDefault())}}static get styles(){return(0,Dv.ck)(".avatar-and-name{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:var(--goto-spacing-03) var(--goto-spacing-04) var(--goto-spacing-01)}.name-under-avatar{flex-direction:column}.user-name{margin-left:11px}.avatar-with-margin{margin-right:var(--goto-spacing-03)}.name-and-presence{display:flex;flex-direction:column}goto-presence-status{align-self:center;margin-top:var(--goto-spacing-01)}.avatar-info-name-container{margin-top:var(--goto-spacing-01);display:flex;align-items:center;text-align:center}.dnd-until-label{text-align:center}")}connectedCallback(){super.connectedCallback(),this.presence&&this.externalUserKey&&(this.subscribeToPresenceService(this.presence),this.listenForPresenceUpdatedEvent())}updated(){this.getHeaderActions().length?this.setAttribute("role","menuitem"):(this.removeAttribute("role"),this.removeAttribute("tabindex"))}usePresenceSelectorSubmenu(){return(0,Dv.bs)(Dv.bt.SHELL_PRESENCE_SELECTOR_SUBMENU)}listenForPresenceUpdatedEvent(){const{eventBus:e}=(0,Dv.Z)(),{userPresenceUpdate:t}=e.subscribeTo(Dv.s),r=e=>{const{userNote:t,userAppearance:r,userDoNotDisturb:n,appearance:o,userDoNotDisturbExpiration:i}=e;this.userNote=t,this.userAppearance=r,this.userDoNotDisturb=n,this.appearance=o,this.userDoNotDisturbExpiration=i};t.on(r),this.unsubscribeFunctions.push(()=>{t.removeListener(r)})}getHeaderActions(){return Array.from(this.renderRoot?.querySelectorAll("[data-header-action]")??[]).filter(e=>e.hasAction?.()??!0)}focus(){const e=this.getHeaderActions(),t=this.getRootNode().activeElement;(t&&this.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?e.at(-1):e[0])?.focus()}renderPresenceSelect(){return this.usePresenceSelectorSubmenu()?Dv.cm:Dv.aH` <goto-presence-selector></goto-presence-selector> `}renderPresenceActionButton(){return this.usePresenceSelectorSubmenu()?Dv.a
5611H`
5612          <goto-presence-action-button
5613            data-header-action
5614            .userAppearance=${this.userAppearance}
5615            .userDoNotDisturb=${this.userDoNotDisturb}
5616            .appearance=${this.appearance}
5617          ></goto-presence-action-button>
5618        `:Dv.cm}async subscribeToPresenceService(e){try{await e.subscribe(this.externalUserKey),this.unsubscribeFunctions.push(()=>{e.unsubscribe(this.externalUserKey)})}catch(e){(0,Dv.g)().error(`failed to subscribe to presence for external user key ${this.externalUserKey}`,e)}}renderPresenceStatus(){return this.usePresenceSelectorSubmenu()?Dv.aH` <goto-presence-status aria-hidden="true"></goto-presence-status>`:Dv.cm}renderDndUntilLabel(){let e;return(0,Dv.bs)(Dv.bt.SHELL_ENABLE_DND_TIMER)&&(e=this.getDndUntilLabel()),Dv.aH`
5619      ${e&&this.appearance===cb.DO_NOT_DISTURB?Dv.aH`<div class="dnd-until-label" aria-hidden="true">
5620            <chameleon-typography color="type-color-secondary" variant="caption-medium"
5621              >${e}</chameleon-typography
5622            >
5623          </div>`:Dv.cm}
5624    `}getDndUntilLabel(){const e=this.userDoNotDisturbExpiration;if(!e||isNaN(new Date(e).getTime()))return;const t=new Date(e);if(t.getTime()<=Date.now())return;const r=new Date,n=((0,Dv.L)()||"en-US").replace("_","-"),o=t.toLocaleTimeString([n],{hour:"numeric",minute:"2-digit"});return t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()&&t.getDate()===r.getDate()?Dv.aH`${(0,Dv.cB)("Until {{time}}",{time:o})}`:Dv.aH`${(0,Dv.cB)("Until tomorrow at {{time}}",{time:o})}`}renderUserNoteIconButton(){return this.userNote?Dv.aH` <chameleon-icon-button
5625            id="user-note-icon-button"
5626            size="small"
5627            data-header-action
5628            data-testid="avatar-user-note-icon-button"
5629            @click=${this.handleOpenEditUserNoteDialog}
5630            label=${(0,Dv.bQ)("Status message")}
5631          >
5632            <chameleon-svg>${Ib}</chameleon-svg>
5633          </chameleon-icon-button>
5634          <chameleon-tooltip data-testid="avatar-user-note-icon-button-tooltip" trigger-id="user-note-icon-button">
5635            ${this.userNote}
5636          </chameleon-tooltip>`:Dv.cm}getFormattedPersonName(){return(0,Dv.Z)().i18n.formatPersonName({givenName:this.givenName,familyName:this.familyName})}render(){return Dv.aH`
5637      <div
5638        class=${"avatar-and-name "+(this.usePresenceSelectorSubmenu()?"name-under-avatar":"")}
5639        @keydown=${this.handleHeaderKeydown}
5640      >
5641        <goto-avatar
5642          aria-hidden="true"
5643          class=${this.usePresenceSelectorSubmenu()?"":"avatar-with-margin"}
5644          .showPresence=${!0}
5645          .externalUserKey=${this.externalUserKey}
5646          .familyName=${this.familyName}
5647          .givenName=${this.givenName}
5648          .profileImageUrl=${this.profileImageUrl}
5649          .size=${this.avatarSize}
5650          variant="primary"
5651          data-testid="goto-avatar-user"
5652        ></goto-avatar>
5653        <div class="name-and-presence">
5654          <div class=${this.usePresenceSelectorSubmenu()?"avatar-info-name-container":""}>
5655            <chameleon-typography
5656              data-testid="avatar-full-name"
5657              class=${this.usePresenceSelectorSubmenu()?"":"user-name"}
5658              variant=${this.typeVariant}
5659              >${[Dv.aH`<span aria-hidden="true">${this.getFormattedPersonName()}</span>`,this.renderUserNoteIconButton()]}
5660            </chameleon-typography>
5661          </div>
5662          ${[this.renderPresenceStatus(),this.renderDndUntilLabel(),this.renderPresenceSelect(),this.renderPresenceActionButton()]}
5663        </div>
5664      </div>
5665    `}};g2.tagName="goto-avatar-popover-menu-info",g2.shadowRootOptions={...Dv.bP.shadowRootOptions,delegatesFocus:!0};let f2=g2;p2([(0,Dv.cn)({type:String})],f2.prototype,"givenName"),p2([(0,Dv.cn)({type:String})],f2.prototype,"familyName"),p2([(0,Dv.cn)({type:String})],f2.prototype,"profileImageUrl"),p2([(0,Dv.ct)()],f2.prototype,"userNote"),p2([(0,Dv.ct)()],f2.prototype,"userAppearance"),p2([(0,Dv.ct)()],f2.prototype,"appearance"),p2([(0,Dv.ct)()],f2.prototype,"userDoNotDisturb"),p2([(0,Dv.ct)()],f2.prototype,"userDoNotDisturbExpiration");var m2=Object.defineProperty,v2=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&m2(t,r,i),i};const b2=class extends Dv.bP{constructor(){super(...arguments),this.deleteC
5665ategory=()=>"",this.handleCapturingKeydown=e=>{"Enter"===e.key&&this.categoryFilter?.application&&(e.stopPropagation(),this.deleteCategory(this.categoryFilter.application))}}static get styles(){return(0,Dv.ck)(".search-filters-container{display:flex;align-items:center}.global-search-filter{margin-left:var(--goto-spacing-03)}")}firstUpdated(e){super.firstUpdated(e),this.chipElement&&this.chipElement.addEventListener("keydown",this.handleCapturingKeydown,!0)}disconnectedCallback(){super.disconnectedCallback(),this.chipElement&&this.chipElement.removeEventListener("keydown",this.handleCapturingKeydown,!0)}handleChipClose(e){this.deleteCategory(e)}renderFilterChip(e){return e.displayNameKey?Dv.aH` <chameleon-chip
5666          size="small"
5667          class="global-search-filter"
5668          closable
5669          active
5670          close-label=${(0,Dv.bQ)(`Remove ${e.displayNameKey} filter`)}
5671          @close=${()=>this.handleChipClose(e.application)}
5672          >${(0,Dv.bQ)(e.displayNameKey)}</chameleon-chip
5673        >`:Dv.cm}renderChips(){return this.categoryFilter?this.renderFilterChip(this.categoryFilter):Dv.cm}render(){return Dv.aH`
5674      <div class="search-filters-container">
5675        <chameleon-svg>${(0,Dv.bR)(Ob)}</chameleon-svg>
5676        ${this.renderChips()}
5677      </div>
5678    `}};b2.tagName="goto-global-search-filters";let y2=b2;v2([(0,Dv.cn)({type:Object})],y2.prototype,"categoryFilter"),v2([(0,Dv.cn)({attribute:!1})],y2.prototype,"deleteCategory"),v2([(0,Dv.bS)(".global-search-filter")],y2.prototype,"chipElement");var w2=Object.defineProperty,x2=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&w2(t,r,i),i};const _2={query:"",categoryFilterApplicationNames:[]},k2={pageSize:Dv.ex[0],pageMarker:Dv.ew},C2=class extends Dv.bP{constructor(){super(...arguments),this.currentSearchQuery=_2,this.previousSearchQuery=_2,this.previousParams=k2,this.searchResults=[],this.pageSize=Dv.ex[0],this.pageNumerator=1,this.pageDenominator=1,this.nextPageMarker=Dv.ew,this.selectedCategoryTotalResults=0,this.showEmptyState=!1,this.searchError=!1,this.loading=!1,this.categories=[],this.isXSWidth=!1,this.isQueryTextTruncated=!1,this.searchRequestId=0,this.queryTextResizeObserver=new ResizeObserver(()=>this.checkQueryTextTruncation()),this.addListeners=()=>{const{resultPageQueryChange:e,categoriesUpdated:t}=(0,Dv.au)().subscribeTo(Dv.dX);e.addListener(this.queryListener),t.addListener(this.categoriesUpdatedListener),this.unsubscribeFunctions.push(Xv("xs","xs",this.breakpointChangeListener)),this.unsubscribeFunctions.push(()=>{e.removeListener(this.queryListener),t.removeListener(this.categoriesUpdatedListener)})},this.breakpointChangeListener=e=>{this.isXSWidth=e.active},this.categoriesUpdatedListener=()=>{void 0!==this.categoryLoadTimeout&&(window.clearTimeout(this.categoryLoadTimeout),this.categoryLoadTimeout=void 0),this.searchError=!1,this.categories=(0,Dv.Q)().getCategories()},this.queryListener=e=>{this.currentSearchQuery=e.query},this.checkQueryTextTruncation=()=>{const e=this.getQueryTextElement()?.shadowRoot?.querySelector('[part="text"]');if(!e)return void(this.isQueryTextTruncated&&(this.isQueryTextTruncated=!1));const t=e.scrollWidth>e.clientWidth;t!==this.isQueryTextTruncated&&(this.isQueryTextTruncated=t)},this.invalidateQuery=$V(this.validateQuery,200),this.handleSearchResponses=async(e,t)=>{if(t!==this.searchRequestId)return;if(this.searchError=!1,this.showEmptyState=!1,!e)return this.showEmptyState=!0,this.selectedCategoryTotalResults=0,this.resetInitialState(),void(this.loading=!1);this.setSelectedCategoryFromResults(e);const r=this.getResponseForSelectedCategory(e,this.selectedCategory);this.selectedCategoryTotalResults=r?.total?.value??0,0===this.selectedCategoryTotalResults&&(this.showEmptyState=!0);try{this.searchResults=r?.items?await(0,Dv.Q)().convertToGlobalSearchResultUI(r.items,"list"):[]}catch(e){(0,Dv.g)().error("Failed to convert search results to UI",e),this.searchResults=[]}this.nextPageMarker=r?.nextPageMarker??this.nextPageMarker,this.pageDenominator=this.calculatePageDenominator(this.selectedCategoryTotalResults),this.loading=!1},this.handleSearchError=()=>{this.searchResults=[],this.loading=!1,this.searchError=!0},this.calculatePageDenominator=e=>e?Math.ceil(e/this.pageSize):this.pageDenominator,this.calculateNextPageMarker=()=>this.nextPageMarker-(this.pageNumerator-1)*this.pageSize>=1?(this.pageNumerator-1)*this.pageSize:this.nextPageMarker,this.calculateCurrentPageMarker=()=>1===this.pageNumerator?1:1+this.pageSize*(this.pageNumerator-1),this.handleClosePageClick=()=>{(0,Dv.eA)()}}get shouldExecuteSearch(){return""!==this.currentSearchQuery.query&&this.categories.length>0&&!this.searchError}static get styles(){return(0,Dv.ck)(":host{height:100%;display:flex;flex-direction:column}.search-query-heading{align-items:center;display:flex;margin:var(--goto-spacing-06) var(--goto-spacing-06) var(--goto-spacing-04) var(--goto-spacing-06)}.heading-text{flex-grow:1;min-width:0}.no-heading-text{flex-grow:1;min-width:0;visibility:hidden}.search-query-line{align-items:baseline;display:flex;min-width:0;overflow:hidden}.search-query-prefix,.search-query-suffix{flex-shrink:0;white-space:nowrap}.search-query-suffix{margin-right:var(--goto-spacing-03)}.search-query-text{min-width:0}.search-query-tooltip{--tooltip-max-width: 320px}.search-results-container{overflow:overlay;padding:var(--goto-spacing-03)}.rows-per-page{align-items:center;display:flex;gap:var(--goto-spacing-04)}chameleon-select{width:82px}.pager-count{align-items:center;display:flex;gap:var(--goto-spacing-06)}.page-selector{align-items:center;display:flex;gap:var(--goto-spacing-02)}.pager{align-items:end;background-color:var(--goto-background-color-default);bottom:0;display:flex;flex-wrap:wrap;justify-content:space-between;gap:var(--goto-spacing-02);margin:var(--goto-spacing-06)}.survey-link-container{flex:1;display:flex;justify-content:end;padding-right:var(--goto-spacing-07);padding-bottom:var(--goto-spacing-07)}")}connectedCallback(){super.connectedCallback(),this.addListeners(),this.categories=(0,Dv.Q)().getCategories(),this.currentSearchQuery=(0,Dv.dV)(),0===this.categories.length&&this.currentSearchQuery.query&&(this.loading=!0,this.categoryLoadTimeout=window.setTimeout(()=>{0===this.categories.length&&this.handleCategoryLoadTimeout()},2e3)),mQ({searchString:this.currentSearchQuery.query,eventName:"GoTo > Global Search Result Page View",eventType:"load",properties:{}})}disconnectedCallback(){super.disconnectedCallback(),void 0!==this.categoryLoadTimeout&&(window.clearTimeout(this.categoryLoadTimeout),this.categoryLoadTimeout=void 0),this.invalidateQuery&&this.invalidateQuery.cancel();const{inspectorPanel:e}=(0,Dv.Z)();e.isOpen()&&e.close({animate:!1}),this.queryTextResizeObserver.disconnect()}setSelectedCategoryFromResults(e){this.currentSearchQuery.categoryFilterApplicationNames?.length?this.selectedCategory=this.findCategoryByApplicationName(this.currentSearchQuery.categoryFilterApplicationNames[0]):this.selectedCategory=this.findFirstCategoryWithResults(e)}findCategoryByApplicationName(e){return this.categories.find(t=>e===t.application)??this.categories[0]}findFirstCategoryWithResults(e){return this.categories.find(t=>this.categoryHasResults(t,e))??this.categories[0]}categoryHasResults(e,t){const r=this.findResponseForCategory(e,t);return void 0!==r&&(r.total?.value??0)>0}findResponseForCategory(e,t){return t.find(t=>t.application===e.application)}handleCategoryLoadTimeout(){this.loading=!1,this.searchError=!0,(0,Dv.g)().error("Global search categories failed to load within timeout")}firstUpdated(){const e=this.getQueryTextElement();e&&this.queryTextResizeObserver.observe(e)}updated(e){(e.has("currentSearchQuery")||e.has("searchError"))&&this.checkQueryTextTruncation(),e.has("selectedCategory")&&this.currentSearchQuery.query&&(this.currentSearchQuery={...this.currentSearchQuery,categoryFilterApplicationNames:[this.selectedCategory?.application??""]},this.invalidateQuery());const t=this.shouldExecuteSearch,r=e.has("currentSearchQuery")||e.has("categories")||e.has("searchError");t&&r?this.executeSearch():!t&&this.currentSearchQuery.query&&!this.searchError&&(this.loading=!0)}getQueryTextElement(){return this.renderRoot.querySelector("#search-query-text")}executeSearch(){this.previousSearchQuery={...this.currentSearchQuery},this.loading=!0;const e={...this.currentSearchQuery};(0===e.categoryFilterApplicationNames?.length||""===(e.categoryFilterApplicationNames??[])[0])&&(e.categoryFilterApplicationNames=[this.selectedCategory?.application??this.categories[0]?.application]);const t=this.convertPageSelectionsToQueryParams();this.previousParams=t;const r=++this.searchRequestId;(0,Dv.Q)().searchFor(e,t).then(e=>this.handleSearchResponses(e,r)).catch(()=>this.handleSearchError())}validateQuery(){const e=this.currentSearchQuery.query===this.previousSearchQuery.query,t=this.previousParams.pageSize===this.pageSize&&this.previousParams.pageMarker===this.calculateNextPageMarker(),r=this.currentSearchQuery?.categoryFilterApplicationNames,n=this.previousSearchQuery?.categoryFilterApplicationNames;(!e||!(0,Dv.dS)(r,n)||!t)&&this.executeSearch()}resetInitialState(){this.searchResults=[],this.pageNumerator=1,this.pageDenominator=1,this.nextPageMarker=Dv.ew}getResponseForSelectedCategory(e,t){if(!t?.id)return e[0];return e.find(e=>e.application===t.application)||e.find(e=>e.application===t.application)}convertPageSelectionsToQueryParams(){return{pageSize:this.pageSize,pageMarker:this.calculateNextPageMarker()}}async previousPage(){this.pageNumerator--,this.invalidateQuery()}async nextPage(){this.pageNumerator++,this.invalidateQuery()}handleTabChange(e){this.loading=!0,this.resetInitialState(),this.categories.some(t=>t.id===e.id)&&(this.selectedCategory=e,mQ({searchString:this.currentSearchQuery.query,eventName:"GoTo > Global Search Results Page Category Change",eventType:"click",properties:{category:e.application}})),this.currentSearchQuery={...this.currentSearchQuery,categoryFilterApplicationNames:[this.selectedCategory?.application??""]}}getHeadingClass(){return this.searchError?"no-heading-text":"heading-text"}async handleSelectRowsPerPage(e){const t=parseInt(e.target.value);t!==this.pageSize&&(this.pageSize=t,this.pageNumerator=1,this.invalidateQuery())}renderRowsPerPageOptions(){return Dv.aH`${Nb(Dv.ex,e=>Dv.aH` <chameleon-option value=${e}>${e}</chameleon-option>`)} `}renderSearchQueryHeading(){return Dv.aH`<div class="search-query-line ${this.getHeadingClass()}">
5679        <chameleon-typography variant="heading-small" tag="span" class="search-query-prefix"
5680          >${(0,Dv.bQ)("Search results for")} "</chameleon-typography
5681        ><chameleon-typography variant="heading-small" nowrap id="search-query-text" class="search-query-text"
5682          >${this.currentSearchQuery.query}</chameleon-typography
5683        ><chameleon-typography variant="heading-small" tag="span" class="search-query-suffix">"</chameleon-typography>
5684      </div>
5685      ${this.isQueryTextTruncated&&!this.searchError?Dv.aH`<chameleon-tooltip class="search-query-tooltip" trigger-id="search-query-text"
5686            >${this.currentSearchQuery.query}</chameleon-tooltip
5687          >`:Dv.cm}
5688      <chameleon-icon-button
5689        data-testid="close-search-results-page"
5690        variant="primary"
5691        size="small"
5692        class="close-button"
5693        @click=${this.handleClosePageClick}
5694        label=${(0,Dv.bQ)("Close search results page")}
5695      >
5696        <chameleon-svg>${(0,Dv.bR)(xb)}</chameleon-svg>
5697      </chameleon-icon-button>`}renderSearchError(){return Dv.aH`<div class="search-query-heading">${this.renderSearchQueryHeading()}</div>
5698      <goto-search-error size="medium"></goto-search-error>`}renderResultsDisplay(e){return e.id===this.selectedCategory?.id?Dv.aH` <goto-search-results-display
5699          .searchResults=${this.searchResults}
5700          .searchQuery=${this.currentSearchQuery}
5701          .loading=${this.loading}
5702          .showEmptyState=${this.showEmptyState}
5703          .category=${this.selectedCategory}
5704        ></goto-search-results-display>`:Dv.cm}renderResults(){return Dv.aH`<div class="search-results-container">
5705        <div class="search-query-heading">${this.renderSearchQueryHeading()}</div>
5706        ${this.renderContent()}
5707      </div>
5708      ${this.renderFooter()}`}renderContent(){return this.categories.length>0?this.categories.length>1?Dv.aH`<goto-search-results-tabs
5709            .categories=${this.categories}
5710            .selectedCategory=${this.selectedCategory}
5711            .searchResults=${this.searchResults}
5712            ?loading=${this.loading}
5713            .searchQuery=${this.currentSearchQuery}
5714            ?showEmptyState=${this.showEmptyState}
5715            .tabChange=${e=>this.handleTabChange(e)}
5716          ></goto-search-results-tabs>`:this.renderResultsDisplay(this.categories[0]):Dv.cm}renderFooter(){return this.isXSWidth&&!this.selectedCategoryTotalResults?Dv.cm:Dv.aH`<div class="results-table-pager pager">${this.renderRowsPerPageSelector()}${this.renderPagerCount()}</div>`}renderRowsPerPageSelector(){return Dv.aH`<div class="rows-per-page">
5717      <chameleon-typography variant="caption-medium-strong" color="type-color-secondary"
5718        >${(0,Dv.bQ)("Rows per page")}</chameleon-typography
5719      >
5720      <chameleon-select data-testid="rows-per-page-select" @change=${this.handleSelectRowsPerPage} size="small">
5721        ${this.renderRowsPerPageOptions()}
5722      </chameleon-select>
5723    </div>`}renderPagerCount(){const e=this.calculateCurrentPageMarker(),t=Math.min(this.pageSize*this.pageNumerator,this.selectedCategoryTotalResults);return this.selectedCategoryTotalResults>0?Dv.aH`<div class="pager-count">
5724          <chameleon-typography variant="caption-medium-strong" color="type-color-secondary">
5725            ${(0,Dv.bQ)("{{firstResult}} - {{lastResult}} of {{length}}",()=>({firstResult:e,lastResult:t,length:this.selectedCategoryTotalResults}))}
5726          </chameleon-typography>
5727          ${this.renderPageSelector()}
5728        </div>`:Dv.cm}renderPageSelector(){return Dv.aH`<div class="page-selector">
5729      <chameleon-icon-button
5730        class="previous-page-button-data"
5731        disabled=${1===this.pageNumerator}
5732        @click="${()=>{this.previousPage()}}"
5733        size="small"
5734        variant="primary"
5735        id="previous-page"
5736        label=${(0,Dv.bQ)("Previous page")}
5737      >
5738        <chameleon-svg>${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.7071 5.29289L16.1213 6.70711L10.8284 12L16.1213 17.2929L14.7071 18.7071L8 12L14.7071 5.29289Z" fill="currentColor"></path></svg>')}</chameleon-svg>
5739      </chameleon-icon-button>
5740      <chameleon-tooltip trigger-id="previous-page"> ${(0,Dv.bQ)("Previous page")} </chameleon-tooltip>
5741      <chameleon-typography variant="caption-medium-strong" color="type-color-secondary">
5742        ${(0,Dv.bQ)("Page {{pageNumerator}} of {{pageDenominator}}",()=>({pageNumerator:this.pageNumerator,pageDenominator:this.pageDenominator}))}
5743      </chameleon-typography>
5744
5745      <chameleon-icon-button
5746        class="next-page-button-data"
5747        disabled=${this.pageNumerator===this.pageDenominator}
5748        @click="${()=>{this.nextPage()}}"
5749        size="small"
5750        variant="primary"
5751        id="next-page"
5752        label=${(0,Dv.bQ)("Next page")}
5753      >
5754        <chameleon-svg>${(0,Dv.bR)(yb)}</chameleon-svg>
5755      </chameleon-icon-button>
5756      <chameleon-tooltip trigger-id="next-page"> ${(0,Dv.bQ)("Next page")} </chameleon-tooltip>
5757    </div>`}render(){return Dv.aH`
5758      ${this.searchError?this.renderSearchError():this.renderResults()}
5759      <div class="survey-link-container">
5760        <goto-global-search-survey-link></goto-global-search-survey-link>
5761      </div>
5762    `}};C2.tagName="goto-search-results-page";let S2=C2;x2([(0,Dv.ct)()],S2.prototype,"currentSearchQuery"),x2([(0,Dv.ct)()],S2.prototype,"previousSearchQuery"),x2([(0,Dv.ct)()],S2.prototype,"previousParams"),x2([(0,Dv.ct)()],S2.prototype,"searchResults"),x2([(0,Dv.ct)()],S2.prototype,"pageSize"),x2([(0,Dv.ct)()],S2.prototype,"pageNumerator"),x2([(0,Dv.ct)()],S2.prototype,"pageDenominator"),x2([(0,Dv.ct)()],S2.prototype,"nextPageMarker"),x2([(0,Dv.ct)()],S2.prototype,"selectedCategoryTotalResults"),x2([(0,Dv.ct)()],S2.prototype,"sh
5762owEmptyState"),x2([(0,Dv.ct)()],S2.prototype,"searchError"),x2([(0,Dv.ct)()],S2.prototype,"loading"),x2([(0,Dv.ct)()],S2.prototype,"categories"),x2([(0,Dv.ct)()],S2.prototype,"selectedCategory"),x2([(0,Dv.ct)()],S2.prototype,"isXSWidth"),x2([(0,Dv.ct)()],S2.prototype,"isQueryTextTruncated");class E2 extends Dv.bP{constructor(){super(...arguments),this.gridModeChangeListener=e=>{this.classList.toggle("grid-sm","sm"===e),this.classList.toggle("grid-lg","lg"===e)}}connectedCallback(){super.connectedCallback(),this.unsubscribeFunctions.push(ZG().subscribeToGridModeChange(this.gridModeChangeListener))}}const I2=1/3;var A2=Object.defineProperty,T2=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&A2(t,r,i),i};const O2=class extends Dv.bP{constructor(){super(...arguments),this._containerWidth=0,this._isDragging=!1,this._dragStartX=0,this._dragStartWidth=0,this.onResizerPointerDown=e=>{e.preventDefault(),e.currentTarget.setPointerCapture?.(e.pointerId),this._isDragging=!0,this._pendingWidth=void 0,this._dragStartX=e.clientX,this._dragStartWidth=this.effectiveWidth??this.boundaryPx},this.onResizerPointerMove=e=>{if(!this._isDragging)return;const t=e.clientX-this._dragStartX;this._pendingWidth=this.clampWidth(this._dragStartWidth+t),null==this._dragRafId&&(this._dragRafId=requestAnimationFrame(this.flushPendingWidth))},this.flushPendingWidth=()=>{this._dragRafId=void 0,null!=this._pendingWidth&&(this._internalWidth=this._pendingWidth)},this.onResizerPointerUp=e=>{e.currentTarget.releasePointerCapture?.(e.pointerId),this.finishDrag()},this.onResizerPointerCancel=()=>{this.finishDrag()},this.onResizerDoubleClick=()=>{this._internalWidth=void 0,this.dispatchEvent(new CustomEvent("pane-reset",{detail:{index:0},bubbles:!0,composed:!0}))},this.onResizerKeyDown=e=>{const t=e.shiftKey?48:16,r=this.effectiveWidth??this.boundaryPx;if("ArrowLeft"===e.key)this._internalWidth=this.clampWidth(r-t);else{if("ArrowRight"!==e.key)return;this._internalWidth=this.clampWidth(r+t)}e.preventDefault(),this.emitResize()}}connectedCallback(){super.connectedCallback(),typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>{const t=e[0]?.contentRect.width;this._containerWidth="number"==typeof t?t:this.clientWidth}),this._resizeObserver.observe(this)),this.unsubscribeFunctions.push(()=>{this._resizeObserver?.disconnect(),this._resizeObserver=void 0,this.cancelDragFrame()})}firstUpdated(e){0===this._containerWidth&&(this._containerWidth=this.clientWidth)}willUpdate(e){e.has("resizablePanes")&&!this._isDragging&&(this._internalWidth=this.firstPane?.width)}get firstPane(){return this.resizablePanes?.[0]}get lastPane(){const e=this.resizablePanes;return e&&e.length>0?e[e.length-1]:void 0}render(){const e=(e=>null!=e?`${e}px`:"33.333%")(this.effectiveWidth);return Dv.aH`<div
5763      class="split-pane${this._isDragging?" is-dragging":""}"
5764      style="grid-template-columns: ${e} 1fr;"
5765    >
5766      <slot></slot>
5767      <div
5768        class="resizer${this._isDragging?" is-dragging":""}"
5769        style="left: ${e};"
5770        id="split-pane-resizer"
5771        part="resizer"
5772        role="separator"
5773        aria-orientation="vertical"
5774        aria-label=${(0,Dv.bQ)("Resize panes")}
5775        tabindex="0"
5776        aria-valuenow=${Math.round(this.boundaryPx)}
5777        aria-valuemin=${Math.round(this.firstPane?.minWidth??0)}
5778        aria-valuemax=${Math.round(this.resizerAriaMax)}
5779        @pointerdown=${this.onResizerPointerDown}
5780        @pointermove=${this.onResizerPointerMove}
5781        @pointerup=${this.onResizerPointerUp}
5782        @pointercancel=${this.onResizerPointerCancel}
5783        @lostpointercapture=${this.onResizerPointerCancel}
5784        @dblclick=${this.onResizerDoubleClick}
5785        @keydown=${this.onResizerKeyDown}
5786      >
5787        <span class="resizer-bar"></span>
5788      </div>
5789      ${this.renderResizerTooltip()}
5790    </div>`}renderResizerTooltip(){return this._isDragging?Dv.cm:Dv.aH`<chameleon-tooltip trigger-id="split-pane-resizer" position="right-center">
5791      ${(0,Dv.bQ)("Double-click to return to default width")}
5792    </chameleon-tooltip>`}get clampBounds(){return{containerWidth:this._containerWidth,paneMinWidth:this.firstPane?.minWidth??0,paneMaxWidth:this.firstPane?.maxWidth??Number.POSITIVE_INFINITY,lastPaneMinWidth:this.lastPane?.minWidth??0}}clampWidth(e){return((e,t)=>{const{containerWidth:r,paneMinWidth:n,paneMaxWidth:o,lastPaneMinWidth:i}=t,s=r>0?r-i:Number.POSITIVE_INFINITY,a=Math.min(o,s);return Math.max(n,Math.min(e,Math.max(n,a)))})(e,this.clampBounds)}get effectiveWidth(){return null==this._internalWidth?void 0:this.clampWidth(this._internalWidth)}get boundaryPx(){const e=this._containerWidth||this.clientWidth||this.offsetWidth;return((e,t)=>e??t*I2)(this.effectiveWidth,e)}get resizerAriaMax(){return(e=>{const{containerWidth:t,paneMinWidth:r,paneMaxWidth:n,lastPaneMinWidth:o}=e,i=t>0?t-o:n;return Math.max(r,Math.min(n,i))})(this.clampBounds)}cancelDragFrame(){null!=this._dragRafId&&(cancelAnimationFrame(this._dragRafId),this._dragRafId=void 0)}finishDrag(){this._isDragging&&(this.cancelDragFrame(),null!=this._pe
5792ndingWidth&&(this._internalWidth=this._pendingWidth,this._pendingWidth=void 0),this._isDragging=!1,this.emitResize())}emitResize(){const e=Math.round(this.effectiveWidth??this.boundaryPx);this.dispatchEvent(new CustomEvent("pane-resize",{detail:{index:0,width:e},bubbles:!0,composed:!0}))}};O2.tagName="goto-split-pane",O2.styles=(0,Dv.ck)(":host{display:block;width:100%;height:100%;overflow:hidden}:host ::slotted(*){min-width:0}:host .split-pane{display:grid;grid-template-rows:1fr;width:100%;height:100%;position:relative}:host .split-pane.is-dragging{-webkit-user-select:none;user-select:none;cursor:col-resize}:host .resizer{position:absolute;top:0;bottom:0;width:var(--goto-spacing-05);transform:translate(-50%);display:flex;align-items:stretch;justify-content:center;cursor:col-resize;touch-action:none;z-index:1}:host .resizer:focus-visible{outline:none}:host .resizer-bar{width:var(--goto-spacing-02);height:100%;background-color:var(--goto-surface-color-brand-default);opacity:0;transition:opacity var(--goto-duration-relaxed-01, .4s) var(--goto-standard-easing)}:host .resizer:hover .resizer-bar,:host .resizer:focus-visible .resizer-bar,:host .resizer.is-dragging .resizer-bar{opacity:1}");let L2=O2;T2([(0,Dv.cn)({attribute:!1})],L2.prototype,"resizablePanes"),T2([(0,Dv.ct)()],L2.prototype,"_internalWidth"),T2([(0,Dv.ct)()],L2.prototype,"_containerWidth"),T2([(0,Dv.ct)()],L2.prototype,"_isDragging");var $2=Object.defineProperty,N2=Object.getOwnPropertyDescriptor,R2=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?N2(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&$2(t,r,i),i};const P2=class extends E2{constructor(){super(...arguments),this.shouldUsePaneMode=!1,this._currentIndex=0,this.resizable=!1,this.gridMode="sm",this.handleGridModeChange=e=>{this.gridMode=e},this.handleBreakpointChange=e=>{e.active!==this.shouldUsePaneMode&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.shouldUsePaneMode=e.active,this.updatePanesPosition(),this.updateInertAttribute()}}get currentIndex(){return this._currentIndex}set currentIndex(e){const t=Math.max(0,this.getPaneElements().length-1);this._currentIndex=Math.max(0,Math.min(e,t)),this.updatePanesPosition(),this.updateInertAttribute()}connectedCallback(){super.connectedCallback(),this.unsubscribeFunctions.push(Xv(void 0,"md",this.handleBreakpointChange)),this.unsubscribeFunctions.push(ZG().subscribeToGridModeChange(this.handleGridModeChange))}firstUpdated(e){super.firstUpdated(e),this.updatePanesPosition(),this.updateInertAttribute()}render(){return this.shouldUsePaneMode?this.renderPanes():this.isResizeActive?this.renderResizable():this.renderDefault()}get isResizeActive(){return this.resizable&&"lg"===this.gridMode&&!this.shouldUsePaneMode}renderDefault(){return Dv.aH`<goto-responsive-grid part="responsive-grid">
5793      <slot></slot>
5794    </goto-responsive-grid>`}renderPanes(){return Dv.aH`<div class="container">
5795      <slot></slot>
5796    </div>`}renderResizable(){return Dv.aH`<goto-split-pane
5797      part="split-pane"
5798      exportparts="resizer"
5799      .resizablePanes=${this.resizablePanes}
5800    >
5801      <slot></slot>
5802    </goto-split-pane>`}updatePanesPosition(){this.shouldUsePaneMode?this.setPanesPosition():this.resetPanesPosition()}updateInertAttribute(){const e=this.getPaneElements();this.shouldUsePaneMode?e.forEach((e,t)=>{t===this._currentIndex?e.removeAttribute("inert"):e.setAttribute("inert","")}):e.forEach(e=>{e.removeAttribute("inert")})}setPanesPosition(){const e=100*this._currentIndex;this.getPaneElements().forEach(t=>{t.style.transform=`translateX(${-e}%)`})}resetPanesPosition(){this.getPaneElements().forEach(e=>{e.style.transform=""})}getPaneElements(){return this.shadowRoot?.querySelector("slot")?.assignedElements()||[]}};P2.tagName="goto-responsive-grid-pane",P2.styles=(0,Dv.ck)(":host{--goto-responsive-grid-item-padding: var(--goto-spacing-04);overflow:hidden;display:flex;flex-direction:column}:host .container{display:flex;width:100%;height:inherit;transition:transform var(--goto-duration-modest-02) var(--goto-standard-easing)}:host::part(responsive-grid){height:100%}:host ::slotted(*){flex:0 0 100%;box-sizing:border-box;padding:var(--goto-responsive-grid-item-padding);transition:opacity var(--goto-duration-modest-02) var(--goto-standard-easing),transform var(--goto-duration-modest-02) var(--goto-standard-easing)}");let D2=P2;R2([(0,Dv.ct)()],D2.prototype,"shouldUsePaneMode",2),R2([(0,Dv.cn)({type:Number,reflect:!0})],D2.prototype,"currentIndex",1),R2([(0,Dv.cn)({type:Boolean,reflect:!0})],D2.prototype,"resizable",2),R2([(0,Dv.cn)({attribute:!1})],D2.prototype,"resizablePanes",2),R2([(0,Dv.ct)()],D2.prototype,"gridMode",2);var M2=Object.defineProperty;const z2=class extends Dv.bP{constructor(){super(...arguments),this.handleKeyPress=e=>
5802{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),this.handleClick(e))},this.handleClick=e=>{if(this.searchSuggestion){const t=new CustomEvent("suggestion-click",{bubbles:!0,composed:!0,detail:{...this.searchSuggestion,eventType:e instanceof KeyboardEvent?"keydown":"click"}});this.dispatchEvent(t)}}}static get styles(){return(0,Dv.ck)(":host{display:flex;cursor:pointer}:host(:hover),:host(:focus),:host(.selected) .search-suggestion{background-color:var(--goto-interactive-color-secondary-hover)}.search-suggestion{display:flex;width:100%;align-items:center;gap:var(--goto-spacing-03);padding:var(--goto-spacing-01) var(--goto-spacing-03)}.search-suggestion chameleon-icon-badge{--goto-icon-color: var(--goto-icon-color-brand-default)}")}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyPress)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyPress)}render(){if(!this.searchSuggestion)return Dv.cm;const{icon:e,label:t}=this.searchSuggestion;return Dv.aH`
5803      <div
5804        class="search-suggestion"
5805        role="button"
5806        tabindex="0"
5807        @click=${this.handleClick}
5808        @keydown=${this.handleKeyPress}
5809      >
5810        <chameleon-icon-badge variant="secondary" size="small" color-token="goto-surface-color-brand-secondary"
5811          ><chameleon-svg>${(0,Dv.bR)(e.toString())}</chameleon-svg>
5812        </chameleon-icon-badge>
5813        <chameleon-typography variant="body-small">${t}</chameleon-typography>
5814      </div>
5815    `}};z2.tagName="goto-global-search-suggestion";let F2=z2;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&M2(t,r,o)})([(0,Dv.cn)({type:Object})],F2.prototype,"searchSuggestion");const U2=class extends E2{render(){return Dv.aH`<slot></slot>`}};U2.tagName="goto-responsive-grid",U2.styles=(0,Dv.ck)(":host{--goto-responsive-grid-item-padding: var(--goto-spacing-04);display:grid;grid-template-columns:repeat(var(--goto-responsiveness-column-count),1fr);grid-template-rows:1fr;grid-column:span var(--goto-responsiveness-column-count);width:100%}:host ::slotted(*){box-sizing:border-box;padding:var(--goto-responsive-grid-item-padding)}:host(.grid-lg){--goto-responsiveness-column-count: 12}:host(.grid-lg) ::slotted(:not([class^=lg-])){grid-column:span var(--goto-responsiveness-column-count)}:host(.grid-lg) ::slotted(.lg-1){grid-column:span 1}:host(.grid-lg) ::slotted(.lg-2){grid-column:span 2}:host(.grid-lg) ::slotted(.lg-3){grid-column:span 3}:host(.grid-lg) ::slotted(.lg-4){grid-column:span 4}:host(.grid-lg) ::slotted(.lg-5){grid-column:span 5}:host(.grid-lg) ::slotted(.lg-6){grid-column:span 6}:host(.grid-lg) ::slotted(.lg-7){grid-column:span 7}:host(.grid-lg) ::slotted(.lg-8){grid-column:span 8}:host(.grid-lg) ::slotted(.lg-9){grid-column:span 9}:host(.grid-lg) ::slotted(.lg-10){grid-column:span 10}:host(.grid-lg) ::slotted(.lg-11){grid-column:span 11}:host(.grid-lg) ::slotted(.lg-12){grid-column:span 12}:host(.grid-sm){--goto-responsiveness-column-count: 6}:host(.grid-sm) ::slotted(:not([class^=sm-])){grid-column:span var(--goto-responsiveness-column-count)}:host(.grid-sm) ::slotted(.sm-1){grid-column:span 1}:host(.grid-sm) ::slotted(.sm-2){grid-column:span 2}:host(.grid-sm) ::slotted(.sm-3){grid-column:span 3}:host(.grid-sm) ::slotted(.sm-4){grid-column:span 4}:host(.grid-sm) ::slotted(.sm-5){grid-column:span 5}:host(.grid-sm) ::slotted(.sm-6){grid-column:span 6}");let B2=U2;var H2=Object.defineProperty,j2=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&H2(t,r,i),i};const V2=class extends Dv.bP{constructor(){super(...arguments),this.searchString="",this.searchResult={title:"",preview:"",subtitle:"",userKey:"",icon:"",detailInfo:"",detailIcon:"",actions:[],originalResult:{},defaultAction:{}}}shouldShowPresence(){return!0}static get styles(){return(0,Dv.ck)(":host{display:flex;margin:0 var(--goto-spacing-02) var(--goto-spacing-02) var(--goto-spacing-02);width:100%;border:1px solid var(--goto-border-color-secondary);border-radius:var(--goto-radius-small)}.search-result-item{display:flex;align-items:center;justify-content:space-between;padding:var(--goto-spacing-02) var(--goto-spacing-03) var(--goto-spacing-02) var(--goto-spacing-02);width:100%}.search-result-display-preview,.search-result-display-subtitle{display:flex;width:100%}.search-result-display-preview{align-items:flex-start}.search-result-display-subtitle{align-items:center}.title-and-preview{display:flex;flex-direction:column;justify-content:center;flex-grow:1;margin-left:var(--goto-spacing-03)}.search-result-title,.search-result-preview{display:flex;justify-content:space-between;word-break:break-all}.detail-info-and-icon{display:flex;gap:var(--goto-spacing-02);align-items:center;--goto-icon-color: var(--goto-type-color-secondary)}")}renderParticipantsAvatarGroup(e,t){return Dv.aH`<goto-participants-avatar-group
5816      .participants=${e}
5817      .size=${t}
5818      .showLabel=${!1}
5819    ></goto-participants-avatar-group>`}renderPersonAvatar(e){return Dv.aH`
5820      <goto-avatar
5821        .showPresence=${this.shouldShowPresence()}
5822        .externalUserKey=${this.searchResult.userKey}
5823        .familyName=${this.searchResult.familyName??""}
5824        .givenName=${this.searchResult.givenName??""}
5825        .size=${e}
5826        variant="primary"
5827      ></goto-avatar>
5828    `}renderIconAvatar(e){return Dv.aH`
5829      <chameleon-avatar .size=${e} class="round-icon" aria-hidden="true" label="">
5830        <chameleon-svg>${(0,Dv.bR)(this.searchResult.icon)}</chameleon-svg>
5831      </chameleon-avatar>
5832    `}renderFallbackAvatar(e){return Dv.aH` <goto-avatar .size=${e} variant="primary"></goto-avatar> `}renderIconOrAvatar(){const e=this.searchResult.preview?UW.SMALL:UW.LARGE;return this.searchResult.participants?.length?this.renderParticipantsAvatarGroup(this.searchResult.participants,e):this.searchResult.userKey||this.searchResult.givenName||this.searchResult.familyName?this.renderPersonAvatar(e):this.searchResult.icon?this.renderIconAvatar(e):this.renderFallbackAvatar(e)}renderTitle(){return Dv.aH` <div class="search-result-title">
5833      <chameleon-typography line-clamp="1" variant="body-small-strong">
5834        <goto-text-highlight
5835          class="title-highlight"
5836          ignoreCase
5837          ignoreAccents
5838          phoneNumbers
5839          .value=${this.searchResult.title}
5840          .keywords=${this.getKeywords()}
5841        ></goto-text-highlight>
5842      </chameleon-typography>
5843      ${this.renderDetails()}
5844    </div>`}renderDetails(){return this.searchResult.detailIcon||this.searchResult.detailInfo?Dv.aH` <div class="detail-info-and-icon">${this.renderDetailInfo()}${this.renderDetailIcon()}</div>`:Dv.cm}renderDetailInfo(){return this.searchResult.detailInfo?Dv.aH`
5845          <chameleon-typography variant="caption-small" color="type-color-secondary"
5846            >${this.searchResult.detailInfo}</chameleon-typography
5847          >
5848        `:Dv.cm}renderDetailIcon(){return this.searchResult.detailIcon?Dv.aH` <chameleon-svg color="type-color-secondary">${(0,Dv.bR)(this.searchResult.detailIcon)}</chameleon-svg> `:Dv.cm}getKeywords(){return(0,Dv.e0)(this.searchString)}renderSubtitleOrPreview(){return Dv.aH`
5849      <chameleon-typography
5850        line-clamp=${this.searchResult.preview?"2":"1"}
5851        class="search-result-preview"
5852        variant="caption-medium"
5853        color="type-color-secondary"
5854        ><goto-text-highlight
5855          class="preview-highlight"
5856          ignoreCase
5857          ignoreAccents
5858          phoneNumbers
5859          .value=${this.searchResult.preview?(0,Dv.e1)(this.searchResult.preview):this.searchResult.subtitle??""}
5860          .keywords=${this.getKeywords()}
5861        ></goto-text-highlight>
5862      </chameleon-typography>
5863    `}getDisplayClass(){return"search-result-display-"+(this.searchResult.preview?"preview":"subtitle")}render(){return Dv.aH`<div class="search-result-item ${this.getDisplayClass()}">
5864      ${this.renderIconOrAvatar()}
5865      <div class="title-and-preview">${this.renderTitle()} ${this.renderSubtitleOrPreview()}</div>
5866    </div>`}};V2.tagName="goto-search-result-item";let W2=V2;j2([(0,Dv.cn)({type:String})],W2.prototype,"searchString"),j2([(0,Dv.cn)({type:Object})],W2.prototype,"searchResult");var K2=Object.defineProperty,q2=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&K2(t,r,i),i};const G2=class extends Dv.bP{constructor(){super(...arguments),this.show
5866FullSearch=!0,this.showSearchField=!1,this.documentClickHandler=e=>{if(!this.showFullSearch&&this.showSearchField){const t=e.target;this.globalSearchElement?.contains(t)||this.resetSearchFieldState()}},this.handleSearchIconClick=()=>{this.showSearchField=!this.showSearchField,this.showSearchField?(0,Dv.cZ)().then(()=>(0,Dv.bL)().addEventListener("click",this.documentClickHandler)):(0,Dv.bL)().removeEventListener("click",this.documentClickHandler)}}static get styles(){return(0,Dv.ck)(".show-search-field{position:absolute;top:45px;left:50%;transform:translate(-50%);--topbar-global-search-available-width: calc(100% - var(--goto-spacing-07));width:var(--topbar-global-search-available-width)}.show-search-field goto-global-search::part(popover){--element-padding: var(--goto-spacing-01)}.hide-search-field{display:none}.compact-search{display:flex;justify-content:flex-end}")}connectedCallback(){super.connectedCallback(),this.setupResizeObserver(),this.unsubscribeFunctions.push(()=>{this.resizeObserver?.disconnect(),(0,Dv.bL)().removeEventListener("click",this.documentClickHandler)})}setupResizeObserver(){this.resizeObserver=new ResizeObserver(e=>{for(const t of e){const e=t.contentRect.width;this.showFullSearch=e>150}}),this.resizeObserver.observe(this)}resetSearchFieldState(){this.showSearchField=!1,(0,Dv.bL)().removeEventListener("click",this.documentClickHandler)}getSearchFieldClass(){return this.showSearchField?"show-search-field":"hide-search-field"}handleSearchFieldFocusOut(){this.resetSearchFieldState()}render(){return this.showFullSearch?Dv.aH`
5867        <div class="full-search" part="full-search">
5868          <goto-global-search .searchFieldAction=${this.searchFieldAction}></goto-global-search>
5869        </div>
5870      `:Dv.aH`
5871      <div class="compact-search" part="compact-search">
5872        <chameleon-icon-button
5873          class="search-icon"
5874          size="large"
5875          @click=${this.handleSearchIconClick}
5876          label=${(0,Dv.bQ)("Search")}
5877        >
5878          <chameleon-svg>${Ob}</chameleon-svg></chameleon-icon-button
5879        >
5880        <div class=${this.getSearchFieldClass()} @focusout=${this.handleSearchFieldFocusOut}>
5881          <goto-global-search .searchFieldAction=${this.searchFieldAction}></goto-global-search>
5882        </div>
5883      </div>
5884    `}};G2.tagName="goto-topbar-global-search";let Z2=G2;q2([(0,Dv.ct)()],Z2.prototype,"showFullSearch"),q2([(0,Dv.ct)()],Z2.prototype,"showSearchField"),q2([(0,Dv.bS)("goto-global-search")],Z2.prototype,"globalSearchElement"),q2([(0,Dv.cn)({attribute:!1})],Z2.prototype,"searchFieldAction");var Y2=Object.defineProperty,J2=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&Y2(t,r,i),i};const Q2=class extends Dv.bP{constructor(){super(...arguments),this.pbxs=[],this.selectedAccountKey="",this.renderAccountOption=e=>{const t=this.selectedAccountKey===e.accountKey;return Dv.aH`<chameleon-menu-item
5885      @menuitemclick=${()=>this.handleAccountChange(e)}
5886      title=${(0,Dv.cq)(e.name)}
5887    >
5888      ${e.name}
5889      ${t?Dv.aH`<chameleon-svg slot="end">${(0,Dv.bR)('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path fill-rule="evenodd" clip-rule="evenodd" d="M18.7071 8.70711L10.5 16.9142L6.29289 12.7071L7.70711 11.2929L10.5 14.0858L17.2929 7.29289L18.7071 8.70711Z" fill="currentColor"></path></svg>')}</chameleon-svg>`:Dv.cm}
5890    </chameleon-menu-item>`}}connectedCallback(){super.connectedCallback(),this.pbxs=(0,Dv.cp)(),this.setSelectedAccount()}focus(){const e=this.shadowRoot?.querySelectorAll("chameleon-menu-item");Array.from(e||[]).find(e=>!e.disabled)?.focus()}render(){const e=this.getSelectedAccountName();return e&&this.pbxs.length>1?Dv.aH`<chameleon-menu-item tabindex="0" title=${e}>
5891          ${e}
5892          <chameleon-svg slot="end">${yb}</chameleon-svg>
5893
5894          <chameleon-menu label="Account selector" slot="submenu">
5895            ${Nb(this.pbxs,this.renderAccountOption)}
5896          </chameleon-menu>
5897        </chameleon-menu-item>`:Dv.cm}handleAccountChange(e){(0,Dv.cr)().track("GoTo > Avatar > Account Switcher",{action:"select"});const t=e.accountKey??"";(e=>{(0,Dv.Z)().context.account?.updateAccountKey(e)})(t);const r=e?.id??"",n=e?.userInfo?.userId??"",o=(0,Dv.Z)().user.key??"";this.selectedAccountKey=t,(e=>{(0,Dv.Z)().context.pbx?.updateId(e)})(r),(e=>{(0,Dv.Z)().context.pbx?.updateUserId(e)})(n);const i={accountKey:t,accountName:this.getSelectedAccountName(),pbxId:r,pbxUserId:n,externalUserKey:o};(0,Dv.ab)(i)}setSelectedAccount(){const e=(0,Dv.Z)().context.account?.key,t=this.pbxs[0],r=this.pbxs.some(t=>t.accountKey===e);this.selectedAccountKey=r?e:t?.accountKey}getSelectedAccountName(){return this.pbxs.find(e=>e.accountKey===this.selectedAccountKey)?.name??""}};Q2.tagName="goto-account-switcher-submenu";let X2=Q2;
5897J2([(0,Dv.ct)()],X2.prototype,"pbxs"),J2([(0,Dv.ct)()],X2.prototype,"selectedAccountKey");var e3=Object.defineProperty,t3=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&e3(t,r,i),i};const r3=class extends Dv.bP{constructor(){super(...arguments),this.tabChange=()=>"",this.categories=[],this.searchResults=[],this.loading=!1,this.searchQuery={query:""},this.showEmptyState=!1}firstUpdated(e){super.firstUpdated(e),this.setTabIdForSelectedCategory()}updated(e){super.updated(e),e.has("selectedCategory")&&this.setTabIdForSelectedCategory()}handleTabChange(e){const t=(e?this.shadowRoot?.getElementById(e):null)?.getAttribute("data-testid"),r=this.categories.find(e=>e.displayNameKey===t);r&&this.tabChange(r)}setTabIdForSelectedCategory(){const e=this.selectedCategory?.displayNameKey,t=this.chameleonTabs?.querySelector(`chameleon-tab[data-testid="${e}"]`);this.selectedTabId=t?"tab-"+this.selectedCategory?.displayNameKey:this.categories.length>0?"tab-"+this.categories[0].displayNameKey:void 0}renderResultsTab(e){const t=e.displayNameKey??"";return Dv.aH`<chameleon-tab data-testid=${t} id=${`tab-${t}`}
5898      >${(0,Dv.bQ)(e.displayNameKey??"")}</chameleon-tab
5899    >`}renderResultsTabPanel(e){return Dv.aH`<chameleon-tab-panel> ${this.renderResultsDisplay(e)} </chameleon-tab-panel>`}renderResultsDisplay(e){return e.id===this.selectedCategory?.id?Dv.aH` <goto-search-results-display
5900          .searchResults=${this.searchResults}
5901          .searchQuery=${this.searchQuery}
5902          .loading=${this.loading}
5903          .showEmptyState=${this.showEmptyState}
5904          .category=${this.selectedCategory}
5905        ></goto-search-results-display>`:Dv.cm}render(){return Dv.aH` <chameleon-tabs
5906      label="Category filter for search results"
5907      @change=${e=>this.handleTabChange(e.target.activeid)}
5908      activeid=${(0,Dv.cq)(this.selectedTabId)}
5909    >
5910      ${Nb(this.categories,e=>e.id,e=>this.renderResultsTab(e))}
5911      ${Nb(this.categories,e=>e.id,e=>this.renderResultsTabPanel(e))}
5912    </chameleon-tabs>`}};r3.tagName="goto-search-results-tabs";let n3=r3;t3([(0,Dv.bS)("chameleon-tabs")],n3.prototype,"chameleonTabs"),t3([(0,Dv.cn)({attribute:!1})],n3.prototype,"tabChange"),t3([(0,Dv.cn)({type:Array})],n3.prototype,"categories"),t3([(0,Dv.cn)({type:Object})],n3.prototype,"selectedCategory"),t3([(0,Dv.cn)({type:Array})],n3.prototype,"searchResults"),t3([(0,Dv.cn)({type:Boolean})],n3.prototype,"loading"),t3([(0,Dv.cn)({type:Object})],n3.prototype,"searchQuery"),t3([(0,Dv.cn)({type:Boolean})],n3.prototype,"showEmptyState"),t3([(0,Dv.ct)()],n3.prototype,"selectedTabId");var o3=Object.defineProperty;const i3=class extends Dv.bP{constructor(){super(...arguments),this.isButton=!1}static get styles(){return(0,Dv.ck)(".feedback-wrapper{display:flex;gap:var(--goto-spacing-01);align-items:center}chameleon-button{border:1px solid transparent}.selected{background-color:var(--goto-interactive-color-secondary-hover);border-color:var(--goto-interactive-color-secondary-hover)}")}close(){$j().close()}renderLink(){return Dv.aH`
5913      <div class="feedback-wrapper">
5914        <chameleon-typography variant="caption-small"> ${(0,Dv.bQ)("How did your search go?")} </chameleon-typography>
5915        <chameleon-link variant="caption-small" @click=${this.handleGiveFeedbackClick}>
5916          ${(0,Dv.bQ)("Share feedback")}
5917        </chameleon-link>
5918      </div>
5919    `}getButtonSelectedClass(){return this.classList.contains("selected")?"selected":""}renderButton(){return Dv.aH`
5920      <chameleon-button
5921        class=${`global-search-feedback-button ${this.getButtonSelectedClass()}`}
5922        @click=${this.handleGiveFeedbackClick}
5923        variant="tertiary"
5924        size="small"
5925      >
5926        ${(0,Dv.bQ)("How did your search go? Share feedback")}
5927      </chameleon-button>
5928    `}render(){return(0,Dv.bs)(Dv.bt.SHELL_GLOBAL_SEARCH_FEEDBACK)?this.isButton?this.renderButton():this.renderLink():Dv.cm}handleGiveFeedbackClick(){Mv().retrieve(CQ).commands.openGlobalSearchSurvey.execute()}};i3.tagName="goto-global-search-survey-link";let s3=i3;((e,t,r)=>{for(var n,o=void 0,i=e.length-1;i>=0;i--)(n=e[i])&&(o=n(t,r,o)||o);o&&o3(t,r,o)})([(0,Dv.cn)({type:Boolean})],s3.prototype,"isButton");var a3,l3=Object.defineProperty,c3=(e,t,r,n)=>{for(var o,i=void 0,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);return i&&l3(t,r,i),i};const d3=(a3=class extends Dv.bP{constructor(){super(...arguments),this._uid=a3._
5928counter++,this.participants=[],this.size=UW.SMALL,this.showLabel=!1,this._isOpen=!1}static get styles(){return(0,Dv.ck)(":host{display:inline-flex;align-items:center}.avatar-stack{display:inline-flex;align-items:center}.avatar-stack goto-avatar{position:relative;box-sizing:border-box;box-shadow:0 0 0 2px var(--goto-background-color-default)}.avatar-stack chameleon-avatar[hint]{position:relative;box-sizing:border-box;box-shadow:0 0 0 2px var(--goto-background-color-default)}.avatar-stack chameleon-avatar[hint][size=small]{margin-inline-start:-10px}.avatar-stack chameleon-avatar[hint][size=medium]{margin-inline-start:-12px}.avatar-stack chameleon-avatar[hint][size=large]{margin-inline-start:-14px}.avatar-stack chameleon-avatar[hint][size=xlarge]{margin-inline-start:-16px}.trigger{display:inline-flex;align-items:center;gap:var(--goto-spacing-02);cursor:default}.label{min-width:0}.popover-list{display:flex;flex-direction:column;gap:var(--goto-spacing-02);padding:var(--goto-spacing-03);list-style:none;margin:0}.popover-row{display:flex;align-items:center;gap:var(--goto-spacing-02)}")}get _triggerId(){return`participants-avatar-group-${this._uid}`}_handleMouseEnter(){this._isOpen=!0}_handleMouseLeave(){this._isOpen=!1}_handleFocusIn(){this._isOpen=!0}_handleFocusOut(e){this.renderRoot.contains(e.relatedTarget)||(this._isOpen=!1)}_handleKeyDown(e){"Escape"===e.key&&(this._isOpen=!1)}get _avatarGroupAriaLabel(){const e=this.participants.length;return(0,Dv.bQ)("{{count}} Participants",()=>({count:e}))}_participantKey(e,t){return e.userKey??`participant-${t}`}_renderAvatarStack(){const e=this.participants[0],t=this.participants.length-1;return this.participants.length?Dv.aH`
5929          <div class="avatar-stack" role="group" aria-label=${this._avatarGroupAriaLabel}>
5930            <goto-avatar
5931              .showPresence=${!1}
5932              .externalUserKey=${e.userKey}
5933              .givenName=${e.givenName??""}
5934              .familyName=${e.familyName??""}
5935              .size=${this.size}
5936              variant="primary"
5937            ></goto-avatar>
5938            ${t>0?Dv.aH`<chameleon-avatar
5939                  hint=""
5940                  size=${this.size}
5941                  label=${(0,Dv.bQ)("{{count}} more participants",()=>({count:t}))}
5942                  >+${t}</chameleon-avatar
5943                >`:Dv.cm}
5944          </div>
5945        `:Dv.cm}_renderLabel(){if(!this.showLabel||!this.participants.length)return Dv.cm;const e=this.participants[0],t=(0,Dv.cz)({givenName:e.givenName??"",familyName:e.familyName??""}),r=this.participants.length>1?", +"+(this.participants.length-1):"";return Dv.aH`
5946      <chameleon-typography class="label" nowrap variant="body-small" color="type-color-primary">
5947        ${t}${r}
5948      </chameleon-typography>
5949    `}_renderPopover(){if(!this.showLabel)return Dv.cm;const e=this.participants.length<=1;return Dv.aH`
5950      <chameleon-popover
5951        trigger-id=${this._triggerId}
5952        position="bottom-start"
5953        disable-focus-trap
5954        .isOpen=${this._isOpen}
5955        width="220"
5956        ?hidden=${e}
5957      >
5958        <chameleon-typography variant="body-medium-strong"> ${(0,Dv.bQ)("Participants")} </chameleon-typography>
5959        <ul class="popover-list">
5960          ${Nb(this.participants,(e,t)=>this._participantKey(e,t),e=>Dv.aH`
5961              <li class="popover-row">
5962                <goto-avatar
5963                  .showPresence=${!1}
5964                  .size=${UW.SMALL}
5965                  .externalUserKey=${e.userKey}
5966                  .givenName=${e.givenName??""}
5967                  .familyName=${e.familyName??""}
5968                  variant="primary"
5969                ></goto-avatar>
5970                <chameleon-typography variant="body-small" color="type-color-primary">
5971                  ${(0,Dv.cz)({givenName:e.givenName??"",familyName:e.familyName??""})}
5972                </chameleon-typography>
5973              </li>
5974            `)}
5975        </ul>
5976      </chameleon-popover>
5977    `}render(){return this.showLabel?Dv.aH`
5978        <div
5979          id=${this._triggerId}
5980          class="trigger"
5981          tabindex="0"
5982          @mouseenter=${this._handleMouseEnter}
5983          @mouseleave=${this._handleMouseLeave}
5984          @focusin=${this._handleFocusIn}
5985          @focusout=${this._handleFocusOut}
5986          @keydown=${this._handleKeyDown}
5987        >
5988          ${this._renderAvatarStack()} ${this._renderLabel()}
5989        </div>
5990        ${this._renderPopover()}
5991      `:this._renderAvatarStack()}},a3.tagName="goto-participants-avatar-group",a3._counter=0,a3);c3([(0,Dv.cn)({type:Array})],d3.prototype,"participants"),c3([(0,Dv.cn)({type:String})],d3.prototype,"size"),c3([(0,Dv.cn)({type:Boolean})],d3.prototype,"showLabel"),c3([(0,Dv.ct)()],d3.prototype,"_isOpen");let u3=d3;const h3={[Hq.tagName]:Hq,[Lq.tagName]:Lq,[CX.tagName]:CX,[qq.tagName]:qq,[pq.tagName]:pq,[NX.tagName]:NX,[DW.tagName]:DW,[uZ.tagName]:uZ,[a1.tagName]:a1,[rG.tagName]:rG,[Jq.tagName]:Jq,[OY.tagName]:OY,[NY.tagName]:NY,[CY.tagName]:CY,[IY.tagName]:IY,[Z1.tagName]:Z1,[aZ.tagName]:aZ,[FW.tagName]:FW,[mq.tagName]:mq,[JW.tagName]:JW,[AZ.tagName]:AZ,[X1.tagName]:X1,[sq.tagName]:sq,[f2.tagName]:f2,[KX.tagName]:KX,[cQ.tagName]:cQ,[ZJ.tagName]:ZJ,[fZ.tagName]:fZ,[vZ.tagName]:vZ,[WK.tagName]:WK,[wZ.tagName]:wZ,[jJ.tagName]:jJ,[XX.tagName]:XX,[t0.tagName]:t0,[QJ.tagName]:QJ,[sQ.tagName]:sQ,[rK.tagName]:rK,[JY.tagName]:JY,[f0.tagName]:f0,[C0.tagName]:C0,[o0.tagName]:o0,[T0.tagName]:T0,[_0.tagName]:_0,[N0.tagName]:N0,[D0.tagName]:D0,[l0.tagName]:l0,[u0.tagName]:u0,[LW.tagName]:LW,[X2.tagName]:X2,[ZK.tagName]:ZK,[eq.tagName]:eq,[dJ.tagName]:dJ,[wK.tagName]:wK,[lq.tagName]:lq,[RZ.tagName]:RZ,[n2.tagName]:n2,[tQ.tagName]:tQ,[pQ.tagName]:pQ,[qY.tagName]:qY,[Dv.k.tagName]:Dv.k,[Dv.j.tagName]:Dv.j,[WJ.tagName]:WJ,[aJ.tagName]:aJ,[Dv.m.tagName]:Dv.m,[kG.tagName]:kG,[cV.tagName]:cV,[rJ.tagName]:rJ,[TX.tagName]:TX,[ZX.tagName]:ZX,[w0.tagName]:w0,[i2.tagName]:i2,[a2.tagName]:a2,[ZQ.tagName]:ZQ,[AQ.tagName]:AQ,[eX.tagName]:eX,[IW.tagName]:IW,[W2.tagName]:W2,[dX.tagName]:dX,[S2.tagName]:S2,[gX.tagName]:gX,[vX.tagName]:vX,[UX.tagName]:UX,[MX.tagName]:MX,[b0.tagName]:b0,[xQ.tagName]:xQ,[E0.tagName]:E0,[q0.tagName]:q0,[Q0.tagName]:Q0,[b1.tagName]:b1,[T1.tagName]:T1,[S1.tagName]:S1,[N1.tagName]:N1,[p1.tagName]:p1,[M1.tagName]:M1,[VY.tagName]:VY,[fQ.tagName]:fQ,[F1.tagName]:F1,[B1.tagName]:B1,[j1.tagName]:j1,[K1.tagName]:K1,[y2.tagName]:y2,[u2.tagName]:u2,[B2.tagName]:B2,[D2.tagName]:D2,[L2.tagName]:L2,[F2.tagName]:F2,[Z2.tagName]:Z2,[n3.tagName]:n3,[kQ.tagName]:kQ,[s3.tagName]:s3,[u3.tagName]:u3},p3=([e,t])=>{window.customElements.get(e)||window.customElements.define(e,t)},g3=async e=>{try{return await BW(Xq(e))}catch{return}},f3=(e,t)=>
5991async()=>{const r=`${e} start`;performance.mark(r);const n=await t();return performance.measure(e,r),n},m3=async()=>{if(await(0,Dv.eB)())try{const e=await(0,Dv.eC)();return(0,Dv.bW)(Dv.eD),e}catch(e){const t=e;(0,Dv.g)().error("fetchUserInfoFromInternalAPIs fail when calling getUserInfo",e);const r=await(0,Dv.eE)();if(401===t.status&&r)(0,Dv.eF)(),(0,Dv.eG)(),await(0,Dv.eH)();else if(403===t.status){const e=(0,Dv.O)().isCompanion?Dv.aU:Dv.aM;(0,Dv.eF)(),(0,Dv.eG)(),(0,Dv.bj)(e)}else if(r)throw e}},v3=async e=>{const t=X0(e),r={headers:{accept:"application/json"}};try{return await(await(0,Dv.y)(t,r)).json()}catch(e){(0,Dv.g)().error(`Unable to fetch pbx info thru ${t}`,e)}},b3=async(e,t)=>await f3("shell_contextApiSetup",async()=>{let r,n={};if(t){const o=await y3(e,t);o?.pbxId&&(r=await v3(o.pbxId)),o&&w3(o,t),n={account:new Dv.ch(o?.accountKey),pbx:new Dv.cg(o?.pbxId,o?.pbxUserId,o?.pbxFlags,r,o?.pbxes)}}return n})(),y3=async(e,t)=>{let r;return e&&(r=await(0,Dv.eK)({func:()=>(0,Dv.eL)(e,t),defaultReturn:void 0})),r},w3=(e,t)=>{if(t)try{e?.pbxId&&(0,Dv.eI)({externalUserKey:t,pbxId:e.pbxId,pbxUserId:e?.pbxUserId}),e?.accountKey&&(0,Dv.eJ)(t,e.accountKey)}catch(e){(0,Dv.g)().error("storePbxDataInLocalStorage: could not store the pbx data in the local storage",e)}},x3=e=>{const t=[];return e.forEach(e=>{t.push({channel:e.channel,description:e.description,enabled:e.enabled,key:e.key,products:(0,Dv.eM)(e.roles??[]),type:e.type,sku:e.sku})}),t},_3=e=>e.userProfile?.id,k3=e=>e.meFromExternalAdmin?.accountKey,C3=e=>e.accountKeys??[],S3=e=>e.userProfile?.entitlements??[],E3=e=>e.pbxId??"",I3=e=>e.contextApi?.pbx?.info,A3=e=>e.currentAccount?.name??"",T3=e=>{const t=[];return e.currentAccount?.licenses.forEach(e=>t.push(e.description)),t},O3=e=>e.currentAccount?.key??"guest",L3=e=>e.currentAccount?.partnerAccountKey??"",$3=e=>e.licenses??[],N3=e=>{const t=new Set;return e.licenses?.forEach(e=>t.add(e.description)),Array.from(t)},R3=e=>e.productEnabledDates??[],P3=e=>!!e.user?.emails?.some(e=>Rj(e.value)),D3=e=>e.user.location.timeZone,M3=e=>e.user.meta.createdDate?.toISOString(),z3=e=>{const t=new Set,r=e.user.accounts;return r.length&&r.forEach(e=>{e.licenses.length&&e.licenses.forEach(e=>{e.roles.length&&e.roles.forEach(e=>t.add(e))})}),Array.from(t)},F3=f3("shell_internalApiFetches",m3),U3=e=>e.accounts?.map(e=>e?.key),B3=e=>e.accounts?.map(e=>(e.licenses??[]).map(t=>({...t,accountKey:e?.key})))?.filter(e=>e.length>0)?.flat(),H3=async()=>{const e={user:new Dv.eP({})},t=await F3();if(!t)return e;const r=(e=>{const t={meta:{}},{accounts:r=[]}=e;if(e.user)return(e.user.firstName||e.user.lastName)&&(e.user.firstName&&e.user.lastName?t.displayName=`${e.user.firstName} ${e.user.lastName}`:t.displayName=e.user.firstName??e.user.lastName),e.user.location&&(t.meta.location=e.user.location),e.user.createTime&&(t.meta.created=new Date(+e.user.createTime).toString()),e.user.email&&(t.userName=e.user.email,t.emails=[{value:e.user.email,type:"primary",primary:!0}]),r.some(e=>(e.licenses??[]).some(e=>e.roles))&&(t.entitlements=(0,Dv.eM)((0,Dv.eN)(r))),e.user.key&&(t.id=e.user.key),e.user.locale&&(t.locale=e.user.locale),(e.user.firstName||e.user.lastName)&&(t.name={givenName:e.user.firstName,familyName:e.user.lastName}),e.user.timeZone&&(t.timezone=e.user.timeZone),t})(t);e.me=r,e.meFromExternalAdmin=(e=>{const t={},{accounts:r=[]}=e;if(e.user)return r.length&&(t.accounts=(e=>{const t=[];return e?.forEach(e=>t.push({key:e.key,licenses:x3(e.licenses??[]),name:e.name,slowChannelEnabled:e.slowChannelEnabled,partnerAccountKey:e.partnerAccountKey})),t})(r),r[0]?.key&&(t.accountKey=r[0].key)),e.user.email&&(t.email=e.user.email),e.user.firstName&&(t.firstName=e.user.firstName),e.user.key&&(t.key=e.user.key),e.user.lastName&&(t.lastName=e.user.lastName),e.user.locale&&(t.locale=e.user.locale),t})(t);const n=r?.entitlements??[],o=Qq(r?.emails),i=o[0]?.value,s=i,a=Xq(t.user?.key);e.userProfile={entitlements:n,emails:o,firstEmail:i,name:s,id:a},a&&Dv.bz.isPluginAvailable("UserId")&&Dv.bA.UserId.storeCurrAuthenticatedUserKey(a),0===n.length&&(0,Dv.g)().warn("User does not have entitlements.");let l=[];const c=(0,Dv.eQ)(t.user?.key)??"";l=[(0,Dv.eK)({func:()=>c?xK(c):Promise.resolve(void 0),defaultReturn:void 0}),(0,Dv.eK)({func:()=>b3(i,a),defaultReturn:void 0}),(0,Dv.eK)({func:()=>g3(a),defaultReturn:void 0})];let[d,u,h]=await Promise.all(l);const p=u?.pbx?.id??"";c!==p&&(d=await xK(p));const g=u?.pbx?.info?.region??"",f=d?.permissions??[],m=d?.license?[d.license]:[];e.user=new Dv.eP({userInfo:t,permissions:f,avatar:h,licenses:m});const v=u?.account?.key??"";return e.currentAccount=e.user.getAccountByKey(v),e.contextApi=u,e.pbxId=p,e.pbxRegion=g,e.permissions=f,e.avatar=h,e.accountKeys=e.meFromExternalAdmin?U3(e.meFromExternalAdmin):[],e.licenses=e.meFromExternalAdmin?B3(e.meFromExternalAdmin):[],e.userCreationDate=e.user.meta.createdDate?.toISOString(),e},j3=()=>{const e=(0,Dv.cs)();return e?`${e}`:V3},V3="GoTo App",W3=async e=>{(0,Dv.bs)(Dv.bt.SHELL_BFF_OPTIMIZATION)??!0?await(async e=>{const t=(0,Dv.L)(),r=(0,Dv.an)()?.pendoScriptSrc??"pendo.js",n=(0,Dv.dC)("ExecutionContext","getContext"),{machineId:o,runI
5991d:i}=n?n():{machineId:"",runId:""},s=(e=>qj(e)?.settings)(e)?.meeting??{};rj({userKey:Dj(e),accountKey:Gj(e),entitlements:Vj(e),locale:t,product:j3(),pbxId:Fj(e),isContainer:(0,Dv.bB)(),isCalendarConnected:Xj(),licenses:Bj(e),productEnabledDates:[],machineId:o,runId:i,pendoSrc:r,...s})})(e.getUserContext()):await(async e=>{const t=(0,Dv.L)(),r=(0,Dv.an)()?.pendoScriptSrc??"pendo.js",n=(0,Dv.dC)("ExecutionContext","getContext"),{machineId:o,runId:i}=n?n():{machineId:"",runId:""},s=(0,Dv.eR)()?.meeting??{};rj({userKey:_3(e),accountKey:k3(e),entitlements:S3(e),locale:t,product:j3(),pbxId:E3(e),isContainer:(0,Dv.bB)(),isCalendarConnected:Xj(),licenses:$3(e),productEnabledDates:R3(e),machineId:o,runId:i,pendoSrc:r,...s})})(e.getAuthContext())},K3=()=>(0,Dv.Z)().meta.shellVersion,q3=e=>{switch(e){case Rb.AVAILABLE:return Dv.eV.Available;case Rb.BUSY:return Dv.eV.Busy;case Rb.DO_NOT_DISTURB:return Dv.eV.DoNotDisturb;case Rb.AWAY:return Dv.eV.Away;case Rb.OFFLINE:return Dv.eV.Offline;case Rb.DISCONNECTED:return Dv.eV.Disconnected;default:return(0,Dv.g)().debug(`The ${e} status is not mapped to any BadgeStatus. Setting the badge to offline.`),Dv.eV.Offline}},G3=e=>(0,Dv.aW)(Dv.aX.pendingContainerUpdate,JSON.stringify(e));let Z3;const Y3=async(e=Date.now())=>{const t=await(async e=>{const t=await(0,Dv.bI)(),r=(()=>{const e=(0,Dv.aZ)(Dv.aX.pendingContainerUpdate);if(e)try{const t=JSON.parse(e);return Number.isNaN(new Date(t.since).getTime())?void 0:t}catch{return}})();if(r?.appVersion===t)return r;const n={since:new Date(e).toISOString(),appVersion:t};return G3(n),n})(e);if(t.dismissedAt)return;const r=yJ(e,new Date(t.since).getTime());r<3||((0,Dv.g)().warn(`Container update has been pending for ${r} days, offering support.`),await(0,Dv.eW)(),(e=>{Z3=(0,Dv.eX)({id:"shellStaleUpdateBanner",icon:Eb,closable:!0,description:(0,Dv.cB)("You’re using an outdated version of GoTo. Having trouble updating your app?"),link:{text:(0,Dv.cB)("Contact support"),onClick:()=>(0,Dv.bk)((0,Dv.an)().containerUpdateSupportUrl)},onClose:()=>G3({...e,dismissedAt:(new Date).toISOString()})})})(t))},J3=()=>{(0,Dv.bW)(Dv.aX.pendingContainerUpdate),Z3?.close(),Z3=void 0},Q3=e=>{const t=(0,Dv.dC)("Badge","setBadgeCount");t&&t(e.value)},X3=async()=>{(0,Dv.bB)()&&(0,Dv.c5)()&&((()=>{const{eventBus:e,presence:t,user:r}=(0,Dv.Z)();r.key&&Dv.bz.isPluginAvailable("Badge")&&(Dv.bA.Badge.setBadgeStatus(Dv.eV.Initial),((e,t)=>{const{presenceUpdate:r}=e.subscribeTo(Dv.s),n=e=>{if(e.userKey===t){const t=q3(e.presence);Dv.bA.Badge.setBadgeStatus(t)}};r.on(n),(0,Dv.av)(()=>{r.removeListener(n)})})(e,r.key),((e,t)=>{t&&t.subscribe(e).catch(()=>{(0,Dv.g)().error(`failed to subscribe to presence for external user key ${e}`)})})(r.key,t))})(),(()=>{const{updateAvailable:e,noUpdateAvailable:t}=(0,Dv.au)().subscribeTo(pJ);e.on(()=>{Y3()}),t.on(J3),AJ()&&Y3()})(),Dv.bz.isPluginAvailable("AutoUpdater2")&&Dv.bA.AutoUpdater2.areUpdatesEnabled().then(e=>{e&&(_J=!1,Dv.bA.AutoUpdater2.onCheckForUpdatesStartedOrStopped(EJ))}),(()=>{const{user:e,badgeNumbers:t}=(0,Dv.Z)(),r=t.getBadgeNumberValue({showInDock:!0}),n=(0,Dv.dC)("Badge","setBadgeCount");e.key&&n&&(n(r),(e=>{e.addEventListener("change",Q3,{showInDock:!0}),(0,Dv.av)(()=>{e.removeEventListener("change",Q3)})})(t))})())},e5=async e=>{e||(e=(0,Dv.cO)((0,Dv.d9)((0,Dv.aZ)("i18nextLng")??"","_"))??void 0),await(0,Dv.eY)(e??"en_US")},t5=async()=>{(0,Dv.c5)(window)&&(Dv.e_.getInstance().setupLauncherCommands(),(async()=>{const e=(0,Dv.c9)().retrieve(_K);(()=>{const e=(0,Dv.Z)().context?.account?.key;return!!e&&!!(0,Dv.Z)().user.getAccountByKey(e)?.unifiedAdmin})()&&await(0,Dv.cC)()&&e.commands.openCreateIncidentDialog.addHandler(kK)})(),(()=>{const e=(0,Dv.c9)().retrieve(tq);e.commands.openPresenceNoteDialog.addHandler(()=>{$j().open((0,Dv.bL)().createElement(ZK.tagName))}),e.commands.openDndTimerDialog.addHandler(()=>{$j().open((0,Dv.bL)().createElement(eq.tagName))})})(),(async()=>{const e=(0,Dv.c9)().retrieve(CQ);(0,Dv.bs)(Dv.bt.SHELL_CHATBOT)&&e.commands.openGotoAssistant.addHandler(()=>{$j().open((0,Dv.bL)().createElement(xQ.tagName))}),(0,Dv.bs)(Dv.bt.SHELL_GLOBAL_SEARCH_FEEDBACK)&&e.commands.openGlobalSearchSurvey.addHandler(()=>{$j().open((0,Dv.bL)().createElement(kQ.tagName))})})())},r5=async e=>{const t=(e=>{if(e?.length)return e[0].pathname})(e),r=(0,Dv.cT)();let n=null;await sb()&&"/"===r?n=(0,Dv.dn)():"/"!==r&&(n=r),await(async e=>{e&&(await(async()=>!!globalThis.shell.user.key&&!await(async()=>{try{if((await(await(0,Dv.y)(`${(0,Dv.an)().caPSBaseUrl}/rest/v3/members/me`)).json())?.tcAgreement)return!0;
5991if((0,Dv.aZ)(Dv.aX.hasAcceptedTermsOfServiceInGTC))return oJ(),!0}catch(e){return(0,Dv.g)().error("hasAcceptedTermsOfService failed",e),!0}return!1})())()?((0,Dv.aW)(nJ,e),(0,Dv.bj)(Dv.aT)):(0,Dv.bj)(e))})(n??t),(0,Dv.e$)({defaultRoute:t})};let n5=[];const o5=()=>{const e=(0,Dv.dC)("DockTrayMenu","remove");e&&(e(n5.map(e=>e.id??"")),n5=[])},i5=e=>(0,Dv.f1)(e)?e.getQuickActions().map(t=>s5(t,e.getString)):[],s5=(e,t)=>{const r={label:t(e.labelKey??"")};if(e.children?.length&&(r.submenu=e.children.map(e=>s5(e,t))),e.executeFunction){const t=e.executeFunction;r.click=()=>{t()}}return r};class a5{constructor(){this.topbarContainerSelector=Dv.f2}createTopbarElement(){return(0,Dv.O)().isIntegration?(0,Dv.bL)().createElement(XX.tagName):(0,Dv.bL)().createElement(jJ.tagName)}show(){this.topbarElement||(this.topbarElement=this.createTopbarElement());const e=(0,Dv.bL)().querySelector(this.topbarContainerSelector);this.topbarElement.parentElement!==e&&e?.appendChild(this.topbarElement)}hide(){this.topbarElement?.parentElement&&this.topbarElement?.remove()}isVisible(){return!!this.topbarElement&&null!==this.topbarElement.parentNode}}let l5,c5;const d5=()=>(c5||(c5=new a5),c5),u5=(e,t,r)=>t.get(e)??r?.get(e),h5=e=>!!e,p5=e=>e.map(e=>u5(e,(0,Dv.bJ)().getRegisteredApplications())).filter(h5),g5=e=>{const t=(l5||(l5=(()=>{const e=d5();return Object.freeze({show(){return e.show()},hide(){return e.hide()},isVisible(){return e.isVisible()}})})()),l5);e?t.show():t.hide()},f5=(e=[])=>{const t=p5(e);if(!e.some(e=>(e=>"goto/settings"===e||(e=>Cy().some(t=>t.name===e))(e))(e))&&0===t?.length)return;const r=Py()&&!(e=>e.some(e=>{const{customProps:t}=e;return!!t?.shellConfig?.hideTopbar}))(t);g5(r)},m5=e=>{(0,Dv.f4)(e);const t=e.detail?.appsByNewStatus?.MOUNTED??[];f5(t)},v5=()=>{const e=!0===window.matchMedia?.("(prefers-color-scheme: dark)").matches?"darktheme/":"",t=(0,Dv.bw)("gotoBrand/"+e+"favicon.ico");(0,Dv.f5)(t)},b5=document.querySelector("head"),y5="STYLE",w5="main-css",x5="shell-main-css",_5="chameleon-theme-skin-style",k5={attributes:!0,childList:!0,characterData:!0},C5="shell-app-update-start-time";let S5=!1,E5=null;const I5=async()=>{"hidden"===(0,Dv.bL)().visibilityState&&await(0,Dv.f6)()&&((0,Dv.bL)().removeEventListener("visibilitychange",I5),T5())},A5=e=>{E5&&(clearTimeout(E5),E5=null),E5=(0,Dv.aq)(async()=>{"hidden"===(0,Dv.bL)().visibilityState?await(0,Dv.f6)()?T5():I5():(0,Dv.bL)().addEventListener("visibilitychange",I5)},e)},T5=async()=>{await(0,Dv.f7)()&&(await O5(S5?"containerRestart":"pageReload"),S5?SJ():(0,Dv.cJ)())},O5=async e=>{const t={action:e,shellVersion:(0,Dv.Z)().meta.shellVersion,startTime:Date.now(),containerVersion:await(0,Dv.bI)()};(0,Dv.aW)(C5,JSON.stringify(t)),(0,Dv.g)().log(`appUpdate type=beforeAction action=${e} shellVersion=${t.shellVersion} containerVersion=${t.containerVersion}`)};class L5{show(){this.macOSSupportBannerElement||(this.macOSSupportBannerElement=(0,Dv.f8)()),(0,Dv.bL)().querySelector(Dv.e6)?.appendChild(this.macOSSupportBannerElement)}hide(){this.macOSSupportBannerElement&&this.macOSSupportBannerElement.remove()}}class $5{show(){this.windowsSupportBannerElement||(this.windowsSupportBannerElement=(0,Dv.f9)()),(0,Dv.bL)().querySelector(Dv.e6)?.appendChild(this.windowsSupportBannerElement)}hide(){this.windowsSupportBannerElement&&this.windowsSupportBannerElement.remove()}}const N5=e=>{e.close()},R5=e=>{e.close()},P5=["error","warn","info","debug","log"];class D5{debug(e,...t){}error(e,...t){}info(e,...t){}log(e,...t){}warn(e,...t){}}const M5=(()=>{let e=0;return function(){const t=e;return e=e+1>e?e+1:0,t}})();class z5{constructor(e=[]){this._originNamespaces=e,this._rootConsole=this._decideRootConsoleAndSetupLogging(),this._context=new Map,this._targetConsole=this._rootConsole,this._listeners={},this.logToConsole=z5._config.logToConsole,this.serializeConsoleLogs=z5._config.serializeConsoleLogs,this._setupConsoles()}static createRoot(e){const t=new z5;t.configure(e);const r=new z5;return r.setTarget(t),r.subscribe=(...e)=>t.subscribe(...e),r}debug(e,...t){this._trace("debug",[this._originNamespaces.join("."),e,...t])}error(e,...t){this._trace("error",[this._originNamespaces.join("."),e,...t])}log(e,...t){this._trace("log",[this._originNamespaces.join("."),e,...t])}info(e,...t){this._trace("info",[this._originNamespaces.join("."),e,...t])}warn(e,...t){this._trace("warn",[this._originNamespaces.join("."),e,...t])}logMessage(e){this._trace(e.category,e)}bind(...e){return this.create(e)}create(e){const t=new z5(this._originNamespaces.concat(e));return t.setParent(this),t.setTarget(this._targetConsole),t}setParent(e){this._parent=e}setContext(e,t){this._context.set(e,t)}deleteContext(e){this._context.has(e)&&this._context.delete(e)}getContext(e){let t;return void 0===e?this._getFullNodeContext():(this._context.has(e)?t=this._context.get(e):this._parent&&(t=this._parent.getContext(e)),t)}setTarget(e){this._targetConsole=e}getLocalLogRecord(){return z5._localLogRecord?z5._localLogRecord:[]}subscribe(e,t){var r;this._listeners[e]=this._listeners[e]||[],null===(r=this._listeners[e])||void 0===r||r.push(t)}configure(e){return e&&(z5._config=Object.assign(Object.assign({},z5._config),e),"number"==typeof e.localLogRecordSize&&(0===e.localLogRecordSize?this._deactivateLocalLogRecording():e.localLogRecordSize>0&&this._activateLocalLogRecording()),"boolean"==typeof e.serializeConsoleLogs&&(this.serializeConsoleLogs=e.serializeConsoleLogs),this.logToConsole!==z5._config.logToConsole&&this._setupConsoles(),z5._config.mincategory=P5.includes(z5._config.mincategory)?z5._config.mincategory:P5[0]),z5._config}_getFullNodeContext(){const e=[];let t=this;for(;t;)e.push(t._context),t=t._parent;return function(e){const t={};
5991return e.reverse().forEach(e=>{e.forEach((e,r)=>{t[r]=e})}),t}(e)}_activateLocalLogRecording(){z5._localLogRecord=[],z5._localLogRecordIdx=0}_deactivateLocalLogRecording(){z5._localLogRecord=null}_addMessageToStaticLogRecords(e){z5._localLogRecord&&(z5._localLogRecord[z5._localLogRecordIdx]=e,z5._localLogRecordIdx++,z5._localLogRecordIdx===z5._config.localLogRecordSize&&(z5._localLogRecordIdx=0))}_publishLogToSubscribers(e,...t){for(const r of this._listeners[e]||[])try{r.apply(null,t)}catch{}}_trace(e,t){let r;if(Array.isArray(t)){r={ts:(new Date).toISOString(),seq:M5(),category:e,origin:"",data:t},t.length>1&&"string"==typeof t[0]&&(r.origin=t.shift());const n=e=>e instanceof Error?{errorMessage:e.message,errorName:e.name,errorStack:e.stack}:e,o=e=>e instanceof Error?n(e):Array.isArray(e)?e.map(o):function(e){return"object"==typeof e&&null!==e&&void 0===e.length}(e)?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,n(t)])):e;r.data=r.data.map(o),this._addMessageToStaticLogRecords(r)}else r=function(e){return"ts"in e&&"seq"in e&&"origin"in e&&"category"in e&&"data"in e}(t)?t:{ts:t.ts,seq:M5(),category:t.category,origin:t.origin,data:t.data};("log"===e||function(e,t){return P5.indexOf(e)<=P5.indexOf(t)}(e,this.configure().mincategory))&&this._passthru(r),Object.freeze(r),this._publishLogToSubscribers(e,r)}_passthru(e){const t=this._targetConsole||this._rootConsole;if(t instanceof z5)t.logMessage(e);else{const r=[e.ts,"["+e.category+"]"];if(e.origin&&r.push(e.origin),e.data){const t=this._serializeDataForConsole(e.data);Array.isArray(t)?r.push(...t):r.push(t||e)}(t[e.category]||t.log).apply(t,r)}}_serializeDataForConsole(e){if(!this.serializeConsoleLogs)return e;const t=e=>{if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}};return Array.isArray(e)?e.map(t):t(e)}_decideRootConsoleAndSetupLogging(){var e,t;const n=null===(e=globalThis?.localStorage)||void 0===e?void 0:e.getItem("gotoLoggerSettings");try{const e=n?JSON.parse(n):void 0;e&&"boolean"==typeof e?.logToConsole&&e?.logToConsole!==this.logToConsole&&(this.logToConsole=e?.logToConsole),e&&"boolean"==typeof e?.serializeConsoleLogs&&(this.serializeConsoleLogs=e.serializeConsoleLogs)}catch{null===(t=globalThis?.localStorage)||void 0===t||t.removeItem("gotoLoggerSettings")}return!0===this.logToConsole?function(){return"object"==typeof self&&self.self===self&&self||"object"==typeof r.g&&r.g.global===r.g&&r.g||this}().console:new D5}_setupConsoles(){this._rootConsole=this._decideRootConsoleAndSetupLogging(),this._targetConsole=this._rootConsole}}z5._localLogRecord=null,z5._localLogRecordIdx=0,z5._config={localLogRecordSize:0,mincategory:"error",logToConsole:!0,serializeConsoleLogs:!1};let F5=z5.createRoot({mincategory:"debug"}).create("chrext-port-comm-api");var U5=(e=>(e.request="port-comm-request",e.response="port-comm-response",e.subscriptionRequest="port-comm-subscription-request",e.subscriptionResponse="port-comm-subscription-response",e.subscriptionEvent="port-comm-subscription-event",e.subscriptionCancellation="port-comm-subscription-cancellation",e.error="port-comm-error",e.keepAlive="port-comm-keep-alive",e))(U5||{});const B5=(e,t)=>{e.postMessage(t)},H5=(e,t,r)=>{const n=e=>{(e=>null!==e&&"object"==typeof e&&"type"in e&&"string"==typeof e.type&&"payload"in e&&null!==e.payload&&"object"==typeof e.payload)(e)&&e.type===t&&r(e.payload)};return e.onMessage.addListener(n),()=>e.onMessage.removeListener(n)},j5=(e,t)=>{const r=()=>{F5.warn(`Port '${e.name}' disconnected, last error: ${chrome.runtime.lastError?.message}`),t()};return e.onDisconnect.addListener(r),()=>e.onDisconnect.removeListener(r)};class V5{static setTargetExtensionId(e){V5.targetExtensionId=e}static async request(e){return new Promise((t,r)=>{let n=[];const o=()=>{n.forEach(e=>e()),n=[],i.disconnect()},i=V5.targetExtensionId?chrome.runtime.connect(V5.targetExtensionId,{name:e.msg}):chrome.runtime.connect({name:e.msg}),s=j5(i,()=>{o(),r(new Error("Port disconnected"))}),a={request:e};B5(i,{type:U5.request,payload:a});const l=H5(i,U5.response,e=>{o(),t(e.response)}),c=H5(i,U5.error,e=>{o(),r(new Error(e.error))});n.push(s,l,c)})}static async requestSubscription(e,t,r){return new Promise((n,o)=>{let i=[],s=!1;const a=()=>
5991{i.forEach(e=>e()),i=[],l.disconnect()},l=V5.targetExtensionId?chrome.runtime.connect(V5.targetExtensionId,{name:e.event}):chrome.runtime.connect({name:e.event}),c=j5(l,()=>{a(),s?r():o(new Error("Port disconnected"))}),d=H5(l,U5.subscriptionEvent,e=>{t(e.eventData)});i.push(d);const u={subscriptionRequest:e};B5(l,{type:U5.subscriptionRequest,payload:u});const h=H5(l,U5.subscriptionResponse,e=>{s=!0,n(()=>{B5(l,{type:U5.subscriptionCancellation,payload:{}}),a()})}),p=H5(l,U5.error,e=>{a(),o(new Error(e.error))});i.push(c,h,p)})}}const W5=e=>(t,r,...n)=>{const o=n.length>0?n:void 0;return V5.requestSubscription({event:e,subscriptionOptions:o},t,r)},K5=Object.freeze(Object.defineProperty({__proto__:null,msg:"get-user-avatar"},Symbol.toStringTag,{value:"Module"})),q5=Object.freeze(Object.defineProperty({__proto__:null,msg:"get-user-name"},Symbol.toStringTag,{value:"Module"})),G5=Object.freeze(Object.defineProperty({__proto__:null,msg:"is-user-signed-in"},Symbol.toStringTag,{value:"Module"})),Z5=Object.freeze(Object.defineProperty({__proto__:null,eventPbxChanged:"pbx-changed",msgChangeToPbx:"change-to-
5991pbx",msgGetPbxInfo:"get-pbx-info"},Symbol.toStringTag,{value:"Module"}));var Y5=(e=>(e.UNAVAILABLE="UNAVAILABLE",e.OFFLINE="OFFLINE",e.ONLINE="ONLINE",e.BUSY="BUSY",e.DO_NOT_DISTURB="DO_NOT_DISTURB",e.AWAY="AWAY",e.AUTO_UPDATE="AUTO_UPDATE",e))(Y5||{}),J5=(e=>(e.NONE="NONE",e.OFFLINE="OFFLINE",e.AWAY="AWAY",e.BUSY="BUSY",e.ONLINE="ONLINE",e))(J5||{}),Q5=(e=>(e.IN_A_MEETING="IN_A_MEETING",e.IN_A_CALL="IN_A_CALL",e.IN_A_CALENDAR_EVENT="IN_A_CALENDAR_EVENT",e))(Q5||{});const X5=Object.freeze(Object.defineProperty({__proto__:null,Appearance:Y5,Status:Q5,UserAppearance:J5,event:"user-presence-changed",msg:"get-user-presence"},Symbol.toStringTag,{value:"Module"}));K5.msg,q5.msg,G5.msg,Z5.msgGetPbxInfo,X5.msg,X5.event;const e4="shell",t4=`${e4}-send-command`,r4=`${e4}-command-received`,n4=`${e4}-declare-shell-ready`,o4=`${e4}-shell-ready-in-window`;var i4;!function(e){e.Parked="Parked",e.Ringing="Ringing",e.Calling="Calling",e.Connecting="Connecting",e.Connected="Connected",e.OnHold="On hold",e.Transferring="Transferring",e.Voicemail="Voicemail",e.CallQueue="CallQueue",e.Unknown="Unknown"}(i4||(i4={}));const s4=Object.freeze(Object.defineProperty({__proto__:null,set:e=>V5.setTargetExtensionId(e)},Symbol.toStringTag,{value:"Module"})),a4=(e=>(...t)=>{const r=t.length>0?t:void 0;return V5.request({msg:e,payload:r})})(t4),l4=W5(r4),c4=W5(o4),d4=Object.freeze(Object.defineProperty({__proto__:null,declareShellReady:(e,t)=>V5.requestSubscription({event:n4,subscriptionOptions:e},()=>{},t),sendCommand:a4,subscribeForCommandReceived:l4,subscribeForShellReadyInWindow:c4,waitForShellReadyInWindow:(e,t)=>((e,t)=>{const r=-1===e?"in current window":`in window ${e}`;return new Promise(async(n,o)=>{let i,s,a=!1;const l=()=>{i&&(i(),i=void 0),void 0!==s&&(clearTimeout(s),s=void 0)};i=await c4(()=>{a=!0,l(),n()},()=>{i=void 0,l(),o(new Error(`Port disconnected while waiting for Shell to be ready ${r}`))},e),a?l():s=setTimeout(()=>{s=void 0,l(),o(new Error(`Timeout waiting ${t} ms for Shell to be ready ${r}`))},t)})})(e,t)},Symbol.toStringTag,{value:"Module"}));var u4;!function(e){e.Available="available",e.Away="away",e.Busy="busy",e.Disconnected="disconnected",e.DoNotDisturb="dnd",e.Initial="initial",e.Offline="offline"}(u4||(u4={}));const h4={config:{name:"Badge",platforms:["web"]},setBadgeCount:e=>navigator.setAppBadge?.(e),setBadgeStatus:()=>{}};var p4,g4,f4,m4,v4,b4,y4,w4;!function(e){e.PermissionDeniedMac="Cannot update: mac permission denied",e.CheckFailed="Check for updates failed",e.AnotherCheckInProgress="Another check for updates is currently in progress",e.UpdatesAreDisabled="Updates are disabled"}(p4||(p4={})),function(e){e.iAmInContainer="I am in container",e.iAmOutside="I am outside"}(g4||(g4={})),function(e){e.confirmed="confirmed",e.newNetworkClientVersion="new_network_client_version"}(f4||(f4={})),function(e){e.disconnected="disconnected",e.connecting="connecting",e.connected="connected"}(m4||(m4={})),function(e){e.attribution="attribution"}(v4||(v4={})),function(e){e.appLogoOverride="appLogoOverride",e.hero="hero"}(b4||(b4={})),function(e){e.circle="circle"}(y4||(y4={})),function(e){e.reminder="reminder",e.alarm="alarm",e.incomingCall="incomingCall"}(w4||(w4={}));const x4={nativeContainer:()=>globalThis[I8],connectionPort(e){try{const t=new URL(e.url);return parseInt(t.port)}catch{return Number.NaN}}},_4=console,k4={config:{name:"Logger",platforms:["web"]},createLogger:()=>_4,debug:_4.debug,log:_4.log,info:_4.info,warn:_4.warn,error:_4.error},C4=k4.createLogger("DesktopCompanion"),S4=e=>{let t="";for(let r=e.length-1;r>=0;--r)t+=e[r];return t},E4=new class{constructor(){this._clientLocalVersion="0.0.2",this._clientNetworkVersion=this._clientLocalVersion}getEncodingFunc(){switch(this._clientNetworkVersion){case"0.0.1":return e=>S4(btoa(e)).replace(/=/g,"");case"0.0.2":return e=>S4(btoa(encodeURIComponent(e))).replace(/=/g,"");default:return e=>e}}getDecodingFunc(){switch(this._clientNetworkVersion){case"0.0.1":return e=>atob(S4(e));case"0.0.2":return e=>decodeURIComponent(atob(S4(e)));default:return e=>e}}getEncodedMessage(e){try{return{success:!0,message:this.getEncodingFunc()(e)}}catch{return C4.error("Cannot encode a message, ignoring"),{success:!1,message:e}}}getDecodedMessage(e){try{return{success:!0,message:this.getDecodingFunc()(e)}}catch{return C4.error("Cannot decode a message, ignoring"),{success:!1,message:e}}}getClientNetworkVersion(){return this._clientNetworkVersion}getClientLocalVersion(){return this._clientLocalVersion}setClientNetworkVersion(e){this._clientNetworkVersion=e}},I4=k4.createLogger("DesktopCompanionHandshake"),A4=new class{async newConfirmedConnectionWithConfig(e){const t=e.ports.map(e=>this._newConfirmedConnectionToPort(e));try{return await Promise.any(t)}catch{throw new Error("Failed to establish connection")}}async _newConfirmedConnectionToPort(e){const t=await this._newConnectionToPort(e);return await this._confirmConnection(t),t}_newConnectionToPort(e){return new Promise((t,r)=>{const n=new WebSocket(`ws://127.0.0.1:${e}`),o=()=>{s(),t(n)},i=()=>{s(),n.close(),r()},s=()=>{n.removeEventListener("open",o),n.removeEventListener("error",i)};n.addEventListener("open",o),n.addEventListener("error",i)})}_confirmConnection(e){return new Promise((t,r)=>{const n=()=>{o(),e.close(),r()},o=()=>{clearTimeout(i),e.removeEventListener("message",s),e.removeEventListener("close",a),e.removeEventListener("error",l)},i=setTimeout(()=>{const t=x4.connectionPort(e);I4.error(`Connected to port ${t} but server did not respond on time`),n()},2e3),s=r=>{const i=x4.connectionPort(e);if("string"==typeof r.data)try{const e=JSON.parse(r.data);e.message===f4.confirmed?(E4.setClientNetworkVersion(e.clientVersion),o(),t()):(I4.error(`Connected to port ${i} but received unexpected response from server`),n())}catch(e){I4.error(`Connected to port ${i} but received error trying to parse the data: ${JSON.stringify(e)}`),n()}else I4.error(`Connected to port ${i} but received a data with a type different than a string: ${typeof r.data}`),n()},a=t=>{const r=x4.connectionPort(e);I4.error(`Connected to port ${r} but connection closed before server response`),n()},l=t=>{const r=x4.connectionPort(e);I4.error(`Connected to port ${r} but connection error before server response`),n()};e.addEventListener("message",s,{once:!0}),e.addEventListener("close",a,{once:!0}),e.addEventListener("error",l,{once:!0});const c={message:x4.nativeContainer()?g4.iAmInContainer:g4.iAmOutside,clientVersion:E4.getClientLocalVersion()};e.send(JSON.stringify(c))})}},T4=k4.createLogger("DesktopCompanion"),O4=()=>x4.nativeContainer()?.plugins.DesktopCompanionServer;
5991class L4 extends Event{constructor(e){super("connectionStatusChanged"),this.connectionStatus=e}}const $4=e=>`message-${e}`;class N4 extends Event{constructor(e){super($4(e.type)),this.message=e}}class R4{constructor(){this.config={name:"DesktopCompanion",platforms:["web"]},this._eventTarget=new EventTarget,this._connectionStatus=m4.disconnected,this._ws=void 0,this._currentConfig=void 0,this._tryConnectTimerId=void 0}_setConnectionStatus(e){this._connectionStatus!==e&&(this._connectionStatus=e,T4.log(`Connection status changed: ${e}`),this._eventTarget.dispatchEvent(new L4(e)))}_connectedWithCompatibleConfig(e){if(!this._ws)return!1;const t=x4.connectionPort(this._ws);return e.ports.includes(t)}_closeConnection(){this._tryConnectTimerId&&(clearTimeout(this._tryConnectTimerId),this._tryConnectTimerId=void 0),this._currentConfig=void 0,this._ws?.close(),this._ws=void 0,this._setConnectionStatus(m4.disconnected)}async _tryConnectTimerHandler(){if(this._currentConfig)try{if(this._ws=await A4.newConfirmedConnectionWithConfig(this._currentConfig),T4.log(`Connected to port ${x4.connectionPort(this._ws)}`),this._tryConnectTimerId=void 0,!this._currentConfig)return void this._closeConnection();this._ws.addEventListener("close",()=>this._closeHandler()),this._ws.addEventListener("message",e=>this._messageHandler(e)),this._setConnectionStatus(m4.connected)}catch{this._tryConnectTimerId=setTimeout(this._tryConnectTimerHandler.bind(this),1e3)}}_closeHandler(){this._ws=void 0,this._currentConfig?.autoReconnect?(T4.log("Connection closed but reconnecting due to autoReconnect being enabled"),this._setConnectionStatus(m4.connecting),this._tryConnectTimerHandler()):this._setConnectionStatus(m4.disconnected)}static _isDesktopCompanionMessage(e){return e&&"object"==typeof e&&"string"==typeof e.type&&"object"==typeof e.payload}static _isDesktopCompanionHandshakeMessage(e){return e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.clientVersion}_messageHandler(e){const t=e.data;if("string"==typeof t)try{const e=E4.getDecodedMessage(t.toString());if(e.success){const t=JSON.parse(e.message);if(R4._isDesktopCompanionMessage(t))return void this._eventTarget.dispatchEvent(new N4(t));T4.error("Failed to parse a decoded message as DesktopCompanionMessage, ignoring")}const r=JSON.parse(t.toString());R4._isDesktopCompanionHandshakeMessage(r)?r.message===f4.newNetworkClientVersion&&E4.setClientNetworkVersion(r.clientVersion):T4.error("Failed to parse a message as DesktopCompanionHandshakeMessage, ignoring")}catch(e){T4.error("Failed to parse message, ignoring, error: "+JSON.stringify(e))}else T4.error(`Received message with non-string type (${typeof t}), ignoring`)}get connectionStatus(){return this._connectionStatus}startConnecting(e){this._connectedWithCompatibleConfig(e)?T4.log("Already connected with compatible config"):(this._closeConnection(),this._currentConfig=e,T4.log("Starting connecting",this._currentConfig),this._setConnectionStatus(m4.connecting),O4()?.startListening(e),this._tryConnectTimerHandler())}disconnect(){O4()?.stop(),this._closeConnection()}send(e){if(this._ws&&this._ws.readyState===WebSocket.OPEN)try{const t=E4.getEncodedMessage(JSON.stringify(e));t.success?this._ws.send(t.message):T4.error("We cannot send a message because the encoding is failing, ignoring")}catch(e){const t="We cannot send this message because the JSON.stringify is failing, ignoring, error: "+JSON.stringify(e);throw T4.error(t),new Error(t)}}addEventListener(e,t,r){this._eventTarget.addEventListener(e,t,r)}addMessageEventListener(e,t,r){this._eventTarget.addEventListener($4(e),t,r)}removeEventListener(e,t,r){this._eventTarget.removeEventListener(e,t,r)}removeMessageEventListener(e,t,r){this._eventTarget.removeEventListener($4(e),t,r)}}const P4=new R4;var D4=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof r.g<"u"?r.g:typeof self<"u"?self:{};function M4(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function z4(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var F4,U4={exports:{}},B4=(F4||(F4=1,function(e){e.exports=function e(t,r,n){function o(s,a){if(!r[s]){if(!t[s]){if(!a&&z4)return z4(s);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){return o(t[s][1][e]||e)},c,c.exports,e,t,r,n)}return r[s].exports}for(var i=z4,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,t,r){var n=e("./utils"),o=e("./support"),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
vendor: 6,006 bytes, line 5991
5991+/=";r.encode=function(e){for(var t,r,o,s,a,l,c,d=[],u=0,h=e.length,p=h,g="string"!==n.getTypeOf(e);u<e.length;)p=h-u,o=g?(t=e[u++],r=u<h?e[u++]:0,u<h?e[u++]:0):(t=e.charCodeAt(u++),r=u<h?e.charCodeAt(u++):0,u<h?e.charCodeAt(u++):0),s=t>>2,a=(3&t)<<4|r>>4,l=1<p?(15&r)<<2|o>>6:64,c=2<p?63&o:64,d.push(i.charAt(s)+i.charAt(a)+i.charAt(l)+i.charAt(c));return d.join("")},r.decode=function(e){var t,r,n,s,a,l,c=0,d=0,u="data:";if(e.substr(0,5)===u)throw new Error("Invalid base64 input, it looks like a data url.");var h,p=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===i.charAt(64)&&p--,e.charAt(e.length-2)===i.charAt(64)&&p--,p%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=o.uint8array?new Uint8Array(0|p):new Array(0|p);c<e.length;)t=i.indexOf(e.charAt(c++))<<2|(s=i.indexOf(e.charAt(c++)))>>4,r=(15&s)<<4|(a=i.indexOf(e.charAt(c++)))>>2,n=(3&a)<<6|(l=i.indexOf(e.charAt(c++))),h[d++]=t,64!==a&&(h[d++]=r),64!==l&&(h[d++]=n);return h}},{"./support":30,"./utils":32}],2:[function(e,t,r){var n=e("./external"),o=e("./stream/DataWorker"),i=e("./stream/Crc32Probe"),s=e("./stream/DataLengthProbe");function a(e,t,r,n,o){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=o}a.prototype={getContentWorker:function(){var e=new o(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new o(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(e,t,r){return e.pipe(new i).pipe(new s("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new s("compressedSize")).withStreamInfo("compression",t)},t.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){var n=e("./utils"),o=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r){var n=o,i=0+r;e^=-1;for(var s=0;s<i;s++)e=e>>>8^n[255&(e^t[s])];return-1^e}(0|t,e,e.length):function(e,t,r){var n=o,i=0+r;e^=-1;for(var s=0;s<i;s++)e=e>>>8^n[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){var n;n=typeof Promise<"u"?Promise:e("lie"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,r){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=e("pako"),i=e("./utils"),s=e("./stream/GenericWorker"),a=n?"uint8array":"array";function l(e,t){s.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",i.inherits(l,s),l.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(i.transformTo(a,e.data),!1)},l.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},r.compressWorker=function(e){return new l("Deflate",e)},r.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){function n(e,t){var r,n="";for(r=0;r<t;r++)n+=String.fromCharCode(255&e),e>>>=8;return n}function o(e,t,r,o,s,d){var u,h,p=e.file,g=e.compression,f=d!==a.utf8encode,m=i.transformTo("string",d(p.name)),v=i.transformTo("string",a.utf8encode(p.name)),b=p.comment,y=i.transformTo("string",d(b)),w=i.transformTo("string",a.utf8encode(b)),x=v.length!==p.name.length,_=w.length!==b.length,k="",C="",S="",E=p.dir,I=p.date,A={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(A.crc32=e.crc32,A.compressedSize=e.compressedSize,A.uncompressedSize=e.uncompressedSize);var T=0;t&&(T|=8),f||!x&&!_||(T|=2048);var O,L,$,N=0,R=0;E&&(N|=16),"UNIX"===s?(R=798,N|=(O=p.unixPermissions,L=E,$=O,O||($=L?16893:33204),(65535&$)<<16)):(R=20,N|=function(e){return 63&(e||0)}(p.dosPermissions)),u=I.getUTCHours(),u<<=6,u|=I.getUTCMinutes(),u<<=5,u|=I.getUTCSeconds()/2,h=I.getUTCFullYear()-1980,h<<=4,h|=I.getUTCMonth()+1,h<<=5,h|=I.getUTCDate(),x&&(C=n(1,1)+n(l(m),4)+v,k+="up"+n(C.length,2)+C),_&&(S=n(1,1)+n(l(y),4)+w,k+="uc"+n(S.length,2)+S);var P="";return P+="\n\0",P+=n(T,2),P+=g.magic,P+=n(u,2),P+=n(h,2),P+=n(A.crc32,4),P+=n(A.compressedSize,4),P+=n(A.uncompressedSize,4),P+=n(m.length,2),P+=n(k.length,2),{fileRecord:c.LOCAL_FILE_HEADER+P+m+k,dirRecord:c.CENTRAL_FILE_HEADER+n(R,2)+P+n(y.length,2)+"\0\0\0\0"+n(N,4)+n(o,4)+m+k+y}}var i=e("../utils"),s=e("../stream/GenericWorker"),a=e("../utf8"),l=e("../crc32"),c=e("../signature");function d(e,t,r,n){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}i.inherits(d,s),d.prototype.push=function(e){var t=e.meta.percent||0,r
vendor: 4,523 bytes, line 5991
5991=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,s.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},d.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=o(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=o(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return c.DATA_DESCRIPTOR+n(e.crc32,4)+n(e.compressedSize,4)+n(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},d.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,o=function(e,t,r,o,s){var a=i.transformTo("string",s(o));return c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(e,2)+n(e,2)+n(t,4)+n(r,4)+n(a.length,2)+a}(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:o,meta:{percent:100}})},d.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},d.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(e){t.error(e)}),this},d.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},d.prototype.error=function(e){var t=this._sources;if(!s.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch{}return!0},d.prototype.lock=function(){s.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=d},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){var n=e("../compressions"),o=e("./ZipFileWorker");r.generateWorker=function(e,t,r){var i=new o(t.streamFiles,r,t.platform,t.encodeFileName),s=0;try{e.forEach(function(e,r){s++;var o=function(e,t){var r=e||t,o=n[r];if(!o)throw new Error(r+" is not a valid compression method !");return o}(r.options.compression,t.compression),a=r.options.compressionOptions||t.compressionOptions||{},l=r.dir,c=r.date;r._compressWorker(o,a).withStreamInfo("file",{name:e,dir:l,date:c,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(i)}),i.entriesCount=s}catch(e){i.error(e)}return i}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new n;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(n.prototype=e("./object")).loadAsync=e("./load"),n.support=e("./support"),n.defaults=e("./defaults"),n.version="3.10.1",n.loadAsync=function(e,t){return(new n).loadAsync(e,t)},n.external=e("./external"),t.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,r){var n=e("./utils"),o=e("./external"),i=e("./utf8"),s=e("./zipEntries"),a=e("./stream/Crc32Probe"),l=e("./nodejsUtils");function c(e){return new o.Promise(function(t,r){var n=e.decompressed.getContentWorker().pipe(new a);n.on("error",function(e){r(e)}).on("end",function(){n.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t()}).resume()})}t.exports=function(e,t){var r=this;return t=n.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:i.utf8decode}),l.isNode&&l.isStream(e)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):n.prepareContent("the loaded zip f
5991ile",e,!0,t.optimizedBinaryString,t.base64).then(function(e){var r=new s(t);return r.load(e),r}).then(function(e){var r=[o.Promise.resolve(e)],n=e.files;if(t.checkCRC32)for(var i=0;i<n.length;i++)r.push(c(n[i]));return o.Promise.all(r)}).then(function(e){for(var o=e.shift(),i=o.files,s=0;s<i.length;s++){var a=i[s],l=a.fileNameStr,c=n.resolve(a.fileNameStr);r.file(c,a.decompressed,{binary:!0,optimizedBinaryString:!0,date:a.date,dir:a.dir,comment:a.fileCommentStr.length?a.fileCommentStr:null,unixPermissions:a.unixPermissions,dosPermissions:a.dosPermissions,createFolders:t.createFolders}),a.dir||(r.file(c).unsafeOriginalName=l)}return o.zipComment.length&&(r.comment=o.zipComment),r})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,r){var n=e("../utils"),o=e("../stream/GenericWorker");function i(e,t){o.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}n.inherits(i,o),i.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",function(e){t.push({data:e,meta:{percent:0}})}).on("error",function(e){t.isPaused?this.generatedError=e:t.error(e)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})},i.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},i.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=i},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,r){var n=e("readable-stream").Readable;function o(e,t,r){n.call(this,t),this._helper=e;var o=this;e.on("data",function(e,t){o.push(e)||o._helper.pause(),r&&r(t)}).on("error",function(e){o.emit("error",e)}).on("end",function(){o.push(null)})}e("../utils").inherits(o,n),o.prototype._read=function(){this._helper.resume()},t.exports=o},{"../utils":32,"readable-stream":16}],14:[function(e,t,r){t.exports={isNode:typeof Buffer<"u",newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,r){function n(e,t,r){var n,o=i.getTypeOf(t),a=i.extend(r||{},l);a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),"string"==typeof a.unixPermissions&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&16384&a.unixPermissions&&(a.dir=!0),a.dosPermissions&&16&a.dosPermissions&&(a.dir=!0),a.dir&&(e=f(e)),a.createFolders&&(n=g(e))&&m.call(this,n,!0);var u="string"===o&&!1===a.binary&&!1===a.base64;r&&void 0!==r.binary||(a.binary=!u),(t instanceof c&&0===t.uncompressedSize||a.dir||!t||0===t.length)&&(a.base64=!1,a.binary=!0,t="",a.compression="STORE",o="string");var v;v=t instanceof c||t instanceof s?t:h.isNode&&h.isStream(t)?new p(e,t):i.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var b=new d(e,v,a);this.files[e]=b}var o=e("./utf8"),i=e("./utils"),s=e("./stream/GenericWorker"),a=e("./stream/StreamHelper"),l=e("./defaults"),c=e("./compressedObject"),d=e("./zipObject"),u=e("./generate"),h=e("./nodejsUtils"),p=e("./nodejs/NodejsStreamInputAdapter"),g=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},f=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},m=function(e,t){return t=void 0!==t?t:l.createFolders,e=f(e),this.files[e]||n.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function v(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var b={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)n=this.files[t],(r=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(r,n)},filter:function(e){var t=[];
vendor: 4,100 bytes, line 5991
5991return this.forEach(function(r,n){e(r,n)&&t.push(n)}),t},file:function(e,t,r){if(1!==arguments.length)return e=this.root+e,n.call(this,e,t,r),this;if(v(e)){var o=e;return this.filter(function(e,t){return!t.dir&&o.test(e)})}var i=this.files[this.root+e];return i&&!i.dir?i:null},folder:function(e){if(!e)return this;if(v(e))return this.filter(function(t,r){return r.dir&&e.test(t)});var t=this.root+e,r=m.call(this,t),n=this.clone();return n.root=r.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter(function(t,r){return r.name.slice(0,e.length)===e}),n=0;n<r.length;n++)delete this.files[r[n].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if((r=i.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");i.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var n=r.comment||this.comment||"";t=u.generateWorker(this,r,n)}catch(e){(t=new s("error")).error(e)}return new a(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=b},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,r){t.exports=e("stream")},{stream:void 0}],17:[function(e,t,r){var n=e("./DataReader");function o(e){n.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(o,n),o.prototype.byteAt=function(e){return this.data[this.zero+e]},o.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),o=e.charCodeAt(3),i=this.length-4;0<=i;--i)if(this.data[i]===t&&this.data[i+1]===r&&this.data[i+2]===n&&this.data[i+3]===o)return i-this.zero;return-1},o.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),o=e.charCodeAt(3),i=this.readData(4);return t===i[0]&&r===i[1]&&n===i[2]&&o===i[3]},o.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=o},{"../utils":32,"./DataReader":18}],18:[function(e,t,r){var n=e("../utils");function o(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,r=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=o},{"../utils":32}],19:[function(e,t,r){var n=e("./Uint8ArrayReader");function o(e){n.call(this,e)}e("../utils").inherits(o,n),o.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t}
vendor: 2,314 bytes, line 5991
5991,t.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){var n=e("./DataReader");function o(e){n.call(this,e)}e("../utils").inherits(o,n),o.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},o.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},o.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},o.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=o},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){var n=e("./ArrayReader");function o(e){n.call(this,e)}e("../utils").inherits(o,n),o.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){var n=e("../utils"),o=e("../support"),i=e("./ArrayReader"),s=e("./StringReader"),a=e("./NodeBufferReader"),l=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||o.uint8array?"nodebuffer"===t?new a(e):o.uint8array?new l(n.transformTo("uint8array",e)):new i(n.transformTo("array",e)):new s(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){r.LOCAL_FILE_HEADER="PK��",r.CENTRAL_FILE_HEADER="PK��",r.CENTRAL_DIRECTORY_END="PK��",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK��",r.ZIP64_CENTRAL_DIRECTORY_END="PK��",r.DATA_DESCRIPTOR="PK�\b"},{}],24:[function(e,t,r){var n=e("./GenericWorker"),o=e("../utils");function i(e){n.call(this,"ConvertWorker to "+e),this.destType=e}o.inherits(i,n),i.prototype.processChunk=function(e){this.push({data:o.transformTo(this.destType,e.data),meta:e.meta})},t.exports=i},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){var n=e("./GenericWorker"),o=e("../crc32");function i(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(i,n),i.prototype.processChunk=function(e){this.streamInfo.crc32=o(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=i},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){var n=e("../utils"),o=e("./GenericWorker");
vendor: 6,959 bytes, line 5991
5991function i(e){o.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(i,o),i.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}o.prototype.processChunk.call(this,e)},t.exports=i},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){var n=e("../utils"),o=e("./GenericWorker");function i(e){o.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}n.inherits(i,o),i.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},i.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},i.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},i.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=i},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.end()}),e.on("error",function(e){t.error(e)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=n},{}],29:[function(e,t,r){var n=e("../utils"),o=e("./ConvertWorker"),i=e("./GenericWorker"),s=e("../base64"),a=e("../support"),l=e("../external"),c=null;if(a.nodestream)try{c=e("../nodejs/NodejsStreamOutputAdapter")}catch{}function d(e,t,r){var s=t;switch(t){case"blob":case"arraybuffer":s="uint8array";break;case"base64":s="string"}try{this._internalType=s,this._outputType=t,this._mimeType=r,n.checkSupport(s),this._worker=e.pipe(new o(s)),e.lock()}catch(e){this._worker=new i("error"),this._worker.error(e)}}d.prototype={accumulate:function(e){return function(e,t){return new l.Promise(function(r,o){var i=[],a=e._internalType,l=e._outputType,c=e._mimeType;e.on("data",function(e,r){i.push(e),t&&t(r)}).on("error",function(e){i=[],o(e)}).on("end",function(){try{var e=function(e,t,r){switch(e){case"blob":return n.newBlob(n.transformTo("arraybuffer",t),r);case"base64":return s.encode(t);default:return n.transformTo(e,t)}}(l,function(e,t){var r,n=0,o=null,i=0;for(r=0;r<t.length;r++)i+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(o=new Uint8Array(i),r=0;r<t.length;r++)o.set(t[r],n),n+=t[r].length;return o;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(a,i),c);r(e)}catch(e){o(e)}i=[]}).resume()})}(this,e)},on:function(e,t){var r=this;return"data"===e?this._worker.on(e,function(e){t.call(r,e.data,e.meta)}):this._worker.on(e,function(){n.delay(t,arguments,r)}),this},resume:function(){return n.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(n.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new c(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=d},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,r){if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",r.nodebuffer=typeof Buffer<"u",r.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")r.blob=!1;else{var n=new ArrayBuffer(0);try{r.blob=0===new Blob([n],{type:"application/zip"}).size}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(n),r.blob=0===o.getBlob("application/zip").size}catch{r.blob=!1}}}try{r.nodestream=!!e("readable-stream").Readable}catch{r.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,r){for(var n=e("./utils"),o=e("./support"),i=e("./nodejsUtils"),s=e("./stream/GenericWorker"),a=new Array(256),l=0;l<256;l++)a[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function c(){s.call(this,"utf-8 decode"),this.leftOver=null}function d(){s.call(this,"utf-8 encode")}a[254]=a[254]=1,r.utf8encode=function(e){return o.nodebuffer?i.newBufferFrom(e,"utf-8"):function(e){var t,r,n,i,s,a=e.length,l=0;for(i=0;i<a;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),l
vendor: 8,777 bytes, line 5991
5991+=r<128?1:r<2048?2:r<65536?3:4;for(t=o.uint8array?new Uint8Array(l):new Array(l),i=s=0;s<l;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t}(e)},r.utf8decode=function(e){return o.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,o,i,s=e.length,l=new Array(2*s);for(t=r=0;t<s;)if((o=e[t++])<128)l[r++]=o;else if(4<(i=a[o]))l[r++]=65533,t+=i-1;else{for(o&=2===i?31:3===i?15:7;1<i&&t<s;)o=o<<6|63&e[t++],i--;1<i?l[r++]=65533:o<65536?l[r++]=o:(o-=65536,l[r++]=55296|o>>10&1023,l[r++]=56320|1023&o)}return l.length!==r&&(l.subarray?l=l.subarray(0,r):l.length=r),n.applyFromCharCode(l)}(e=n.transformTo(o.uint8array?"uint8array":"array",e))},n.inherits(c,s),c.prototype.processChunk=function(e){var t=n.transformTo(o.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var i=t;(t=new Uint8Array(i.length+this.leftOver.length)).set(this.leftOver,0),t.set(i,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var s=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+a[e[r]]>t?r:t}(t),l=t;s!==t.length&&(o.uint8array?(l=t.subarray(0,s),this.leftOver=t.subarray(s,t.length)):(l=t.slice(0,s),this.leftOver=t.slice(s,t.length))),this.push({data:r.utf8decode(l),meta:e.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=c,n.inherits(d,s),d.prototype.processChunk=function(e){this.push({data:r.utf8encode(e.data),meta:e.meta})},r.Utf8EncodeWorker=d},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,r){var n=e("./support"),o=e("./base64"),i=e("./nodejsUtils"),s=e("./external");function a(e){return e}function l(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}e("setimmediate"),r.newBlob=function(e,t){r.checkSupport("blob");try{return new Blob([e],{type:t})}catch{try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(e),n.getBlob(t)}catch{throw new Error("Bug : can't construct the Blob.")}}};var c={stringifyByChunk:function(e,t,r){var n=[],o=0,i=e.length;if(i<=r)return String.fromCharCode.apply(null,e);for(;o<i;)"array"===t||"nodebuffer"===t?n.push(String.fromCharCode.apply(null,e.slice(o,Math.min(o+r,i)))):n.push(String.fromCharCode.apply(null,e.subarray(o,Math.min(o+r,i)))),o+=r;return n.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch{return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&1===String.fromCharCode.apply(null,i.allocBuffer(1)).length}catch{return!1}}()}};function d(e){var t=65536,n=r.getTypeOf(e),o=!0;if("uint8array"===n?o=c.applyCanBeUsed.uint8array:"nodebuffer"===n&&(o=c.applyCanBeUsed.nodebuffer),o)for(;1<t;)try{return c.stringifyByChunk(e,n,t)}catch{t=Math.floor(t/2)}return c.stringifyByChar(e)}function u(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}r.applyFromCharCode=d;var h={};h.string={string:a,array:function(e){return l(e,new Array(e.length))},arraybuffer:function(e){return h.string.uint8array(e).buffer},uint8array:function(e){return l(e,new Uint8Array(e.length))},nodebuffer:function(e){return l(e,i.allocBuffer(e.length))}},h.array={string:d,array:a,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return i.newBufferFrom(e)}},h.arraybuffer={string:function(e){return d(new Uint8Array(e))},array:function(e){return u(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:a,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return i.newBufferFrom(new Uint8Array(e))}},h.uint8array={string:d,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:a,nodebuffer:function(e){return i.newBufferFrom(e)}},h.nodebuffer={string:d,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return h.nodebuffer.uint8array(e).buffer},uint8array:function(e){return u(e,new Uint8Array(e.length))},nodebuffer:a},r.transformTo=function(e,t){if(t=t||"",!e)return t;r.checkSupport(e);var n=r.getTypeOf(t);return h[n][e](t)},r.resolve=function(e){for(var t=e.split("/"),r=[],n=0;n<t.length;n++){var o=t[n];"."===o||""===o&&0!==n&&n!==t.length-1||(".."===o?r.pop():r.push(o))}return r.join("/")},r.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":n.nodebuffer&&i.isBuffer(e)?"nodebuffer":n.uint8array&&e instanceof Uint8Array?"uint8array":n.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(e){if(!n[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(e){var t,r,n="";for(r=0;r<(e||"").length;r++)n+="\\x"+((t=e.charCodeAt(r))<16?"0":"")+t.toString(16).toUpperCase();return n},r.delay=function(e,t,r){setImmediate(function(){e.apply(r||null,t||[])})},r.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r},r.extend=function(){var e,t,r={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===r[t]&&(r[t]=arguments[e][t]);return r},r.prepareContent=function(e,t,i,a,c){return s.Promise.resolve(t).then(function(e){return n.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&typeof FileReader<"u"?new s.Promise(function(t,r){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=function(e){r(e.target.error)},n.readAsArrayBuffer(e)}):e}).then(function(t){var d=r.getTypeOf(t);return d?("arraybuffer"===d?t=r.transformTo("uint8array",t):"string"===d&&(c?t=o.decode(t):i&&!0!==a&&(t=function(e){return l(e,n.uint8array?new Uint8Array(e.length):new Array(e.length))}(t))),t):s.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,r){var n=e("./reader/readerFor"),o=e("./utils"),i=e("./signature"),s=e("./zipEntry"),a=e("./support");function l(e){this.files=[],this.loadOptions=e}l.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(t)+", expected "+o.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4)===t;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=a.uint8array?"uint8array":"array",r=o.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,r,n=this.zip64EndOfCentralSize-44;0<n;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(i.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;
vendor: 4,643 bytes, line 5991
5991for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(i.CENTRAL_FILE_HEADER);)(e=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(i.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,i.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(i.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,i.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=t-r;if(0<n)this.isSignature(t,i.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=l},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,r){var n=e("./reader/readerFor"),o=e("./utils"),i=e("./compressedObject"),s=e("./crc32"),a=e("./utf8"),l=e("./compressions"),c=e("./support");function d(e,t){this.options=e,this.loadOptions=t}d.prototype={isEncrypted:function(){return!(1&~this.bitFlag)},useUTF8:function(){return!(2048&~this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in l)if(Object.prototype.hasOwnProperty.call(l,t)&&l[t].magic===e)return l[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new i(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=n(this.extraFields[1].value);
vendor: 2,524 bytes, line 5991
5991this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,r,n,o=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<o;)t=e.readInt(2),r=e.readInt(2),n=e.readData(r),this.extraFields[t]={id:t,length:r,value:n};e.setIndex(o)},handleUTF8:function(){var e=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var r=o.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var i=o.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(i)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=n(e.value);return 1!==t.readInt(1)||s(this.fileName)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=n(e.value);return 1!==t.readInt(1)||s(this.fileComment)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null}},t.exports=d},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,r){function n(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}}var o=e("./stream/StreamHelper"),i=e("./stream/DataWorker"),s=e("./utf8"),a=e("./compressedObject"),l=e("./stream/GenericWorker");n.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var n="string"===(r=e.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker();var i=!this._dataBinary;i&&!n&&(t=t.pipe(new s.Utf8EncodeWorker)),!i&&n&&(t=t.pipe(new s.Utf8DecodeWorker))}catch(e){(t=new l("error")).error(e)}return new o(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)}
vendor: 11,194 bytes, line 5991
5991,nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof a&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new s.Utf8EncodeWorker)),a.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof l?this._data:new i(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],d=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},u=0;u<c.length;u++)n.prototype[c[u]]=d;t.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,r){(function(e){var r,n,o=e.MutationObserver||e.WebKitMutationObserver;if(o){var i=0,s=new o(d),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),r=function(){a.data=i=++i%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){d(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(d,0)};else{var l=new e.MessageChannel;l.port1.onmessage=d,r=function(){l.port2.postMessage(0)}}var c=[];function d(){var e,t;n=!0;for(var r=c.length;r;){for(t=c,c=[],e=-1;++e<r;)t[e]();r=c.length}n=!1}t.exports=function(e){1!==c.push(e)||n||r()}}).call(this,typeof D4<"u"?D4:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(e,t,r){var n=e("immediate");function o(){}var i={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==o&&p(this,e)}function d(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function u(e,t,r){n(function(){var n;try{n=t(r)}catch(t){return i.reject(e,t)}n===e?i.reject(e,new TypeError("Cannot resolve promise with itself")):i.resolve(e,n)})}function h(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function p(e,t){var r=!1;function n(t){r||(r=!0,i.reject(e,t))}function o(t){r||(r=!0,i.resolve(e,t))}var s=g(function(){t(o,n)});"error"===s.status&&n(s.value)}function g(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}(t.exports=c).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){throw r})})},c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var r=new this.constructor(o);return this.state!==l?u(r,this.state===a?e:t,this.outcome):this.queue.push(new d(r,e,t)),r},d.prototype.callFulfilled=function(e){i.resolve(this.promise,e)},d.prototype.otherCallFulfilled=function(e){u(this.promise,this.onFulfilled,e)},d.prototype.callRejected=function(e){i.reject(this.promise,e)},d.prototype.otherCallRejected=function(e){u(this.promise,this.onRejected,e)},i.resolve=function(e,t){var r=g(h,t);if("error"===r.status)return i.reject(e,r.value);var n=r.value;if(n)p(e,n);else{e.state=a,e.outcome=t;for(var o=-1,s=e.queue.length;++o<s;)e.queue[o].callFulfilled(t)}return e},i.reject=function(e,t){e.state=s,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:i.resolve(new this(o),e)},c.reject=function(e){var t=new this(o);return i.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var s=new Array(r),a=0,l=-1,c=new this(o);++l<r;)d(e[l],l);return c;function d(e,o){t.resolve(e).then(function(e){s[o]=e,++a!==r||n||(n=!0,i.resolve(c,s))},function(e){n||(n=!0,i.reject(c,e))})}},c.race=function(e){if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var t,r=e.length,n=!1;if(!r)return this.resolve([]);for(var s=-1,a=new this(o);++s<r;)t=e[s],this.resolve(t).then(function(e){n||(n=!0,i.resolve(a,e))},function(e){n||(n=!0,i.reject(a,e))});return a}},{immediate:36}],38:[function(e,t,r){var n={};(0,e("./lib/utils/common").assign)(n,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=n},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,r){var n=e("./zlib/deflate"),o=e("./utils/common"),i=e("./utils/strings"),s=e("./zlib/messages"),a=e("./zlib/zstream"),l=Object.prototype.toString;function c(e){if(!(this instanceof c))return new c(e);this.options=o.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==r)throw new Error(s[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var d;if(d="string"==typeof t.dictionary?i.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(r=n.deflateSetDictionary(this.strm,d)))throw new Error(s[r]);this._dict_set=!0}}function d(e,t){var r=new c(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}c.prototype.push=function(e,t){var r,s,a=this.strm,c=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=i.string2buf(e):"[object ArrayBuffer]"===l.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new o.Buf8(c),a.next_out=0,a.avail_out=c),1!==(r=n.deflate(a,s))&&0!==r)return this.onEnd(r),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(i.buf2binstring(o.shrinkBuf(a.output,a.next_out))):this.onData(o.shrinkBuf(a.output,a.next_out)))}while((0<a.avail_in||0===a.avail_out)&&1!==r);return 4===s?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==s||(this.onEnd(0),!(a.avail_out=0))},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Deflate=c,r.deflate=d,r.deflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},r.gzip=function(e,t){return(t=t||{}).gzip=!0,d(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,r){var n=e("./zlib/inflate"),o=e("./utils/common"),i=e("./utils/strings"),s=e("./zlib/constants"),a=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),d=Object.prototype.toString;function u(e){if(!(this instanceof u))return new u(e);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&!(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==s.Z_OK)throw new Error(a[r]);this.header=new c,n.inflateGetHeader(this.strm,this.header)}function h(e,t){var r=new u(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}u.prototype.push=function(e,t){var r,a,l,c,u,h,p=this.strm,g=this.options.chunkSize,f=this.options.dictionary,m=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof e?p.input=i.binstring2buf(e):"[object ArrayBuffer]"===d.call(e)?p.input=new Uint8Array(e):p.input=e,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new o.Buf8(g),p.next_out=0,p.avail_out=g),(r=n.inflate(p,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&f&&(h="string"==typeof f?i.string2buf(f):"[object ArrayBuffer]"===d.call(f)?new Uint8Array(f):f,r=n.inflateSetDictionary(this.strm,h)),r===s.Z_BUF_ERROR&&!0===m&&(r=s.Z_OK,m=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),!(this.ended=!0);p.next_out&&(0!==p.avail_out&&r!==s.Z_STREAM_END&&(0!==p.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(l=i.utf8border(p.output,p.next_out),c=p.next_out-l,u=i.buf2string(p.output,l),p.next_out=c,p.avail_out=g-c,c&&o.arraySet(p.output,p.output,l,c,0),this.onData(u)):this.onData(o.shrinkBuf(p.output,p.next_out)))),0===p.avail_in&&0===p.avail_out&&(m=!0)}while((0<p.avail_in||0===p.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(p.avail_out=0))},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){e===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=u,r.inflate=h,r.inflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},r.ungzip=h},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,r){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";r.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,r,n,o){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),o);else for(var i=0;i<n;i++)e[o+i]=t[r+i]},flattenChunks:function(e){var t,r,n,o,i,s;for(t=n=0,r=e.length;t<r;t++)n+=e[t].length;for(s=new Uint8Array(n),t=o=0,r=e.length;t<r;t++)i=e[t],s.set(i,o),o+=i.length;return s}},i={arraySet:function(e,t,r,n,o){for(var i=0;i<n;i++)e[o+i]=t[r+i]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,o)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,i))},r.setTyped(n)},{}],42:[function(e,t,r){var n=e("./common"),o=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}
vendor: 5,600 bytes, line 5991
5991try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{i=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function l(e,t){if(t<65537&&(e.subarray&&i||!e.subarray&&o))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",s=0;s<t;s++)r+=String.fromCharCode(e[s]);return r}s[254]=s[254]=1,r.string2buf=function(e){var t,r,o,i,s,a=e.length,l=0;for(i=0;i<a;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(o=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(o-56320),i++),l+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(l),i=s=0;s<l;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(o=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(o-56320),i++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t},r.buf2binstring=function(e){return l(e,e.length)},r.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,o=t.length;r<o;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,n,o,i,a=t||e.length,c=new Array(2*a);for(r=n=0;r<a;)if((o=e[r++])<128)c[n++]=o;else if(4<(i=s[o]))c[n++]=65533,r+=i-1;else{for(o&=2===i?31:3===i?15:7;1<i&&r<a;)o=o<<6|63&e[r++],i--;1<i?c[n++]=65533:o<65536?c[n++]=o:(o-=65536,c[n++]=55296|o>>10&1023,c[n++]=56320|1023&o)}return l(c,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){t.exports=function(e,t,r,n){for(var o=65535&e,i=e>>>16&65535,s=0;0!==r;){for(r-=s=2e3<r?2e3:r;i=i+(o=o+t[n++]|0)|0,--s;);o%=65521,i%=65521}return o|i<<16}},{}],44:[function(e,t,r){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,r){var n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,o){var i=n,s=o+r;e^=-1;for(var a=o;a<s;a++)e=e>>>8^i[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,r){var n,o=e("../utils/common"),i=e("./trees"),s=e("./adler32"),a=e("./crc32"),l=e("./messages"),c=-2,d=258,u=262,h=113;function p(e,t){return e.msg=l[t],t}function g(e){return(e<<1)-(4<e?9:0)}function f(e){for(var t=e.length;0<=--t;)e[t]=0}function m(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(o.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function v(e,t){i._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,m(e.strm)}function b(e,t){e.pending_buf[e.pending++]=t}function y(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function w(e,t){var r,n,o=e.max_chain_length,i=e.strstart,s=e.prev_length,a=e.nice_match,l=e.strstart>e.w_size-u?e.strstart-(e.w_size-u):0,c=e.window,h=e.w_mask,p=e.prev,g=e.strstart+d,f=c[i+s-1],m=c[i+s];e.prev_length>=e.good_match&&(o>>=2),a>e.lookahead&&(a=e.lookahead);do{if(c[(r=t)+s]===m&&c[r+s-1]===f&&c[r]===c[i]&&c[++r]===c[i+1]){i+=2,r++;do{}while(c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&i<g);if(n=d-(g-i),i=g-d,s<n){if(e.match_start=t,a<=(s=n))break;f=c[i+s-1],m=c[i+s]}}}while((t=p[t&h])>l&&0!=--o);return s<=e.lookahead?s:e.lookahead}function x(e){var t,r,n,i,l,c,d,h,p,g,f=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-u)){for(o.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=r=e.hash_size;n=e.head[--t],e.head[t]=f<=n?n-f:0,--r;);for(t=r=f;n=e.prev[--t],e.prev[t]=f<=n?n-f:0,--r;);i+=f}if(0===e.strm.avail_in)break;if(c=e.strm,d=e.window,h=e.strstart+e.lookahead,g=void 0,(p=i)<(g=c.avail_in)&&(g=p),r=0===g?0:(c.avail_in-=g,o.arraySet(d,c.input,c.next_in,g,h),1===c.state.wrap?c.adler=s(c.adler,d,g,h):2===c.state.wrap&&(c.adler=a(c.adler,d,g,h)),c.next_in+=g,c.total_in+=g,g),e.lookahead+=r,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+3-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<u&&0!==e.strm.avail_in)}function _(e,t){for(var r,n;;){if(e.lookahead<u){if(x(e),e.lookahead<u&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-u&&(e.match_length=w(e,r)),e.match_length>=3)if(n=i._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;
vendor: 8,064 bytes, line 5991
5991else n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}function k(e,t){for(var r,n,o;;){if(e.lookahead<u){if(x(e),e.lookahead<u&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-u&&(e.match_length=w(e,r),e.match_length<=5&&(1===e.strategy||3===e.match_length&&4096<e.strstart-e.match_start)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){for(o=e.strstart+e.lookahead-3,n=i._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(v(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=i._tr_tally(e,0,e.window[e.strstart-1]))&&v(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=i._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}function C(e,t,r,n,o){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=o}function S(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(1146),this.dyn_dtree=new o.Buf16(122),this.bl_tree=new o.Buf16(78),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(16),this.heap=new o.Buf16(573),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(573),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function E(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:h,e.adler=2===t.wrap?0:1,t.last_flush=0,i._tr_init(t),0):p(e,c)}function I(e){var t,r=E(e);return 0===r&&((t=e.state).window_size=2*t.w_size,f(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),r}function A(e,t,r,n,i,s){if(!e)return c;var a=1;if(-1===t&&(t=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),i<1||9<i||8!==r||n<8||15<n||t<0||9<t||s<0||4<s)return p(e,c);8===n&&(n=9);var l=new S;return(e.state=l).strm=e,l.wrap=a,l.gzhead=null,l.w_bits=n,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=i+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new o.Buf8(2*l.w_size),l.head=new o.Buf16(l.hash_size),l.prev=new o.Buf16(l.w_size),l.lit_bufsize=1<<i+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new o.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=s,l.method=r,I(e)}n=[new C(0,0,0,0,function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(x(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,v(e,!1),0===e.strm.avail_out)||e.strstart-e.block_start>=e.w_size-u&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(v(e,!1),e.strm.avail_out),1)}),new C(4,4,8,4,_),new C(4,5,16,8,_),new C(4,6,32,32,_),new C(4,4,16,16,k),new C(8,16,32,32,k),new C(8,16,128,128,k),new C(8,32,128,256,k),new C(32,128,258,1024,k),new C(32,258,258,4096,k)],r.deflateInit=function(e,t){return A(e,t,8,15,8,0)},r.deflateInit2=A,r.deflateReset=I,r.deflateResetKeep=E,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?c:(e.state.gzhead=t,0):c},r.deflate=function(e,t){var r,o,s,l;if(!e||!e.state||5<t||t<0)return e?p(e,c):c;if(o=e.state,!e.output||!e.input&&0!==e.avail_in||666===o.status&&4!==t)return p(e,0===e.avail_out?-5:c);if(o.strm=e,r=o.last_flush,o.last_flush=t,42===o.status)if(2===o.wrap)e.adler=0,b(o,31),b(o,139),b(o,8),o.gzhead?(b(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),b(o,255&o.gzhead.time),b(o,o.gzhead.time>>8&255),b(o,o.gzhead.time>>16&255),b(o,o.gzhead.time>>24&255),b(o,9===o.level?2:2<=o.strategy||o.level<2?4:0),b(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(b(o,255&o.gzhead.extra.length),b(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=a(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(b(o,0),b(o,0),b(o,0),b(o,0),b(o,0),b(o,9===o.level?2:2<=o.strategy||o.level<2?4:0),b(o,3),o.status=h);else{var u=8+(o.w_bits-8<<4)<<8;u|=(2<=o.strategy||o.level<2?0:o.level<6?1:6===o.level?2:3)<<6,0!==o.strstart&&(u|=32),u+=31-u%31,o.status=h,y(o,u),0!==o.strstart&&(y(o,e.adler>>>16),y(o,65535&e.adler)),e.adler=1}if(69===o.status)if(o.gzhead.extra){for(s=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),m(e),s=o.pending,o.pending!==o.pending_buf_size));)b(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){s=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),m(e),s=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,b(o,l)}while(0!==l);o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),0===l&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){s=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),m(e),s=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,b(o,l)}while(0!==l);o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),0===l&&(o.status=103)}else o.status=103;if(103===o.status&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&m(e),o.pending+2<=o.pending_buf_size&&(b(o,255&e.adler),b(o,e.adler>>8&255),e.adler=0,o.status=h)):o.status=h),0!==o.pending){if(m(e),0===e.avail_out)return o.last_flush=-1,0}else if(0===e.avail_in&&g(t)<=g(r)&&4!==t)return p(e,-5);if(666===o.status&&0!==e.avail_in)return p(e,-5);if(0!==e.avail_in||0!==o.lookahead||0!==t&&666!==o.status){var w=2===o.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(x(e),0===e.lookahead)){if(0===t)return 1;break}
vendor: 6,036 bytes, line 5991
5991if(e.match_length=0,r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}(o,t):3===o.strategy?function(e,t){for(var r,n,o,s,a=e.window;;){if(e.lookahead<=d){if(x(e),e.lookahead<=d&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&0<e.strstart&&(n=a[o=e.strstart-1])===a[++o]&&n===a[++o]&&n===a[++o]){s=e.strstart+d;do{}while(n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&o<s);e.match_length=d-(s-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=i._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}(o,t):n[o.level].func(o,t);if(3!==w&&4!==w||(o.status=666),1===w||3===w)return 0===e.avail_out&&(o.last_flush=-1),0;if(2===w&&(1===t?i._tr_align(o):5!==t&&(i._tr_stored_block(o,0,0,!1),3===t&&(f(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),m(e),0===e.avail_out))return o.last_flush=-1,0}return 4!==t?0:o.wrap<=0?1:(2===o.wrap?(b(o,255&e.adler),b(o,e.adler>>8&255),b(o,e.adler>>16&255),b(o,e.adler>>24&255),b(o,255&e.total_in),b(o,e.total_in>>8&255),b(o,e.total_in>>16&255),b(o,e.total_in>>24&255)):(y(o,e.adler>>>16),y(o,65535&e.adler)),m(e),0<o.wrap&&(o.wrap=-o.wrap),0!==o.pending?0:1)},r.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&t!==h&&666!==t?p(e,c):(e.state=null,t===h?p(e,-3):0):c},r.deflateSetDictionary=function(e,t){var r,n,i,a,l,d,u,h,p=t.length;if(!e||!e.state||2===(a=(r=e.state).wrap)||1===a&&42!==r.status||r.lookahead)return c;for(1===a&&(e.adler=s(e.adler,t,p,0)),r.wrap=0,p>=r.w_size&&(0===a&&(f(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new o.Buf8(r.w_size),o.arraySet(h,t,p-r.w_size,r.w_size,0),t=h,p=r.w_size),l=e.avail_in,d=e.next_in,u=e.input,e.avail_in=p,e.next_in=0,e.input=t,x(r);r.lookahead>=3;){for(n=r.strstart,i=r.lookahead-2;r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++,--i;);r.strstart=n,r.lookahead=2,x(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=d,e.input=u,e.avail_in=l,r.wrap=a,0},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,r){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,t,r){t.exports=function(e,t){var r,n,o,i,s,a,l,c,d,u,h,p,g,f,m,v,b,y,w,x,_,k,C,S,E;r=e.state,n=e.next_in,S=e.input,o=n+(e.avail_in-5),i=e.next_out,E=e.output,s=i-(t-e.avail_out),a=i+(e.avail_out-257),l=r.dmax,c=r.wsize,d=r.whave,u=r.wnext,h=r.window,p=r.hold,g=r.bits,f=r.lencode,m=r.distcode,v=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;e:do{g<15&&(p+=S[n++]<<g,g+=8,p+=S[n++]<<g,g+=8),y=f[p&v];t:for(;;){if(p>>>=w=y>>>24,g-=w,0==(w=y>>>16&255))E[i++]=65535&y;else{if(!(16&w)){if(!(64&w)){y=f[(65535&y)+(p&(1<<w)-1)];continue t}if(32&w){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}x=65535&y,(w&=15)&&(g<w&&(p+=S[n++]<<g,g+=8),x+=p&(1<<w)-1,p>>>=w,g-=w),g<15&&(p+=S[n++]<<g,g+=8,p+=S[n++]<<g,g+=8),y=m[p&b];r:for(;;){if(p>>>=w=y>>>24,g-=w,!(16&(w=y>>>16&255))){if(!(64&w)){y=m[(65535&y)+(p&(1<<w)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(_=65535&y,g<(w&=15)&&(p+=S[n++]<<g,(g+=8)<w&&(p+=S[n++]<<g,g+=8)),l<(_+=p&(1<<w)-1)){e.msg="invalid distance too far back",r.mode=30;break e}if(p>>>=w,g-=w,(w=i-s)<_){if(d<(w=_-w)&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(C=h,(k=0)===u){if(k+=c-w,w<x){for(x-=w;E[i++]=h[k++],--w;);k=i-_,C=E}}else if(u<w){if(k+=c+u-w,(w-=u)<x){for(x-=w;E[i++]=h[k++],--w;);if(k=0,u<x){for(x-=w=u;E[i++]=h[k++],--w;);k=i-_,C=E}}}else if(k+=u-w,w<x){for(x-=w;E[i++]=h[k++],--w;);k=i-_,C=E}for(;2<x;)E[i++]=C[k++],E[i++]=C[k++],E[i++]=C[k++],x-=3;x&&(E[i++]=C[k++],1<x&&(E[i++]=C[k++]))}else{for(k=i-_;E[i++]=E[k++],E[i++]=E[k++],E[i++]=E[k++],2<(x-=3););x&&(E[i++]=E[k++],1<x&&(E[i++]=E[k++]))}break}}break}}while(n<o&&i<a);n-=x=g>>3,p&=(1<<(g-=x<<3))-1,e.next_in=n,e.next_out=i,e.avail_in=n<o?o-n+5:5-(n-o),e.avail_out=i<a?a-i+257:257-(i-a),r.hold=p,r.bits=g}},{}],49:[function(e,t,r){var n=e("../utils/common"),o=e("./adler32"),i=e("./crc32"),s=e("./inffast"),a=e("./inftrees"),l=-2;function c(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function d(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function u(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):l}function h(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,u(e)):l}function p(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?l:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,h(e))):l}function g(e,t){var r,n;
vendor: 5,024 bytes, line 5991
5991return e?(n=new d,(e.state=n).window=null,0!==(r=p(e,t))&&(e.state=null),r):l}var f,m,v=!0;function b(e){if(v){var t;for(f=new n.Buf32(512),m=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,f,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,m,0,e.work,{bits:5}),v=!1}e.lencode=f,e.lenbits=9,e.distcode=m,e.distbits=5}function y(e,t,r,o){var i,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),o>=s.wsize?(n.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(o<(i=s.wsize-s.wnext)&&(i=o),n.arraySet(s.window,t,r-o,i,s.wnext),(o-=i)?(n.arraySet(s.window,t,r-o,o,0),s.wnext=o,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0}r.inflateReset=h,r.inflateReset2=p,r.inflateResetKeep=u,r.inflateInit=function(e){return g(e,15)},r.inflateInit2=g,r.inflate=function(e,t){var r,d,u,h,p,g,f,m,v,w,x,_,k,C,S,E,I,A,T,O,L,$,N,R,P=0,D=new n.Buf8(4),M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return l;12===(r=e.state).mode&&(r.mode=13),p=e.next_out,u=e.output,f=e.avail_out,h=e.next_in,d=e.input,g=e.avail_in,m=r.hold,v=r.bits,w=g,x=f,$=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;v<16;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(2&r.wrap&&35615===m){D[r.check=0]=255&m,D[1]=m>>>8&255,r.check=i(r.check,D,2,0),v=m=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&m)){e.msg="unknown compression method",r.mode=30;break}if(v-=4,L=8+(15&(m>>>=4)),0===r.wbits)r.wbits=L;else if(L>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<L,e.adler=r.check=1,r.mode=512&m?10:12,v=m=0;break;case 2:for(;v<16;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(r.flags=m,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=m>>8&1),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,r.check=i(r.check,D,2,0)),v=m=0,r.mode=3;case 3:for(;v<32;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.head&&(r.head.time=m),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,D[2]=m>>>16&255,D[3]=m>>>24&255,r.check=i(r.check,D,4,0)),v=m=0,r.mode=4;case 4:for(;v<16;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.head&&(r.head.xflags=255&m,r.head.os=m>>8),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,r.check=i(r.check,D,2,0)),v=m=0,r.mode=5;case 5:if(1024&r.flags){for(;v<16;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.length=m,r.head&&(r.head.extra_len=m),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,r.check=i(r.check,D,2,0)),v=m=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(g<(_=r.length)&&(_=g),_&&(r.head&&(L=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,d,h,_,L)),512&r.flags&&(r.check=i(r.check,d,_,h)),g-=_,h+=_,r.length-=_),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===g)break e;for(_=0;L=d[h+_++],r.head&&L&&r.length<65536&&(r.head.name+=String.fromCharCode(L)),L&&_<g;);if(512&r.flags&&(r.check=i(r.check,d,_,h)),g-=_,h+=_,L)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===g)break e;for(_=0;L=d[h+_++],r.head&&L&&r.length<65536&&(r.head.comment+=String.fromCharCode(L)),L&&_<g;);if(512&r.flags&&(r.check=i(r.check,d,_,h)),g-=_,h+=_,L)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;v<16;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(m!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}v=m=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;v<32;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}e.adler=r.check=c(m),v=m=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=p,e.avail_out=f,e.next_in=h,e.avail_in=g,r.hold=m,r.bits=v,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){m>>>=7&v,v-=7&v,r.mode=27;break}for(;v<3;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}switch(r.last=1&m,v-=1,3&(m>>>=1)){case 0:r.mode=14;break;case 1:if(b(r),r.mode=20,6!==t)break;m>>>=2,v-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}m>>>=2,v-=2;break;case 14:for(m>>>=7&v,v-=7&v;v<32;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if((65535&m)!=(m>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&m,v=m=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(_=r.length){if(g<_&&(_=g),f<_&&(_=f),0===_)break e;n.arraySet(u,d,h,_,p),g-=_,h+=_,f-=_,p+=_,r.length-=_;break}r.mode=12;break;case 17:for(;v<14;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(r.nlen=257+(31&m),m>>>=5,v-=5,r.ndist=1+(31&m),m>>>=5,v-=5,r.ncode=4+(15&m),m>>>=4,v-=4,286<r.nlen||30<r.ndist){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;
vendor: 10,092 bytes, line 5991
5991v<3;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.lens[M[r.have++]]=7&m,m>>>=3,v-=3}for(;r.have<19;)r.lens[M[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,N={bits:r.lenbits},$=a(0,r.lens,0,19,r.lencode,0,r.work,N),r.lenbits=N.bits,$){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;E=(P=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,I=65535&P,!((S=P>>>24)<=v);){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(I<16)m>>>=S,v-=S,r.lens[r.have++]=I;else{if(16===I){for(R=S+2;v<R;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(m>>>=S,v-=S,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}L=r.lens[r.have-1],_=3+(3&m),m>>>=2,v-=2}else if(17===I){for(R=S+3;v<R;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}v-=S,L=0,_=3+(7&(m>>>=S)),m>>>=3,v-=3}else{for(R=S+7;v<R;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}v-=S,L=0,_=11+(127&(m>>>=S)),m>>>=7,v-=7}if(r.have+_>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;_--;)r.lens[r.have++]=L}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,N={bits:r.lenbits},$=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,N),r.lenbits=N.bits,$){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,N={bits:r.distbits},$=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,N),r.distbits=N.bits,$){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=g&&258<=f){e.next_out=p,e.avail_out=f,e.next_in=h,e.avail_in=g,r.hold=m,r.bits=v,s(e,x),p=e.next_out,u=e.output,f=e.avail_out,h=e.next_in,d=e.input,g=e.avail_in,m=r.hold,v=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;E=(P=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,I=65535&P,!((S=P>>>24)<=v);){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(E&&!(240&E)){for(A=S,T=E,O=I;E=(P=r.lencode[O+((m&(1<<A+T)-1)>>A)])>>>16&255,I=65535&P,!(A+(S=P>>>24)<=v);){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}m>>>=A,v-=A,r.back+=A}if(m>>>=S,v-=S,r.back+=S,r.length=I,0===E){r.mode=26;break}if(32&E){r.back=-1,r.mode=12;break}if(64&E){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&E,r.mode=22;case 22:if(r.extra){for(R=r.extra;v<R;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.length+=m&(1<<r.extra)-1,m>>>=r.extra,v-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;E=(P=r.distcode[m&(1<<r.distbits)-1])>>>16&255,I=65535&P,!((S=P>>>24)<=v);){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(!(240&E)){for(A=S,T=E,O=I;E=(P=r.distcode[O+((m&(1<<A+T)-1)>>A)])>>>16&255,I=65535&P,!(A+(S=P>>>24)<=v);){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}m>>>=A,v-=A,r.back+=A}if(m>>>=S,v-=S,r.back+=S,64&E){e.msg="invalid distance code",r.mode=30;break}r.offset=I,r.extra=15&E,r.mode=24;case 24:if(r.extra){for(R=r.extra;v<R;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}r.offset+=m&(1<<r.extra)-1,m>>>=r.extra,v-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===f)break e;if(_=x-f,r.offset>_){if((_=r.offset-_)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}k=_>r.wnext?(_-=r.wnext,r.wsize-_):r.wnext-_,_>r.length&&(_=r.length),C=r.window}else C=u,k=p-r.offset,_=r.length;for(f<_&&(_=f),f-=_,r.length-=_;u[p++]=C[k++],--_;);0===r.length&&(r.mode=21);break;case 26:if(0===f)break e;u[p++]=r.length,f--,r.mode=21;break;case 27:if(r.wrap){for(;v<32;){if(0===g)break e;g--,m|=d[h++]<<v,v+=8}if(x-=f,e.total_out+=x,r.total+=x,x&&(e.adler=r.check=r.flags?i(r.check,u,x,p-x):o(r.check,u,x,p-x)),x=f,(r.flags?m:c(m))!==r.check){e.msg="incorrect data check",r.mode=30;break}v=m=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;v<32;){if(0===g)break e;g--,m+=d[h++]<<v,v+=8}if(m!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}v=m=0}r.mode=29;case 29:$=1;break e;case 30:$=-3;break e;case 31:return-4;default:return l}return e.next_out=p,e.avail_out=f,e.next_in=h,e.avail_in=g,r.hold=m,r.bits=v,(r.wsize||x!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&y(e,e.output,e.next_out,x-e.avail_out)?(r.mode=31,-4):(w-=e.avail_in,x-=e.avail_out,e.total_in+=w,e.total_out+=x,r.total+=x,r.wrap&&x&&(e.adler=r.check=r.flags?i(r.check,u,x,e.next_out-x):o(r.check,u,x,e.next_out-x)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==w&&0===x||4===t)&&0===$&&($=-5),$)},r.inflateEnd=function(e){if(!e||!e.state)return l;var t=e.state;return t.window&&(t.window=null),e.state=null,0},r.inflateGetHeader=function(e,t){var r;return e&&e.state&&2&(r=e.state).wrap?((r.head=t).done=!1,0):l},r.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?l:11===r.mode&&o(1,t,n,0)!==r.check?-3:y(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,0):l},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,r){var n=e("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],i=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,l,c,d,u,h){var p,g,f,m,v,b,y,w,x,_=h.bits,k=0,C=0,S=0,E=0,I=0,A=0,T=0,O=0,L=0,$=0,N=null,R=0,P=new n.Buf16(16),D=new n.Buf16(16),M=null,z=0;for(k=0;k<=15;k++)P[k]=0;for(C=0;C<l;C++)P[t[r+C]]++;for(I=_,E=15;1<=E&&0===P[E];E--);if(E<I&&(I=E),0===E)return c[d++]=20971520,c[d++]=20971520,h.bits=1,0;for(S=1;S<E&&0===P[S];S++);for(I<S&&(I=S),k=O=1;k<=15;k++)if(O<<=1,(O-=P[k])<0)return-1;if(0<O&&(0===e||1!==E))return-1;for(D[1]=0,k=1;k<15;k++)D[k+1]=D[k]+P[k];for(C=0;C<l;C++)0!==t[r+C]&&(u[D[t[r+C]]++]=C);if(b=0===e?(N=M=u,19):1===e?(N=o,R-=257,M=i,z-=257,256):(N=s,M=a,-1),k=S,v=d,T=C=$=0,f=-1,m=(L=1<<(A=I))-1,1===e&&852<L||2===e&&592<L)return 1;for(;;){for(y=k-T,x=u[C]<b?(w=0,u[C]):u[C]>b?(w=M[z+u[C]],N[R+u[C]]):(w=96,0),p=1<<k-T,S=g=1<<A;c[v+($>>T)+(g-=p)]=y<<24|w<<16|x,0!==g;);for(p=1<<k-1;$&p;)p>>=1;if(0!==p?($&=p-1,$+=p):$=0,C++,0==--P[k]){if(k===E)break;k=t[r+u[C]]}if(I<k&&($&m)!==f){for(0===T&&(T=I),v+=S,O=1<<(A=k-T);A+T<E&&!((O-=P[A+T])<=0);)A++,O<<=1;if(L+=1<<A,1===e&&852<L||2===e&&592<L)return 1;c[f=$&m]=I<<24|A<<16|v-d}}return 0!==$&&(c[v+$]=k-T<<24|64<<16),h.bits=I,0}},{"../utils/common":41}],51:[function(e,t,r){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,t,r){var n=e("../utils/common");function o(e){for(var t=e.length;0<=--t;)e[t]=0}var i=256,s=286,a=30,l=15,c=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],d=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=new Array(576);o(p);var g=new Array(60);o(g);var f=new Array(512);o(f);var m=new Array(256);o(m);var v=new Array(29);o(v);var b,y,w,x=new Array(a);function _(e,t,r,n,o){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}function k(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function C(e){return e<256?f[e]:f[256+(e>>>7)]}function S(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function E(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,S(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function I(e,t,r){E(e,r[2*t],r[2*t+1])}function A(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function T(e,t,r){var n,o,i=new Array(16),s=0;for(n=1;n<=l;n++)i[n]=s=s+r[n-1]<<1;for(o=0;o<=t;o++){var a=e[2*o+1];0!==a&&(e[2*o]=A(i[a]++,a))}}function O(e){var t;for(t=0;t<s;t++)e.dyn_ltree[2*t]=0;for(t=0;t<a;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function L(e){8<e.bi_valid?S(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function $(e,t,r,n){var o=2*t,i=2*r;return e[o]<e[i]||e[o]===e[i]&&n[t]<=n[r]}function N(e,t,r){for(var n=e.heap[r],o=r<<1;o<=e.heap_len&&(o<e.heap_len&&$(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!$(t,n,e.heap[o],e.depth));)e.heap[r]=e.heap[o],r=o,o<<=1;e.heap[r]=n}function R(e,t,r){var n,o,s,a,l=0;if(0!==e.last_lit)for(;n=e.pending_buf[e.d_buf+2*l]<<8|e.pending_buf[e.d_buf+2*l+1],o=e.pending_buf[e.l_buf+l],l++,0===n?I(e,o,t):(I(e,(s=m[o])+i+1,t),0!==(a=c[s])&&E(e,o-=v[s],a),I(e,s=C(--n),r),0!==(a=d[s])&&E(e,n-=x[s],a)),l<e.last_lit;);I(e,256,t)}function P(e,t){var r,n,o,i=t.dyn_tree,s=t.stat_desc.static_tree,a=t.stat_desc.has_stree,c=t.stat_desc.elems,d=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<c;r++)0!==i[2*r]?(e.heap[++e.heap_len]=d=r,e.depth[r]=0):i[2*r+1]=0;for(;e.heap_len<2;)i[2*(o=e.heap[++e.heap_len]=d<2?++d:0)]=1,e.depth[o]=0,e.opt_len--,a&&(e.static_len-=s[2*o+1]);for(t.max_code=d,r=e.heap_len>>1;1<=r;r--)N(e,i,r);for(o=c;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],N(e,i,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,i[2*o]=i[2*r]+i[2*n],e.depth[o]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,i[2*r+1]=i[2*n+1]=o,e.heap[1]=o++,N(e,i,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,o,i,s,a,c=t.dyn_tree,d=t.max_code,u=t.stat_desc.static_tree,h=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,g=t.stat_desc.extra_base,f=t.stat_desc.max_length,m=0;for(i=0;i<=l;i++)e.bl_count[i]=0;for(c[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)f<(i=c[2*c[2*(n=e.heap[r])+1]+1]+1)&&(i=f,m++),c[2*n+1]=i,d<n||(e.bl_count[i]++,s=0,g<=n&&(s=p[n-g]),a=c[2*n],e.opt_len+=a*(i+s),h&&(e.static_len+=a*(u[2*n+1]+s)));if(0!==m){do{for(i=f-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[f]--,m-=2}while(0<m);for(i=f;0!==i;i--)for(n=e.bl_count[i];0!==n;
5991)d<(o=e.heap[--r])||(c[2*o+1]!==i&&(e.opt_len+=(i-c[2*o+1])*c[2*o],c[2*o+1]=i),n--)}}(e,t),T(i,d,e.bl_count)}function D(e,t,r){var n,o,i=-1,s=t[1],a=0,l=7,c=4;for(0===s&&(l=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)o=s,s=t[2*(n+1)+1],++a<l&&o===s||(a<c?e.bl_tree[2*o]+=a:0!==o?(o!==i&&e.bl_tree[2*o]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,i=o,c=(a=0)===s?(l=138,3):o===s?(l=6,3):(l=7,4))}function M(e,t,r){var n,o,i=-1,s=t[1],a=0,l=7,c=4;for(0===s&&(l=138,c=3),n=0;n<=r;n++)if(o=s,s=t[2*(n+1)+1],!(++a<l&&o===s)){if(a<c)for(;I(e,o,e.bl_tree),0!=--a;);else 0!==o?(o!==i&&(I(e,o,e.bl_tree),a--),I(e,16,e.bl_tree),E(e,a-3,2)):a<=10?(I(e,17,e.bl_tree),E(e,a-3,3)):(I(e,18,e.bl_tree),E(e,a-11,7));i=o,c=(a=0)===s?(l=138,3):o===s?(l=6,3):(l=7,4)}}o(x);var z=!1;function F(e,t,r,o){var i,s,a;E(e,0+(o?1:0),3),s=t,a=r,L(i=e),S(i,a),S(i,~a),n.arraySet(i.pending_buf,i.window,s,a,i.pending),i.pending+=a}r._tr_init=function(e){z||(function(){var e,t,r,n,o,i=new Array(16);for(n=r=0;n<28;n++)for(v[n]=r,e=0;e<1<<c[n];e++)m[r++]=n;for(m[r-1]=n,n=o=0;n<16;n++)for(x[n]=o,e=0;e<1<<d[n];e++)f[o++]=n;for(o>>=7;n<a;n++)for(x[n]=o<<7,e=0;e<1<<d[n]-7;e++)f[256+o++]=n;for(t=0;t<=l;t++)i[t]=0;for(e=0;e<=143;)p[2*e+1]=8,e++,i[8]++;for(;e<=255;)p[2*e+1]=9,e++,i[9]++;for(;e<=279;)p[2*e+1]=7,e++,i[7]++;for(;e<=287;)p[2*e+1]=8,e++,i[8]++;for(T(p,287,i),e=0;e<a;e++)g[2*e+1]=5,g[2*e]=A(e,5);b=new _(p,c,257,s,l),y=new _(g,d,0,a,l),w=new _(new Array(0),u,0,19,7)}(),z=!0),e.l_desc=new k(e.dyn_ltree,b),e.d_desc=new k(e.dyn_dtree,y),e.bl_desc=new k(e.bl_tree,w),e.bi_buf=0,e.bi_valid=0,O(e)},r._tr_stored_block=F,r._tr_flush_block=function(e,t,r,n){var o,s,a=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<i;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),P(e,e.l_desc),P(e,e.d_desc),a=function(e){var t;for(D(e,e.dyn_ltree,e.l_desc.max_code),D(e,e.dyn_dtree,e.d_desc.max_code),P(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*h[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=r+5,r+4<=o&&-1!==t?F(e,t,r,n):4===e.strategy||s===o?(E(e,2+(n?1:0),3),R(e,p,g)):(E(e,4+(n?1:0),3),function(e,t,r,n){var o;for(E(e,t-257,5),E(e,r-1,5),E(e,n-4,4),o=0;o<n;o++)E(e,e.bl_tree[2*h[o]+1],3);M(e,e.dyn_ltree,t-1),M(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),R(e,e.dyn_ltree,e.dyn_dtree)),O(e),n&&L(e)},r._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(m[r]+i+1)]++,e.dyn_dtree[2*C(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){E(e,2,3),I(e,256,p),function(e){16===e.bi_valid?(S(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,r){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,r){(function(e){!function(e){if(!e.setImmediate){var t,r,n,o,i=1,s={},a=!1,l=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,t="[object process]"==={}.toString.call(e.process)?function(e){process.nextTick(function(){u(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(o="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",h,!1):e.attachEvent("onmessage",h),function(t){e.postMessage(o+t,"*")}):e.MessageChannel?((n=new MessageChannel).port1.onmessage=function(e){u(e.data)},function(e){n.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(r=l.documentElement,function(e){var t=l.createElement("script");t.onreadystatechange=function(){u(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(u,0,e)},c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var r=new Array(arguments.length-1),n=0;n<r.length;n++)r[n]=arguments[n+1];var o={callback:e,args:r};return s[i]=o,t(i),i++},c.clearImmediate=d}function d(e){delete s[e]}function u(e){if(a)setTimeout(u,0,e);else{var t=s[e];if(t){a=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{d(e),a=!1}}}}function h(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&u(+t.data.slice(o.length))}}(typeof self>"u"?void 0===e?this:e:self)}).call(this,typeof D4<"u"?D4:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)}(U4)),U4.exports);const H4=M4(B4),j4={config:{name:"DiagnosticsReporter",platforms:["web"]},report:async(e,t,r=[])=>{if(!e.reportName)throw new TypeError('Missing required "reportName" from options');const n=await V4(e,t,r);return e.environment&&K4(e.environment,n.filename,n.archive),n}},V4=async(e,t,r)=>({filename:G4(e.reportName),archive:await W4(t,r)}),W4=async(e,t)=>{const r=new H4;r.file("air.json",JSON.stringify(e));for(const e of t){const t=Z4(e.name),n=Y4(e.data);r.file(t,n)}return await r.generateAsync({type:"uint8array",compression:"DEFLATE",compressionOptions:{level:9}})},K4=async(e,t,r)=>{const n=await q4(e,t);return fetch(n,{body:r,headers:{"Content-Type":"application/zip"},method:"PUT"})},q4=async(e,t)=>{const r=`https://${X4[e]}/fileupload/tenants/gir/public/path/reports?url`,n=await fetch(r,{body:JSON.stringify({filename:t}),headers:{"Content-Type":"application/json"},method:"POST"}),{uploadUrl:o}=await n.json();return o},G4=e=>`${J4(e)}.zip`,Z4=e=>{let t=J4(e);return Q4(t)||(t+=".json"),t},Y4=e=>Array.isArray(e)?e.map(e=>(e=>{let t;try{return JSON.stringify(e,(e,t)=>{if(!(e=>/^_/.test(e))(e))return void 0===t?"undefined":t})}catch(e){e instanceof Error&&(t=e.message)}return JSON.stringify({exception:"UNABLE TO SERIALIZE DATA",errorMessage:t})})(e)).join("\n"):"string"!=typeof e?JSON.stringify(e):e,J4=e=>e.replace(/[^0-9a-z_.]+/gi,"-"),Q4=e=>e.slice((Math.max(0,e.lastIndexOf("."))||1/0)+1),X4={ed:"apied-int-fileupload.services-ed.goto.com",rc:"apirc-int-fileupload.services-rc.goto.com",stage:"apistage-int-fileupload.services-stage.goto.com",live:"api-fileupload.services.goto.com"},e6=[];for(let e=0;e<256;++e)e6.push((e+256).toString(16).slice(1));const t6=new Uint8Array(16);function r6(e,t,r){return crypto.randomUUID?crypto.randomUUID():function(e){const t=(e=e||{}).random??e.rng?.()??crypto.getRandomValues(t6);if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(e,t=0){return(e6[e[t+0]]+e6[e[t+1
5991]]+e6[e[t+2]]+e6[e[t+3]]+"-"+e6[e[t+4]]+e6[e[t+5]]+"-"+e6[e[t+6]]+e6[e[t+7]]+"-"+e6[e[t+8]]+e6[e[t+9]]+"-"+e6[e[t+10]]+e6[e[t+11]]+e6[e[t+12]]+e6[e[t+13]]+e6[e[t+14]]+e6[e[t+15]]).toLowerCase()}(t)}(e)}const n6="GoToContainer.machineId",o6={config:{name:"ExecutionContext",platforms:["electron","web"]},getContext:()=>i6()??s6(),internalCache:{runId:r6(),machineId:null}},i6=()=>window[I8]?.executionContext,s6=()=>{if(o6.internalCache.machineId)return{...o6.internalCache};if(o6.internalCache.machineId=localStorage.getItem(n6),o6.internalCache.machineId)return{...o6.internalCache};o6.internalCache.machineId=r6();try{localStorage.setItem(n6,o6.internalCache.machineId)}catch{}return{...o6.internalCache}};var a6;!function(e){e.MUTE="MUTE",e.ACCEPTCALL="ACCEPTCALL",e.REJECTCALL="REJECTCALL",e.HANGUP="HANGUP",e.RING="RING"}(a6||(a6={}));const l6="Hid is not available";var c6,d6;!function(e){e[e.LED=8]="LED",e[e.TELEPHONY=11]="TELEPHONY",e[e.CONSUMER=12]="CONSUMER"}(c6||(c6={})),function(e){e[e.MUTED=0]="MUTED",e[e.IN_CALL=1]="IN_CALL",e[e.RINGING=2]="RINGING"}(d6||(d6={}));const u6=(e,t)=>e<<16|t,h6=e=>{const t=(4294901760&e)>>16,r=Object.values(c6).indexOf(parseInt(t.toString(16),16)),n=Object.values(g6).indexOf(e);return{usagePage:Object.keys(c6)[r],headsetHIDUsages:Object.keys(g6)[n]}},p6=(e,t)=>{const r=Math.floor(t/8);return!!(e.getUint8(r)>>>t%8&1)};var g6;!function(e){e[e.LED_MUTE=u6(c6.LED,9)]="LED_MUTE",e[e.LED_OFF_HOOK=u6(c6.LED,23)]="LED_OFF_HOOK",e[e.LED_RING=u6(c6.LED,24)]="LED_RING",e[e.LED_HOLD=u6(c6.LED,32)]="LED_HOLD",e[e.LED_MICROPHONE=u6(c6.LED,33)]="LED_MICROPHONE",e[e.LED_ONLINE=u6(c6.LED,42)]="LED_ONLINE",e[e.TELEPHONY_RINGER=u6(c6.TELEPHONY,158)]="TELEPHONY_RINGER",e[e.TELEPHONY_HOOK_SWITCH=u6(c6.TELEPHONY,32)]="TELEPHONY_HOOK_SWITCH",e[e.TELEPHONY_FLASH=u6(c6.TELEPHONY,33)]="TELEPHONY_FLASH",e[e.TELEPHONY_REDIAL=u6(c6.TELEPHONY,36)]="TELEPHONY_REDIAL",e[e.TELEPHONY_MUTE=u6(c6.TELEPHONY,47)]="TELEPHONY_MUTE",e[e.TELEPHONY_LINE_BUSY=u6(c6.TELEPHONY,151)]="TELEPHONY_LINE_BUSY",e[e.TELEPHONY_PROGRAMMABLE_BUTTON=u6(c6.TELEPHONY,7)]="TELEPHONY_PROGRAMMABLE_BUTTON"}(g6||(g6={}));const f6=()=>navigator.hid,m6=e=>{if(!e)return[];const t=new Array;for(const r of e){const e=r.items.map(e=>e.reportSize*e.reportCount).reduce((e,t)=>e+t),n={reportId:r.reportId,bitsUsage:new Array(e)};let o=0;for(const e of r.items)e.usages?.forEach((e,t)=>{e in g6&&(n.bitsUsage[o+t]=e)}),o+=e.reportSize*e.reportCount;n.bitsUsage.some(e=>!!e)&&t.push(n)}return t},v6=e=>`0x${e.toString(16).padStart(4,"0")}`;class b6{constructor(e){const t=[],r=[];e.collections.forEach(({outputReports:e,inputReports:n})=>{r.push(...m6(e)),t.push(...m6(n))}),this.inputDescriptors=t,this.outputDescriptors=r}getInputDescriptors(){return this.inputDescriptors}getOutputDescriptors(){return this.outputDescriptors}findInputByReportId(e){return this.inputDescriptors.find(t=>t.reportId===e)}findOutputByReportId(e){return this.outputDescriptors.find(t=>t.reportId===e)}findOutputByUsage(e){return this.outputDescriptors.find(t=>t.bitsUsage.some(t=>t===e))}}let y6;const w6=()=>(y6||(y6=k4.createLogger("HID")),y6);class x6{constructor(e){this.device=e}logInitialization(){const e=v6(this.device.vendorId),t=v6(this.device.productId);w6().info(`Initializing HID device: ${this.device.productName} (vendorId=${e}, productId=${t})`)}logDeviceCapabilities(e,t){w6().info("=== Device Report Structure ==="),this.logCollections(),this.logRecognizedReports(e,t),this.logSupportedUsages(e,t),w6().info("=== End Device Report Structure ===")}logReport(e,t){const r=this.calculateTotalBits(t.items);w6().info(`  ${e} Report ${t.reportId}: ${t.items.length} items, ${r} bits total`),t.items.forEach((e,t)=>{const r=this.formatItemUsages(e);w6().info(`    Item ${t}: size=${e.reportSize} count=${e.reportCount} usages=[${r}]`)})}logCollections(){this.device.collections.forEach((e,t)=>{const r=v6(e.usagePage),n=v6(e.usage);w6().info(`Collection ${t}: usagePage=${r} usage=${n}`),e.inputReports.forEach(e=>{this.logReport("Input",e)}),e.outputReports.forEach(e=>{this.logReport("Output",e)})})}logRecognizedReports(e,t){const r=e.map(e=>e.reportId).join(", "),n=t.map(e=>e.reportId).join(", ");w6().info(`Recognized Input Reports: [${r}]`),w6().info(`Recognized Output Reports: [${n}]`)}logSupportedUsages(e,t){const r=this.collectSupportedUsages(e,t),n=this.formatUsageNames(r);w6().info(`Supported Usages: [${n}]`)}collectSupportedUsages(e,t){const r=new Set;
5991return[...e,...t].forEach(e=>{e.bitsUsage.forEach(e=>{void 0!==e&&r.add(e)})}),r}formatUsageNames(e){return Array.from(e).map(e=>h6(e).headsetHIDUsages).join(", ")}calculateTotalBits(e){return e.reduce((e,t)=>e+t.reportSize*t.reportCount,0)}formatItemUsages(e){return e.usages?e.usages.map(e=>v6(e)).join(", "):e.isRange?`range(${v6(e.usageMinimum)}-${v6(e.usageMaximum)})`:"none"}}class _6{evaluateLineBusy(e,t,r){const n=e&&!1===t;return n&&r.isRinging?{action:a6.ACCEPTCALL,reason:"LINE_BUSY pressed while ringing, Yealink-style"}:n&&r.isInCall?{action:a6.HANGUP,reason:"LINE_BUSY pressed while in call, Yealink-style"}:{action:null,reason:`LINE_BUSY ${e?"pressed":"released"} but no matching state (previousValue=${t})`}}shouldIgnoreLineBusyInHookSwitch(e,t){return e&&t.isRinging}}class k6{evaluateLineBusy(e,t,r){return{action:null,reason:"IGNORE LINE_BUSY (used as status flag by this vendor)"}}shouldIgnoreLineBusyInHookSwitch(e,t){return!1}}class C6{static createStrategy(e){return 27027===e?new _6:new k6}}class S6{constructor(){this.lastMuteCommandTime=0,this.lastRingCommandTime=0,this.ignoreUntilTime=0,this.MUTE_ECHO_IGNORE_MS=500,this.RING_ECHO_SUPPRESS_MS=1e3,this.RING_REJECT_WINDOW_MS=3e4,this.IGNORE_AFTER_RING_MS=500}recordMuteCommand(){this.lastMuteCommandTime=performance.now()}recordRingCommand(){this.lastRingCommandTime=performance.now(),this.ignoreUntilTime=performance.now()+this.IGNORE_AFTER_RING_MS}shouldIgnoreMuteEcho(){return performance.now()-this.lastMuteCommandTime<this.MUTE_ECHO_IGNORE_MS}isWithinRejectWindow(){const e=performance.now()-this.lastRingCommandTime;return e>this.RING_ECHO_SUPPRESS_MS&&e<this.RING_REJECT_WINDOW_MS}getTimeSinceRing(){return performance.now()-this.lastRingCommandTime}getTimeSinceMute(){return performance.now()-this.lastMuteCommandTime}shouldIgnoreAllReports(){return performance.now()<this.ignoreUntilTime}}class E6{constructor(){this.inUseByAnotherApp=!1}isBlocked(){return this.inUseByAnotherApp}checkForRelease(e,t){this.inUseByAnotherApp&&this.isHookSwitchOff(e,t)&&this.releaseDevice()}checkForTakeover(e,t,r,n){this.inUseByAnotherApp||this.isIdle(r,n)&&this.isHookSwitchOn(e,t)&&this.blockDevice()}isHookSwitchOn(e,t){return e===g6.TELEPHONY_HOOK_SWITCH&&t}isHookSwitchOff(e,t){return e===g6.TELEPHONY_HOOK_SWITCH&&!t}isIdle(e,t){return!e&&!t}releaseDevice(){w6().info("Device released by other app (hook switch off detected)"),this.inUseByAnotherApp=!1}blockDevice(){w6().warn("Device appears to be controlled by another app (received HOOK_SWITCH=true while idle)"),this.inUseByAnotherApp=!0}}class I6{constructor(e,t){this.timeWindowFilter=e,this.vendorStrategy=t}evaluate(e,t,r,n){return e&&r.isRinging?{action:a6.ACCEPTCALL,reason:"hook pressed while ringing"}:!e||r.isInCall||r.isRinging?!e&&!0===t&&r.isInCall?{action:a6.HANGUP,reason:"hook released while in call"}:!e&&r.isRinging?this.evaluateReject(t,r,n):{action:null,reason:`hook ${e?"pressed":"released"} but no matching state`}:{action:a6.ACCEPTCALL,reason:"hook pressed, not in call"}}evaluateReject(e,t,r){const n=r?.find(({usage:e,value:t})=>e===g6.TELEPHONY_LINE_BUSY&&!0===t);if(this.vendorStrategy.shouldIgnoreLineBusyInHookSwitch(!!n,t))return{action:null,reason:"HOOK_SWITCH=false with LINE_BUSY=true, waiting for LINE_BUSY handler"};const o=this.timeWindowFilter.isWithinRejectWindow();return!0===e||o?{action:a6.REJECTCALL,reason:`hook=false, previousValue=${e}, timeSinceRing=${this.timeWindowFilter.getTimeSinceRing().toFixed(0)}ms`}:{action:null,reason:`hook released but outside reject window, timeSinceRing=${this.timeWindowFilter.getTimeSinceRing().toFixed(0)}ms`}}}class A6{constructor(e){this.vendorStrategy=e}evaluate(e,t,r,n){return this.vendorStrategy.evaluateLineBusy(e,t,r)}}class T6{evaluate(e,t,r,n){return e&&r.isRinging?{action:a6.REJECTCALL,reason:"programmable button pressed while ringing, Yealink-style"}:{action:null,reason:`programmable button ${e?"pressed":"released"} but no matching state`}}}class O6{constructor(e){this.timeWindowFilter=e}evaluate(e,t,r,n){return e?this.timeWindowFilter.shouldIgnoreMuteEcho()?{action:null,reason:`IGNORE MUTE (echo ${this.timeWindowFilter.getTimeSinceMute()}ms after app command)`}
5991:{action:a6.MUTE,reason:"MUTE/UNMUTE (physical button pressed)"}:{action:null,reason:"MUTE released (no action)"}}}class L6{constructor(e){this.context=e}async execute(e=!0){const t=!0===this.context.deviceState.get(d6.MUTED);w6().info("Action: "+(t?"UNMUTE":"MUTE"));const r=new Set;this.context.updateUsageState(r,g6.LED_MUTE,!t),this.context.deviceState.set(d6.MUTED,!t),this.context.timeWindowFilter.recordMuteCommand(),await this.context.sendReports(r),e&&this.context.dispatchEvent(a6.MUTE)}}class $6{constructor(e){this.context=e}async execute(){w6().info("Action: ACCEPT CALL");const e=new Set;this.context.updateUsageState(e,g6.LED_OFF_HOOK,!0),this.context.updateUsageState(e,g6.LED_ONLINE,!0),this.context.updateUsageState(e,g6.TELEPHONY_HOOK_SWITCH,!0),this.context.updateUsageState(e,g6.LED_RING,!1),this.context.updateUsageState(e,g6.TELEPHONY_RINGER,!1),this.context.deviceState.set(d6.IN_CALL,!0),this.context.deviceState.set(d6.RINGING,!1),await this.context.sendReports(e),this.context.dispatchEvent(a6.ACCEPTCALL)}}class N6{constructor(e){this.context=e}async execute(){w6().info("Action: HANGUP");const e=new Set;this.context.updateUsageState(e,g6.LED_OFF_HOOK,!1),this.context.updateUsageState(e,g6.TELEPHONY_HOOK_SWITCH,!1),this.context.updateUsageState(e,g6.TELEPHONY_LINE_BUSY,!1),this.context.updateUsageState(e,g6.LED_ONLINE,!1),this.context.deviceState.set(d6.IN_CALL,!1),this.context.deviceState.set(d6.MUTED,!1),await this.context.sendReports(e),this.context.dispatchEvent(a6.HANGUP)}}class R6{constructor(e){this.context=e}async execute(){w6().info("Action: REJECT CALL");const e=new Set;this.context.updateUsageState(e,g6.LED_OFF_HOOK,!1),this.context.updateUsageState(e,g6.TELEPHONY_HOOK_SWITCH,!1),this.context.updateUsageState(e,g6.LED_RING,!1),this.context.updateUsageState(e,g6.TELEPHONY_RINGER,!1),this.context.updateUsageState(e,g6.LED_ONLINE,!1),this.context.deviceState.set(d6.RINGING,!1),await this.context.sendReports(e),this.context.dispatchEvent(a6.REJECTCALL)}}class P6{constructor(e){this.context=e}async execute(){w6().info("Action: RING"),this.context.deviceState.get(d6.IN_CALL)&&(w6().info("Call in progress, resetting to initial state first"),await this.context.setToInitialState(),await new Promise(e=>setTimeout(e,500)));const e=new Set;this.context.updateUsageState(e,g6.LED_RING,!0),this.context.updateUsageState(e,g6.TELEPHONY_RINGER,!0),this.context.updateUsageState(e,g6.TELEPHONY_LINE_BUSY,!1),this.context.deviceState.set(d6.RINGING,!0),this.context.timeWindowFilter.recordRingCommand(),await this.context.sendReports(e),this.context.dispatchEvent(a6.RING)}}class D6{get eventTarget(){return this._eventTarget}get device(){return this._device}constructor(e){this._eventTarget=new EventTarget,this.timeWindowFilter=new S6,this.externalAppDetector=new E6,this.programmableButtonHandler=new T6,this.outputReportDescriptors=[],this.inputReportDescriptors=[],this.deviceState=new Map([[d6.MUTED,!1],[d6.IN_CALL,!1],[d6.RINGING,!1]]),this.states=new Map,this.handleInputReport=({data:e,reportId:t})=>{if(this.timeWindowFilter.shouldIgnoreAllReports())return void w6().info(`Ignoring input report (report ID: ${t}) - within post-RING ignore window`);const r=this.registry.findInputByReportId(t);if(!r)return void w6().warn(`Unknown input report ID ${t} from ${this._device.productName}. Known report IDs: [${this.inputReportDescriptors.map(e=>e.reportId).join(", ")}]`);if(!this.validateReportPayload(e,r,t))return;const n=((e,t)=>{const r=[];for(let n=0;n<t.bitsUsage.length;n++){const o=t.bitsUsage[n];if(void 0===o)continue;const i=p6(e,n);r.push({usage:o,value:i})}return r})(e,r);0!==n.length&&this.processUsageValues(n)},this._device=e,this.registry=new b6(e),this.logger=new x6(e),this.logger.logInitialization(),this.inputReportDescriptors.push(...this.registry.getInputDescriptors()),this.outputReportDescriptors.push(...this.registry.getOutputDescriptors()),this.vendorStrategy=C6.createStrategy(e.vendorId),this.hookSwitchHandler=new I6(this.timeWindowFilter,this.vendorStrategy),this.lineBusyHandler=new A6(this.vendorStrategy),this.muteHandler=new O6(this.timeWindowFilter),this.handlerRegistry=new Map([[g6.TELEPHONY_HOOK_SWITCH,this.hookSwitchHandler],[g6.TELEPHONY_LINE_BUSY,this.lineBusyHandler],[g6.TELEPHONY_PROGRAMMABLE_BUTTON,this.programmableButtonHandler],[g6.TELEPHONY_MUTE,this.muteHandler]]);const t=this.createActionContext();this.muteAction=new L6(t),this.acceptCallAction=new $6(t),this.hangupAction=new N6(t),this.rejectCallAction=new R6(t),this.ringAction=new P6(t),this.logger.logDeviceCapabilities(this.registry.getInputDescriptors(),this.registry.getOutputDescriptors()),this._device.addEventListener("inputreport",this.handleInputReport)}
5991async setToInitialState(){if(this.externalAppDetector.isBlocked())return void w6().warn("Skipping reset: device in use by another app");w6().info("Action: RESET TO INITIAL STATE");const e=new Set;[g6.LED_OFF_HOOK,g6.LED_ONLINE,g6.LED_RING,g6.LED_MUTE,g6.TELEPHONY_HOOK_SWITCH,g6.TELEPHONY_RINGER,g6.TELEPHONY_LINE_BUSY,g6.TELEPHONY_PROGRAMMABLE_BUTTON].forEach(t=>{const r=this.registry.findOutputByUsage(t);r&&(e.add(r.reportId),this.states.set(t,!1))}),await this.sendReports(e),this.deviceState.set(d6.IN_CALL,!1),this.deviceState.set(d6.MUTED,!1),this.deviceState.set(d6.RINGING,!1)}async triggerAction(e){if(this.externalAppDetector.isBlocked())w6().warn(`Blocking action ${e}: device in use by another app`);else switch(e){case a6.MUTE:await this.muteAction.execute(!1);break;case a6.ACCEPTCALL:await this.acceptCallAction.execute();break;case a6.HANGUP:await this.hangupAction.execute();break;case a6.RING:await this.ringAction.execute();break;case a6.REJECTCALL:await this.rejectCallAction.execute()}}validateReportPayload(e,t,r){const n=t.bitsUsage.length/8;return e.byteLength===n||(w6().warn(`Invalid payload size for report ${r}: expected ${n}, got ${e.byteLength}`),!1)}processUsageValues(e){const t=this.deviceState.get(d6.RINGING)??!1,r=this.deviceState.get(d6.IN_CALL)??!1;e.forEach(({usage:n,value:o})=>{const i=this.states.get(n);this.states.set(n,o),this.externalAppDetector.checkForRelease(n,o),this.externalAppDetector.checkForTakeover(n,o,t,r),i!==o&&this.handleUsageChange(n,o,i,e)});const n=e.find(({usage:e})=>e===g6.TELEPHONY_HOOK_SWITCH);if(n){const t=this.states.get(g6.TELEPHONY_HOOK_SWITCH);t!==n.value||this.handleUsageChange(n.usage,n.value,t,e)}}handleUsageChange(e,t,r,n){const o=this.createDeviceContext(),{action:i,reason:s}=this.evaluateUsageAction(e,t,r,n||[],o);i&&(w6().info(`DECISION: ${i} (${s})`),this.triggerAction(i))}createDeviceContext(){return{isRinging:this.deviceState.get(d6.RINGING)??!1,isInCall:this.deviceState.get(d6.IN_CALL)??!1,isMuted:this.deviceState.get(d6.MUTED)??!1,vendorId:this._device.vendorId}}createActionContext(){return{deviceState:this.deviceState,timeWindowFilter:this.timeWindowFilter,updateUsageState:this.updateUsageState.bind(this),sendReports:this.sendReports.bind(this),dispatchEvent:this.dispatchEvent.bind(this),setToInitialState:this.setToInitialState.bind(this)}}evaluateUsageAction(e,t,r,n,o){const i=this.handlerRegistry.get(e);if(!i){const{headsetHIDUsages:t}=h6(e);return{action:null,reason:`usage ${t} not handled`}}const s=i.evaluate(t,r,o,n);return e===g6.TELEPHONY_MUTE&&t&&s.action===a6.MUTE?(this.muteAction.execute(!0),{action:null,reason:s.reason}):s}updateUsageState(e,t,r){const n=this.registry.findOutputByUsage(t);n&&(e.add(n.reportId),this.states.set(t,r))}async sendReports(e){const t=Array.from(e).map(e=>this.sendOutputReport(e));await Promise.all(t)}async sendOutputReport(e){const t=this.registry.findOutputByReportId(e);if(!t)return;const r=[];t.bitsUsage.forEach(e=>{if(void 0===e)return;const t=this.states.get(e)??!1,{headsetHIDUsages:n}=h6(e);r.push(`${n}=${t}`)}),w6().info(`Sending to headset (Report ID: ${e}): ${r.join(", ")}`);const n=((e,t)=>{const r=t.bitsUsage.length/8,n=new ArrayBuffer(r),o=new Uint8Array(n);return t.bitsUsage.forEach((t,r)=>{if(!t)return;const n=Math.floor(r/8),i=r%8;!0===e.get(t)&&(o[n]|=1<<i)}),o})(this.states,t);await this._device.sendReport(e,n)}dispatchEvent(e){this._eventTarget.dispatchEvent(new Event(e))}getUsagePageDescriptors(e,t,r=!1){const n={INPUT:[],OUTPUT:[]};return e.collections.forEach(({usagePage:e,inputReports:o,outputReports:i})=>{if(!t.includes(e))return;const s=this.extractUsages(o),a=this.extractUsages(i);n.INPUT.push(...this.formatDescriptors(s,r)),n.OUTPUT.push(...this.formatDescriptors(a,r))}),n}extractUsages(e){const t=[];for(const r of e)for(const e of r.items)Array.isArray(e.usages)&&t.push(...e.usages);return t}formatDescriptors(e,t){const r=[];for(const n of e){const{usagePage:e,headsetHIDUsages:o}=h6(n),i=n.toString(16),s=i.slice(0,1),a=i.slice(1,5),l=t?e:s,c=t?o?.toString()??a:a;let d=r.find(e=>e.usagePage===l);d||(d={usagePage:l,usages:[]},r.push(d)),c&&!d.usages.includes(c)&&d.usages.push(c)}return r}}const M6=new Map,z6=e=>{const t=M6.get(e);if(!t)throw Error("This device is not opened.");return t};let F6=[];const U6={config:{name:"Hid",platforms:["web"]},getHid(){return navigator?.hid},async getDevices(){return navigator.hid?(await f6().getDevices()).filter(({vendorId:e,productId:t})=>!F6.some(r=>r.productId===t&&r.vendorId===e)):Promise.reject(l6)},async requestDeviceAccess(e){const[t]=await f6().requestDevice(e);return t},async openDevice(e){!e.opened&&await e.open(),(e=>{M6.get(e)||M6.set(e,new D6(e))})(e)},async closeDevice(e){e.opened&&await e.close()},bindEvent(e){return z6(e).eventTarget},async triggerAction(e,t){await z6(e).triggerAction(t)},getDeviceState(e){return z6(e).deviceState},resetToInitialState(e){z6(e).setToInitialState()},isSupported(){return"hid"in navigator},setUnsupportedDevices:e=>{F6=e},getUsagePageDescriptors:(e,t,r=!1)=>z6(e).getUsagePageDescriptors(e,t,r)},B6=(e,t)=>"object"==typeof e&&"object"==typeof t?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>B6(e[r],t[r])):e===t,H6=(e,t)=>e.keyCombination.code>t.keyCombination.code?1:e.keyCombination.code<t.keyCombination.code?-1:((e,t)=>!e.global&&t.global?1:e.global&&!t.global?-1:0)(e,t),j6=(e,t)=>{if(e.length!==t.length)return!1;const r=[...e].sort(H6),n=[...t].sort(H6);return B6(n,r)},V6=e=>"object"==typeof e&&"string"==typeof e.code&&"boolean"==typeof e.ctrlKey&&"boolean"==typeof e.altKey&&"boolean"==typeof e.metaKey&&"boolean"==typeof e.shiftKey,W6=(e,t,r,n)=>`action=${e} ${(e=>`code=${e.code} altKey=${e.altKey.toString()} ctrlKey=${e.ctrlKey.toString()} metaKey=${e.metaKey.toString()} shiftKey=${e.shiftKey.toString()}`)(t)} global=${n.toString()} shortcutId=${r}`,K6=(e,t,r)=>{let n=`action=updateConfiguration type=${e}`;return r&&(n+=` shortcutId=${r}`),t&&(n+=` ${(e=>{let t=`configurationCount=${e.length}"`;return e.length&&(t+=` configuration="${JSON.stringify(e)}`),t})(t)}`),n},q6=(e,t,r)=>`failure=${e} type=${t} error=${r}`;var G6;!function(e){e[e.MetaLeft=0]="MetaLeft",e[e.MetaRight=1]="MetaRight",e[e.AltLeft=2]="AltLeft",e[e.AltRight=3]="AltRight",e[e.ControlLeft=4]="Control
5991Left",e[e.ControlRight=5]="ControlRight",e[e.ShiftLeft=6]="ShiftLeft",e[e.ShiftRight=7]="ShiftRight"}(G6||(G6={}));class Z6{getCode(e){return e?.split("Key")?.pop()?.toLowerCase()}}class Y6 extends Z6{constructor(){super(...arguments),this.listOfCommandMacOsCombinationUnavailable=["c","v","a","z","x","f","g","h","m","o","p","s","t","w","q"]}isValidKeyboardShortcutKeyCombination({altKey:e,metaKey:t,ctrlKey:r,shiftKey:n,code:o}){const i=[];let s=!1;const a=this.getCode(o);return a&&!Object.keys(G6).map(e=>e.toLowerCase()).includes(a)&&(e||t||r||n)?!t||e||r||n||!this.listOfCommandMacOsCombinationUnavailable.some(e=>e==a)?(t&&e&&"escape"===a||t&&r&&("space"===a||"f"===a))&&i.push("AlreadyUsedSystem"):i.push("AlreadyUsedGoTo"):s=!0,{errorCodes:i,isInvalid:s||i.length>0}}}class J6 extends Z6{constructor(){super(...arguments),this.listOfControlWindowsCombinationUnavailable=["x","c","v","z","f4","a","d","e","r","y","arrowleft","arrowright","arrowdown","arrowup","escape","space","f10","f13"]}isValidKeyboardShortcutKeyCombination({altKey:e,metaKey:t,ctrlKey:r,shiftKey:n,code:o}){const i=[];let s=!1;const a=this.getCode(o);return a&&!Object.keys(G6).map(e=>e.toLowerCase()).includes(a)&&(e||t||r||n)?r&&!e&&!t&&!n&&this.listOfControlWindowsCombinationUnavailable.some(e=>e==a)&&i.push("AlreadyUsedGoTo"):s=!0,{errorCodes:i,isInvalid:s||i.length>0}}}class Q6{static getInstance(){return Q6.instance||(Q6.instance=window.navigator.userAgent.toLowerCase().indexOf("mac")>0?new Y6:new J6),Q6.instance}}let X6={},e8=0;const t8=new Map;let r8=k4.createLogger("KeyboardShortcuts");const n8={config:{name:"KeyboardShortcuts",platforms:["web"]},subscribe:async(e,t,r)=>{const n=e8++,o=await o8(e,t,r),i={shortcutId:e,windowForLocalShortcuts:t,onShortcutPressedListener:r,internalUnsubscribeFn:o};return t8.set(n,i),async()=>{const t=t8.get(n);if(!t)throw new Error(`Keyboard shortcuts unsubscribe function for shortcut ${e} called more than once`);t8.delete(n),await t.internalUnsubscribeFn()}},systemInterface:{initializeLogger:e=>{r8=e},updateConfiguration:async(e,t)=>{const r={...X6};X6[e]=t,await a8(r,e),r8.log(K6("updateConfiguration",t,e))},updateConfigurations:async e=>{const t=X6;X6=e,await a8(t),r8.log(K6("updateConfigurations"))},isValidConfiguration:e=>{if("object"!=typeof e)return!1;try{for(const t in e){const r=e[t];if(!Array.isArray(r))return!1;for(let e=0;e<r.length;e++)if(!V6(r[e].keyCombination))return!1}return!0}catch(e){return console.error(e),!1}},isValidKeyboardShortcutKeyCombination:e=>Q6.getInstance().isValidKeyboardShortcutKeyCombination(e)}},o8=async(e,t,r)=>{const n=X6[e]??[],o=[];for(const i of n)if(i.global)try{const t=await i8(e,r,i.keyCombination);o.push(t)}catch(e){throw r8.error(q6("subscribe","global",JSON.stringify(e))),new Error(`${e}`)}else{const n=s8(e,t,r,i.keyCombination,i.useKeyUp);o.push(async()=>n())}return async()=>{for(const e of o)try{await e()}catch(e){r8.error(q6("unsubscribe","global",JSON.stringify(e)))}}},i8=async(e,t,r)=>{const n=(()=>{const e=globalThis[I8];if(e)return e.plugins.GlobalKeyboardShortcuts})();return n?await n.subscribe(r,n=>{t(e),r8.log(W6("press",r,e,!0))}):(r8.error(q6("pluginNotAvailable","global")),async()=>{})},s8=(e,t,r,n,o)=>{const i=o?"keyup":"keydown",s=t=>{if(!t.repeat&&((e,t)=>e.code===t.code&&e.altKey===t.altKey&&e.ctrlKey===t.ctrlKey&&e.metaKey===t.metaKey&&e.shiftKey===t.shiftKey)(t,n))return r(e),r8.log(W6("press",n,e,!1)),t.preventDefault(),t.stopPropagation(),!1};return t.addEventListener(i,s),()=>t.removeEventListener(i,s)},a8=async(e,t)=>{const r=[...t8.keys()];for(const n of r){let r=t8.get(n);if(!r||t&&r.shortcutId!==t)continue;const o=e[r.shortcutId]??[],i=X6[r.shortcutId]??[];if(j6(o,i))continue;const s=r.internalUnsubscribeFn;r.internalUnsubscribeFn=async()=>{},await s();const a=await o8(r.shortcutId,r.windowForLocalShortcuts,r.onShortcutPressedListener);r=t8.get(n),r?r.internalUnsubscribeFn=a:await a()}},l8=new Map,c8=new Map;let d8=0;const u8=new Map,h8={config:{name:"Notification",platforms:["web"]},isSupported:async()=>"Notification"in globalThis,show:async e=>{await p8();const{title:t,body:r}=g8(e.texts),{icon:n,image:o}=f8(e.images??[]),i=new globalThis.Notification(t,{body:r,icon:n,image:o,silent:e.silent});m8(i,e,v8),l8.set(e.id,i)},close:async e=>{const t=l8.get(e);if(!t)throw new Error(`Notification not found in map by ID ${e}`);t.close(),l8.delete(e)},subscribeForEvents:async(e,t)=>{const r=d8++,n=u8.get(e);if(n)n.set(r,t);else{u8.set(e,new Map([[r,t]]));const n=c8.get(e);
5991n&&(n.forEach(e=>t(e)),c8.delete(e))}return async()=>{const t=u8.get(e);if(!t)throw new Error(`Listener not found in map by source ${e}`);if(!t.delete(r))throw new Error(`Listener not found in map by ID ${r}`);0===t.size&&u8.delete(e)}}},p8=async()=>{if("denied"===globalThis.Notification.permission||"default"===globalThis.Notification.permission&&"granted"!==await globalThis.Notification.requestPermission())throw new Error("Permission not granted for notifications")},g8=e=>{let t,r="";return e.length>0&&(r=e[0].content,e.length>1&&(t=e.slice(1).map(e=>e.content).join("\n"))),{title:r,body:t}},f8=e=>{let t,r;return e.length>0&&(t=e[0].url,e.length>1&&(r=e[1].url)),{icon:t,image:r}},m8=(e,t,r)=>{const n=e=>r({notificationId:t.id,notificationSource:t.source,eventId:e});e.onshow=e=>n("show"),e.onclick=e=>n("click"),e.onclose=e=>n("close")},v8=e=>{const t=u8.get(e.notificationSource);if(t)t.forEach(t=>t(e));else{const t=c8.get(e.notificationSource);t?t.push(e):c8.set(e.notificationSource,[e])}},b8={config:{name:"WindowManager"},createWindow:(e,t,r)=>{const n=e||"about:blank",o=r?.groupId?`${r.groupId}-${t}`:t,i=o||n;let s;r?.saveSizeAndPosition&&(s=x8(i),s&&(r.features={...r.features,...s}));const a=r?.openAsSibling?window.opener:window;if(!a)return null;const l=a.open(n,o,y8(r?.features));if(!l)return null;if(r?.saveSizeAndPosition){if(s){const e=()=>{if(C8(l))return;const e=k8(l.screen),t=e.x+l.screen.availWidth/3,r=e.y+l.screen.availHeight/3,n=l.screen.availWidth/3,o=l.screen.availHeight/3;l.moveTo(t,r),l.resizeTo(n,o)};l.addEventListener("DOMContentLoaded",e,{once:!0})}const e=()=>{C8(l)&&_8(i,{left:l.screenLeft,top:l.screenTop,width:l.innerWidth,height:l.innerHeight})};l.addEventListener("blur",e)}return r?.store&&(l.window.ReduxStore=r.store),window.WindowManagerState||(window.WindowManagerState={}),l.window.WindowManagerState=window.WindowManagerState,l},getStore:()=>window.ReduxStore,getState:e=>window.WindowManagerState?.[e],addToState:(e,t)=>(window.WindowManagerState||(window.WindowManagerState={}),window.WindowManagerState[e]=t,t),removeFromState:e=>{window.WindowManagerState&&delete window.WindowManagerState[e]}},y8=(e={})=>Object.keys(e).reduce((t,r)=>{const n=e[r];return"boolean"==typeof n?t.push(`${r}=${n?"yes":"no"}`):"gotoWindowTitleBarColors"===r&&e.gotoWindowTitleBarColors?t.push(`${r}=${(e=>encodeURIComponent(JSON.stringify(e)))(e.gotoWindowTitleBarColors)}`):t.push(`${r}=${n}`),t},[]).join(",")||void 0,w8="goto.container.WindowManagerSizeAndPosition",x8=e=>{const t=localStorage.getItem(`${w8}${e}`);if(t)try{return JSON.parse(t)}catch{}},_8=(e,t)=>localStorage.setItem(`${w8}${e}`,JSON.stringify(t)),k8=e=>({x:e.availLeft??0,y:e.availTop??0}),C8=e=>{const t=k8(e.screen);return S8(e.screenLeft,t.x,t.x+e.screen.availWidth)&&S8(e.screenTop,t.y,t.y+e.screen.availHeight)&&e.innerWidth>
59910&&e.innerHeight>0},S8=(e,t,r)=>e>=t&&e<=r,E8=Object.freeze(Object.defineProperty({__proto__:null,Badge:h4,DesktopCompanion:P4,DiagnosticsReporter:j4,ExecutionContext:o6,Hid:U6,KeyboardShortcuts:n8,Logger:k4,Notification:h8,WindowManager:b8},Symbol.toStringTag,{value:"Module"})),I8="AppContainer",A8=new class{constructor(e="web",t=!1){this.platform=e,this.isNative=t,this.plugins={},this.shouldMergePlugin=e=>!e.config?.platforms||e.config?.platforms.includes(this.platform),this.addPlugins(Object.values(E8));const r=globalThis[I8];r&&(this.platform=r.platform,this.isNative=!!r.isNative,this.addPlugins(Object.values(r.plugins)),r.bridgeIncompatiblePluginsPromise&&(this.plugins.DisplayMedia={config:{name:"DisplayMedia",platforms:["electron"]},load:async()=>(await r.bridgeIncompatiblePluginsPromise,globalThis?.BridgeIncompatiblePlugins?.DisplayMedia)})),this.plugins=new Proxy(this.plugins,{get:(e,t)=>{if(typeof e[t]>"u"){let e=this;return new Proxy({},{get:(r,n)=>typeof r[n]>"u"?e.pluginMethodNoop.bind(e,r,n,t):r[n]})}return e[t]}})}pluginMethodNoop(e,t,r){return Promise.reject(`${r} plugin not found for ${this.platform}.`)}isPluginAvailable(e){return this.plugins.hasOwnProperty(e)}addPlugin(e){if(!this.plugins.hasOwnProperty(e.config.name)||this.shouldMergePlugin(e))if(this.isNative&&!0===e.config.isAsync){const t={config:e.config,load:async()=>{await(globalThis[I8].webContextPluginsPromise||Promise.reject(Error(`could not load async plugin ${e.config.name}, unsupported container version?`)));const t=globalThis.__LMIGoToContainerPrivate_WebContextPlugins__;return t&&t.hasOwnProperty(e.config.name)?t[e.config.name]:Promise.reject(Error(`${e.config.name} not found, async plugin failed to load in web context.`))}};this.plugins[e.config.name]=t}else this.plugins[e.config.name]=e}addPlugins(e){for(const t of e)this.addPlugin(t)}},T8=A8.plugins,O8=[];for(let e=0;e<256;++e)O8.push((e+256).toString(16).slice(1));const L8=new Uint8Array(16);function $8(e,t,r){return crypto.randomUUID?crypto.randomUUID():function(e){const t=(e=e||{}).random??e.rng?.()??crypto.getRandomValues(L8);if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(e,t=0){return(O8[e[t+0]]+O8[e[t+1]]+O8[e[t+2]]+O8[e[t+3]]+"-"+O8[e[t+4]]+O8[e[t+5]]+"-"+O8[e[t+6]]+O8[e[t+7]]+"-"+O8[e[t+8]]+O8[e[t+9]]+"-"+O8[e[t+10]]+O8[e[t+11]]+O8[e[t+12]]+O8[e[t+13]]+O8[e[t+14]]+O8[e[t+15]]).toLowerCase()}(t)}(e)}const N8=(e,t,r,n,o,i)=>new Promise((s,a)=>{const l=i.timeoutMs??5e3,c=setTimeout(()=>{e.removeMessageEventListener(r,d),a(new Error("Request timed out"))},l),d=t=>{const n=t.message.payload;o(n)&&(clearTimeout(c),e.removeMessageEventListener(r,d),s(n))};e.addMessageEventListener(r,d),e.send({type:t,payload:n})}),R8=async(e,t,r,n,o,i,s,a,l,c)=>{const d=e=>{const t=e.message.payload;a(t)};e.addMessageEventListener(n,d);try{await N8(e,t,r,i,s,c)}catch(t){throw e.removeMessageEventListener(n,d),t}return()=>{e.removeMessageEventListener(n,d),e.send({type:o,payload:l})}};class P8{constructor(e){this.plugin=e}connectionStatus(){return this.plugin.connectionStatus}async startConnecting(e,t){const r=await(async e=>{const t=await fetch(e);if(!t.ok)throw new Error(`Response status from url ${e}: ${t.status}`);const r=await t.json();if(!(e=>!!e&&"object"==typeof e&&"ports"in e&&Array.isArray(e.ports)&&e.ports.every(e=>"number"==typeof e))(r))throw new Error(`Invalid desktop companion config format at url ${e}`);return r})(e);this.plugin.startConnecting({ports:r.ports,autoReconnect:t})}disconnect(){this.plugin.disconnect()}addEventListener(e,t,r){this.plugin.addEventListener(e,t,r)}removeEventListener(e,t,r){this.plugin.removeEventListener(e,t,r)}waitForConnectionStatus(e,t){return new Promise((r,n)=>{if(this.connectionStatus()===e)return void r();let o;const i=()=>{this.removeEventListener("connectionStatusChanged",s),void 0!==o&&(clearTimeout(o),o=void 0)},s=t=>{t.connectionStatus===e&&(i(),r())};this.addEventListener("connectionStatusChanged",s),o=setTimeout(()=>{o=void 0,i(),n(new Error(`Timeout waiting ${t} ms for connection status ${e}`))},t)})}}var D8,M8=(e=>(e.isApiSupportedRequest="desktop-companion-is-api-supported-request",e.isApiSupportedResponse="desktop-companion-is-api-supported-response",e.apiSupportedChangedSubscriptionRequest="desktop-companion-api-supported-changed-subscription-request",e.apiSupportedChangedSubscriptionResponse="desktop-companion-api-supported-changed-subscription-response",e.apiSupportedChangedSubscriptionEvent="desktop-companion-api-supported-changed-subscription-event",e.apiSupportedChangedSubscriptionCancellation="desktop-companion-api-supported-changed-subscription-cancellation",e.request="desktop-companion-request",e.response="desktop-companion-response",e.subscriptionRequest="desktop-companion-subscription-request",e.subscriptionResponse="desktop-companion-subscription-response",e.subscriptionEvent="desktop-companion-subscription-event",e.subscriptionCancellation="desktop-companion-subscription-cancellation",e))(M8||{});
5991new class extends P8{async isApiSupported(e,t){const r={requestUuid:$8(),apiId:e};return(await N8(this.plugin,M8.isApiSupportedRequest,M8.isApiSupportedResponse,r,e=>e.requestUuid===r.requestUuid,t)).result}async subscribeForApiSupportedChanged(e,t,r){const n={subscriptionUuid:$8(),apiId:t},o={subscriptionUuid:n.subscriptionUuid};return await R8(this.plugin,M8.apiSupportedChangedSubscriptionRequest,M8.apiSupportedChangedSubscriptionResponse,M8.apiSupportedChangedSubscriptionEvent,M8.apiSupportedChangedSubscriptionCancellation,n,e=>e.subscriptionUuid===n.subscriptionUuid,t=>{t.subscriptionUuid===n.subscriptionUuid&&e(t.eventData)},o,r)}waitForApiSupportedStatus(e,t,r){return new Promise(async(n,o)=>{let i,s;const a=()=>{i&&(i(),i=void 0),void 0!==s&&(clearTimeout(s),s=void 0)},l=e=>{e===t&&(a(),n())};i=await this.subscribeForApiSupportedChanged(l,e,{}),s=setTimeout(()=>{s=void 0,a(),o(new Error(`Timeout waiting ${r} ms for supported status ${t} of API ${e}`))},r),l(await this.isApiSupported(e,{}))})}async request(e,t,r){const n={apiId:e,requestUuid:$8(),request:t};return(await N8(this.plugin,M8.request,M8.response,n,e=>e.requestUuid===n.requestUuid,r)).response}async requestSubscription(e,t,r,n){const o={apiId:e,subscriptionUuid:$8(),subscriptionRequest:t},i={subscriptionUuid:o.subscriptionUuid};return await R8(this.plugin,M8.subscriptionRequest,M8.subscriptionResponse,M8.subscriptionEvent,M8.subscriptionCancellation,o,e=>e.subscriptionUuid===o.subscriptionUuid,e=>{e.subscriptionUuid===o.subscriptionUuid&&r(e.eventData)},i,n)}}(T8.DesktopCompanion),function(e){e.Parked="Parked",e.Ringing="Ringing",e.Calling="Calling",e.Connecting="Connecting",e.Connected="Connected",e.OnHold="On hold",e.Transferring="Transferring",e.Voicemail="Voicemail",e.CallQueue="CallQueue",e.Unknown="Unknown"}(D8||(D8={}));const z8=async e=>{const t=`[${i0}] Shell ready declaration in window ID ${e}: `;let r=()=>{};try{const n=async()=>{(0,Dv.g)().warn(`${t} Port disconnected, redeclaring`),r();try{await z8(e)}catch(e){(0,Dv.g)().error(`${t} Error redeclaring after port disconnection`,e)}},o=await d4.declareShellReady(e,n);r=(0,Dv.av)(o)}catch(e){throw(0,Dv.g)().error(`${t} Error declaring`,e),e}},F8=(0,Dv.fm)(()=>(0,Dv.fn)("RequestExtensionIdFromGoToBrowserExtension","ResponseExtensionIdFromGoToBrowserExtension",e=>e.extensionId)),U8=async e=>{const t=`[${i0}] Subscription for Shell commands in window ID ${e}: `;let r=()=>{};try{const n=async()=>{(0,Dv.g)().warn(`${t} Port disconnected, resubscribing`),r();try{await U8(e)}catch(e){(0,Dv.g)().error(`${t} Error resubscribing after port disconnection`,e)}},o=await d4.subscribeForCommandReceived(t=>(async(e,t)=>{try{if(t!==e.sender?.windowId)return void(0,Dv.g)().log(`[${i0}] Received Shell command: ${e.command.namespace}.${e.command.command} but not for my window`);(0,Dv.g)().log(`[${i0}] Received Shell command: ${e.command.namespace}.${e.command.command} for my window`);const{namespace:r,command:n,args:o}=e.command,i=(0,Dv.c9)().retrieve(r);if(!i?.commands)throw new Error(`Namespace "${r}" not found or has no commands`);const s=i.commands[n];if("function"!=typeof s)throw new Error(`Command "${n}" not found in namespace "${r}"`);s(...o)}catch(t){(0,Dv.g)().error(`[${i0}] Error handling command: ${e.command.namespace}.${e.command.command}`,t)}})(t,e),n);r=(0,Dv.av)(o)}catch(e){throw(0,Dv.g)().error(`${t} Error subscribing`,e),e}},B8=(0,Dv.fm)(()=>(0,Dv.fn)("RequestWindowIdFromGoToBrowserExtension","ResponseWindowIdFromGoToBrowserExtension",e=>e.windowId)),H8=["microphone","clipboard-read","clipboard-write"],j8=new class{constructor(){this.notGrantedPermissions=new Set,this.permissionStatuses=new Map}async initialize(){this.isUserSignedIn()&&(await this.checkAndSetupPermissions(),this.notGrantedPermissions.size>0&&this.displayBanner())}isUserSignedIn(){return!!(0,Dv.Z)().user.key}async checkAndSetupPermissions(){for(const e of H8)try{"granted"!==await this.checkPermission(e)&&this.notGrantedPermissions.add(e),this.setupListener(e)}catch(t){(0,Dv.g)().error(`[${i0}] Error checking ${e}:`,t)}}async checkPermission(e){const t=await navigator.permissions.query({name:e});return this.permissionStatuses.set(e,t),t.state}setupListener(e){const t=this.permissionStatuses.get(e);t&&t.addEventListener("change",()=>{this.handlePermissionChange({name:e,state:t.state})})}handlePermissionChange(e){if((0,Dv.g)().log(`[${i0}] Permission changed: ${e.name} -> ${e.state}`),"granted"===e.state)return this.notGrantedPermissions.delete(e.name),void(0===this.notGrantedPermissions.size&&this.removeBanner());"microphone"===e.name&&this.showMicrophoneLostSnackbar(),this.notGrantedPermissions.add(e.name),this.displayBanner()}displayBanner(){this.bannerInstance||(0,Dv.eW)().then(()=>
5991{if(!this.bannerInstance){const e=this.getBannerNotification();this.bannerInstance=window.shell?.display?.banner(e)}})}getBannerNotification(){return{id:"side-panel-permission-banner",description:(0,Dv.cB)("Missing permissions"),link:{text:(0,Dv.cB)("Manage"),onClick:()=>{(()=>{try{const e=(0,Dv.bp)().top;if(!e)return void(0,Dv.g)().error(`[${i0}] window.top is not available; cannot request grant permissions window`);const t={type:"SHELL_REQUEST_OPEN_GRANT_PERMISSIONS_WINDOW"};e.postMessage(t,"*")}catch(e){(0,Dv.g)().error(`[${i0}] Error requesting grant permissions window:`,e)}})()}}}}removeBanner(){this.bannerInstance&&(this.bannerInstance.close(),this.bannerInstance=void 0)}showMicrophoneLostSnackbar(){this.snackbarInstance?.close(),this.snackbarInstance=(0,Dv.Z)().display.snackbar({id:"microphone-permission-lost",title:(0,Dv.cB)("Microphone access lost"),message:(0,Dv.cB)("To use voice features, allow microphone access for future visits."),variant:"info"})}},V8=async()=>{(0,Dv.cs)()===Dv.p.SIDE_PANEL&&((0,Dv.g)().log(`[${i0}] Starting integration`),await(0,Dv.eb)()===Dv.o.DESKTOP_APP&&(await(async()=>{if(!(0,Dv.Z)().user.key)return(0,Dv.g)().log(`[${i0}] User is not signed in, not syncing PBX with desktop app`),!1;if((0,Dv.ec)()!==Dv.bl.connected)return(0,Dv.g)().error(`[${i0}] No connection to desktop app, not syncing PBX with desktop app`),!1;await Dv.fo.subscribeForPbxChanged(e=>lb(e));const{accountSwitchBegin:e}=(0,Dv.au)().subscribeTo(Dv.fp);e.on(e=>Dv.fo.changeToPbx(e.pbxId));const t=await Dv.fo.getPbxInfo();return t?lb(t.currentPbxId):((0,Dv.g)().error(`[${i0}] No PBX info from desktop app`),!1)})()?((0,Dv.g)().log(`[${i0}] PBX in Side Panel switched to match desktop app on startup`),await(0,Dv.fq)(500)):(0,Dv.g)().log(`[${i0}] No syncing of PBX with desktop app done`)),(async()=>{(e=>{F5=e})((0,Dv.g)());const[e,t]=await Promise.all([F8(),B8()]);s4.set(e),(0,Dv.Z)().user.key?((0,Dv.g)().log(`[${i0}] User is signed in, waiting for application ready`),await(0,Dv.eW)(),(0,Dv.g)().log(`[${i0}] Application is ready, subscribing for Shell commands`),await U8(t),(0,Dv.g)().log(`[${i0}] Declaring Shell ready to receive commands in window ID ${t}`),await z8(t)):(0,Dv.g)().log(`[${i0}] User is not signed in, not subscribing for Shell commands`)})().catch(e=>{(0,Dv.g)().error(`[${i0}] Error connecting to chrext-port-comm-api`,e)}),j8.initialize())};class W8{show(){this.blockedExtensionsBannerElement||(this.blockedExtensionsBannerElement=(0,Dv.fr)(),(0,Dv.bL)().querySelector(Dv.e6)?.appendChild(this.blockedExtensionsBannerElement))}hide(){this.blockedExtensionsBannerElement&&this.blockedExtensionsBannerElement.remove()}}let K8;const q8=()=>{globalThis.shellExternalInterface=(()=>{try{return(0,Dv.bp)().opener?.shellExternalInterface}catch{return}})()??(()=>{const e=new Dv.e;return(0,Dv.b_)()&&((e=>{const t=()=>e.send({type:"app-state",payload:{topic:"get-app-state"}});e.supportsCompanion&&(e.available&&t(),e.addConnectionCallback(e=>{e.connectionStatus===Dv.bl.connected&&t()}),e.addCallback("app-state",e=>
5991{if("get-app-state-response"===e.topic){const t=e;(0,Dv.ft)(t.data.token),t.data.currentAccount&&(0,Dv.ab)(t.data.currentAccount),(0,Dv.fu)(t.data.userPreferences)}}))})(e),(e=>{e.isCompanion&&e.addCallback("app-state",t=>{"get-app-state"===t.topic&&(0,Dv.fv)().then(async t=>{e.send({type:"app-state",payload:{topic:"get-app-state-response",data:{currentAccount:t.user.key?(0,Dv.fx)(t.user.key):null,userPreferences:await(0,Dv.fw)(),token:(0,Dv.aa)()}}})})})})(e),(e=>{e.isCompanion&&(e.addCallback(Dv.fs.RequestAuthToken,()=>{const t=(0,Dv.aa)();t?e.send({type:Dv.fs.AuthToken,payload:t}):(0,Dv.a7)()}),e.addConnectionCallback(t=>{t.connectionStatus===Dv.bl.disconnected&&e.connect()}),e.connect())})(e),(e=>{e.supportsCompanion&&(e.addCallback(Dv.fs.AuthToken,e=>{(0,Dv.ft)(e)}),e.addConnectionCallback(t=>{t.connectionStatus===Dv.bl.disconnected&&((0,Dv.bj)(Dv.aU),e.connect())}),e.connect())})(e),(e=>{const t=t=>{e.isCompanion&&(0,Dv.cR)({namespace:t.namespace,commandName:t.commandName},...t.args,{callerId:t.callerId})};e.addCallback("command",t),(0,Dv.av)(()=>{e.removeCallback("command",t)})})(e),(e=>{if(!e.isIntegration)return;const t=()=>{e.send({type:"navigation",payload:{topic:"get-navigation",data:{}}})};e.addCallback("navigation",e=>{if("notify-navigation-available"===e.topic)(0,Dv.g)().log("New navigation available"),t();else if("get-navigation-response"===e.topic){const t=e;(0,Dv.g)().log(`Navigating to relative URL: ${t.data.relativeUrl}`),(0,Dv.bj)(t.data.relativeUrl)}}),e.available&&t(),e.addConnectionCallback(e=>{e.connectionStatus===Dv.bl.connected&&t()})})(e),(e=>{e.isCompanion&&e.addCallback("navigation",t=>{"get-navigation"===t.topic&&zy&&((0,Dv.g)().log(`Integration claimed navigation relative URL: ${zy}`),e.send({type:"navigation",payload:{topic:"get-navigation-response",data:{relativeUrl:zy}}}),zy=void 0,Fy&&((0,Dv.ap)(Fy),Fy=void 0))})})(e),(e=>{e.supportsCompanion&&(e.addCallback("companion-update",e=>{if("update-available"===e.topic&&e.data?.updateInfo){const{emit:t}=(0,Dv.au)().register(pJ,gJ),r=e.data.updateInfo;t.updateAvailable(r)}}),e.available&&vJ(),e.addConnectionCallback(e=>{if(e.connectionStatus===Dv.bl.connected)vJ();else if(e.connectionStatus===Dv.bl.disconnected){const{emit:e}=(0,Dv.au)().register(pJ,gJ);e.resetUpdateStatus()}}))})(e),(e=>{const t=e=>{"install-update"===e.topic?SJ():"get-update-status"===e.topic&&K8&&bJ(K8)};if(e.isCompanion){e.addCallback("companion-update",t);const{updateAvailable:r}=(0,Dv.au)().subscribeTo(pJ);r.on(e=>{K8=e,bJ(e)})}})(e)),e})()},G8={type:"REHYDRATE_CACHES_FOR_SW"},Z8="latest",Y8=e=>{const t=VG();e?t.show():t.hide()},J8=(e=[])=>{const t=p5(e);if(!e.some(e=>(e=>"goto/settings"===e||(e=>Cy().some(t=>t.name===e))(e))(e))&&0===t?.length)return;const r=Ry()&&!(e=>e.some(e=>{const{customProps:t}=e;return!!t?.shellConfig?.hideSidebar}))(t);Y8(r),RG()},Q8=e=>{(0,Dv.f4)(e);const t=e.detail?.appsByNewStatus?.MOUNTED??[];J8(t)}
5991,X8="code",e7=()=>{const e=(0,Dv.fD)(),t={response_type:X8,client_id:decodeURIComponent(e.get("authClientId")??""),redirect_uri:(0,Dv.cU)()+Dv.fB,code_challenge:decodeURIComponent(e.get("codeChallenge")??""),state:(0,Dv.fG)({authId:e.get("authId")??"",oauthRedirectMethod:e.get("oauthRedirectMethod")??"",hostRedirectUrl:e.get("hostRedirectUrl")??""}),code_challenge_method:"S256",url:decodeURIComponent(e.get("authUrl")??"")},r=new URL(t.url+"/oauth/authorize");for(const e in t)r.searchParams.append(e,t[e]);(0,Dv.dw)(r.toString())},t7={[Dv.fC]:e7,[Dv.fB]:()=>{const e=(0,Dv.fD)().get(X8)??"";try{const t=(()=>{const e=(0,Dv.fD)();return(0,Dv.fH)(e.get("state")??"")})();if("deeplink"===t.oauthRedirectMethod){const r=t?.hostRedirectUrl?.replace("{result}",e);return(0,Dv.dw)(r)}(0,Dv.fE)().then(()=>{(0,Dv.fF)(e)}).catch(e=>{(0,Dv.g)().error("Authentication.notifySuccess failed",e)})}catch(e){(0,Dv.g)().error("Authentication state failed",e),e7()}}},r7="/shell-sw.js",n7=async()=>{if((0,Dv.c5)()&&"serviceWorker"in navigator)try{const e=await navigator.serviceWorker.getRegistration(r7);if(e&&!await e.unregister())throw"Failed to unregister service worker"}catch(e){console.log("SW unregistration failed: ",e)}},o7=async(e,t)=>{switch(e.source){case pb.USER_SET:const r=t.doNotDisturbDetails?.dndSources.find(e=>e.source==pb.WORK_PERIOD),n=t.doNotDisturbDetails?.dndSources.find(e=>e.source==pb.ONE_TIME_PERIOD),o=r?.status!==gb.NONE;if((0,Dv.bs)(Dv.bt.SHELL_ENABLE_DND_TIMER)&&e.status===gb.ON&&t.userDoNotDisturbExpiration){const e=t.userAppearance??db.NONE,r=e===db.NONE?(0,Dv.cB)("Auto-update"):(0,Dv.cB)(_Z(e)),n=(e=>{if(!e)return null;const t=new Date(e),r=Math.round((t.getTime()-Date.now())/6e4);return JK.map(e=>e.value).includes(r)?r:null})(t.userDoNotDisturbExpiration),i=await l7(e,r,n,o);return(0,Dv.Z)().display.snackbar({id:"dnd-timer-notification",title:(0,Dv.cB)("Status set to do not disturb"),message:i}),!0}return e.status!==gb.NONE&&(t.userAppearance!==db.NONE||t.userDoNotDisturb===ub.DO_NOT_DISTURB)&&(r?.status!==gb.NONE||n?.status!==gb.NONE)&&a7(t.userDoNotDisturb,t.userAppearance),e.status!==gb.NONE;case pb.ONE_TIME_PERIOD:return e.status===gb.ON?(s7(!0),!0):e.status===gb.OFF&&(s7(!1),!0);case pb.WORK_PERIOD:return e.status===gb.ON?(i7(!0),!0):e.status===gb.OFF&&(i7(!1),!0);default:return!1}},i7=e=>{const t=e?(0,Dv.cB)("It's after hours"):(0,Dv.cB)("Your work hours have started"),r=e?(0,Dv.cB)("You’re set to do not disturb"):(0,Dv.cB)("Do not disturb is off");(0,Dv.Z)().display.snackbar({id:"work-hours-schedule-notification",title:t,message:r})},s7=e=>{const t=e?(0,Dv.cB)("Your custom hours have started"):(0,Dv.cB)("Your custom hours have ended"),r=e?(0,Dv.cB)("You’re set to do not disturb"):(0,Dv.cB)("Do not disturb is off"),n=e?[{label:(0,Dv.cB)("View schedule"),handler(){qv(Dv.aE),c7(o)}},{label:(0,Dv.cB)("Close"),handler(){c7(o)}}]:[],o=(0,Dv.Z)().display.snackbar({id:"custom-work-hours-schedule-notification",title:t,message:r,actions:n})},a7=(e,t)=>{const r=e===ub.DO_NOT_DISTURB?(0,Dv.cB)("Do not disturb"):(0,Dv.cB)(_Z(t));(0,Dv.Z)().display.snackbar({id:"manual-override-schedule-notification",title:(0,Dv.cB)("Status set to {{status}}",{status:r.toLowerCase()}),message:(0,Dv.cB)("To return to your work schedule, set your status to auto-update")})},l7=async(e,t,r,n)=>{let o=QK(r);return null===o&&(o=(0,Dv.cB)("the set time period")),n&&e===db.NONE?(0,Dv.cB)("After {{formattedTimeFrame}}, your work schedule will resume.",{formattedTimeFrame:o}):(0,Dv.cB)("After {{formattedTimeFrame}}, your status will go back to {{prevStatusLabel}}.",{formattedTimeFrame:o,prevStatusLabel:t.toLowerCase()})},c7=e=>{e.close()};var d7="user-agent",u7="",h7="function",p7="object",g7="string",f7="undefined",m7="browser",v7="cpu",b7="device",y7="engine",w7="os",x7="result",_7="name",k7="type",C7="vendor",S7="version",E7="architecture",I7="major",A7="model",T7="console",O7="mobile",L7="tablet",$7="smarttv",N7="wearable",R7="xr",P7="embedded",D7="inapp",M7="brands",z7="formFactors",F7="fullVersionList",U7="platform",B7="platformVersion",H7="bitness",j7="sec-ch-ua",V7=j7+"-full-version-list",W7=j7+"-arch",K7=j7+"-"+H7,q7=j7+"-form-factors",G7=j7+"-"+O7,Z7=j7+"-"+A7,Y7=j7+"-"+U7,J7=Y7+"-version",Q7=[M7,F7,O7,A7,U7,B7,E7,z7,H7],X7="Amazon",e9="Apple",t9="ASUS",r9="BlackBerry",n9="Google",o9="Huawei",i9="Lenovo",s9="Honor",a9="LG",l9="Microsoft",c9="Motorola",d9="Nvidia",u9="OnePlus",h9="OPPO",p9="Samsung",g9="Sharp",f9="Sony",m9="Xiaomi",v9="Zebra",b9="Chrome",y9="Chromium",w9="Chromecast",x9="Edge",_9="Firefox",k9="Opera",C9="Facebook",S9="Sogou",E9="Mobile ",I9=" Browser",A9="Windows",T9=typeof window!==f7&&window.navigator?window.navigator:void 0,O9=T9&&T9.userAgentData?T9.userAgentData:void 0,L9=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},$9=function(e,t){if(typeof e===p7&&e.length>0){for(var r in e)if(D9(t)==D9(e[r]))return!0;return!1}return!!R9(e)&&D9(t)==D9(e)},N9=function(e,t){for(var r in e)return/^(browser|cpu|device|engine|os)$/.test(r)||!!t&&N9(e[r])},R9=function(e){return typeof e===g7},P9=function(e){if(e){for(var t=[],r=z9(e).split(","),n=0;n<r.length;n++)if(r[n].indexOf(";")>-1){var o=B9(r[n]).split(";v=");t[n]={brand:o[0],version:o[1]}}else t[n]=B9(r[n]);return t}},D9=function(e){return R9(e)?e.toLowerCase():e},M9=function(e){return R9(e)?U9(/[^\d\.]/g,e).split(".")[0]:void 0},z9=function(e){return R9(e)?B9(U9(/\\?\"/g,e),500):void 0},F9=function(e){for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];typeof r==p7&&2==r.length?this[r[0]]=r[1]:this[r]=void 0}return this},U9=function(e,t){return R9(t)?t.replace(e,u7):t},B9=function(e,t){return e=U9(/^\s\s*/,String(e)),typeof t===f7?e:e.substring(0,t)},H9=function(e,t){if(e&&t)for(var r,n,o,i,s,a,l=0;l<t.length&&!s;){var c=t[l],d=t[l+1];for(r=n=0;r<c.length&&!s&&c[r];)if(s=c[r++].exec(e))for(o=0;o<d.length;o++)a=s[++n],typeof(i=d[o])===p7&&i.length>0?2===i.length?typeof i[1]==h7?this[i[0]]=i[1].call(this,a):this[i[0]]=i[1]:i.length>=3&&(typeof i[1]!==h7||i[1].exec&&i[1].test?3==i.length?this[i[0]]=a?a.replace(i[1],i[2]):void 0:4==i.length?this[i[0]]=a?i[3].call(this,a.replace(i[1],i[2])):void 0:i.length>4&&(this[i[0]]=a?i[3].apply(this,[a.replace(i[1],i[2])].concat(i.slice(4))):void 0):i.length>3?this[i[0]]=a?i[1].apply(this,i.slice(2)):void 0:this[i[0]]=a?i[1].call(this,a,i[2]):void 0):this[i]=a||void 0;l+=2}},j9=function(e,t){for(var r in t)if(typeof t[r]===p7&&t[r].length>0){for(var n=0;n<t[r].length;n++)if($9(t[r][n],e))return"?"===r?void 0:r}else if($9(t[r],e))return"?"===r?void 0:r;return t.hasOwnProperty("*")?t["*"]:e},V9={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2",8.1:"6.3",10:["6.4","10.0"],NT:""},W9={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},K9={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},q9={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[S7,[_7,E9+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[S7,[_7,x9+" WebView"],[k7,D7]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[S7,[_7,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[_7,S7],[/opios[\/ ]+([\w\.]+)/i],[S7,[_7,k9+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[S7,[_7,k9+" GX"]],[/\bopr\/([\w\.]+)/i],[S7,[_7,k9]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[S7,[_7,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[S7,[_7,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:hi|lg |ovi|qute)browser|palemoon)\/v?([-\w\.]+)/i,/(brave)(?: chrome)?\/([\d\.]+)/i,/(aloha|heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[_7,S7],[/quark(?:pc)?\/([-\w\.]+)/i],[S7,[_7,"Quark"]],[/\bddg\/([\w\.]+)/i],[S7,[_7,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb| ucpc)[\/ ]?([\w\.]+)/i],[S7,[_7,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[S7,[_7,"WeChat"]],[/konqueror\/([\w\.]+)/i],[S7,[_7,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[S7,[_7,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[S7,[_7,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[S7,[_7,"Smart "+i9+I9]],[/(av(?:ast|g|ira))\/([\w\.]+)/i],[[_7,/(.+)/,"$1 Secure"+I9],S7],[/norton\/([\w\.]+)/i],[S7,[_7,"Norton Private"+I9]],[/\bfocus\/([\w\.]+)/i],[S7,[_7,_9+" Focus"]],[/ mms\/([\w\.]+)$/i],[S7,[_7,k9+" Neon"]],[/ opt\/([\w\.]+)$/i],[S7,[_7,k9+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[S7,[_7,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[S7,[_7,"Dolphin"]],[/coast\/([\w\.]+)/i],[S7,[_7,k9+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[S7,[_7,"MIUI"+I9]],[/fxios\/([\w\.-]+)/i],[S7,[_7,E9+_9]],[/\bqihoobrowser\/?([\w\.]*)/i],[S7,[_7,"360"]],[/\b(qq)\/([\w\.]+)/i],[[_7,/(.+)/,"$1Browser"],S7],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[_7,/(.+)/,"$1"+I9],S7],[/ HBPC\/([\w\.]+)/],[S7,[_7,o9+I9]],[/samsungbrowser\/([\w\.]+)/i],[S7,[_7,p9+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[S7,[_7,S9+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[_7,S9+" Mobile"],S7],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[_7,S7],[/(lbbrowser|luakit|rekonq|steam(?= (clie|tenf|gameo)))/i],[_7],[/ome\/([\w\.]+).+(iron(?= saf)|360(?=[es]e$))/i],[S7,_7],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[_7,C9],S7,[k7,D7]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[_7,S7,[k7,D7]],[/\bgsa\/([\w\.]+) .*safari\//i],[S7,[_7,"GSA"],[k7,D7]],[/(?:musical_ly|trill)(?:.+app_?version\/|_)([\w\.]+)/i],[S7,[_7,"TikTok"],[k7,D7]],[/\[(linkedin)app\]/i],[_7,[k7,D7]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[_7,/(.+)/,"Zalo"],S7,[k7,D7]],[/(chromium)[\/ ]([-\w\.]+)/i],[_7,S7],[/ome-(lighthouse)$/i],[_7,[k7,"fetcher"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[S7,[_7,b9+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[S7,[_7,x9+" WebView2"],[k7,D7]],[/; wv\).+(chrome)\/([\w\.]+)/i],[[_7,b9+" WebView"],S7,[k7,D7]],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[S7,[_7,"Android"+I9]],[/chrome\/([\w\.]+) mobile/i],[S7,[_7,E9+"Chrome"]],[/(chrome|omniweb|arora|[t
5991izenoka]{5} ?browser)\/v?([\w\.]+)/i],[_7,S7],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[S7,[_7,E9+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[_7,E9+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[S7,_7],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[_7,[S7,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[_7,S7],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[_7,E9+_9],S7],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[_7,"Netscape"],S7],[/(wolvic|librewolf)\/([\w\.]+)/i],[_7,S7],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[S7,[_7,_9+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[_7,[S7,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[_7,[S7,/[^\d\.]+./,u7]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[E7,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[E7,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[E7,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[E7,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[E7,"arm"]],[/ sun4\w[;\)]/i],[[E7,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[E7,/ower/,u7,D9]],[/mc680.0/i],[[E7,"68k"]],[/winnt.+\[axp/i],[[E7,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[A7,[C7,p9],[k7,L7]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[A7,[C7,p9],[k7,O7]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[A7,[C7,e9],[k7,O7]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[A7,[C7,e9],[k7,L7]],[/(macintosh);/i],[A7,[C7,e9]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[A7,[C7,g9],[k7,O7]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[A7,[C7,s9],[k7,L7]],[/honor([-\w ]+)[;\)]/i],[A7,[C7,s9],[k7,O7]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[A7,[C7,o9],[k7,L7]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[A7,[C7,o9],[k7,O7]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[A7,/_/g," "],[C7,m9],[k7,L7]],[/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/; ([\w ]+) miui\/v?\d/i],[[A7,/_/g," "],[C7,m9],[k7,O7]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-l]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[A7,[C7,u9],[k7,O7]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[A7,[C7,h9],[k7,O7]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[A7,[C7,j9,{OnePlus:["203","304","403","404","413","415"],"*":h9}],[k7,L7]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[A7,[C7,"BLU"],[k7,O7]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[A7,[C7,"Vivo"],[k7,O7]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[A7,[C7,"Realme"],[k7,O7]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[A7,[C7,i9],[k7,L7]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[A7,[C7,i9],[k7,O7]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[A7,[C7,c9],[k7,O7]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[A7,[C7,c9],[k7,L7]],[/\b(?:lg)?([vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[A7,[C7,a9],[k7,L7]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[A7,[C7,a9],[k7,O7]],[/(nokia) (t[12][01])/i],[C7,A7,[k7,L7]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[A7,/_/g," "],[k7,O7],[C7,"Nokia"]],[/(pixel (c|tablet))\b/i],[A7,[C7,n9],[k7,L7]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[A7,[C7,n9],[k7,O7]],[/(google) (pixelbook( go)?)/i],[C7,A7],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[A7,[C7,f9],[k7,O7]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[A7,"Xperia Tablet"],[C7,f9],[k7,L7]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[A7,[C7,X7],[k7,L7]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[A7,/(.+)/g,"Fire Phone $1"],[C7,X7],[k7,O7]],[/(playbook);[-\w\),; ]+(rim)/i],[A7,C7,[k7,L7]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[A7,[C7,r9],[k7,O7]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[A7,[C7,t9],[k7,L7]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[A7,[C7,t9],[k7,O7]],[/(nexus 9)/i],[A7,[C7,"HTC"],[k7,L7]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[C7,[A7,/_/g," "],[k7,O7]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w)
vendor: 5,673 bytes, line 5991
5991)?(\)| bui)/i],[A7,[C7,"TCL"],[k7,L7]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[A7,[C7,"TCL"],[k7,O7]],[/(itel) ((\w+))/i],[[C7,D9],A7,[k7,j9,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[A7,[C7,"Acer"],[k7,L7]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[A7,[C7,"Meizu"],[k7,O7]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[A7,[C7,"Ulefone"],[k7,O7]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[A7,[C7,"Energizer"],[k7,O7]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[A7,[C7,"Cat"],[k7,O7]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[A7,[C7,"Smartfren"],[k7,O7]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[A7,[C7,"Nothing"],[k7,O7]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[A7,[C7,"Archos"],[k7,L7]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[A7,[C7,"Archos"],[k7,O7]],[/blackview ([-\w ]+)( b|\))/i,/; (bv\d{4}[-\w ]*)( b|\))/i],[A7,[C7,"Blackview"],[k7,O7]],[/; (n159v)/i],[A7,[C7,"HMD"],[k7,O7]],[/((revvl[ \w\+]+|tm(?:rv|af)\w*[45]g(?:tb)?))( b|\))/i],[A7,[k7,function(e,t){return t.test.test(e)?t.ifTrue:t.ifFalse},{test:/ta?b/i,ifTrue:L7,ifFalse:O7}],[C7,"T-Mobile"]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[C7,A7,[k7,L7]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|coolpad|cubot|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([-\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[C7,A7,[k7,O7]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[C7,A7,[k7,L7]],[/(surface duo)/i],[A7,[C7,l9],[k7,L7]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[A7,[C7,"Fairphone"],[k7,O7]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[A7,[C7,d9],[k7,L7]],[/(sprint) (\w+)/i],[C7,A7,[k7,O7]],[/(kin\.[onetw]{3})/i],[[A7,/\./g," "],[C7,l9],[k7,O7]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[A7,[C7,v9],[k7,L7]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[A7,[C7,v9],[k7,O7]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[C7,[k7,$7]],[/hbbtv.+maple;(\d+)/i],[[A7,/^/,"SmartTV"],[C7,p9],[k7,$7]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[C7,A7,[k7,$7]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[C7,a9],[k7,$7]],[/(apple) ?tv/i],[C7,[A7,e9+" TV"],[k7,$7]],[/crkey.*devicetype\/chromecast/i],[[A7,w9+" Third Generation"],[C7,n9],[k7,$7]],[/crkey.*devicetype\/([^/]*)/i],[[A7,/^/,"Chromecast "],[C7,n9],[k7,$7]],[/fuchsia.*crkey/i],[[A7,w9+" Nest Hub"],[C7,n9],[k7,$7]],[/crkey/i],[[A7,w9],[C7,n9],[k7,$7]],[/(portaltv)/i],[A7,[C7,C9],[k7,$7]],[/droid.+aft(\w+)( bui|\))/i],[A7,[C7,X7],[k7,$7]],[/(shield \w+ tv)/i],[A7,[C7,d9],[k7,$7]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[A7,[C7,g9],[k7,$7]],[/(bravia[\w ]+)( bui|\))/i],[A7,[C7,f9],[k7,$7]],[/(mi(tv|box)-?\w+) bui/i],[A7,[C7,m9],[k7,$7]],[/Hbbtv.*(technisat) (.*);/i],[C7,A7,[k7,$7]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[C7,/.+\/(\w+)/,"$1",j9,{LG:"lge"}],[A7,B9],[k7,$7]],[/(playstation \w+)/i],[A7,[C7,f9],[k7,T7]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[A7,[C7,l9],[k7,T7]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[C7,j9,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],A7,[k7,T7]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[A7,[C7,p9],[k7,N7]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[C7,A7,[k7,N7]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[A7,[C7,h9],[k7,N7]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[A7,[C7,e9],[k7,N7]],[/(opwwe\d{3})/i],[A7,[C7,u9],[k7,N7]],[/(moto 360)/i],[A7,[C7,c9],[k7,N7]],[/(smartwatch 3)/i],[A7,[C7,f9],[k7,N7]],[/(g watch r)/i],[A7,[C7,a9],[k7,N7]],[/droid.+; (wt63?0{2,3})\)/i],[A7,[C7,v9],[k7,N7]],[/droid.+; (glass) \d/i],[A7,[C7,n9],[k7,R7]],[/(pico) ([\w ]+) os\d/i],[C7,A7,[k7,R7]],[/(quest( \d| pro)?s?).+vr/i],[A7,[C7,C9],[k7,R7]],[/mobile vr; rv.+firefox/i],[[k7,R7]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[C7,[k7,P7]],[/(aeobc)\b/i],[A7,[C7,X7],[k7,P7]],[/(homepod).+mac os/i],[A7,[C7,e9],[k7,P7]],[/windows iot/i],[[k7,P7]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[A7,[k7,$7]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[k7,$7]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[A7,[k7,j9,{mobile:"Mobile",xr:"VR","*":L7}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[k7,L7]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[k7,O7]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[A7,[C7,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[S7,[_7,x9+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[_7,S7],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[S7,[_7,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links|dillo)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[_7,S7],[/ladybird\//i],[[_7,"LibWeb"]],[/rv\
5991:([\w\.]{1,9})\b.+(gecko)/i],[S7,_7]],os:[[/(windows nt) (6\.[23]); arm/i],[[_7,/N/,"R"],[S7,j9,V9]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[_7,S7],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[S7,/(;|\))/g,"",j9,V9],[_7,A9]],[/(windows ce)\/?([\d\.]*)/i],[_7,S7],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,/\btvos ?([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[S7,/_/g,"."],[_7,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[_7,"macOS"],[S7,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[S7,[_7,w9+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[S7,[_7,w9+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[S7,[_7,w9+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[S7,[_7,w9+" Linux"]],[/crkey\/([\d\.]+)/i],[S7,[_7,w9]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[S7,_7],[/(ubuntu) ([\w\.]+) like android/i],[[_7,/(.+)/,"$1 Touch"],S7],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[_7,S7],[/\(bb(10);/i],[S7,[_7,r9]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[S7,[_7,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile[;\w ]*|tablet|tv|[^\)]*(?:viera|lg(?:l25|-d300)|alcatel ?o.+|y300-f1)); rv:([\w\.]+)\).+gecko\//i],[S7,[_7,_9+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[S7,[_7,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[S7,j9,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[_7,"webOS"]],[/watch(?: ?os[,\/ ]|\d,\d\/)([\d\.]+)/i],[S7,[_7,"watchOS"]],[/cros [\w]+(?:\)| ([\w\.]+)\b)/i],[S7,[_7,"Chrome OS"]],[/kepler ([\w\.]+); (aft|aeo)/i],[S7,[_7,"Vega OS"]],[/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[_7,S7],[/(sunos) ?([\d\.]*)/i],[[_7,"Solaris"],S7],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[_7,S7]]},G9=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return F9.call(e.init,[[m7,[_7,S7,I7,k7]],[v7,[E7]],[b7,[k7,A7,C7]],[y7,[_7,S7]],[w7,[_7,S7]]]),F9.call(e.isIgnore,[[m7,[S7,I7]],[y7,[S7]],[w7,[S7]]]),F9.call(e.isIgnoreRgx,[[m7,/ ?browser$/i],[w7,/ ?os$/i]]),F9.call(e.toString,[[m7,[_7,S7]],[v7,[E7]],[b7,[C7,A7]],[y7,[_7,S7]],[w7,[_7,S7]]]),e}(),Z9=function(e,t){var r=G9.init[t],n=G9.isIgnore[t]||0,o=G9.isIgnoreRgx[t]||0,i=G9.toString[t]||0;function s(){F9.call(this,r)}return s.prototype.getItem=function(){return e},s.prototype.withClientHints=function(){return O9?O9.getHighEntropyValues(Q7).then(function(t){return e.setCH(new Y9(t,!1)).parseCH().get()}):e.parseCH().get()},s.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=x7&&(s.prototype.is=function(e){var t=!1;for(var r in this)if(this.hasOwnProperty(r)&&!$9(n,r)&&D9(o?U9(o,this[r]):this[r])==D9(o?U9(o,e):e)){if(t=!0,e!=f7)break}else if(e==f7&&t){t=!t;break}return t},s.prototype.toString=function(){var e=u7;for(var t in i)typeof this[i[t]]!==f7&&(e+=(e?" ":u7)+this[i[t]]);return e||f7}),s.prototype.then=function(e){var t=this,r=function(){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])};r.prototype={is:s.prototype.is,toString:s.prototype.toString,withClientHints:s.prototype.withClientHints,withFeatureCheck:s.prototype.withFeatureCheck};var n=new r;return e(n),n},new s};function Y9(e,t){if(e=e||{},F9.call(this,Q7),t)F9.call(this,[[M7,P9(e[j7])],[F7,P9(e[V7])],[O7,/\?1/.test(e[G7])],[A7,z9(e[Z7])],[U7,z9(e[Y7])],[B7,z9(e[J7])],[E7,z9(e[W7])],[z7,P9(e[q7])],[H7,z9(e[K7])]]);else for(var r in e)this.hasOwnProperty(r)&&typeof e[r]!==f7&&(this[r]=e[r])}function J9(e,t,r,n){return F9.call(this,[["itemType",e],["ua",t],["uaCH",n],["rgxMap",r],["data",Z9(this,e)]]),this}function Q9(e,t,r){if(typeof e===p7?(N9(e,!0)?(typeof t===p7&&(r=t),t=e):(r=e,t=void 0),e=void 0):typeof e===g7&&!N9(t,!0)&&(r=t,t=void 0),r)if(typeof r.append===h7){var n={};r.forEach(function(e,t){n[String(t).toLowerCase()]=e}),r=n}else{var o={};for(var i in r)r.hasOwnProperty(i)&&(o[String(i).toLowerCase()]=r[i]);r=o}if(!(this instanceof Q9))return new Q9(e,t,r).getResult();var s=typeof e===g7?e:r&&r[d7]?r[d7]:T9&&T9.userAgent?T9.userAgent:u7,a=new Y9(r,!0),l=q9,c=function(e){return e==x7?function(){return new J9(e,s,l,a).set("ua",s).set(m7,this.getBrowser()).set(v7,this.getCPU()).set(b7,this.getDevice()
5991).set(y7,this.getEngine()).set(w7,this.getOS()).get()}:function(){return new J9(e,s,l[e],a).parseUA().get()}};return F9.call(this,[["getBrowser",c(m7)],["getCPU",c(v7)],["getDevice",c(b7)],["getEngine",c(y7)],["getOS",c(w7)],["getResult",c(x7)],["getUA",function(){return s}],["setUA",function(e){return R9(e)&&(s=B9(e,500)),this}],["useExtension",function(e){return e&&(l=function(e,t){var r={},n=t;if(!N9(t))for(var o in n={},t)for(var i in t[o])n[i]=t[o][i].concat(n[i]?n[i]:[]);for(var s in e)r[s]=n[s]&&n[s].length%2==0?n[s].concat(e[s]):e[s];return r}(l,e)),this}]]).setUA(s).useExtension(t),this}J9.prototype.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data},J9.prototype.set=function(e,t){return this.data[e]=t,this},J9.prototype.setCH=function(e){return this.uaCH=e,this},J9.prototype.detectFeature=function(){if(T9&&T9.userAgent==this.ua)switch(this.itemType){case m7:T9.brave&&typeof T9.brave.isBrave==h7&&this.set(_7,"Brave");break;case b7:!this.get(k7)&&O9&&O9[O7]&&this.set(k7,O7),"Macintosh"==this.get(A7)&&T9&&typeof T9.standalone!==f7&&T9.maxTouchPoints&&T9.maxTouchPoints>2&&this.set(A7,"iPad").set(k7,L7);break;case w7:!this.get(_7)&&O9&&O9[U7]&&this.set(_7,O9[U7]);break;case x7:var e=this.data,t=function(t){return e[t].getItem().detectFeature().get()};this.set(m7,t(m7)).set(v7,t(v7)).set(b7,t(b7)).set(y7,t(y7)).set(w7,t(w7))}return this},J9.prototype.parseUA=function(){switch(this.itemType!=x7&&H9.call(this.data,this.ua,this.rgxMap),this.itemType){case m7:this.set(I7,M9(this.get(S7)));break;case w7:if("iOS"==this.get(_7)&&this.get(S7)&&/^1[89][^\d]/.exec(this.get(S7
5991))){var e=/\) Version\/((\d+)[\d\.]*)/.exec(this.ua);e&&parseInt(e[2],10)>=26&&this.set(S7,e[1])}}return this},J9.prototype.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case m7:case y7:var r,n=e[F7]||e[M7];if(n)for(var o=0;o<n.length;o++){var i=n[o].brand||n[o],s=n[o].version;this.itemType==m7&&!/not.a.brand/i.test(i)&&(!r||/Chrom/.test(r)&&i!=y9||r==x9&&/WebView2/.test(i))&&(i=j9(i,K9),(r=this.get(_7))&&!/Chrom/.test(r)&&/Chrom/.test(i)||this.set(_7,i).set(S7,s).set(I7,M9(s)),r=i),this.itemType==y7&&i==y9&&this.set(S7,s)}break;case v7:var a=e[E7];a&&(a&&"64"==e[H7]&&(a+="64"),H9.call(this.data,a+";",t));break;case b7:if(e[O7]&&this.set(k7,O7),e[A7]&&(this.set(A7,e[A7]),!this.get(k7)||!this.get(C7))){var l={};H9.call(l,"droid 9; "+e[A7]+")",t),!this.get(k7)&&l.type&&this.set(k7,l.type),!this.get(C7)&&l.vendor&&this.set(C7,l.vendor)}if(e[z7]){var c;if("string"!=typeof e[z7])for(var d=0;!c&&d<e[z7].length;)c=j9(e[z7][d++],W9);else c=j9(e[z7],W9);this.set(k7,c)}break;case w7:var u=e[U7];if(u){var h=e[B7];u==A9&&(h=parseInt(M9(h),10)>=13?"11":"10"),this.set(_7,u).set(S7,h)}this.get(_7)==A9&&"Xbox"==e[A7]&&this.set(_7,"Xbox").set(S7,void 0);break;case x7:var p=this.data,g=function(t){return p[t].getItem().setCH(e).parseCH().get()};this.set(m7,g(m7)).set(v7,g(v7)).set(b7,g(b7)).set(y7,g(y7)).set(w7,g(w7))}return this},Q9.VERSION="2.0.10",Q9.BROWSER=L9([_7,S7,I7,k7]),Q9.CPU=L9([E7]),Q9.DEVICE=L9([A7,C7,k7,T7,O7,$7,L7,N7,P7]),Q9.ENGINE=Q9.OS=L9([_7,S7]);const X9=(0,Dv.au)().subscribeTo("Shell"),eee=new class{show(){this.blockedVersionsBannerElement||(this.blockedVersionsBannerElement=(0,Dv.fI)(),(0,Dv.bL)().querySelector(Dv.e6)?.appendChild(this.blockedVersionsBannerElement))}hide(){this.blockedVersionsBannerElement&&this.blockedVersionsBannerElement.remove()}},tee=async e=>{await(async e=>{try{const t=await(async(e=!0)=>{if(e)return(0,Dv.bs)(Dv.bt.BLOCKED_VERSIONS)??[];const t=await(0,Dv.fJ)(Dv.bt.BLOCKED_VERSIONS);return t?.enabled?(0,Dv.fK)(t.variant.payload?.value??"",[]):[]})(e);if(!t.length)return!1;const r=(0,Dv.Z)().meta.extensions,n={id:"@goto-shell",name:"shell",version:K3()},o={id:"@goto-app",name:"goto-app",version:wj()};return!!((e,t)=>{const r=new Set(t.map(({id:e,version:t})=>`${e}:${t}`));return e.some(({extensionId:e,versions:t})=>t.map(t=>`${e}:${t}`).some(e=>r.has(e)))})(t,[...r,n,o])&&((0,Dv.g)().warn("Blocked version detected, actual versions: ",r),!0)}catch(e){return(0,Dv.g)().error("Error checking for version updates:",(e=>{if(e instanceof Error)return e.message;if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return"[Unserializable error object]"}}
5991)(e)),!1}})(e)&&eee.show()},ree=()=>{tee(),setInterval(()=>tee(!1),9e5)},nee=/^\d{4}-\d{2}-\d{2}$/,oee=e=>nee.test(e)?(e=>{const[t,r,n]=e.split("-").map(Number),o=new Date(t,r-1,n);return o.getFullYear()===t&&o.getMonth()===r-1&&o.getDate()===n?o.getTime():NaN})(e):new Date(e).getTime(),iee=Number.POSITIVE_INFINITY,see=(e,t=Date.now())=>void 0===e?iee:yJ(oee(e),t),aee=e=>e<=0,lee=["Chrome","Edge","Firefox","Safari"],cee=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),dee=e=>cee(e)&&"string"==typeof e.minVersion&&(void 0===e.deadline||(e=>"string"==typeof e&&!Number.isNaN(oee(e)))(e.deadline)),uee=e=>lee.includes(e),hee=(e,t=Date.now())=>!aee(see(e,t)),pee=()=>{const e=(0,Dv.cB)("You're using an outdated version of GoTo. For better performance and security, ask your admin to update your app."),t=Mv().retrieve(_K).commands.openCreateIncidentDialog;return t.isHandled()?{description:e,link:{text:(0,Dv.cB)("Contact my admin"),onClick:()=>t.execute({serviceName:"IT helpdesk",categoryName:"Software",priorityName:"High",subject:(0,Dv.cB)("Desktop app update needed"),description:(0,Dv.cB)("A newer version of GoTo is available. For better performance and security, ask your admin to update your app.")})}}:{description:e}},gee=async({currentVersion:e,expectedVersion:t,deadline:r})=>{(0,Dv.g)().warn(`Outdated container version detected: ${e} is below minimum ${t}, deadline ${r??"open-ended"}.`),!await CJ()&&((e,t=Date.now())=>{const r=see(e,t);if(aee(r))return!0;const n=(()=>{const e=(0,Dv.aZ)(Dv.aX.outdatedVersionBannerDismissedAt);if(!e)return;const t=new Date(e).getTime();return Number.isNaN(t)?void 0:t})();return void 0===n||yJ(t,n)>=(e=>e>21?3:1)(r)})(r)&&(0,Dv.eX)({id:"shellOutdatedVersionBanner",icon:Eb,closable:hee(r),onClose:()=>((e=Date.now())=>(0,Dv.aW)(Dv.aX.outdatedVersionBannerDismissedAt,new Date(e).toISOString()))(),...pee()})},fee=async()=>{const e=(0,Dv.bs)(Dv.bt.SHELL_OUTDATED_VERSIONS);(e=>cee(e)&&(void 0===e.container||dee(e.container))&&(void 0===e.browsers||(e=>cee(e)&&Object.keys(e).every(uee)&&Object.values(e).every(dee))(e.browsers)))(e)?(await(async e=>{if(e.container)try{const t=await(async e=>{if(!(0,Dv.bB)())return{valid:!0};const t=await(0,Dv.bI)();return"N/A"===t||uQ(t,e.minVersion)>=0?{valid:!0}:{valid:!1,expectedVersion:e.minVersion,currentVersion:t,deadline:e.deadline}})(e.container);if(!t.valid)return void await gee(t);(0,Dv.bW)(Dv.aX.outdatedVersionBannerDismissedAt)}catch(e){(0,Dv.g)().error("Error checking container version:",e instanceof Error?e.message:String(e))}})(e),(e=>{if(e.browsers)try{const t=(e=>{if((0,Dv.bB)())return{valid:!0};const t=(0,Dv.fL)();if(!t)return{valid:!0};const r=e[t];if(!r)return{valid:!0};const n=(0,Dv.fM)();return n?uQ(n,r.minVersion)>=0?{valid:!0}:{valid:!1,expectedVersion:r.minVersion,currentVersion:n,deadline:r.deadline}:{valid:!0}})(e.browsers);t.valid||(0,Dv.g)().warn(`Outdated browser version detected: ${t.currentVersion} is below minimum ${t.expectedVersion}.`)}catch(e){(0,Dv.g)().error("Error checking browser version:",e instanceof Error?e.message:String(e))}})(e)):void 0!==e&&(0,Dv.g)().error("Invalid outdated-versions config shape:",e)},mee=(0,Dv.au)().subscribeTo("Shell"),vee="mock-pending-container-update",bee=["localhost","127.0.0.1"],yee=e=>{const t=new Date;return t.setDate(t.getDate()-e),t.toISOString()},wee=f3("shell_internalApiFetches",m3),xee=async e=>{const t=(0,Dv.bs)(Dv.bt.SHELL_BFF_OPTIMIZATION_CALL)??!0?await(async e=>(await(async(e,t)=>{const r="string"==typeof e?e:e.url,n=t?.method||("string"==typeof e?"GET":e.method),o={url:(0,Dv.b$)(r),method:n},i=(0,Dv.aa)(),s=t?.timeoutInMS??3e4,a=new Headers(t?.headers);i?.access_token&&i.token_type?(a.set("Authorization",`${i.token_type} ${i.access_token}`),(0,Dv.g)().log("AuthenticatedFetchOptional: Request started with token",o)):(0,Dv.g)().log("AuthenticatedFetchOptional: Request started without token",o);const l=await(0,Dv.fO)(e,{credentials:"include",...t,headers:a,timeoutInMS:s}),{body:c,status:d,statusText:u}=l;if(d>=400){const e=(0,Dv.at)(l);throw(0,Dv.g)().log("AuthenticatedFetchOptional: Request failed",{...o,status:d,statusText:u,requestId:e}),new Dv.a3({message:`${d}: ${u}${e?` (Request ID: ${e})`:""}`,response:l,status:d,statusText:u,body:c})}return(0,Dv.g)().log("AuthenticatedFetchOptional: Request successful",{...o,status:d}),l})(`${(0,Dv.an)().getShellBffServiceBaseUrl()}/user-context/context`,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"},credentials:void 0})).json())(e):await(async e=>{const t=await wee(),r=t?.user?.key??"",n=t?.user?.email??"",o=(0,Dv.cz)({givenName:t?.user.firstName??"",familyName:t?.user.lastName??""});r&&Dv.bz.isPluginAvailable("UserId")&&Dv.bA.UserId.storeCurrAuthenticatedUserKey(r);let i=[];i=[(0,Dv.eK)({func:()=>e.cachedAccountKey?xK(e.cachedAccountKey):Promise.resolve(void 0),defaultReturn:void 0}),(0,Dv.eK)({func:()=>b3(n,r),defaultReturn:void 0}),(0,Dv.eK)({func:()=>g3(r),defaultReturn:void 0})];const s=await Promise.allSettled(i);let[a,l,c]=s.map(e=>"fulfilled"===e.status?e.value:void 0);const d=l?.pbx?.id??"";e.cachedAccountKey!==d&&(a=await xK(d));const u=l?.pbx?.info?.region??"",h=a?.license?[a.license]:[],p=a?.permissions??[],g=t?.accounts?.find(e=>e.key===d),f=t?.accounts?.map(e=>e.key)??[],m=[],v=new Set,b=new Set;
5991t?.accounts?.forEach(e=>e.licenses?.forEach(e=>{const t=new Dv.fP(e);t.roles?.forEach(e=>v.add(e)),t.enabled&&(b.add(t.key),m.push(...t.entitlements))})),0===m.length&&(0,Dv.g)().warn("User does not have entitlements.");const y={...e.featureFlagsParams,numberOfAccounts:t?.accounts?.length??0,userName:o,email:n,externalUserKey:r,accountKey:g?.key??"",pbxId:d,pbxRegion:u,entitlements:m,roles:Array.from(v),licenses:h,licenseKeys:Array.from(b),allAccountKeys:f,partnerAccountKey:g?.partnerAccountKey,userCreationDate:t?.user.createTime,currentAccountName:g?.name};await(0,Dv.fQ)(y);const w=(0,Dv.eO)()??{};let x,_;r&&(x=await(0,Dv.eL)(n,r)),x?.pbxId&&(_=await v3(x.pbxId));const k={avatar:c,licenses:h,permissions:p,settings:await fV(),userInfo:t};return{featureFlags:w,pbxData:x?{...x,pbxRegion:u,pbxOrganizationInfo:_}:void 0,userDetails:k,policyDecisionPoint:{}}})(e);return await(async()=>{const e=(0,Dv.bs)(Dv.bt.SHELL_DISABLE_SERVICE_WORKER,!1)??!1;(0,Dv.g)().setContext("shell_sw_enabled",!e),e&&await n7()})(),t},_ee="login",kee="logout",Cee="get-token",See="auth-token-changed",Eee=Object.freeze(Object.defineProperty({__proto__:null,authTokenChangedEvent:See,getTokenMsg:Cee,loginMsg:_ee,logoutMsg:kee},Symbol.toStringTag,{value:"Module"})),Iee="get-user-avatar",Aee=Object.freeze(Object.defineProperty({__proto__:null,msg:Iee},Symbol.toStringTag,{value:"Module"})),Tee="get-user-name",Oee=Object.freeze(Object.defineProperty({__proto__:null,msg:Tee},Symbol.toStringTag,{value:"Module"})),Lee="is-user-signed-in",$ee=Object.freeze(Object.defineProperty({__proto__:null,msg:Lee},Symbol.toStringTag,{value:"Module"})),Nee="get-pbx-info",Ree="change-to-pbx",Pee="pbx-changed",Dee=Object.freeze(Object.defineProperty({__proto__:null,eventPbxChanged:Pee,msgChangeToPbx:Ree,msgGetPbxInfo:Nee},Symbol.toStringTag,{value:"Module"})),Mee="get-user-presence",zee="user-presence-changed";var Fee=(e=>(e.UNAVAILABLE="UNAVAILABLE",e.OFFLINE="OFFLINE",e.ONLINE="ONLINE",e.BUSY="BUSY",e.DO_NOT_DISTURB="DO_NOT_DISTURB",e.AWAY="AWAY",e.AUTO_UPDATE="AUTO_UPDATE",e))(Fee||{}),Uee=(e=>(e.NONE="NONE",e.OFFLINE="OFFLINE",e.AWAY="AWAY",e.BUSY="BUSY",e.ONLINE="ONLINE",e))(Uee||{}),Bee=(e=>(e.IN_A_MEETING="IN_A_MEETING",e.IN_A_CALL="IN_A_CALL",e.IN_A_CALENDAR_EVENT="IN_A_CALENDAR_EVENT",e))(Bee||{});const Hee=Object.freeze(Object.defineProperty({__proto__:null,Appearance:Fee,Status:Bee,UserAppearance:Uee,event:zee,msg:Mee},Symbol.toStringTag,{value:"Module"})),jee=class e{constructor(e){this.desktopCompanionClient=e}isUserSignedIn(){return this.desktopCompanionClient.request(e.apiId,{msg:Lee,payload:void 0},{})}getUserAvatar(){return this.desktopCompanionClient.request(e.apiId,{msg:Iee,payload:void 0},{})}getUserName(){return this.desktopCompanionClient.request(e.apiId,{msg:Tee,payload:void 0},{})}getUserPresence(){return this.desktopCompanionClient.request(e.apiId,{msg:Mee,payload:void 0},{})}subscribeForUserPresenceChanged(t){return this.desktopCompanionClient.requestSubscription(e.apiId,{event:zee,subscriptionOptions:void 0},t,{})}getPbxInfo(){return this.desktopCompanionClient.request(e.apiId,{msg:Nee,payload:void 0},{})}changeToPbx(t){return this.desktopCompanionClient.request(e.apiId,{msg:Ree,payload:t},{})}subscribeForPbxChanged(t){return this.desktopCompanionClient.requestSubscription(e.apiId,{event:Pee,subscriptionOptions:void 0},t,{})}login(t){return this.desktopCompanionClient.request(e.apiId,{msg:_ee,payload:t},{})}logout(){return this.desktopCompanionClient.request(e.apiId,{msg:kee,payload:void 0},{})}getToken(){return this.desktopCompanionClient.request(e.apiId,{msg:Cee,payload:void 0},{})}subscribeForAuthTokenChanged(t){return this.desktopCompanionClient.requestSubscription(e.apiId,{event:See,subscriptionOptions:void 0},t,{})}};jee.apiId="shell-desktop-client-api-id-421CEDC9-6EC4-4A37-A975-A48E373E8B15";let Vee=jee;const Wee=e=>{switch(e){case cb.UNAVAILABLE:return Hee.Appearance.UNAVAILABLE;case cb.OFFLINE:return Hee.Appearance.OFFLINE;case cb.ONLINE:return Hee.Appearance.ONLINE;case cb.BUSY:return Hee.Appearance.BUSY;case cb.DO_NOT_DISTURB:return Hee.Appearance.DO_NOT_DISTURB;case cb.AWAY:return Hee.Appearance.AWAY;case cb.AUTO_UPDATE:return Hee.Appearance.AUTO_UPDATE;default:return Hee.Appearance.UNAVAILABLE}},Kee=e=>{switch(e){case db.NONE:return Hee.UserAppearance.NONE;case db.OFFLINE:return Hee.UserAppearance.OFFLINE;case db.AWAY:return Hee.UserAppearance.AWAY;case db.BUSY:return Hee.UserAppearance.BUSY;case db.ONLINE:return Hee.UserAppearance.ONLINE;default:return Hee.UserAppearance.NONE}},qee=e=>{switch(e){case hb.IN_A_MEETING:return Hee.Status.IN_A_MEETING;case hb.IN_A_CALL:return Hee.Status.IN_A_CALL;case hb.IN_A_CALENDAR_EVENT:return Hee.Status.IN_A_CALENDAR_EVENT;default:return Hee.Status.IN_A_MEETING}},Gee=e=>{switch(e.msg){case Eee.getTokenMsg:return(0,Dv.fT)(e.payload);case Eee.loginMsg:return(0,Dv.fS)(e.payload);case Eee.logoutMsg:return(0,Dv.fR)(e.payload);case Aee.msg:return(async()=>{const e=(0,Dv.Z)().user.avatar;return e?{isDefault:e.isDefault,urlSmall:e.urlSmall,urlMedium:e.urlMedium,urlLarge:e.urlLarge,urlXLarge:e.urlXLarge}:void 0})(e.payload);case Oee.msg:return(async()=>{const e=(0,Dv.Z)();if(!e.user.key)return;const t=e.user.name;return{first:t.givenName,last:t.lastName}})(e.payload);case $ee.msg:return(async()=>!!(0,Dv.Z)().user.key)(e.payload);case Dee.msgChangeToPbx:return(async e=>lb(e))(e.payload);case Dee.msgGetPbxInfo:return(async()=>{const e=(0,Dv.Z)();if(!e.user.key)return;const t=(e.context.pbx?.pbxes??[]).map(e=>({id:e.id,name:e.name}));return{pbxes:t,currentPbxId:e.context.pbx?.id??""}})(e.payload);case Hee.msg:return(async()=>{const{presence:e,user:t}=(0,Dv.Z)(),r=t.key;if(!e||!r)return;return(e=>({appearance:Wee(e.appearance),userAppearance:e.userAppearance?Kee(e.userAppearance):void 0,status:e.status?qee(e.status):void 0,userNote:e.userNote}))(await e.getPresenceSnapshots(r))})(e.payload)}return Promise.reject(new Error(`Unknown request message: ${e.msg}`))},Zee=(e,t)=>
5991{switch(e.event){case Eee.authTokenChangedEvent:return(0,Dv.fU)(e.subscriptionOptions,t);case Dee.eventPbxChanged:return(async(e,t)=>{const{eventBus:r,user:n}=(0,Dv.Z)();if(!n.key)throw new Error("User not signed-in");const{accountSwitchBegin:o}=r.subscribeTo(Dv.fp),i=e=>t(e.pbxId);return o.on(i),()=>o.removeListener(i)})(e.subscriptionOptions,t);case Hee.event:return(async(e,t)=>{const{eventBus:r,presence:n,user:o}=(0,Dv.Z)();if(!o.key)throw new Error("User not signed-in");if(!n)throw new Error("Presence service is not available");const i=o.key,{userPresenceUpdate:s}=r.subscribeTo(Dv.s),a=e=>t((e=>({appearance:e.appearance?Wee(e.appearance):void 0,userAppearance:e.userAppearance?Kee(e.userAppearance):void 0,status:e.status?qee(e.status):void 0,userNote:e.userNote}))(e));return s.addListener(a),await n.subscribe(i),()=>{n.unsubscribe(i),s.removeListener(a)}})(e.subscriptionOptions,t)}return Promise.reject(new Error(`Unknown subscription request event: ${e.event}`))};var Yee;function Jee(e,t,r){function n(r,n){if(r._zod||Object.defineProperty(r,"_zod",{value:{def:n,constr:s,traits:new Set},enumerable:!1}),r._zod.traits.has(e))return;r._zod.traits.add(e),t(r,n);const o=s.prototype,i=Object.keys(o);for(let e=0;e<i.length;e++){const t=i[e];t in r||(r[t]=o[t].bind(r))}}const o=r?.Parent??Object;class i extends o{}function s(e){var t;const o=r?.Parent?new i:this;n(o,e),(t=o._zod).deferred??(t.deferred=[]);for(const e of o._zod.deferred)e();return o}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:t=>!!(r?.Parent&&t instanceof r.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class Qee extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Xee extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(Yee=globalThis).__zod_globalConfig??(Yee.__zod_globalConfig={});const ete=globalThis.__zod_globalConfig;function tte(e){return ete}function rte(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,r])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function nte(e,t){return"bigint"==typeof t?t.toString():t}function ote(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ite(e){return null==e}function ste(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}const ate=Symbol("evaluating");function lte(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==ate)return void 0===n&&(n=ate,n=r()),n},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function cte(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function dte(...e){const t={};for(const r of e){const e=Object.getOwnPropertyDescriptors(r);Object.assign(t,e)}return Object.defineProperties({},t)}function ute(e){return JSON.stringify(e)}const hte="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function pte(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const gte=ote(()=>{if(ete.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function fte(e){if(!1===pte(e))return!1;const t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;const r=t.prototype;return!(!1===pte(r)||!1===Object.prototype.hasOwnProperty.call(r,"isPrototypeOf"))}function mte(e){return fte(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const vte=new Set(["string","number","symbol"]);function bte(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yte(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function wte(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}const xte={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function _te(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r<e.issues.length;r++)if(!0!==e.issues[r]?.continue)return!0;return!1}function kte(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r<e.issues.length;r++)if(!1===e.issues[r]?.continue)return!0;return!1}function Cte(e,t){return t.map(t=>{var r;return(r=t).path??(r.path=[]),t.path.unshift(e),t})}function Ste(e){return"string"==typeof e?e:e?.message}function Ete(e,t,r){const n=e.message?e.message:Ste(e.inst?._zod.def?.error?.(e))??Ste(t?.error?.(e))??Ste(r.customError?.(e))??Ste(r.localeError?.(e))??"Invalid input",{inst:o,c
5991ontinue:i,input:s,...a}=e;return a.path??(a.path=[]),a.message=n,t?.reportInput&&(a.input=s),a}function Ite(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function Ate(...e){const[t,r,n]=e;return"string"==typeof t?{message:t,code:"custom",input:r,inst:n}:{...t}}const Tte=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,nte,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ote=Jee("$ZodError",Tte),Lte=Jee("$ZodError",Tte,{Parent:Error}),$te=e=>(t,r,n,o)=>{const i=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Qee;if(s.issues.length){const t=new(o?.Err??e)(s.issues.map(e=>Ete(e,i,tte())));throw hte(t,o?.callee),t}return s.value},Nte=e=>async(t,r,n,o)=>{const i=n?{...n,async:!0}:{async:!0};let s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const t=new(o?.Err??e)(s.issues.map(e=>Ete(e,i,tte())));throw hte(t,o?.callee),t}return s.value},Rte=e=>(t,r,n)=>{const o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new Qee;return i.issues.length?{success:!1,error:new(e??Ote)(i.issues.map(e=>Ete(e,o,tte())))}:{success:!0,data:i.value}},Pte=Rte(Lte),Dte=e=>async(t,r,n)=>{const o=n?{...n,async:!0}:{async:!0};let i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(e=>Ete(e,o,tte())))}:{success:!0,data:i.value}},Mte=Dte(Lte),zte=e=>(t,r,n)=>{const o=n?{...n,direction:"backward"}:{direction:"backward"};return $te(e)(t,r,o)},Fte=e=>(t,r,n)=>$te(e)(t,r,n),Ute=e=>async(t,r,n)=>{const o=n?{...n,direction:"backward"}:{direction:"backward"};return Nte(e)(t,r,o)},Bte=e=>async(t,r,n)=>Nte(e)(t,r,n),Hte=e=>(t,r,n)=>{const o=n?{...n,direction:"backward"}:{direction:"backward"};return Rte(e)(t,r,o)},jte=e=>(t,r,n)=>Rte(e)(t,r,n),Vte=e=>async(t,r,n)=>{const o=n?{...n,direction:"backward"}:{direction:"backward"};return Dte(e)(t,r,o)},Wte=e=>async(t,r,n)=>Dte(e)(t,r,n),Kte=/^[cC][0-9a-z]{6,}$/,qte=/^[0-9a-z]+$/,Gte=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Zte=/^[0-9a-vA-V]{20}$/,Yte=/^[A-Za-z0-9]{27}$/,Jte=/^[a-zA-Z0-9_-]{21}$/,Qte=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Xte=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ere=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,tre=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,rre=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nre=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,ore=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ire=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,sre=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,are=/^[A-Za-z0-9_-]*$/,lre=/^https?$/,cre=/^\+[1-9]\d{6,14}$/,dre="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",ure=new RegExp(`^${dre}$`);function hre(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}const pre=/^-?\d+$/,gre=/^-?\d+(?:\.\d+)?$/,fre=/^(?:true|false)$/i,mre=/^[^A-Z]*$/,vre=/^[^a-z]*$/,bre=Jee("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),yre={number:"number",bigint:"bigint",object:"date"},wre=Jee("$ZodCheckLessThan",(e,t)=>{bre.init(e,t);const r=yre[typeof t.value];e._zod.onattach.push(e=>{const r=e._zod.bag,n=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<n&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),xre=Jee("$ZodCheckGreaterThan",(e,t)=>{bre.init(e,t);const r=yre[typeof t.value];e._zod.onattach.push(e=>{const r=e._zod.bag,n=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>n&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),_re=Jee("$ZodCheckMultipleOf",(e,t)=>{bre.init(e,t),e._zod.onattach.push(e=>{var r;(r=e._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof r.value?r.value%t.value===BigInt(0):0===function(e,t){const r=e/t,n=Math.round(r),o=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<o?0:r-n}(r.value,t.value))||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),kre=Jee("$ZodCheckNumberFormat",(e,t)=>{bre.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,i]=xte[t.format];e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,n.minimum=o,n.maximum=i,r&&(n.pattern=pre)}),e._zod.check=s=>{const a=s.value;if(r){if(!Number.isInteger(a))return void s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,
5991continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}))}a<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Cre=Jee("$ZodCheckMaxLength",(e,t)=>{var r;bre.init(e,t),(r=e._zod.def).when??(r.when=e=>{const t=e.value;return!ite(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const r=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const n=r.value;if(n.length<=t.maximum)return;const o=Ite(n);r.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Sre=Jee("$ZodCheckMinLength",(e,t)=>{var r;bre.init(e,t),(r=e._zod.def).when??(r.when=e=>{const t=e.value;return!ite(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const r=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const n=r.value;if(n.length>=t.minimum)return;const o=Ite(n);r.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Ere=Jee("$ZodCheckLengthEquals",(e,t)=>{var r;bre.init(e,t),(r=e._zod.def).when??(r.when=e=>{const t=e.value;return!ite(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const r=e._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=r=>{const n=r.value,o=n.length;if(o===t.length)return;const i=Ite(n),s=o>t.length;r.issues.push({origin:i,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Ire=Jee("$ZodCheckStringFormat",(e,t)=>{var r,n;bre.init(e,t),e._zod.onattach.push(e=>{const r=e._zod.bag;r.format=t.format,t.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),Are=Jee("$ZodCheckRegex",(e,t)=>{Ire.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Tre=Jee("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=mre),Ire.init(e,t)}),Ore=Jee("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=vre),Ire.init(e,t)}),Lre=Jee("$ZodCheckIncludes",(e,t)=>{bre.init(e,t);const r=bte(t.includes),n=new RegExp("number"==typeof t.position?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),$re=Jee("$ZodCheckStartsWith",(e,t)=>{bre.init(e,t);const r=new RegExp(`^${bte(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Nre=Jee("$ZodCheckEndsWith",(e,t)=>{bre.init(e,t);const r=new RegExp(`.*${bte(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),Rre=Jee("$ZodCheckOverwrite",(e,t)=>{bre.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class Pre{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),r=Math.min(...t.map(e=>e.length-e.trimStart().length)),n=t.map(e=>e.slice(r)).map(e=>" ".repeat(2*this.indent)+e);for(const e of n)this.content.push(e)}compile(){const e=Function,t=this?.args,r=[...(this?.content??[""]).map(e=>`  ${e}`)];return new e(...t,r.join("\n"))}}const Dre={major:4,minor:4,patch:3},Mre=Jee("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Dre;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const t of n)for(const r of t._zod.onattach)r(e);if(0===n.length)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,r)=>{let n,o=_te(e);for(const i of t){if(i._zod.def.when){if(kte(e)||!i._zod.def.when(e))continue}else if(o)continue;const t=e.issues.length,s=i._zod.check(e);if(s instanceof Promise&&!1===r?.async)throw new Qee;if(n||s instanceof Promise)n=(n??Promise.resolve()).then(async()=>{await s,e.issues.length!==t&&(o||(o=_te(e,t)))});else{if(e.issues.length===t)continue;o||(o=_te(e,t))}}return n?n.then(()=>e):e},r=(r,o,i)=>{if(_te(r))return r.aborted=!0,r;const s=t(o,n,i);if(s instanceof Promise){if(!1===i.async)throw new Qee;return s.then(t=>e._zod.parse(t,i))}return e._zod.parse(s,i)};e._zod.run=(o,i)=>{if(i.skipChecks)return e._zod.parse(o,i);if("backward"===i.direction){const t=e._zod.parse({value:o.value,issues:[]},{...i,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,o,i)):r(t,o,i)}const s=e._zod.parse(o,i);if(s instanceof Promise){if(!1===i.async)throw new Qee;return s.then(e=>t(e,n,i))}return t(s,n,i)}}
5991lte(e,"~standard",()=>({validate:t=>{try{const r=Pte(e,t);return r.success?{value:r.data}:{issues:r.error?.issues}}catch{return Mte(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),zre=Jee("$ZodString",(e,t)=>{Mre.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(e=>new RegExp(`^${e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*"}$`))(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return"string"==typeof r.value||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Fre=Jee("$ZodStringFormat",(e,t)=>{Ire.init(e,t),zre.init(e,t)}),Ure=Jee("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Xte),Fre.init(e,t)}),Bre=Jee("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=ere(e))}else t.pattern??(t.pattern=ere());Fre.init(e,t)}),Hre=Jee("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=tre),Fre.init(e,t)}),jre=Jee("$ZodURL",(e,t)=>{Fre.init(e,t),e._zod.check=r=>{try{const n=r.value.trim();if(!t.normalize&&t.protocol?.source===lre.source&&!/^https?:\/\//i.test(n))return void r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});const o=new URL(n);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),void(t.normalize?r.value=o.href:r.value=n)}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Vre=Jee("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Fre.init(e,t)}),Wre=Jee("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Jte),Fre.init(e,t)}),Kre=Jee("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Kte),Fre.init(e,t)}),qre=Jee("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=qte),Fre.init(e,t)}),Gre=Jee("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Gte),Fre.init(e,t)}),Zre=Jee("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Zte),Fre.init(e,t)}),Yre=Jee("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Yte),Fre.init(e,t)}),Jre=Jee("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=hre({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${dre}T(?:${n})$`)}(t)),Fre.init(e,t)}),Qre=Jee("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ure),Fre.init(e,t)}),Xre=Jee("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=function(e){return new RegExp(`^${hre(e)}$`)}(t)),Fre.init(e,t)}),ene=Jee("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Qte),Fre.init(e,t)}),tne=Jee("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=rre),Fre.init(e,t),e._zod.bag.format="ipv4"}),rne=Jee("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=nre),Fre.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),nne=Jee("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ore),Fre.init(e,t)}),one=Jee("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ire),Fre.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(2!==n.length)throw new Error;const[e,t]=n;if(!t)throw new Error;const r=Number(t);if(`${r}`!==t)throw new Error;if(r<0||r>128)throw new Error;new URL(`http://[${e}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function ine(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const sne=Jee("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=sre),Fre.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{ine(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),ane=Jee("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=are),Fre.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{(function(e){if(!are.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return ine(t.padEnd(4*Math.ceil(t.length/4),"="))})(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),lne=Jee("$ZodE164",(e,t)=>{t.pattern??(t.pattern=cre),Fre.init(e,t)}),cne=Jee("$ZodJWT",(e,t)=>{Fre.init(e,t),e._zod.check=r=>{(function(e,t=null){try{const r=e.split(".");if(3!==r.length)return!1;const[n]=r;if(!n)return!1;const o=JSON.parse(atob(n));return!("typ"in o&&"JWT"!==o?.typ||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}})(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),dne=Jee("$ZodNumber",(e,t)=>{Mre.init(e,t),e._zod.pattern=e._zod.bag.pattern??gre,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const o=r.value;if("number"==typeof o&&!Number.isNaN(o)&&Number.isFinite(o))return r;const i="number"==typeof o?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),une=Jee("$ZodNumberFormat",(e,t)=>{kre.init(e,t),dne.init(e,t)}),hne=Jee("$ZodBoolean",(e,t)=>{Mre.init(e,t),e._zod.pattern=fre,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}const o=r.value;return"boolean"==typeof o||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),pne=Jee("$ZodAny",(e,t)=>{Mre.init(e,t),e._zod.parse=e=>e}),gne=Jee("$ZodUnknown",(e,t)=>{Mre.init(e,t),e._zod.parse=e=>e}),fne=Jee("$ZodNever",(e,t)=>{Mre.init(e,t),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function mne(e,t,r){e.issues.length&&t.issues.push(...Cte(r,e.issues)),t.value[r]=e.value}const vne=Jee("$ZodArray",(e,t)=>{Mre.init(e,t),e._zod.parse=(r,n)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);const i=[];for(let e=0;e<o.length;e++){const s=o[e],a=t.element._zod.run({value:s,issues:[]},n);a instanceof Promise?i.push(a.then(t=>mne(t,r,e))):mne(a,r,e)}return i.length?Promise.all(i).then(()=>r):r}});function bne(e,t,r,n,o,i){const s=r in n;if(e.issues.length){if(o&&i&&!s)return;t.issues.push(...Cte(r,e.issues))}s||o?void 0===e.value?s&&(t.value[r]=void 0):t.value[r]=e.value:e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]})}function yne(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const r=function(e){return Object.keys(e).filter(t=>"optional"===e[t]._zod.optin&&"optional"===e[t]._zod.optout)}(e.shape);
5991return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function wne(e,t,r,n,o,i){const s=[],a=o.keySet,l=o.catchall._zod,c=l.def.type,d="optional"===l.optin,u="optional"===l.optout;for(const o in t){if("__proto__"===o||a.has(o))continue;if("never"===c){s.push(o);continue}const i=l.run({value:t[o],issues:[]},n);i instanceof Promise?e.push(i.then(e=>bne(e,r,o,t,d,u))):bne(i,r,o,t,d,u)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}const xne=Jee("$ZodObject",(e,t)=>{if(Mre.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const r={...e};return Object.defineProperty(t,"shape",{value:r}),r}})}const r=ote(()=>yne(t));lte(e._zod,"propValues",()=>{const e=t.shape,r={};for(const t in e){const n=e[t]._zod;if(n.values){r[t]??(r[t]=new Set);for(const e of n.values)r[t].add(e)}}return r});const n=pte,o=t.catchall;let i;e._zod.parse=(t,s)=>{i??(i=r.value);const a=t.value;if(!n(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};const l=[],c=i.shape;for(const e of i.keys){const r=c[e],n="optional"===r._zod.optin,o="optional"===r._zod.optout,i=r._zod.run({value:a[e],issues:[]},s);i instanceof Promise?l.push(i.then(r=>bne(r,t,e,a,n,o))):bne(i,t,e,a,n,o)}return o?wne(l,a,t,s,r.value,e):l.length?Promise.all(l).then(()=>t):t}}),_ne=Jee("$ZodObjectJIT",(e,t)=>{xne.init(e,t);const r=e._zod.parse,n=ote(()=>yne(t));let o;const i=pte,s=!ete.jitless,a=s&&gte.value,l=t.catchall;let c;e._zod.parse=(d,u)=>{c??(c=n.value);const h=d.value;return i(h)?s&&a&&!1===u?.async&&!0!==u.jitless?(o||(o=(e=>{const t=new Pre(["shape","payload","ctx"]),r=n.value,o=e=>{const t=ute(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const i=Object.create(null);let s=0;for(const e of r.keys)i[e]="key_"+s++;t.write("const newResult = {};");for(const n of r.keys){const r=i[n],s=ute(n),a=e[n],l="optional"===a?._zod?.optin,c="optional"===a?._zod?.optout;t.write(`const ${r} = ${o(n)};`),l&&c?t.write(`\n        if (${r}.issues.length) {\n          if (${s} in input) {\n            payload.issues = payload.issues.concat(${r}.issues.map(iss => ({\n              ...iss,\n              path: iss.path ? [${s}, ...iss.path] : [${s}]\n            })));\n          }\n        }\n        \n        if (${r}.value === undefined) {\n          if (${s} in input) {\n            newResult[${s}] = undefined;\n          }\n        } else {\n          newResult[${s}] = ${r}.value;\n        }\n        \n      `):l?t.write(`\n        if (${r}.issues.length) {\n          payload.issues = payload.issues.concat(${r}.issues.map(iss => ({\n            ...iss,\n            path: iss.path ? [${s}, ...iss.path] : [${s}]\n          })));\n        }\n        \n        if (${r}.value === undefined) {\n          if (${s} in input) {\n            newResult[${s}] = undefined;\n          }\n        } else {\n          newResult[${s}] = ${r}.value;\n        }\n        \n      `):t.write(`\n        const ${r}_present = ${s} in input;\n        if (${r}.issues.length) {\n          payload.issues = payload.issues.concat(${r}.issues.map(iss => ({\n            ...iss,\n            path: iss.path ? [${s}, ...iss.path] : [${s}]\n          })));\n        }\n        if (!${r}_present && !${r}.issues.length) {\n          payload.issues.push({\n            code: "invalid_type",\n            expected: "nonoptional",\n            input: undefined,\n            path: [${s}]\n          });\n        }\n\n        if (${r}_present) {\n          if (${r}.value === undefined) {\n            newResult[${s}] = undefined;\n          } else {\n            newResult[${s}] = ${r}.value;\n          }\n        }\n\n      `)}t.write("payload.value = newResult;"),t.write("return payload;");const a=t.compile();return(t,r)=>a(e,t,r)})(t.shape)),d=o(d,u),l?wne([],h,d,u,c,e):d):r(d,u):(d.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),d)}});function kne(e,t,r,n){for(const r of e)if(0===r.issues.length)return t.value=r.value,t;const o=e.filter(e=>!_te(e));return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(e=>e.issues.map(e=>Ete(e,n,tte())))}),t)}const Cne=Jee("$ZodUnion",(e,t)=>{Mre.init(e,t),lte(e._zod,"optin",()=>t.options.some(e=>
5991"optional"===e._zod.optin)?"optional":void 0),lte(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),lte(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),lte(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>ste(e.source)).join("|")})$`)}});const r=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:n.value,issues:[]},o);if(t instanceof Promise)s.push(t),i=!0;else{if(0===t.issues.length)return t;s.push(t)}}return i?Promise.all(s).then(t=>kne(t,n,e,o)):kne(s,n,e,o)}}),Sne=Jee("$ZodIntersection",(e,t)=>{Mre.init(e,t),e._zod.parse=(e,r)=>{const n=e.value,o=t.left._zod.run({value:n,issues:[]},r),i=t.right._zod.run({value:n,issues:[]},r);return o instanceof Promise||i instanceof Promise?Promise.all([o,i]).then(([t,r])=>Ine(e,t,r)):Ine(e,o,i)}});function Ene(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(fte(e)&&fte(t)){const r=Object.keys(t),n=Object.keys(e).filter(e=>-1!==r.indexOf(e)),o={...e,...t};for(const r of n){const n=Ene(e[r],t[r]);if(!n.valid)return{valid:!1,mergeErrorPath:[r,...n.mergeErrorPath]};o[r]=n.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const o=Ene(e[n],t[n]);if(!o.valid)return{valid:!1,mergeErrorPath:[n,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Ine(e,t,r){const n=new Map;let o;for(const r of t.issues)if("unrecognized_keys"===r.code){o??(o=r);for(const e of r.keys)n.has(e)||n.set(e,{}),n.get(e).l=!0}else e.issues.push(r);for(const t of r.issues)if("unrecognized_keys"===t.code)for(const e of t.keys)n.has(e)||n.set(e,{}),n.get(e).r=!0;else e.issues.push(t);const i=[...n].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(i.length&&o&&e.issues.push({...o,keys:i}),_te(e))return e;const s=Ene(t.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const Ane=Jee("$ZodEnum",(e,t)=>{Mre.init(e,t);const r=rte(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(e=>vte.has(typeof e)).map(e=>"string"==typeof e?bte(e):e.toString()).join("|")})$`),e._zod.parse=(t,o)=>{const i=t.value;return n.has(i)||t.issues.push({code:"invalid_value",values:r,input:i,inst:e}),t}}),Tne=Jee("$ZodTransform",(e,t)=>{Mre.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if("backward"===n.direction)throw new Xee(e.constructor.name);const o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(r.value=e,r.fallback=!0,r));if(o instanceof Promise)throw new Qee;return r.value=o,r.fallback=!0,r}});function One(e,t){return void 0===t&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Lne=Jee("$ZodOptional",(e,t)=>{Mre.init(e,t),e._zod.optin="optional",e._zod.optout="optional",lte(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),lte(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${ste(e.source)})?$`):void 0}),e._zod.parse=(e,r)=>{if("optional"===t.innerType._zod.optin){const n=e.value,o=t.innerType._zod.run(e,r);return o instanceof Promise?o.then(e=>One(e,n)):One(o,n)}return void 0===e.value?e:t.innerType._zod.run(e,r)}}),$ne=Jee("$ZodExactOptional",(e,t)=>{Lne.init(e,t),lte(e._zod,"values",()=>t.innerType._zod.values),lte(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,r)=>t.innerType._zod.run(e,r)}),Nne=Jee("$ZodNullable",(e,t)=>{Mre.init(e,t),lte(e._zod,"optin",()=>t.innerType._zod.optin),lte(e._zod,"optout",()=>t.innerType._zod.optout),lte(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${ste(e.source)}|null)$`):void 0}),lte(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,r)=>null===e.value?e:t.innerType._zod.run(e,r)}),Rne=Jee("$ZodDefault",(e,t)=>{Mre.init(e,t),e._zod.optin="optional",lte(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);if(void 0===e.value)return e.value=t.defaultValue,e;const n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(e=>Pne(e,t)):Pne(n,t)}});function Pne(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Dne=Jee("$ZodPrefault",(e,t)=>{Mre.init(e,t),e._zod.optin="optional",lte(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>("backward"===r.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,r))}),Mne=Jee("$ZodNonOptional",(e,t)=>{Mre.init(e,t),lte(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(t=>zne(t,e)):zne(o,e)}});function zne(e,t){return!e.issues.length&&void 0===e.value&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Fne=Jee("$ZodCatch",(e,t)=>{Mre.init(e,t),e._zod.optin="optional",lte(e._zod,"optout",()=>t.innerType._zod.optout),lte(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);const n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(n=>
5991(e.value=n.value,n.issues.length&&(e.value=t.catchValue({...e,error:{issues:n.issues.map(e=>Ete(e,r,tte()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=n.value,n.issues.length&&(e.value=t.catchValue({...e,error:{issues:n.issues.map(e=>Ete(e,r,tte()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Une=Jee("$ZodPipe",(e,t)=>{Mre.init(e,t),lte(e._zod,"values",()=>t.in._zod.values),lte(e._zod,"optin",()=>t.in._zod.optin),lte(e._zod,"optout",()=>t.out._zod.optout),lte(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,r)=>{if("backward"===r.direction){const n=t.out._zod.run(e,r);return n instanceof Promise?n.then(e=>Bne(e,t.in,r)):Bne(n,t.in,r)}const n=t.in._zod.run(e,r);return n instanceof Promise?n.then(e=>Bne(e,t.out,r)):Bne(n,t.out,r)}});function Bne(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}const Hne=Jee("$ZodReadonly",(e,t)=>{Mre.init(e,t),lte(e._zod,"propValues",()=>t.innerType._zod.propValues),lte(e._zod,"values",()=>t.innerType._zod.values),lte(e._zod,"optin",()=>t.innerType?._zod?.optin),lte(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);const n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(jne):jne(n)}});function jne(e){return e.value=Object.freeze(e.value),e}const Vne=Jee("$ZodCustom",(e,t)=>{bre.init(e,t),Mre.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=r=>{const n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(t=>Wne(t,r,n,e));Wne(o,r,n,e)}});function Wne(e,t,r,n){if(!e){const e={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(e.params=n._zod.def.params),t.issues.push(Ate(e))}}var Kne;(Kne=globalThis).__zod_globalRegistry??(Kne.__zod_globalRegistry=new class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const r=t[0];return this._map.set(e,r),r&&"object"==typeof r&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const r={...this.get(t)??{}};delete r.id;const n={...r,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});const qne=globalThis.__zod_globalRegistry;function Gne(e,t){return new e({type:"string",...wte(t)})}function Zne(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...wte(t)})}function Yne(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...wte(t)})}function Jne(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...wte(t)})}function Qne(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...wte(t)})}function Xne(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...wte(t)})}function eoe(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...wte(t)})}function toe(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...wte(t)})}function roe(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...wte(t)})}function noe(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...wte(t)})}function ooe(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...wte(t)})}function ioe(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...wte(t)})}function soe(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...wte(t)})}function aoe(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...wte(t)})}function loe(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...wte(t)})}function coe(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...wte(t)})}function doe(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...wte(t)})}function uoe(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...wte(t)})}function hoe(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...wte(t)})}function poe(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...wte(t)})}function goe(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...wte(t)})}function foe(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...wte(t)})}function moe(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...wte(t)})}function voe(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...wte(t)})}function boe(e,t){return new e({type:"string",format:"date",check:"string_format",...wte(t)})}function yoe(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...wte(t)})}function woe(e,t){return new e({type:"string",format:"duration",check:"string_format",...wte(t)})}function xoe(e,t){return new e({type:"number",checks:[],...wte(t)})}function _oe(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...wte(t)})}function koe(e,t){return new e({type:"boolean",...wte(t)})}function Coe(e){return new e({type:"any"})}function Soe(e){return new e({type:"unknown"})}function Eoe(e,t){return new e({type:"never",...wte(t)})}function Ioe(e,t){return new wre({check:"less_than",...wte(t),value:e,inclusive:!1})}function Aoe(e,t){return new wre({check:"less_than",...wte(t),value:e,inclusive:!0})}function Toe(e,t){return new xre({check:"greater_than",...wte(t),value:e,inclusive:!1})}function Ooe(e,t){return new xre({check:"greater_than",...wte(t),value:e,inclusive:!0})}function Loe(e,t){return new _re({check:"multiple_of",...wte(t),value:e})}function $oe(e,t){return new Cre({check:"max_length",...wte(t),maximum:e})}function Noe(e,t){return new Sre({check:"min_length",...wte(t),minimum:e})}function Roe(e,t){return new Ere({check:"length_equals",...wte(t),length:e})}function Poe(e,t){return new Are({check:"string_format",format:"regex",...wte(t),pattern:e})}function Doe(e){return new Tre({check:"string_format",format:"lowercase",...wte(e)})}function Moe(e){return new Ore({check:"string_format",format:"up
5991percase",...wte(e)})}function zoe(e,t){return new Lre({check:"string_format",format:"includes",...wte(t),includes:e})}function Foe(e,t){return new $re({check:"string_format",format:"starts_with",...wte(t),prefix:e})}function Uoe(e,t){return new Nre({check:"string_format",format:"ends_with",...wte(t),suffix:e})}function Boe(e){return new Rre({check:"overwrite",tx:e})}function Hoe(e){return Boe(t=>t.normalize(e))}function joe(){return Boe(e=>e.trim())}function Voe(){return Boe(e=>e.toLowerCase())}function Woe(){return Boe(e=>e.toUpperCase())}function Koe(){return Boe(e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e))}function qoe(e,t,r){return new e({type:"array",element:t,...wte(r)})}function Goe(e,t,r){return new e({type:"custom",check:"custom",fn:t,...wte(r)})}function Zoe(e,t){const r=Yoe(t=>(t.addIssue=e=>{if("string"==typeof e)t.issues.push(Ate(e,t.value,r._zod.def));else{const n=e;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=t.value),n.inst??(n.inst=r),n.continue??(n.continue=!r._zod.def.abort),t.issues.push(Ate(n))}},e(t.value,t)),t);return r}function Yoe(e,t){const r=new bre({check:"custom",...wte(t)});return r._zod.check=e,r}function Joe(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??qne,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Qoe(e,t,r={path:[],schemaPath:[]}){var n;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;const s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const n={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,n);else{const r=s.schema,i=t.processors[o.type];if(!i)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);i(e,t,r,n)}const i=e._zod.parent;i&&(s.ref||(s.ref=i),Qoe(i,t,n),t.seen.get(i).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(s.schema,l),"input"===t.io&&tie(e)&&(delete s.schema.examples,delete s.schema.default),"input"===t.io&&"_prefault"in s.schema&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function Xoe(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const t of e.seen.entries()){const r=e.metadataRegistry.get(t[0])?.id;if(r){const e=n.get(r);if(e&&e!==t[0])throw new Error(`Duplicate schema id "${r}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(r,t[0])}}const o=t=>{if(t[1].schema.$ref)return;const n=t[1],{ref:o,defId:i}=(t=>{const n="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){const r=e.external.registry.get(t[0])?.id,o=e.external.uri??(e=>e);if(r)return{ref:o(r)};const i=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=i,{defId:i,ref:`${o("__shared")}#/${n}/${i}`}}if(t[1]===r)return{ref:"#"};const o=`#/${n}/`,i=t[1].schema.id??"__schema"+e.counter++;return{defId:i,ref:o+i}})(t);n.def={...n.schema},i&&(n.defId=i);const s=n.schema;for(const e in s)delete s[e];s.$ref=o};if("throw"===e.cycles)for(const t of e.seen.entries()){const e=t[1];if(e.cycle)throw new Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const r of e.seen.entries()){const n=r[1];if(t!==r[0]){if(e.external){const n=e.external.registry.get(r[0])?.id;if(t!==r[0]&&n){o(r);continue}}(e.metadataRegistry.get(r[0])?.id||n.cycle||n.count>1&&"ref"===e.reused)&&o(r)}else o(r)}}function eie(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=t=>{const r=e.seen.get(t);if(null===r.ref)return;const o=r.def??r.schema,i={...o},s=r.ref;if(r.ref=null,s){n(s);const r=e.seen.get(s),a=r.schema;if(!a.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?Object.assign(o,a):(o.allOf=o.allOf??[],o.allOf.push(a)),Object.assign(o,i),t._zod.parent===s)for(const e in o)"$ref"===e||"allOf"===e||e in i||delete o[e];if(a.$ref&&r.def)for(const e in o)"$ref"===e||"allOf"===e||e in r.def&&JSON.stringify(o[e])===JSON.stringify(r.def[e])&&delete o[e]}const a=t._zod.parent;if(a&&a!==s){n(a);const t=e.seen.get(a);if(t?.schema.$ref&&(o.$ref=t.schema.$ref,t.def))for(const e in o)"$ref"===e||"allOf"===e||e in t.def&&JSON.stringify(o[e])===JSON.stringify(t.def[e])&&delete o[e]}e.override({zodSchema:t,jsonSchema:o,path:r.path??[]})};for(const t of[...e.seen.entries()].reverse())n(t[0]);const o={};
5991if("draft-2020-12"===e.target?o.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?o.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const r=e.external.registry.get(t)?.id;if(!r)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(r)}Object.assign(o,r.def??r.schema);const i=e.metadataRegistry.get(t)?.id;void 0!==i&&o.id===i&&delete o.id;const s=e.external?.defs??{};for(const t of e.seen.entries()){const e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,s[e.defId]=e.def)}e.external||Object.keys(s).length>0&&("draft-2020-12"===e.target?o.$defs=s:o.definitions=s);try{const r=JSON.parse(JSON.stringify(o));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:rie(t,"input",e.processors),output:rie(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch{throw new Error("Error converting schema to JSON.")}}function tie(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if("transform"===n.type)return!0;if("array"===n.type)return tie(n.element,r);if("set"===n.type)return tie(n.valueType,r);if("lazy"===n.type)return tie(n.getter(),r);if("promise"===n.type||"optional"===n.type||"nonoptional"===n.type||"nullable"===n.type||"readonly"===n.type||"default"===n.type||"prefault"===n.type)return tie(n.innerType,r);if("intersection"===n.type)return tie(n.left,r)||tie(n.right,r);if("record"===n.type||"map"===n.type)return tie(n.keyType,r)||tie(n.valueType,r);if("pipe"===n.type)return!!e._zod.traits.has("$ZodCodec")||tie(n.in,r)||tie(n.out,r);if("object"===n.type){for(const e in n.shape)if(tie(n.shape[e],r))return!0;return!1}if("union"===n.type){for(const e of n.options)if(tie(e,r))return!0;return!1}if("tuple"===n.type){for(const e of n.items)if(tie(e,r))return!0;return!(!n.rest||!tie(n.rest,r))}return!1}const rie=(e,t,r={})=>n=>{const{libraryOptions:o,target:i}=n??{},s=Joe({...o??{},target:i,io:t,processors:r});return Qoe(e,s),Xoe(s,e),eie(s,e)},nie={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},oie=(e,t,r,n)=>{const o=e._zod.def;Qoe(o.innerType,t,n),t.seen.get(e).ref=o.innerType},iie=Jee("ZodISODateTime",(e,t)=>{Jre.init(e,t),Tie.init(e,t)}),sie=Jee("ZodISODate",(e,t)=>{Qre.init(e,t),Tie.init(e,t)}),aie=Jee("ZodISOTime",(e,t)=>{Xre.init(e,t),Tie.init(e,t)}),lie=Jee("ZodISODuration",(e,t)=>{ene.init(e,t),Tie.init(e,t)}),cie=(e,t)=>{Ote.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t=e=>e.message){const r={_errors:[]},n=(e,o=[])=>{for(const i of e.issues)if("invalid_union"===i.code&&i.errors.length)i.errors.map(e=>n({issues:e},[...o,...i.path]));else if("invalid_key"===i.code)n({issues:i.issues},[...o,...i.path]);else if("invalid_element"===i.code)n({issues:i.issues},[...o,...i.path]);else{const e=[...o,...i.path];if(0===e.length)r._errors.push(t(i));else{let n=r,o=0;for(;o<e.length;){const r=e[o];o===e.length-1?(n[r]=n[r]||{_errors:[]},n[r]._errors.push(t(i))):n[r]=n[r]||{_errors:[]},n=n[r],o++}}}};return n(e),r}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const r={},n=[];for(const o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,nte,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,nte,2)}},isEmpty:{get(){return 0===e.issues.length}}})},die=Jee("ZodError",cie,{Parent:Error}),uie=$te(die),hie=Nte(die),pie=Rte(die),gie=Dte(die),fie=zte(die),mie=Fte(die),vie=Ute(die),bie=Bte(die),yie=Hte(die),wie=jte(die),xie=Vte(die),_ie=Wte(die),kie=new WeakMap;function Cie(e,t,r){const n=Object.getPrototypeOf(e);let o=kie.get(n);if(o||(o=new Set,kie.set(n,o)),!o.has(t)){o.add(t);for(const e in r){const t=r[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,get(){const r=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:r}),r},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}const Sie=Jee("ZodType",(e,t)=>(Mre.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:rie(e,"input"),output:rie(e,"output")}}),e.toJSONSchema=((e,t={})=>r=>{const n=Joe({...r,processors:t});return Qoe(e,n),Xoe(n,e),eie(n,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,r)=>uie(e,t,r,{callee:e.parse}),e.safeParse=(t,r)=>pie(e,t,r),e.parseAsync=async(t,r)=>hie(e,t,r,{callee:e.parseAsync}),e.safeParseAsync=async(t,r)=>gie(e,t,r),e.spa=e.safeParseAsync,e.encode=(t,r)=>fie(e,t,r),e.decode=(t,r)=>mie(e,t,r),e.encodeAsync=async(t,r)=>vie(e,t,r),e.decodeAsync=async(t,r)=>bie(e,t,r),e.safeEncode=(t,r)=>yie(e,t,r),e.safeDecode=(t,r)=>wie(e,t,r),e.safeEncodeAsync=async(t,r)=>xie(e,t,r),e.safeDecodeAsync=async(t,r)=>_ie(e,t,r),Cie(e,"ZodType",{check(...e){const t=this.def;return this.clone(dte(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)}
5991,clone(e,t){return yte(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return Goe(Ise,e,t)}(e,t))},superRefine(e,t){return this.check(function(e,t){return Zoe(e,t)}(e,t))},overwrite(e){return this.check(Boe(e))},optional(){return mse(this)},exactOptional(){return function(e){return new vse({type:"optional",innerType:e})}(this)},nullable(){return yse(this)},nullish(){return mse(yse(this))},nonoptional(e){return function(e,t){return new _se({type:"nonoptional",innerType:e,...wte(t)})}(this,e)},array(){return ase(this)},or(e){return function(e){return new dse({type:"union",options:e,...wte(void 0)})}([this,e])},and(e){return function(e,t){return new use({type:"intersection",left:e,right:t})}(this,e)},transform(e){return Sse(this,function(e){return new gse({type:"transform",transform:e})}(e))},default(e){return function(e,t){return new wse({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():mte(t)}})}(this,e)},prefault(e){return function(e,t){return new xse({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():mte(t)}})}(this,e)},catch(e){return function(e,t){return new kse({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}(this,e)},pipe(e){return Sse(this,e)},readonly(){return function(e){return new Ese({type:"readonly",innerType:e})}(this)},describe(e){const t=this.clone();return qne.add(t,{description:e}),t},meta(...e){if(0===e.length)return qne.get(this);const t=this.clone();return qne.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return qne.get(e)?.description},configurable:!0}),e)),Eie=Jee("_ZodString",(e,t)=>{zre.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r)=>{const n=r;n.type="string";const{minimum:o,maximum:i,format:s,patterns:a,contentEncoding:l}=e._zod.bag;if("number"==typeof o&&(n.minLength=o),"number"==typeof i&&(n.maxLength=i),s&&(n.format=nie[s]??s,""===n.format&&delete n.format,"time"===s&&delete n.format),l&&(n.contentEncoding=l),a&&a.size>0){const e=[...a];1===e.length?n.pattern=e[0].source:e.length>1&&(n.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,r);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Cie(e,"_ZodString",{regex(...e){return this.check(Poe(...e))},includes(...e){return this.check(zoe(...e))},startsWith(...e){return this.check(Foe(...e))},endsWith(...e){return this.check(Uoe(...e))},min(...e){return this.check(Noe(...e))},max(...e){return this.check($oe(...e))},length(...e){return this.check(Roe(...e))},nonempty(...e){return this.check(Noe(1,...e))},lowercase(e){return this.check(Doe(e))},uppercase(e){return this.check(Moe(e))},trim(){return this.check(joe())},normalize(...e){return this.check(Hoe(...e))},toLowerCase(){return this.check(Voe())},toUpperCase(){return this.check(Woe())},slugify(){return this.check(Koe())}})}),Iie=Jee("ZodString",(e,t)=>{zre.init(e,t),Eie.init(e,t),e.email=t=>e.check(Zne(Oie,t)),e.url=t=>e.check(toe(Nie,t)),e.jwt=t=>e.check(moe(Gie,t)),e.emoji=t=>e.check(roe(Rie,t)),e.guid=t=>e.check(Yne(Lie,t)),e.uuid=t=>e.check(Jne($ie,t)),e.uuidv4=t=>e.check(Qne($ie,t)),e.uuidv6=t=>e.check(Xne($ie,t)),e.uuidv7=t=>e.check(eoe($ie,t)),e.nanoid=t=>e.check(noe(Pie,t)),e.guid=t=>e.check(Yne(Lie,t)),e.cuid=t=>e.check(ooe(Die,t)),e.cuid2=t=>e.check(ioe(Mie,t)),e.ulid=t=>e.check(soe(zie,t)),e.base64=t=>e.check(poe(Wie,t)),e.base64url=t=>e.check(goe(Kie,t)),e.xid=t=>e.check(aoe(Fie,t)),e.ksuid=t=>e.check(loe(Uie,t)),e.ipv4=t=>e.check(coe(Bie,t)),e.ipv6=t=>e.check(doe(Hie,t)),e.cidrv4=t=>e.check(uoe(jie,t)),e.cidrv6=t=>e.check(hoe(Vie,t)),e.e164=t=>e.check(foe(qie,t)),e.datetime=t=>e.check(function(e){return voe(iie,e)}(t)),e.date=t=>e.check(function(e){return boe(sie,e)}(t)),e.time=t=>e.check(function(e){return yoe(aie,e)}(t)),e.duration=t=>e.check(function(e){return woe(lie,e)}
5991(t))});function Aie(e){return Gne(Iie,e)}const Tie=Jee("ZodStringFormat",(e,t)=>{Fre.init(e,t),Eie.init(e,t)}),Oie=Jee("ZodEmail",(e,t)=>{Hre.init(e,t),Tie.init(e,t)}),Lie=Jee("ZodGUID",(e,t)=>{Ure.init(e,t),Tie.init(e,t)}),$ie=Jee("ZodUUID",(e,t)=>{Bre.init(e,t),Tie.init(e,t)}),Nie=Jee("ZodURL",(e,t)=>{jre.init(e,t),Tie.init(e,t)}),Rie=Jee("ZodEmoji",(e,t)=>{Vre.init(e,t),Tie.init(e,t)}),Pie=Jee("ZodNanoID",(e,t)=>{Wre.init(e,t),Tie.init(e,t)}),Die=Jee("ZodCUID",(e,t)=>{Kre.init(e,t),Tie.init(e,t)}),Mie=Jee("ZodCUID2",(e,t)=>{qre.init(e,t),Tie.init(e,t)}),zie=Jee("ZodULID",(e,t)=>{Gre.init(e,t),Tie.init(e,t)}),Fie=Jee("ZodXID",(e,t)=>{Zre.init(e,t),Tie.init(e,t)}),Uie=Jee("ZodKSUID",(e,t)=>{Yre.init(e,t),Tie.init(e,t)}),Bie=Jee("ZodIPv4",(e,t)=>{tne.init(e,t),Tie.init(e,t)}),Hie=Jee("ZodIPv6",(e,t)=>{rne.init(e,t),Tie.init(e,t)}),jie=Jee("ZodCIDRv4",(e,t)=>{nne.init(e,t),Tie.init(e,t)}),Vie=Jee("ZodCIDRv6",(e,t)=>{one.init(e,t),Tie.init(e,t)}),Wie=Jee("ZodBase64",(e,t)=>{sne.init(e,t),Tie.init(e,t)}),Kie=Jee("ZodBase64URL",(e,t)=>{ane.init(e,t),Tie.init(e,t)}),qie=Jee("ZodE164",(e,t)=>{lne.init(e,t),Tie.init(e,t)}),Gie=Jee("ZodJWT",(e,t)=>{cne.init(e,t),Tie.init(e,t)}),Zie=Jee("ZodNumber",(e,t)=>{dne.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r)=>{const n=r,{minimum:o,maximum:i,format:s,multipleOf:a,exclusiveMaximum:l,exclusiveMinimum:c}=e._zod.bag;"string"==typeof s&&s.includes("int")?n.type="integer":n.type="number";const d="number"==typeof c&&c>=(o??Number.NEGATIVE_INFINITY),u="number"==typeof l&&l<=(i??Number.POSITIVE_INFINITY),h="draft-04"===t.target||"openapi-3.0"===t.target;d?h?(n.minimum=c,n.exclusiveMinimum=!0):n.exclusiveMinimum=c:"number"==typeof o&&(n.minimum=o),u?h?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l:"number"==typeof i&&(n.maximum=i),"number"==typeof a&&(n.multipleOf=a)})(e,t,r),Cie(e,"ZodNumber",{gt(e,t){return this.check(Toe(e,t))},gte(e,t){return this.check(Ooe(e,t))},min(e,t){return this.check(Ooe(e,t))},lt(e,t){return this.check(Ioe(e,t))},lte(e,t){return this.check(Aoe(e,t))},max(e,t){return this.check(Aoe(e,t))},int(e){return this.check(Qie(e))},safe(e){return this.check(Qie(e))},positive(e){return this.check(Toe(0,e))},nonnegative(e){return this.check(Ooe(0,e))},negative(e){return this.check(Ioe(0,e))},nonpositive(e){return this.check(Aoe(0,e))},multipleOf(e,t){return this.check(Loe(e,t))},step(e,t){return this.check(Loe(e,t))},finite(){return this}});const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Yie(e){return xoe(Zie,e)}const Jie=Jee("ZodNumberFormat",(e,t)=>{une.init(e,t),Zie.init(e,t)});function Qie(e){return _oe(Jie,e)}const Xie=Jee("ZodBoolean",(e,t)=>{hne.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(e,t,r)=>((e,t,r)=>{r.type="boolean"})(0,0,t)});function ese(e){return koe(Xie,e)}const tse=Jee("ZodAny",(e,t)=>{pne.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(e,t,r)=>{}}),rse=Jee("ZodUnknown",(e,t)=>{gne.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(e,t,r)=>{}});function nse(){return Soe(rse)}const ose=Jee("ZodNever",(e,t)=>{fne.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(e,t,r)=>((e,t,r)=>{r.not={}})(0,0,t)});function ise(e){return Eoe(ose,e)}const sse=Jee("ZodArray",(e,t)=>{vne.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{const o=r,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;"number"==typeof s&&(o.minItems=s),"number"==typeof a&&(o.maxItems=a),o.type="array",o.items=Qoe(i.element,t,{...n,path:[...n.path,"items"]})})(e,t,r,n),e.element=t.element,Cie(e,"ZodArray",{min(e,t){return this.check(Noe(e,t))},nonempty(e){return this.check(Noe(1,e))},max(e,t){return this.check($oe(e,t))},length(e,t){return this.check(Roe(e,t))},unwrap(){return this.element}})});function ase(e,t){return qoe(sse,e,t)}const lse=Jee("ZodObject",(e,t)=>{_ne.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{const o=r,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const e in s)o.properties[e]=Qoe(s[e],t,{...n,path:[...n.path,"properties",e]});const a=new Set(Object.keys(s)),l=new Set([...a].filter(e=>{const r=i.shape[e]._zod;return"input"===t.io?void 0===r.optin:void 0===r.optout}));l.size>0&&(o.required=Array.from(l)),"never"===i.catchall?._zod.def.type?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=Qoe(i.cat
5991chall,t,{...n,path:[...n.path,"additionalProperties"]})):"output"===t.io&&(o.additionalProperties=!1)})(e,t,r,n),lte(e,"shape",()=>t.shape),Cie(e,"ZodObject",{keyof(){return pse(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:nse()})},loose(){return this.clone({...this._zod.def,catchall:nse()})},strict(){return this.clone({...this._zod.def,catchall:ise()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return function(e,t){if(!fte(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const r=e._zod.def.shape;for(const e in t)if(void 0!==Object.getOwnPropertyDescriptor(r,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const n=dte(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return cte(this,"shape",r),r}});return yte(e,n)}(this,e)},safeExtend(e){return function(e,t){if(!fte(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=dte(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return cte(this,"shape",r),r}});return yte(e,r)}(this,e)},merge(e){return function(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const r=dte(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return cte(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return yte(e,r)}(this,e)},pick(e){return function(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=dte(e._zod.def,{get shape(){const e={};for(const n in t){if(!(n in r.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&(e[n]=r.shape[n])}return cte(this,"shape",e),e},checks:[]});return yte(e,o)}(this,e)},omit(e){return function(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=dte(e._zod.def,{get shape(){const n={...e._zod.def.shape};for(const e in t){if(!(e in r.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete n[e]}return cte(this,"shape",n),n},checks:[]});return yte(e,o)}(this,e)},partial(...e){return function(e,t,r){const n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=dte(t._zod.def,{get shape(){const n=t._zod.def.shape,o={...n};if(r)for(const t in r){if(!(t in n))throw new Error(`Unrecognized key: "${t}"`);r[t]&&(o[t]=e?new e({type:"optional",innerType:n[t]}):n[t])}else for(const t in n)o[t]=e?new e({type:"optional",innerType:n[t]}):n[t];return cte(this,"shape",o),o},checks:[]});return yte(t,o)}(fse,this,e[0])},required(...e){return function(e,t,r){const n=dte(t._zod.def,{get shape(){const n=t._zod.def.shape,o={...n};if(r)for(const t in r){if(!(t in o))throw new Error(`Unrecognized key: "${t}"`);r[t]&&(o[t]=new e({type:"nonoptional",innerType:n[t]}))}else for(const t in n)o[t]=new e({type:"nonoptional",innerType:n[t]});return cte(this,"shape",o),o}});return yte(t,n)}(_se,this,e[0])}})});function cse(e,t){const r={type:"object",shape:e??{},...wte(t)};return new lse(r)}const dse=Jee("ZodUnion",(e,t)=>{Cne.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{const o=e._zod.def,i=!1===o.inclusive,s=o.options.map((e,r)=>Qoe(e,t,{...n,path:[...n.path,i?"oneOf":"anyOf",r]}));i?r.oneOf=s:r.anyOf=s})(e,t,r,n),e.options=t.options}),use=Jee("ZodIntersection",(e,t)=>{Sne.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{const o=e._zod.def,i=Qoe(o.left,t,{...n,path:[...n.path,"allOf",0]}),s=Qoe(o.right,t,{...n,path:[...n.path,"allOf",1]}),a=e=>"allOf"in e&&1===Object.keys(e).length,l=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];r.allOf=l})(e,t,r,n)}),hse=Jee("ZodEnum",(e,t)=>{Ane.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r)=>{const n=rte(e._zod.def.entries);n.every(e=>"number"==typeof e)&&(r.type="number"),n.every(e=>"string"==typeof e)&&(r.type="string"),r.enum=n})(e,0,r),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(e,n)=>{const o={};for(const n of e){if(!r.has(n))throw new Error(`Key ${n} not found in enum`);o[n]=t.entries[n]}
5991return new hse({...t,checks:[],...wte(n),entries:o})},e.exclude=(e,n)=>{const o={...t.entries};for(const t of e){if(!r.has(t))throw new Error(`Key ${t} not found in enum`);delete o[t]}return new hse({...t,checks:[],...wte(n),entries:o})}});function pse(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new hse({type:"enum",entries:r,...wte(t)})}const gse=Jee("ZodTransform",(e,t)=>{Tne.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(e,t,r)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema")})(0,e),e._zod.parse=(r,n)=>{if("backward"===n.direction)throw new Xee(e.constructor.name);r.addIssue=n=>{if("string"==typeof n)r.issues.push(Ate(n,r.value,t));else{const t=n;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=r.value),t.inst??(t.inst=e),r.issues.push(Ate(t))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(e=>(r.value=e,r.fallback=!0,r)):(r.value=o,r.fallback=!0,r)}}),fse=Jee("ZodOptional",(e,t)=>{Lne.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(t,r,n)=>oie(e,t,0,n),e.unwrap=()=>e._zod.def.innerType});function mse(e){return new fse({type:"optional",innerType:e})}const vse=Jee("ZodExactOptional",(e,t)=>{$ne.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(t,r,n)=>oie(e,t,0,n),e.unwrap=()=>e._zod.def.innerType}),bse=Jee("ZodNullable",(e,t)=>{Nne.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{const o=e._zod.def,i=Qoe(o.innerType,t,n),s=t.seen.get(e);"openapi-3.0"===t.target?(s.ref=o.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]})(e,t,r,n),e.unwrap=()=>e._zod.def.innerType});function yse(e){return new bse({type:"nullable",innerType:e})}const wse=Jee("ZodDefault",(e,t)=>{Rne.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{const o=e._zod.def;Qoe(o.innerType,t,n),t.seen.get(e).ref=o.innerType,r.default=JSON.parse(JSON.stringify(o.defaultValue))})(e,t,r,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),xse=Jee("ZodPrefault",(e,t)=>{Dne.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{const o=e._zod.def;Qoe(o.innerType,t,n),t.seen.get(e).ref=o.innerType,"input"===t.io&&(r._prefault=JSON.parse(JSON.stringify(o.defaultValue)))})(e,t,r,n),e.unwrap=()=>e._zod.def.innerType}),_se=Jee("ZodNonOptional",(e,t)=>{Mne.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{const o=e._zod.def;Qoe(o.innerType,t,n),t.seen.get(e).ref=o.innerType})(e,t,0,n),e.unwrap=()=>e._zod.def.innerType}),kse=Jee("ZodCatch",(e,t)=>{Fne.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{const o=e._zod.def;let i;Qoe(o.innerType,t,n),t.seen.get(e).ref=o.innerType;try{i=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=i})(e,t,r,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),Cse=Jee("ZodPipe",(e,t)=>{Une.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{const o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s="input"===t.io?i?o.out:o.in:o.out;Qoe(s,t,n),t.seen.get(e).ref=s})(e,t,0,n),e.in=t.in,e.out=t.out});function Sse(e,t){return new Cse({type:"pipe",in:e,out:t})}const Ese=Jee("ZodReadonly",(e,t)=>{Hne.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{const o=e._zod.def;Qoe(o.innerType,t,n),t.seen.get(e).ref=o.innerType,r.readOnly=!0})(e,t,r,n),e.unwrap=()=>e._zod.def.innerType}),Ise=Jee("ZodCustom",(e,t)=>{Vne.init(e,t),Sie.init(e,t),e._zod.processJSONSchema=(e,t,r)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")})(0,e)}),Ase=cse({hostname:Aie(),product:Aie(),deviceBrand:Aie().optional(),deviceModel:Aie().optional(),osName:Aie().optional(),osVersion:Aie().optional()}),Tse=cse({key:Aie(),values:ase(Aie())});cse({cachedAccountKey:Aie().optional(),accountSettingQueries:ase(Tse),policyDecisionPointChecks:ase(Coe(tse)).optional(),featureFlagsParams:Ase});const Ose=cse({purpose:Aie(),action:Aie(),resourceType:Aie(),resourceId:Aie().nullable()});cse({accountKey:Aie(),checks:ase(Ose).nonempty()}),cse({application:Aie().min(1,{message:"Application must not be empty"}).trim().refine(e=>/^[a-zA-Z0-9_-]+$/.test(e),{message:"Application can only contain letters, numbers, underscores and hyphens"}),query:Aie().min(1,{message:"Query must not be empty"}).trim().refine(e=>e.length>0,{message:"Query cannot be only whitespace"}),permissionParameters:cse()}),cse({accountKey:Aie(),product:pse(["G2M","G2C"]),fromTime:Yie().optional(),toTime:Yie().optional(),includePast:ese().optional(),includeUpcoming:ese().optional(),includeCalendar:ese().optional(),excludePrivate:ese().optional()}),cse({shortId:Aie().min(1,{message:"shortId must not be empty"}).trim().refine(e=>/^[a-zA-Z0-9_-]+$/.test(e),{message:"shortId can only contain letters, numbers, underscores and hyphens"})});const Lse=()=>{const e=(0,Dv.fV)().getExtensionConfigs(),t=[];
5991return e.forEach(e=>{(e.policyDecisionPointChecks??[]).forEach(r=>{const n=Ose.safeParse(r);n.error?(0,Dv.g)().error(`Invalid PDP check in extension ${e.id}: ${n.error.message}`):n.success&&t.push(r)})}),t},$se="GoTo > Load",Nse="Iframe exception",Rse=()=>!!Dv.gs.find(e=>e===(0,Dv.bg)()),Pse=[Dv.aU,"/error",Dv.aM,Dv.aO,Dv.aP,Dv.aQ];var Dse,Mse,zse={};function Fse(){if(Mse)return Dse;Mse=1;var e=function(e){return e&&e.Math===Math&&e};return Dse=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof Dv.bZ&&Dv.bZ)||e("object"==typeof Dse&&Dse)||function(){return this}()||Function("return this")()}var Use,Bse,Hse,jse,Vse,Wse,Kse,qse,Gse={};function Zse(){return Bse||(Bse=1,Use=function(e){try{return!!e()}catch{return!0}}),Use}function Yse(){if(jse)return Hse;jse=1;var e=Zse();return Hse=!e(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function Jse(){if(Wse)return Vse;Wse=1;var e=Zse();return Vse=!e(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),Vse}function Qse(){if(qse)return Kse;qse=1;var e=Jse(),t=Function.prototype.call;return Kse=e?t.bind(t):function(){return t.apply(t,arguments)},Kse}var Xse,eae,tae,rae,nae,oae,iae,sae,aae,lae,cae,dae,uae,hae,pae,gae,fae,mae,vae,bae,yae,wae,xae,_ae,kae,Cae,Sae,Eae,Iae,Aae,Tae,Oae,Lae,$ae,Nae,Rae,Pae,Dae,Mae,zae,Fae,Uae={};function Bae(){if(Xse)return Uae;Xse=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return Uae.f=r?function(e){var r=t(this,e);return!!r&&r.enumerable}:e,Uae}function Hae(){return tae||(tae=1,eae=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}),eae}function jae(){if(nae)return rae;nae=1;var e=Jse(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return rae=e?n:function(e){return function(){return r.apply(e,arguments)}},rae}function Vae(){if(iae)return oae;iae=1;var e=jae(),t=e({}.toString),r=e("".slice);return oae=function(e){return r(t(e),8,-1)},oae}function Wae(){if(aae)return sae;aae=1;var e=jae(),t=Zse(),r=Vae(),n=Object,o=e("".split);return sae=t(function(){return!n("z").propertyIsEnumerable(0)})?function(e){return"String"===r(e)?o(e,""):n(e)}:n,sae}function Kae(){return cae||(cae=1,lae=function(e){return null==e}),lae}function qae(){if(uae)return dae;uae=1;var e=Kae(),t=TypeError;return dae=function(r){if(e(r))throw new t("Can't call method on "+r);return r},dae}function Gae(){if(pae)return hae;pae=1;var e=Wae(),t=qae();return hae=function(r){return e(t(r))},hae}function Zae(){if(fae)return gae;fae=1;var e="object"==typeof document&&document.all;return gae=typeof e>"u"&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e},gae}function Yae(){if(vae)return mae;vae=1;var e=Zae();return mae=function(t){return"object"==typeof t?null!==t:e(t)},mae}function Jae(){if(yae)return bae;yae=1;var e=Fse(),t=Zae();return bae=function(r,n){return arguments.length<2?function(e){return t(e)?e:void 0}(e[r]):e[r]&&e[r][n]},bae}function Qae(){if(xae)return wae;xae=1;var e=jae();return wae=e({}.isPrototypeOf)}function Xae(){if(kae)return _ae;kae=1;var e=Fse().navigator,t=e&&e.userAgent;return _ae=t?String(t):""}function ele(){if(Sae)return Cae;Sae=1;var e,t,r=Fse(),n=Xae(),o=r.process,i=r.Deno,s=o&&o.versions||i&&i.version,a=s&&s.v8;return a&&(t=(e=a.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&n&&(!(e=n.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=n.match(/Chrome\/(\d+)/))&&(t=+e[1]),Cae=t}function tle(){if(Iae)return Eae;Iae=1;var e=ele(),t=Zse(),r=Fse().String;return Eae=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!r(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41})}function rle(){if(Tae)return Aae;Tae=1;var e=tle();return Aae=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function nle(){if(Lae)return Oae;Lae=1;var e=Jae(),t=Zae(),r=Qae(),n=rle(),o=Object;return Oae=n?function(e){return"symbol"==typeof e}:function(n){var i=e("Symbol");return t(i)&&r(i.prototype,o(n))},Oae}function ole(){if(Nae)return $ae;Nae=1;var e=String;return $ae=function(t){try{return e(t)}catch{return"Object"}},$ae}function ile(){if(Pae)return Rae;Pae=1;var e=Zae(),t=ole(),r=TypeError;return Rae=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},Rae}function sle(){if(Mae)return Dae;Mae=1;var e=ile(),t=Kae();return Dae=function(r,n){var o=r[n];return t(o)?void 0:e(o)},Dae}
5991function ale(){if(Fae)return zae;Fae=1;var e=Qse(),t=Zae(),r=Yae(),n=TypeError;return zae=function(o,i){var s,a;if("string"===i&&t(s=o.toString)&&!r(a=e(s,o))||t(s=o.valueOf)&&!r(a=e(s,o))||"string"!==i&&t(s=o.toString)&&!r(a=e(s,o)))return a;throw new n("Can't convert object to primitive value")},zae}var lle,cle,dle,ule,hle,ple,gle,fle,mle,vle,ble,yle,wle,xle,_le,kle,Cle,Sle,Ele,Ile,Ale,Tle,Ole,Lle,$le={exports:{}};function Nle(){return cle||(cle=1,lle=!1),lle}function Rle(){if(ule)return dle;ule=1;var e=Fse(),t=Object.defineProperty;return dle=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},dle}function Ple(){if(hle)return $le.exports;hle=1;var e=Nle(),t=Fse(),r=Rle(),n="__core-js_shared__",o=$le.exports=t[n]||r(n,{});return(o.versions||(o.versions=[])).push({version:"3.49.0",mode:e?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),$le.exports}function Dle(){if(gle)return ple;gle=1;var e=Ple();return ple=function(t,r){return e[t]||(e[t]=r||{})},ple}function Mle(){if(mle)return fle;mle=1;var e=qae(),t=Object;return fle=function(r){return t(e(r))},fle}function zle(){if(ble)return vle;ble=1;var e=jae(),t=Mle(),r=e({}.hasOwnProperty);return vle=Object.hasOwn||function(e,n){return r(t(e),n)},vle}function Fle(){if(wle)return yle;wle=1;var e=jae(),t=0,r=Math.random(),n=e(1.1.toString);return yle=function(e){return"Symbol("+(void 0===e?"":e)+")_"+n(++t+r,36)}}function Ule(){if(_le)return xle;_le=1;var e=Fse(),t=Dle(),r=zle(),n=Fle(),o=tle(),i=rle(),s=e.Symbol,a=t("wks"),l=i?s.for||s:s&&s.withoutSetter||n;return xle=function(e){return r(a,e)||(a[e]=o&&r(s,e)?s[e]:l("Symbol."+e)),a[e]},xle}function Ble(){if(Cle)return kle;Cle=1;var e=Qse(),t=Yae(),r=nle(),n=sle(),o=ale(),i=Ule(),s=TypeError,a=i("toPrimitive");return kle=function(i,l){if(!t(i)||r(i))return i;var c,d=n(i,a);if(d){if(void 0===l&&(l="default"),c=e(d,i,l),!t(c)||r(c))return c;throw new s("Can't convert object to primitive value")}return void 0===l&&(l="number"),o(i,l)},kle}function Hle(){if(Ele)return Sle;Ele=1;var e=Ble(),t=nle();return Sle=function(r){var n=e(r,"string");return t(n)?n:n+""},Sle}function jle(){if(Ale)return Ile;Ale=1;var e=Fse(),t=Yae(),r=e.document,n=t(r)&&t(r.createElement);return Ile=function(e){return n?r.createElement(e):{}}}function Vle(){if(Ole)return Tle;Ole=1;var e=Yse(),t=Zse(),r=jle();return Tle=!e&&!t(function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a})}function Wle(){if(Lle)return Gse;Lle=1;var e=Yse(),t=Qse(),r=Bae(),n=Hae(),o=Gae(),i=Hle(),s=zle(),a=Vle(),l=Object.getOwnPropertyDescriptor;return Gse.f=e?l:function(e,c){if(e=o(e),c=i(c),a)try{return l(e,c)}catch{}if(s(e,c))return n(!t(r.f,e,c),e[c])},Gse}var Kle,qle,Gle,Zle,Yle,Jle,Qle,Xle={};function ece(){if(qle)return Kle;qle=1;var e=Yse(),t=Zse();return Kle=e&&t(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}
vendor: 4,149 bytes, line 5991
5991function tce(){if(Zle)return Gle;Zle=1;var e=Yae(),t=String,r=TypeError;return Gle=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},Gle}function rce(){if(Yle)return Xle;Yle=1;var e=Yse(),t=Vle(),r=ece(),n=tce(),o=Hle(),i=TypeError,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l="enumerable",c="configurable",d="writable";return Xle.f=e?r?function(e,t,r){if(n(e),t=o(t),n(r),"function"==typeof e&&"prototype"===t&&"value"in r&&d in r&&!r[d]){var i=a(e,t);i&&i[d]&&(e[t]=r.value,r={configurable:c in r?r[c]:i[c],enumerable:l in r?r[l]:i[l],writable:!1})}return s(e,t,r)}:s:function(e,r,a){if(n(e),r=o(r),n(a),t)try{return s(e,r,a)}catch{}if("get"in a||"set"in a)throw new i("Accessors not supported");return"value"in a&&(e[r]=a.value),e},Xle}function nce(){if(Qle)return Jle;Qle=1;var e=Yse(),t=rce(),r=Hae();return Jle=e?function(e,n,o){return t.f(e,n,r(1,o))}:function(e,t,r){return e[t]=r,e},Jle}var oce,ice,sce,ace,lce,cce,dce,uce,hce,pce,gce,fce,mce,vce,bce,yce={exports:{}};function wce(){if(ice)return oce;ice=1;var e=Yse(),t=zle(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,o=t(r,"name"),i=o&&"something"===function(){}.name,s=o&&(!e||e&&n(r,"name").configurable);return oce={EXISTS:o,PROPER:i,CONFIGURABLE:s}}function xce(){if(ace)return sce;ace=1;var e=jae(),t=Zae(),r=Ple(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(e){return n(e)}),sce=r.inspectSource}function _ce(){if(cce)return lce;cce=1;var e=Fse(),t=Zae(),r=e.WeakMap;return lce=t(r)&&/native code/.test(String(r))}function kce(){if(uce)return dce;uce=1;var e=Dle(),t=Fle(),r=e("keys");return dce=function(e){return r[e]||(r[e]=t(e))},dce}function Cce(){return pce||(pce=1,hce={}),hce}function Sce(){if(fce)return gce;fce=1;var e,t,r,n=_ce(),o=Fse(),i=Yae(),s=nce(),a=zle(),l=Ple(),c=kce(),d=Cce(),u="Object already initialized",h=o.TypeError,p=o.WeakMap;if(n||l.state){var g=l.state||(l.state=new p);g.get=g.get,g.has=g.has,g.set=g.set,e=function(e,t){if(g.has(e))throw new h(u);return t.facade=e,g.set(e,t),t},t=function(e){return g.get(e)||{}},r=function(e){return g.has(e)}}else{var f=c("state");d[f]=!0,e=function(e,t){if(a(e,f))throw new h(u);return t.facade=e,s(e,f,t),t},t=function(e){return a(e,f)?e[f]:{}},r=function(e){return a(e,f)}}return gce={set:e,get:t,has:r,enforce:function(n){return r(n)?t(n):e(n,{})},getterFor:function(e){return function(r){var n;if(!i(r)||(n=t(r)).type!==e)throw new h("Incompatible receiver, "+e+" required");return n}}},gce}function Ece(){if(mce)return yce.exports;mce=1;var e=jae(),t=Zse(),r=Zae(),n=zle(),o=Yse(),i=wce().CONFIGURABLE,s=xce(),a=Sce(),l=a.enforce,c=a.get,d=String,u=Object.defineProperty,h=e("".slice),p=e("".replace),g=e([].join),f=o&&!t(function(){return 8!==u(function(){},"length",{value:8}).length}),m=String(String).split("String"),v=yce.exports=function(e,t,r){"Symbol("===h(d(t),0,7)&&(t="["+p(d(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!n(e,"name")||i&&e.name!==t)&&(o?u(e,"name",{value:t,configurable:!0}):e.name=t),f&&r&&n(r,"arity")&&e.length!==r.arity&&u(e,"length",{value:r.arity});try{r&&n(r,"constructor")&&r.constructor?o&&u(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch{}var s=l(e);return n(s,"source")||(s.source=g(m,"string"==typeof t?t:"")),e};return Function.prototype.toString=v(function(){return r(this)&&c(this).source||s(this)},"toString"),yce.exports}function Ice(){if(bce)return vce;bce=1;var e=Zae(),t=rce(),r=Ece(),n=Rle();return vce=function(o,i,s,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:i;if(e(s)&&r(s,c,a),a.global)l?o[i]=s:n(i,s);else{try{a.unsafe?o[i]&&(l=!0):delete o[i]}catch{}l?o[i]=s:t.f(o,i,{value:s,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return o},vce}var Ace,Tce,Oce,Lce,$ce,Nce,Rce,Pce,Dce,Mce,zce,Fce,Uce,Bce,Hce,jce,Vce,Wce={};function Kce(){if(Tce)return Ace;Tce=1;var e=Math.ceil,t=Math.floor;return Ace=Math.trunc||function(r){var n=+r;return(n>0?t:e)(n)},Ace}function qce(){if(Lce)return Oce;Lce=1;var e=Kce();return Oce=function(t){var r=+t;return r!=r||0===r?0:e(r)},Oce}
5991function Gce(){if(Nce)return $ce;Nce=1;var e=qce(),t=Math.max,r=Math.min;return $ce=function(n,o){var i=e(n);return i<0?t(i+o,0):r(i,o)},$ce}function Zce(){if(Pce)return Rce;Pce=1;var e=qce(),t=Math.min;return Rce=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},Rce}function Yce(){if(Mce)return Dce;Mce=1;var e=Zce();return Dce=function(t){return e(t.length)},Dce}function Jce(){if(Fce)return zce;Fce=1;var e=Gae(),t=Gce(),r=Yce(),n=function(n){return function(o,i,s){var a=e(o),l=r(a);if(0===l)return!n&&-1;var c,d=t(s,l);if(n&&i!=i){for(;l>d;)if((c=a[d++])!=c)return!0}else for(;l>d;d++)if((n||d in a)&&a[d]===i)return n||d||0;return!n&&-1}};return zce={includes:n(!0),indexOf:n(!1)}}function Qce(){if(Bce)return Uce;Bce=1;var e=jae(),t=zle(),r=Gae(),n=Jce().indexOf,o=Cce(),i=e([].push);return Uce=function(e,s){var a,l=r(e),c=0,d=[];for(a in l)!t(o,a)&&t(l,a)&&i(d,a);for(;s.length>c;)t(l,a=s[c++])&&(~n(d,a)||i(d,a));return d},Uce}function Xce(){return jce||(jce=1,Hce=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Hce}function ede(){if(Vce)return Wce;Vce=1;var e=Qce(),t=Xce().concat("length","prototype");return Wce.f=Object.getOwnPropertyNames||function(r){return e(r,t)},Wce}var tde,rde,nde,ode,ide,sde,ade,lde,cde,dde,ude,hde,pde,gde,fde,mde={};function vde(){return tde||(tde=1,mde.f=Object.getOwnPropertySymbols),mde}function bde(){if(nde)return rde;nde=1;var e=Jae(),t=jae(),r=ede(),n=vde(),o=tce(),i=t([].concat);return rde=e("Reflect","ownKeys")||function(e){var t=r.f(o(e)),s=n.f;return s?i(t,s(e)):t},rde}function yde(){if(ide)return ode;ide=1;var e=zle(),t=bde(),r=Wle(),n=rce();return ode=function(o,i,s){for(var a=t(i),l=n.f,c=r.f,d=0;d<a.length;d++){var u=a[d];!e(o,u)&&(!s||!e(s,u))&&l(o,u,c(i,u))}},ode}function wde(){if(ade)return sde;ade=1;var e=Zse(),t=Zae(),r=/#|\.prototype\./,n=function(r,n){var l=i[o(r)];return l===a||l!==s&&(t(n)?e(n):!!n)},o=n.normalize=function(e){return String(e).replace(r,".").toLowerCase()},i=n.data={},s=n.NATIVE="N",a=n.POLYFILL="P";return sde=n}function xde(){if(cde)return lde;cde=1;var e=Fse(),t=Wle().f,r=nce(),n=Ice(),o=Rle(),i=yde(),s=wde();return lde=function(a,l){var c,d,u,h,p,g=a.target,f=a.global,m=a.stat;if(c=f?e:m?e[g]||o(g,{}):e[g]&&e[g].prototype)for(d in l){if(h=l[d],u=a.dontCallGetSet?(p=t(c,d))&&p.value:c[d],!s(f?d:g+(m?".":"#")+d,a.forced)&&void 0!==u){if(typeof h==typeof u)continue;i(h,u)}(a.sham||u&&u.sham)&&r(h,"sham",!0),n(c,d,h,a)}},lde}function _de(){if(ude)return dde;ude=1;var e={};return e[Ule()("toStringTag")]="z",dde="[object z]"===String(e)}function kde(){if(pde)return hde;pde=1;var e=_de(),t=Zae(),r=Vae(),n=Ule()("toStringTag"),o=Object,i="Arguments"===r(function(){return arguments}());return hde=e?r:function(e){var s,a,l;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(a=function(e,t){try{return e[t]}catch{}}(s=o(e),n))?a:i?r(s):"Object"===(l=r(s))&&t(s.callee)?"Arguments":l},hde}function Cde(){if(fde)return gde;fde=1;var e=kde(),t=String;return gde=function(r){if("Symbol"===e(r))throw new TypeError("Cannot convert a Symbol value to a string");return t(r)},gde}var Sde,Ede,Ide,Ade,Tde,Ode,Lde,$de={};function Nde(){if(Ede)return Sde;Ede=1;var e=Qce(),t=Xce();return Sde=Object.keys||function(r){return e(r,t)},Sde}function Rde(){if(Ide)return $de;Ide=1;var e=Yse(),t=ece(),r=rce(),n=tce(),o=Gae(),i=Nde();return $de.f=e&&!t?Object.defineProperties:function(e,t){n(e);for(var s,a=o(t),l=i(t),c=l.length,d=0;c>d;)r.f(e,s=l[d++],a[s]);return e},$de}function Pde(){if(Tde)return Ade;Tde=1;var e=Jae();return Ade=e("document","documentElement")}function Dde(){if(Lde)return Ode;Lde=1;var e,t=tce(),r=Rde(),n=Xce(),o=Cce(),i=Pde(),s=jle(),a=kce(),l="prototype",c="script",d=a("IE_PROTO"),u=function(){},h=function(e){return"<"+c+">"+e+"</"+c+">"},p=function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){try{e=new ActiveXObject("htmlfile")}catch{}g=typeof document<"u"?document.domain&&e?p(e):function(){var e,t=s("iframe"),r="java"+c+":";return t.style.display="none",i.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F}():p(e);for(var t=n.length;t--;)delete g[l][n[t]];return g()};return o[d]=!0,Ode=Object.create||function(e,n){var o;return null!==e?(u[l]=t(e),o=new u,u[l]=null,o[d]=e):o=g(),void 0===n?o:r.f(o,n)},Ode}var Mde,zde,Fde,Ude,Bde,Hde={};
5991function jde(){if(zde)return Mde;zde=1;var e=jae();return Mde=e([].slice)}function Vde(){if(Fde)return Hde;Fde=1;var e=Vae(),t=Gae(),r=ede().f,n=jde(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return Hde.f=function(i){return o&&"Window"===e(i)?function(e){try{return r(e)}catch{return n(o)}}(i):r(t(i))},Hde}function Wde(){if(Bde)return Ude;Bde=1;var e=Ece(),t=rce();return Ude=function(r,n,o){return o.get&&e(o.get,n,{getter:!0}),o.set&&e(o.set,n,{setter:!0}),t.f(r,n,o)},Ude}var Kde,qde,Gde,Zde,Yde,Jde,Qde,Xde,eue,tue,rue,nue,oue,iue,sue,aue,lue,cue,due,uue,hue,pue,gue,fue,mue,vue,bue={};function yue(){if(Kde)return bue;Kde=1;var e=Ule();return bue.f=e,bue}function wue(){if(Gde)return qde;Gde=1;var e=Fse();return qde=e}function xue(){if(Yde)return Zde;Yde=1;var e=wue(),t=zle(),r=yue(),n=rce().f;return Zde=function(o){var i=e.Symbol||(e.Symbol={});t(i,o)||n(i,o,{value:r.f(o)})},Zde}function _ue(){if(Qde)return Jde;Qde=1;var e=Qse(),t=Jae(),r=Ule(),n=Ice();return Jde=function(){var o=t("Symbol"),i=o&&o.prototype,s=i&&i.valueOf,a=r("toPrimitive");i&&!i[a]&&n(i,a,function(t){return e(s,this)},{arity:1})},Jde}function kue(){if(eue)return Xde;eue=1;var e=rce().f,t=zle(),r=Ule()("toStringTag");return Xde=function(n,o,i){n&&!i&&(n=n.prototype),n&&!t(n,r)&&e(n,r,{configurable:!0,value:o})},Xde}function Cue(){if(rue)return tue;rue=1;var e=Vae(),t=jae();return tue=function(r){if("Function"===e(r))return t(r)},tue}function Sue(){if(oue)return nue;oue=1;var e=Cue(),t=ile(),r=Jse(),n=e(e.bind);return nue=function(e,o){return t(e),void 0===o?e:r?n(e,o):function(){return e.apply(o,arguments)}},nue}function Eue(){if(sue)return iue;sue=1;var e=Vae();return iue=Array.isArray||function(t){return"Array"===e(t)},iue}function Iue(){if(lue)return aue;lue=1;var e=jae(),t=Zse(),r=Zae(),n=kde(),o=Jae(),i=xce(),s=function(){},a=o("Reflect","construct"),l=/^\s*(?:class|function)\b/,c=e(l.exec),d=!l.test(s),u=function(e){if(!r(e))return!1;try{return a(s,[],e),!0}catch{return!1}},h=function(e){if(!r(e))return!1;switch(n(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!c(l,i(e))}catch{return!0}};return h.sham=!0,aue=!a||t(function(){var e;return u(u.call)||!u(Object)||!u(function(){e=!0})||e})?h:u,aue}function Aue(){if(hue)return uue;hue=1;var e=function(){if(due)return cue;due=1;var e=Eue(),t=Iue(),r=Yae(),n=Ule()("species"),o=Array;return cue=function(i){var s;return e(i)&&(s=i.constructor,(t(s)&&(s===o||e(s.prototype))||r(s)&&null===(s=s[n]))&&(s=void 0)),void 0===s?o:s},cue}();return uue=function(t,r){return new(e(t))(0===r?0:r)},uue}function Tue(){if(gue)return pue;gue=1;var e=Yse(),t=rce(),r=Hae();return pue=function(n,o,i){e?t.f(n,o,r(0,i)):n[o]=i},pue}function Oue(){if(mue)return fue;mue=1;var e=Sue(),t=Wae(),r=Mle(),n=Yce(),o=Aue(),i=Tue(),s=function(s){var a=1===s,l=2===s,c=3===s,d=4===s,u=6===s,h=7===s,p=5===s||u;return function(g,f,m){for(var v,b,y=r(g),w=t(y),x=n(w),_=e(f,m),k=0,C=0,S=a?o(g,x):l||h?o(g,0):void 0;x>k;k++)if((p||k in w)&&(b=_(v=w[k],k,y),s))if(a)i(S,k,b);else if(b)switch(s){case 3:return!0;case 5:return v;case 6:return k;case 2:i(S,C++,v)}else switch(s){case 4:return!1;case 7:i(S,C++,v)}return u?-1:c||d?d:S}};return fue={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}}var Lue,$ue,Nue,Rue={};function Pue(){if($ue)return Lue;$ue=1;var e=tle();return Lue=e&&!!Symbol.for&&!!Symbol.keyFor}var Due,Mue,zue,Fue,Uue,Bue,Hue,jue,Vue,Wue,Kue={},que={};function Gue(){if(zue)return Mue;zue=1;var e=Jse(),t=Function.prototype,r=t.apply,n=t.call;return Mue="object"==typeof Reflect&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),Mue}function Zue(){if(Uue)return Fue;Uue=1;var e=Yae(),t=Sce().get;return Fue=function(r){if(!e(r))return!1;var n=t(r);return!!n&&"RawJSON"===n.type},Fue}function Yue(){if(Hue)return Bue;Hue=1;var e=jae(),t=zle(),r=SyntaxError,n=parseInt,o=String.fromCharCode,i=e("".charAt),s=e("".slice),a=e(/./.exec),l={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"}
5991,c=/^[\da-f]{4}$/i,d=/^[\u0000-\u001F]$/;return Bue=function(e,u){for(var h=!0,p="";u<e.length;){var g=i(e,u);if("\\"===g){var f=s(e,u,u+2);if(t(l,f))p+=l[f],u+=2;else{if("\\u"!==f)throw new r('Unknown escape sequence: "'+f+'"');var m=s(e,u+=2,u+4);if(!a(c,m))throw new r("Bad Unicode escape at: "+u);p+=o(n(m,16)),u+=4}}else{if('"'===g){h=!1,u++;break}if(a(d,g))throw new r("Bad control character in string literal at: "+u);p+=g,u++}}if(h)throw new r("Unterminated string at: "+u);return{value:p,end:u}},Bue}function Jue(){if(Vue)return jue;Vue=1;var e=Zse();return jue=!e(function(){var e="9007199254740993",t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e}),jue}function Que(){if(Wue)return que;Wue=1;var e=xde(),t=Jae(),r=Gue(),n=Qse(),o=jae(),i=Zse(),s=Eue(),a=Zae(),l=Zue(),c=nle(),d=Vae(),u=Cde(),h=jde(),p=Yue(),g=Fle(),f=tle(),m=Jue(),v=String,b=t("JSON","stringify"),y=o(/./.exec),w=o("".charAt),x=o("".charCodeAt),_=o("".replace),k=o("".slice),C=o([].push),S=o(1.1.toString),E=/[\uD800-\uDFFF]/g,I=/^[\uD800-\uDBFF]$/,A=/^[\uDC00-\uDFFF]$/,T=g(),O=T.length,L=!f||i(function(){var e=t("Symbol")("stringify detection");return"[null]"!==b([e])||"{}"!==b({a:e})||"{}"!==b(Object(e))}),$=i(function(){return'"\\udf06\\ud834"'!==b("\udf06\ud834")||'"\\udead"'!==b("\udead")}),N=L?function(e,t){var o=h(arguments),i=P(t);if(a(i)||void 0!==e&&!c(e))return o[1]=function(e,t){if(a(i)&&(t=n(i,this,v(e),t)),!c(t))return t},r(b,null,o)}:b,R=function(e,t,r){var n=w(r,t-1),o=w(r,t+1);return y(I,e)&&!y(A,o)||y(A,e)&&!y(I,n)?"\\u"+S(x(e,0),16):e},P=function(e){if(a(e))return e;if(s(e)){for(var t=e.length,r=[],n=0;n<t;n++){var o=e[n];"string"==typeof o?C(r,o):("number"==typeof o||"Number"===d(o)||"String"===d(o))&&C(r,u(o))}var i=r.length,l=!0;return function(e,t){if(l)return l=!1,t;if(s(this))return t;for(var n=0;n<i;n++)if(r[n]===e)return t}}};return b&&e({target:"JSON",stat:!0,arity:3,forced:L||$||!m},{stringify:function(e,t,r){var o=P(t),i=[],s=N(e,function(e,t){var r=a(o)?n(o,this,v(e),t):t;return!m&&l(r)?T+(C(i,r.rawJSON)-1):r},r);if("string"!=typeof s||($&&(s=_(s,E,R)),m))return s;for(var c="",d=s.length,u=0;u<d;u++){var h=w(s,u);if('"'===h){var g=p(s,++u).end-1,f=k(s,u,g);c+=k(f,0,O)===T?i[k(f,O)]:'"'+f+'"',u=g}else c+=h}return c}}),que}var Xue,ehe,the={};var rhe,nhe,ohe,ihe,she,ahe,lhe,che,dhe,uhe,hhe,phe,ghe,fhe,mhe,vhe,bhe,yhe,whe,xhe,_he,khe,Che,She,Ehe,Ihe,Ahe,The,Ohe,Lhe,$he,Nhe,Rhe,Phe,Dhe,Mhe,zhe,Fhe,Uhe,Bhe,Hhe,jhe={},Vhe={},Whe={},Khe={},qhe={},Ghe={};function Zhe(){if(yhe)return bhe;yhe=1;var e=jae(),t=ile();return bhe=function(r,n,o){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[o]))}catch{}},bhe}function Yhe(){if(xhe)return whe;xhe=1;var e=Yae();return whe=function(t){return e(t)||null===t},whe}function Jhe(){if(khe)return _he;khe=1;var e=Yhe(),t=String,r=TypeError;return _he=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")},_he}function Qhe(){if(She)return Che;She=1;var e=Zhe(),t=Yae(),r=qae(),n=Jhe();return Che=Object.setPrototypeOf||("__proto__"in{}?function(){var o,i=!1,s={};try{(o=e(Object.prototype,"__proto__","set"))(s,[]),i=s instanceof Array}catch{}return function(e,s){return r(e),n(s),t(e)&&(i?o(e,s):e.__proto__=s),e}}():void 0),Che}function Xhe(){if(Ihe)return Ehe;Ihe=1;var e=rce().f;return Ehe=function(t,r,n){n in t||e(t,n,{configurable:!0,get:function(){return r[n]},set:function(e){r[n]=e}})},Ehe}function epe(){if(The)return Ahe;The=1;var e=Zae(),t=Yae(),r=Qhe();return Ahe=function(n,o,i){var s,a;return r&&e(s=o.constructor)&&s!==i&&t(a=s.prototype)&&a!==i.prototype&&r(n,a),n},Ahe}function tpe(){if(Lhe)return Ohe;Lhe=1;var e=Cde();return Ohe=function(t,r){return void 0===t?arguments.length<2?"":r:e(t)},Ohe}function rpe(){if(Nhe)return $he;Nhe=1;var e=Yae(),t=nce();return $he=function(r,n){e(n)&&"cause"in n&&t(r,"cause",n.cause)},$he}function npe(){if(Phe)return Rhe;Phe=1;var e=jae(),t=Error,r=e("".replace),n=String(new t("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,i=o.test(n);return Rhe=function(e,n){if(i&&"string"==typeof e&&!t.prepareStackTrace)for(;n--;)e=r(e,o,"");return e},Rhe}function ope(){if(Mhe)return Dhe;Mhe=1;var e=Zse(),t=Hae();return Dhe=!e(function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",t(1,7)),7!==e.stack)}),Dhe}
5991function ipe(){if(Fhe)return zhe;Fhe=1;var e=nce(),t=npe(),r=ope(),n=Error.captureStackTrace;return zhe=function(o,i,s,a){r&&(n?n(o,i):e(o,"stack",t(s,a)))},zhe}function spe(){if(Bhe)return Uhe;Bhe=1;var e=Jae(),t=zle(),r=nce(),n=Qae(),o=Qhe(),i=yde(),s=Xhe(),a=epe(),l=tpe(),c=rpe(),d=ipe(),u=Yse(),h=Nle();return Uhe=function(p,g,f,m){var v="stackTraceLimit",b=m?2:1,y=p.split("."),w=y[y.length-1],x=e.apply(null,y);if(x){var _=x.prototype;if(!h&&t(_,"cause")&&delete _.cause,!f)return x;var k=e("Error"),C=g(function(e,t){var o=l(m?t:e,void 0),i=m?new x(e):new x;return void 0!==o&&r(i,"message",o),d(i,C,i.stack,2),this&&n(_,this)&&a(i,this,C),arguments.length>b&&c(i,arguments[b]),i});if(C.prototype=_,"Error"!==w?o?o(C,k):i(C,k,{name:!0}):u&&v in x&&(s(C,x,v),s(C,x,"prepareStackTrace")),i(C,x),!h)try{_.name!==w&&r(_,"name",w),_.constructor=C}catch{}return C}},Uhe}var ape,lpe,cpe,dpe,upe={},hpe={};function ppe(){if(cpe)return lpe;cpe=1;var e=Yse(),t=Zse(),r=tce(),n=tpe(),o=Error.prototype.toString,i=t(function(){if(e){var t=Object.create(Object.defineProperty({},"name",{get:function(){return this===t}}));if("true"!==o.call(t))return!0}return"2: 1"!==o.call({message:1,name:2})||"Error"!==o.call({})});return lpe=i?function(){var e=r(this),t=n(e.name,"Error"),o=n(e.message);return t?o?t+": "+o:t:o}:o,lpe}var gpe,fpe,mpe,vpe,bpe,ype,wpe,xpe,_pe,kpe,Cpe,Spe,Epe,Ipe,Ape,Tpe,Ope,Lpe,$pe={};function Npe(){if(fpe)return gpe;fpe=1;var e=Zse();return gpe=!e(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),gpe}function Rpe(){if(vpe)return mpe;vpe=1;var e=zle(),t=Zae(),r=Mle(),n=kce(),o=Npe(),i=n("IE_PROTO"),s=Object,a=s.prototype;return mpe=o?s.getPrototypeOf:function(n){var o=r(n);if(e(o,i))return o[i];var l=o.constructor;return t(l)&&o instanceof l?l.prototype:o instanceof s?a:null},mpe}function Ppe(){return ype||(ype=1,bpe={}),bpe}function Dpe(){if(xpe)return wpe;xpe=1;var e=Ule(),t=Ppe(),r=e("iterator"),n=Array.prototype;return wpe=function(e){return void 0!==e&&(t.Array===e||n[r]===e)}}function Mpe(){if(kpe)return _pe;kpe=1;var e=kde(),t=sle(),r=Kae(),n=Ppe(),o=Ule()("iterator");return _pe=function(i){if(!r(i))return t(i,o)||t(i,"@@iterator")||n[e(i)]},_pe}function zpe(){if(Spe)return Cpe;Spe=1;var e=Qse(),t=ile(),r=tce(),n=ole(),o=Mpe(),i=TypeError;return Cpe=function(s,a){var l=arguments.length<2?o(s):a;if(t(l))return r(e(l,s));throw new i(n(s)+" is not iterable")},Cpe}function Fpe(){if(Ipe)return Epe;Ipe=1;var e=Qse(),t=tce(),r=sle();return Epe=function(n,o,i){var s,a;t(n);try{if(!(s=r(n,"return"))){if("throw"===o)throw i;return i}s=e(s,n)}catch(e){a=!0,s=e}if("throw"===o)throw i;if(a)throw s;return t(s),i},Epe}function Upe(){if(Tpe)return Ape;Tpe=1;var e=Sue(),t=Qse(),r=tce(),n=ole(),o=Dpe(),i=Yce(),s=Qae(),a=zpe(),l=Mpe(),c=Fpe(),d=TypeError,u=function(e,t){this.stopped=e,this.result=t},h=u.prototype;return Ape=function(p,g,f){var m,v,b,y,w,x,_,k=f&&f.that,C=!(!f||!f.AS_ENTRIES),S=!(!f||!f.IS_RECORD),E=!(!f||!f.IS_ITERATOR),I=!(!f||!f.INTERRUPTED),A=e(g,k),T=function(e){var t=m;return m=void 0,t&&c(t,"normal"),new u(!0,e)},O=function(e){return C?(r(e),I?A(e[0],e[1],T):A(e[0],e[1])):I?A(e,T):A(e)};if(S)m=p.iterator;else if(E)m=p;else{if(!(v=l(p)))throw new d(n(p)+" is not iterable");if(o(v)){for(b=0,y=i(p);y>b;b++)if((w=O(p[b]))&&s(h,w))return w;return new u(!1)}m=a(p,v)}for(x=S?p.next:m.next;!(_=t(x,m)).done;){var L=_.value;try{w=O(L)}catch(e){if(!m)throw e;c(m,"throw",e)}if("object"==typeof w&&w&&s(h,w))return w}return new u(!1)},Ape}var Bpe,Hpe,jpe,Vpe,Wpe,Kpe={},qpe={},Gpe={};function Zpe(){if(Vpe)return jpe;Vpe=1;var e=Ule(),t=Dde(),r=rce().f,n=e("unscopables"),o=Array.prototype;return void 0===o[n]&&r(o,n,{configurable:!0,value:t(null)}),jpe=function(e){o[n][e]=!0},jpe}var Ype,Jpe,Qpe,Xpe,ege,tge,rge,nge={};function oge(){if(Jpe)return Ype;Jpe=1;var e=TypeError;return Ype=function(t){if(t>9007199254740991)throw new e("Maximum allowed index exceeded");return t},Ype}function ige(){if(Xpe)return Qpe;Xpe=1;var e=Yse(),t=Eue(),r=TypeError,n=Object.getOwnPropertyDescriptor,o=e&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();return Qpe=o?function(e,o){if(t(e)&&!n(e,"length").writable)throw new r("Cannot set read only .length");return e.length=o}:function(e,t){return e.length=t},Qpe}function sge(){if(tge)return ege;tge=1;var e=Zse(),t=Ule(),r=ele(),n=t("species");return ege=function(t){return r>=51||!e(function(){var e=[];return(e.constructor={})[n]=function(){return{foo:1}
5991},1!==e[t](Boolean).foo})},ege}var age,lge,cge,dge,uge,hge={};function pge(){if(lge)return age;lge=1;var e=ole(),t=TypeError;return age=function(r,n){if(!delete r[n])throw new t("Cannot delete property "+e(n)+" of "+e(r))},age}function gge(){if(dge)return cge;dge=1;var e=Mle(),t=Gce(),r=Yce(),n=pge(),o=Math.min;return cge=[].copyWithin||function(i,s){var a=e(this),l=r(a),c=t(i,l),d=t(s,l),u=arguments.length>2?arguments[2]:void 0,h=o((void 0===u?l:t(u,l))-d,l-c),p=1;for(d<c&&c<d+h&&(p=-1,d+=h-1,c+=h-1);h-- >0;)d in a?a[c]=a[d]:n(a,c),c+=p,d+=p;return a},cge}var fge,mge,vge,bge={};function yge(){if(mge)return fge;mge=1;var e=Zse();return fge=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})},fge}var wge,xge,_ge,kge={};function Cge(){if(xge)return wge;xge=1;var e=Mle(),t=Gce(),r=Yce();return wge=function(n){for(var o=e(this),i=r(o),s=arguments.length,a=t(s>1?arguments[1]:void 0,i),l=s>2?arguments[2]:void 0,c=void 0===l?i:t(l,i);c>a;)o[a++]=n;return o},wge}var Sge,Ege,Ige,Age,Tge,Oge,Lge={},$ge={},Nge={},Rge={};function Pge(){if(Tge)return Age;Tge=1;var e=Sue(),t=Wae(),r=Mle(),n=Yce(),o=function(o){var i=1===o;return function(s,a,l){for(var c,d=r(s),u=t(d),h=n(u),p=e(a,l);h-- >0;)if(p(c=u[h],h,d))switch(o){case 0:return c;case 1:return h}return i?-1:void 0}};return Age={findLast:o(0),findLastIndex:o(1)}}var Dge,Mge,zge,Fge,Uge={},Bge={};function Hge(){if(zge)return Mge;zge=1;var e=Eue(),t=Yce(),r=oge(),n=Sue(),o=Tue(),i=function(s,a,l,c,d,u,h,p){for(var g,f,m=d,v=0,b=!!h&&n(h,p);v<c;)v in l&&(g=b?b(l[v],v,a):l[v],u>0&&e(g)?(f=t(g),m=i(s,a,g,f,m,u-1)-1):(r(m+1),o(s,m,g)),m++),v++;return m};return Mge=i}var jge,Vge,Wge,Kge,qge={},Gge={};function Zge(){if(Wge)return Vge;Wge=1;var e=Oue().forEach,t=yge()("forEach");return Vge=t?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},Vge}var Yge,Jge,Qge,Xge,efe,tfe,rfe,nfe={};function ofe(){if(Jge)return Yge;Jge=1;var e=tce(),t=Fpe();return Yge=function(r,n,o,i){try{return i?n(e(o)[0],o[1]):n(o)}catch(e){t(r,"throw",e)}},Yge}function ife(){if(Xge)return Qge;Xge=1;var e=Sue(),t=Qse(),r=Mle(),n=ofe(),o=Dpe(),i=Iue(),s=Yce(),a=Tue(),l=ige(),c=zpe(),d=Mpe(),u=Fpe(),h=Array;return Qge=function(p){var g=i(this),f=arguments.length,m=f>1?arguments[1]:void 0,v=void 0!==m;v&&(m=e(m,f>2?arguments[2]:void 0));var b,y,w,x,_,k,C=r(p),S=d(C),E=0;if(!S||this===h&&o(S))for(b=s(C),y=g?new this(b):h(b);b>E;E++)k=v?m(C[E],E):C[E],a(y,E,k);else for(y=g?new this:[],_=(x=c(C,S)).next;!(w=t(_,x)).done;E++){k=v?n(x,m,[w.value,E],!0):w.value;try{a(y,E,k)}catch(e){u(x,"throw",e)}}return l(y,E),y},Qge}function sfe(){if(tfe)return efe;tfe=1;var e=Ule()("iterator"),t=!1;try{var r=0,n={next:function(){return{done:!!r++}},return:function(){t=!0}};n[e]=function(){return this},Array.from(n,function(){throw 2})}catch{}return efe=function(r,n){try{if(!n&&!t)return!1}catch{return!1}var o=!1;try{var i={};i[e]=function(){return{next:function(){return{done:o=!0}}}},r(i)}catch{}return o},efe}var afe,lfe,cfe,dfe,ufe,hfe,pfe,gfe,ffe,mfe,vfe,bfe,yfe,wfe={},xfe={};function _fe(){if(ufe)return dfe;ufe=1;var e,t,r,n=Zse(),o=Zae(),i=Yae(),s=Dde(),a=Rpe(),l=Ice(),c=Ule(),d=Nle(),u=c("iterator"),h=!1;[].keys&&("next"in(r=[].keys())?(t=a(a(r)))!==Object.prototype&&(e=t):h=!0);var p=!i(e)||n(function(){var t={};return e[u].call(t)!==t});return p?e={}:d&&(e=s(e)),o(e[u])||l(e,u,function(){return this}),dfe={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:h}}function kfe(){if(pfe)return hfe;pfe=1;var e=_fe().IteratorPrototype,t=Dde(),r=Hae(),n=kue(),o=Ppe(),i=function(){return this};return hfe=function(s,a,l,c){var d=a+" Iterator";return s.prototype=t(e,{next:r(+!c,l)}),n(s,d,!1,!0),o[d]=i,s},hfe}function Cfe(){if(ffe)return gfe;ffe=1;var e=xde(),t=Qse(),r=Nle(),n=wce(),o=Zae(),i=kfe(),s=Rpe(),a=Qhe(),l=kue(),c=nce(),d=Ice(),u=Ule(),h=Ppe(),p=_fe(),g=n.PROPER,f=n.CONFIGURABLE,m=p.IteratorPrototype,v=p.BUGGY_SAFARI_ITERATORS,b=u("iterator"),y="keys",w="values",x="entries",_=function(){return this};return gfe=function(n,u,p,k,C,S,E){i(p,u,k);var I,A,T,O=function(e){if(e===C&&P)return P;if(!v&&e&&e in N)return N[e];switch(e){case y:case w:case x:return function(){return new p(this,e)}}return function(){return new p(this)}},L=u+" Iterator",$=!1,N=n.prototype,R=N[b]||N["@@iterator"]||C&&N[C],P=!v&&R||O(C),D="Array"===u&&N.entries||R;if(D&&(I=s(D.call(new n)))!==Object.prototype&&I.next&&(!r&&s(I)!==m&&(a?a(I,m):o(I[b])||d(I,b,_)),l(I,L,!0,!0),r&&(h[L]=_)),g&&C===w&&R&&R.name!==w&&(!r&&f?c(N,"name",w):($=!0,P=function(){return t(R,this)}
5991)),C)if(A={values:O(w),keys:S?P:O(y),entries:O(x)},E)for(T in A)(v||$||!(T in N))&&d(N,T,A[T]);else e({target:u,proto:!0,forced:v||$},A);return(!r||E)&&N[b]!==P&&d(N,b,P,{name:C}),h[u]=P,A},gfe}function Sfe(){return vfe||(vfe=1,mfe=function(e,t){return{value:e,done:t}}),mfe}function Efe(){if(yfe)return bfe;yfe=1;var e=Gae(),t=Zpe(),r=Ppe(),n=Sce(),o=rce().f,i=Cfe(),s=Sfe(),a=Nle(),l=Yse(),c="Array Iterator",d=n.set,u=n.getterFor(c);bfe=i(Array,"Array",function(t,r){d(this,{type:c,target:e(t),index:0,kind:r})},function(){var e=u(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,s(void 0,!0);switch(e.kind){case"keys":return s(r,!1);case"values":return s(t[r],!1)}return s([r,t[r]],!1)},"values");var h=r.Arguments=r.Array;if(t("keys"),t("values"),t("entries"),!a&&l&&"values"!==h.name)try{o(h,"name",{value:"values"})}catch{}return bfe}var Ife,Afe,Tfe,Ofe,Lfe={},$fe={};function Nfe(){if(Tfe)return Afe;Tfe=1;var e=Gue(),t=Gae(),r=qce(),n=Yce(),o=yge(),i=Math.min,s=[].lastIndexOf,a=!!s&&1/[1].lastIndexOf(1,-0)<0,l=o("lastIndexOf");return Afe=a||!l?function(o){if(a)return e(s,this,arguments)||0;var l=t(this),c=n(l);if(0===c)return-1;var d=c-1;for(arguments.length>1&&(d=i(d,r(arguments[1]))),d<0&&(d=c+d);d>=0;d--)if(d in l&&l[d]===o)return d||0;return-1}:s,Afe}var Rfe,Pfe,Dfe,Mfe,zfe,Ffe,Ufe,Bfe,Hfe,jfe,Vfe={},Wfe={},Kfe={},qfe={};function Gfe(){if(zfe)return Mfe;zfe=1;var e=ile(),t=Mle(),r=Wae(),n=Yce(),o=TypeError,i="Reduce of empty array with no initial value",s=function(s){return function(a,l,c,d){var u=t(a),h=r(u),p=n(u);if(e(l),0===p&&c<2)throw new o(i);var g=s?p-1:0,f=s?-1:1;if(c<2)for(;;){if(g in h){d=h[g],g+=f;break}if(g+=f,s?g<0:p<=g)throw new o(i)}for(;s?g>=0:p>g;g+=f)g in h&&(d=l(d,h[g],g,u));return d}};return Mfe={left:s(!1),right:s(!0)}}function Zfe(){if(Ufe)return Ffe;Ufe=1;var e=Fse(),t=Xae(),r=Vae(),n=function(e){return t.slice(0,e.length)===e};return Ffe=n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":e.Bun&&"string"==typeof Bun.version?"BUN":e.Deno&&"object"==typeof Deno.version?"DENO":"process"===r(e.process)?"NODE":e.window&&e.document?"BROWSER":"REST"}function Yfe(){if(Hfe)return Bfe;Hfe=1;var e=Zfe();return Bfe="NODE"===e}var Jfe,Qfe,Xfe,eme,tme,rme,nme,ome,ime,sme,ame,lme,cme,dme,ume,hme,pme={},gme={},fme={},mme={},vme={};function bme(){if(rme)return tme;rme=1;var e=jde(),t=Math.floor,r=function(n,o){var i=n.length;if(i<8)for(var s,a,l=1;l<i;){for(a=l,s=n[l];a&&o(n[a-1],s)>0;)n[a]=n[--a];a!==l++&&(n[a]=s)}else for(var c=t(i/2),d=r(e(n,0,c),o),u=r(e(n,c),o),h=d.length,p=u.length,g=0,f=0;g<h||f<p;)n[g+f]=g<h&&f<p?o(d[g],u[f])<=0?d[g++]:u[f++]:g<h?d[g++]:u[f++];return n};return tme=r}function yme(){if(ome)return nme;ome=1;var e=Xae().match(/firefox\/(\d+)/i);return nme=!!e&&+e[1]}function wme(){if(sme)return ime;sme=1;var e=Xae();return ime=/MSIE|Trident/.test(e)}function xme(){if(lme)return ame;lme=1;var e=Xae().match(/AppleWebKit\/(\d+)\./);return ame=!!e&&+e[1]}function _me(){if(ume)return dme;ume=1;var e=Jae(),t=Wde(),r=Ule(),n=Yse(),o=r("species");return dme=function(r){var i=e(r);n&&i&&!i[o]&&t(i,o,{configurable:!0,get:function(){return this}})},dme}var kme,Cme,Sme,Eme,Ime,Ame,Tme,Ome={},Lme={},$me={};function Nme(){if(Eme)return Sme;Eme=1;var e=Yce();return Sme=function(t,r,n){for(var o=0,i=arguments.length>2?n:e(r),s=new t(i);i>o;)s[o]=r[o++];return s},Sme}function Rme(){if(Ame)return Ime;Ame=1;var e=Fse();return Ime=function(t,r){var n=e[t],o=n&&n.prototype;return o&&o[r]},Ime}var Pme,Dme,Mme,zme,Fme,Ume,Bme,Hme,jme,Vme,Wme,Kme,qme,Gme,Zme,Yme,Jme,Qme,Xme,eve,tve,rve,nve,ove,ive,sve,ave={},lve={},cve={},dve={};function uve(){return Bme||(Bme=1,Ume=typeof ArrayBuffer<"u"&&typeof DataView<"u"),Ume}function hve(){if(jme)return Hme;jme=1;var e=Ice();return Hme=function(t,r,n){for(var o in r)e(t,o,r[o],n);return t},Hme}function pve(){if(Wme)return Vme;Wme=1;var e=Qae(),t=TypeError;return Vme=function(r,n){if(e(n,r))return r;throw new t("Incorrect invocation")},Vme}function gve(){if(qme)return Kme;qme=1;var e=qce(),t=Zce(),r=RangeError;return Kme=function(n){if(void 0===n)return 0;var o=e(n),i=t(o);if(o!==i)throw new r("Wrong length or index");return i},Kme}function fve(){return Zme||(Zme=1,Gme=Math.sign||function(e){var t=+e;return 0===t||t!=t?t:t<0?-1:1}),Gme}function mve(){if(Jme)return Yme;Jme=1;var e=4503599627370496;return Yme=function(t){return t+e-e},Yme}function vve(){if(Xme)return Qme;Xme=1;var e=fve(),t=mve(),r=Math.abs;return Qme=function(n,o,i,s){var a=+n,l=r(a),c=e(a);if(l<s)return c*t(l/s/o)*s*o;var d=(1+o/2220446049250313e-31)*l,u=d-(d-l);return u>i||u!=u?c*(1/0):c*u},Qme}function bve(){if(tve)return eve;tve=1;var e=vve();return eve=Math.fround||function(t){return e(t,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)},eve}function yve(){if(ive)return ove;ive=1;
vendor: 4,737 bytes, line 5991
5991var e=Fse(),t=jae(),r=Yse(),n=uve(),o=wce(),i=nce(),s=Wde(),a=hve(),l=Zse(),c=pve(),d=qce(),u=gve(),h=bve(),p=function(){if(nve)return rve;nve=1;var e=Array,t=Math.abs,r=Math.pow,n=Math.floor,o=Math.log,i=Math.LN2;return rve={pack:function(s,a,l){var c,d,u,h=e(l),p=8*l-a-1,g=(1<<p)-1,f=g>>1,m=23===a?r(2,-24)-r(2,-77):0,v=s<0||0===s&&1/s<0?1:0,b=0;for((s=t(s))!=s||s===1/0?(d=s!=s?1:0,c=g):(c=n(o(s)/i),s*(u=r(2,-c))<1&&(c--,u*=2),(s+=c+f>=1?m/u:m*r(2,1-f))*u>=2&&(c++,u/=2),c+f>=g?(d=0,c=g):c+f>=1?(d=(s*u-1)*r(2,a),c+=f):(d=s*r(2,f-1)*r(2,a),c=0));a>=8;)h[b++]=255&d,d/=256,a-=8;for(c=c<<a|d,p+=a;p>0;)h[b++]=255&c,c/=256,p-=8;return h[b-1]|=128*v,h},unpack:function(e,t){var n,o=e.length,i=8*o-t-1,s=(1<<i)-1,a=s>>1,l=i-7,c=o-1,d=e[c--],u=127&d;for(d>>=7;l>0;)u=256*u+e[c--],l-=8;for(n=u&(1<<-l)-1,u>>=-l,l+=t;l>0;)n=256*n+e[c--],l-=8;if(0===u)u=1-a;else{if(u===s)return n?NaN:d?-1/0:1/0;n+=r(2,t),u-=a}return(d?-1:1)*n*r(2,u-t)}},rve}(),g=Rpe(),f=Qhe(),m=Cge(),v=jde(),b=epe(),y=yde(),w=kue(),x=Sce(),_=o.PROPER,k=o.CONFIGURABLE,C="ArrayBuffer",S="DataView",E="prototype",I="Wrong index",A=x.getterFor(C),T=x.getterFor(S),O=x.set,L=e[C],$=L,N=$&&$[E],R=e[S],P=R&&R[E],D=Object.prototype,M=e.Array,z=e.RangeError,F=t(m),U=t([].reverse),B=p.pack,H=p.unpack,j=function(e){return[255&e]},V=function(e){return[255&e,e>>8&255]},W=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},K=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},q=function(e){return B(h(e),23,4)},G=function(e){return B(e,52,8)},Z=function(e,t,r){s(e[E],t,{configurable:!0,get:function(){return r(this)[t]}})},Y=function(e,t,r,n){var o=T(e),i=u(r),s=!!n;if(i+t>o.byteLength)throw new z(I);var a=o.bytes,l=i+o.byteOffset,c=v(a,l,l+t);return s?c:U(c)},J=function(e,t,r,n,o,i){var s=T(e),a=u(r),l=n(+o),c=!!i;if(a+t>s.byteLength)throw new z(I);for(var d=s.bytes,h=a+s.byteOffset,p=0;p<t;p++)d[h+p]=l[c?p:t-p-1]};if(n){var Q=_&&L.name!==C;l(function(){L(1)})&&l(function(){new L(-1)})&&!l(function(){return new L,new L(1.5),new L(NaN),1!==L.length||Q&&!k})?Q&&k&&i(L,"name",C):(($=function(e){return c(this,N),b(new L(u(e)),this,$)})[E]=N,N.constructor=$,y($,L)),f&&g(P)!==D&&f(P,D);var X=new R(new $(2)),ee=t(P.setInt8);X.setInt8(0,2147483648),X.setInt8(1,2147483649),(X.getInt8(0)||!X.getInt8(1))&&a(P,{setInt8:function(e,t){ee(this,e,t<<24>>24)},setUint8:function(e,t){ee(this,e,t<<24>>24)}},{unsafe:!0})}else N=($=function(e){c(this,N);var t=u(e);O(this,{type:C,bytes:F(M(t),0),byteLength:t}),r||(this.byteLength=t,this.detached=!1)})[E],P=(R=function(e,t,n){c(this,P),c(e,N);var o=A(e),i=o.byteLength,s=d(t);if(s<0||s>i)throw new z("Wrong offset");if(s+(n=void 0===n?i-s:u(n))>i)throw new z("Wrong length");O(this,{type:S,buffer:e,byteLength:n,byteOffset:s,bytes:o.bytes}),r||(this.buffer=e,this.byteLength=n,this.byteOffset=s)})[E],r&&(Z($,"byteLength",A),Z(R,"buffer",T),Z(R,"byteLength",T),Z(R,"byteOffset",T)),a(P,{getInt8:function(e){return Y(this,1,e)[0]<<24>>24},getUint8:function(e){return Y(this,1,e)[0]},getInt16:function(e){var t=Y(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Y(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return K(Y(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return K(Y(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return H(Y(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return H(Y(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){J(this,1,e,j,t)},setUint8:function(e,t){J(this,1,e,j,t)},setInt16:function(e,t){J(this,2,e,V,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){J(this,2,e,V,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){J(this,4,e,W,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){J(this,4,e,W,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){J(this,4,e,q,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){J(this,8,e,G,t,arguments.length>2&&arguments[2])}});return w($,C),w(R,S),ove={ArrayBuffer:$,DataView:R}}var wve,xve,_ve,kve={};function Cve(){if(xve)return wve;xve=1;var e,t,r,n=uve(),o=Yse(),i=Fse(),s=Zae(),a=Yae(),l=zle(),c=kde(),d=ole(),u=nce(),h=Ice(),p=Wde(),g=Qae(),f=Rpe(),m=Qhe(),v=Ule(),b=Fle(),y=Sce(),w=y.enforce,x=y.get,_=i.Int8Array,k=_&&_.prototype,C=i.Uint8ClampedArray,S=C&&C.prototype,E=_&&f(_),I=k&&f(k),A=Object.prototype,T=i.TypeError,O=v("toStringTag"),L=b("TYPED_ARRAY_TAG"),$="TypedArrayConstructor",N=n&&!!m&&"Opera"!==c(i.opera),R=!1,P={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},D={BigInt64Array:8,BigUint64Array:8},M=function(e){var t=f(e);
5991if(a(t)){var r=x(t);return r&&l(r,$)?r[$]:M(t)}},z=function(e){if(!a(e))return!1;var t=c(e);return l(P,t)||l(D,t)};for(e in P)(r=(t=i[e])&&t.prototype)?w(r)[$]=t:N=!1;for(e in D)(r=(t=i[e])&&t.prototype)&&(w(r)[$]=t);if((!N||!s(E)||E===Function.prototype)&&(E=function(){throw new T("Incorrect invocation")},N))for(e in P)i[e]&&m(i[e],E);if((!N||!I||I===A)&&(I=E.prototype,N))for(e in P)i[e]&&m(i[e].prototype,I);if(N&&f(S)!==I&&m(S,I),o&&!l(I,O))for(e in R=!0,p(I,O,{configurable:!0,get:function(){return a(this)?this[L]:void 0}}),P)i[e]&&u(i[e].prototype,L,e);return wve={NATIVE_ARRAY_BUFFER_VIEWS:N,TYPED_ARRAY_TAG:R&&L,aTypedArray:function(e){if(z(e))return e;throw new T("Target is not a typed array")},aTypedArrayConstructor:function(e){if(s(e)&&(!m||g(E,e)))return e;throw new T(d(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(o){if(r)for(var s in P){var a=i[s];if(a&&l(a.prototype,e))try{delete a.prototype[e]}catch{try{a.prototype[e]=t}catch{}}}(!I[e]||r)&&h(I,e,r?t:N&&k[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,s;if(o){if(m){if(r)for(n in P)if((s=i[n])&&l(s,e))try{delete s[e]}catch{}if(E[e]&&!r)return;try{return h(E,e,r?t:N&&E[e]||t)}catch{}}for(n in P)(s=i[n])&&(!s[e]||r)&&h(s,e,t)}},getTypedArrayConstructor:M,isView:function(e){if(!a(e))return!1;var t=c(e);return"DataView"===t||l(P,t)||l(D,t)},isTypedArray:z,TypedArray:E,TypedArrayPrototype:I}}var Sve,Eve,Ive,Ave={},Tve={};var Ove,Lve={};var $ve,Nve,Rve,Pve,Dve,Mve={};function zve(){if(Pve)return Rve;Pve=1;var e=Math.log,t=Math.LN2;return Rve=Math.log2||function(r){return e(r)/t},Rve}var Fve,Uve,Bve,Hve,jve,Vve={};function Wve(){if(Uve)return Fve;Uve=1;var e=Fse(),t=Zhe(),r=Vae(),n=e.ArrayBuffer,o=e.TypeError;return Fve=n&&t(n.prototype,"byteLength","get")||function(e){if("ArrayBuffer"!==r(e))throw new o("ArrayBuffer expected");return e.byteLength},Fve}function Kve(){if(Hve)return Bve;Hve=1;var e=Fse(),t=uve(),r=Wve(),n=e.DataView;return Bve=function(e){if(!t||0!==r(e))return!1;try{return new n(e),!1}catch{return!0}}}var qve,Gve,Zve,Yve,Jve,Qve,Xve,ebe,tbe,rbe,nbe,obe={};function ibe(){if(Gve)return qve;Gve=1;var e=Kve(),t=TypeError;return qve=function(r){if(e(r))throw new t("ArrayBuffer is detached");return r},qve}function sbe(){if(Yve)return Zve;Yve=1;var e=Fse(),t=Yfe();return Zve=function(r){if(t){try{return e.process.getBuiltinModule(r)}catch{}try{return Function('return require("'+r+'")')()}catch{}}},Zve}function abe(){if(Qve)return Jve;Qve=1;var e=Fse(),t=Zse(),r=ele(),n=Zfe(),o=e.structuredClone;return Jve=!!o&&!t(function(){if("DENO"===n&&r>92||"NODE"===n&&r>94||"BROWSER"===n&&r>97)return!1;var e=new ArrayBuffer(8),t=o(e,{transfer:[e]});return 0!==e.byteLength||8!==t.byteLength}),Jve}function lbe(){if(ebe)return Xve;ebe=1;var e,t,r,n,o=Fse(),i=sbe(),s=abe(),a=o.structuredClone,l=o.ArrayBuffer,c=o.MessageChannel,d=!1;if(s)d=function(e){a(e,{transfer:[e]})};else if(l)try{c||(e=i("worker_threads"))&&(c=e.MessageChannel),c&&(t=new c,r=new l(2),n=function(e){t.port1.postMessage(null,[e])},2===r.byteLength&&(n(r),0===r.byteLength&&(d=n)))}catch{}return Xve=d}function cbe(){if(rbe)return tbe;rbe=1;var e=Fse(),t=jae(),r=Zhe(),n=gve(),o=ibe(),i=Wve(),s=lbe(),a=abe(),l=e.structuredClone,c=e.ArrayBuffer,d=e.DataView,u=Math.max,h=Math.min,p=c.prototype,g=d.prototype,f=t(p.slice),m=r(p,"resizable","get"),v=r(p,"maxByteLength","get"),b=t(g.getInt8),y=t(g.setInt8);return tbe=(a||s)&&function(e,t,r){var p,g=i(e),w=void 0===t?g:n(t),x=!m||!m(e);if(o(e),a&&(e=l(e,{transfer:[e]}),g===w&&(r||x)))return e;if(g>=w&&(!r||x))p=f(e,0,w);else{var _=r&&!x&&v?{maxByteLength:u(w,v(e))}:void 0;p=new c(w,_);for(var k=new d(e),C=new d(p),S=h(w,g),E=0;E<S;E++)y(C,E,b(k,E))}return a||s(e),p},tbe}var dbe,ube,hbe,pbe,gbe,fbe,mbe,vbe,bbe,ybe,wbe,xbe,_be={},kbe={},Cbe={},Sbe={},Ebe={};function Ibe(){if(mbe)return fbe;mbe=1;var e=qce(),t=Cde(),r=qae(),n=RangeError,o=Math.floor;return fbe=function(i){var s=t(r(this)),a="",l=e(i);if(l<0||l===1/0)throw new n("Wrong number of repetitions");for(;l>0;(l=o(l/2))&&(s+=s))l%2&&(a+=s);return a},fbe}function Abe(){if(bbe)return vbe;bbe=1;var e=jae(),t=Zce(),r=Cde(),n=Ibe(),o=qae(),i=e(n),s=e("".slice),a=Math.ceil,l=function(e){return function(n,l,c){var d=r(o(n)),u=t(l),h=d.length;if(u<=h)return d;var p,g,f=void 0===c?" ":r(c);return""===f?d:((g=i(f,a((p=u-h)/f.length))).length>p&&(g=s(g,0,p)),e?d+g:g+d)}};return vbe={start:l(!1),end:l(!0)}}var Tbe,Obe,Lbe,$be,Nbe={},Rbe={};var Pbe,Dbe,Mbe,zbe,Fbe={},Ube={};function Bbe(){if(Mbe)return Dbe;Mbe=1;var e=Jae(),t=Qse(),r=jae(),n=Sue(),o=tce(),i=ile(),s=Kae(),a=sle(),l=Ule(),c=l("asyncDispose"),d=l("dispose"),u=r([].push),h=function(r,l,u){return arguments.length<3&&!s(r)&&(u=i(function(r,n){if("async-dispose"===n){var o=a(r,c);return void 0!==o||void 0===(o=a(r,d))?o:function(){var r=this;return new(e("Promise"))(function(e){t(o,r),e(void 0)})}}return a(r,d)}(o(r),l))),void 0===u?function(){}:n(u,r)};return Dbe=function(e,t,r,n){var o;if(arguments.length<4){if(s(t)&&"sync-dispose"===r)return;o=h(t,r)}
5991else o=h(void 0,r,n);u(e.stack,o)},Dbe}var Hbe,jbe,Vbe,Wbe,Kbe={},qbe={};function Gbe(){if(Vbe)return jbe;Vbe=1;var e=jae(),t=ile(),r=Yae(),n=zle(),o=jde(),i=Jse(),s=Function,a=e([].concat),l=e([].join),c={};return jbe=i?s.bind:function(e){var i=t(this),d=i.prototype,u=o(arguments,1),h=function(){var t=a(u,o(arguments));return this instanceof h?function(e,t,r){if(!n(c,t)){for(var o=[],i=0;i<t;i++)o[i]="a["+i+"]";c[t]=s("C,a","return new C("+l(o,",")+")")}return c[t](e,r)}(i,t.length,t):i.apply(e,t)};return r(d)&&(h.prototype=d),h},jbe}var Zbe,Ybe,Jbe,Qbe,Xbe,eye,tye,rye,nye,oye={},iye={},sye={},aye={},lye={};function cye(){if(rye)return tye;rye=1;var e=Qse(),t=Dde(),r=nce(),n=hve(),o=Ule(),i=Sce(),s=sle(),a=_fe().IteratorPrototype,l=Sfe(),c=Fpe(),d=function(){if(eye)return Xbe;eye=1;var e=Fpe();return Xbe=function(t,r,n){for(var o=t.length-1;o>=0;o--)if(void 0!==t[o])try{n=e(t[o].iterator,r,n)}catch(e){r="throw",n=e}if("throw"===r)throw n;return n},Xbe}(),u=o("toStringTag"),h="IteratorHelper",p="WrapForValidIterator",g="normal",f="throw",m=i.set,v=function(r){var o=i.getterFor(r?p:h);return n(t(a),{next:function(){var e=o(this);if(r)return e.nextHandler();if(e.done)return l(void 0,!0);try{var t=e.nextHandler();return e.returnHandlerResult?t:l(t,e.done)}catch(t){throw e.done=!0,t}},return:function(){var t=o(this),n=t.iterator,i=t.done;if(t.done=!0,r){var a=s(n,"return");return a?e(a,n):l(void 0,!0)}if(i)return l(void 0,!0);if(t.inner)try{c(t.inner.iterator,g)}catch(e){return c(n,f,e)}if(t.openIters)try{d(t.openIters,g)}catch(e){if(n)return c(n,f,e);throw e}return n&&c(n,g),l(void 0,!0)}})},b=v(!0),y=v(!1);return r(y,u,"Iterator Helper"),tye=function(e,t,r){var n=function(n,o){o?(o.iterator=n.iterator,o.next=n.next):o=n,o.type=t?p:h,o.returnHandlerResult=!!r,o.nextHandler=e,o.counter=0,o.done=!1,m(this,o)};return n.prototype=t?b:y,n},tye}var dye,uye,hye,pye,gye,fye,mye,vye,bye,yye,wye,xye,_ye={},kye={};function Cye(){return hye||(hye=1,uye=function(e){return{iterator:e,next:e.next,done:!1}}),uye}function Sye(){if(gye)return pye;gye=1;var e=RangeError;return pye=function(t){if(t==t)return t;throw new e("NaN is not allowed")},pye}function Eye(){if(mye)return fye;mye=1;var e=qce(),t=RangeError;return fye=function(r){var n=e(r);if(n<0)throw new t("The argument can't be less than 0");return n},fye}function Iye(){return bye||(bye=1,vye=function(e,t){var r="function"==typeof Iterator&&Iterator.prototype[e];if(r)try{r.call({next:null},t).next()}catch{return!0}}),vye}function Aye(){if(wye)return yye;wye=1;var e=Fse();return yye=function(t,r){var n=e.Iterator,o=n&&n.prototype,i=o&&o[t],s=!1;if(i)try{i.call({next:function(){return{done:!0}},return:function(){s=!0}},-1)}catch(e){e instanceof r||(s=!1)}if(!s)return i},yye}var Tye,Oye,Lye,$ye,Nye,Rye,Pye={},Dye={},Mye={},zye={};function Fye(){if(Nye)return $ye;Nye=1;var e=Qse(),t=tce(),r=Cye(),n=Mpe();return $ye=function(o,i){(!i||"string"!=typeof o)&&t(o);var s=n(o);return r(t(void 0!==s?e(s,o):o))},$ye}var Uye,Bye,Hye,jye,Vye,Wye,Kye,qye,Gye,Zye={},Yye={},Jye={},Qye={},Xye={},ewe={},twe={},rwe={};var nwe,owe,iwe,swe={};function awe(){if(owe)return nwe;owe=1;var e=Zse();return nwe=!e(function(){return Object.isExtensible(Object.preventExtensions({}))})}var lwe,cwe,dwe,uwe,hwe,pwe,gwe,fwe,mwe,vwe,bwe,ywe,wwe={},xwe={exports:{}};function _we(){if(dwe)return cwe;dwe=1;var e=Zse();return cwe=e(function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),cwe}function kwe(){if(hwe)return uwe;hwe=1;var e=Zse(),t=Yae(),r=Vae(),n=_we(),o=Object.isExtensible,i=e(function(){});return uwe=i||n?function(e){return!(!t(e)||n&&"ArrayBuffer"===r(e))&&(!o||o(e))}:o,uwe}function Cwe(){if(pwe)return xwe.exports;pwe=1;
5991var e=xde(),t=jae(),r=Cce(),n=Yae(),o=zle(),i=rce().f,s=ede(),a=Vde(),l=kwe(),c=Fle(),d=awe(),u=!1,h=c("meta"),p=0,g=function(e){i(e,h,{value:{objectID:"O"+p++,weakData:{}}})},f=xwe.exports={enable:function(){f.enable=function(){},u=!0;var r=s.f,n=t([].splice),o={};o[h]=1,r(o).length&&(s.f=function(e){for(var t=r(e),o=0,i=t.length;o<i;o++)if(t[o]===h){n(t,o,1);break}return t},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:a.f}))},fastKey:function(e,t){if(!n(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,h)){if(!l(e))return"F";if(!t)return"E";g(e)}return e[h].objectID},getWeakData:function(e,t){if(!o(e,h)){if(!l(e))return!0;if(!t)return!1;g(e)}return e[h].weakData},onFreeze:function(e){return d&&u&&l(e)&&!o(e,h)&&g(e),e}};return r[h]=!0,xwe.exports}function Swe(){if(fwe)return gwe;fwe=1;var e=xde(),t=Fse(),r=jae(),n=wde(),o=Ice(),i=Cwe(),s=Upe(),a=pve(),l=Zae(),c=Kae(),d=Yae(),u=Zse(),h=sfe(),p=kue(),g=epe();return gwe=function(f,m,v){var b=-1!==f.indexOf("Map"),y=-1!==f.indexOf("Weak"),w=b?"set":"add",x=t[f],_=x&&x.prototype,k=x,C={},S=function(e){var t=r(_[e]);o(_,e,"add"===e?function(e){return t(this,0===e?0:e),this}:"delete"===e?function(e){return!(y&&!d(e))&&t(this,0===e?0:e)}:"get"===e?function(e){return y&&!d(e)?void 0:t(this,0===e?0:e)}:"has"===e?function(e){return!(y&&!d(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(n(f,!l(x)||!(y||_.forEach&&!u(function(){(new x).entries().next()}))))k=v.getConstructor(m,f,b,w),i.enable();else if(n(f,!0)){var E=new k,I=E[w](y?{}:-0,1)!==E,A=u(function(){E.has(1)}),T=h(function(e){new x(e)}),O=!y&&u(function(){for(var e=new x,t=5;t--;)e[w](t,t);return!e.has(-0)});T||(k=m(function(e,t){a(e,_);var r=g(new x,e,k);return c(t)||s(t,r[w],{that:r,AS_ENTRIES:b}),r}),k.prototype=_,_.constructor=k),(A||O)&&(S("delete"),S("has"),b&&S("get")),(O||I)&&S(w),y&&_.clear&&delete _.clear}return C[f]=k,e({global:!0,constructor:!0,forced:k!==x},C),p(k,f),y||v.setStrong(k,f,b),k},gwe}function Ewe(){if(vwe)return mwe;vwe=1;var e=Dde(),t=Wde(),r=hve(),n=Sue(),o=pve(),i=Kae(),s=Upe(),a=Cfe(),l=Sfe(),c=_me(),d=Yse(),u=Cwe().fastKey,h=Sce(),p=h.set,g=h.getterFor;return mwe={getConstructor:function(a,l,c,h){var f=a(function(t,r){o(t,m),p(t,{type:l,index:e(null),first:null,last:null,size:0}),d||(t.size=0),i(r)||s(r,t[h],{that:t,AS_ENTRIES:c})}),m=f.prototype,v=g(l),b=function(e,t,r){var n,o,i=v(e),s=y(e,t);return s?s.value=r:(i.last=s={index:o=u(t,!0),key:t,value:r,previous:n=i.last,next:null,removed:!1},i.first||(i.first=s),n&&(n.next=s),d?i.size++:e.size++,"F"!==o&&(i.index[o]=s)),e},y=function(e,t){var r,n=v(e),o=u(t);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key===t)return r};return r(m,{clear:function(){for(var t=v(this),r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=null),r=r.next;t.first=t.last=null,t.index=e(null),d?t.size=0:this.size=0},delete:function(e){var t=this,r=v(t),n=y(t,e);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first===n&&(r.first=o),r.last===n&&(r.last=i),d?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=v(this),o=n(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(o(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!y(this,e)}}),r(m,c?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return b(this,0===e?0:e,t)}}:{add:function(e){return b(this,e=0===e?0:e,e)}}),d&&t(m,"size",{configurable:!0,get:function(){return v(this).size}}),f},setStrong:function(e,t,r){var n=t+" Iterator",o=g(t),i=g(n);a(e,t,function(e,t){p(this,{type:n,target:e,state:o(e),kind:t,last:null})},function(){for(var e=i(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?l("keys"===t?r.key:"values"===t?r.value:[r.key,r.value],!1):(e.target=null,l(void 0,!0))},r?"entries":"values",!r,!0),c(t)}},mwe}var Iwe,Awe,Twe,Owe={};function Lwe(){if(Awe)return Iwe;Awe=1;var e=jae(),t=Map.prototype;return Iwe={Map:Map,set:e(t.set),get:e(t.get),has:e(t.has),remove:e(t.delete),proto:t}}var $we,Nwe,Rwe,Pwe,Dwe,Mwe={},zwe={},Fwe={};function Uwe(){if(Pwe)return Rwe;Pwe=1;var e=Math.log;return Rwe=Math.log1p||function(t){var r=+t;return r>-1e-8&&r<1e-8?r-r*r/2:e(1+r)},Rwe}var Bwe,Hwe,jwe,Vwe,Wwe,Kwe,qwe,Gwe={},Zwe={},Ywe={},Jwe={},Qwe={};function Xwe(){if(Kwe)return Wwe;Kwe=1;var e=Math.expm1,t=Math.exp;return Wwe=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!==e(-2e-17)?function(e){var r=+e;return 0===r?r:r>-1e-6&&r<1e-6?r+r*r/2:t(r)-1}:e,Wwe}var exe,txe,rxe,nxe,oxe,ixe,sxe,axe,lxe,cxe,dxe,uxe={},hxe={},pxe={},gxe={};function fxe(){if(sxe)return ixe;sxe=1;var e=Math.log,t=Math.LOG10E;return ixe=Math.log10||function(r){return e(r)*t},ixe}var mxe,vxe,bxe,yxe,wxe,xxe,_xe,kxe,Cxe,Sxe,Exe,Ixe,Axe,Txe={},Oxe={},Lxe={},$xe={};function Nxe(){if(_xe)return xxe;_xe=1;var e=jae();return xxe=e(1.1.valueOf)}function Rxe(){return Cxe||(Cxe=1,kxe="\t\n\v\f\r                 \u2028\u2029\ufeff"),kxe}function Pxe(){if(Exe)return Sxe;Exe=1;var e=jae(),t=qae(),r=Cde(),n=Rxe(),o=e("".replace),i=RegExp("^["+n+"]+"),s=RegExp("(^|[^"+n+"])["+n+"]+$"),a=function(e){return function(n){var a=r(t(n));return 1&e&&(a=o(a,i,"")),2&e&&(a=o(a,s,"$1")),a}};return Sxe={start:a(1),end:a(2),trim:a(3)}}var Dxe,Mxe,zxe,Fxe,Uxe,Bxe,Hxe,jxe={};function Vxe(){if(Uxe)return Fxe;Uxe=1;var e=Yae(),t=Math.floor;return Fxe=Number.isInteger||function(r){return!e(r)&&isFinite(r)&&t(r)===r},Fxe}var Wxe,Kxe,qxe,Gxe,Zxe,Yxe,Jxe={},Qxe={};function Xxe(){if(Zxe)return Gxe;Zxe=1;var e=Fse(),t=Zse(),r=jae(),n=Cde(),o=Pxe().trim,i=Rxe(),s=r("".charAt),a=e.parseFloat,l=e.Symbol,c=l&&l.iterator,d=1/a(i+"-0")!=-1/0||c&&!t(function(){a(Object(c))});return Gxe=d?function(e){var t=o(n(e)),r=a(t);return 0===r&&"-"===s(t,0)?-0:r}:a,Gxe}var e_e,t_e,r_e,n_e={};function o_e(){if(t_e)return e_e;t_e=1;var e=Fse(),t=Zse(),r=jae(),n=Cde(),o=Pxe().trim,i=Rxe(),s=e.parseInt,a=e.Symbol,l=a&&a.iterator,c=/^[+-]?0x/i,d=r(c.exec),u=8!==s(i+"08")||22!==s(i+"0x16")||l&&!t(function(){s(Object(l))});return e_e=u?function(e,t){var r=o(n(e));return s(r,t>>>0||(d(c,r)?16:10))}:s,e_e}var i_e,s_e,a_e,l_e,c_e,d_e,u_e,h_e={},p_e={},g_e={},f_e={};function m_e(){if(c_e)return l_e;c_e=1;
5991var e=Yse(),t=jae(),r=Qse(),n=Zse(),o=Nde(),i=vde(),s=Bae(),a=Mle(),l=Wae(),c=Object.assign,d=Object.defineProperty,u=t([].concat);return l_e=!c||n(function(){if(e&&1!==c({b:1},c(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},r={},n=Symbol("assign detection"),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach(function(e){r[e]=e}),7!==c({},t)[n]||o(c({},r)).join("")!==i})?function(t,n){for(var c=a(t),d=arguments.length,h=1,p=i.f,g=s.f;d>h;)for(var f,m=l(arguments[h++]),v=p?u(o(m),p(m)):o(m),b=v.length,y=0;b>y;)f=v[y++],(!e||r(g,m,f))&&(c[f]=m[f]);return c}:c,l_e}var v_e,b_e,y_e,w_e={};function x_e(){if(b_e)return v_e;b_e=1;var e=Nle(),t=Fse(),r=Zse(),n=xme();return v_e=e||!r(function(){if(!(n&&n<535)){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete t[e]}})}var __e,k_e,C_e,S_e,E_e,I_e,A_e={},T_e={},O_e={},L_e={};function $_e(){if(E_e)return S_e;E_e=1;var e=Yse(),t=Zse(),r=jae(),n=Rpe(),o=Nde(),i=Gae(),s=r(Bae().f),a=r([].push),l=e&&t(function(){var e=Object.create(null);return e[2]=2,!s(e,2)}),c=function(t){return function(r){for(var c,d=i(r),u=o(d),h=l&&null===n(d),p=u.length,g=0,f=[];p>g;)c=u[g++],(!e||(h?c in d:s(d,c)))&&a(f,t?[c,d[c]]:d[c]);return f}};return S_e={entries:c(!0),values:c(!1)}}var N_e,R_e,P_e,D_e,M_e,z_e,F_e,U_e,B_e,H_e,j_e,V_e={},W_e={},K_e={},q_e={},G_e={},Z_e={},Y_e={};function J_e(){return H_e||(H_e=1,B_e=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}),B_e}var Q_e,X_e,eke,tke,rke,nke,oke,ike,ske,ake,lke,cke,dke,uke={},hke={},pke={},gke={},fke={},mke={},vke={},bke={},yke={},wke={};var xke,_ke,kke,Cke,Ske,Eke,Ike,Ake,Tke,Oke,Lke,$ke,Nke,Rke,Pke,Dke,Mke,zke,Fke,Uke,Bke,Hke,jke,Vke,Wke,Kke,qke,Gke,Zke,Yke,Jke,Qke={},Xke={},eCe={},tCe={};
vendor: 4,265 bytes, line 5991
5991function rCe(){if(Ske)return Cke;Ske=1;var e=Iue(),t=ole(),r=TypeError;return Cke=function(n){if(e(n))return n;throw new r(t(n)+" is not a constructor")},Cke}function nCe(){if(Ike)return Eke;Ike=1;var e=tce(),t=rCe(),r=Kae(),n=Ule()("species");return Eke=function(o,i){var s,a=e(o).constructor;return void 0===a||r(s=e(a)[n])?i:t(s)},Eke}function oCe(){if(Tke)return Ake;Tke=1;var e=TypeError;return Ake=function(t,r){if(t<r)throw new e("Not enough arguments");return t},Ake}function iCe(){if(Lke)return Oke;Lke=1;var e=Xae();return Oke=/ipad|iphone|ipod/i.test(e)&&/applewebkit/i.test(e)}function sCe(){if(Nke)return $ke;Nke=1;var e,t,r,n,o=Fse(),i=Gue(),s=Sue(),a=Zae(),l=zle(),c=Zse(),d=Pde(),u=jde(),h=jle(),p=oCe(),g=iCe(),f=Yfe(),m=o.setImmediate,v=o.clearImmediate,b=o.process,y=o.Dispatch,w=o.Function,x=o.MessageChannel,_=o.String,k=0,C={},S="onreadystatechange";c(function(){e=o.location});var E=function(e){if(l(C,e)){var t=C[e];delete C[e],t()}},I=function(e){return function(){E(e)}},A=function(e){E(e.data)},T=function(t){o.postMessage(_(t),e.protocol+"//"+e.host)};return(!m||!v)&&(m=function(e){p(arguments.length,1);var r=a(e)?e:w(e),n=u(arguments,1);return C[++k]=function(){i(r,void 0,n)},t(k),k},v=function(e){delete C[e]},f?t=function(e){b.nextTick(I(e))}:y&&y.now?t=function(e){y.now(I(e))}:x&&!g?(n=(r=new x).port2,r.port1.onmessage=A,t=s(n.postMessage,n)):o.addEventListener&&a(o.postMessage)&&!o.importScripts&&e&&"file:"!==e.protocol&&!c(T)?(t=T,o.addEventListener("message",A,!1)):t=S in h("script")?function(e){d.appendChild(h("script"))[S]=function(){d.removeChild(this),E(e)}}:function(e){setTimeout(I(e),0)}),$ke={set:m,clear:v}}function aCe(){if(Pke)return Rke;Pke=1;var e=Fse(),t=Yse(),r=Object.getOwnPropertyDescriptor;return Rke=function(n){if(!t)return e[n];var o=r(e,n);return o&&o.value},Rke}function lCe(){if(Mke)return Dke;Mke=1;var e=function(){this.head=null,this.tail=null};return e.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},Dke=e}function cCe(){if(jke)return Hke;jke=1;var e,t,r,n,o,i=Fse(),s=aCe(),a=Sue(),l=sCe().set,c=lCe(),d=iCe(),u=function(){if(Fke)return zke;Fke=1;var e=Xae();return zke=/ipad|iphone|ipod/i.test(e)&&typeof Pebble<"u"}(),h=function(){if(Bke)return Uke;Bke=1;var e=Xae();return Uke=/web0s(?!.*chrome)/i.test(e)}(),p=Yfe(),g=i.MutationObserver||i.WebKitMutationObserver,f=i.document,m=i.process,v=i.Promise,b=s("queueMicrotask");if(!b){var y=new c,w=function(){var t,r;for(p&&(t=m.domain)&&t.exit();r=y.get();)try{r()}catch(t){throw y.head&&e(),t}t&&t.enter()};d||p||h||!g||!f?!u&&v&&v.resolve?((n=v.resolve(void 0)).constructor=v,o=a(n.then,n),e=function(){o(w)}):p?e=function(){m.nextTick(w)}:(l=a(l,i),e=function(){l(w)}):(t=!0,r=f.createTextNode(""),new g(w).observe(r,{characterData:!0}),e=function(){r.data=t=!t}),b=function(t){y.head||e(),y.add(t)}}return Hke=b}function dCe(){return qke||(qke=1,Kke=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}),Kke}function uCe(){if(Zke)return Gke;Zke=1;var e=Fse();return Gke=e.Promise}function hCe(){if(Jke)return Yke;Jke=1;var e=Fse(),t=uCe(),r=Zae(),n=wde(),o=xce(),i=Ule(),s=Zfe(),a=Nle(),l=ele(),c=t&&t.prototype,d=i("species"),u=!1,h=r(e.PromiseRejectionEvent),p=n("Promise",function(){var e=o(t),r=e!==String(t);if(!r&&66===l||a&&(!c.catch||!c.finally))return!0;if(!l||l<51||!/native code/.test(e)){var n=new t(function(e){e(1)}),i=function(e){e(function(){},function(){})};if((n.constructor={})[d]=i,!(u=n.then(function(){})instanceof i))return!0}return!(r||"BROWSER"!==s&&"DENO"!==s||h)});return Yke={CONSTRUCTOR:p,REJECTION_EVENT:h,SUBCLASSING:u}}var pCe,gCe,fCe={};function mCe(){if(pCe)return fCe;pCe=1;var e=ile(),t=TypeError,r=function(r){var n,o;this.promise=new r(function(e,r){if(void 0!==n||void 0!==o)throw new t("Bad Promise constructor");n=e,o=r}),this.resolve=e(n),this.reject=e(o)};return fCe.f=function(e){return new r(e)},fCe}var vCe,bCe,yCe,wCe={};function xCe(){if(bCe)return vCe;bCe=1;var e=uCe(),t=sfe(),r=hCe().CONSTRUCTOR;return vCe=r||!t(function(t){e.all(t).then(void 0,function(){})}),vCe}var _Ce,kCe,CCe,SCe,ECe,ICe,ACe,TCe={},OCe={}
5991,LCe={},$Ce={};function NCe(){if(ECe)return SCe;ECe=1;var e=tce(),t=Yae(),r=mCe();return SCe=function(n,o){if(e(n),t(o)&&o.constructor===n)return o;var i=r.f(n);return(0,i.resolve)(o),i.promise},SCe}var RCe,PCe,DCe,MCe,zCe,FCe,UCe,BCe,HCe,jCe,VCe,WCe,KCe,qCe,GCe,ZCe,YCe,JCe,QCe={},XCe={},eSe={},tSe={},rSe={},nSe={};function oSe(){if(UCe)return FCe;UCe=1;var e,t,r=Fse(),n=Ple(),o=Zae(),i=Dde(),s=Rpe(),a=Ice(),l=Ule(),c=Nle(),d="USE_FUNCTION_CONSTRUCTOR",u=l("asyncIterator"),h=r.AsyncIterator,p=n.AsyncIteratorPrototype;if(p)e=p;else if(o(h))e=h.prototype;else if(n[d]||r[d])try{t=s(s(s(Function("return async function*(){}()")()))),s(t)===Object.prototype&&(e=t)}catch{}return e?c&&(e=i(e)):e={},o(e[u])||a(e,u,function(){return this}),FCe=e}function iSe(){if(HCe)return BCe;HCe=1;var e=Qse(),t=tce(),r=Dde(),n=sle(),o=hve(),i=Sce(),s=Fpe(),a=Jae(),l=oSe(),c=Sfe(),d=a("Promise"),u="AsyncFromSyncIterator",h=i.set,p=i.getterFor(u),g=function(e,t,r,n,o){var i=e.done;d.resolve(e.value).then(function(e){t(c(e,i))},function(e){if(!i&&o)try{s(n,"throw",e)}catch(t){e=t}r(e)})},f=function(e){e.type=u,h(this,e)};return f.prototype=o(r(l),{next:function(){var r=p(this),n=arguments.length>0,o=n?arguments[0]:void 0;return new d(function(i,s){var a=t(n?e(r.next,r.iterator,o):e(r.next,r.iterator));g(a,i,s,r.iterator,!0)})},return:function(){var r=p(this).iterator,o=arguments.length>0,i=o?arguments[0]:void 0;return new d(function(s,a){var l=n(r,"return");if(void 0===l)return s(c(i,!0));var d=t(o?e(l,r,i):e(l,r));g(d,s,a,r)})},throw:function(){var r=p(this).iterator,o=arguments.length>0,i=o?arguments[0]:void 0;return new d(function(a,l){var c=n(r,"throw");if(void 0===c){try{s(r,"normal")}catch(e){return l(e)}return l(new TypeError("The iterator does not provide a throw method"))}var d=t(o?e(c,r,i):e(c,r));g(d,a,l,r,!0)})}}),BCe=f}function sSe(){if(YCe)return ZCe;YCe=1;var e=Sue(),t=jae(),r=Iue(),n=function(){if(VCe)return jCe;VCe=1;var e=Qse(),t=iSe(),r=tce(),n=zpe(),o=Cye(),i=sle(),s=Ule()("asyncIterator");return jCe=function(a,l){var c=arguments.length<2?i(a,s):l;return c?r(e(c,a)):new t(o(n(a)))},jCe}(),o=zpe(),i=Cye(),s=Mpe(),a=sle(),l=Jae(),c=Rme(),d=Ule(),u=iSe(),h=function(){if(GCe)return qCe;GCe=1;var e=Qse(),t=ile(),r=tce(),n=Yae(),o=oge(),i=Jae(),s=Tue(),a=ige(),l=Cye(),c=function(){if(KCe)return WCe;KCe=1;var e=Qse(),t=tce(),r=Jae(),n=sle();return WCe=function(o,i,s,a){try{var l=n(o,"return");if(l)return r("Promise").resolve(e(l,o)).then(function(e){try{i!==a&&t(e)}catch(e){return void a(e)}i(s)},function(e){i===a?i(s):a(e)})}catch(e){return a(i===a?s:e)}i(s)},WCe}(),d=function(d){var u=0===d,h=1===d,p=2===d,g=3===d;return function(d,f,m){r(d);var v=void 0!==f;(v||!u)&&t(f);var b=l(d),y=i("Promise"),w=b.iterator,x=b.next,_=0;return new y(function(t,i){var l=function(e){c(w,i,e,i)},d=function(){try{try{o(_)}catch(e){return l(e)}y.resolve(r(e(x,w))).then(function(e){try{if(r(e).done)u?(a(m,_),t(m)):t(!g&&(p||void 0));else{var o=e.value;try{if(v){var b=_++,x=f(o,b),k=function(e){if(h)d();else if(p)e?d():c(w,t,!1,i);else if(u)try{s(m,b,e),d()}catch(e){l(e)}else e?c(w,t,g||o,i):d()};n(x)?y.resolve(x).then(k,l):k(x)}else s(m,_++,o),d()}catch(e){l(e)}}}catch(e){i(e)}},i)}catch(e){i(e)}};d()})}};return qCe={toArray:d(0),forEach:d(1),every:d(2),some:d(3),find:d(4)}}().toArray,p=d("asyncIterator"),g=t(c("Array","values")),f=t(g([]).next),m=function(){return new v(this)},v=function(e){this.iterator=g(e)};return v.prototype.next=function(){return f(this.iterator)},ZCe=function(t){var c=this,d=arguments.length,g=d>1?arguments[1]:void 0,f=d>2?arguments[2]:void 0;return new(l("Promise"))(function(l){void 0!==g&&(g=e(g,f));var d=a(t,p),v=d?void 0:s(t)||m,b=r(c)?new c:[],y=d?n(t,d):new u(i(o(t,v)));l(h(y,g,b))})},ZCe}var aSe,lSe,cSe,dSe,uSe,hSe,pSe,gSe,fSe,mSe={},vSe={},bSe={},ySe={},wSe={},xSe={},_Se={};function kSe(){if(gSe)return pSe;gSe=1;var e=zle();return pSe=function(t){return void 0!==t&&(e(t,"value")||e(t,"writable"))},pSe}var CSe,SSe,ESe,ISe,ASe,TSe,OSe,LSe,$Se,NSe,RSe,PSe,DSe,MSe,zSe,FSe,USe,BSe,HSe,jSe,VSe,WSe,KSe,qSe,GSe={},ZSe={},YSe={},JSe={},QSe={},XSe={},eEe={},tEe={};function rEe(){if(RSe)return NSe;RSe=1;var e=Yae(),t=Vae(),r=Ule()("match");return NSe=function(n){var o;return e(n)&&(void 0!==(o=n[r])?!!o:"RegExp"===t(n))},NSe}function nEe(){if(DSe)return PSe;DSe=1;var e=Fse(),t=Zse(),r=e.RegExp,n=!t(function(){var e=!0;try{r(".","d")}catch{e=!1}var t={},n="",o=e?"dgimsy":"gimsy",i=function(e,r){Object.defineProperty(t,e,{get:function(){return n+=r,!0}})},s={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in e&&(s.hasIndices="d"),s)i(a,s[a]);return Object.getOwnPropertyDescriptor(r.prototype,"flags").get.call(t)!==o||n!==o});return PSe={correct:n}}function oEe(){if(zSe)return MSe;zSe=1;var e=tce();return MSe=function(){var t=e(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r},MSe}function iEe(){if(USe)return FSe;USe=1;var e=Qse(),t=zle(),r=Qae(),n=nEe(),o=oEe(),i=RegExp.prototype;return FSe=n.correct?function(e){return e.flags}:function(s){return n.correct||!r(i,s)||t(s,"flags")?s.flags:e(o,s)},FSe}function sEe(){if(HSe)return BSe;HSe=1;var e=Zse(),t=Fse().RegExp,r=e(function(){var e=t("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),n=r||e(function(){return!t("a","y").sticky}),o=r||e(function(){var e=t("^r","gy");return e.lastIndex=2,null!==e.exec("str")});return BSe={BROKEN_CARET:o,MISSED_STICKY:n,UNSUPPORTED_Y:r}}function aEe(){if(VSe)return jSe;VSe=1;var e=Zse(),t=Fse().RegExp;return jSe=e(function(){var e=t(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}),jSe}
5991function lEe(){if(KSe)return WSe;KSe=1;var e=Zse(),t=Fse().RegExp;return WSe=e(function(){var e=t("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),WSe}var cEe,dEe,uEe,hEe={};function pEe(){if(dEe)return cEe;dEe=1;var e=TypeError;return cEe=function(t){if("string"==typeof t)return t;throw new e("Argument is not a string")},cEe}var gEe,fEe,mEe,vEe,bEe={},yEe={};function wEe(){if(mEe)return fEe;mEe=1;var e=Qse(),t=jae(),r=Cde(),n=oEe(),o=sEe(),i=Dle(),s=Dde(),a=Sce().get,l=aEe(),c=lEe(),d=i("native-string-replace",String.prototype.replace),u=RegExp.prototype.exec,h=u,p=t("".charAt),g=t("".indexOf),f=t("".replace),m=t("".slice),v=function(){var t=/a/,r=/b*/g;return e(u,t,"a"),e(u,r,"a"),0!==t.lastIndex||0!==r.lastIndex}(),b=o.BROKEN_CARET,y=void 0!==/()??/.exec("")[1],w=function(e,t){for(var r=e.groups=s(null),n=0;n<t.length;n++){var o=t[n];r[o[0]]=e[o[1]]}};return(v||y||b||l||c)&&(h=function(t){var o,i,s,l=this,c=a(l),x=r(t),_=c.raw;if(_)return _.lastIndex=l.lastIndex,o=e(h,_,x),l.lastIndex=_.lastIndex,o&&c.groups&&w(o,c.groups),o;var k=c.groups,C=b&&l.sticky,S=e(n,l),E=l.source,I=0,A=x;if(C){S=f(S,"y",""),-1===g(S,"g")&&(S+="g"),A=m(x,l.lastIndex);var T=l.lastIndex>0&&p(x,l.lastIndex-1);l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==T&&"\r"!==T&&"\u2028"!==T&&"\u2029"!==T)&&(E="(?: (?:"+E+"))",A=" "+A,I++),i=new RegExp("^(?:"+E+")",S)}y&&(i=new RegExp("^"+E+"$(?!\\s)",S)),v&&(s=l.lastIndex);var O=e(u,C?i:l,A);return C?O?(O.input=x,O[0]=m(O[0],I),O.index=l.lastIndex,l.lastIndex+=O[0].length):l.lastIndex=0:v&&O&&(l.lastIndex=l.global?O.index+O[0].length:s),y&&O&&O.length>1&&e(d,O[0],i,function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(O[e]=void 0)}),O&&k&&w(O,k),O}),fEe=h}function xEe(){if(vEe)return yEe;vEe=1;var e=xde(),t=wEe();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),yEe}var _Ee,kEe,CEe,SEe,EEe,IEe,AEe={},TEe={},OEe={},LEe={};var $Ee,NEe,REe,PEe,DEe,MEe,zEe,FEe,UEe,BEe,HEe,jEe,VEe,WEe,KEe,qEe,GEe,ZEe,YEe,JEe={};function QEe(){if(NEe)return $Ee;NEe=1;var e=jae(),t=Set.prototype;return $Ee={Set:Set,add:e(t.add),has:e(t.has),remove:e(t.delete),proto:t}}function XEe(){if(PEe)return REe;PEe=1;var e=QEe().has;return REe=function(t){return e(t),t},REe}function eIe(){if(MEe)return DEe;MEe=1;var e=Qse();return DEe=function(t,r,n){for(var o,i,s=n?t:t.iterator,a=t.next;!(o=e(a,s)).done;)if(void 0!==(i=r(o.value)))return i},DEe}function tIe(){if(FEe)return zEe;FEe=1;var e=jae(),t=eIe(),r=QEe(),n=r.Set,o=r.proto,i=e(o.forEach),s=e(o.keys),a=s(new n).next;return zEe=function(e,r,n){return n?t({iterator:s(e),next:a},r):i(e,r)},zEe}function rIe(){if(BEe)return UEe;BEe=1;var e=QEe(),t=tIe(),r=e.Set,n=e.add;return UEe=function(e){var o=new r;return t(e,function(e){n(o,e)}),o},UEe}function nIe(){if(jEe)return HEe;jEe=1;var e=Zhe(),t=QEe();return HEe=e(t.proto,"size","get")||function(e){return e.size},HEe}function oIe(){if(WEe)return VEe;WEe=1;var e=ile(),t=tce(),r=Qse(),n=qce(),o=Cye(),i="Invalid size",s=RangeError,a=TypeError,l=Math.max,c=function(t,r){this.set=t,this.size=l(r,0),this.has=e(t.has),this.keys=e(t.keys)};return c.prototype={getIterator:function(){return o(t(r(this.keys,this.set)))},includes:function(e){return r(this.has,this.set,e)}},VEe=function(e){t(e);var r=+e.size;if(r!=r)throw new a(i);var o=n(r);if(o<0)throw new s(i);return new c(e,o)},VEe}function iIe(){if(ZEe)return GEe;ZEe=1;var e=Jae(),t=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},r=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};return GEe=function(n,o){var i=e("Set");try{(new i)[n](t(0));try{return(new i)[n](t(-1)),!1}catch{if(!o)return!0;try{return(new i)[n](r(-1/0)),!1}catch{return o(new i([1,2])[n](r(1/0)))}}}catch{return!1}},GEe}var sIe,aIe,lIe,cIe={};var dIe,uIe,hIe,pIe={};var gIe,fIe,mIe,vIe={};var bIe,yIe,wIe,xIe={};var _Ie,kIe,CIe,SIe,EIe,IIe={};function AIe(){return SIe||(SIe=1,CIe=function(e){try{var t=new Set,r={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}},n=t[e](r);return 1===n.size&&4===n.values().next().value}catch{return!1}}),CIe}var TIe,OIe,LIe,$Ie={};var NIe,RIe,PIe,DIe,MIe={},zIe={};
5991function FIe(){if(PIe)return RIe;PIe=1;var e=jae(),t=qce(),r=Cde(),n=qae(),o=e("".charAt),i=e("".charCodeAt),s=e("".slice),a=function(e){return function(a,l){var c,d,u=r(n(a)),h=t(l),p=u.length;return h<0||h>=p?e?"":void 0:(c=i(u,h))<55296||c>56319||h+1===p||(d=i(u,h+1))<56320||d>57343?e?o(u,h):c:e?s(u,h,h+2):d-56320+(c-55296<<10)+65536}};return RIe={codeAt:a(!1),charAt:a(!0)}}var UIe,BIe,HIe,jIe,VIe,WIe={};function KIe(){if(BIe)return UIe;BIe=1;var e=rEe(),t=TypeError;return UIe=function(r){if(e(r))throw new t("The method doesn't accept regular expressions");return r},UIe}function qIe(){if(jIe)return HIe;jIe=1;var e=Ule()("match");return HIe=function(t){var r=/./;try{"/./"[t](r)}catch{try{return r[e]=!1,"/./"[t](r)}catch{}}return!1},HIe}var GIe,ZIe={};function YIe(){if(GIe)return ZIe;GIe=1;var e=xde(),t=jae(),r=Gce(),n=RangeError,o=String.fromCharCode,i=String.fromCodePoint,s=t([].join);return e({target:"String",stat:!0,arity:1,forced:!!i&&1!==i.length},{fromCodePoint:function(e){for(var t,i=[],a=arguments.length,l=0;a>l;){if(r(t=+arguments[l],1114111)!==t)throw new n(t+" is not a valid code point");i[l++]=t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320)}return s(i,"")}}),ZIe}var JIe,QIe,XIe,eAe={},tAe={},rAe={};function nAe(){if(XIe)return rAe;XIe=1;var e=FIe().charAt,t=Cde(),r=Sce(),n=Cfe(),o=Sfe(),i="String Iterator",s=r.set,a=r.getterFor(i);return n(String,"String",function(e){s(this,{type:i,string:t(e),index:0})},function(){var t,r=a(this),n=r.string,i=r.index;return i>=n.length?o(void 0,!0):(t=e(n,i),r.index+=t.length,o(t,!1))}),rAe}var oAe,iAe,sAe,aAe,lAe,cAe,dAe,uAe={};function hAe(){if(iAe)return oAe;iAe=1,xEe();var e=Qse(),t=Ice(),r=wEe(),n=Zse(),o=Ule(),i=nce(),s=o("species"),a=RegExp.prototype;return oAe=function(l,c,d,u){var h=o(l),p=!n(function(){var e={};return e[h]=function(){return 7},7!==""[l](e)}),g=p&&!n(function(){var e=!1,t=/a/;if("split"===l){var r={};r[s]=function(){return t},(t={constructor:r,flags:""})[h]=/./[h]}return t.exec=function(){return e=!0,null},t[h](""),!e});if(!p||!g||d){var f=/./[h],m=c(h,""[l],function(t,n,o,i,s){var l=n.exec;return l===r||l===a.exec?p&&!s?{done:!0,value:e(f,n,o,i)}:{done:!0,value:e(t,o,n,i)}:{done:!1}});t(String.prototype,l,m[0]),t(a,h,m[1])}u&&i(a[h],"sham",!0)},oAe}function pAe(){if(aAe)return sAe;aAe=1;var e=FIe().charAt;return sAe=function(t,r,n){return r+(n&&e(t,r).length||1)},sAe}function gAe(){if(cAe)return lAe;cAe=1;var e=Qse(),t=tce(),r=Zae(),n=Vae(),o=wEe(),i=TypeError;return lAe=function(s,a){var l=s.exec;if(r(l)){var c=e(l,s,a);return null!==c&&t(c),c}if("RegExp"===n(s))return e(o,s,a);throw new i("RegExp#exec called on incompatible receiver")},lAe}var fAe,mAe,vAe,bAe,yAe={},wAe={};function xAe(){if(vAe)return mAe;vAe=1;var e=Xae();return mAe=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(e)}var _Ae,kAe,CAe,SAe,EAe,IAe,AAe={},TAe={},OAe={};function LAe(){if(EAe)return SAe;EAe=1;var e=jae(),t=Mle(),r=Math.floor,n=e("".charAt),o=e("".replace),i=e("".slice),s=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,a=/\$([$&'`]|\d{1,2})/g;return SAe=function(e,l,c,d,u,h){var p=c+e.length,g=d.length,f=a;return void 0!==u&&(u=t(u),f=s),o(h,f,function(t,o){var s;switch(n(o,0)){case"$":return"$";case"&":return e;case"`":return i(l,0,c);case"'":return i(l,p);case"<":s=u[i(o,1,-1)];break;default:var a=+o;if(0===a)return t;if(a>g){var h=r(a/10);return 0===h?t:h<=g?void 0===d[h-1]?n(o,1):d[h-1]+n(o,1):t}s=d[a-1]}return void 0===s?"":s})},SAe}var $Ae,NAe,RAe,PAe,DAe,MAe,zAe,FAe,UAe,BAe={},HAe={},jAe={},VAe={},WAe={},KAe={},qAe={};function GAe(){if(FAe)return zAe;FAe=1;var e=wce().PROPER,t=Zse(),r=Rxe();return zAe=function(n){return t(function(){return!!r[n]()||"​…᠎"!=="​…᠎"[n]()||e&&r[n].name!==n})}}var ZAe,YAe,JAe,QAe,XAe={},eTe={};function tTe(){if(YAe)return ZAe;YAe=1;var e=Pxe().end,t=GAe();return ZAe=t("trimEnd")?function(){return e(this)}:"".trimEnd}var rTe,nTe,oTe,iTe,sTe={},aTe={};function lTe(){if(nTe)return rTe;nTe=1;var e=Pxe().start,t=GAe();return rTe=t("trimStart")?function(){return e(this)}:"".trimStart}var cTe,dTe,uTe,hTe,pTe,gTe={};function fTe(){if(dTe)return cTe;dTe=1;var e=jae(),t=qae(),r=Cde(),n=/"/g,o=e("".replace);return cTe=function(e,i,s,a){var l=r(t(e)),c="<"+i;return""!==s&&(c+=" "+s+'="'+o(r(a),n,"&quot;")+'"'),c+">"+l+"</"+i+">"},cTe}function mTe(){if(hTe)return uTe;hTe=1;var e=Zse();return uTe=function(t){return e(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})},uTe}var vTe,bTe,yTe,wTe,xTe,_Te,kTe,CTe,STe,ETe,ITe,ATe,TTe,OTe,LTe,$Te,NTe,RTe,PTe,DTe,MTe,zTe,FTe,UTe,BTe,HTe,jTe,VTe,WTe,KTe,qTe,GTe,ZTe,YTe,JTe={},QTe={},XTe={},eOe={},tOe={},rOe={},nOe={},oOe={},iOe={},sOe={},aOe={},lOe={},cOe={exports:{}};function dOe(){if(OTe)return TTe;OTe=1;var e=Fse(),t=Zse(),r=sfe(),n=Cve().NATIVE_ARRAY_BUFFER_VIEWS,o=e.ArrayBuffer,i=e.Int8Array;return TTe=!n||!t(function(){i(1)})||!t(function(){new i(-1)})||!r(function(e){new i,new i(null),new i(1.5),new i(e)},!0)||t(function(){return 1!==new i(new o(2),1,void 0).length}),TTe}function uOe(){if($Te)return LTe;$Te=1;var e=Eye(),t=RangeError;return LTe=function(r,n){var o=e(r);if(o%n)throw new t("Wrong offset");return o},LTe}function hOe(){if(DTe)return PTe;DTe=1;var e=kde();return PTe=function(t){var r=e(t);return"BigInt64Array"===r||"BigUint64Array"===r},PTe}function pOe(){if(zTe)return MTe;zTe=1;var e=Ble(),t=TypeError;return MTe=function(r){var n=e(r,"number");if("number"==typeof n)throw new t("Can't convert number to bigint");return BigInt(n)},MTe}function gOe(){if(UTe)return FTe;UTe=1;var e=Sue(),t=Qse(),r=ile(),n=rCe(),o=Mle(),i=Yce(),s=zpe(),a=Mpe(),l=Dpe(),c=hOe(),d=Cve().aTypedArrayConstructor,u=pOe();return FTe=function(h){var p=n(this),g=arguments.length,f=g>1?arguments[1]:void 0,m=void 0!==f;m&&r(f);var v,b,y,w,x,_,k,C,S=o(h),E=a(S);if(E&&!l(E))for(C=(k=s(S,E)).next,S=[];!(_=t(C,k)).done;)S.push(_.value);for(m&&g>2&&(f=e(f,arguments[2])),b=i(S),y=new(d(p))(b),w=c(y),v=0;b>v;v++)x=m?f(S[v],v):S[v],y[v]=w?u(x):+x;return y},FTe}function fOe(){if(BTe)return cOe.exports;BTe=1;var e=xde(),t=Fse(),r=Qse(),n=Yse(),o=dOe(),i=Cve(),s=yve(),a=pve(),l=Hae(),c=nce(),d=Vxe(),u=gve(),h=uOe(),p=function(){if(RTe)return NTe;RTe=1;var e=Math.floor;return NTe=function(t){var r=+t;if(r!=r||r<=0)return 0;if(r>=255)return 255;var n=e(r);return n+.5<r?n+1:r<n+.5||n%2==0?n:n+1},NTe}(),g=Hle(),f=zle(),m=kde(),v=Yae(),b=nle(),y=Dde(),w=Qae(),x=Qhe(),_=ede().f,k=gOe(),C=Oue().forEac
5991h,S=_me(),E=Wde(),I=rce(),A=Wle(),T=Nme(),O=Sce(),L=epe(),$=O.get,N=O.set,R=O.enforce,P=I.f,D=A.f,M=t.RangeError,z=s.ArrayBuffer,F=z.prototype,U=s.DataView,B=i.NATIVE_ARRAY_BUFFER_VIEWS,H=i.TYPED_ARRAY_TAG,j=i.TypedArray,V=i.TypedArrayPrototype,W=i.isTypedArray,K="BYTES_PER_ELEMENT",q="Wrong length",G=function(e,t){E(e,t,{configurable:!0,get:function(){return $(this)[t]}})},Z=function(e){var t;return w(F,e)||"ArrayBuffer"===(t=m(e))||"SharedArrayBuffer"===t},Y=function(e,t){return W(e)&&!b(t)&&t in e&&d(+t)&&t>=0},J=function(e,t){return t=g(t),Y(e,t)?l(2,e[t]):D(e,t)},Q=function(e,t,r){return t=g(t),!(Y(e,t)&&v(r)&&f(r,"value"))||f(r,"get")||f(r,"set")||r.configurable||f(r,"writable")&&!r.writable||f(r,"enumerable")&&!r.enumerable?P(e,t,r):(e[t]=r.value,e)};return n?(B||(A.f=J,I.f=Q,G(V,"buffer"),G(V,"byteOffset"),G(V,"byteLength"),G(V,"length")),e({target:"Object",stat:!0,forced:!B},{getOwnPropertyDescriptor:J,defineProperty:Q}),cOe.exports=function(n,i,s){var l=n.match(/\d+/)[0]/8,d=n+(s?"Clamped":"")+"Array",g="get"+n,f="set"+n,m=t[d],b=m,w=b&&b.prototype,E={},I=function(e,t){P(e,t,{get:function(){return function(e,t){var r=$(e);return r.view[g](t*l+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var n=$(e);n.view[f](t*l+n.byteOffset,s?p(r):r,!0)}(this,t,e)},enumerable:!0})};B?o&&(b=i(function(e,t,n,o){return a(e,w),L(v(t)?Z(t)?void 0!==o?new m(t,h(n,l),o):void 0!==n?new m(t,h(n,l)):new m(t):W(t)?T(b,t):r(k,b,t):new m(u(t)),e,b)}),x&&x(b,j),C(_(m),function(e){e in b||c(b,e,m[e])}),b.prototype=w):(b=i(function(e,t,n,o){a(e,w);var i,s,c,d=0,p=0;if(v(t)){if(!Z(t))return W(t)?T(b,t):r(k,b,t);i=t,p=h(n,l);var g=t.byteLength;if(void 0===o){if(g%l)throw new M(q);if((s=g-p)<0)throw new M(q)}else if((s=u(o)*l)+p>g)throw new M(q);c=s/l}else c=u(t),i=new z(s=c*l);for(N(e,{buffer:i,byteOffset:p,byteLength:s,length:c,view:new U(i)});d<c;)I(e,d++)}),x&&x(b,j),w=b.prototype=y(V)),w.constructor!==b&&c(w,"constructor",b),R(w).TypedArrayConstructor=b,H&&c(w,H,d);var A=b!==m;E[d]=b,e({global:!0,constructor:!0,forced:A,sham:!B},E),K in b||c(b,K,l),K in w||c(w,K,l),S(d)}):cOe.exports=function(){},cOe.exports}var mOe,vOe,bOe,yOe,wOe,xOe,_Oe,kOe={},COe={},SOe={},EOe={},IOe={};function AOe(){if(xOe)return wOe;xOe=1;var e=Nme(),t=Cve().getTypedArrayConstructor;return wOe=function(r,n){return e(t(r),n)},wOe}var TOe,OOe,LOe,$Oe,NOe,ROe,POe,DOe,MOe,zOe,FOe,UOe,BOe,HOe,jOe,VOe,WOe,KOe,qOe,GOe,ZOe,YOe,JOe,QOe,XOe,eLe,tLe,rLe,nLe,oLe,iLe,sLe,aLe,lLe,cLe,dLe={},uLe={},hLe={},pLe={},gLe={},fLe={},mLe={},vLe={},bLe={},yLe={},wLe={},xLe={},_Le={},kLe={},CLe={},SLe={},ELe={},ILe={},ALe={},TLe={},OLe={},LLe={},$Le={},NLe={},RLe={},PLe={},DLe={};function MLe(){if(rLe)return tLe;rLe=1;var e=Yae(),t=String,r=TypeError;return tLe=function(n){if(void 0===n||e(n))return n;throw new r(t(n)+" is not an object or undefined")},tLe}function zLe(){if(oLe)return nLe;oLe=1;var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=e+"+/",r=e+"-_",n=function(e){for(var t={},r=0;r<64;r++)t[e.charAt(r)]=r;return t};return nLe={i2c:t,c2i:n(t),i2cUrl:r,c2iUrl:n(r)}}function FLe(){if(sLe)return iLe;sLe=1;var e=TypeError;return iLe=function(t){var r=t&&t.alphabet;if(void 0===r||"base64"===r||"base64url"===r)return r||"base64";throw new e("Incorrect `alphabet` option")},iLe}function ULe(){if(lLe)return aLe;lLe=1;var e=Fse(),t=jae(),r=MLe(),n=pEe(),o=zle(),i=zLe(),s=FLe(),a=ibe(),l=i.c2i,c=i.c2iUrl,d=e.SyntaxError,u=e.TypeError,h=t("".charAt),p=function(e,t){for(var r=e.length;t<r;t++){var n=h(e,t);if(" "!==n&&"\t"!==n&&"\n"!==n&&"\f"!==n&&"\r"!==n)break}return t},g=function(e,t,r){var n=e.length;n<4&&(e+=2===n?"AA":"A");var o=(t[h(e,0)]<<18)+(t[h(e,1)]<<12)+(t[h(e,2)]<<6)+t[h(e,3)],i=[o>>16&255,o>>8&255,255&o];if(2===n){if(r&&0!==i[1])throw new d("Extra bits");return[i[0]]}if(3===n){if(r&&0!==i[2])throw new d("Extra bits");return[i[0],i[1]]}return i},f=function(e,t,r){for(var n=t.length,o=0;o<n;o++)e[r+o]=t[o];return r+n};return aLe=function(e,t,i,m){n(e),r(t);var v="base64"===s(t)?l:c,b=t?t.lastChunkHandling:void 0;if(void 0===b&&(b="loose"),"loose"!==b&&"strict"!==b&&"stop-before-partial"!==b)throw new u("Incorrect `lastChunkHandling` option");i&&a(i.buffer);var y=e.length,w=i||[],x=0,_=0,k="",C=0;if(m)for(;;){if((C=p(e,C))===y){if(k.length>0){if("stop-before-partial"===b)break;
5991if("loose"!==b)throw new d("Missing padding");if(1===k.length)throw new d("Malformed padding: exactly one additional character");x=f(w,g(k,v,!1),x)}_=y;break}var S=h(e,C);if(++C,"="===S){if(k.length<2)throw new d("Padding is too early");if(C=p(e,C),2===k.length){if(C===y){if("stop-before-partial"===b)break;throw new d("Malformed padding: only one =")}"="===h(e,C)&&(++C,C=p(e,C))}if(C<y)throw new d("Unexpected character after padding");x=f(w,g(k,v,"strict"===b),x),_=y;break}if(!o(v,S))throw new d("Unexpected character");var E=m-x;if(1===E&&2===k.length||2===E&&3===k.length||4===(k+=S).length&&(x=f(w,g(k,v,!1),x),k="",_=C,x===m))break}return{bytes:w,read:_,written:x}},aLe}var BLe,HLe,jLe,VLe={};function WLe(){if(HLe)return BLe;HLe=1;var e=Fse(),t=jae(),r=e.Uint8Array,n=e.SyntaxError,o=Math.min,i=t("".match);return BLe=function(e,t){var s=e.length;if(s%2!=0)throw new n("String should be an even number of characters");for(var a=t?o(t.length,s/2):s/2,l=t||new r(a),c=i(e,/.{2}/g),d=0;d<a;d++){var u=+("0x"+c[d]+"0");if(u!=u)throw new n("String should only contain hex characters");l[d]=u>>4}return{bytes:l,read:d<<1}},BLe}var KLe,qLe,GLe,ZLe={};function YLe(){if(qLe)return KLe;qLe=1;var e=kde(),t=TypeError;return KLe=function(r){if("Uint8Array"===e(r))return r;throw new t("Argument is not an Uint8Array")},KLe}var JLe,QLe,XLe,e$e,t$e,r$e,n$e,o$e,i$e={},s$e={},a$e={},l$e={},c$e={};function d$e(){if(r$e)return t$e;r$e=1;var e=jae(),t=hve(),r=Cwe().getWeakData,n=pve(),o=tce(),i=Kae(),s=Yae(),a=Upe(),l=Oue(),c=zle(),d=Sce(),u=d.set,h=d.getterFor,p=l.find,g=l.findIndex,f=e([].splice),m=0,v=function(e){return e.frozen||(e.frozen=new b)},b=function(){this.entries=[]},y=function(e,t){return p(e.entries,function(e){return e[0]===t})};return b.prototype={get:function(e){var t=y(this,e);if(t)return t[1]},has:function(e){return!!y(this,e)},set:function(e,t){var r=y(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=g(this.entries,function(t){return t[0]===e});return~t&&f(this.entries,t,1),!!~t}},t$e={getConstructor:function(e,l,d,p){var g=e(function(e,t){n(e,f),u(e,{type:l,id:m++,frozen:null}),i(t)||a(t,e[p],{that:e,AS_ENTRIES:d})}),f=g.prototype,b=h(l),y=function(e,t,n){var i=b(e),s=r(o(t),!0);return!0===s?v(i).set(t,n):s[i.id]=n,e};return t(f,{delete:function(e){var t=b(this);if(!s(e))return!1;var n=r(e);return!0===n?v(t).delete(e):n&&c(n,t.id)&&delete n[t.id]},has:function(e){var t=b(this);if(!s(e))return!1;var n=r(e);return!0===n?v(t).has(e):n&&c(n,t.id)}}),t(f,d?{get:function(e){var t=b(this);if(s(e)){var n=r(e);if(!0===n)return v(t).get(e);if(n)return n[t.id]}},set:function(e,t){return y(this,e,t)}}:{add:function(e){return y(this,e,!0)}}),g}},t$e}var u$e,h$e,p$e,g$e={};function f$e(){if(h$e)return u$e;h$e=1;var e=jae(),t=WeakMap.prototype;return u$e={WeakMap:WeakMap,set:e(t.set),get:e(t.get),has:e(t.has),remove:e(t.delete)}}var m$e,v$e,b$e,y$e,w$e,x$e={};var _$e,k$e;var C$e,S$e,E$e,I$e,A$e,T$e,O$e,L$e={},$$e={},N$e={};function R$e(){return I$e||(I$e=1,E$e={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),E$e}function P$e(){if(T$e)return A$e;T$e=1;var e=jle()("span").classList,t=e&&e.constructor&&e.constructor.prototype;return A$e=t===Object.prototype?void 0:t}var D$e,M$e,z$e,F$e,U$e={},B$e={};function H$e(){return z$e||(z$e=1,M$e={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0}
5991,NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}),M$e}var j$e,V$e,W$e,K$e,q$e,G$e,Z$e,Y$e={},J$e={},Q$e={},X$e={};function eNe(){if(q$e)return K$e;q$e=1;var e=Fse(),t=Gue(),r=Zae(),n=Zfe(),o=Xae(),i=jde(),s=oCe(),a=e.Function,l=/MSIE .\./.test(o)||"BUN"===n&&function(){var t=e.Bun.version.split(".");return t.length<3||"0"===t[0]&&(t[1]<3||"3"===t[1]&&"0"===t[2])}();return K$e=function(e,n){var o=n?2:1;return l?function(l,c){var d=s(arguments.length,1)>o,u=r(l)?l:a(l),h=d?i(arguments,o):[],p=d?function(){t(u,this,h)}:u;return n?e(p,c):e(p)}:e},K$e}var tNe,rNe,nNe,oNe={},iNe={},sNe={};var aNe,lNe,cNe,dNe={},uNe={};var hNe,pNe,gNe,fNe,mNe,vNe,bNe,yNe,wNe={};function xNe(){if(pNe)return hNe;pNe=1;var e=Zse(),t=Ule(),r=Yse(),n=Nle(),o=t("iterator");return hNe=!e(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,i=new URLSearchParams("a=1&a=2&b=3"),s="";return e.pathname="c%20d",t.forEach(function(e,r){t.delete("b"),s+=r+e}),i.delete("a",2),i.delete("b",void 0),n&&(!e.toJSON||!i.has("a",1)||i.has("a",2)||!i.has("a",void 0)||i.has("b"))||!t.size&&(n||!r)||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[o]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==s||"x"!==new URL("https://x",void 0).host}),hNe}function _Ne(){if(vNe)return mNe;vNe=1,Efe(),YIe();var e=xde(),t=Fse(),r=aCe(),n=Jae(),o=Qse(),i=jae(),s=Yse(),a=xNe(),l=Ice(),c=Wde(),d=hve(),u=kue(),h=kfe(),p=Sce(),g=pve(),f=Zae(),m=zle(),v=Sue(),b=kde(),y=tce(),w=Yae(),x=Cde(),_=Dde(),k=Hae(),C=zpe(),S=Mpe(),E=Sfe(),I=oCe(),A=Ule(),T=bme(),O=A("iterator"),L="URLSearchParams",$=L+"Iterator",N=p.set,R=p.getterFor(L),P=p.getterFor($),D=r("fetch"),M=r("Request"),z=r("Headers"),F=M&&M.prototype,U=z&&z.prototype,B=t.TypeError,H=t.encodeURIComponent,j=String.fromCharCode,V=n("String","fromCodePoint"),W=parseInt,K=i("".charAt),q=i([].join),G=i([].push),Z=i("".replace),Y=i([].shift),J=i([].splice),Q=i("".split),X=i("".slice),ee=i(/./.exec),te=/\+/g,re=/^[0-9a-f]+$/i,ne=function(e,t){var r=X(e,t,t+2);return ee(re,r)?W(r,16):NaN},oe=function(e){for(var t=0,r=128;r>0&&0!==(e&r);r>>=1)t++;return t},ie=function(e){var t=null,r=e.length;switch(r){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return null===t||t>1114111||t>=55296&&t<=57343||t<(r>3?65536:r>2?2048:r>1?128:0)?null:t},se=function(e){for(var t=(e=Z(e,te," ")).length,r="",n=0;n<t;){var o=K(e,n);if("%"===o){if("%"===K(e,n+1)||n+3>t){r+="%",n++;continue}var i=ne(e,n+1);if(i!=i){r+=o,n++;continue}n+=2;var s=oe(i);if(0===s)o=j(i);else{if(1===s||s>4){r+="�",n++;continue}for(var a=[i],l=1;l<s&&!(3+ ++n>t||"%"!==K(e,n));){var c=ne(e,n+1);if(c!=c||c>191||c<128||1===l&&(224===i&&c<160||237===i&&c>159||240===i&&c<144||244===i&&c>143))break;G(a,c),n+=2,l++}if(a.length!==s){r+="�";continue}var d=ie(a);if(null===d){for(var u=0;u<s;u++)r+="�";n++;continue}o=V(d)}}r+=o,n++}return r},ae=/[!'()~]|%20/g,le={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ce=function(e){return le[e]},de=function(e){return Z(H(e),ae,ce)},ue=h(function(e,t){N(this,{type:$,target:R(e).entries,index:0,kind:t})},L,function(){var e=P(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,E(void 0,!0);var n=t[r];switch(e.kind){case"keys":return E(n.key,!1);case"values":return E(n.value,!1)}return E([n.key,n.value],!1)},!0),he=function(e){this.entries=[],this.url=null,void 0!==e&&(w(e)?this.parseObject(e):this.parseQuery("str
5991ing"==typeof e?"?"===K(e,0)?X(e,1):e:x(e)))};he.prototype={type:L,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,s,a,l,c=this.entries,d=S(e);if(d)for(r=(t=C(e,d)).next;!(n=o(r,t)).done;){if(s=(i=C(y(n.value))).next,(a=o(s,i)).done||(l=o(s,i)).done||!o(s,i).done)throw new B("Expected sequence with length 2");G(c,{key:x(a.value),value:x(l.value)})}else for(var u in e)m(e,u)&&G(c,{key:u,value:x(e[u])})},parseQuery:function(e){if(e)for(var t,r,n=this.entries,o=Q(e,"&"),i=0;i<o.length;)(t=o[i++]).length&&(r=Q(t,"="),G(n,{key:se(Y(r)),value:se(q(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],G(r,de(e.key)+"="+de(e.value));return q(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var pe=function(){g(this,ge);var e=N(this,new he(arguments.length>0?arguments[0]:void 0));s||(this.size=e.entries.length)},ge=pe.prototype;if(d(ge,{append:function(e,t){var r=R(this);I(arguments.length,2),G(r.entries,{key:x(e),value:x(t)}),s||this.size++,r.updateURL()},delete:function(e){for(var t=R(this),r=I(arguments.length,1),n=t.entries,o=x(e),i=r<2?void 0:arguments[1],a=void 0===i?i:x(i),l=0;l<n.length;){var c=n[l];c.key!==o||void 0!==a&&c.value!==a?l++:J(n,l,1)}s||(this.size=n.length),t.updateURL()},get:function(e){var t=R(this).entries;I(arguments.length,1);for(var r=x(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){var t=R(this).entries;I(arguments.length,1);for(var r=x(e),n=[],o=0;o<t.length;o++)t[o].key===r&&G(n,t[o].value);return n},has:function(e){for(var t=R(this).entries,r=I(arguments.length,1),n=x(e),o=r<2?void 0:arguments[1],i=void 0===o?o:x(o),s=0;s<t.length;){var a=t[s++];if(a.key===n&&(void 0===i||a.value===i))return!0}return!1},set:function(e,t){var r=R(this);I(arguments.length,2);for(var n,o=r.entries,i=!1,a=x(e),l=x(t),c=0;c<o.length;c++)(n=o[c]).key===a&&(i?J(o,c--,1):(i=!0,n.value=l));i||G(o,{key:a,value:l}),s||(this.size=o.length),r.updateURL()},sort:function(){var e=R(this);T(e.entries,function(e,t){return e.key>t.key?1:-1}),e.updateURL()},forEach:function(e){for(var t,r=R(this).entries,n=v(e,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((t=r[o++]).value,t.key,this)},keys:function(){return new ue(this,"keys")},values:function(){return new ue(this,"values")},entries:function(){return new ue(this,"entries")}},{enumerable:!0}),l(ge,O,ge.entries,{name:"entries"}),l(ge,"toString",function(){return R(this).serialize()},{enumerable:!0}),s&&c(ge,"size",{get:function(){return R(this).entries.length},configurable:!0,enumerable:!0}),u(pe,L),e({global:!0,constructor:!0,forced:!a},{URLSearchParams:pe}),!a&&f(z)){var fe=i(U.has),me=i(U.set),ve=function(e){if(w(e)){var t,r=e.body;if(b(r)===L)return t=e.headers?new z(e.headers):new z,fe(t,"content-type")||me(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),_(e,{body:k(0,x(r)),headers:k(0,t)})}return e};if(f(D)&&e({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return D(e,arguments.length>1?ve(arguments[1]):{})}}),f(M)){var be=function(e){return g(this,F),new M(e,arguments.length>1?ve(arguments[1]):{})};F.constructor=be,be.prototype=F,e({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:be})}}return mNe={URLSearchParams:pe,getState:R}}var kNe,CNe,SNe,ENe,INe,ANe,TNe,ONe,LNe={},$Ne={},NNe={},RNe={},PNe={},DNe={};ONe||(ONe=1,ehe||(ehe=1,function(){if(vue)return zse;vue=1;var e=xde(),t=Fse(),r=Qse(),n=jae(),o=Nle(),i=Yse(),s=tle(),a=Zse(),l=zle(),c=Qae(),d=tce(),u=Gae(),h=Hle(),p=Cde(),g=Hae(),f=Dde(),m=Nde(),v=ede(),b=Vde(),y=vde(),w=Wle(),x=rce(),_=Rde(),k=Bae(),C=Ice(),S=Wde(),E=Dle(),I=kce(),A=Cce(),T=Fle(),O=Ule(),L=yue(),$=xue(),N=_ue(),R=kue(),P=Sce(),D=Oue().forEach,M=I("hidden"),z="Symbol",F="prototype",U=P.set,B=P.getterFor(z),H=Object[F],j=t.Symbol,V=j&&j[F],W=t.RangeError,K=t.TypeError,q=t.QObject,G=w.f,Z=x.f,Y=b.f,J=k.f,Q=n([].push),X=E("symbols"),ee=E("op-symbols"),te=E("wks"),re=!q||!q[F]||!q[F].findChild,ne=function(e,t,r){var n=G(H,t);return n&&delete H[t],Z(e,t,r),n&&e!==H&&Z(H,t,n),e},oe=i&&a(function(){return 7!==f(Z({},"a",{get:function(){return Z(this,"a",{value:7}).a}})).a})?ne:Z,ie=function(e,t){var r=X[e]=f(V);return U(r,{type:z,tag:e,description:t}),i||(r.description=t),r},se=function(e,t,r){e===H&&se(ee,t,r),d(e);var n=h(t);return d(r),l(X,n)?(("enumerable"in r?!r.enumerable:!l(e,n)||l(e,M)&&e[M][n])?(l(e,M)||Z(e,M,g(1,f(null))),e[M][n]=!0):(l(e,M)&&e[M][n]&&(e[M][n]=!1),r=f(r,{enumerable:g(0,!1)})),oe(e,n,r)):Z(e,n,r)},ae=function(e,t){d(e);var n=u(t),o=m(n).concat(ue(n));return D(o,function(t){(!i||r(le,n,t))&&se(e,t,n[t])}),e},le=function(e){var t=h(e),n=r(J,this,t);return!(this===H&&l(X,t)&&!l(ee,t))&&(!(n||!l(this,t)||!l(X,t)||l(this,M)&&this[M][t])||n)},ce=function(e,t){var r=u(e),n=h(t);if(r!==H||!l(X,n)||l(ee,n)){var o=G(r,n);return o&&l(X,n)&&!(l(r,M)&&r[M][n])&&(o.enumerable=!0),o}},de=function(e){var t=Y(u(e)),r=[];return D(t,function(e){!l(X,e)&&!l(A,e)&&Q(r,e)}),r},ue=function(e){var t=e===H,r=Y(t?ee:u(e)),n=[];return D(r,function(e){l(X,e)&&(!t||l(H,e))&&Q(n,X[e])}),n};
5991s||(j=function(){if(c(V,this))throw new K("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?p(arguments[0]):void 0,n=T(e),o=function(e){var i=void 0===this?t:this;i===H&&r(o,ee,e),l(i,M)&&l(i[M],n)&&(i[M][n]=!1);var s=g(1,e);try{oe(i,n,s)}catch(e){if(!(e instanceof W))throw e;ne(i,n,s)}};return i&&re&&oe(H,n,{configurable:!0,set:o}),ie(n,e)},C(V=j[F],"toString",function(){return B(this).tag}),C(j,"withoutSetter",function(e){return ie(T(e),e)}),k.f=le,x.f=se,_.f=ae,w.f=ce,v.f=b.f=de,y.f=ue,L.f=function(e){return ie(O(e),e)},i&&(S(V,"description",{configurable:!0,get:function(){return B(this).description}}),o||C(H,"propertyIsEnumerable",le,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!s,sham:!s},{Symbol:j}),D(m(te),function(e){$(e)}),e({target:z,stat:!0,forced:!s},{useSetter:function(){re=!0},useSimple:function(){re=!1}}),e({target:"Object",stat:!0,forced:!s,sham:!i},{create:function(e,t){return void 0===t?f(e):ae(f(e),t)},defineProperty:se,defineProperties:ae,getOwnPropertyDescriptor:ce}),e({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:de}),N(),R(j,z),A[M]=!0}(),function(){if(Nue)return Rue;Nue=1;var e=xde(),t=Jae(),r=zle(),n=Cde(),o=Dle(),i=Pue(),s=o("string-to-symbol-registry"),a=o("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!i},{for:function(e){var o=n(e);if(r(s,o))return s[o];var i=t("Symbol")(o);return s[o]=i,a[i]=o,i}})}(),function(){if(Due)return Kue;Due=1;var e=xde(),t=zle(),r=nle(),n=ole(),o=Dle(),i=Pue(),s=o("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!i},{keyFor:function(e){if(!r(e))throw new TypeError(n(e)+" is not a symbol");if(t(s,e))return s[e]}})}(),Que(),function(){if(Xue)return the;Xue=1;var e=xde(),t=tle(),r=Zse(),n=vde(),o=Mle();e({target:"Object",stat:!0,forced:!t||r(function(){n.f(1)})},{getOwnPropertySymbols:function(e){var t=n.f;return t?t(o(e)):[]}})}()),function(){if(rhe)return jhe;rhe=1;var e=xde(),t=Yse(),r=Fse(),n=Qse(),o=jae(),i=zle(),s=Zae(),a=Qae(),l=Cde(),c=Wde(),d=yde(),u=r.Symbol,h=u&&u.prototype;if(t&&s(u)&&(!("description"in h)||void 0!==u().description)){var p={},g=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),t=a(h,this)?new u(e):void 0===e?u():u(e);return""===e&&(p[t]=!0),t};d(g,u);var f=g.for;g.for=function(e){var t=l(e),r=n(f,this,t);return""===t&&(p[r]=!0),r},g.prototype=h,h.constructor=g;var m="Symbol(description detection)"===String(u("description detection")),v=o(h.valueOf),b=o(h.toString),y=/^Symbol\((.*)\)[^)]+$/,w=o("".replace),x=o("".slice);c(h,"description",{configurable:!0,get:function(){var e=v(this);if(i(p,e))return"";var t=b(e),r=m?x(t,7,-1):w(t,y,"$1");return""===r?void 0:r}}),e({global:!0,constructor:!0,forced:!0},{Symbol:g})}}(),function(){if(nhe)return Vhe;nhe=1;var e=Fse(),t=xue(),r=rce().f,n=Wle().f,o=e.Symbol;if(t("asyncDispose"),o){var i=n(o,"asyncDispose");i.enumerable&&i.configurable&&i.writable&&r(o,"asyncDispose",{value:i.value,enumerable:!1,configurable:!1,writable:!1})}}(),ohe||(ohe=1,xue()("asyncIterator")),function(){if(ihe)return Whe;ihe=1;var e=Fse(),t=xue(),r=rce().f,n=Wle().f,o=e.Symbol;if(t("dispose"),o){var i=n(o,"dispose");i.enumerable&&i.configurable&&i.writable&&r(o,"dispose",{value:i.value,enumerable:!1,configurable:!1,writable:!1})}}(),she||(she=1,xue()("hasInstance")),ahe||(ahe=1,xue()("isConcatSpreadable")),lhe||(lhe=1,xue()("iterator")),che||(che=1,xue()("match")),dhe||(dhe=1,xue()("matchAll")),uhe||(uhe=1,xue()("replace")),hhe||(hhe=1,xue()("search")),phe||(phe=1,xue()("species")),ghe||(ghe=1,xue()("split")),function(){if(fhe)return Khe;fhe=1;var e=xue(),t=_ue();e("toPrimitive"),t()}(),function(){if(mhe)return qhe;mhe=1;var e=Jae(),t=xue(),r=kue();t("toStringTag"),r(e("Symbol"),"Symbol")}(),vhe||(vhe=1,xue()("unscopables")),function(){if(Hhe)return Ghe;Hhe=1;var e=xde(),t=Fse(),r=Gue(),n=spe(),o="WebAssembly",i=t[o],s=7!==new Error("e",{cause:7}).cause,a=function(t,r){var o={};o[t]=n(t,r,s),e({global:!0,constructor:!0,arity:1,forced:s},o)},l=function(t,r){if(i&&i[t]){var a={};a[t]=n(o+"."+t,r,s),e({target:o,stat:!0,constructor:!0,arity:1,forced:s},a)}};a("Error",function(e){return function(t){return r(e,this,arguments)}}),a("EvalError",function(e){return function(t){return r(e,this,arguments)}}),a("RangeError",function(e){return function(t){return r(e,this,arguments)}}),a("ReferenceError",function(e){return function(t){return r(e,this,arguments)}}),a("SyntaxError",function(e){return function(t){return r(e,this,arguments)}}),a("TypeError",function(e){return function(t){return r(e,this,arguments)}}),a("URIError",function(e){return function(t){return r(e,this,arguments)}}),l("CompileError",function(e){return function(t){return r(e,this,arguments)}}),l("LinkError",function(e){return function(t){return r(e,this,arguments)}}),l("RuntimeError",function(e){return function(t){return r(e,this,arguments)}})}(),function(){if(ape)return upe;ape=1;var e=xde(),t=Jae(),r=Yae(),n=kde(),o=Zse(),i="Error",s="DOMException",a=Object.
5991setPrototypeOf||{}.__proto__,l=t(s),c=Error,d=c.isError;e({target:"Error",stat:!0,sham:!0,forced:!d||!a||o(function(){return l&&!d(new l(s))||!d(new c(i,{cause:function(){}}))||d(t("Object","create")(c.prototype))})},{isError:function(e){if(!r(e))return!1;var t=n(e);return t===i||t===s}})}(),function(){if(dpe)return hpe;dpe=1;var e=Ice(),t=ppe(),r=Error.prototype;r.toString!==t&&e(r,"toString",t)}(),Lpe||(Lpe=1,function(){if(Ope)return $pe;Ope=1;var e=xde(),t=Qae(),r=Rpe(),n=Qhe(),o=yde(),i=Dde(),s=nce(),a=Hae(),l=rpe(),c=ipe(),d=Upe(),u=tpe(),h=Ule()("toStringTag"),p=Error,g=[].push,f=function(e,o){var a,v=t(m,this);n?a=n(new p,v?r(this):m):(a=v?this:i(m),s(a,h,"Error")),void 0!==o&&s(a,"message",u(o)),c(a,f,a.stack,1),arguments.length>2&&l(a,arguments[2]);var b=[];return d(e,g,{that:b}),s(a,"errors",b),a};n?n(f,p):o(f,p,{name:!0});var m=f.prototype=i(p.prototype,{constructor:a(1,f),message:a(1,""),name:a(1,"AggregateError")});e({global:!0,constructor:!0,arity:2},{AggregateError:f})}()),function(){if(Bpe)return Kpe;Bpe=1;var e=xde(),t=Jae(),r=Gue(),n=Zse(),o=spe(),i="AggregateError",s=t(i),a=!n(function(){return 1!==s([1]).errors[0]})&&n(function(){return 7!==s([1],i,{cause:7}).cause});e({global:!0,constructor:!0,arity:2,forced:a},{AggregateError:o(i,function(e){return function(t,n){return r(e,this,arguments)}},a,!0)})}(),function(){if(Hpe)return qpe;Hpe=1;var e=xde(),t=Fse(),r=Qae(),n=Rpe(),o=Qhe(),i=yde(),s=Dde(),a=nce(),l=Hae(),c=ipe(),d=tpe(),u=Ule(),h=Zse(),p=Nle(),g=t.SuppressedError,f=u("toStringTag"),m=Error,v=!!g&&3!==g.length,b=!!g&&h(function(){return 4===new g(1,2,3,{cause:4}).cause}),y=v||b,w=function(e,t,i){var l,u=r(x,this);return o?l=!y||u&&n(this)!==x?o(new m,u?n(this):x):new g:(l=u?this:s(x),a(l,f,"Error")),void 0!==i&&a(l,"message",d(i)),c(l,w,l.stack,1),a(l,"error",e),a(l,"suppressed",t),l};o?o(w,m):i(w,m,{name:!0});var x=w.prototype=y?g.prototype:s(m.prototype,{constructor:l(1,w),message:l(1,""),name:l(1,"SuppressedError")});y&&!p&&(x.constructor=w),e({global:!0,constructor:!0,arity:3,forced:y},{SuppressedError:w})}(),function(){if(Wpe)return Gpe;Wpe=1;var e=xde(),t=Mle(),r=Yce(),n=qce(),o=Zpe();e({target:"Array",proto:!0},{at:function(e){var o=t(this),i=r(o),s=n(e),a=s>=0?s:i+s;return a<0||a>=i?void 0:o[a]}}),o("at")}(),function(){if(rge)return nge;rge=1;var e=xde(),t=Zse(),r=Eue(),n=Yae(),o=Mle(),i=Yce(),s=oge(),a=Tue(),l=ige(),c=Aue(),d=sge(),u=Ule(),h=ele(),p=u("isConcatSpreadable"),g=h>=51||!t(function(){var e=[];return e[p]=!1,e.concat()[0]!==e}),f=function(e){if(!n(e))return!1;var t=e[p];return void 0!==t?!!t:r(e)};e({target:"Array",proto:!0,arity:1,forced:!g||!d("concat")},{concat:function(e){var t,r,n,d,u,h=o(this),p=c(h,0),g=0;for(t=-1,n=arguments.length;t<n;t++)if(f(u=-1===t?h:arguments[t]))for(d=i(u),s(g+d),r=0;r<d;r++,g++)r in u&&a(p,g,u[r]);else s(g+1),a(p,g++,u);return l(p,g),p}})}(),function(){if(uge)return hge;uge=1;var e=xde(),t=gge(),r=Zpe();e({target:"Array",proto:!0},{copyWithin:t}),r("copyWithin")}(),function(){if(vge)return bge;vge=1;var e=xde(),t=Oue().every;e({target:"Array",proto:!0,forced:!yge()("every")},{every:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})}(),function(){if(_ge)return kge;_ge=1;var e=xde(),t=Cge(),r=Zpe();e({target:"Array",proto:!0},{fill:t}),r("fill")}(),function(){if(Sge)return Lge;Sge=1;var e=xde(),t=Oue().filter;e({target:"Array",proto:!0,forced:!sge()("filter")},{filter:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})}(),function(){if(Ege)return $ge;Ege=1;var e=xde(),t=Oue().find,r=Zpe(),n="find",o=!0;n in[]&&Array(1)[n](function(){o=!1}),e({target:"Array",proto:!0,forced:o},{find:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),r(n)}(),function(){if(Ige)return Nge;Ige=1;var e=xde(),t=Oue().findIndex,r=Zpe(),n="findIndex",o=!0;n in[]&&Array(1)[n](function(){o=!1}),e({target:"Array",proto:!0,forced:o},{findIndex:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),r(n)}(),function(){if(Oge)return Rge;Oge=1;var e=xde(),t=Pge().findLast,r=Zpe();e({target:"Array",proto:!0},{findLast:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),r("findLast")}(),function(){if(Dge)return Uge;Dge=1;var e=xde(),t=Pge().findLastIndex,r=Zpe();e({target:"Array",proto:!0},{findLastIndex:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),r("findLastIndex")}(),function(){if(Fge)return Bge;Fge=1;var e=xde(),t=Hge(),r=Mle(),n=Yce(),o=qce(),i=Aue();e({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,s=r(this),a=n(s),l=void 0===e?1:o(e),c=i(s,0);return t(c,s,s,a,0,l),c}})}(),function(){if(jge)return qge;jge=1;var e=xde(),t=Hge(),r=ile(),n=Mle(),o=Yce(),i=Aue();e({target:"Array",proto:!0},{flatMap:function(e){var s,a=n(this),l=o(a);return r(e),s=i(a,0),t(s,a,a,l,0,1,e,arguments.length>1?arguments[1]:void 0),s}})}(),function(){if(Kge)return Gge;Kge=1;var e=xde(),t=Zge();e({target:"Array",proto:!0,forced:[].forEach!==t},{forEach:t})}(),function(){if(rfe)return nfe;rfe=1;var e=xde(),t=ife();e({target:"Array",stat:!0,forced:!sfe()(function(e){Array.from(e)})},{from:t})}(),function(){if(afe)return wfe;afe=1;var e=xde(),t=Jce().includes,r=Zse(),n=Zpe(),o=r(function(){return!Array(1).includes()}
5991),i=r(function(){return[,1].includes(void 0,1)});e({target:"Array",proto:!0,forced:o||i},{includes:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),n("includes")}(),function(){if(lfe)return xfe;lfe=1;var e=xde(),t=Cue(),r=Jce().indexOf,n=yge(),o=t([].indexOf),i=!!o&&1/o([1],1,-0)<0;e({target:"Array",proto:!0,forced:i||!n("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return i?o(this,e,t)||0:r(this,e,t)}})}(),cfe||(cfe=1,xde()({target:"Array",stat:!0},{isArray:Eue()})),Efe(),function(){if(Ife)return Lfe;Ife=1;var e=xde(),t=jae(),r=Wae(),n=Gae(),o=yge(),i=t([].join);e({target:"Array",proto:!0,forced:r!==Object||!o("join",",")},{join:function(e){return i(n(this),void 0===e?",":e)}})}(),function(){if(Ofe)return $fe;Ofe=1;var e=xde(),t=Nfe();e({target:"Array",proto:!0,forced:t!==[].lastIndexOf},{lastIndexOf:t})}(),function(){if(Rfe)return Vfe;Rfe=1;var e=xde(),t=Oue().map;e({target:"Array",proto:!0,forced:!sge()("map")},{map:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})}(),function(){if(Pfe)return Wfe;Pfe=1;var e=xde(),t=Zse(),r=Iue(),n=Tue(),o=ige(),i=Array,s=t(function(){function e(){}return!(i.of.call(e)instanceof e)});e({target:"Array",stat:!0,forced:s},{of:function(){for(var e=0,t=arguments.length,s=new(r(this)?this:i)(t);t>e;)n(s,e,arguments[e++]);return o(s,t),s}})}(),function(){if(Dfe)return Kfe;Dfe=1;var e=xde(),t=Mle(),r=Yce(),n=ige(),o=oge(),i=Zse()(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}();e({target:"Array",proto:!0,arity:1,forced:i},{push:function(e){var i=t(this),s=r(i),a=arguments.length;o(s+a);for(var l=0;l<a;l++)i[s]=arguments[l],s++;return n(i,s),s}})}(),function(){if(jfe)return qfe;jfe=1;var e=xde(),t=Gfe().left,r=yge(),n=ele();e({target:"Array",proto:!0,forced:!Yfe()&&n>79&&n<83||!r("reduce")},{reduce:function(e){var r=arguments.length;return t(this,e,r,r>1?arguments[1]:void 0)}})}(),function(){if(Jfe)return pme;Jfe=1;var e=xde(),t=Gfe().right,r=yge(),n=ele();e({target:"Array",proto:!0,forced:!Yfe()&&n>79&&n<83||!r("reduceRight")},{reduceRight:function(e){return t(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})}(),function(){if(Qfe)return gme;Qfe=1;var e=xde(),t=jae(),r=Eue(),n=t([].reverse),o=[1,2];e({target:"Array",proto:!0,forced:String(o)===String(o.reverse())},{reverse:function(){return r(this)&&(this.length=this.length),n(this)}})}(),function(){if(Xfe)return fme;Xfe=1;var e=xde(),t=Eue(),r=Iue(),n=Yae(),o=Gce(),i=Yce(),s=Gae(),a=Tue(),l=ige(),c=Ule(),d=sge(),u=jde(),h=d("slice"),p=c("species"),g=Array,f=Math.max;e({target:"Array",proto:!0,forced:!h},{slice:function(e,c){var d,h,m,v=s(this),b=i(v),y=o(e,b),w=o(void 0===c?b:c,b);if(t(v)&&(d=v.constructor,(r(d)&&(d===g||t(d.prototype))||n(d)&&null===(d=d[p]))&&(d=void 0),d===g||void 0===d))return u(v,y,w);for(h=new(void 0===d?g:d)(f(w-y,0)),m=0;y<w;y++,m++)y in v&&a(h,m,v[y]);return l(h,m),h}})}(),function(){if(eme)return mme;eme=1;var e=xde(),t=Oue().some;e({target:"Array",proto:!0,forced:!yge()("some")},{some:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})}(),function(){if(cme)return vme;cme=1;var e=xde(),t=jae(),r=ile(),n=Mle(),o=Yce(),i=pge(),s=Cde(),a=Zse(),l=bme(),c=yge(),d=yme(),u=wme(),h=ele(),p=xme(),g=[],f=t(g.sort),m=t(g.push),v=a(function(){g.sort(void 0)}),b=a(function(){g.sort(null)}),y=c("sort"),w=!a(function(){if(h)return h<70;if(!(d&&d>3)){if(u)return!0;if(p)return p<603;var e,t,r,n,o="";for(e=65;e<76;
5991e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)g.push({k:t+n,v:r})}for(g.sort(function(e,t){return t.v-e.v}),n=0;n<g.length;n++)t=g[n].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}});e({target:"Array",proto:!0,forced:v||!b||!y||!w},{sort:function(e){void 0!==e&&r(e);var t=n(this);if(w)return void 0===e?f(t):f(t,e);var a,c,d=[],u=o(t);for(c=0;c<u;c++)c in t&&m(d,t[c]);for(l(d,function(e){return function(t,r){if(void 0===r)return-1;if(void 0===t)return 1;if(void 0!==e)return+e(t,r)||0;var n=s(t),o=s(r);return n===o?0:n>o?1:-1}}(e)),a=o(d),c=0;c<a;)t[c]=d[c++];for(;c<u;)i(t,c++);return t}})}(),hme||(hme=1,_me()("Array")),function(){if(kme)return Ome;kme=1;var e=xde(),t=Mle(),r=Gce(),n=qce(),o=Yce(),i=ige(),s=oge(),a=Aue(),l=Tue(),c=pge(),d=sge()("splice"),u=Math.max,h=Math.min;e({target:"Array",proto:!0,forced:!d},{splice:function(e,d){var p,g,f,m,v,b,y=t(this),w=o(y),x=r(e,w),_=arguments.length;for(0===_?p=g=0:1===_?(p=0,g=w-x):(p=_-2,g=h(u(n(d),0),w-x)),s(w+p-g),f=a(y,g),m=0;m<g;m++)(v=x+m)in y&&l(f,m,y[v]);if(i(f,g),p<g){for(m=x;m<w-g;m++)b=m+p,(v=m+g)in y?y[b]=y[v]:c(y,b);for(m=w;m>w-g+p;m--)c(y,m-1)}else if(p>g)for(m=w-g;m>x;m--)b=m+p-1,(v=m+g-1)in y?y[b]=y[v]:c(y,b);for(m=0;m<p;m++)y[m+x]=arguments[m+2];return i(y,w-g+p),f}})}(),function(){if(Cme)return Lme;Cme=1;var e=xde(),t=Yce(),r=Gae(),n=Tue(),o=Zpe(),i=Array;e({target:"Array",proto:!0},{toReversed:function(){for(var e=r(this),o=t(e),s=new i(o),a=0;a<o;a++)n(s,a,e[o-a-1]);return s}}),o("toReversed")}(),function(){if(Tme)return $me;Tme=1;var e=xde(),t=jae(),r=ile(),n=Gae(),o=Nme(),i=Rme(),s=Zpe(),a=Array,l=t(i("Array","sort"));e({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&r(e);var t=n(this),i=o(a,t);return l(i,e)}}),s("toSorted")}(),function(){if(Pme)return ave;Pme=1;var e=xde(),t=Zpe(),r=oge(),n=Yce(),o=Gce(),i=Gae(),s=qce(),a=Tue(),l=Array,c=Math.max,d=Math.min;e({target:"Array",proto:!0},{toSpliced:function(e,t){var u,h,p,g,f=i(this),m=n(f),v=o(e,m),b=arguments.length,y=0;for(0===b?u=h=0:1===b?(u=0,h=m-v):(u=b-2,h=d(c(s(t),0),m-v)),p=r(m+u-h),g=l(p);y<v;y++)a(g,y,f[y]);for(;y<v+u;y++)a(g,y,arguments[y-v+2]);for(;y<p;y++)a(g,y,f[y+h-u]);return g}}),t("toSpliced")}(),Dme||(Dme=1,Zpe()("flat")),Mme||(Mme=1,Zpe()("flatMap")),function(){if(zme)return lve;zme=1;var e=xde(),t=Mle(),r=Yce(),n=ige(),o=pge(),i=oge(),s=1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}();e({target:"Array",proto:!0,arity:1,forced:s},{unshift:function(e){var s=t(this),a=r(s),l=arguments.length;if(l){i(a+l);for(var c=a;c--;){var d=c+l;c in s?s[d]=s[c]:o(s,d)}for(var u=0;u<l;u++)s[u]=arguments[u]}return n(s,a+l)}})}(),function(){if(Fme)return cve;Fme=1;var e=xde(),t=Yce(),r=qce(),n=Gae(),o=Tue(),i=Array,s=RangeError,a=function(){try{[].with({valueOf:function(){throw 4}},null)}catch(e){return 4!==e}}();e({target:"Array",proto:!0,forced:a},{with:function(e,a){var l=n(this),c=t(l),d=r(e),u=d<0?c+d:d;if(u>=c||u<0)throw new s("Incorrect index");for(var h=new i(c),p=0;p<c;p++)o(h,p,p===u?a:l[p]);return h}})}(),function(){if(sve)return dve;sve=1;var e=xde(),t=Fse(),r=yve(),n=_me(),o="ArrayBuffer",i=r[o];e({global:!0,constructor:!0,forced:t[o]!==i},{ArrayBuffer:i}),n(o)}(),function(){if(_ve)return kve;_ve=1;var e=xde(),t=Cve();e({target:"ArrayBuffer",stat:!0,forced:!t.NATIVE_ARRAY_BUFFER_VIEWS},{isView:t.isView})}(),function(){if(Sve)return Ave;Sve=1;var e=xde(),t=Cue(),r=Zse(),n=yve(),o=tce(),i=Gce(),s=Zce(),a=n.ArrayBuffer,l=n.DataView,c=l.prototype,d=t(a.prototype.slice),u=t(c.getUint8),h=t(c.setUint8);e({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:r(function(){return!new a(2).slice(1,void 0).byteLength})},{slice:function(e,t){if(d&&void 0===t)return d(o(this),e);for(var r=o(this).byteLength,n=i(e,r),c=i(void 0===t?r:t,r),p=new a(s(c-n)),g=new l(this),f=new l(p),m=0;n<c;)h(f,m++,u(g,n++));return p}})}(),Ive||(Ive=1,function(){if(Eve)return Tve;Eve=1;var e=xde(),t=yve();e({global:!0,constructor:!0,forced:!uve()},{DataView:t.DataView})}()),function(){if(Ove)return Lve;Ove=1;
5991var e=xde(),t=jae(),r=Math.pow,n=r(2,-24),o=.0009765625,i=t(DataView.prototype.getUint16);e({target:"DataView",proto:!0},{getFloat16:function(e){return function(e){var t=e>>>15,i=e>>>10&31,s=1023&e;return 31===i?0===s?0===t?1/0:-1/0:NaN:0===i?s*(0===t?n:-n):r(2,i-15)*(0===t?1+s*o:-1-s*o)}(i(this,e,arguments.length>1&&arguments[1]))}})}(),function(){if(Dve)return Mve;Dve=1;var e=xde(),t=jae(),r=function(){if(Nve)return $ve;Nve=1;var e=kde(),t=TypeError;return $ve=function(r){if("DataView"===e(r))return r;throw new t("Argument is not a DataView")},$ve}(),n=gve(),o=zve(),i=mve(),s=Math.floor,a=Math.pow,l=1024,c=t(DataView.prototype.setUint16);e({target:"DataView",proto:!0},{setFloat16:function(e,t){c(r(this),n(e),function(e){if(e!=e)return 32256;if(0===e)return(1/e==-1/0)<<15;var t=e<0;if(t&&(e=-e),e>=65520)return t<<15|31744;if(e<61005353927612305e-21)return t<<15|i(16777216*e);var r=s(o(e));if(-15===r)return t<<15|l;var n=i((e*a(2,-r)-1)*l);return n===l?t<<15|r+16<<10:t<<15|r+15<<10|n}(+t),arguments.length>2&&arguments[2])}})}(),function(){if(jve)return Vve;jve=1;var e=Yse(),t=Wde(),r=Kve(),n=ArrayBuffer.prototype;e&&!("detached"in n)&&t(n,"detached",{configurable:!0,get:function(){return r(this)}})}(),function(){if(nbe)return obe;nbe=1;var e=xde(),t=cbe();t&&e({target:"ArrayBuffer",proto:!0},{transfer:function(){return t(this,arguments.length?arguments[0]:void 0,!0)}})}(),function(){if(dbe)return _be;dbe=1;var e=xde(),t=cbe();t&&e({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return t(this,arguments.length?arguments[0]:void 0,!1)}})}(),function(){if(ube)return kbe;ube=1;var e=xde(),t=jae(),r=Zse()(function(){return 120!==new Date(16e11).getYear()}),n=t(Date.prototype.getFullYear);e({target:"Date",proto:!0,forced:r},{getYear:function(){return n(this)-1900}})}(),function(){if(hbe)return Cbe;hbe=1;var e=xde(),t=jae(),r=Date,n=t(r.prototype.getTime);e({target:"Date",stat:!0},{now:function(){return n(new r)}})}(),function(){if(pbe)return Sbe;pbe=1;var e=xde(),t=jae(),r=qce(),n=Date.prototype,o=t(n.getTime),i=t(n.setFullYear);e({target:"Date",proto:!0},{setYear:function(e){o(this);var t=+e;if(t!=t)return i(this,t);var n=r(t);return i(this,n>=0&&n<=99?n+1900:n)}})}(),gbe||(gbe=1,xde()({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})),function(){if(xbe)return Ebe;xbe=1;var e=xde(),t=function(){if(wbe)return ybe;wbe=1;var e=jae(),t=Zse(),r=Abe().start,n=RangeError,o=isFinite,i=Math.abs,s=Date.prototype,a=s.toISOString,l=e(s.getTime),c=e(s.getUTCDate),d=e(s.getUTCFullYear),u=e(s.getUTCHours),h=e(s.getUTCMilliseconds),p=e(s.getUTCMinutes),g=e(s.getUTCMonth),f=e(s.getUTCSeconds);return ybe=t(function(){return"0385-07-25T07:06:39.999Z"!==a.call(new Date(-50000000000001))})||!t(function(){a.call(new Date(NaN))})?function(){if(!o(l(this)))throw new n("Invalid time value");var e=this,t=d(e),s=h(e),a=t<0?"-":t>9999?"+":"";return a+r(i(t),a?6:4,0)+"-"+r(g(e)+1,2,0)+"-"+r(c(e),2,0)+"T"+r(u(e),2,0)+":"+r(p(e),2,0)+":"+r(f(e),2,0)+"."+r(s,3,0)+"Z"}:a,ybe}();e({target:"Date",proto:!0,forced:Date.prototype.toISOString!==t},{toISOString:t})}(),function(){if(Tbe)return Nbe;Tbe=1;var e=xde(),t=Zse(),r=Mle(),n=Ble();e({target:"Date",proto:!0,arity:1,forced:t(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})},{toJSON:function(e){var t=r(this),o=n(t,"number");return"number"!=typeof o||isFinite(o)?t.toISOString():null}})}(),function(){if($be)return Rbe;$be=1;var e=zle(),t=Ice(),r=function(){if(Lbe)return Obe;Lbe=1;var e=tce(),t=ale(),r=TypeError;return Obe=function(n){if(e(this),"string"===n||"default"===n)n="string";else if("number"!==n)throw new r("Incorrect hint");return t(this,n)},Obe}(),n=Ule()("toPrimitive"),o=Date.prototype;e(o,n)||t(o,n,r)}(),function(){if(Pbe)return Fbe;Pbe=1;var e=jae(),t=Ice(),r=Date.prototype,n="Invalid Date",o="toString",i=e(r[o]),s=e(r.getTime);String(new Date(NaN))!==n&&t(r,o,function(){var e=s(this);return e==e?i(this):n})}(),function(){if(zbe)return Ube;zbe=1;var e=xde(),t=Yse(),r=Jae(),n=ile(),o=pve(),i=Ice(),s=hve(),a=Wde(),l=Ule(),c=Sce(),d=Bbe(),u=r("SuppressedError"),h=ReferenceError,p=l("dispose"),g=l("toStringTag"),f="DisposableStack",m=c.set,v=c.getterFor(f),b="sync-dispose",y="disposed",w=function(e){var t=v(e);if(t.state===y)throw new h(f+" already disposed");return t},x=function(){m(o(this,_),{type:f,state:"pending",stack:[]}),t||(this.disposed=!1)}
5991,_=x.prototype;s(_,{dispose:function(){var e=v(this);if(e.state!==y){e.state=y,t||(this.disposed=!0);for(var r,n=e.stack,o=n.length,i=!1;o;){var s=n[--o];n[o]=null;try{s()}catch(e){i?r=new u(e,r):(i=!0,r=e)}}if(e.stack=null,i)throw r}},use:function(e){return d(w(this),e,b),e},adopt:function(e,t){var r=w(this);return n(t),d(r,void 0,b,function(){t(e)}),e},defer:function(e){var t=w(this);n(e),d(t,void 0,b,e)},move:function(){var e=w(this),r=new x;return v(r).stack=e.stack,e.stack=[],e.state=y,t||(this.disposed=!0),r}}),t&&a(_,"disposed",{configurable:!0,get:function(){return v(this).state===y}}),i(_,p,_.dispose,{name:"dispose"}),i(_,g,f,{nonWritable:!0}),e({global:!0,constructor:!0},{DisposableStack:x})}(),function(){if(Hbe)return Kbe;Hbe=1;var e=xde(),t=jae(),r=Cde(),n=t("".charAt),o=t("".charCodeAt),i=t(/./.exec),s=t(1.1.toString),a=t("".toUpperCase),l=/[\w*+\-./@]/,c=function(e,t){for(var r=s(e,16);r.length<t;)r="0"+r;return r};e({global:!0},{escape:function(e){for(var t,s,d=r(e),u="",h=d.length,p=0;p<h;)t=n(d,p++),i(l,t)?u+=t:u+=(s=o(t,0))<256?"%"+a(c(s,2)):"%u"+a(c(s,4));return u}})}(),function(){if(Wbe)return qbe;Wbe=1;var e=xde(),t=Gbe();e({target:"Function",proto:!0,forced:Function.bind!==t},{bind:t})}(),function(){if(Zbe)return oye;Zbe=1;var e=Zae(),t=Yae(),r=rce(),n=Qae(),o=Ule(),i=Ece(),s=o("hasInstance"),a=Function.prototype;s in a||r.f(a,s,{value:i(function(r){if(!e(this)||!t(r))return!1;var o=this.prototype;return t(o)?n(o,r):r instanceof this},s)})}(),function(){if(Ybe)return iye;Ybe=1;var e=Yse(),t=wce().EXISTS,r=jae(),n=Wde(),o=Function.prototype,i=r(o.toString),s=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,a=r(s.exec);e&&!t&&n(o,"name",{configurable:!0,get:function(){try{return a(s,i(this))[1]}catch{return""}}})}(),function(){if(Jbe)return sye;Jbe=1;var e=xde(),t=Fse();e({global:!0,forced:t.globalThis!==t},{globalThis:t})}(),function(){if(Qbe)return aye;Qbe=1;var e=xde(),t=Fse(),r=pve(),n=tce(),o=Zae(),i=Rpe(),s=Wde(),a=Tue(),l=Zse(),c=zle(),d=Ule(),u=_fe().IteratorPrototype,h=Yse(),p=Nle(),g="constructor",f="Iterator",m=d("toStringTag"),v=TypeError,b=t[f],y=p||!o(b)||b.prototype!==u||!l(function(){b({})}),w=function(){if(r(this,u),i(this)===u)throw new v("Abstract class Iterator not directly constructable")},x=function(e,t){h?s(u,e,{configurable:!0,get:function(){return t},set:function(t){if(n(this),this===u)throw new v("You can't redefine this property");c(this,e)?this[e]=t:a(this,e,t)}}):u[e]=t};c(u,m)||x(m,f),(y||!c(u,g)||u[g]===Object)&&x(g,w),w.prototype=u,e({global:!0,constructor:!0,forced:y},{Iterator:w})}(),function(){if(nye)return lye;nye=1;var e=xde(),t=Qse(),r=ile(),n=tce(),o=Mpe(),i=cye(),s=Nle(),a=Array,l=i(function(){for(;;){var e=this.iterator;if(!e){var r=this.nextIterableIndex++,o=this.iterables;if(r>=o.length)return void(this.done=!0);var i=o[r];this.iterables[r]=null,e=this.iterator=n(t(i.method,i.iterable)),this.next=e.next}var s=n(t(this.next,e));if(!s.done)return s.value;this.iterator=null,this.next=null}});e({target:"Iterator",stat:!0,forced:s},{concat:function(){for(var e=arguments.length,t=a(e),i=0;i<e;i++){var s=n(arguments[i]);t[i]={iterable:s,method:r(o(s))}}return new l({iterables:t,nextIterableIndex:0,iterator:null,next:null})}})}(),function(){if(dye)return _ye;dye=1;var e=Qse(),t=Ice(),r=sle(),n=zle(),o=Ule(),i=_fe().IteratorPrototype,s=o("dispose");n(i,s)||t(i,s,function(){var t=r(this,"return");t&&e(t,this)})}(),function(){if(xye)return kye;xye=1;var e=xde(),t=Qse(),r=tce(),n=Cye(),o=Sye(),i=Eye(),s=Fpe(),a=cye(),l=Iye(),c=Aye(),d=Nle(),u=!d&&!l("drop",0),h=!d&&!u&&c("drop",RangeError),p=d||u||h,g=a(function(){for(var e,n=this.iterator,o=this.next;this.remaining;)if(this.remaining--,e=r(t(o,n)),this.done=!!e.done)return;if(e=r(t(o,n)),!(this.done=!!e.done))return e.value});e({target:"Iterator",proto:!0,real:!0,forced:p},{drop:function(e){var a;r(this);try{a=i(o(+e))}catch(e){s(this,"throw",e)}return h?t(h,this,a):new g(n(this),{remaining:a})}})}(),function(){if(Tye)return Pye;Tye=1;var e=xde(),t=Qse(),r=Upe(),n=ile(),o=tce(),i=Cye(),s=Fpe(),a=Aye()("every",TypeError);e({target:"Iterator",proto:!0,real:!0,forced:a},{every:function(e){o(this);try{n(e)}catch(e){s(this,"throw",e)}if(a)return t(a,this,e);var l=i(this),c=0;return!r(l,function(t,r){if(!e(t,c++))return r()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}(),function(){if(Oye)return Dye;Oye=1;var e=xde(),t=Qse(),r=ile(),n=tce(),o=Cye(),i=cye(),s=ofe(),a=Nle(),l=Fpe(),c=Iye(),d=Aye(),u=!a&&!c("filter",function(){}),h=!a&&!u&&d("filter",TypeError),p=a||u||h,g=i(function(){for(var e,r,o=this.iterator,i=this.predicate,a=this.next;;){if(e=n(t(a,o)),this.done=!!e.done)return;if(r=e.value,s(o,i,[r,this.counter++],!0))return r}});e({target:"Iterator",proto:!0,real:!0,forced:p},{filter:function(e){n(this);try{r(e)}catch(e){l(this,"throw",e)}return h?t(h,this,e):new g(o(this),{predicate:e})}})}(),function(){if(Lye)return Mye;Lye=1;var e=xde(),t=Qse(),r=Upe(),n=ile(),o=tce(),i=Cye(),s=Fpe(),a=Aye()("find",TypeError);e({target:"Iterator",proto:!0,real:!0,forced:a},{find:function(e){o(this);try{n(e)}catch(e){s(this,"throw",e)}if(a)return t(a,this,e);var l=i(this),c=0;return r(l,function(t,r){if(e(t,c++))return r(t)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})}(),function(){if(Rye)return zye;Rye=1;var e=xde(),t=Qse(),r=ile(),n=tce(),o=Cye(),i=Fye(),s=cye(),a=Fpe(),l=Nle(),c=Iye(),d=Aye(),u=!l&&!c("flatMap",function(){}),h=!l&&!u&&d("flatMap",TypeError),p=l||u||h||function(){try{var e=Iterator.prototype.flatMap.call(new Map([[4,5]]).entries(),function(e){return e});e.next(),e.return()}catch{return!0}}(),g=s(function(){for(var e,r,o=this.iterator,s=this.mapper;;){if(r=this.inner)try{if(!(e=n(t(r.next,r.iterator))).done)return e.value;this.inner=null}catch(e){a(o,"throw",e)}if(e=n(t(this.next,o)),this.done=!!e.done)return;try{this.inner=i(s(e.value,this.counter++),!1)}catch(e){a(o,"throw",e)}}});e({target:"Iterator",proto:!0,real:!0,forced:p},{flatMap:function(e){n(this);try{r(e)}catch(e){a(this,"throw",e)}return h?t(h,this,e):new g(o(this),{mapper:e,inner:null})}})}(),function(){if(Uye)return Zye;Uye=1;var e=xde(),t=Qse(),r=Upe(),n=ile(),o=tce(),i=Cye(),s=Fpe(),a=Aye()("forEac
5991h",TypeError);e({target:"Iterator",proto:!0,real:!0,forced:a},{forEach:function(e){o(this);try{n(e)}catch(e){s(this,"throw",e)}if(a)return t(a,this,e);var l=i(this),c=0;r(l,function(t){e(t,c++)},{IS_RECORD:!0})}})}(),function(){if(Bye)return Yye;Bye=1;var e=xde(),t=Qse(),r=Mle(),n=Qae(),o=_fe().IteratorPrototype,i=cye(),s=Fye(),a=Nle()||function(){try{Iterator.from({return:null}).return()}catch{return!0}}(),l=i(function(){return t(this.next,this.iterator)},!0);e({target:"Iterator",stat:!0,forced:a},{from:function(e){var t=s("string"==typeof e?r(e):e,!0);return n(o,t.iterator)?t.iterator:new l(t)}})}(),function(){if(Hye)return Jye;Hye=1;var e=xde(),t=Qse(),r=ile(),n=tce(),o=Cye(),i=cye(),s=ofe(),a=Fpe(),l=Iye(),c=Aye(),d=Nle(),u=!d&&!l("map",function(){}),h=!d&&!u&&c("map",TypeError),p=d||u||h,g=i(function(){var e=this.iterator,r=n(t(this.next,e));if(!(this.done=!!r.done))return s(e,this.mapper,[r.value,this.counter++],!0)});e({target:"Iterator",proto:!0,real:!0,forced:p},{map:function(e){n(this);try{r(e)}catch(e){a(this,"throw",e)}return h?t(h,this,e):new g(o(this),{mapper:e})}})}(),function(){if(jye)return Qye;jye=1;var e=xde(),t=Upe(),r=ile(),n=tce(),o=Cye(),i=Fpe(),s=Aye(),a=Gue(),l=Zse(),c=TypeError,d=l(function(){[].keys().reduce(function(){},void 0)}),u=!d&&s("reduce",c);e({target:"Iterator",proto:!0,real:!0,forced:d||u},{reduce:function(e){n(this);try{r(e)}catch(e){i(this,"throw",e)}var s=arguments.length<2,l=s?void 0:arguments[1];if(u)return a(u,this,s?[e]:[e,l]);var d=o(this),h=0;if(t(d,function(t){s?(s=!1,l=t):l=e(l,t,h),h++},{IS_RECORD:!0}),s)throw new c("Reduce of empty iterator with no initial value");return l}})}(),function(){if(Vye)return Xye;Vye=1;var e=xde(),t=Qse(),r=Upe(),n=ile(),o=tce(),i=Cye(),s=Fpe(),a=Aye()("some",TypeError);e({target:"Iterator",proto:!0,real:!0,forced:a},{some:function(e){o(this);try{n(e)}catch(e){s(this,"throw",e)}if(a)return t(a,this,e);var l=i(this),c=0;return r(l,function(t,r){if(e(t,c++))return r()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}(),function(){if(Wye)return ewe;Wye=1;var e=xde(),t=Qse(),r=tce(),n=Cye(),o=Sye(),i=Eye(),s=cye(),a=Fpe(),l=Iye(),c=Aye(),d=Nle(),u=!d&&!l("take",1),h=!d&&!u&&c("take",RangeError),p=d||u||h,g=s(function(){var e=this.iterator;if(!this.remaining--)return this.done=!0,a(e,"normal",void 0);var n=r(t(this.next,e));return(this.done=!!n.done)?void 0:n.value});e({target:"Iterator",proto:!0,real:!0,forced:p},{take:function(e){var s;r(this);try{s=i(o(+e))}catch(e){a(this,"throw",e)}return h?t(h,this,s):new g(n(this),{remaining:s})}})}(),function(){if(Kye)return twe;Kye=1;var e=xde(),t=tce(),r=Tue(),n=Upe(),o=Cye();e({target:"Iterator",proto:!0,real:!0},{toArray:function(){var e=[],i=0;return n(o(t(this)),function(t){r(e,i++,t)},{IS_RECORD:!0}),e}})}(),qye||(qye=1,xde()({target:"JSON",stat:!0,forced:!Jue()},{isRawJSON:Zue()})),function(){if(Gye)return rwe;Gye=1;var e=xde(),t=Yse(),r=Fse(),n=Jae(),o=jae(),i=Qse(),s=Zae(),a=Yae(),l=Eue(),c=zle(),d=Cde(),u=Yce(),h=Tue(),p=Zse(),g=Yue(),f=tle(),m=r.JSON,v=r.Number,b=r.SyntaxError,y=m&&m.parse,w=n("Object","keys"),x=Object.getOwnPropertyDescriptor,_=o("".charAt),k=o("".slice),C=o(/./.exec),S=o([].push),E=/^\d$/,I=/^[1-9]$/,A=/^[\d-]$/,T=/^[\t\n\r ]$/,O=function(e,t,r,n){var o,s,d,h,p,g=e[t],f=n&&g===n.value,m=f&&"string"==typeof n.source?{source:n.source}:{};if(a(g)){var v=l(g),b=f?n.nodes:v?[]:{};if(v)for(o=b.length,d=u(g),h=0;h<d;h++)L(g,h,O(g,""+h,r,h<o?b[h]:void 0));else for(s=w(g),d=u(s),h=0;h<d;h++)p=s[h],L(g,p,O(g,p,r,c(b,p)?b[p]:void 0))}return i(r,e,t,g,m)},L=function(e,r,n){if(t){var o=x(e,r);if(o&&!o.configurable)return}void 0===n?delete e[r]:h(e,r,n)},$=function(e,t,r,n){this.value=e,this.end=t,this.source=r,this.nodes=n},N=function(e,t){this.source=e,this.index=t};N.prototype={fork:function(e){return new N(this.source,e)},parse:function(){var e=this.source,t=this.skip(T,this.index),r=this.fork(t),n=_(e,t);if(C(A,n))return r.number();switch(n){case"{":return r.object();case"[":return r.array();case'"':return r.string();case"t":return r.keyword(!0);case"f":return r.keyword(!1);case"n":return r.keyword(null)}throw new b('Unexpected character: "'+n+'" at: '+t)},node:function(e,t,r,n,o){return new $(t,n,e?null:k(this.source,r,n),o)},object:function(){for(var e=this.source,t=this.index+1,r=!1,n={},o={},i=!1;t<e.length;){if(t=this.until(['"',"}"],t),"}"===_(e,t)&&!r){t++,i=!0;break}var s=this.fork(t).string(),a=s.value;t=s.end,t=this.until([":"],t)+1,t=this.skip(T,t),s=this.fork(t).parse(),h(o,a,s),h(n,a,s.value),t=this.until([",","}"],s.end);var l=_(e,t);if(","===l)r=!0,t++;else if("}"===l){t++,i=!0;break}}if(!i)throw new b("Unterminated object at: "+t);return this.node(1,n,this.index,t,o)},array:function(){for(var e=this.source,t=this.index+1,r=!1,n=[],o=[],i=!1;t<e.length;){if(t=this.skip(T,t),"]"===_(e,t)&&!r){t++,i=!0;break}var s=this.fork(t).parse();if(S(o,s),S(n,s.value),t=this.until([",","]"],s.end),","===_(e,t))r=!0,t++;else if("]"===_(e,t)){t++,i=!0;break}}if(!i)throw new b("Unterminated array at: "+t);return this.node(1,n,this.index,t,o)}
5991,string:function(){var e=this.index,t=g(this.source,this.index+1);return this.node(0,t.value,e,t.end)},number:function(){var e=this.source,t=this.index,r=t;if("-"===_(e,r)&&r++,"0"===_(e,r))r++;else{if(!C(I,_(e,r)))throw new b("Failed to parse number at: "+r);r=this.skip(E,r+1)}if("."===_(e,r)){var n=r+1;if(n===(r=this.skip(E,n)))throw new b("Failed to parse number's fraction at: "+r)}if(("e"===_(e,r)||"E"===_(e,r))&&(r++,("+"===_(e,r)||"-"===_(e,r))&&r++,r===(r=this.skip(E,r))))throw new b("Failed to parse number's exponent value at: "+r);return this.node(0,v(k(e,t,r)),t,r)},keyword:function(e){var t=""+e,r=this.index,n=r+t.length;if(k(this.source,r,n)!==t)throw new b("Failed to parse value at: "+r);return this.node(0,e,r,n)},skip:function(e,t){for(var r=this.source;t<r.length&&C(e,_(r,t));t++);return t},until:function(e,t){t=this.skip(T,t);for(var r=_(this.source,t),n=0;n<e.length;n++)if(e[n]===r)return t;throw new b('Unexpected character: "'+r+'" at: '+t)}};var R=p(function(){var e,t="9007199254740993";return y(t,function(t,r,n){e=n.source}),e!==t}),P=f&&!p(function(){return 1/y("-0 \t")!=-1/0});e({target:"JSON",stat:!0,forced:R},{parse:function(e,t){return P&&!s(t)?y(e):function(e,t){e=d(e);var r=new N(e,0),n=r.parse(),o=n.value,i=r.skip(T,n.end);if(i<e.length)throw new b('Unexpected extra character: "'+_(e,i)+'" after the parsed data at: '+i);return s(t)?O({"":o},"",t,n):o}(e,t)}})}(),function(){if(iwe)return swe;iwe=1;var e=xde(),t=awe(),r=Jue(),n=Jae(),o=jae(),i=Cde(),s=Tue(),a=Sce().set,l=SyntaxError,c=n("JSON","parse"),d=n("Object","create"),u=n("Object","freeze"),h=o("".charAt),p="Unacceptable as raw JSON",g=function(e){return" "===e||"\t"===e||"\n"===e||"\r"===e};e({target:"JSON",stat:!0,forced:!r},{rawJSON:function(e){var r=i(e);if(""===r||g(h(r,0))||g(h(r,r.length-1)))throw new l(p);var n=c(r);if("object"==typeof n&&null!==n)throw new l(p);var o=d(null);return a(o,{type:"RawJSON"}),s(o,"rawJSON",r),t?u(o):o}})}(),Que(),function(){if(lwe)return wwe;lwe=1;var e=Fse();kue()(e.JSON,"JSON",!0)}(),ywe||(ywe=1,bwe||(bwe=1,Swe()("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},Ewe()))),function(){if(Twe)return Owe;Twe=1;var e=xde(),t=jae(),r=ile(),n=qae(),o=Upe(),i=Lwe(),s=Nle(),a=Zse(),l=i.Map,c=i.has,d=i.get,u=i.set,h=t([].push),p=s||a(function(){return 1!==l.groupBy("ab",function(e){return e}).get("a").length});e({target:"Map",stat:!0,forced:s||p},{groupBy:function(e,t){n(e),r(t);var i=new l,s=0;return o(e,function(e){var r=t(e,s++);c(i,r)?h(d(i,r),e):u(i,r,[e])}),i}})}(),function(){if($we)return Mwe;$we=1;var e=xde(),t=Lwe(),r=Nle(),n=t.get,o=t.has,i=t.set;e({target:"Map",proto:!0,real:!0,forced:r},{getOrInsert:function(e,t){return o(this,e)?n(this,e):(i(this,e,t),t)}})}(),function(){if(Nwe)return zwe;Nwe=1;var e=xde(),t=ile(),r=Lwe(),n=Nle(),o=r.get,i=r.has,s=r.set;e({target:"Map",proto:!0,real:!0,forced:n},{getOrInsertComputed:function(e,r){var n=i(this,e);if(t(r),n)return o(this,e);0===e&&1/e==-1/0&&(e=0);var a=r(e);return s(this,e,a),a}})}(),function(){if(Dwe)return Fwe;Dwe=1;var e=xde(),t=Uwe(),r=Math.acosh,n=Math.log,o=Math.sqrt,i=Math.LN2;e({target:"Math",stat:!0,forced:!r||710!==Math.floor(r(Number.MAX_VALUE))||r(1/0)!==1/0},{acosh:function(e){var r=+e;return r<1?NaN:r>94906265.62425156?n(r)+i:t(r-1+o(r-1)*o(r+1))}})}(),function(){if(Bwe)return Gwe;Bwe=1;var e=xde(),t=Math.asinh,r=Math.log,n=Math.sqrt,o=Math.LN2;e({target:"Math",stat:!0,forced:!(t&&1/t(0)>0)},{asinh:function e(t){var i=+t;return isFinite(i)&&0!==i?i<0?-e(-i):i>94906265.62425156?r(i)+o:r(i+n(i*i+1)):i}})}(),function(){if(Hwe)return Zwe;Hwe=1;var e=xde(),t=Uwe(),r=Math.atanh;e({target:"Math",stat:!0,forced:!(r&&1/r(-0)<0)},{atanh:function(e){var r=+e;return 0===r?r:t(2*r/(1-r))/2}})}(),function(){if(jwe)return Ywe;jwe=1;var e=xde(),t=fve(),r=Math.abs,n=Math.pow;e({target:"Math",stat:!0},{cbrt:function(e){var o=+e;return t(o)*n(r(o),1/3)}})}(),function(){if(Vwe)return Jwe;Vwe=1;var e=xde(),t=Math.floor,r=Math.log,n=Math.LOG2E;e({target:"Math",stat:!0},{clz32:function(e){var o=e>>>0;return o?31-t(r(o+.5)*n):32}})}(),function(){if(qwe)return Qwe;qwe=1;var e=xde(),t=Xwe(),r=Math.cosh,n=Math.abs,o=Math.E;e({target:"Math",stat:!0,forced:!r||r(710)===1/0},{cosh:function(e){var r=t(n(e)-1)+1;return(r+1/(r*o*o))*(o/2)}})}(),function(){if(exe)return uxe;exe=1;var e=xde(),t=Xwe();e({target:"Math",stat:!0,forced:t!==Math.expm1},{expm1:t})}(),txe||(txe=1,xde()({target:"Math",stat:!0},{fround:bve()})),function(){if(rxe)return hxe;rxe=1;var e=xde(),t=vve();e({target:"Math",stat:!0},{f16round:function(e){return t(e,.0009765625,65504,6103515625e-14)}})}(),function(){if(nxe)return pxe;nxe=1;var e=xde(),t=Math.hypot,r=Math.abs,n=Math.sqrt;e({target:"Math",stat:!0,arity:2,forced:!!t&&t(1/0,NaN)!==1/0},{hypot:function(e,t){for(var o,i,s=0,a=0,l=arguments.length,c=0;a<l;)c<(o=r(arguments[a++]))?(s=s*(i=c/o)*i+1,c=o):s+=o>0?(i=o/c)*i:o;return c===1/0?1/0:c*n(s)}})}(),function(){if(oxe)return gxe;oxe=1;var e=xde(),t=Zse(),r=Math.imul;e({target:"Math",stat:!0,forced:t(function(){return-5!==r(4294967295,5)||2!==r.length})},{imul:function(e,t){var r=65535,n=+e,o=+t,i=r&n,s=r&o;return 0|i*s+((r&n>>>16)*s+i*(r&o>>>16)<<16>>>0)}})}(),axe||(axe=1,xde()({target:"Math",stat:!0},{log10:fxe()})),lxe||(lxe=1,xde()({target:"Math",stat:!0},{log1p:Uwe()})),cxe||(cxe=1,xde()({target:"Math",stat:!0},{log2:zve()})),dxe||(dxe=1,xde()({target:"Math",stat:!0},{sign:fve()})),function(){if(mxe)return Txe;mxe=1;var e=xde(),t=Zse(),r=Xwe(),n=Math.abs,o=Math.exp,i=Math.E;e({target:"Math",stat:!0,forced:t(function(){return-2e-17!==Math.sinh(-2e-17)})},{sinh:function(e){var t=+e;return n(t)<1?(r(t)-r(-t))/2:(o(t-1)-o(-t-1))*(i/2)}})}(),function(){if(vxe)return Oxe;vxe=1;
5991var e=xde(),t=jae(),r=Upe(),n=RangeError,o=TypeError,i=1/0,s=Math.abs,a=Math.pow,l=t([].push),c=a(2,1023),d=a(2,53)-1,u=Number.MAX_VALUE,h=a(2,971),p={},g={},f={},m={},v={},b=function(e,t){var r=e+t;return{hi:r,lo:t-(r-e)}};e({target:"Math",stat:!0},{sumPrecise:function(e){var t=[],a=0,y=m;switch(r(e,function(e){if(++a>d)throw new n("Maximum allowed index exceeded");if("number"!=typeof e)throw new o("Value is not a number");y!==p&&(e!=e?y=p:e===i?y=y===g?p:f:e===-i?y=y===f?p:g:(0!==e||1/e===i)&&(y===m||y===v)&&(y=v,l(t,e)))}),y){case p:return NaN;case g:return-i;case f:return i;case m:return-0}for(var w,x,_,k,C,S,E=[],I=0,A=0;A<t.length;A++){w=t[A];for(var T=0,O=0;O<E.length;O++){if(x=E[O],s(w)<s(x)&&(S=w,w=x,x=S),k=(_=b(w,x)).hi,C=_.lo,s(k)===i){var L=k===i?1:-1;I+=L,s(w=w-L*c-L*c)<s(x)&&(S=w,w=x,x=S),k=(_=b(w,x)).hi,C=_.lo}0!==C&&(E[T++]=C),w=k}E.length=T,0!==w&&l(E,w)}var $=E.length-1;if(k=0,C=0,0!==I){var N=$>=0?E[$]:0;if($--,s(I)>1||I>0&&N>0||I<0&&N<0)return I>0?i:-i;if(k=(_=b(I*c,N/2)).hi,C=_.lo,C*=2,s(2*k)===i)return k>0?k===c&&C===-h/2&&$>=0&&E[$]<0?u:i:k===-c&&C===h/2&&$>=0&&E[$]>0?-u:-i;0!==C&&(E[++$]=C,C=0),k*=2}for(;$>=0&&(k=(_=b(k,E[$--])).hi,0===(C=_.lo)););return $>=0&&(C<0&&E[$]<0||C>0&&E[$]>0)&&(x=2*C)===(w=k+x)-k&&(k=w),k}})}(),function(){if(bxe)return Lxe;bxe=1;var e=xde(),t=Xwe(),r=Math.exp;e({target:"Math",stat:!0},{tanh:function(e){var n=+e,o=t(n),i=t(-n);return o===1/0?1:i===1/0?-1:(o-i)/(r(n)+r(-n))}})}(),yxe||(yxe=1,kue()(Math,"Math",!0)),wxe||(wxe=1,xde()({target:"Math",stat:!0},{trunc:Kce()})),function(){if(Ixe)return $xe;Ixe=1;var e=xde(),t=Nle(),r=Yse(),n=Fse(),o=wue(),i=jae(),s=wde(),a=zle(),l=epe(),c=Qae(),d=nle(),u=Ble(),h=Zse(),p=ede().f,g=Wle().f,f=rce().f,m=Nxe(),v=Pxe().trim,b="Number",y=n[b],w=o[b],x=y.prototype,_=n.TypeError,k=i("".slice),C=i("".charCodeAt),S=s(b,!y(" 0o1")||!y("0b1")||y("+0x1")),E=function(e){var t,r=arguments.length<1?0:y(function(e){var t=u(e,"number");return"bigint"==typeof t?t:function(e){var t,r,n,o,i,s,a,l,c=u(e,"number");if(d(c))throw new _("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=v(c),43===(t=C(c,0))||45===t){if(88===(r=C(c,2))||120===r)return NaN}else if(48===t){switch(C(c,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+c}for(s=(i=k(c,2)).length,a=0;a<s;a++)if((l=C(i,a))<48||l>o)return NaN;return parseInt(i,n)}return+c}(t)}(e));return c(x,t=this)&&h(function(){m(t)})?l(Object(r),this,E):r};E.prototype=x,S&&!t&&(x.constructor=E),e({global:!0,constructor:!0,wrap:!0,forced:S},{Number:E});var I=function(e,t){for(var n,o=r?p(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),i=0;o.length>i;i++)a(t,n=o[i])&&!a(e,n)&&f(e,n,g(t,n))};t&&w&&I(o[b],w),(S||t)&&I(o[b],y)}(),Axe||(Axe=1,xde()({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})),function(){if(zxe)return jxe;zxe=1;var e=xde(),t=function(){if(Mxe)return Dxe;Mxe=1;var e=Fse().isFinite;return Dxe=Number.isFinite||function(t){return"number"==typeof t&&e(t)},Dxe}();e({target:"Number",stat:!0},{isFinite:t})}(),Bxe||(Bxe=1,xde()({target:"Number",stat:!0},{isInteger:Vxe()})),Hxe||(Hxe=1,xde()({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})),function(){if(Wxe)return Jxe;Wxe=1;var e=xde(),t=Vxe(),r=Math.abs;e({target:"Number",stat:!0},{isSafeInteger:function(e){return t(e)&&r(e)<=9007199254740991}})}(),Kxe||(Kxe=1,xde()({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})),qxe||(qxe=1,xde()({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})),function(){if(Yxe)return Qxe;Yxe=1;var e=xde(),t=Xxe();e({target:"Number",stat:!0,forced:Number.parseFloat!==t},{parseFloat:t})}(),function(){if(r_e)return n_e;r_e=1;var e=xde(),t=o_e();e({target:"Number",stat:!0,forced:Number.parseInt!==t},{parseInt:t})}(),function(){if(i_e)return h_e;i_e=1;var e=xde(),t=jae(),r=qce(),n=Nxe(),o=Ibe(),i=fxe(),s=Zse(),a=RangeError,l=String,c=isFinite,d=Math.abs,u=Math.floor,h=Math.pow,p=Math.round,g=t(1.1.toExponential),f=t(o),m=t("".slice),v=h(10,308),b="-6.9000e-11"===g(-69e-12,4)&&"1.25e+0"===g(1.255,2)&&"1.235e+4"===g(12345,3)&&"3e+1"===g(25,0);e({target:"Number",proto:!0,forced:!b||!(s(function(){g(1,1/0)})&&s(function(){g(1,-1/0)}))||!!s(function(){g(1/0,1/0),g(NaN,1/0)})},{toExponential:function(e){var t=n(this);if(void 0===e)return g(t);var o=r(e);
5991if(!c(t))return String(t);if(o<0||o>20)throw new a("Incorrect fraction digits");if(b)return g(t,o);var s,y,w,x,_,k,C,S="";return t<0&&(S="-",t=-t),0===t?(y=0,s=f("0",o+1)):(_=i(t),(C=o-(y=u(_))>=308?t*v*h(10,o-y-308):t/h(10,y-o))-(k=p(C))>=.5&&(k+=1),k>=h(10,o+1)&&(k/=10,y+=1),s=l(k)),0!==o&&(s=m(s,0,1)+"."+m(s,1)),0===y?(w="+",x="0"):(w=y>0?"+":"-",x=l(d(y))),S+(s+"e")+w+x}})}(),function(){if(s_e)return p_e;s_e=1;var e=xde(),t=jae(),r=qce(),n=Nxe(),o=Ibe(),i=Zse(),s=RangeError,a=String,l=Math.floor,c=t(o),d=t("".slice),u=t(1.1.toFixed),h=function(e,t,r){return 0===t?r:t%2==1?h(e,t-1,r*e):h(e*e,t/2,r)},p=function(e,t,r){for(var n=-1,o=r;++n<6;)o+=t*e[n],e[n]=o%1e7,o=l(o/1e7)},g=function(e,t){for(var r=6,n=0;--r>=0;)n+=e[r],e[r]=l(n/t),n=n%t*1e7},f=function(e){for(var t=6,r="";--t>=0;)if(""!==r||0===t||0!==e[t]){var n=a(e[t]);r=""===r?n:r+c("0",7-n.length)+n}return r};e({target:"Number",proto:!0,forced:i(function(){return"0.000"!==u(8e-5,3)||"1"!==u(.9,0)||"1.25"!==u(1.255,2)||"1000000000000000128"!==u(0xde0b6b3a7640080,0)})||!i(function(){u({})})},{toFixed:function(e){var t,o,i,l,u=n(this),m=r(e),v=[0,0,0,0,0,0],b="",y="0";if(m<0||m>20)throw new s("Incorrect fraction digits");if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return a(u);if(u<0&&(b="-",u=-u),u>1e-21)if(t=function(e){for(var t=0,r=e;r>=4096;)t+=12,r/=4096;for(;r>=2;)t+=1,r/=2;return t}(u*h(2,69,1))-69,o=t<0?u*h(2,-t,1):u/h(2,t,1),o*=4503599627370496,(t=52-t)>0){for(p(v,0,o),i=m;i>=7;)p(v,1e7,0),i-=7;for(p(v,h(10,i,1),0),i=t-1;i>=23;)g(v,1<<23),i-=23;g(v,1<<i),p(v,1,1),g(v,2),y=f(v)}else p(v,0,o),p(v,1<<-t,0),y=f(v)+c("0",m);return m>0?b+((l=y.length)<=m?"0."+c("0",m-l)+y:d(y,0,l-m)+"."+d(y,l-m)):b+y}})}(),function(){if(a_e)return g_e;a_e=1;var e=xde(),t=jae(),r=Zse(),n=Nxe(),o=t(1.1.toPrecision);e({target:"Number",proto:!0,forced:r(function(){return"1"!==o(1,void 0)})||!r(function(){o({})})},{toPrecision:function(e){return void 0===e?o(n(this)):o(n(this),e)}})}(),function(){if(d_e)return f_e;d_e=1;var e=xde(),t=m_e();e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t})}(),u_e||(u_e=1,xde()({target:"Object",stat:!0,sham:!Yse()},{create:Dde()})),function(){if(y_e)return w_e;y_e=1;var e=xde(),t=Yse(),r=x_e(),n=ile(),o=Mle(),i=rce();t&&e({target:"Object",proto:!0,forced:r},{__defineGetter__:function(e,t){i.f(o(this),e,{get:n(t),enumerable:!0,configurable:!0})}})}(),function(){if(__e)return A_e;__e=1;var e=xde(),t=Yse(),r=Rde().f;e({target:"Object",stat:!0,forced:Object.defineProperties!==r,sham:!t},{defineProperties:r})}(),function(){if(k_e)return T_e;k_e=1;var e=xde(),t=Yse(),r=rce().f;e({target:"Object",stat:!0,forced:Object.defineProperty!==r,sham:!t},{defineProperty:r})}(),function(){if(C_e)return O_e;C_e=1;var e=xde(),t=Yse(),r=x_e(),n=ile(),o=Mle(),i=rce();t&&e({target:"Object",proto:!0,forced:r},{__defineSetter__:function(e,t){i.f(o(this),e,{set:n(t),enumerable:!0,configurable:!0})}})}(),function(){if(I_e)return L_e;I_e=1;var e=xde(),t=$_e().entries;e({target:"Object",stat:!0},{entries:function(e){return t(e)}})}(),function(){if(N_e)return V_e;N_e=1;var e=xde(),t=awe(),r=Zse(),n=Yae(),o=Cwe().onFreeze,i=Object.freeze;e({target:"Object",stat:!0,forced:r(function(){i(1)}),sham:!t},{freeze:function(e){return i&&n(e)?i(o(e)):e}})}(),function(){if(R_e)return W_e;R_e=1;var e=xde(),t=Upe(),r=Tue();e({target:"Object",stat:!0},{fromEntries:function(e){var n={};return t(e,function(e,t){r(n,e,t)},{AS_ENTRIES:!0}),n}})}(),function(){if(P_e)return K_e;P_e=1;var e=xde(),t=Zse(),r=Gae(),n=Wle().f,o=Yse();e({target:"Object",stat:!0,forced:!o||t(function(){n(1)}),sham:!o},{getOwnPropertyDescriptor:function(e,t){return n(r(e),t)}})}(),function(){if(D_e)return q_e;D_e=1;var e=xde(),t=Yse(),r=bde(),n=Gae(),o=Wle(),i=Tue();e({target:"Object",stat:!0,sham:!t},{getOwnPropertyDescriptors:function(e){for(var t,s,a=n(e),l=o.f,c=r(a),d={},u=0;c.length>u;)void 0!==(s=l(a,t=c[u++]))&&i(d,t,s);return d}})}(),function(){if(M_e)return G_e;M_e=1;var e=xde(),t=Zse(),r=Vde().f;e({target:"Object",stat:!0,forced:t(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:r})}(),function(){if(z_e)return Z_e;z_e=1;var e=xde(),t=Zse(),r=Mle(),n=Rpe(),o=Npe();e({target:"Object",stat:!0,forced:t(function(){n(1)}),sham:!o},{getPrototypeOf:function(e){return n(r(e))}})}(),function(){if(F_e)return Y_e;F_e=1;var e=xde(),t=Tue(),r=Jae(),n=jae(),o=ile(),i=qae(),s=Hle(),a=Upe(),l=Zse(),c=Object.groupBy,d=r("Object","create"),u=n([].push),h=!c||l(function(){return 1!==c("ab",function(e){return e}).a.length});e({target:"Object",stat:!0,forced:h},{groupBy:function(e,r){i(e),o(r);var n=d(null),l=0;return a(e,function(e){var o=s(r(e,l++));o in n?u(n[o],e):t(n,o,[e])}),n}})}(),U_e||(U_e=1,xde()({target:"Object",stat:!0},{hasOwn:zle()})),j_e||(j_e=1,xde()({target:"Object",stat:!0},{is:J_e()})),function(){if(Q_e)return uke;Q_e=1;var e=xde(),t=kwe();e({target:"Object",stat:!0,forced:Object.isExtensible!==t},{isExtensible:t})}(),function(){if(X_e)return hke;X_e=1;var e=xde(),t=Zse(),r=Yae(),n=Vae(),o=_we(),i=Object.isFrozen;e({target:"Object",stat:!0,forced:o||t(function(){})},{isFrozen:function(e){return!(r(e)&&(!o||"ArrayBuffer"!==n(e)))||!!i&&i(e)}})}(),function(){if(eke)return pke;eke=1;var e=xde(),t=Zse(),r=Yae(),n=Vae(),o=_we(),i=Object.isSealed;e({target:"Object",stat:!0,forced:o||t(function(){})},{isSealed:function(e){return!(r(e)&&(!o||"ArrayBuffer"!==n(e)))||!!i&&i(e)}})}(),function(){if(tke)return gke;tke=1;var e=xde(),t=Mle(),r=Nde();e({target:"Object",stat:!0,forced:Zse()(function(){r(1)})},{keys:function(e){return r(t(e))}})}(),function(){if(rke)return fke;rke=1;var e=xde(),t=Yse(),r=x_e(),n=Mle(),o=Hle(),i=Rpe(),s=Wle().f;t&&e({target:"Object",proto:!0,forced:r},{__lookupGetter__:function(e){var t,r=n(this),a=o(e);do{if(t=s(r,a))return t.get}while(r=i(r))}})}(),function(){if(nke)return mke;nke=1;var e=xde(),t=Yse(),r=x_e(),n=Mle(),o=Hle(),i=Rpe(),s=Wle().f;t&&e({target:"Object",proto:!0,forced:r},{__lookupSetter__:function(e){var t,r=n(this),a=o(e);do{if(t=s(r,a))return t.set}while(r=i(r))}})}(),function(){if(oke)return vke;oke=1;var e=xde(),t=Yae(),r=Cwe().onFreeze,n=awe(),o=Zse(),i=Object.preventExtensions;e({target:"Object",stat:!0,forced:o(function(){i(1)}),sham:!n},{preventExtensions:function(e){return i&&t(e)?i(r(e)):e}})}(),function(){if(ike)return bke;ike=1;var e=Yse(),t=Wde(),r=Yae(),n=Yhe(),o=Mle(),i=qae(),s=Object.getPrototypeOf,a=Object.
5991setPrototypeOf,l=Object.prototype,c="__proto__";if(e&&s&&a&&!(c in l))try{t(l,c,{configurable:!0,get:function(){return s(o(this))},set:function(e){var t=i(this);n(e)&&r(t)&&a(t,e)}})}catch{}}(),function(){if(ske)return yke;ske=1;var e=xde(),t=Yae(),r=Cwe().onFreeze,n=awe(),o=Zse(),i=Object.seal;e({target:"Object",stat:!0,forced:o(function(){i(1)}),sham:!n},{seal:function(e){return i&&t(e)?i(r(e)):e}})}(),ake||(ake=1,xde()({target:"Object",stat:!0},{setPrototypeOf:Qhe()})),function(){if(dke)return wke;dke=1;var e=_de(),t=Ice(),r=function(){if(cke)return lke;cke=1;var e=_de(),t=kde();return lke=e?{}.toString:function(){return"[object "+t(this)+"]"}}();e||t(Object.prototype,"toString",r,{unsafe:!0})}(),function(){if(xke)return Qke;xke=1;var e=xde(),t=$_e().values;e({target:"Object",stat:!0},{values:function(e){return t(e)}})}(),function(){if(_ke)return Xke;_ke=1;var e=xde(),t=Xxe();e({global:!0,forced:parseFloat!==t},{parseFloat:t})}(),function(){if(kke)return eCe;kke=1;var e=xde(),t=o_e();e({global:!0,forced:parseInt!==t},{parseInt:t})}(),ACe||(ACe=1,function(){if(gCe)return tCe;gCe=1;var e,t,r,n,o=xde(),i=Nle(),s=Yfe(),a=Fse(),l=wue(),c=Qse(),d=Ice(),u=Qhe(),h=kue(),p=_me(),g=ile(),f=Zae(),m=Yae(),v=pve(),b=nCe(),y=sCe().set,w=cCe(),x=(Wke||(Wke=1,Vke=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch{}}),Vke),_=dCe(),k=lCe(),C=Sce(),S=uCe(),E=hCe(),I=mCe(),A="Promise",T=E.CONSTRUCTOR,O=E.REJECTION_EVENT,L=E.SUBCLASSING,$=C.getterFor(A),N=C.set,R=S&&S.prototype,P=S,D=R,M=a.TypeError,z=a.document,F=a.process,U=I.f,B=U,H=!!(z&&z.createEvent&&a.dispatchEvent),j="unhandledrejection",V=function(e){var t;return!(!m(e)||!f(t=e.then))&&t},W=function(e,t){var r,n,o,i=t.value,s=1===t.state,a=s?e.ok:e.fail,l=e.resolve,d=e.reject,u=e.domain;try{a?(s||(2===t.rejection&&Y(t),t.rejection=1),!0===a?r=i:(u&&u.enter(),r=a(i),u&&(u.exit(),o=!0)),r===e.promise?d(new M("Promise-chain cycle")):(n=V(r))?c(n,r,l,d):l(r)):d(i)}catch(e){u&&!o&&u.exit(),d(e)}},K=function(e,t){e.notified||(e.notified=!0,w(function(){for(var r,n=e.reactions;r=n.get();)W(r,e);e.notified=!1,t&&!e.rejection&&G(e)}))},q=function(e,t,r){var n,o;H?((n=z.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),a.dispatchEvent(n)):n={promise:t,reason:r},!O&&(o=a["on"+e])?o(n):e===j&&x("Unhandled promise rejection",r)},G=function(e){c(y,a,function(){var t,r=e.facade,n=e.value;if(Z(e)&&(t=_(function(){s?F.emit("unhandledRejection",n,r):q(j,r,n)}),e.rejection=s||Z(e)?2:1,t.error))throw t.value})},Z=function(e){return 1!==e.rejection&&!e.parent},Y=function(e){c(y,a,function(){var t=e.facade;s?F.emit("rejectionHandled",t):q("rejectionhandled",t,e.value)})},J=function(e,t,r){return function(n){e(t,n,r)}},Q=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,K(e,!0))},X=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new M("Promise can't be resolved itself");var n=V(t);n?w(function(){var r={done:!1};try{c(n,t,J(X,r,e),J(Q,r,e))}catch(t){Q(r,t,e)}}):(e.value=t,e.state=1,K(e,!1))}catch(t){Q({done:!1},t,e)}}};if(T&&(D=(P=function(t){v(this,D),g(t),c(e,this);var r=$(this);try{t(J(X,r),J(Q,r))}catch(e){Q(r,e)}}).prototype,(e=function(e){N(this,{type:A,done:!1,notified:!1,parent:!1,reactions:new k,rejection:!1,state:0,value:null})}).prototype=d(D,"then",function(e,t){var r=$(this),n=U(b(this,P));return r.parent=!0,n.ok=!f(e)||e,n.fail=f(t)&&t,n.domain=s?F.domain:void 0,0===r.state?r.reactions.add(n):w(function(){W(n,r)}),n.promise}),t=function(){var t=new e,r=$(t);this.promise=t,this.resolve=J(X,r),this.reject=J(Q,r)},I.f=U=function(e){return e===P||e===r?new t(e):B(e)},!i&&f(S)&&R!==Object.prototype)){n=R.then,L||d(R,"then",function(e,t){var r=this;return new P(function(e,t){c(n,r,e,t)}).then(e,t)},{unsafe:!0});try{delete R.constructor}catch{}u&&u(R,D)}o({global:!0,constructor:!0,wrap:!0,forced:T},{Promise:P}),r=l.Promise,h(P,A,!1,!0),p(A)}(),function(){if(yCe)return wCe;yCe=1;var e=xde(),t=Qse(),r=ile(),n=mCe(),o=dCe(),i=Upe();e({target:"Promise",stat:!0,forced:xCe()},{all:function(e){var s=this,a=n.f(s),l=a.resolve,c=a.reject,d=o(function(){var n=r(s.resolve),o=[],a=0,d=1;i(e,function(e){var r=a++,i=!1;d++,t(n,s,e).then(function(e){i||(i=!0,o[r]=e,--d||l(o))},c)}),--d||l(o)});return d.error&&c(d.value),a.promise}})}(),function(){if(_Ce)return TCe;_Ce=1;var e=xde(),t=Nle(),r=hCe().CONSTRUCTOR,n=uCe(),o=Jae(),i=Zae(),s=Ice(),a=n&&n.prototype;if(e({target:"Promise",proto:!0,forced:r,real:!0},{catch:function(e){return this.then(void 0,e)}}),!t&&i(n)){var l=o("Promise").prototype.catch;
5991a.catch!==l&&s(a,"catch",l,{unsafe:!0})}}(),function(){if(kCe)return OCe;kCe=1;var e=xde(),t=Qse(),r=ile(),n=mCe(),o=dCe(),i=Upe();e({target:"Promise",stat:!0,forced:xCe()},{race:function(e){var s=this,a=n.f(s),l=a.reject,c=o(function(){var n=r(s.resolve);i(e,function(e){t(n,s,e).then(a.resolve,l)})});return c.error&&l(c.value),a.promise}})}(),function(){if(CCe)return LCe;CCe=1;var e=xde(),t=mCe();e({target:"Promise",stat:!0,forced:hCe().CONSTRUCTOR},{reject:function(e){var r=t.f(this);return(0,r.reject)(e),r.promise}})}(),function(){if(ICe)return $Ce;ICe=1;var e=xde(),t=Jae(),r=Nle(),n=uCe(),o=hCe().CONSTRUCTOR,i=NCe(),s=t("Promise"),a=r&&!o;e({target:"Promise",stat:!0,forced:r||o},{resolve:function(e){return i(a&&this===s?n:this,e)}})}()),function(){if(RCe)return QCe;RCe=1;var e=xde(),t=Qse(),r=ile(),n=mCe(),o=dCe(),i=Upe();e({target:"Promise",stat:!0,forced:xCe()},{allSettled:function(e){var s=this,a=n.f(s),l=a.resolve,c=a.reject,d=o(function(){var n=r(s.resolve),o=[],a=0,c=1;i(e,function(e){var r=a++,i=!1;c++,t(n,s,e).then(function(e){i||(i=!0,o[r]={status:"fulfilled",value:e},--c||l(o))},function(e){i||(i=!0,o[r]={status:"rejected",reason:e},--c||l(o))})}),--c||l(o)});return d.error&&c(d.value),a.promise}})}(),function(){if(PCe)return XCe;PCe=1;var e=xde(),t=Qse(),r=ile(),n=Jae(),o=mCe(),i=dCe(),s=Upe(),a=xCe(),l="No one promise resolved";e({target:"Promise",stat:!0,forced:a},{any:function(e){var a=this,c=n("AggregateError"),d=o.f(a),u=d.resolve,h=d.reject,p=i(function(){var n=r(a.resolve),o=[],i=0,d=1,p=!1;s(e,function(e){var r=i++,s=!1;d++,t(n,a,e).then(function(e){s||p||(p=!0,u(e))},function(e){s||p||(s=!0,o[r]=e,--d||h(new c(o,l)))})}),--d||h(new c(o,l))});return p.error&&h(p.value),d.promise}})}(),function(){if(DCe)return eSe;DCe=1;var e=xde(),t=Nle(),r=uCe(),n=Zse(),o=Jae(),i=Zae(),s=nCe(),a=NCe(),l=Ice(),c=r&&r.prototype;if(e({target:"Promise",proto:!0,real:!0,forced:!!r&&n(function(){c.finally.call({then:function(){}},function(){})})},{finally:function(e){var t=s(this,o("Promise")),r=i(e);return this.then(r?function(r){return a(t,e()).then(function(){return r})}:e,r?function(r){return a(t,e()).then(function(){throw r})}:e)}}),!t&&i(r)){var d=o("Promise").prototype.finally;c.finally!==d&&l(c,"finally",d,{unsafe:!0})}}(),function(){if(MCe)return tSe;MCe=1;var e=xde(),t=Fse(),r=Gue(),n=jde(),o=mCe(),i=ile(),s=dCe(),a=t.Promise,l=!1,c=!a||!a.try||s(function(){a.try(function(e){l=8===e},8)}).error||!l;e({target:"Promise",stat:!0,forced:c},{try:function(e){var t=arguments.length>1?n(arguments,1):[],a=o.f(this),l=s(function(){return r(i(e),void 0,t)});return(l.error?a.reject:a.resolve)(l.value),a.promise}})}(),function(){if(zCe)return rSe;zCe=1;var e=xde(),t=mCe();e({target:"Promise",stat:!0},{withResolvers:function(){var e=t.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}})}(),function(){if(JCe)return nSe;JCe=1;var e=xde(),t=sSe(),r=Zse(),n=Array.fromAsync,o=!n||r(function(){var e=0;return n.call(function(){return e++,[]},{length:0}),1!==e});e({target:"Array",stat:!0,forced:o},{fromAsync:t})}(),function(){if(aSe)return mSe;aSe=1;var e=xde(),t=Yse(),r=Jae(),n=ile(),o=pve(),i=Ice(),s=hve(),a=Wde(),l=Ule(),c=Sce(),d=Bbe(),u=ele(),h=r("Promise"),p=r("SuppressedError"),g=ReferenceError,f=l("asyncDispose"),m=l("toStringTag"),v="AsyncDisposableStack",b=c.set,y=c.getterFor(v),w="async-dispose",x="disposed",_=function(e){var t=y(e);if(t.state===x)throw new g(v+" already disposed");return t},k=function(){b(o(this,C),{type:v,state:"pending",stack:[]}),t||(this.disposed=!1)},C=k.prototype;s(C,{disposeAsync:function(){var e=this;return new h(function(r,n){var o=y(e);if(o.state===x)return r(void 0);
5991o.state=x,t||(e.disposed=!0);var i,s=o.stack,a=s.length,l=!1,c=function(e){l?i=new p(e,i):(l=!0,i=e),d()},d=function(){if(a){var e=s[--a];s[a]=null;try{h.resolve(e()).then(d,c)}catch(e){c(e)}}else o.stack=null,l?n(i):r(void 0)};d()})},use:function(e){return d(_(this),e,w),e},adopt:function(e,t){var r=_(this);return n(t),d(r,void 0,w,function(){return t(e)}),e},defer:function(e){var t=_(this);n(e),d(t,void 0,w,e)},move:function(){var e=_(this),r=new k;return y(r).stack=e.stack,e.stack=[],e.state=x,t||(this.disposed=!0),r}}),t&&a(C,"disposed",{configurable:!0,get:function(){return y(this).state===x}}),i(C,f,C.disposeAsync,{name:"disposeAsync"}),i(C,m,v,{nonWritable:!0}),e({global:!0,constructor:!0,forced:u&&u<136},{AsyncDisposableStack:k})}(),function(){if(lSe)return vSe;lSe=1;var e=Qse(),t=Ice(),r=Jae(),n=sle(),o=zle(),i=Ule(),s=oSe(),a=i("asyncDispose"),l=r("Promise");o(s,a)||t(s,a,function(){var t=this;return new l(function(r,o){var i=n(t,"return");i?l.resolve(e(i,t)).then(function(){r(void 0)},o):r(void 0)})})}(),function(){if(cSe)return bSe;cSe=1;var e=xde(),t=Gue(),r=ile(),n=tce();e({target:"Reflect",stat:!0,forced:!Zse()(function(){Reflect.apply(function(){})})},{apply:function(e,o,i){return t(r(e),o,n(i))}})}(),function(){if(dSe)return ySe;dSe=1;var e=xde(),t=Jae(),r=Gue(),n=Gbe(),o=rCe(),i=tce(),s=Yae(),a=Dde(),l=Zse(),c=t("Reflect","construct"),d=Object.prototype,u=[].push,h=l(function(){function e(){}return!(c(function(){},[],e)instanceof e)}),p=!l(function(){c(function(){})}),g=h||p;e({target:"Reflect",stat:!0,forced:g,sham:g},{construct:function(e,t){o(e);var l=arguments.length<3?e:o(arguments[2]);if(i(t),p&&!h)return c(e,t,l);if(e===l){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var g=[null];return r(u,g,t),new(r(n,e,g))}var f=l.prototype,m=a(s(f)?f:d),v=r(e,m,t);return s(v)?v:m}})}(),function(){if(uSe)return wSe;uSe=1;var e=xde(),t=Yse(),r=tce(),n=Hle(),o=rce(),i=Zae(),s=Zse(),a=TypeError;e({target:"Reflect",stat:!0,forced:s(function(){Reflect.defineProperty(o.f({},1,{value:1}),1,{value:2})}),sham:!t},{defineProperty:function(e,t,s){r(e);var l,c,d=n(t);if(r(s),("get"in s||"set"in s)&&("get"in s&&!i(l=s.get)&&void 0!==l||"set"in s&&!i(c=s.set)&&void 0!==c||"value"in s||"writable"in s))throw new a("Invalid property descriptor");try{return o.f(e,d,s),!0}catch{return!1}}})}(),function(){if(hSe)return xSe;hSe=1;var e=xde(),t=tce(),r=Wle().f,n=Hle();e({target:"Reflect",stat:!0},{deleteProperty:function(e,o){t(e);var i=n(o),s=r(e,i);return!(s&&!s.configurable)&&delete e[i]}})}(),function(){if(fSe)return _Se;fSe=1;var e=xde(),t=Qse(),r=Yae(),n=tce(),o=kSe(),i=Wle(),s=Rpe(),a=Hle(),l=function(e,a,c){if(n(e)===c)return e[a];var d=i.f(e,a);if(d)return o(d)?d.value:void 0===d.get?void 0:t(d.get,c);var u=s(e);return r(u)?l(u,a,c):void 0};e({target:"Reflect",stat:!0},{get:function(e,t){return l(n(e),a(t),arguments.length<3?e:arguments[2])}})}(),function(){if(CSe)return GSe;CSe=1;var e=xde(),t=Yse(),r=tce(),n=Wle();e({target:"Reflect",stat:!0,sham:!t},{getOwnPropertyDescriptor:function(e,t){return n.f(r(e),t)}})}(),function(){if(SSe)return ZSe;SSe=1;var e=xde(),t=tce(),r=Rpe();e({target:"Reflect",stat:!0,sham:!Npe()},{getPrototypeOf:function(e){return r(t(e))}})}(),ESe||(ESe=1,xde()({target:"Reflect",stat:!0},{has:function(e,t){return t in e}})),function(){if(ISe)return YSe;ISe=1;var e=xde(),t=tce(),r=kwe();e({target:"Reflect",stat:!0},{isExtensible:function(e){return t(e),r(e)}})}(),ASe||(ASe=1,xde()({target:"Reflect",stat:!0},{ownKeys:bde()})),function(){if(TSe)return JSe;TSe=1;var e=xde(),t=Jae(),r=tce();e({target:"Reflect",stat:!0,sham:!awe()},{preventExtensions:function(e){r(e);try{var n=t("Object","preventExtensions");return n&&n(e),!0}catch{return!1}}})}(),function(){if(OSe)return QSe;OSe=1;var e=xde(),t=Qse(),r=tce(),n=Yae(),o=kSe(),i=Zse(),s=rce(),a=Wle(),l=Rpe(),c=Hae(),d=Hle(),u=function(e,i,d,h){var p,g,f,m=a.f(r(e),i);if(!m){if(n(g=l(e)))return u(g,i,d,h);m=c(0)}if(o(m)){if(!1===m.writable||!n(h))return!1;if(p=a.f(h,i)){if(!o(p)||!1===p.writable)return!1;s.f(h,i,{value:d})}else try{s.f(h,i,c(0,d))}catch{return!1}}else{if(void 0===(f=m.set))return!1;t(f,h,d)}return!0},h=i(function(){var e=function(){},t=s.f(new e,"a",{configurable:!0});return!1!==Reflect.set(e.prototype,"a",1,t)});e({target:"Reflect",stat:!0,forced:h},{set:function(e,t,n){return u(r(e),d(t),n,arguments.length<4?e:arguments[3])}})}(),function(){if(LSe)return XSe;LSe=1;var e=xde(),t=tce(),r=Jhe(),n=Qhe();n&&e({target:"Reflect",stat:!0},{setPrototypeOf:function(e,o){t(e),r(o);try{return n(e,o),!0}catch{return!1}}})}(),function(){if($Se)return eEe;$Se=1;var e=xde(),t=Fse(),r=kue();e({global:!0},{Reflect:{}}),r(t.Reflect,"Reflect",!0)}(),function(){if(qSe)return tEe;qSe=1;var e=Yse(),t=Fse(),r=jae(),n=wde(),o=epe(),i=nce(),s=Dde(),a=ede().f,l=Qae(),c=rEe(),d=Cde(),u=iEe(),h=sEe(),p=Xhe(),g=Ice(),f=Zse(),m=zle(),v=Sce().enforce,b=_me(),y=Ule(),w=aEe(),x=lEe(),_=y("match"),k=t.RegExp,C=k.prototype,S=t.SyntaxError,E=r(C.exec),I=r("".charAt),A=r("".replace),T=r("".indexOf),O=r("".slice),L=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,$=/a/g,N=/a/g,R=new k($)!==$,P=h.MISSED_STICKY,D=h.UNSUPPORTED_Y;if(n("RegExp",e&&(!R||P||w||x||f(function(){return N[_]=!1,k($)!==$||k(N)===N||"/a/i"!==String(k($,"i"))})))){for(var M=function(e,t){var r,n,a,h,p,g,f=l(C,this),b=c(e),y=void 0===t,_=[],N=e;if(!f&&b&&y&&e.constructor===M)return e;if((b||l(C,e))&&(e=e.source,y&&(t=u(N))),e=void 0===e?"":d(e),t=void 0===t?"":d(t),N=e,w&&"dotAll"in $&&(n=!!t&&T(t,"s")>-1)&&(t=A(t,/s/g,"")),r=t,P&&"sticky"in $&&(a=!!t&&T(t,"y")>-1)&&D&&(t=A(t,/y/g,"")),x&&(h=function(e){for(var t,r=e.length,n=0,o="",i=[],a=s(null),l=!1,c=!1,d=0,u="";n<r;n++){if("\\"===(t=I(e,n))){if(t+=I(e,++n),!c&&"\\"===I(t,1)){o+="\\x5c";continue}}else if("]"===t)l=!1;else if(!l)switch(!0){case"["===t:l=!0;break;case"("===t:o+=t,E(L,O(e,n+1))?(n+=2,c=!0,d++):"?"!==I(e,n+1)&&d++;continue;case">"===t&&c:if(""===u||m(a,u))throw new S("Invalid capture group name");a[u]=!0,i[i.length]=[u,d],c=!1,u="";continue}c?u+=t:o+=t}for(var h=0;h<i.length;
5991h++)for(var p="\\k<"+i[h][0]+">",g="\\"+i[h][1];T(o,p)>-1;)o=A(o,p,g);return[o,i]}(e),e=h[0],_=h[1]),p=o(k(e,t),f?this:C,M),(n||a||_.length)&&(g=v(p),n&&(g.dotAll=!0,g.raw=M(function(e){for(var t,r=e.length,n=0,o="",i=!1;n<r;n++)"\\"!==(t=I(e,n))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),o+=t):o+="[\\s\\S]":o+=t+I(e,++n);return o}(e),r)),a&&(g.sticky=!0),_.length&&(g.groups=_)),e!==N)try{i(p,"source",""===N?"(?:)":N)}catch{}return p},z=a(k),F=0;z.length>F;)p(M,k,z[F++]);C.constructor=M,M.prototype=C,g(t,"RegExp",M,{constructor:!0})}b("RegExp")}(),function(){if(uEe)return hEe;uEe=1;var e=xde(),t=jae(),r=pEe(),n=zle(),o=Abe().start,i=Rxe(),s=Array,a=RegExp.escape,l=t("".charAt),c=t("".charCodeAt),d=t(1.1.toString),u=t([].join),h=/^[0-9a-z]/i,p=/^[$()*+./?[\\\]^{|}]/,g=RegExp("^[!\"#%&',\\-:;<=>@`~"+i+"]"),f=t(h.exec),m={"\t":"t","\n":"n","\v":"v","\f":"f","\r":"r"},v=function(e){var t=d(c(e,0),16);return t.length<3?"\\x"+o(t,2,"0"):"\\u"+o(t,4,"0")};e({target:"RegExp",stat:!0,forced:!a||"\\x61b"!==a("ab")},{escape:function(e){r(e);for(var t=e.length,o=s(t),i=0;i<t;i++){var a=l(e,i);if(0===i&&f(h,a))o[i]=v(a);else if(n(m,a))o[i]="\\"+m[a];else if(f(p,a))o[i]="\\"+a;else if(f(g,a))o[i]=v(a);else{var d=c(a,0);55296!=(63488&d)?o[i]=a:d>=56320||i+1>=t||56320!=(64512&c(e,i+1))?o[i]=v(a):(o[i]=a,o[++i]=l(e,i))}}return u(o,"")}})}(),function(){if(gEe)return bEe;gEe=1;var e=Yse(),t=aEe(),r=Vae(),n=Wde(),o=Sce().get,i=RegExp.prototype,s=TypeError;e&&t&&n(i,"dotAll",{configurable:!0,get:function(){if(this!==i){if("RegExp"===r(this))return!!o(this).dotAll;throw new s("Incompatible receiver, RegExp required")}}})}(),xEe(),function(){if(_Ee)return AEe;_Ee=1;var e=Yse(),t=Wde(),r=nEe(),n=oEe();e&&!r.correct&&(t(RegExp.prototype,"flags",{configurable:!0,get:n}),r.correct=!0)}(),function(){if(kEe)return TEe;kEe=1;var e=Yse(),t=sEe().MISSED_STICKY,r=Vae(),n=Wde(),o=Sce().get,i=RegExp.prototype,s=TypeError;e&&t&&n(i,"sticky",{configurable:!0,get:function(){if(this!==i){if("RegExp"===r(this))return!!o(this).sticky;throw new s("Incompatible receiver, RegExp required")}}})}(),function(){if(CEe)return OEe;CEe=1,xEe();var e=xde(),t=Qse(),r=Zae(),n=tce(),o=Cde(),i=function(){var e=!1,t=/[ac]/;return t.exec=function(){return e=!0,/./.exec.apply(this,arguments)},!0===t.test("abc")&&e}(),s=/./.test;e({target:"RegExp",proto:!0,forced:!i},{test:function(e){var i=n(this),a=o(e),l=i.exec;if(!r(l))return t(s,i,a);var c=t(l,i,a);return null!==c&&(n(c),!0)}})}(),function(){if(SEe)return LEe;SEe=1;var e=wce().PROPER,t=Ice(),r=tce(),n=Cde(),o=Zse(),i=iEe(),s="toString",a=RegExp.prototype,l=a[s],c=o(function(){return"/a/b"!==l.call({source:"a",flags:"b"})}),d=e&&l.name!==s;(c||d)&&t(a,s,function(){var e=r(this);return"/"+n(e.source)+"/"+n(i(e))},{unsafe:!0})}(),IEe||(IEe=1,EEe||(EEe=1,Swe()("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},Ewe()))),function(){if(YEe)return JEe;YEe=1;var e=xde(),t=function(){if(qEe)return KEe;qEe=1;var e=XEe(),t=QEe(),r=rIe(),n=nIe(),o=oIe(),i=tIe(),s=eIe(),a=t.has,l=t.remove;return KEe=function(t){var c=e(this),d=o(t),u=r(c);return n(u)<=d.size?i(u,function(e){d.includes(e)&&l(u,e)}):s(d.getIterator(),function(e){a(u,e)&&l(u,e)}),u},KEe}(),r=Zse(),n=!iIe()("difference",function(e){return 0===e.size}),o=n||r(function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var r=e++>1;return t.has(1)&&t.clear(),{done:r,value:2}}}}},t=new Set([1,2,3,4]);return 3!==t.difference(e).size});e({target:"Set",proto:!0,real:!0,forced:o},{difference:t})}(),function(){if(lIe)return cIe;lIe=1;var e=xde(),t=Zse(),r=function(){if(aIe)return sIe;aIe=1;var e=XEe(),t=QEe(),r=nIe(),n=oIe(),o=tIe(),i=eIe(),s=t.Set,a=t.add,l=t.has;return sIe=function(t){var c=e(this),d=n(t),u=new s;return r(c)>d.size?i(d.getIterator(),function(e){l(c,e)&&a(u,e)}):o(c,function(e){d.includes(e)&&a(u,e)}),u},sIe}(),n=!iIe()("intersection",function(e){return 2===e.size&&e.has(1)&&e.has(2)})||t(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))});e({target:"Set",proto:!0,real:!0,forced:n},{intersection:r})}(),function(){if(hIe)return pIe;hIe=1;var e=xde(),t=function(){if(uIe)return dIe;uIe=1;var e=XEe(),t=QEe().has,r=nIe(),n=oIe(),o=tIe(),i=eIe(),s=Fpe();return dIe=function(a){var l=e(this),c=n(a);if(r(l)<=c.size)return!1!==o(l,function(e){if(c.includes(e))return!1},!0);var d=c.getIterator();return!1!==i(d,function(e){if(t(l,e))return s(d.iterator,"normal",!1)})},dIe}();e({target:"Set",proto:!0,real:!0,forced:!iIe()("isDisjointFrom",function(e){return!e})},{isDisjointFrom:t})}(),function(){if(mIe)return vIe;mIe=1;var e=xde(),t=function(){if(fIe)return gIe;fIe=1;var e=XEe(),t=nIe(),r=tIe(),n=oIe();return gIe=function(o){var i=e(this),s=n(o);return!(t(i)>s.size)&&!1!==r(i,function(e){if(!s.includes(e))return!1},!0)},gIe}();e({target:"Set",proto:!0,real:!0,forced:!iIe()("isSubsetOf",function(e){return e})},{isSubsetOf:t})}(),function(){if(wIe)return xIe;wIe=1;var e=xde(),t=function(){if(yIe)return bIe;yIe=1;var e=XEe(),t=QEe().has,r=nIe(),n=oIe(),o=eIe(),i=Fpe();return bIe=function(s){var a=e(this),l=n(s);if(r(a)<l.size)return!1;var c=l.getIterator();return!1!==o(c,function(e){if(!t(a,e))return i(c.iterator,"normal",!1)})},bIe}();e({target:"Set",proto:!0,real:!0,forced:!iIe()("isSupersetOf",function(e){return!e})},{isSupersetOf:t})}(),function(){if(EIe)return IIe;EIe=1;var e=xde(),t=function(){if(kIe)return _Ie;kIe=1;var e=XEe(),t=QEe(),r=rIe(),n=oIe(),o=eIe(),i=t.add,s=t.has,a=t.remove;return _Ie=function(t){var l=e(this),c=n(t).getIterator(),d=r(l);return o(c,function(e){s(l,e)?a(d,e):i(d,e)}),d},_Ie}(),r=AIe();e({target:"Set",proto:!0,real:!0,forced:!iIe()("symmetricDifference")||!r("symmetricDifference")},{symmetricDifference:t})}(),function(){if(LIe)return $Ie;LIe=1;var e=xde(),t=function(){if(OIe)return TIe;OIe=1;var e=XEe(),t=QEe().add,r=rIe(),n=oIe(),o=eIe();return TIe=function(i){var s=e(this),a=n(i).getIterator(),l=r(s);return o(a,function(e){t(l,e)}),l},TIe}(),r=AIe();e({target:"Set",proto:!0,real:!0,forced:!iIe()("union")||!r("union")},{union:t})}(),function(){if(NIe)return MIe;NIe=1;
5991var e=xde(),t=jae(),r=qae(),n=qce(),o=Cde(),i=Zse(),s=t("".charAt);e({target:"String",proto:!0,forced:i(function(){return"\ud842"!=="ð ®·".at(-2)})},{at:function(e){var t=o(r(this)),i=t.length,a=n(e),l=a>=0?a:i+a;return l<0||l>=i?void 0:s(t,l)}})}(),function(){if(DIe)return zIe;DIe=1;var e=xde(),t=FIe().codeAt;e({target:"String",proto:!0},{codePointAt:function(e){return t(this,e)}})}(),function(){if(VIe)return WIe;VIe=1;var e=xde(),t=Cue(),r=Wle().f,n=Zce(),o=Cde(),i=KIe(),s=qae(),a=qIe(),l=Nle(),c=t("".slice),d=Math.min,u=a("endsWith"),h=!l&&!u&&!!function(){var e=r(String.prototype,"endsWith");return e&&!e.writable}();e({target:"String",proto:!0,forced:!h&&!u},{endsWith:function(e){var t=o(s(this));i(e);var r=o(e),a=arguments.length>1?arguments[1]:void 0,l=t.length,u=void 0===a?l:d(n(a),l);return c(t,u-r.length,u)===r}})}(),YIe(),function(){if(JIe)return eAe;JIe=1;var e=xde(),t=jae(),r=KIe(),n=qae(),o=Cde(),i=qIe(),s=t("".indexOf);e({target:"String",proto:!0,forced:!i("includes")},{includes:function(e){return!!~s(o(n(this)),o(r(e)),arguments.length>1?arguments[1]:void 0)}})}(),function(){if(QIe)return tAe;QIe=1;var e=xde(),t=jae(),r=qae(),n=Cde(),o=t("".charCodeAt);e({target:"String",proto:!0},{isWellFormed:function(){for(var e=n(r(this)),t=e.length,i=0;i<t;i++){var s=o(e,i);if(55296==(63488&s)&&(s>=56320||++i>=t||56320!=(64512&o(e,i))))return!1}return!0}})}(),nAe(),function(){if(dAe)return uAe;dAe=1;var e=Qse(),t=jae(),r=hAe(),n=tce(),o=Yae(),i=Zce(),s=Cde(),a=qae(),l=sle(),c=pAe(),d=iEe(),u=gAe(),h=t("".indexOf);r("match",function(t,r,p){return[function(r){var n=a(this),i=o(r)?l(r,t):void 0;return i?e(i,r,n):new RegExp(r)[t](s(n))},function(e){var t=n(this),o=s(e),a=p(r,t,o);if(a.done)return a.value;var l=s(d(t));if(!~h(l,"g"))return u(t,o);var g=!!~h(l,"u")||!!~h(l,"v");t.lastIndex=0;for(var f,m=[],v=0;null!==(f=u(t,o));){var b=s(f[0]);m[v]=b,""===b&&(t.lastIndex=c(o,i(t.lastIndex),g)),v++}return 0===v?null:m}]})}(),function(){if(fAe)return yAe;fAe=1;var e=xde(),t=Qse(),r=Cue(),n=kfe(),o=Sfe(),i=qae(),s=Zce(),a=Cde(),l=tce(),c=Yae(),d=Vae(),u=rEe(),h=iEe(),p=sle
5991(),g=Ice(),f=Zse(),m=Ule(),v=nCe(),b=pAe(),y=gAe(),w=Sce(),x=Nle(),_=m("matchAll"),k="RegExp String",C=k+" Iterator",S=w.set,E=w.getterFor(C),I=RegExp.prototype,A=TypeError,T=r("".indexOf),O=r("".matchAll),L=!!O&&!f(function(){O("a",/./)}),$=n(function(e,t,r,n){S(this,{type:C,regexp:e,string:t,global:r,unicode:n,done:!1})},k,function(){var e=E(this);if(e.done)return o(void 0,!0);var t=e.regexp,r=e.string,n=y(t,r);return null===n?(e.done=!0,o(void 0,!0)):e.global?(""===a(n[0])&&(t.lastIndex=b(r,s(t.lastIndex),e.unicode)),o(n,!1)):(e.done=!0,o(n,!1))}),N=function(e){var t,r,n,o=l(this),i=a(e),c=v(o,RegExp),d=a(h(o));return t=new c(c===RegExp?o.source:o,d),r=!!~T(d,"g"),n=!!~T(d,"u")||!!~T(d,"v"),t.lastIndex=s(o.lastIndex),new $(t,i,r,n)};e({target:"String",proto:!0,forced:L},{matchAll:function(e){var r,n,o,s,l=i(this);if(c(e)){if(u(e)&&(r=a(i(h(e))),!~T(r,"g")))throw new A("`.matchAll` does not allow non-global regexes");if(L)return O(l,e);if(void 0===(o=p(e,_))&&x&&"RegExp"===d(e)&&(o=N),o)return t(o,e,l)}else if(L)return O(l,e);return n=a(l),s=new RegExp(e,"g"),x?t(N,s,n):s[_](n)}}),x||_ in I||g(I,_,N)}(),function(){if(bAe)return wAe;bAe=1;var e=xde(),t=Abe().end;e({target:"String",proto:!0,forced:xAe()},{padEnd:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})}(),function(){if(_Ae)return AAe;_Ae=1;var e=xde(),t=Abe().start;e({target:"String",proto:!0,forced:xAe()},{padStart:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})}(),function(){if(kAe)return TAe;kAe=1;var e=xde(),t=jae(),r=Gae(),n=Mle(),o=Cde(),i=Yce(),s=t([].push),a=t([].join);e({target:"String",stat:!0},{raw:function(e){var t=r(n(e).raw),l=i(t);if(!l)return"";for(var c=arguments.length,d=[],u=0;;){if(s(d,o(t[u++])),u===l)return a(d,"");u<c&&s(d,o(arguments[u]))}}})}(),CAe||(CAe=1,xde()({target:"String",proto:!0},{repeat:Ibe()})),function(){if(IAe)return OAe;IAe=1;var e=Gue(),t=Qse(),r=jae(),n=hAe(),o=Zse(),i=tce(),s=Zae(),a=Yae(),l=qce(),c=Zce(),d=Cde(),u=qae(),h=pAe(),p=sle(),g=LAe(),f=iEe(),m=gAe(),v=Ule()("replace"),b=Math.max,y=Math.min,w=r([].concat),x=r([].push),_=r("".indexOf),k=r("".slice),C=function(e){return void 0===e?e:String(e)},S="$0"==="a".replace(/./,"$0"),E=!!/./[v]&&""===/./[v]("a","$0"),I=!o(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")});n("replace",function(r,n,o){var S=E?"$":"$0";return[function(e,r){var o=u(this),i=a(e)?p(e,v):void 0;return i?t(i,e,o,r):t(n,d(o),e,r)},function(t,r){var a=i(this),u=d(t),p=s(r);p||(r=d(r));var v=d(f(a));if("string"==typeof r&&!~_(r,S)&&!~_(r,"$<")&&!~_(v,"y")){var E=o(n,a,u,r);if(E.done)return E.value}var I,A=!!~_(v,"g");A&&(I=!!~_(v,"u")||!!~_(v,"v"),a.lastIndex=0);for(var T,O=[];null!==(T=m(a,u))&&(x(O,T),A);)""===d(T[0])&&(a.lastIndex=h(u,c(a.lastIndex),I));for(var L="",$=0,N=0;N<O.length;N++){for(var R,P=d((T=O[N])[0]),D=b(y(l(T.index),u.length),0),M=[],z=1;z<T.length;z++)x(M,C(T[z]));var F=T.groups;if(p){var U=w([P],M,D,u);void 0!==F&&x(U,F),R=d(e(r,void 0,U))}else R=g(P,u,D,M,F,r);D>=$&&(L+=k(u,$,D)+R,$=D+P.length)}return L+k(u,$)}]},!I||!S||E)}(),function(){if($Ae)return BAe;$Ae=1;var e=xde(),t=Qse(),r=jae(),n=qae(),o=Zae(),i=Yae(),s=rEe(),a=Cde(),l=sle(),c=iEe(),d=LAe(),u=Ule(),h=Nle(),p=u("replace"),g=TypeError,f=r("".indexOf),m=r("".replace),v=r("".slice),b=Math.max;e({target:"String",proto:!0},{replaceAll:function(e,r){var u,y,w,x,_,k,C,S,E,I,A=n(this),T=0,O="";if(i(e)){if((u=s(e))&&(y=a(n(c(e))),!~f(y,"g")))throw new g("`.replaceAll` does not allow non-global regexes");if(w=l(e,p))return t(w,e,A,r);if(h&&u)return m(a(A),e,r)}for(x=a(A),_=a(e),(k=o(r))||(r=a(r)),C=_.length,S=b(1,C),E=f(x,_);-1!==E;)I=k?a(r(_,E,x)):d(_,x,E,[],void 0,r),O+=v(x,T,E)+I,T=E+C,E=E+S>x.length?-1:f(x,_,E+S);return T<x.length&&(O+=v(x,T)),O}})}(),function(){if(NAe)return HAe;NAe=1;var e=Qse(),t=hAe(),r=tce(),n=Yae(),o=qae(),i=J_e(),s=Cde(),a=sle(),l=gAe();t("search",function(t,c,d){return[function(r){var i=o(this),l=n(r)?a(r,t):void 0;return l?e(l,r,i):new RegExp(r)[t](s(i))},function(e){var t=r(this),n=s(e),o=d(c,t,n);if(o.done)return o.value;var a=t.lastIndex;i(a,0)||(t.lastIndex=0);var u=l(t,n);return i(t.lastIndex,a)||(t.lastIndex=a),null===u?-1:u.index}]})}(),function(){if(RAe)return jAe;RAe=1;
5991var e=Qse(),t=jae(),r=hAe(),n=tce(),o=Yae(),i=qae(),s=nCe(),a=pAe(),l=Zce(),c=Cde(),d=sle(),u=iEe(),h=gAe(),p=sEe(),g=Zse(),f=p.UNSUPPORTED_Y,m=Math.min,v=t([].push),b=t("".slice),y=t("".indexOf),w=!g(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}),x="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;r("split",function(t,r,p){var g="0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e(r,this,t,n)}:r;return[function(r,n){var s=i(this),a=o(r)?d(r,t):void 0;return a?e(a,r,s,n):e(g,c(s),r,n)},function(e,t){var o=n(this),i=c(e);if(!x){var d=p(g,o,i,t,g!==r);if(d.done)return d.value}var w=s(o,RegExp),_=c(u(o)),k=!!~y(_,"u")||!!~y(_,"v");f?~y(_,"g")||(_+="g"):~y(_,"y")||(_+="y");var C=new w(f?"^(?:"+o.source+")":o,_),S=void 0===t?4294967295:t>>>0;if(0===S)return[];if(0===i.length)return null===h(C,i)?[i]:[];for(var E=0,I=0,A=[];I<i.length;){C.lastIndex=f?0:I;var T,O=h(C,f?b(i,I):i);if(null===O||(T=m(l(C.lastIndex+(f?I:0)),i.length))===E)I=a(i,I,k);else{if(v(A,b(i,E,I)),A.length===S)return A;for(var L=1;L<=O.length-1;L++)if(v(A,O[L]),A.length===S)return A;I=E=T}}return v(A,b(i,E)),A}]},x||!w,f)}(),function(){if(PAe)return VAe;PAe=1;var e=xde(),t=Cue(),r=Wle().f,n=Zce(),o=Cde(),i=KIe(),s=qae(),a=qIe(),l=Nle(),c=t("".slice),d=Math.min,u=a("startsWith"),h=!l&&!u&&!!function(){var e=r(String.prototype,"startsWith");return e&&!e.writable}();e({target:"String",proto:!0,forced:!h&&!u},{startsWith:function(e){var t=o(s(this));i(e);var r=o(e),a=n(d(arguments.length>1?arguments[1]:void 0,t.length));return c(t,a,a+r.length)===r}})}(),function(){if(DAe)return WAe;DAe=1;var e=xde(),t=jae(),r=qae(),n=qce(),o=Cde(),i=t("".slice),s=Math.max,a=Math.min;e({target:"String",proto:!0,forced:!"".substr||"b"!=="ab".substr(-1)},{substr:function(e,t){var l=o(r(this)),c=l.length,d=n(e),u=d<0?s(c+d,0):a(d,c),h=void 0===t?c:n(t);if(h<=0)return"";var p=a(u+h,c);return u>=p?"":i(l,u,p)}})}(),function(){if(MAe)return KAe;MAe=1;var e=xde(),t=Qse(),r=jae(),n=qae(),o=Cde(),i=Zse(),s=Array,a=r("".charAt),l=r("".charCodeAt),c=r([].join),d="".toWellFormed,u=d&&i(function(){return"1"!==t(d,1)});e({target:"String",proto:!0,forced:u},{toWellFormed:function(){var e=o(n(this));if(u)return t(d,e);for(var r=e.length,i=s(r),h=0;h<r;h++){var p=l(e,h);55296!=(63488&p)?i[h]=a(e,h):p>=56320||h+1>=r||56320!=(64512&l(e,h+1))?i[h]="�":(i[h]=a(e,h),i[++h]=a(e,h))}return c(i,"")}})}(),function(){if(UAe)return qAe;UAe=1;var e=xde(),t=Pxe().trim;e({target:"String",proto:!0,forced:GAe()("trim")},{trim:function(){return t(this)}})}(),function(){if(QAe)return XAe;QAe=1,function(){if(JAe)return eTe;JAe=1;var e=xde(),t=tTe();e({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==t},{trimRight:t})}();var e=xde(),t=tTe();e({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==t},{trimEnd:t})}(),function(){if(iTe)return sTe;iTe=1,function(){if(oTe)return aTe;oTe=1;var e=xde(),t=lTe();e({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==t},{trimLeft:t})}();var e=xde(),t=lTe();e({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==t},{trimStart:t})}(),function(){if(pTe)return gTe;pTe=1;var e=xde(),t=fTe();e({target:"String",proto:!0,forced:mTe()("anchor")},{anchor:function(e){return t(this,"a","name",e)}})}(),function(){if(vTe)return JTe;vTe=1;var e=xde(),t=fTe();e({target:"String",proto:!0,forced:mTe()("big")},{big:function(){return t(this,"big","","")}})}(),function(){if(bTe)return QTe;bTe=1;var e=xde(),t=fTe();e({target:"String",proto:!0,forced:mTe()("blink")},{blink:function(){return t(this,"blink","","")}})}(),function(){if(yTe)return XTe;yTe=1;var e=xde(),t=fTe();e({target:"String",proto:!0,forced:mTe()("bold")},{bold:function(){return t(this,"b","","")}})}(),function(){if(wTe)return eOe;wTe=1;var e=xde(),t=fTe();e({target:"String",proto:!0,forced:mTe()("fixed")},{fixed:function(){return t(this,"tt","","")}})}(),function(){if(xTe)return tOe;xTe=1;var e=xde(),t=fTe();
5991e({target:"String",proto:!0,forced:mTe()("fontcolor")},{fontcolor:function(e){return t(this,"font","color",e)}})}(),function(){if(_Te)return rOe;_Te=1;var e=xde(),t=fTe();e({target:"String",proto:!0,forced:mTe()("fontsize")},{fontsize:function(e){return t(this,"font","size",e)}})}(),function(){if(kTe)return nOe;kTe=1;var e=xde(),t=fTe();e({target:"String",proto:!0,forced:mTe()("italics")},{italics:function(){return t(this,"i","","")}})}(),function(){if(CTe)return oOe;CTe=1;var e=xde(),t=fTe();e({target:"String",proto:!0,forced:mTe()("link")},{link:function(e){return t(this,"a","href",e)}})}(),function(){if(STe)return iOe;STe=1;var e=xde(),t=fTe();e({target:"String",proto:!0,forced:mTe()("small")},{small:function(){return t(this,"small","","")}})}(),function(){if(ETe)return sOe;ETe=1;var e=xde(),t=fTe();e({target:"String",proto:!0,forced:mTe()("strike")},{strike:function(){return t(this,"strike","","")}})}(),function(){if(ITe)return aOe;ITe=1;var e=xde(),t=fTe();e({target:"String",proto:!0,forced:mTe()("sub")},{sub:function(){return t(this,"sub","","")}})}(),function(){if(ATe)return lOe;ATe=1;var e=xde(),t=fTe();e({target:"String",proto:!0,forced:mTe()("sup")},{sup:function(){return t(this,"sup","","")}})}(),HTe||(HTe=1,fOe()("Float32",function(e){return function(t,r,n){return e(this,t,r,n)}})),jTe||(jTe=1,fOe()("Float64",function(e){return function(t,r,n){return e(this,t,r,n)}})),VTe||(VTe=1,fOe()("Int8",function(e){return function(t,r,n){return e(this,t,r,n)}})),WTe||(WTe=1,fOe()("Int16",function(e){return function(t,r,n){return e(this,t,r,n)}})),KTe||(KTe=1,fOe()("Int32",function(e){return function(t,r,n){return e(this,t,r,n)}})),qTe||(qTe=1,fOe()("Uint8",function(e){return function(t,r,n){return e(this,t,r,n)}})),GTe||(GTe=1,fOe()("Uint8",function(e){return function(t,r,n){return e(this,t,r,n)}},!0)),ZTe||(ZTe=1,fOe()("Uint16",function(e){return function(t,r,n){return e(this,t,r,n)}})),YTe||(YTe=1,fOe()("Uint32",function(e){return function(t,r,n){return e(this,t,r,n)}})),function(){if(mOe)return kOe;mOe=1;var e=Cve(),t=Yce(),r=qce(),n=e.aTypedArray;(0,e.exportTypedArrayMethod)("at",function(e){var o=n(this),i=t(o),s=r(e),a=s>=0?s:i+s;return a<0||a>=i?void 0:o[a]})}(),function(){if(vOe)return COe;vOe=1;var e=jae(),t=Cve(),r=e(gge()),n=t.aTypedArray;(0,t.exportTypedArrayMethod)("copyWithin",function(e,t){return r(n(this),e,t,arguments.length>2?arguments[2]:void 0)})}(),function(){if(bOe)return SOe;bOe=1;var e=Cve(),t=Oue().every,r=e.aTypedArray;(0,e.exportTypedArrayMethod)("every",function(e){return t(r(this),e,arguments.length>1?arguments[1]:void 0)})}(),function(){if(yOe)return EOe;yOe=1;var e=Cve(),t=Cge(),r=pOe(),n=kde(),o=Qse(),i=jae(),s=Zse(),a=e.aTypedArray,l=e.exportTypedArrayMethod,c=i("".slice),d=s(function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e});l("fill",function(e){var i=arguments.length;a(this);var s="Big"===c(n(this),0,3)?r(e):+e;return o(t,this,s,i>1?arguments[1]:void 0,i>2?arguments[2]:void 0)},d)}(),function(){if(_Oe)return IOe;_Oe=1;var e=Cve(),t=Oue().filter,r=AOe(),n=e.aTypedArray;(0,e.exportTypedArrayMethod)("filter",function(e){var o=t(n(this),e,arguments.length>1?arguments[1]:void 0);return r(this,o)})}(),function(){if(TOe)return dLe;TOe=1;var e=Cve(),t=Oue().find,r=e.aTypedArray;(0,e.exportTypedArrayMethod)("find",function(e){return t(r(this),e,arguments.length>1?arguments[1]:void 0)})}(),function(){if(OOe)return uLe;OOe=1;var e=Cve(),t=Oue().findIndex,r=e.aTypedArray;(0,e.exportTypedArrayMethod)("findIndex",function(e){return t(r(this),e,arguments.length>1?arguments[1]:void 0)})}(),function(){if(LOe)return hLe;LOe=1;var e=Cve(),t=Pge().findLast,r=e.aTypedArray;(0,e.exportTypedArrayMethod)("findLast",function(e){return t(r(this),e,arguments.length>1?arguments[1]:void 0)})}(),function(){if($Oe)return pLe;$Oe=1;var e=Cve(),t=Pge().findLastIndex,r=e.aTypedArray;(0,e.exportTypedArrayMethod)("findLastIndex",function(e){return t(r(this),e,arguments.length>1?arguments[1]:void 0)})}(),function(){if(NOe)return gLe;NOe=1;var e=Cve(),t=Oue().forEach,r=e.aTypedArray;
5991(0,e.exportTypedArrayMethod)("forEach",function(e){t(r(this),e,arguments.length>1?arguments[1]:void 0)})}(),function(){if(ROe)return fLe;ROe=1;var e=dOe();(0,Cve().exportTypedArrayStaticMethod)("from",gOe(),e)}(),function(){if(POe)return mLe;POe=1;var e=Cve(),t=Jce().includes,r=e.aTypedArray;(0,e.exportTypedArrayMethod)("includes",function(e){return t(r(this),e,arguments.length>1?arguments[1]:void 0)})}(),function(){if(DOe)return vLe;DOe=1;var e=Cve(),t=Jce().indexOf,r=e.aTypedArray;(0,e.exportTypedArrayMethod)("indexOf",function(e){return t(r(this),e,arguments.length>1?arguments[1]:void 0)})}(),function(){if(MOe)return bLe;MOe=1;var e=Fse(),t=Zse(),r=jae(),n=Cve(),o=Efe(),i=Ule()("iterator"),s=e.Uint8Array,a=r(o.values),l=r(o.keys),c=r(o.entries),d=n.aTypedArray,u=n.exportTypedArrayMethod,h=s&&s.prototype,p=!t(function(){h[i].call([1])}),g=!!h&&h.values&&h[i]===h.values&&"values"===h.values.name,f=function(){return a(d(this))};u("entries",function(){return c(d(this))},p),u("keys",function(){return l(d(this))},p),u("values",f,p||!g,{name:"values"}),u(i,f,p||!g,{name:"values"})}(),function(){if(zOe)return yLe;zOe=1;var e=Cve(),t=jae(),r=e.aTypedArray,n=e.exportTypedArrayMethod,o=t([].join);n("join",function(e){return o(r(this),e)})}(),function(){if(FOe)return wLe;FOe=1;var e=Cve(),t=Gue(),r=Nfe(),n=e.aTypedArray;(0,e.exportTypedArrayMethod)("lastIndexOf",function(e){var o=arguments.length;return t(r,n(this),o>1?[e,arguments[1]]:[e])})}(),function(){if(UOe)return xLe;UOe=1;var e=Cve(),t=Oue().map,r=AOe(),n=e.aTypedArray;(0,e.exportTypedArrayMethod)("map",function(e){var o=t(n(this),e,arguments.length>1?arguments[1]:void 0);return r(this,o)})}(),function(){if(BOe)return _Le;BOe=1;var e=Cve(),t=dOe(),r=e.aTypedArrayConstructor;(0,e.exportTypedArrayStaticMethod)("of",function(){for(var e=0,t=arguments.length,n=new(r(this))(t);t>e;)n[e]=arguments[e++];return n},t)}(),function(){if(HOe)return kLe;HOe=1;var e=Cve(),t=Gfe().left,r=e.aTypedArray;(0,e.exportTypedArrayMethod)("reduce",function(e){var n=arguments.length;return t(r(this),e,n,n>1?arguments[1]:void 0)})}(),function(){if(jOe)return CLe;jOe=1;var e=Cve(),t=Gfe().right,r=e.aTypedArray;(0,e.exportTypedArrayMethod)("reduceRight",function(e){var n=arguments.length;return t(r(this),e,n,n>1?arguments[1]:void 0)})}(),function(){if(VOe)return SLe;VOe=1;var e=Cve(),t=e.aTypedArray,r=e.exportTypedArrayMethod,n=Math.floor;r("reverse",function(){for(var e,r=this,o=t(r).length,i=n(o/2),s=0;s<i;)e=r[s],r[s++]=r[--o],r[o]=e;return r})}(),function(){if(WOe)return ELe;WOe=1;var e=Fse(),t=Qse(),r=Cve(),n=Yce(),o=uOe(),i=Mle(),s=Zse(),a=e.RangeError,l=e.Int8Array,c=l&&l.prototype,d=c&&c.set,u=r.aTypedArray,h=r.exportTypedArrayMethod,p=!s(function(){var e=new Uint8ClampedArray(2);return t(d,e,{length:1,0:3},1),3!==e[1]}),g=p&&r.NATIVE_ARRAY_BUFFER_VIEWS&&s(function(){var e=new l(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]});h("set",function(e){u(this);var r=o(arguments.length>1?arguments[1]:void 0,1),s=i(e);if(p)return t(d,this,s,r);var l=this.length,c=n(s),h=0;if(c+r>l)throw new a("Wrong length");for(;h<c;)this[r+h]=s[h++]},!p||g)}(),function(){if(KOe)return ILe;KOe=1;var e=Cve(),t=Zse(),r=jde(),n=e.aTypedArray,o=e.getTypedArrayConstructor;(0,e.exportTypedArrayMethod)("slice",function(e,t){for(var i=r(n(this),e,t),s=o(this),a=0,l=i.length,c=new s(l);l>a;)c[a]=i[a++];return c},t(function(){new Int8Array(1).slice()}))}(),function(){if(qOe)return ALe;qOe=1;var e=Cve(),t=Oue().some,r=e.aTypedArray;(0,e.exportTypedArrayMethod)("some",function(e){return t(r(this),e,arguments.length>1?arguments[1]:void 0)})}(),function(){if(GOe)return TLe;GOe=1;var e=Fse(),t=Cue(),r=Zse(),n=ile(),o=bme(),i=Cve(),s=yme(),a=wme(),l=ele(),c=xme(),d=i.aTypedArray,u=i.exportTypedArrayMethod,h=e.Uint16Array,p=h&&t(h.prototype.sort),g=!(!p||r(function(){p(new h(2),null)})&&r(function(){p(new h(2),{})})),f=!!p&&!r(function(){if(l)return l<74;if(s)return s<67;if(a)return!0;if(c)return c<602;var e,t,r=new h(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(p(r,function(e,t){return(e/4|0)-(t/4|0)}),e=0;e<516;e++)if(r[e]!==n[e])return!0});u("sort",function(e){return void 0!==e&&n(e),f?p(this,e):o(d(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?t!=t?0:-1:t!=t?1:0===t&&0===r?1/t>0?1/r>0?0:1:1/r>0?-1:0:t>r?1:t<r?-1:0}}(e))},!f||g)}(),function(){if(ZOe)return OLe;ZOe=1;var e=Cve(),t=Zce(),r=Gce(),n=e.aTypedArray,o=e.getTypedArrayConstructor;(0,e.exportTypedArrayMethod)("subarray",function(e,i){var s=n(this),a=s.length,l=r(e,a);return new(o(s))(s.buffer,s.byteOffset+l*s.BYTES_PER_ELEMENT,t((void 0===i?a:r(i,a))-l))})}(),function(){if(YOe)return LLe;YOe=1;var e=Fse(),t=Gue(),r=Cve(),n=Zse(),o=jde(),i=e.Int8Array,s=r.aTypedArray,a=r.exportTypedArrayMethod,l=[].toLocaleStr
5991ing,c=!!i&&n(function(){l.call(new i(1))});a("toLocaleString",function(){return t(l,c?o(s(this)):s(this),o(arguments))},n(function(){return[1,2].toLocaleString()!==new i([1,2]).toLocaleString()})||!n(function(){i.prototype.toLocaleString.call([1,2])}))}(),function(){if(JOe)return $Le;JOe=1;var e=Yce(),t=Cve(),r=t.aTypedArray,n=t.exportTypedArrayMethod,o=t.getTypedArrayConstructor;n("toReversed",function(){for(var t=r(this),n=e(t),i=new(o(t))(n),s=0;s<n;s++)i[s]=t[n-s-1];return i})}(),function(){if(QOe)return NLe;QOe=1;var e=Cve(),t=jae(),r=ile(),n=Nme(),o=e.aTypedArray,i=e.getTypedArrayConstructor,s=e.exportTypedArrayMethod,a=t(e.TypedArrayPrototype.sort);s("toSorted",function(e){void 0!==e&&r(e);var t=o(this),s=n(i(t),t);return a(s,e)})}(),function(){if(XOe)return RLe;XOe=1;var e=Cve().exportTypedArrayMethod,t=Zse(),r=Fse(),n=jae(),o=r.Uint8Array,i=o&&o.prototype||{},s=[].toString,a=n([].join);t(function(){s.call({})})&&(s=function(){return a(this)});var l=i.toString!==s;e("toString",s,l)}(),function(){if(eLe)return PLe;eLe=1;var e=Cve(),t=hOe(),r=Yce(),n=qce(),o=pOe(),i=e.aTypedArray,s=e.getTypedArrayConstructor,a=e.exportTypedArrayMethod,l=RangeError,c=function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(e){return 8===e}}(),d=c&&function(){try{new Int8Array(1).with(-.5,1)}catch{return!0}}();a("with",function(e,a){var c=i(this),d=r(c),u=n(e),h=u<0?d+u:u,p=t(c)?o(a):+a;if(h>=d||h<0)throw new l("Incorrect index");for(var g=new(s(c))(d),f=0;f<d;f++)g[f]=f===h?p:c[f];return g},!c||d)}(),function(){if(cLe)return DLe;cLe=1;var e=xde(),t=Fse(),r=Nme(),n=ULe(),o=t.Uint8Array,i=!o||!o.fromBase64||!function(){try{return void o.fromBase64("a")}catch{}try{o.fromBase64("",null)}catch{return!0}}();o&&e({target:"Uint8Array",stat:!0,forced:i},{fromBase64:function(e){var t=n(e,arguments.length>1?arguments[1]:void 0,null,9007199254740991);return r(o,t.bytes)}})}(),function(){if(jLe)return VLe;jLe=1;var e=xde(),t=Fse(),r=pEe(),n=WLe();t.Uint8Array&&e({target:"Uint8Array",stat:!0},{fromHex:function(e){return n(r(e)).bytes}})}(),function(){if(GLe)return ZLe;GLe=1;var e=xde(),t=Fse(),r=ULe(),n=YLe(),o=t.Uint8Array,i=!o||!o.prototype.setFromBase64||!function(){var e=new o([255,255,255,255,255]);try{return void e.setFromBase64("",null)}catch{}try{return void e.setFromBase64("a")}catch{}try{e.setFromBase64("MjYyZg===")}catch{return 50===e[0]&&54===e[1]&&50===e[2]&&255===e[3]&&255===e[4]}}();o&&e({target:"Uint8Array",proto:!0,forced:i},{setFromBase64:function(e){n(this);var t=r(e,arguments.length>1?arguments[1]:void 0,this,this.length);return{read:t.read,written:t.written}}})}(),function(){if(JLe)return i$e;JLe=1;var e=xde(),t=Fse(),r=pEe(),n=YLe(),o=ibe(),i=WLe();t.Uint8Array&&e({target:"Uint8Array",proto:!0,forced:function(){try{var e=new ArrayBuffer(16,{maxByteLength:1024});new Uint8Array(e).setFromHex("cafed00d")}catch{return!0}}()},{setFromHex:function(e){n(this),r(e),o(this.buffer);var t=i(e,this).read;return{read:t,written:t/2}}})}(),function(){if(QLe)return s$e;QLe=1;var e=xde(),t=Fse(),r=jae(),n=MLe(),o=YLe(),i=ibe(),s=zLe(),a=FLe(),l=s.i2c,c=s.i2cUrl,d=r("".charAt),u=t.Uint8Array,h=!u||!u.prototype.toBase64||!function(){try{(new u).toBase64(null)}catch{return!0}}();u&&e({target:"Uint8Array",proto:!0,forced:h},{toBase64:function(){var e=o(this),t=arguments.length?n(arguments[0]):void 0,r="base64"===a(t)?l:c,s=!!t&&!!t.omitPadding;i(this.buffer);for(var u,h="",p=0,g=e.length,f=function(e){return d(r,u>>6*e&63)};p+2<g;p+=3)u=(e[p]<<16)+(e[p+1]<<8)+e[p+2],h+=f(3)+f(2)+f(1)+f(0);return p+2===g?(u=(e[p]<<16)+(e[p+1]<<8),h+=f(3)+f(2)+f(1)+(s?"":"=")):p+1===g&&(u=e[p]<<16,h+=f(3)+f(2)+(s?""
5991:"==")),h}})}(),function(){if(XLe)return a$e;XLe=1;var e=xde(),t=Fse(),r=jae(),n=YLe(),o=ibe(),i=r(1.1.toString),s=r([].join),a=Array,l=t.Uint8Array,c=!l||!l.prototype.toHex||!function(){try{return"ffffffffffffffff"===new l([255,255,255,255,255,255,255,255]).toHex()}catch{return!1}}();l&&e({target:"Uint8Array",proto:!0,forced:c},{toHex:function(){n(this),o(this.buffer);for(var e=a(this.length),t=0,r=this.length;t<r;t++){var l=i(this[t],16);e[t]=1===l.length?"0"+l:l}return s(e,"")}})}(),function(){if(e$e)return l$e;e$e=1;var e=xde(),t=jae(),r=Cde(),n=String.fromCharCode,o=t("".charAt),i=t(/./.exec),s=t("".slice),a=/^[\da-f]{2}$/i,l=/^[\da-f]{4}$/i;e({global:!0},{unescape:function(e){for(var t,c,d=r(e),u="",h=d.length,p=0;p<h;){if("%"===(t=o(d,p++)))if("u"===o(d,p)){if(c=s(d,p+1,p+5),i(l,c)){u+=n(parseInt(c,16)),p+=5;continue}}else if(c=s(d,p,p+2),i(a,c)){u+=n(parseInt(c,16)),p+=2;continue}u+=t}return u}})}(),o$e||(o$e=1,function(){if(n$e)return c$e;n$e=1;var e,t=awe(),r=Fse(),n=jae(),o=hve(),i=Cwe(),s=Swe(),a=d$e(),l=Yae(),c=Sce().enforce,d=Zse(),u=_ce(),h=Object,p=Array.isArray,g=h.isExtensible,f=h.isFrozen,m=h.isSealed,v=h.freeze,b=h.seal,y=!r.ActiveXObject&&"ActiveXObject"in r,w=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},x=s("WeakMap",w,a),_=x.prototype,k=n(_.set);if(u)if(y){e=a.getConstructor(w,"WeakMap",!0),i.enable();var C=n(_.delete),S=n(_.has),E=n(_.get);o(_,{delete:function(t){if(l(t)&&!g(t)){var r=c(this);return r.frozen||(r.frozen=new e),C(this,t)||r.frozen.delete(t)}return C(this,t)},has:function(t){if(l(t)&&!g(t)){var r=c(this);return r.frozen||(r.frozen=new e),S(this,t)||r.frozen.has(t)}return S(this,t)},get:function(t){if(l(t)&&!g(t)){var r=c(this);return r.frozen||(r.frozen=new e),S(this,t)?E(this,t):r.frozen.get(t)}return E(this,t)},set:function(t,r){if(l(t)&&!g(t)){var n=c(this);n.frozen||(n.frozen=new e),S(this,t)?k(this,t,r):n.frozen.set(t,r)}else k(this,t,r);return this}})}else t&&d(function(){var e=v([]);return k(new x,e,1),!f(e)})&&o(_,{set:function(e,t){var r;return p(e)&&(f(e)?r=v:m(e)&&(r=b)),k(this,e,t),r&&r(e),this}})}()),function(){if(p$e)return g$e;p$e=1;var e=xde(),t=f$e(),r=Nle(),n=t.get,o=t.has,i=t.set;e({target:"WeakMap",proto:!0,real:!0,forced:r},{getOrInsert:function(e,t){return o(this,e)?n(this,e):(i(this,e,t),t)}})}(),function(){if(w$e)return x$e;w$e=1;var e=xde(),t=ile(),r=function(){if(v$e)return m$e;v$e=1;var e=f$e().has;return m$e=function(t){return e(t),t},m$e}(),n=function(){if(y$e)return b$e;y$e=1;var e=f$e(),t=new e.WeakMap,r=e.set,n=e.remove;return b$e=function(e){return r(t,e,1),n(t,e),e},b$e}(),o=f$e(),i=Nle(),s=o.get,a=o.has,l=o.set,c=i||!function(){try{WeakMap.prototype.getOrInsertComputed&&(new WeakMap).getOrInsertComputed(1,function(){throw 1})}catch(e){return e instanceof TypeError}}();e({target:"WeakMap",proto:!0,real:!0,forced:c},{getOrInsertComputed:function(e,o){if(i||r(this),n(e),t(o),a(this,e))return s(this,e);var c=o(e);return l(this,e,c),c}})}(),k$e||(k$e=1,_$e||(_$e=1,Swe()("WeakSet",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},d$e()))),function(){if(C$e)return L$e;C$e=1;var e=xde(),t=Fse(),r=Jae(),n=jae(),o=Qse(),i=Zse(),s=Cde(),a=oCe(),l=zLe().c2i,c=/[^\d+/a-z]/i,d=/[\t\n\f\r ]+/g,u=/[=]{1,2}$/,h=r("atob"),p=Array,g=String.fromCharCode,f=n("".charAt),m=n("".replace),v=n([].join),b=n(c.exec),y=!!h&&!i(function(){return"hi"!==h("aGk=")}),w=y&&i(function(){return""!==h(" ")}),x=y&&!i(function(){h("a")}),_=y&&!i(function(){h()}),k=y&&1!==h.length;e({global:!0,bind:!0,enumerable:!0,forced:!y||w||x||_||k},{atob:function(e){if(a(arguments.length,1),y&&!w&&!x)return o(h,t,e);var n,i,_,k=m(s(e),d,""),C=0,S=0;3&k.length||(k=m(k,u,""));var E=3&(n=k.length);if(1===E||b(c,k))throw new(r("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(var I=new p(3*(n>>2)+(E?E-1:0)),A=0;C<n;)i=f(k,C++),_=3&S?(_<<6)+l[i]:l[i],3&S++&&(I[A++]=g(255&_>>(-2*S&6)));return v(I,"")}})}(),function(){if(S$e)return $$e;S$e=1;var e=xde(),t=Fse(),r=Jae(),n=jae(),o=Qse(),i=Zse(),s=Cde(),a=oCe(),l=zLe().i2c,c=r("btoa"),d=Array,u=n([].join),h=n("".charAt),p=n("".charCodeAt),g=!!c&&!i(function(){return"aGk="!==c("hi")}),f=g&&!i(function(){c()}),m=g&&i(function(){return"bnVsbA=="!==c(null)}),v=g&&1!==c.length;e({global:!0,bind:!0,enumerable:!0,forced:!g||f||m||v},{btoa:function(e){if(a(arguments.length,1),g)return o(c,t,s(e));for(var n,i,f=s(e),m=new d((f.length+2)/3<<2),v=0,b=0,y=l;h(f,b)||(y="=",b%1);){if((i=p(f,b+=3/4))>255)throw new(r("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");n=n<<8|i,m[v++]=h(y,63&n>>8-b%1*8)}return u(m,"")}})}(),function(){if(O$e)return N$e;O$e=1;var e=Fse(),t=R$e(),r=P$e(),n=Zge(),o=nce(),i=function(e){if(e&&e.forEach!==n)try{o(e,"forEach",n)}catch{e.forEach=n}};for(var s in t)t[s]&&i(e[s]&&e[s].prototype);i(r)}(),function(){if(D$e)return U$e;D$e=1;var e=Fse(),t=R$e(),r=P$e(),n=Efe(),o=nce(),i=kue(),s=Ule()("iterator"),a=n.values,l=function(e,r){if(e){if(e[s]!==a)try{o(e,s,a)}catch{e[s]=a}if(i(e,r,!0),t[r])for(var l in n)if(e[l]!==n[l])try{o(e,l,n[l])}catch{e[l]=n[l]}}};for(var c in t)l(e[c]&&e[c].prototype,c);l(r,"DOMTokenList")}(),function(){if(F$e)return B$e;F$e=1;var e=xde(),t=Jae(),r=sbe(),n=Zse(),o=Dde(),i=Hae(),s=rce().f,a=Ice(),l=Wde(),c=zle(),d=pve(),u=tce(),h=ppe(),p=tpe(),g=H$e(),f=npe(),m=Sce(),v=Yse(),b=Nle(),y="DOMException",w="DATA_CLONE_ERR",x=t("Error"),_=t(y)||function(){try{(new(t("MessageChannel")||r("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(e){if(e.name===w&&25===e.code)return e.constructor}}(),k=_&&_.prototype,C=x.prototype,S=m.set,E=m.getterFor(y),I="stack"in new x(y),A=function(e){return c(g,e)&&g[e].m?g[e].c:0},T=function(){d(this,O);var e=arguments.length,t=p(e<1?void 0:arguments[0]),r=p(e<2?void 0:arguments[1],"Error"),n=A(r);if(S(this,{type:y,name:r,message:t,code:n}
5991),v||(this.name=r,this.message=t,this.code=n),I){var o=new x(t);o.name=y,s(this,"stack",i(1,f(o.stack,1)))}},O=T.prototype=o(C),L=function(e){return{enumerable:!0,configurable:!0,get:e}},$=function(e){return L(function(){return E(this)[e]})};v&&(l(O,"code",$("code")),l(O,"message",$("message")),l(O,"name",$("name"))),s(O,"constructor",i(1,T));var N=n(function(){return!(new _ instanceof x)}),R=N||n(function(){return C.toString!==h||"2: 1"!==String(new _(1,2))}),P=N||n(function(){return 25!==new _(1,"DataCloneError").code}),D=N||25!==_[w]||25!==k[w],M=b?R||P||D:N;e({global:!0,constructor:!0,forced:M},{DOMException:M?T:_});var z=t(y),F=z.prototype;for(var U in R&&(b||_===z)&&a(F,"toString",h),P&&v&&_===z&&l(F,"code",L(function(){return A(u(this).name)})),g)if(c(g,U)){var B=g[U],H=B.s,j=i(6,B.c);c(z,H)||s(z,H,j),c(F,H)||s(F,H,j)}}(),function(){if(j$e)return Y$e;j$e=1;var e=xde(),t=Fse(),r=Jae(),n=Hae(),o=rce().f,i=zle(),s=pve(),a=epe(),l=tpe(),c=H$e(),d=npe(),u=Yse(),h=Nle(),p="DOMException",g=r("Error"),f=r(p),m=function(){s(this,v);var e=arguments.length,t=l(e<1?void 0:arguments[0]),r=l(e<2?void 0:arguments[1],"Error"),i=new f(t,r),c=new g(t);return c.name=p,o(i,"stack",n(1,d(c.stack,1))),a(i,this,m),i},v=m.prototype=f.prototype,b="stack"in new g(p),y="stack"in new f(1,2),w=f&&u&&Object.getOwnPropertyDescriptor(t,p),x=!(!w||w.writable&&w.configurable),_=b&&!x&&!y;e({global:!0,constructor:!0,forced:h||_},{DOMException:_?m:f});var k=r(p),C=k.prototype;if(C.constructor!==k)for(var S in h||o(C,"constructor",n(1,k)),c)if(i(c,S)){var E=c[S],I=E.s;i(k,I)||o(k,I,n(6,E.c))}}(),function(){if(V$e)return J$e;V$e=1;var e=Jae(),t="DOMException";kue()(e(t),t)}(),Z$e||(Z$e=1,function(){if(W$e)return Q$e;W$e=1;var e=xde(),t=Fse(),r=sCe().clear;e({global:!0,bind:!0,enumerable:!0,forced:t.clearImmediate!==r},{clearImmediate:r})}(),function(){if(G$e)return X$e;G$e=1;var e=xde(),t=Fse(),r=sCe().set,n=eNe(),o=t.setImmediate?n(r,!1):r;e({global:!0,bind:!0,enumerable:!0,forced:t.setImmediate!==o},{setImmediate:o})}()),function(){if(tNe)return oNe;tNe=1;var e=xde(),t=Fse(),r=cCe(),n=ile(),o=oCe(),i=Zse(),s=Yse();e({global:!0,enumerable:!0,dontCallGetSet:!0,forced:i(function(){return s&&1!==Object.getOwnPropertyDescriptor(t,"queueMicrotask").value.length})},{queueMicrotask:function(e){o(arguments.length,1),r(n(e))}})}(),function(){if(rNe)return iNe;rNe=1;var e=xde(),t=Fse(),r=Wde(),n=Yse(),o=TypeError,i=Object.defineProperty,s=t.self!==t;try{if(n){var a=Object.getOwnPropertyDescriptor(t,"self");(s||!a||!a.get||!a.enumerable)&&r(t,"self",{get:function(){return t},set:function(e){if(this!==t)throw new o("Illegal invocation");i(t,"self",{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else e({global:!0,simple:!0,forced:s},{self:t})}catch{}}(),function(){if(nNe)return sNe;nNe=1;var e,t=Nle(),r=xde(),n=Fse(),o=Jae(),i=jae(),s=Zse(),a=Fle(),l=Zae(),c=Iue(),d=Kae(),u=Yae(),h=nle(),p=Upe(),g=tce(),f=kde(),m=zle(),v=Tue(),b=nce(),y=Yce(),w=oCe(),x=iEe(),_=Lwe(),k=QEe(),C=tIe(),S=lbe(),E=ope(),I=abe(
5991),A=n.Object,T=n.Array,O=n.Date,L=n.Error,$=n.TypeError,N=n.PerformanceMark,R=o("DOMException"),P=_.Map,D=_.has,M=_.get,z=_.set,F=k.Set,U=k.add,B=k.has,H=o("Object","keys"),j=i([].push),V=i((!0).valueOf),W=i(1.1.valueOf),K=i("".valueOf),q=i(O.prototype.getTime),G=a("structuredClone"),Z="DataCloneError",Y="Transferring",J=function(e){return!s(function(){var t=new n.Set([7]),r=e(t),o=e(A(7));return r===t||!r.has(7)||!u(o)||7!=+o})&&e},Q=function(e,t){return!s(function(){var r=new t,n=e({a:r,b:r});return!(n&&n.a===n.b&&n.a instanceof t&&n.a.stack===r.stack)})},X=n.structuredClone,ee=t||!Q(X,L)||!Q(X,R)||(e=X,!!s(function(){var t=e(new n.AggregateError([1],G,{cause:3}));return"AggregateError"!==t.name||1!==t.errors[0]||t.message!==G||3!==t.cause})),te=!X&&J(function(e){return new N(G,{detail:e}).detail}),re=J(X)||te,ne=function(e){throw new R("Uncloneable type: "+e,Z)},oe=function(e,t){throw new R((t||"Cloning")+" of "+e+" cannot be properly polyfilled in this engine",Z)},ie=function(e,t){return re||oe(t),re(e)},se=function(e,t,r){if(D(t,e))return M(t,e);var o,i,s,a,c,d;if("SharedArrayBuffer"===(r||f(e)))o=re?re(e):e;else{var u=n.DataView;!u&&!l(e.slice)&&oe("ArrayBuffer");try{if(l(e.slice)&&!e.resizable)o=e.slice(0);else for((i=e.byteLength,s="maxByteLength"in e?{maxByteLength:e.maxByteLength}:void 0,o=new ArrayBuffer(i,s),a=new u(e),c=new u(o),d=0);d<i;d++)c.setUint8(d,a.getUint8(d))}catch{throw new R("ArrayBuffer is detached",Z)}}return z(t,e,o),o},ae=function(e,t){if(h(e)&&ne("Symbol"),!u(e))return e;if(t){if(D(t,e))return M(t,e)}else t=new P;var r,i,s,a,c,d,p,g,w=f(e);switch(w){case"Array":s=T(y(e));break;case"Object":s={};break;case"Map":s=new P;break;case"Set":s=new F;break;case"RegExp":s=new RegExp(e.source,x(e));break;case"Error":switch(i=e.name){case"AggregateError":s=new(o(i))([]);break;case"EvalError":case"RangeError":case"ReferenceError":case"SuppressedError":case"SyntaxError":case"TypeError":case"URIError":s=new(o(i));break;case"CompileError":case"LinkError":case"RuntimeError":s=new(o("WebAssembly",i));break;default:s=new L}break;case"DOMException":s=new R(e.message,e.name);break;case"ArrayBuffer":case"SharedArrayBuffer":s=se(e,t,w);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":d="DataView"===w?e.byteLength:e.length,s=function(e,t,r,o,i){var s=n[t];return u(s)||oe(t),new s(se(e.buffer,i),r,o)}(e,w,e.byteOffset,d,t);break;case"DOMQuad":try{s=new DOMQuad(ae(e.p1,t),ae(e.p2,t),ae(e.p3,t),ae(e.p4,t))}catch{s=ie(e,w)}break;case"File":if(re)try{s=re(e),f(s)!==w&&(s=void 0)}catch{}if(!s)try{s=new File([e],e.name,e)}catch{}s||oe(w);break;case"FileList":if(a=function(){var e;try{e=new n.DataTransfer}catch{try{e=new n.ClipboardEvent("").clipboardData}catch{}}return e&&e.items&&e.files?e:null}(),a){for(c=0,d=y(e);c<d;c++)a.items.add(ae(e[c],t));s=a.files}else s=ie(e,w);break;case"ImageData":try{s=new ImageData(ae(e.data,t),e.width,e.height,{colorSpace:e.colorSpace})}catch{s=ie(e,w)}break;default:if(re)s=re(e);else switch(w){case"BigInt":s=A(e.valueOf());break;case"Boolean":s=A(V(e));break;case"Number":s=A(W(e));break;case"String":s=A(K(e));break;case"Date":s=new O(q(e));break;case"Blob":try{s=e.slice(0,e.size,e.type)}catch{oe(w)}break;case"DOMPoint":case"DOMPointReadOnly":r=n[w];try{s=r.fromPoint?r.fromPoint(e):new r(e.x,e.y,e.z,e.w)}catch{oe(w)}break;case"DOMRect":case"DOMRectReadOnly":r=n[w];try{s=r.fromRect?r.fromRect(e):new r(e.x,e.y,e.width,e.height)}catch{oe(w)}break;case"DOMMatrix":case"DOMMatrixReadOnly":r=n[w];try{s=r.fromMatrix?r.fromMatrix(e):new r(e)}catch{oe(w)}break;case"AudioData":case"VideoFrame":l(e.clone)||oe(w);try{s=e.clone()}catch{ne(w)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":oe(w);default:ne(w)}}switch(z(t,e,s),w){case"Array":case"Object":for(p=H(e),c=0,d=y(p);c<d;c++)g=p[c],v(s,g,ae(e[g],t));break;case"Map":e.forEach(function(e,r){z(s,ae(r,t),ae(e,t))});break;case"Set":e.forEach(function(e){U(s,ae(e,t))});break;case"Error":b(s,"message",ae(e.message,t)),m(e,"cause")&&b(s,"cause",ae(e.cause,t)),"AggregateError"===i?
5991s.errors=ae(e.errors,t):"SuppressedError"===i&&(s.error=ae(e.error,t),s.suppressed=ae(e.suppressed,t));case"DOMException":E&&b(s,"stack",ae(e.stack,t))}return s};r({global:!0,enumerable:!0,sham:!I,forced:ee},{structuredClone:function(e){var t,r,o=w(arguments.length,1)>1&&!d(arguments[1])?g(arguments[1]):void 0,i=o?o.transfer:void 0;void 0!==i&&(r=function(e,t){if(!u(e))throw new $("Transfer option cannot be converted to a sequence");var r=[];p(e,function(e){j(r,g(e))});for(var o,i,s,a,d,h=0,m=y(r),v=new F;h<m;){if(o=r[h++],a=void 0,"ArrayBuffer"===(i=f(o))?B(v,o):D(t,o))throw new R("Duplicate transferable",Z);if("ArrayBuffer"!==i){if(I)a=X(o,{transfer:[o]});else switch(i){case"ImageBitmap":s=n.OffscreenCanvas,c(s)||oe(i,Y);try{(d=new s(o.width,o.height)).getContext("bitmaprenderer").transferFromImageBitmap(o),a=d.transferToImageBitmap()}catch{}break;case"AudioData":case"VideoFrame":(!l(o.clone)||!l(o.close))&&oe(i,Y);try{a=o.clone(),o.close()}catch{}break;case"MediaSourceHandle":case"MessagePort":case"MIDIAccess":case"OffscreenCanvas":case"ReadableStream":case"RTCDataChannel":case"TransformStream":case"WebTransportReceiveStream":case"WebTransportSendStream":case"WritableStream":oe(i,Y)}if(void 0===a)throw new R("This object cannot be transferred: "+i,Z);z(t,o,a)}else U(v,o)}return v}(i,t=new P));var s=ae(e,t);return r&&function(e){C(e,function(e){I?X(e,{transfer:[e]}):l(e.transfer)?e.transfer():S?S(e):oe("ArrayBuffer",Y)})}(r),s}})}(),cNe||(cNe=1,function(){if(aNe)return dNe;aNe=1;var e=xde(),t=Fse(),r=eNe()(t.setInterval,!0);e({global:!0,bind:!0,forced:t.setInterval!==r},{setInterval:r})}(),function(){if(lNe)return uNe;lNe=1;var e=xde(),t=Fse(),r=eNe()(t.setTimeout,!0);e({global:!0,bind:!0,forced:t.setTimeout!==r},{setTimeout:r})}()),yNe||(yNe=1,function(){if(bNe)return wNe;bNe=1,nAe();var e,t=xde(),r=Yse(),n=xNe(),o=Fse(),i=Sue(),s=jae(),a=Ice(),l=Wde(),c=pve(),d=zle(),u=m_e(),h=ife(),p=jde(),g=FIe().codeAt,f=function(){if(fNe)return gNe;fNe=1;var e=jae(),t=2147483647,r=/[^\0-\u007E]/,n=/[.\u3002\uFF0E\uFF61]/g,o="Overflow: input needs wider integers to process",i=RangeError,s=e(n.exec),a=Math.floor,l=String.fromCharCode,c=e("".charCodeAt),d=e([].join),u=e([].push),h=e("".replace),p=e("".split),g=e("".toLowerCase),f=function(e){return e+22+75*(e<26)},m=function(e,t,r){var n=0;for(e=r?a(e/700):e>>1,e+=a(e/t);e>455;)e=a(e/35),n+=36;return a(n+36*e/(e+38))},v=function(e){var r=[];e=function(e){for(var t=[],r=0,n=e.length;r<n;){var o=c(e,r++);if(o>=55296&&o<=56319&&r<n){var i=c(e,r++);56320==(64512&i)?u(t,((1023&o)<<10)+(1023&i)+65536):(u(t,o),r--)}else u(t,o)}return t}(e);var n,s,h=e.length,p=128,g=0,v=72;for(n=0;n<e.length;n++)(s=e[n])<128&&u(r,l(s));var b=r.length,y=b;for(b&&u(r,"-");y<h;){var w=t;for(n=0;n<e.length;n++)(s=e[n])>=p&&s<w&&(w=s);var x=y+1;if(w-p>a((t-g)/x))throw new i(o);for(g+=(w-p)*x,p=w,n=0;n<e.length;n++){if((s=e[n])<p&&++g>t)throw new i(o);if(s===p){for(var _=g,k=36;;){var C=k<=v?1:k>=v+26?26:k-v;if(_<C)break;var S=_-C,E=36-C;u(r,l(f(C+S%E))),_=a(S/E),k+=36}u(r,l(f(_))),v=m(g,x,y===b),g=0,y++}}g++,p++}return d(r,"")};return gNe=function(e){var t,o,i=[],a=p(h(g(e),n,"."),".");for(t=0;t<a.length;t++)o=a[t],u(i,s(r,o)?"xn--"+v(o):o);return d(i,".")},gNe}(),m=Cde(),v=kue(),b=oCe(),y=_Ne(),w=Sce(),x=w.set,_=w.getterFor("URL"),k=y.URLSearchParams,C=y.getState,S=o.URL,E=o.TypeError,I=o.encodeURIComponent,A=o.parseInt,T=Math.floor,O=Math.pow,L=s("".charAt),$=s(/./.exec),N=s([].join),R=s(1.1.toString),P=s([].pop),D=s([].push),M=s("".replace),z=s([].shift),F=s("".split),U=s("".slice),B=s("".toLowerCase),H=s([].unshift),j="Invalid scheme",V="Invalid host",W="Invalid port",K=/[a-z]/i,q=/[\d+\-.a-z]/i,G=/\d/,Z=/^0x/i,Y=/^[0-7]+$/,J=/^\d+$/,Q=/^[\da-f]+$/i,X=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ee=/[\0\t\n\r #/:<>?@[\\\]^|]/,te=/^[\u0000-\u0020]+/,re=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ne=/[\t\n\r]/g,oe=function(e){var t,r,n,o;if("number"==typeof e){for(t=[],r=0;r<4;r++)H(t,e%256),e=T(e/256);return N(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,o=0,i=0;i<8;i++)0!==e[i]?(o>r&&(t=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r?n:t}(e),r=0;r<8;
vendor: 4,449 bytes, line 5991
5991r++)o&&0===e[r]||(o&&(o=!1),n===r?(t+=r?":":"::",o=!0):(t+=R(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},ie={},se=u({},ie,{" ":1,'"':1,"#":1,"<":1,">":1}),ae=u({},se,{"'":1}),le=u({},ie,{" ":1,'"':1,"<":1,">":1,"`":1}),ce=u({},le,{"#":1,"?":1,"{":1,"}":1,"^":1}),de=u({},ce,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ue=function(e,t){var r=g(e,0);return r>=32&&r<127&&!d(t,e)?e:"'"===e&&d(t,e)?"%27":I(e)},he={ftp:21,file:null,http:80,https:443,ws:80,wss:443},pe=function(e,t){var r;return 2===e.length&&$(K,L(e,0))&&(":"===(r=L(e,1))||!t&&"|"===r)},ge=function(e){var t;return e.length>1&&pe(U(e,0,2))&&(2===e.length||"/"===(t=L(e,2))||"\\"===t||"?"===t||"#"===t)},fe=function(e){return"."===e||"%2e"===B(e)},me=function(e){return".."===(e=B(e))||"%2e."===e||".%2e"===e||"%2e%2e"===e},ve={},be={},ye={},we={},xe={},_e={},ke={},Ce={},Se={},Ee={},Ie={},Ae={},Te={},Oe={},Le={},$e={},Ne={},Re={},Pe={},De={},Me={},ze=function(e,t,r){var n,o,i,s=m(e);if(t){if(o=this.parse(s))throw new E(o);this.searchParams=null}else{if(void 0!==r&&(n=new ze(r,!0)),o=this.parse(s,null,n))throw new E(o);(i=C(new k)).bindURL(this),this.searchParams=i}};ze.prototype={type:"URL",parse:function(t,r,n){var o,i,s,a,l=this,c=r||ve,u=0,g="",f=!1,v=!1,b=!1;for(t=m(t),r||(l.scheme="",l.username="",l.password="",l.host=null,l.port=null,l.path=[],l.query=null,l.fragment=null,l.cannotBeABaseURL=!1,t=M(t,te,""),t=M(t,re,"$1")),t=M(t,ne,""),o=h(t);u<=o.length;){switch(i=o[u],c){case ve:if(!i||!$(K,i)){if(r)return j;c=ye;continue}g+=B(i),c=be;break;case be:if(i&&$(q,i))g+=B(i);else{if(":"!==i){if(r)return j;g="",c=ye,u=0;continue}if(r&&(l.isSpecial()!==d(he,g)||"file"===g&&(l.includesCredentials()||null!==l.port)||"file"===l.scheme&&""===l.host))return;if(l.scheme=g,r)return void(l.isSpecial()&&he[l.scheme]===l.port&&(l.port=null));g="","file"===l.scheme?c=Oe:l.isSpecial()&&n&&n.scheme===l.scheme?c=we:l.isSpecial()?c=Ce:"/"===o[u+1]?(c=xe,u++):(l.cannotBeABaseURL=!0,D(l.path,""),c=Pe)}break;case ye:if(!n||n.cannotBeABaseURL&&"#"!==i)return j;if(n.cannotBeABaseURL&&"#"===i){l.scheme=n.scheme,l.path=p(n.path),l.query=n.query,l.fragment="",l.cannotBeABaseURL=!0,c=Me;break}c="file"===n.scheme?Oe:_e;continue;case we:if("/"!==i||"/"!==o[u+1]){c=_e;continue}c=Se,u++;break;case xe:if("/"===i){c=Ee;break}c=Re;continue;case _e:if(l.scheme=n.scheme,i===e)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=p(n.path),l.query=n.query;else if("/"===i||"\\"===i&&l.isSpecial())c=ke;else if("?"===i)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=p(n.path),l.query="",c=De;else{if("#"!==i){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=p(n.path),l.path.length&&l.path.length--,c=Re;continue}l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=p(n.path),l.query=n.query,l.fragment="",c=Me}break;case ke:if(!l.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,c=Re;continue}c=Ee}else c=Se;break;case Ce:if(c=Se,"/"!==i||"/"!==o[u+1])continue;u++;break;case Se:if("/"!==i&&"\\"!==i){c=Ee;continue}break;case Ee:if("@"===i){f&&(g="%40"+g),f=!0,s=h(g);for(var y=0;y<s.length;y++){var w=s[y];if(":"!==w||b){var x=ue(w,de);b?l.password+=x:l.username+=x}else b=!0}g=""}else if(i===e||"/"===i||"?"===i||"#"===i||"\\"===i&&l.isSpecial()){if(f&&""===g)return"Invalid authority";u-=h(g).length+1,g="",c=Ie}else g+=i;break;case Ie:case Ae:if(r&&"file"===l.scheme){c=$e;continue}if(":"!==i||v){if(i===e||"/"===i||"?"===i||"#"===i||"\\"===i&&l.isSpecial()){if(l.isSpecial()&&""===g)return V;if(r&&""===g&&(l.includesCredentials()||null!==l.port))return;if(a=l.parseHost(g))return a;if(g="",c=Ne,r)return;continue}"["===i?v=!0:"]"===i&&(v=!1),g+=i}else{if(""===g)return V;if(r===Ae)return;if(a=l.parseHost(g))return a;g="",c=Te}break;case Te:if(!$(G,i)){if(i===e||"/"===i||"?"===i||"#"===i||"\\"===i&&l.isSpecial()||r){if(""!==g){var _=A(g,10);if(_>65535)return W;l.port=l.isSpecial()&&_===he[l.scheme]?null:_,g=""}if(r)return;c=Ne;continue}return W}g+=i;break;case Oe:if(l.scheme="file",l.host="","/"===i||"\\"===i)c=Le;else{if(!n||"file"!==n.scheme){c=Re;continue}switch(i){case e:l.host=n.host,l.path=p(n.path),l.query=n.query;break;case"?":l.host=n.host,l.path=p(n.path),l.query="",c=De;break;case"#":l.host=n.host,l.path=p(n.path),l.query=n.query,l.fragment="",c=Me;break;
5991default:l.host=n.host,ge(N(p(o,u),""))||(l.path=p(n.path),l.shortenPath()),c=Re;continue}}break;case Le:if("/"===i||"\\"===i){c=$e;break}n&&"file"===n.scheme&&(l.host=n.host,!ge(N(p(o,u),""))&&pe(n.path[0],!0)&&D(l.path,n.path[0])),c=Re;continue;case $e:if(i===e||"/"===i||"\\"===i||"?"===i||"#"===i){if(!r&&pe(g))c=Re;else if(""===g){if(l.host="",r)return;c=Ne}else{if(a=l.parseHost(g))return a;if("localhost"===l.host&&(l.host=""),r)return;g="",c=Ne}continue}g+=i;break;case Ne:if(l.isSpecial()){if(c=Re,"/"!==i&&"\\"!==i)continue}else if(r||"?"!==i)if(r||"#"!==i){if(i!==e&&(c=Re,"/"!==i))continue}else l.fragment="",c=Me;else l.query="",c=De;break;case Re:if(i===e||"/"===i||"\\"===i&&l.isSpecial()||!r&&("?"===i||"#"===i)){if(me(g)?(l.shortenPath(),"/"!==i&&!("\\"===i&&l.isSpecial())&&D(l.path,"")):fe(g)?"/"!==i&&!("\\"===i&&l.isSpecial())&&D(l.path,""):("file"===l.scheme&&!l.path.length&&pe(g)&&(null!==l.host&&""!==l.host&&(l.host=""),g=L(g,0)+":"),D(l.path,g)),g="","file"===l.scheme&&(i===e||"?"===i||"#"===i))for(;l.path.length>1&&""===l.path[0];)z(l.path);"?"===i?(l.query="",c=De):"#"===i&&(l.fragment="",c=Me)}else g+=ue(i,ce);break;case Pe:"?"===i?(l.query="",c=De):"#"===i?(l.fragment="",c=Me):i!==e&&(l.path[0]+=ue(i,ie));break;case De:r||"#"!==i?i!==e&&(l.query+=ue(i,l.isSpecial()?ae:se)):(l.fragment="",c=Me);break;case Me:i!==e&&(l.fragment+=ue(i,le))}u++}},parseHost:function(e){var t,r,n;if("["===L(e,0)){if("]"!==L(e,e.length-1)||(t=function(e){var t,r,n,o,i,s,a,l=[0,0,0,0,0,0,0,0],c=0,d=null,u=0,h=function(){return L(e,u)};if(":"===h()){if(":"!==L(e,1))return;u+=2,d=++c}for(;h();){if(8===c)return;if(":"!==h()){for(t=r=0;r<4&&$(Q,h());)t=16*t+A(h(),16),u++,r++;if("."===h()){if(0===r||(u-=r,c>6))return;for(n=0;h();){if(o=null,n>0){if(!("."===h()&&n<4))return;u++}if(!$(G,h()))return;for(;$(G,h());){if(i=A(h(),10),null===o)o=i;else{if(0===o)return;o=10*o+i}if(o>255)return;u++}l[c]=256*l[c]+o,(2===++n||4===n)&&c++}if(4!==n)return;break}if(":"===h()){if(u++,!h())return}else if(h())return;l[c++]=t}else{if(null!==d)return;u++,d=++c}}if(null!==d)for(s=c-d,c=7;0!==c&&s>0;)a=l[c],l[c--]=l[d+s-1],l[d+--s]=a;else if(8!==c)return;return l}(U(e,1,-1)),!t))return V;this.host=t}else if(this.isSpecial()){if(e=f(e),$(X,e))return V;if(function(e){var t,r,n=F(e,".");if(""===n[n.length-1]){if(1===n.length)return!1;n.length--}return t=n[n.length-1],!!$(J,t)||!!$(Z,t)&&(""===(r=U(t,2))||!!$(Q,r))}(e)){if(t=function(e){var t,r,n,o,i,s,a,l=F(e,".");if(l.length&&""===l[l.length-1]&&l.length--,(t=l.length)>4)return null;for(r=[],n=0;n<t;n++){if(""===(o=l[n]))return null;if(i=10,o.length>1&&"0"===L(o,0)&&(i=$(Z,o)?16:8,o=U(o,8===i?1:2)),""===o)s=0;else{if(!$(10===i?J:8===i?Y:Q,o))return null;s=A(o,i)}D(r,s)}for(n=0;n<t;n++)if(s=r[n],n===t-1){if(s>=O(256,5-t))return null}else if(s>255)return null;for(a=P(r),n=0;n<r.length;n++)a+=r[n]*O(256,3-n);return a}(e),null===t)return V;this.host=t}else this.host=e}else{if($(ee,e))return V;for(t="",r=h(e),n=0;n<r.length;n++)t+=ue(r[n],ie);this.host=t}},cannotHaveUsernamePasswordPort:function(){return null===this.host||""===this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return d(he,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;t&&("file"!==this.scheme||1!==t||!pe(e[0],!0))&&e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,o=e.host,i=e.port,s=e.path,a=e.query,l=e.fragment,c=t+":";return null!==o?(c+="//",e.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=oe(o),null!==i&&(c+=":"+i)):"file"===t&&(c+="//"),null===o&&!e.cannotBeABaseURL&&s.length>1&&""===s[0]&&(c+="/."),c+=e.cannotBeABaseURL?s[0]:s.length?"/"+N(s,"/"):"",null!==a&&(c+="?"+a),null!==l&&(c+="#"+l),c},setHref:function(e){var t=this.parse(e);if(t)throw new E(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new Fe(this.path[0]).origin}catch{return"null"}return"file"!==e&&this.isSpecial()?e+"://"+oe(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(m(e)+":",ve)},getUsername:function(){return this.username},setUsername:function(e){var t=h(m(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=ue(t[r],de)}},getPassword:function(){return this.password},setPassword:function(e){var t=h(m(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=ue(t[r],de)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?oe(e):oe(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Ie)},getHostname:function(){var e=this.host;return null===e?"":oe(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Ae)},getPort:function(){var e=this.port;return null===e?"":m(e)}
5991,setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=m(e))?this.port=null:this.parse(e,Te))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+N(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Ne))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=m(e))?this.query=null:("?"===L(e,0)&&(e=U(e,1)),this.query="",this.parse(e,De)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=m(e))?("#"===L(e,0)&&(e=U(e,1)),this.fragment="",this.parse(e,Me)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Fe=function(e){var t=c(this,Ue),n=b(arguments.length,1)>1?arguments[1]:void 0,o=x(t,new ze(e,!1,n));r||(t.href=o.serialize(),t.origin=o.getOrigin(),t.protocol=o.getProtocol(),t.username=o.getUsername(),t.password=o.getPassword(),t.host=o.getHost(),t.hostname=o.getHostname(),t.port=o.getPort(),t.pathname=o.getPathname(),t.search=o.getSearch(),t.searchParams=o.getSearchParams(),t.hash=o.getHash())},Ue=Fe.prototype,Be=function(e,t){return{get:function(){return _(this)[e]()},set:t&&function(e){return _(this)[t](e)},configurable:!0,enumerable:!0}};if(r&&(l(Ue,"href",Be("serialize","setHref")),l(Ue,"origin",Be("getOrigin")),l(Ue,"protocol",Be("getProtocol","setProtocol")),l(Ue,"username",Be("getUsername","setUsername")),l(Ue,"password",Be("getPassword","setPassword")),l(Ue,"host",Be("getHost","setHost")),l(Ue,"hostname",Be("getHostname","setHostname")),l(Ue,"port",Be("getPort","setPort")),l(Ue,"pathname",Be("getPathname","setPathname")),l(Ue,"search",Be("getSearch","setSearch")),l(Ue,"searchParams",Be("getSearchParams")),l(Ue,"hash",Be("getHash","setHash"))),a(Ue,"toJSON",function(){return _(this).serialize()},{enumerable:!0}),a(Ue,"toString",function(){return _(this).serialize()},{enumerable:!0}),S){var He=S.createObjectURL,je=S.revokeObjectURL;He&&a(Fe,"createObjectURL",i(He,S)),je&&a(Fe,"revokeObjectURL",i(je,S))}v(Fe,"URL"),t({global:!0,constructor:!0,forced:!n,sham:!r},{URL:Fe})}()),function(){if(kNe)return LNe;kNe=1;var e=xde(),t=Jae(),r=Zse(),n=oCe(),o=Cde(),i=xNe(),s=t("URL"),a=i&&r(function(){s.canParse()}),l=r(function(){return 1!==s.canParse.length});e({target:"URL",stat:!0,forced:!a||l},{canParse:function(e){var t=n(arguments.length,1),r=o(e),i=t<2||void 0===arguments[1]?void 0:o(arguments[1]);try{return!!new s(r,i)}catch{return!1}}})}(),function(){if(CNe)return $Ne;CNe=1;var e=xde(),t=Jae(),r=oCe(),n=Cde(),o=xNe(),i=t("URL");e({target:"URL",stat:!0,forced:!o},{parse:function(e){var t=r(arguments.length,1),o=n(e),s=t<2||void 0===arguments[1]?void 0:n(arguments[1]);try{return new i(o,s)}catch{return null}}})}(),function(){if(SNe)return NNe;SNe=1;var e=xde(),t=Qse();e({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return t(URL.prototype.toString,this)}})}(),ENe||(ENe=1,_Ne()),function(){if(INe)return RNe;INe=1;var e=Ice(),t=jae(),r=Cde(),n=oCe(),o=URLSearchParams,i=o.prototype,s=t(i.append),a=t(i.delete),l=t(i.forEach),c=t([].push),d=new o("a=1&a=2&b=3");d.delete("a",1),d.delete("b",void 0),d+""!="a=2"&&e(i,"delete",function(e){var t=arguments.length,o=t<2?void 0:arguments[1];if(t&&void 0===o)return a(this,e);var i=[];l(this,function(e,t){c(i,{key:t,value:e})}),n(t,1);for(var d,u=r(e),h=r(o),p=0,g=i.length;p<g;)a(this,(d=i[p]).key),p++;for(p=0;p<g;)(d=i[p++]).key===u&&d.value===h||s(this,d.key,d.value)},{enumerable:!0,unsafe:!0})}(),function(){if(ANe)return PNe;ANe=1;var e=Ice(),t=jae(),r=Cde(),n=oCe(),o=URLSearchParams,i=o.prototype,s=t(i.getAll),a=t(i.has),l=new o("a=1");(l.has("a",2)||!l.has("a",void 0))&&e(i,"has",function(e){var t=arguments.length,o=t<2?void 0:arguments[1];if(t&&void 0===o)return a(this,e);var i=s(this,e);n(t,1);for(var l=r(o),c=0;c<i.length;)if(i[c++]===l)return!0;return!1},{enumerable:!0,unsafe:!0})}(),function(){if(TNe)return DNe;TNe=1;var e=Yse(),t=jae(),r=Wde(),n=URLSearchParams.prototype,o=t(n.forEach);e&&!("size"in n)&&r(n,"size",{get:function(){var e=0;return o(this,function(){e++}),e},configurable:!0,enumerable:!0})}(),wue());var MNe;MNe||(MNe=1,function(e){var t=function(e){var t,r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch{c=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var i=t&&t.prototype instanceof v?t:v,s=Object.create(i.prototype),a=new O(n||[]);return o(s,"_invoke",{value:E(e,r,a)}),s}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=d;var h="suspendedStart",p="suspendedYield",g="executing",f="completed",m={};function v(){}function b(){}function y(){}var w={};c(w,s,function(){return this});var x=Object.getPrototypeOf,_=x&&x(x(L([])));_&&_!==r&&n.call(_,s)&&(w=_);var k=y.prototype=v.prototype=Object.create(w);function C(e){["next","throw","return"].forEach(function(t){c(e,t,function(e){return this._invoke(t,e)})})}function S(e,t){function r(o,i,s,a){var l=u(e[o],e,i);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then(function(e){r("next",e,s,a)},function(e){r("throw",e,s,a)}):t.resolve(d).then(function(e){c.value=e,s(c)},function(e){return r("throw",e,s,a)})}a(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t(function(t,o){r(e,n,t,o)})}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,s){if(o===g)throw new Error("Generator is already running");if(o===f){if("throw"===i)throw s;return{value:t,done:!0}}for(n.method=i,n.arg=s;;){var a=n.delegate;if(a){var l=I(a,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var c=u(e,r,n);if("normal"===c.type){if(o=n.done?f:p,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=f,n.method="throw",n.arg=c.arg)}}}function I(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&
vendor: 4,514 bytes, line 5991
5991(r.method="return",r.arg=t,I(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=u(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var s=i.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(e){if(null!=e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(typeof e+" is not iterable")}return b.prototype=y,o(k,"constructor",{value:y,configurable:!0}),o(y,"constructor",{value:b,configurable:!0}),b.displayName=c(y,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,c(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},C(S.prototype),c(S.prototype,a,function(){return this}),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var s=new S(d(t,r,n,o),i);return e.isGeneratorFunction(r)?s:s.next().then(function(e){return e.done?e.value:s.next()})},C(k),c(k,l,"Generator"),c(k,s,function(){return this}),c(k,"toString",function(){return"[object Generator]"}),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=L,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var l=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(l&&c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch{"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}({exports:{}})),(0,Dv.bs)(Dv.bt.SHELL_DISABLE_SERVICE_WORKER)||window.addEventListener("load",()=>{(async()=>
5991{if((0,Dv.c5)()&&"serviceWorker"in navigator)try{const e=await navigator.serviceWorker.register(r7),t=new BroadcastChannel("shell-serviceworker-channel"),r=()=>{const t=e.active??e.waiting??e.installing,r=(0,Dv.Z)().auth.getToken()?.access_token??"";t?.postMessage({token:r,message:"post-accesstoken"})};t.addEventListener("message",e=>{"request-accesstoken"===e.data&&r()})}catch(e){console.log("SW registration failed: ",e)}})()});const zNe=new class{constructor(){this.isShellBffOptimizationFlagEnabled=!1,this.registeredExtensionIds=new Map,this.internalApplications=new Map([[Dv.fW.name,Dv.fW],[Dv.fX.name,Dv.fX],[Dv.fY.name,Dv.fY]]),this.unguardedRoutes=new Set,this._config=Dv.fZ,this.authContext=new Dv.f_,this.themeOnLoad=Ty(),this.handleBeforeRoutingEvent=e=>{e.detail.newUrl!==e.detail.oldUrl&&(e.detail.cancelNavigation&&e.detail.cancelNavigation(),Rse()||(0,Dv.dw)(e.detail.newUrl))},(0,Dv.f$)(),(()=>{if((0,Dv.bs)(Dv.bt.SHELL_MS_TEAM_NO_PLUGIN,!1)){const e=(0,Dv.bg)();t7[e]?.()}})(),Object.entries(h3).forEach(p3),function(e){if(document.querySelector(Dv.aJ))return;const t=(0,Dv.a$)(),r=(0,Dv.b0)(),n=(0,Dv.b1)(),o=(0,Dv.b2)(),i=(0,Dv.b3)();i.appendChild((0,Dv.b4)());const s=(0,Dv.b5)(),a=(0,Dv.b6)(),l=(0,Dv.b7)(),c=(0,Dv.b8)(),d=(0,Dv.b9)(),u=(0,Dv.ba)(),h=(0,Dv.bb)();h.id=Dy,Iy(h,e),n.append(i,o,c),t.append(a,l,r,s,n),h.append(t,d,u),document.body.append(h),(0,Dv.bc)()||document.body.append((0,Dv.bd)());const{mount:p}=jb(window);p(Dv.be)}(this.themeOnLoad)}get config(){return this._config}set config(e){this._config={...this._config,...e}}getAuthContext(){return this.authContext}getUserContext(){return this.userContext}addExtensions(e){return(0,Dv.bJ)().addExtensions(e),this}getNavigationOrder(){return MG().getNavigationOrder()}setNavigationOrder(e){return MG().setNavigationOrder(e),this}addChameleonStyles(e=Z8){return(e=>{((e,t)=>{if(!document.head.querySelector(`#${e}`)){const r=document.createElement("link");r.id=e,r.rel="stylesheet",r.href=t,document.head.appendChild(r)}})("chameleon-theme-style",((e,t)=>`${Dv.fA}/${e}/${t}.css`)(e||Z8,(0,Dv.cs)()===Dv.p.MS_TEAMS?"msteams":"gotoapp"))})(e),this}setGlobalSearchCategoriesOrder(e){return(0,Dv.Q)().setGlobalSearchCategoriesOrder(e),this}showErrorPage(){window.customElements.get(Dv.m.tagName)||window.customElements.define(Dv.m.tagName,Dv.m),(document.querySelector(".container-after-titlebar")??document.body).innerHTML=`\n<chameleon-theme-provider skin="gotoapp" theme="light" rebranding2021="true">\n    <${Dv.m.tagName} style="display: flex; height: 100%"></${Dv.m.tagName}>\n</chameleon-theme-provider>\n`}defineEnvironment(e){globalThis.shellEnvironmentConfig=e}defineUnguardedRoutes(){const e=(0,Dv.bJ)().getUnguardedRoutes();[...Pse,...e].forEach(e=>this.unguardedRoutes.add(e))}async initializeFirstExtension(){const e=(0,Dv.fh)((0,Dv.g5)());e&&await(0,Dv.bJ)().loadAndInitializeExtensions([e])}async initializeApplications(){await(0,Dv.bJ)().loadAndInitializeExtensions()}async doBeforeAuthentication(){if(this.defineUnguardedRoutes(),(0,Dv.c5)()&&(0,Dv.bc)())throw(0,Dv.g0)(),new Error(Nse)}async doAuthentication(){if(await this.doBeforeAuthentication(),await this.setUnguardedRoutes(),this.isShellBffOptimizationFlagEnabled=(0,Dv.bs)(Dv.bt.SHELL_BFF_OPTIMIZATION)??!0,this.isShellBffOptimizationFlagEnabled){if(!(0,Dv.c5)())return void(this.userContext=(e=>{if(!e)return;const{user:t,context:r}=e,n=t.accounts.map(e=>({key:e.key,name:e.name,unifiedAdmin:e.unifiedAdmin??!1,licenses:e.licenses?.map(t=>({key:t.key,type:t.serviceType??"",channel:t.channel,enabled:t.enabled,description:t.description,products:[],accountKey:e.key,serviceType:t.serviceType,roles:[...t.roles],entitlements:[...t.entitlements],sku:t.sku}))??[],slowChannelEnabled:e.slowChannelEnabled,partnerAccountKey:e.partnerAccountKey,settings:e.settings})),o=r?.pbx?{accountKey:r.account?.key??"",pbxId:r.pbx.id??"",pbxUserId:r.pbx.userId,pbxFlags:r.pbx.flags,pbxOrganizationInfo:r.pbx.info,pbxes:[...r.pbx.pbxes??[]],pbxUserLocation:r.pbx.location}:void 0;return{featureFlags:(0,Dv.eO)()??{},pbxData:o,policyDecisionPoint:{},selectedAccountKey:r?.account?.key,userDetails:{userInfo:{accounts:n,user:{key:t.key??"",email:t.emails?.[0]?.value??"",firstName:t.name.givenName,lastName:t.name.lastName,locale:t.locale??"",timeZone:t.location.timeZone,location:t.location.city,createTime:t.meta.createdDate?.getTime()?.toString()??""}},permissions:[],licenses:[...t.getUserContextLicenses()],avatar:t.avatar}}})(globalThis.opener.shell));await(0,Dv.eB)()}else{if(!(0,Dv.c5)())return void(this.authContext=(e=>{const t={};if(!e)return t;const{identity:r,context:n,user:o}=e;t.user=o,t.me=r?.me,t.meFromExternalAdmin=r?.meFromExternalAdmin;const i=o.entitlements??[],s=Qq(o.emails),a=s[0]?.value,l=a,c=Xq(o.
5991key),d=n?.account?.key??"";t.userProfile={entitlements:i,emails:s,firstEmail:a,name:l,id:c};const u=n?.pbx?.id??"",h=n?.pbx?.info?.region??"";return t.contextApi=n,t.pbxId=u,t.pbxRegion=h,t.currentAccount=o.getAccountByKey(d),t.permissions=r?.permissions,t.avatar=r?.avatar,t.accountKeys=r?.meFromExternalAdmin?U3(r.meFromExternalAdmin):[],t.licenses=r?.meFromExternalAdmin?B3(r.meFromExternalAdmin):[],t})(globalThis.opener.shell));this.authContext=await H3()}await this.doPostAuthentication()}async doPostAuthentication(){this.isShellBffOptimizationFlagEnabled?await this.doFetchUserContext():await this.doFetchFeatureFlags(),this.setPostAuthLoggingContext()}setPostAuthLoggingContext(){this.isShellBffOptimizationFlagEnabled?(e=>{(0,Dv.g)().setContext("shell-user-key",Dj(e)),(0,Dv.g)().setContext("shell-account-key",Gj(e)),(0,Dv.g)().setContext("shell_userType",jj(e)?"internal":"external"),(0,Dv.g)().setContext("shell-product",j3())})(this.userContext):(e=>{(0,Dv.g)().setContext("shell-user-key",(e=>e.user.key??"guest")(e)),(0,Dv.g)().setContext("shell-account-key",O3(e)),(0,Dv.g)().setContext("shell_userType",P3
5991(e)?"internal":"external"),(0,Dv.g)().setContext("shell-product",j3())})(this.getAuthContext())}async doFetchUserContext(){const e=await Pj(),t=(0,Dv.T)();this.userContext=await xee({cachedAccountKey:this.getCachedAccountKey(),accountSettingQueries:(0,Dv.g1)(),policyDecisionPointChecks:Lse(),featureFlagsParams:{hostname:location.hostname,product:j3(),deviceBrand:e?.deviceBrand,deviceModel:e?.deviceModel,osName:t.name,osVersion:t.version}}),w3((e=>e?.pbxData)(this.userContext),Dj(this.userContext)),(0,Dv.g2)(eV(this.userContext));const r=(e=>e?.userDetails?.settings)(this.userContext);if(r)try{(0,Dv.aW)(Dv.bV,JSON.stringify(r))}catch(e){(0,Dv.g)().error("doFetchUserContext: could not store the user account preferences in the local storage",e)}else(0,Dv.bW)(Dv.bV)}getCachedAccountKey(){return(0,Dv.g3)((0,Dv.am)())??""}async doFetchFeatureFlags(){const e=await Pj(),t=(0,Dv.T)(),r={numberOfAccounts:this.authContext.accountKeys?.length??0,userName:this.authContext.userProfile?.name,externalUserKey:this.authContext.userProfile?.id,accountKey:this.authContext.contextApi?.account?.key,pbxId:this.authContext.pbxId,pbxRegion:this.authContext.pbxRegion,entitlements:this.authContext.user.entitlements,roles:this.authContext.user.roles,licenses:this.authContext.licenses,allAccountKeys:this.authContext.accountKeys??[],deviceBrand:e?.deviceBrand,deviceModel:e?.deviceModel,osName:t.name,osVersion:t.version,hostname:location.hostname,partnerAccountKey:this.authContext.currentAccount?.partnerAccountKey,userCreationDate:this.authContext.userCreationDate,currentAccountName:this.authContext.currentAccount?.name},n=this.authContext.userProfile?.firstEmail,o=j3(),i=this.authContext.licenses?.reduce((e,t)=>(t.enabled&&e.push(t.key),e),[])??[],{allSkus:s,accountSkus:a}=this.authContext.licenses?.reduce((e,t)=>(t.enabled&&t.sku&&(e.allSkus.push(t.sku),t.accountKey===this.authContext.currentAccount?.key&&e.accountSkus.push(t.sku)),e),{allSkus:[],accountSkus:[]})??{allSkus:[],accountSkus:[]},l={email:n,licenseKeys:i,allSkus:s,accountSkus:a,product:o,...r},c=(0,Dv.bs)(Dv.bt.SHELL_DISABLE_SERVICE_WORKER,!1);try{await(0,Dv.fQ)(l)}catch(e){(0,Dv.g)().error("Failed to setup Unleash flags",e)}const d=(0,Dv.bs)(Dv.bt.SHELL_DISABLE_SERVICE_WORKER,!1);(0,Dv.g)().setContext("shell_sw_enabled",!d),d&&!c&&(await n7(),(0,Dv.cJ)())}async doInitializeAPI(){(0,Dv.c5)()?globalThis.shell=Object.freeze(((e,t,r=!1)=>r?(e=>{const t=(0,Dv.au)(),r=(0,Dv.c9)();((0,Dv.O)().isCompanion||(0,Dv.O)().isIntegration&&(0,Dv.b_)())&&mW(t);const n={app:hj(),auth:ab,badgeNumbers:(0,Dv.H)(),eventBus:t,namespaces:r,context:e?.pbxData?{account:new Dv.ch(e.pbxData.accountKey),pbx:new Dv.cg(e.pbxData.pbxId,e.pbxData.pbxUserId,e.pbxData.pbxFlags,e.pbxData.pbxOrganizationInfo,e.pbxData.pbxes,e.pbxData.pbxUserLocation)}:{},user:oV(e),access:kW(e?.policyDecisionPoint),container:Dv.cf,display:Dv.ce,extensions:pW(),featureFlags:Dv.cd,phoneSystem:Dv.cc,branding:YH,i18n:(0,Dv.ca)(zj(e)),presence:void 0,settings:{getNotificationSettings:RC},search:(0,Dv.V)(),analytics:ZH,logger:(0,Dv.g)(),metrics:sj(),meta:Cj(),navigation:jy(),dialog:Oj(),inspectorPanel:uV(),integration:(0,Dv.R)(),currentEnvironment:(0,Dv.K)(),desktopCompanionServer:(0,Dv.cb)(),userPreferences:void 0};fj();const o=Dj(e);if(o){n.calendar=kC(TC(),o,(0,Dv.au)()),n.userPreferences=bV(PV());const e=dW(o);n.notificationChannel=e,e.start();try{n.presence=_W(n.notificationChannel.id)}catch(e){n.logger.error(`We could not initialize PresenceService: ${e}`)}}return n})(t):(e=>{const t=(0,Dv.au)(),r=(0,Dv.c9)();((0,Dv.O)().isCompanion||(0,Dv.O)().isIntegration&&(0,Dv.b_)())&&mW(t);const n={analytics:ZH,app:hj(),auth:ab,badgeNumbers:(0,Dv.H)(),branding:YH,container:Dv.cf,context:e.contextApi??{},currentEnvironment:(0,Dv.K)(),desktopCompanionServer:(0,Dv.cb)(),dialog:Oj(),display:Dv.ce,eventBus:t,extensions:pW(),featureFlags:Dv.cd,i18n:(0,Dv.ca)(e.user.locale),inspectorPanel:uV(),integration:(0,Dv.R)(),logger:(0,Dv.g)(),meta:Cj(),metrics:sj(),namespaces:r,navigation:jy(),access:kW(),phoneSystem:Dv.cc,presence:void 0,settings:{getNotificationSettings:RC},search:(0,Dv.V)(),user:nV(e.user),userPreferences:void 0};if(fj(),e.user.key){n.calendar=kC(TC(),e.user.key,(0,Dv.au)()),n.userPreferences=bV(PV());const t=dW(e.user.key);n.notificationChannel=t,t.start();
5991try{n.presence=_W(n.notificationChannel.id)}catch(e){n.logger.error(`We could not initialize PresenceService: ${e}`)}}return n})(e))(this.authContext,this.userContext,this.isShellBffOptimizationFlagEnabled)):globalThis.shell=globalThis.opener.shell,await this.doPostInitializeAPI()}shouldRedirectForExtendedRelease(){if((0,Dv.g4)()){const e=(0,Dv.bN)()?.key??"";return((0,Dv.Z)().user.getAccountByKey(e)?.slowChannelEnabled&&!this.isOnExtended())??!1}return!1}isOnExtended(){return(0,Dv.g5)().includes(Dv.g6.extended_prod)}async doPostInitializeAPI(){this.shouldRedirectForExtendedRelease()&&(0,Dv.g7)(`https://${Dv.g6.extended_prod}${(0,Dv.cT)()??""}`),(0,Dv.c5)()&&(0,Dv.g8)(),await(async()=>{document.querySelector("goto-shell-controller")?.initializeController()})(),await(async()=>{let e=!1,t=!1,r=null,n=null;const o=(0,Dv.Z)().notificationChannel,i=(0,Dv.au)().subscribeTo(Dv.r);let s;const a=()=>{s=(0,Dv.aq)(l,1e4)},l=()=>{s=void 0,r&&N5(r),n&&R5(n),t=!0,(0,Dv.fi)()||(e=!0,r=(()=>{const e=(0,Dv.Z)().display.snackbar({title:(0,Dv.cB)("No internet connection"),id:"connection-lost",message:(0,Dv.cB)("Check your network or hold on while we try to reconnect."),actions:[{label:(0,Dv.cB)("Dismiss"),handler(){N5(e)}}]});return e})()),(0,Dv.Z)().extensions.isStandaloneRoute(window.location.pathname)||(n=(0,Dv.Z)().display.banner({description:(0,Dv.cB)("Can't connect with all of GoTo. Some features are temporarily offline."),closable:!1,variant:"neutral",id:"shellDisconnectionBanner",target:window}))},c=()=>{void 0!==s&&((0,Dv.ap)(s),s=void 0),r&&N5(r),n&&R5(n),t&&(t=!1,e?(r=(()=>{const e=(0,Dv.Z)().display.snackbar({title:(0,Dv.cB)("You're back online"),id:"connection-restored",message:(0,Dv.cB)("Everything should be working normally again."),actions:[{label:(0,Dv.cB)("Dismiss"),handler(){N5(e)}}],dataTest:"internetConnectionRestoredSnackbar"});return e})(),e=!1):(0,Dv.Z)().extensions.isStandaloneRoute(window.location.pathname)||(r=(()=>{const e=(0,Dv.Z)().display.snackbar({title:(0,Dv.cB)("All of GoTo is back online"),id:"connection-restored",actions:[{label:(0,Dv.cB)("Dismiss"),handler(){N5(e)}}],dataTest:"notificationChannelConnectionRestoredSnackbar"});return e})()))};i.disconnected.addListener(a),i.connected.addListener(c),o?.isStarted&&!o.isConnected&&a(),(0,Dv.av)(()=>{i.disconnected.removeListener(a),i.connected.removeListener(c)})})(),await X3(),await t5(),(0,Dv.c5)()&&(()=>{const e=e=>(e=>{(0,Dv.f4)(e),(0,Dv.fb)();const t=(0,Dv.Z)().user.key??"",r=(0,Dv.fc)(t),n=(0,Dv.fd)();e?.detail?.oldUrl&&e?.detail?.newUrl&&((e,t)=>{const r=(0,Dv.fh)(e),n=(0,Dv.fh)(t);if(r&&n&&r!==n)try{(0,Dv.cr)().track("GoTo > Extension Navigation",{from:r,to:n})}catch(e){(0,Dv.g)().error("Failed to track extension navigation event",e)}})(e.detail.oldUrl,e.detail.newUrl),(0,Dv.fe)(n,r)||((0,Dv.ff)(t,n),(0,Dv.fg)({from:r,to:n}))})(e);(0,Dv.bp)().addEventListener(Dv.fa,e),(0,Dv.av)(()=>{(0,Dv.bp)().removeEventListener(Dv.fa,e)})})(),this.isShellBffOptimizationFlagEnabled?await(async()=>{const e=this.getUserContext(),t=(0,Dv.L)(),r=(0,Dv.dC)("ExecutionContext","getContext"),{machineId:n,runId:o}=r?r():{machineId:"",runId:""},i=await(0,Dv.bI)(),s=(0,Dv.eS)(),a=(0,Dv.cp)(),l=Fj(e);GH(Dj(e),{accountKeys:Mj(e),numberOfPBXs:a.length,Entitlements:Vj(e),pbxId:l,"Active PBX ID":l,"Active PBX Region":Uj(e),shellVersion:K3(),isCalendarConnected:Xj(),Platform:s,desktopVersion:i,locale:t,unleashFlags:eV(e),licences:Bj(e),licenseDescriptions:Hj(e),isInternal:jj(e),machineId:n,runId:o,environment:(0,Dv.K)(),OSPlatform:(0,Dv.eU)()??"N/A",OSVersion:(0,Dv.eT)()??"N/A",browserTimezone:Ky(),userTimezone:Wj(e)??"N/A",userCreationDate:Kj(e),product:j3(),currentAccountName:Zj(e),currentAccountLicenses:Yj(e),roles:Jj(e),currentAccountKey:Gj(e),partnerAccountKey:Qj(e),pbxUserLocation:tV(e)})})():await(async()=>{const e=this.getAuthContext(),t=(0,Dv.L)(),r=(0,Dv.dC)("ExecutionContext","getContext"),{machineId:n,runId:o}=r?r():{machineId:"",runId:""},i=await(0,Dv.bI)(),s=(0,Dv.eS)(),a=(0,Dv.cp)(),l=E3(e);GH(_3(e),{accountKeys:C3(e),numberOfPBXs:a.length,Entitlements:S3(e),pbxId:l,"Active PBX ID":l,"Active PBX Region":I3(e)?.region,shellVersion:K3(),isCalendarConnected:Xj(),Platform:s,desktopVersion:i,locale:t,unleashFlags:(0,Dv.eO)(),licences:$3(e),licenseDescriptions:N3(e),isInternal:P3(e),machineId:n,runId:o,environment:(0,Dv.K)(),OSPlatform:(0,Dv.eU)()??"N/A",OSVersion:(0,Dv.eT)()??"N/A",browserTimezone:Ky(),userTimezone:D3(e)??"N/A",userCreationDate:M3(e)??"",product:j3(),currentAccountName:A3(e),currentAccountLicenses:T3(e),roles:z3(e),currentAccountKey:O3(e),partnerAccountKey:L3(e)})})(),ZH.track($se,{Event:"Began loading"}),(0,Dv.c5)()&&(this.isShellBffOptimizationFlagEnabled?await e5(zj(this.userContext)):await e5(this.authContext?.me?.locale)),await(async()=>
5991{if(globalThis.addEventListener(Dv.f3,Q8),(0,Dv.bs)(Dv.bt.SHELL_LOAD_VIEWS_ON_APP_START,!1)){const{applicationReady:e}=(0,Dv.au)().subscribeTo("Shell"),t=()=>{J8()};e.on(t),(0,Dv.av)(()=>{e.removeListener(t)}),Y8(Ry())}})(),await(async()=>{if(globalThis.addEventListener(Dv.f3,m5),(0,Dv.bs)(Dv.bt.SHELL_LOAD_VIEWS_ON_APP_START,!1)){g5(Py());const{applicationReady:e}=(0,Dv.au)().subscribeTo("Shell"),t=()=>{f5()};e.on(t)}})(),await(async()=>{(()=>{const e=e=>Dv.bA.KeyboardShortcuts.systemInterface.updateConfiguration(e.shortcutId,Sq(e.config)),t=e=>Dv.bA.KeyboardShortcuts.systemInterface.updateConfigurations(Eq(e.configs)),r=(0,Dv.au)().subscribeTo(bX);r.updateConfiguration.addListener(e),r.updateConfigurations.addListener(t),(0,Dv.av)(()=>{r.updateConfiguration.removeListener(e),r.updateConfigurations.removeListener(t)})})(),Dv.bA.KeyboardShortcuts.systemInterface.initializeLogger((0,Dv.g)().create("keyboardShortcuts")),(0,Dv.c5)()&&await async function(){const e=xq();if(e&&Object.keys(e)?.length&&Dv.bA.KeyboardShortcuts.systemInterface.isValidConfiguration(e)){const t={...yq(),...e};(0,Dv.aW)(wq,JSON.stringify(t)),await kq(t),console.log("KeyboardShortcut plugin","Configuration updated from localStorage with new KeyboardShortcutId from the Default configuration")}else console.log("KeyboardShortcut plugin","Configuration updated with Default configuration"),await kq(yq())}()})(),(0,Dv.bs)(Dv.bt.SHELL_SCHEDULE_SETTINGS,!1)&&(0,Dv.c5)()&&await(async()=>{const{userAppearanceAndDNDUpdate:e}=(0,Dv.au)().subscribeTo(Dv.s);let t=null;const r=async e=>{if(null!==t){for(const t of e.doNotDisturbDetails?.dndSources||[])if(await o7(t,e))break}else t=(0,Dv.er)(e)};e.on(r),(0,Dv.av)(()=>{e.removeListener(r)})})(),!this.isShellBffOptimizationFlagEnabled&&(0,Dv.bs)(Dv.bt.SHELL_USER_PREFERENCES_V2_ENABLED)&&await fV(),await(async()=>{if((0,Dv.c5)()){const e=await Dv.bA.KeyboardShortcuts.subscribe("openSettings",window,()=>{(0,Dv.fj)()&&(0,Dv.bj)(`${Dv.aI}`)});(0,Dv.av)(async()=>{await e()})}})();const e=(0,Dv.M)();e&&(0,Dv.c5)()&&((0,Dv.g9)(e).catch(e=>{(0,Dv.g)().error("Failed to start desktop companion server",e)}),(e=>{e.startApi(Vee.apiId,Gee,Zee)})(e)),(0,Dv.c5)()&&V8();try{(()=>{const e=[w5,x5,_5],t=new MutationObserver(t=>{let r=!1;const n=Array.from(b5?.querySelectorAll(`#${x5}`)?.values()??[]),o=t.reduce((t,r)=>(Array.from(r.addedNodes).forEach(r=>{const o=r.id;r.nodeName===y5&&e.includes(o)&&(o===x5&&n.length>1||o===w5||o===_5)&&t.push(r)}),t),[]);if(r=t.some(e=>Array.from(e.addedNodes).some(e=>{const t=e.nodeName===y5||"LINK"===e.nodeName,r=((e,t)=>t.some(t=>e===t))(e,n);return t&&!r})),r&&(n.forEach(e=>b5?.appendChild(e)),r=!1),o.length){const e=o.map(e=>e.id).join(";");(0,Dv.bs)(Dv.bt.SHELL_REMOVE_FRAMEWORK_CSS)?(o.forEach(e=>e.remove()),(0,Dv.g)().log("shell undesired css nodes removed:",e)):(0,Dv.g)().log("shell undesired css nodes:",e)}});b5&&t.observe(b5,k5)})(),v5(),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>v5()),(()=>{const e=document.querySelector("title");e&&(e.innerText=(0,Dv.by)(Dv.bx.GOTO_BRAND_NAME))})(),(0,Dv.c5)()&&((()=>{const{eventBus:e}=(0,Dv.Z)(),{updateAvailable:t}=e.subscribeTo(pJ),r=()=>{S5=!0;const e=(0,Dv.bs)(Dv.bt.SHELL_APP_UPDATE_INTERVAL_OVERRIDE);e&&A5(Number(e))};t.on(r),(0,Dv.av)(()=>{t.removeListener(r)}),AJ()&&r()})(),(async()=>{try{const e=(0,Dv.dv)(C5);if(!e)return;const t=JSON.parse(e),r=(0,Dv.Z)().meta.shellVersion,n=await(0,Dv.bI)(),o=r!==t.shellVersion,i=n!==t.containerVersion,s=Date.now()-t.startTime;(0,Dv.g)().log(`appUpdate type=afterAction action=${t.action} shellVersion=${r} shellVersionBefore=${t.shellVersion} shellUpdated=${o} containerVersion=${n} containerVersionBefore=${t.containerVersion} containerUpdated=${i} durationMs=${s}`),"containerRestart"===t.action&&!i&&((0,Dv.g)().error(`appUpdate type=error reason=containerRestartDidNotUpdate version=${n}`),OJ())}catch(e){(0,Dv.g)().error("appUpdate type=error reason=readingAppUpdateInfo",e)}})(),E5||A5(864e5))}catch(e){(0,Dv.g)().error("shell threw a non-fatal exception when starting ",e)}}async doPostStart(){try{(0,Dv.bs)(Dv.bt.SHELL_DISABLE_SERVICE_WORKER)||(async e=>{const t=(()=>{const e=globalThis.navigator;
5991return"serviceWorker"in e?e.serviceWorker:void 0})();if(t?.controller)try{t.controller.postMessage(e)}catch(e){console.warn(e)}})(G8),W3(this),(()=>{const e=(0,Dv.bL)().createElement("script");e.defer=!0,e.type="text/javascript",e.innerHTML='(function(){var g=function(e,h,f,g){\n      this.get=function(a){for(var a=a+"=",c=document.cookie.split(";"),b=0,e=c.length;b<e;b+=1){for(var d=c[b];" "==d.charAt(0);){d=d.substring(1,d.length)}if(0==d.indexOf(a)){return d.substring(a.length,d.length)}}return null};\n      this.set=function(a,c){var b="",b=new Date();b.setTime(b.getTime()+6048e5);b="; expires="+b.toGMTString();document.cookie=a+"="+c+b+"; path=/; "};\n      this.check=function(){var a=this.get(f);if(a){a=a.split(":")}else if(100!=e){"v"==h&&(e=Math.random()>=e/100?0:100),(a=[h,e,0]),this.set(f,a.join(":"))}else{return!0}var c=a[1];if(100==c){return!0}switch(a[0]){case "v":return!1;case "r":return((c=a[2]%Math.floor(100/c)),a[2]++,this.set(f,a.join(":")),!c)}return!0};\n      this.go=function(){if(this.check()){var a=document.createElement("script");a.type="text/javascript";a.src=g;document.body&&document.body.appendChild(a)}};\n      this.start=function(){var t=this;"complete"!==document.readyState?window.addEventListener?window.addEventListener("load",function(){t.go()},!1):window.attachEvent&&window.attachEvent("onload",function(){t.go()}):t.go()}};\n      try{new g(100,"r","QSI_S_ZN_39PSORNcmg7xC7k","https://zn39psorncmg7xc7k-logmeinvoc.siteintercept.qualtrics.com/SIE/?Q_ZID=ZN_39PSORNcmg7xC7k").start()}catch(i){}})();';const t=(0,Dv.bL)().createElement("div");t.id="ZN_39PSORNcmg7xC7k",(0,Dv.bL)().head.appendChild(e),(0,Dv.bL)().head.appendChild(t)})(),(()=>{if((0,Dv.Z)()?.user?.key&&(0,Dv.bs)(Dv.bt.SHELL_CAN_SEE_TRIAL_BANNER)){const e=new SX;(async()=>{try{const e=await(0,Dv.y)(`${(0,Dv.an)().apiGlobal}/rest/2/product?clientName=true`,{headers:[["Content-Type","application/json"]],credentials:void 0}),{free:t,trial:r,product:n,endDate:o,active:i}=await e.json();return localStorage.setItem("productTrial",JSON.stringify({free:t,trial:r,product:n,endDate:o,active:i})),{free:t,trial:r,product:n,endDate:o,active:i}}catch{localStorage.removeItem("productTrial")}})().then(()=>{EX()?e.show():e.hide()})}})(),(()=>{const e=Number((0,Dv.T)().major);return(0,Dv.dF)()&&e<10})()&&(new $5).show(),(async()=>{await(async()=>{if((0,Dv.cL)()&&Dv.bz.isPluginAvailable("ContainerInfo")){const e=(await Dv.bA.ContainerInfo.getInfo()).osVersion?.split(".")[0];if(e&&Number(e)<20)return!0}return!1})()&&(new L5).show()})(),(()=>{const e=new W8;(e=>e.size>0&&(0,Dv.fj)())((0,Dv.bJ)().getBlockedExtensionIds())?e.show():e.hide()})(),(0,Dv.ga)()}catch(e){console.warn("shell threw a non-fatal exception when starting ",e)}}interceptBeforeRoutingEvent(){(0,Dv.bp)().addEventListener(Dv.gb,this.handleBeforeRoutingEvent),(0,Dv.av)(()=>{(0,Dv.bp)().removeEventListener(Dv.gb,this.handleBeforeRoutingEvent)})}async doInitializeShellApplications(){(0,Dv.bs)(Dv.bt.SHELL_PAGES_OPTIMIZATION)&&Rse()?this.interceptBeforeRoutingEvent():(await this.initializeApplications(),await this.doPostInitializeShellApplications(),this.registerExtensionsAndSettingsToSingleSpa(),(0,Dv.gc)())}async doInitializeFirstShellApplication(){(0,Dv.bs)(Dv.bt.SHELL_LOAD_SINGLE_EXTENSION)&&(await this.initializeFirstExtension(),this.registerLoadedExtensionsToSingleSpa())}async doPostInitializeShellApplications(){(0,Dv.c5)()&&(async()=>{if(!(0,Dv.bB)()||!(0,Dv.c5)())return;const e=(0,Dv.dC)("DockTrayMenu","add");if(e){if(o5(),n5=(0,Dv.bJ)().getExtensions().reduce((e,t)=>e.concat(i5(t)),[]),n5.length)try{n5=e(n5),(0,Dv.av)(()=>{o5()})}catch(e){(0,Dv.g)().error("Shell cannot add action items to container",e)}}else(0,Dv.g)().debug("Shell cannot add action items to the Desktop App. Add method is not supported on dock menu")})()}async setUnguardedRoutes(){await(0,Dv.gd)(Array.from(this.unguardedRoutes))}registerViewsApplications(){Cy().forEach(e=>{(0,Dv.ge)(e)})}async start(e={environment:Dv.E.ED}){try{performance.mark(Dv.gf),this.addSingleSPAListeners(),this.defineEnvironment(e),(0,Dv.c5)()&&((e=>{const t=(new Q9).getResult(),r=(0,Dv.cs)()??"none";if(!Dv.bz.isNative){if(Dv.bz.isPluginAvailable("ExecutionContext")){const{runId:e,machineId:t}=Dv.bA.ExecutionContext.getContext();(0,Dv.g)().setContext("machineId",t),(0,Dv.g)().setContext("runId",e)}(0,Dv.g)().setContext("browser",t.browser.name),(0,Dv.g)().setContext("osVersion",t.os.version)}(0,Dv.g)().setContext("browserVersion",t.browser.version),(0,Dv.g)().setContext("os",t.os.name),(0,Dv.g)().setContext("host_version",wj()),(0,Dv.g)().setContext("shell_version",Dv.h),(0,Dv.g)().setContext("shell_env",e),(0,Dv.g)().setContext("integration",r),(0,Dv.g)().log(`Host Application version: ${wj()}`),(0,Dv.g)().log(`shell version ${Dv.h}`),(0,Dv.g)().log(`Integration mode: ${r}`)})(e.environment),(()=>{const e="shell-running-time";let t=0;(0,Dv.g)().setContext(e,t),setInterval(()=>{(0,Dv.g)().setContext(e,++t)},6e4)})(),(0,Dv.gg)()),(()=>{const e=e=>{(0,Dv.fy)(e)},t=()=>{setTimeout(()=>{(0,Dv.cJ)()},150)},{accountSwitchBegin:r,accountSwitchCompleted:n}=(0,Dv.au)().subscribeTo(Dv.fp);r.on(e),n.on(t),(0,Dv.av)(()=>{r.removeListener(e),n.removeListener(t)})})(),(()=>{const e=async e=>{const t=await(0,Dv.f7)();(0,Dv.fz)(e),t&&(0,Dv.cJ)()},{localeChangeBegin:t}=(0,Dv.au)().subscribeTo("I18N");t.addListener(e),(0,Dv.av)(()=>{t.removeListener(e)})})(),q8(),(async()=>{(0,Dv.c5)()&&await(async()=>await(0,Dv.eb)()===Dv.o.DESKTOP_APP||await(0,Dv.fl)()===Dv.q.DESKTOP_APP)()&&(0,Dv.fk)(!0)})(),(()=>{const e=document.getElementById(Dy);if(e){const{isIntegration:t,isCompanion:r}=(0,Dv.O)(),n=t||r?"msteams":"gotoapp";e.setAttribute("skin",n)}})(),await this.doAuthentication(),await this.doInitializeAPI(),this.registerViewsApplications(),this.registerInternalApplications(),(0,Dv.c5)()&&await(0,Dv.Q)().initialize(),(0,Dv.gh)(),"/"===(0,Dv.c_)((0,Dv.bg)())&&(0,Dv.d0)(),await this.doInitializeFirstShellApplication(),(0,Dv.c5)()&&(X9.applicationReady.on(ree),(0,Dv.gi)(),mee.applicationReady.on(fee),(async()=>
5991{if(bee.includes((0,Dv.fN)())){if("true"!==(0,Dv.aZ)(vee))return void(0,Dv.g)().info(`[dev] To preview the outdated container banner, run localStorage.setItem('${vee}', 'true') and reload.`);(0,Dv.g)().info("[dev] Faking auto updates being enabled with an update left unapplied."),G3({since:yee(3),appVersion:await(0,Dv.bI)()}),await Y3()}})()),(0,Dv.gj)({urlRerouteOnly:!0}),(0,Dv.g)().log("single-spa start"),await this.doInitializeShellApplications(),await(async e=>{const t=(0,Dv.bJ)().getExtensions().reduce((e,t)=>e.concat((0,Dv.f0)(t)),[]),r=((e,t)=>{const r=t.length;return e.length>1?e.sort((e,n)=>{let o=t.indexOf(e.id);o=-1===o?r:o;let i=t.indexOf(n.id);return i=-1===i?r:i,o-i}):e})(t,e.getNavigationOrder());await r5(r)})(this),(0,Dv.gk)(),RG(),ZH.track($se,{Event:"Initialize single SPA"}),performance.mark(Dv.gl);const t=(0,Dv.gm)();ZH.track($se,{Event:"Finished loading",LoadingTime:t?.duration??0,CurrentTheme:this.themeOnLoad}),(0,Dv.gn)()}catch(e){if(await e5(),e instanceof Error&&e.message===Nse)return;if((0,Dv.g)().error("Unexpected error",e),(0,Dv.O)().isCompanion)return(0,Dv.go)(Dv.aU);throw e}await this.doPostStart()}setMeta(e){(e=>{yj=e})(e.hostAppVersion),(e=>{e&&(vj=e),console.log(`Chameleon-web version: ${e}`)})(e.chameleonWebVersion),(e=>{e&&(bj=e),console.log(`Chameleon-core version: ${e}`)})(e.chameleonCoreVersion)}registerLoadedExtensionsToSingleSpa(){(0,Dv.bJ)().getExtensions().forEach(e=>{(0,Dv.gp)(e),this.registeredExtensionIds.set(e.id,e)})}registerExtensionsAndSettingsToSingleSpa(){const e=[],t=(0,Dv.bJ)().getExtensions();t.filter(e=>!this.registeredExtensionIds.has(e.id)).forEach(e=>{(0,Dv.gp)(e),this.registeredExtensionIds.set(e.id,e)});const r=(0,Dv.gq)(t);e.push(...r);const n=(e=>({...sy,customProps:{settingLinks:e}}))(e),o=Object.values(oy).map(e=>(0,Dv.bf)(e));this.internalApplications.set(n.name,n),o.forEach(e=>this.internalApplications.set(e.name,e)),(0,Dv.ge)(n),o.forEach(e=>{try{(0,Dv.ge)(e)}catch(t){(0,Dv.g)().error("Error while registering application to single-spa",e,t)}})}registerInternalApplications(){Array.from(this.internalApplications.values()).forEach(e=>{(0,Dv.ge)(e)})}addSingleSPAListeners(){window.addEventListener(Dv.f3,e=>{(0,Dv.f4)(e);const t=(0,Dv.gr)(e);this.configure(t)})}configure(e){this.config=e.filter(e=>"goto/navigation"!==e).map(e=>u5(e,(0,Dv.bJ)().getRegisteredApplications(),this.internalApplications)).reduce((e,t)=>({...e,...t?.customProps?.shellConfig??{}}),this.config)}};!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("body #goto-root{display:grid;grid-template-columns:[nav] min-content [main] minmax(0,1fr);grid-template-rows:[banner] min-content [notification] auto [header] min-content [main] minmax(0,1fr);transition:all var(--goto-duration-modest-02) var(--goto-entrance-easing)}body #goto-root>#goto--banner-notification{z-index:11;grid-column:1/-1;grid-row:notification}body #goto-root>#goto--critical-banner-container{z-index:12;grid-column:1/-1;grid-row:banner}body #goto-root>#goto--topbar-container{grid-column:1/-1;grid-row:header}body #goto-root>#goto--navigation{grid-column:nav;grid-row:main}body #goto-root>#goto--main-container{grid-column:main;grid-row:main}body #goto-root>goto-unauthenticated-error{grid-column:1/-1;grid-row:1/-1}body #goto-root>goto-error{grid-column:1/-1;grid-row:1/-1}body #goto-root>goto-shell-landing{grid-column:1/-1;grid-row:1/-1}body #goto-root{height:100%;overflow:clip;width:100%}body #goto-root>#goto--topbar-container{z-index:var(--goto-z-index-header)}body #goto-root>#goto--main-container{position:relative;background-color:var(--goto-background-color-default)}body #goto-root>#goto--main-container>#goto--content{height:100%;width:100%}body #snackbar-notification{bottom:24px;height:50px;left:24px;position:fixed}goto-inspector-panel{--goto-inspector-panel-width: 0;background-color:var(--goto-background-color-default);overflow:hidden;flex-shrink:0;width:var(--goto-inspector-panel-width);margin-left:0;visibility:hidden;transition:width var(--goto-duration-modest-02) var(--goto-exit-easing),margin-left var(--goto-duration-modest-02) var(--goto-exit-easing),visibility 0s linear var(--goto-duration-modest-02);z-index:2}goto-inspector-panel.open{--goto-inspector-panel-width: 300px;visibility:visible;
5991transition:width var(--goto-duration-modest-02) var(--goto-entrance-easing),margin-left var(--goto-duration-modest-02) var(--goto-entrance-easing),visibility 0s linear 0s}goto-inspector-panel.floating-panel{margin-left:calc(-1 * var(--goto-inspector-panel-width));box-shadow:var(--goto-elevation-medium)}goto-inspector-panel.no-transition,goto-inspector-panel.open.no-transition,goto-inspector-panel.floating-panel.no-transition,goto-inspector-panel.floating-panel.open.no-transition{transition:none}goto-inspector-panel .panel-container{border-left:1px solid var(--goto-border-color-default);height:100%;width:100%;display:flex;flex-direction:column}goto-inspector-panel .close-panel-container{display:flex;flex-direction:row-reverse;padding-bottom:var(--goto-spacing-02);padding-left:var(--goto-spacing-04);padding-right:var(--goto-spacing-04);padding-top:var(--goto-spacing-06)}goto-inspector-panel .panel-content-container{flex:1;min-height:0;overflow:auto;padding-bottom:var(--goto-spacing-02);padding-left:var(--goto-spacing-04);padding-right:var(--goto-spacing-04)}html,body,chameleon-theme-provider{height:100%}#crowd-shortcut{visibility:hidden!important}dialog,p,html,body{border:0;margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();const FNe="0.810.0",UNe="goto-reload-attempts",BNe=(e,t)=>{var r,n,o;return null!==(o=null===(n=null===(r=globalThis.shell)||void 0===r?void 0:r.featureFlags)||void 0===n?void 0:n.getFeatureFlagValue(e,t))&&void 0!==o?o:t},HNe={shouldLoadOnMobile:!1,shouldLoadInIntegration:!0,shouldLoadInCompanion:!1},jNe=(e,t=HNe)=>{if(BNe("goto-shell-ms-teams-"+e,!1))return t};var VNe;!function(e){e.MEETING_EXPERIENCE_VERSIONS="meeting-experience-app-version"}(VNe||(VNe={}));const WNe={id:"@getgo/web-meeting-shell-integration/extension",optionalDependencies:["@goto/contacts-ui-extension"],get url(){var e;const t=null===(e=BNe(VNe.MEETING_EXPERIENCE_VERSIONS,{extension:""}))||void 0===e?void 0:e.extension;return new URL(t?`${t}/extension.js`:"extension.js",(()=>{switch((0,Dv.K)()){case Dv.E.ED:return"https://apped1.g2m.test.expertcity.com/shell/";case Dv.E.RC:return"https://apprc1.g2m.test.expertcity.com/shell/";case Dv.E.STAGING:return"https://appstage.gotomeeting.com/shell/";case Dv.E.NIGHTLY:return"https://app.gotomeeting.com/shell/beta/";case Dv.E.PROD:default:return"https://app.gotomeeting.com/shell/"}})())},unguardedRoutes:["/meeting","/training","/webinar","/meet"],standaloneRoutes:["^/meeting/","^/training/","^/webinar/","^/meet/"],integrations:{get msTeams(){return jNe("web-meeting")}}};var KNe=WNe,qNe=(e=>(e.ENTITLEMENTS="entitlements",e.ROLES="roles",e.PBX_FLAGS="pbxFlags",e.CONTACT_CENTER_FLAGS="ccFlags",e.SHELL_FEATURE_FLAGS="shellFlags",e.ACCOUNT_SETTINGS="accountSettings",e.PDP_GOTO_APP_EXTENSION_ACCESS="goto_app_extension:access",e))(qNe||{});CustomEvent,CustomEvent;const GNe=(e,t)=>`${(()=>{switch((0,Dv.K)()){case Dv.E.ED:return"https://ed.conferences.test.expertcity.com/assets";case Dv.E.RC:return"https://rc.conferences.test.expertcity.com/assets";case Dv.E.STAGING:return"https://stage.conferences.goto.com/assets";case Dv.E.NIGHTLY:case Dv.E.PROD:default:return"https://conferences.goto.com/assets"}})()}/${e}/${(null!=t?t:"release").trim()}/index.js`;var ZNe;!function(e){e.OOS_MEETING_APP_VERSION="oos-meeting-app-version",e.OOS_MEET_NOW_VERSION="oos-meeting-meetnow-version",e.OOS_MEETING_BG_SERVICE_VERSION="oos-meeting-bg-service-version",e.OOS_TRAINING_VERSION="oos-training-app-version",e.OOS_WEBINAR_VERSION="oos-webinar-app-version",e.OOS_WEBINAR_V2_VERSION="oos-webinar-app-v2-version",e.OOS_TEASER_VERSION="oos-teaser-app-version"}(ZNe||(ZNe={}));const YNe={id:"@goto/oos-meeting-app",optionalDependencies:["@goto/oos-meeting-background-service"],get url(){const e=BNe(ZNe.OOS_MEETING_APP_VERSION,"release");return new URL(GNe("meeting-extension",e))},prerequisites:{[qNe.ROLES]:"ROLE_G2M_ORGANIZER || ROLE_GOTOCONNECT_ORGANIZER"},integrations:{get msTeams(){return jNe("oos-meeting")}}};var JNe=YNe;const QNe={id:"@goto/oos-meeting-meet-now",get url(){const e=BNe(ZNe.OOS_MEET_NOW_VERSION,"release");return new URL(GNe("meeting-meet-now-extension",e))},integrations:{get msTeams(){return jNe("oos-meeting-meet-now")}}};var XNe=QNe;const eRe={id:"@goto/oos-meeting-background-service",get url(){const e=BNe(ZNe.OOS_MEETING_BG_SERVICE_VERSION,"release");return new URL(GNe("meeting-background-service-extension",e))},integrations:{get msTeams(){return jNe("oos-meeting-background-service")}}};var tRe,rRe=eRe;!function(e){e.GTC_VOICE_EXPERIENCE_VERSION="gtc-voice-experience-version-picker"}(tRe||(tRe={}));const nRe=()=>{const e=BNe(tRe.GTC_VOICE_EXPERIENCE_VERSION,"latest");let t="/experiences/voice/latest";return(e=>"latest"!==e)(e)&&(t=`/experiences/voice/${e}`),t},oRe="jive || gotoconnect || grasshopper";var iRe={mainExtension:{id:"@voice",get url(){const e=nRe();return new URL(`${e}/extension.js`,window.location.origin)}
5991,dependencies:["@voice-softphone-ui"],unguardedRoutes:[],esModule:!0,prerequisites:{[qNe.ENTITLEMENTS]:oRe},integrations:{msTeams:{shouldLoadOnMobile:!0,shouldLoadInIntegration:!0,shouldLoadInCompanion:!0,commandsToForwardToCompanion:[{namespace:"Softphone",commandNames:["showSoftphoneWidget"]},{namespace:"VoiceIntegration",commandNames:["reEmitLastCallsStateOnCompanion","reEmitLastSettingsStateOnCompanion","updateSettingsOnCompanion","updateExtensionOnCompanion"]}]},sidePanel:{shouldLoad:!0}}},softphoneUIExtension:{id:"@voice-softphone-ui",get url(){const e=nRe();return new URL(`${e}/extension-softphone-ui.js`,window.location.origin)},dependencies:[],optionalDependencies:["@goto/contacts-ui-extension"],standaloneRoutes:["^/softphone-ui"],unguardedRoutes:[],prerequisites:{[qNe.ENTITLEMENTS]:oRe},esModule:!0,integrations:{msTeams:{shouldLoadInIntegration:!0,shouldLoadInCompanion:!0},sidePanel:{shouldLoad:!0}}},bugReporterExtension:{id:"@shell-bug-reporter",get url(){const e=nRe();return new URL(`${e}/extension-bug-report.js`,window.location.origin)},dependencies:[],unguardedRoutes:[],esModule:!0,integrations:{msTeams:{shouldLoadInIntegration:!0},sidePanel:{shouldLoad:!0}}},audioSettingsExtension:{id:"@voice-audio-settings",get url(){const e=nRe();return new URL(`${e}/extension-audio-settings.js`,window.location.origin)},prerequisites:{[qNe.ENTITLEMENTS]:`!(${oRe}) && g2m`},dependencies:[],unguardedRoutes:[],esModule:!0}};const sRe={id:"@goto/oos-training-app",get url(){const e=BNe(ZNe.OOS_TRAINING_VERSION,"release");return new URL(GNe("training-extension",e))},prerequisites:{[qNe.ENTITLEMENTS]:"g2t",[qNe.ACCOUNT_SETTINGS]:"training.isTrainingGoToAppEnabled"},integrations:{get msTeams(){return jNe("oos-training")}}};var aRe=sRe;const lRe={id:"@goto/oos-webinar-app",get url(){const e=BNe(ZNe.OOS_WEBINAR_VERSION,"release");return new URL(GNe("webinar-extension",e))},prerequisites:{[qNe.ENTITLEMENTS]:"g2w",[qNe.ACCOUNT_SETTINGS]:"webinar.isWebinarGoToAppEnabled"},integrations:{get msTeams(){return jNe("oos-webinar")}}};var cRe=lRe,dRe={id:"@ucc-messaging/messaging-extension",get url(){const e=BNe("inbox-version","latest");return new URL(e?`/experiences/messaging/${e}/messaging-extension.mjs`:"/experiences/messaging/messaging-extension.js",location.origin)},prerequisites:{[qNe.ENTITLEMENTS]:"jive || gotoconnect || g2m"},optionalDependencies:["@goto/contacts-ui-extension","@dce/engagements-web-components-loader-extension"],esModule:!0,integrations:{msTeams:{shouldLoadOnMobile:!0,shouldLoadInIntegration:!0,shouldLoadInCompanion:!0},sidePanel:{shouldLoad:!0}}}
5991,uRe={id:"@ucc/cc-analytics",url:new URL("/experiences/analytics/@ucc/cc-analytics-extension.mjs",location.origin),esModule:!0,integrations:{msTeams:{shouldLoadInIntegration:!0},sidePanel:{shouldLoad:!0}},standaloneRoutes:["/analytics"]},hRe={id:"@ucc/contact-center",url:new URL("/experiences/contact-center/@ucc/contact-center-extension.mjs",location.origin),esModule:!0,prerequisites:{ccFlags:"cc-supervisor || cc-agent || cc-config.gtc"},integrations:{msTeams:{shouldLoadInIntegration:!0,shouldLoadInCompanion:!0},sidePanel:{shouldLoad:!0}}},pRe={id:"@ucc/cc-agent/extension",get url(){return new URL(`/experiences/cc-agent/${BNe("cc-agent-version","latest")}/extension.js`,location.origin)},prerequisites:{ccFlags:"cc-agent.portal"},integrations:{msTeams:{shouldLoadInIntegration:!0,shouldLoadInCompanion:!0},sidePanel:{shouldLoad:!0}}},gRe={id:"@ucc/cc-config/extension",get url(){const e=BNe("cc-config-version","latest");return new URL(`/experiences/cc-config/${e}/extension.es.js`,location.origin)},esModule:!0,prerequisites:{ccFlags:"cc-config.gtc || engagements"},optionalDependencies:["@dce/engagements-web-components-loader-extension"],integrations:{msTeams:{shouldLoadInIntegration:!0},sidePanel:{shouldLoad:!0}}},fRe={id:"@ucc/cc-supervisor",url:new URL("/experiences/cc-supervisor/@ucc/cc-supervisor-extension.mjs",location.origin),esModule:!0,prerequisites:{ccFlags:"cc-supervisor"},integrations:{msTeams:{shouldLoadInIntegration:!0,shouldLoadInCompanion:!0},sidePanel:{shouldLoad:!0}}},mRe={id:"@ucc/cc-dashboard",url:new URL("/experiences/cc-dashboard/@ucc/cc-dashboard-extension.mjs",location.origin),esModule:!0,prerequisites:{ccFlags:"cc-supervisor.wallboard"},integrations:{msTeams:{shouldLoadInIntegration:!0},sidePanel:{shouldLoad:!0}}},vRe={id:"@ucc/cc-resolve",url:new URL("/experiences/cc-resolve/@ucc/cc-resolve-extension.mjs",location.origin),esModule:!0,prerequisites:{ccFlags:"cc-agent.chat-queues.conversation-co-browse"},integrations:{msTeams:{shouldLoadInIntegration:!0,shouldLoadInCompanion:!0},sidePanel:{shouldLoad:!0}}},bRe={id:"@ucc/cc-surveys",url:new URL("/extensions/cc-surveys/@ucc/cc-surveys.mjs",location.origin),esModule:!0,unguardedRoutes:["/cc-surveys"],integrations:{msTeams:{shouldLoadInIntegration:!1},sidePanel:{shouldLoad:!0}},standaloneRoutes:["/cc-surveys"]},yRe={id:"@ucc/gtc-cc-topic-flag",url:new URL("/experiences/cc-topic-flag/goto-app-extension.js",location.origin),prerequisites:{ccFlags:"cc-config.flags"},integrations:{msTeams:{shouldLoadInIntegration:!0},sidePanel:{shouldLoad:!0}}},wRe={id:"@ucc/gtc-cc-qc-scorecard.evaluation",url:new URL("/experiences/cc-qm-scorecard-eval/goto-app-extension.js",location.origin),prerequisites:{ccFlags:"cc-supervisor.quality-management-dashboard"},integrations:{msTeams:{shouldLoadInCompanion:!0,shouldLoadInIntegration:!0},sidePanel:{shouldLoad:!0}}},xRe={id:"@ucc/gtc-cc-qm-scorecard.config",url:new URL("/experiences/cc-qm-scorecard-config/goto-app-extension.js",location.origin),prerequisites:{ccFlags:"cc-config.quality-management"},integrations:{msTeams:{shouldLoadInIntegration:!0},sidePanel:{shouldLoad:!0}}};const _Re={id:"@ucc/gtc-cc-qm-scorecard.widgets",get url(){const e=BNe("sai-scorecard-widgets-version","latest");return new URL(`/experiences/cc-qm-scorecard-widgets/${e}/goto-app-extension.js`,location.origin)},prerequisites:{[qNe.SHELL_FEATURE_FLAGS]:"insights.enable"},integrations:{msTeams:{shouldLoadInIntegration:!1},sidePanel:{shouldLoad:!0}}};var kRe,CRe,SRe=_Re;!function(e){e.ENGAGEMENTS_VERSION="engagements.version"}(kRe||(kRe={})),function(e){e.WC_LOADER="wc-loader"}(CRe||(CRe={}));const ERe={[CRe.WC_LOADER]:"latest"},IRe={id:"@dce/engagements-web-components-loader-extension",get url(){var e,t;const r=null!==(t=null===(e=BNe(kRe.ENGAGEMENTS_VERSION,ERe))||void 0===e?void 0:e["wc-loader"])&&void 0!==t?t:null==ERe?void 0:ERe["wc-loader"];return new URL(`/experiences/engagements/wc-loader/${r}/extension.mjs`,location.origin)},esModule:!0,integrations:{msTeams:{shouldLoadInIntegration:!0},sidePanel:{shouldLoad:!0}}};var ARe,TRe=[IRe];!function(e){e.CONTACTS_VERSIONS="contacts-team-app-version"}(ARe||(ARe={}));const ORe={id:"@goto/contacts-ui-extension",get url(){var e;const t=null===(e=BNe(ARe.CONTACTS_VERSIONS,{extension:"latest"}))||void 0===e?void 0:e.extension;return new URL(`/experiences/contacts/${t}/extension/index.js`,location.origin)},prerequisites:{[qNe.ENTITLEMENTS]:"jive || gotoconnect"},integrations:{msTeams:{shouldLoadInIntegration:!0,shouldLoadInCompanion:!0},sidePanel:{shouldLoad:!0}}};
5991var LRe=ORe,$Re={id:"@goto/network-measurements",url:new URL("/experiences/networkmeasurements/extension.js",location.origin),integrations:{msTeams:{shouldLoadInIntegration:!0,shouldLoadInCompanion:!0},sidePanel:{shouldLoad:!0}}};const NRe={id:"@goto/oos-webinar-app-v2",get url(){const e=BNe(ZNe.OOS_WEBINAR_V2_VERSION,"release");return new URL(GNe("webinar-v2-extension",e))},prerequisites:{[qNe.ENTITLEMENTS]:"g2w",[qNe.ACCOUNT_SETTINGS]:"webinar.isWebinarGoToAppEnabled",[qNe.SHELL_FEATURE_FLAGS]:"oos-webinar-app-v2-enabled"},integrations:{get msTeams(){return jNe("oos-webinar-v2")}}};var RRe=NRe;const PRe={id:"@goto/oos-teaser",get url(){const e=BNe(ZNe.OOS_TEASER_VERSION,"release");return new URL(GNe("teaser-extension",e))},prerequisites:{[qNe.ENTITLEMENTS]:"!g2w",[qNe.ACCOUNT_SETTINGS]:"!webinar.isWebinarGoToAppEnabled && gotoapp.showWebinarTeaser"},integrations:{get msTeams(){return jNe("oos-teaser")}}};var DRe=PRe;const MRe={id:"@goto/insights",esModule:!0,get url(){const e=BNe("insights-version","latest");return new URL(`/experiences/insights/${e}/insights-extension.js`,location.origin)},prerequisites:{[qNe.SHELL_FEATURE_FLAGS]:"insights.enable",[qNe.PDP_GOTO_APP_EXTENSION_ACCESS]:"insights"},dependencies:["@goto/shell-extensions-widgets"],optionalDependencies:["@goto/call-reports-widgets","@ucc/gtc-cc-qm-scorecard.widgets"]};var zRe=MRe;const FRe={id:"@goto/shell-extensions-widgets",esModule:!0,get url(){const e=BNe("shell-extensions-widgets-version","latest");return new URL(`experiences/shell-extensions/${e}/widgets/index.js`,location.origin)},prerequisites:{[qNe.SHELL_FEATURE_FLAGS]:"insights.enable"}};var URe=FRe;const BRe={id:"@goto/call-reports-widgets",esModule:!0,get url(){const e=BNe("call-reports-widgets-version","latest");return new URL(`/experiences/call-reports-widgets/${e}/call-reports-widgets-extension.js`,location.origin)},prerequisites:{[qNe.SHELL_FEATURE_FLAGS]:"insights.enable"}};var HRe=BRe;const jRe={id:"@goto/onboarding",esModule:!0,get url(){const e=BNe("shell-extensions-onboarding-version","latest");return new URL(`experiences/shell-extensions/${e}/onboarding/index.js`,location.origin)},prerequisites:{[qNe.SHELL_FEATURE_FLAGS]:"enable-onboarding"}};var VRe=[URe,HRe,SRe,zRe,jRe,KNe,XNe,rRe,JNe,iRe.mainExtension,iRe.softphoneUIExtension,aRe,cRe,RRe,dRe,uRe,gRe,hRe,pRe,fRe,mRe,vRe,bRe,LRe,...TRe,$Re,yRe,wRe,xRe,iRe.bugReporterExtension,DRe,iRe.audioSettingsExtension];function WRe(e,t,r){return t||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){const r={sentry_version:"7"};return e.publicKey&&(r.sentry_key=e.publicKey),t&&(r.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(r).toString()}(e,r)}`}const KRe="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,qRe="10.57.0",GRe=globalThis;function ZRe(){return YRe(GRe),GRe}function YRe(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||qRe,t[qRe]=t[qRe]||{}}function JRe(e,t,r=GRe){const n=r.__SENTRY__=r.__SENTRY__||{},o=n[qRe]=n[qRe]||{};return o[e]||(o[e]=t())}const QRe=["debug","info","warn","error","log","assert","trace"],XRe={};function ePe(e){if(!("console"in GRe))return e();const t=GRe.console,r={},n=Object.keys(XRe);n.forEach(e=>{const n=XRe[e];r[e]=t[e],t[e]=n});try{return e()}finally{n.forEach(e=>{t[e]=r[e]})}}function tPe(){return nPe().enabled}function rPe(e,...t){KRe&&tPe()&&ePe(()=>{GRe.console[e](`Sentry Logger [${e}]:`,...t)})}function nPe(){return KRe?JRe("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const oPe={enable:function(){nPe().enabled=!0},disable:function(){nPe().enabled=!1},isEnabled:tPe,log:function(...e){rPe("log",...e)},warn:function(...e){rPe("warn",...e)},error:function(...e){rPe("error",...e)}},iPe=/^o(\d+)\./,sPe=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function aPe(e,t=!1){const{host:r,path:n,pass:o,port:i,projectId:s,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&o?`:${o}`:""}@${r}${i?`:${i}`:""}/${n?`${n}/`:n}${s}`}function lPe(e){const t=sPe.exec(e);if(!t)return void ePe(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[r,n,o="",i="",s="",a=""]=t.slice(1);let l="",c=a;const d=c.split("/");if(d.length>1&&(l=d.slice(0,-1).join("/"),c=d.pop()),c){const e=c.match(/^\d+/);e&&(c=e[0])}return cPe({host:i,pass:o,path:l,projectId:c,port:s,protocol:r,publicKey:n})}function cPe(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function dPe(e){const t=e.getOptions(),{host:r}=e.getDsn()||{};let n;return t.orgId?n=String(t.orgId):r&&(n=function(e){const t=e.match(iPe);return t?.[1]}(r)),n}const uPe=Symbol.for("sentry.skipNormalization"),hPe=Symbol.for("sentry.overrideNormalizationDepth"),pPe=Object.prototype.toString;function gPe(e){switch(pPe.call(e)){case"[object Error]":case"[object E
5991xception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return CPe(e,Error)}}function fPe(e,t){return pPe.call(e)===`[object ${t}]`}function mPe(e){return fPe(e,"ErrorEvent")}function vPe(e){return fPe(e,"DOMError")}function bPe(e){return fPe(e,"String")}function yPe(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function wPe(e){return null===e||yPe(e)||"object"!=typeof e&&"function"!=typeof e}function xPe(e){return fPe(e,"Object")}function _Pe(e){return"undefined"!=typeof Event&&CPe(e,Event)}function kPe(e){return Boolean(e?.then&&"function"==typeof e.then)}function CPe(e,t){try{return e instanceof t}catch{return!1}}function SPe(e){return"undefined"!=typeof Request&&CPe(e,Request)}function EPe(e,t,r){if(!(t in e))return;const n=e[t];if("function"!=typeof n)return;const o=r(n);"function"==typeof o&&APe(o,n);try{e[t]=o}catch{KRe&&oPe.log(`Failed to replace method "${t}" in object`,e)}}function IPe(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{KRe&&oPe.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function APe(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,IPe(e,"__sentry_original__",t)}catch{}}function TPe(e){return e.__sentry_original__}function OPe(e){if(gPe(e))return{message:e.message,name:e.name,stack:e.stack,...LPe(e)};if(_Pe(e)){const{type:t,target:r,currentTarget:n,detail:o}=e;return{type:t,target:r,currentTarget:n,...o?{detail:o}:{},...LPe(e)}}return e}function LPe(e){return"object"==typeof e&&null!==e?Object.fromEntries(Object.entries(e)):{}}const $Pe=/\(error: (.*)\)/,NPe=/captureMessage|captureException/;function RPe(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,r=0,n=0)=>{const o=[],i=e.split("\n");for(let e=r;e<i.length;e++){let r=i[e];r.length>1024&&(r=r.slice(0,1024));const s=$Pe.test(r)?r.replace($Pe,"$1"):r;if(!s.includes("Error: ")){for(const e of t){const t=e(s);if(t){o.push(t);break}}if(o.length>=50+n)break}}return function(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(PPe(t).function||"")&&t.pop(),t.reverse(),NPe.test(PPe(t).function||"")&&(t.pop(),NPe.test(PPe(t).function||"")&&t.pop()),t.slice(0,50).map(e=>({...e,filename:e.filename||PPe(t).filename,function:e.function||"?"}))}(o.slice(n))}}function PPe(e){return e[e.length-1]||{}}const DPe="<anonymous>";function MPe(e){try{return e&&"function"==typeof e&&e.name||DPe}catch{return DPe}}function zPe(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}let FPe,UPe;function BPe(e,t=100,r=1/0){try{return jPe("",e,t,r)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function HPe(e,t=3,r=102400){const n=BPe(e,t);return o=n,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(o))>r?HPe(e,t-1,r):n;var o}function jPe(e,t,r=1/0,n=1/0,o=function(){const e=new WeakSet;return[function(t){return!!e.has(t)||(e.add(t),!1)},function(t){e.delete(t)}]}()){const[i,s]=o;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=VPe(0,t);if(!a.startsWith("[object "))return a;if(function(e){return Boolean(e[uPe])}(t))return t;const l=function(e){const t=e[hPe];return"number"==typeof t?t:void 0}(t),c=void 0!==l?l:r;if(0===c)return a.replace("object ","");if(i(t))return"[Circular ~]";const d=t;if(d&&"function"==typeof d.toJSON)try{return jPe("",d.toJSON(),c-1,n,o)}catch{}const u=Array.isArray(t)?[]:{};let h=0;const p=OPe(t);for(const e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(h>=n){u[e]="[MaxProperties ~]";break}const t=p[e];u[e]=jPe(e,t,c-1,n,o),h++}return s(t),u}function VPe(e,t){try{if(FPe){const e=FPe(t);if(e)return e}if(void 0!==r.g&&t===r.g)return"[Global]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${MPe(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const e=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(t);return`[object ${e}]`}catch(e){return`**non-serializable** (${e})`}}function WPe(e){if(void 0!==UPe)return UPe?UPe(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),r=GRe;return t in r&&"function"==typeof r[t]?(UPe=r[t],UPe(e)):(UPe=null,e())}function KPe(){return WPe(()=>Math.random())}function qPe(){return WPe(()=>Date.now())}function GPe(e,t=[]){return[e,t]}function ZPe(e,t){const[r,n]=e;return[r,[...n,t]]}function YPe(e,t){const r=e[1];for(const e of r)if(t(e,e[0].type))return!0;return!1}function JPe(e){const t=YRe(GRe);return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}function QPe(e){const[t,r]=e;let n=JSON.stringify(t);function o(e){"string"==typeof n?n="string"==typeof e?n+e:[JPe(n),e]:n.push("string"==typeof e?JPe(e):e)}for(const e of r){const[t,r]=e;if(o(`\n${JSON.stringify(t)}\n`),"string"==typeof r||r instanceof Uint8Array)o(r);else{let e;try{e=JSON.stringify(r)}catch{e=JSON.stringify(BPe(r))}o(e)}}return"string"==typeof n?n:function(e){const t=e.reduce((e,t)=>
5991e+t.length,0),r=new Uint8Array(t);let n=0;for(const t of e)r.set(t,n),n+=t.length;return r}(n)}function XPe(e){const t="string"==typeof e.data?JPe(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const eDe={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function tDe(e){return function(e){return e in eDe}(e)?eDe[e]:e}function rDe(e){if(!e?.sdk)return;const{name:t,version:r}=e.sdk;return{name:t,version:r}}const nDe="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function oDe(e,t){let r;return YPe(e,(e,n)=>(t.includes(n)&&(r=Array.isArray(e)?e[1]:void 0),!!r)),r}function iDe(e){return new aDe(t=>{t(e)})}function sDe(e){return new aDe((t,r)=>{r(e)})}class aDe{constructor(e){this._state=0,this._handlers=[],this._runExecutor(e)}then(e,t){return new aDe((r,n)=>{this._handlers.push([!1,t=>{if(e)try{r(e(t))}catch(e){n(e)}else r(t)},e=>{if(t)try{r(t(e))}catch(e){n(e)}else n(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new aDe((t,r)=>{let n,o;return this.then(t=>{o=!1,n=t,e&&e()},t=>{o=!0,n=t,e&&e()}).then(()=>{o?r(n):t(n)})})}_executeHandlers(){if(0===this._state)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(1===this._state&&e[1](this._value),2===this._state&&e[2](this._value),e[0]=!0)})}_runExecutor(e){const t=(e,t)=>{0===this._state&&(kPe(t)?t.then(r,n):(this._state=e,this._value=t,this._executeHandlers()))},r=e=>{t(1,e)},n=e=>{t(2,e)};try{e(r,n)}catch(e){n(e)}}}function lDe(e){return"object"==typeof e&&"function"==typeof e.unref&&e.unref(),e}const cDe=Symbol.for("SentryBufferFullError");function dDe(e=100){const t=new Set;function r(e){t.delete(e)}return{get $(){return Array.from(t)},add:function(n){if(!(t.size<e))return sDe(cDe);const o=n();return t.add(o),o.then(()=>r(o),()=>r(o)),o},drain:function(e){if(!t.size)return iDe(!0);const r=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return r;const n=[r,new Promise(t=>lDe(setTimeout(()=>t(!1),e)))];return Promise.race(n)}}}function uDe(e,t,r=dDe(e.bufferSize||64)){let n={};return{send:function(o){const i=[];if(YPe(o,(t,r)=>{const o=tDe(r);!function(e,t,r=qPe()){return function(e,t){return e[t]||e.all||0}(e,t)>r}(n,o)?i.push(t):e.recordDroppedEvent("ratelimit_backoff",o)}),0===i.length)return Promise.resolve({});const s=GPe(o[0],i),a=t=>{!function(e,t){return YPe(e,(e,r)=>t.includes(r))}(s,["client_report"])?YPe(s,(r,n)=>{e.recordDroppedEvent(t,tDe(n))}):KRe&&oPe.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`)};return r.add(()=>t({body:QPe(s)}).then(e=>413===e.statusCode?(KRe&&oPe.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),a("send_error"),e):(KRe&&void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&oPe.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),n=function(e,{statusCode:t,headers:r},n=qPe()){const o={...e},i=r?.["x-sentry-rate-limits"],s=r?.["retry-after"];if(i)for(const e of i.trim().split(",")){const[t,r,,,i]=e.split(":",5),s=parseInt(t,10),a=1e3*(isNaN(s)?60:s);if(r)for(const e of r.split(";"))"metric_bucket"===e&&i&&!i.split(";").includes("custom")||(o[e]=n+a);else o.all=n+a}else s?o.all=n+function(e,t=qPe()){const r=parseInt(`${e}`,10);if(!isNaN(r))return 1e3*r;const n=Date.parse(`${e}`);return isNaN(n)?6e4:n-t}(s,n):429===t&&(o.all=n+6e4);return o}(n,e),e),e=>{throw a("network_error"),KRe&&oPe.error("Encountered error running transport request:",e),e})).then(e=>e,e=>{if(e===cDe)return KRe&&oPe.error("Skipped sending event because buffer is full."),a("queue_overflow"),Promise.resolve({});throw e})},flush:e=>r.drain(e)}}const hDe=GRe;function pDe(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}const gDe="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,fDe=GRe,mDe={};function vDe(e,t=function(e){const t=mDe[e];
5991if(t)return t;let r=fDe[e];if(pDe(r))return mDe[e]=r.bind(fDe);const n=fDe.document;if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o?.[e]&&(r=o[e]),n.head.removeChild(t)}catch(t){gDe&&oPe.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return r?mDe[e]=r.bind(fDe):r}("fetch")){let r=0,n=0;return uDe(e,async function(o){const i=o.body.length;r+=i,n++;const s={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:r<=6e4&&n<15,...e.fetchOptions};try{const r=await t(e.url,s);return{statusCode:r.status,headers:{"x-sentry-rate-limits":r.headers.get("X-Sentry-Rate-Limits"),"retry-after":r.headers.get("Retry-After")}}}catch(e){throw mDe.fetch=void 0,e}finally{r-=i,n--}},dDe(e.bufferSize||40))}const bDe=[];function yDe(e){const t=e.defaultIntegrations||[],r=e.integrations;let n;if(t.forEach(e=>{e.isDefaultInstance=!0}),Array.isArray(r))n=[...t,...r];else if("function"==typeof r){const e=r(t);n=Array.isArray(e)?e:[e]}else n=t;return function(e){const t={};return e.forEach(e=>{const{name:r}=e,n=t[r];n&&!n.isDefaultInstance&&e.isDefaultInstance||(t[r]=e)}),Object.values(t)}(n)}function wDe(e,t){for(const r of t)r?.afterAllSetup&&r.afterAllSetup(e)}function xDe(e,t,r){if(r[t.name])KRe&&oPe.log(`Integration skipped because it was already installed: ${t.name}`);else{if(r[t.name]=t,bDe.includes(t.name)||"function"!=typeof t.setupOnce||(t.setupOnce(),bDe.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,n)=>r(t,n,e))}if("function"==typeof t.processEvent){const r=t.processEvent.bind(t),n=Object.assign((t,n)=>r(t,n,e),{id:t.name});e.addEventProcessor(n)}["processSpan","processSegmentSpan"].forEach(r=>{const n=t[r];"function"==typeof n&&e.on(r,r=>n.call(t,r,e))}),KRe&&oPe.log(`Integration installed: ${t.name}`)}}let _De,kDe;function CDe(e=function(){const e=GRe;return e.crypto||e.msCrypto}()){try{if(e?.randomUUID)return WPe(()=>e.randomUUID()).replace(/-/g,"")}catch{}return _De||(_De="10000000100040008000100000000000"),_De.replace(/[018]/g,e=>(e^(16*KPe()&15)>>e/4).toString(16))}function SDe(e){return e.exception?.values?.[0]}function EDe(e){const{message:t,event_id:r}=e;if(t)return t;const n=SDe(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function IDe(e,t,r){const n=e.exception=e.exception||{},o=n.values=n.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=r||"Error")}function ADe(e,t){const r=SDe(e);if(!r)return;const n=r.mechanism;if(r.mechanism={type:"generic",handled:!0,...n,...t},t&&"data"in t){const e={...n?.data,...t.data};r.mechanism.data=e}}function TDe(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{IPe(e,"__sentry_captured__",!0)}catch{}return!1}function ODe(){return qPe()/1e3}function LDe(){return(kDe??(kDe=function(){const{performance:e}=GRe;if(!e?.now||!e.timeOrigin)return ODe;const t=e.timeOrigin;return()=>(t+WPe(()=>e.now()))/1e3}()))()}function $De(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||LDe(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:CDe()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function NDe(e,t,r=2){if(!t||"object"!=typeof t||r<=0)return t;if(e&&0===Object.keys(t).length)return e;const n={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=NDe(n[e],t[e],r-1));return n}function RDe(){return CDe()}function PDe(){return CDe().substring(16)}function DDe(e){if(e){if("object"==typeof e&&"deref"in e&&"function"==typeof e.deref)try{return e.deref()}catch{return}return e}}const MDe="_sentrySpan";function zDe(e,t){t?IPe(e,MDe,function(e){try{const t=GRe.WeakRef;if("function"==typeof t)return new t(e)}catch{}return e}(t)):delete e[MDe]}function FDe(e){return DDe(e[MDe])}function UDe(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function BDe(e,t){if(!Array.isArray(e))return"";const r=[];for(let t=0;t<e.length;t++){const n=e[t];
5991wPe(n)?r.push(String(n)):n instanceof Error?r.push(n.message?`${n.name}: ${n.message}`:n.name):r.push(VPe(0,n))}return r.join(t)}function HDe(e,t,r=!1){return!!bPe(e)&&(fPe(t,"RegExp")?t.test(e):bPe(t)?r?e===t:e.includes(t):"function"==typeof t&&t(e))}function jDe(e,t=[],r=!1){for(const n of t)if(HDe(e,n,r))return!0;return!1}class VDe{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:RDe(),sampleRand:KPe()}}clone(){const e=new VDe;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._attributes={...this._attributes},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,e._conversationId=this._conversationId,zDe(e,FDe(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&$De(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,r=t instanceof VDe?t.getScopeData():xPe(t)?e:void 0,{tags:n,attributes:o,extra:i,user:s,contexts:a,level:l,fingerprint:c=[],propagationContext:d,conversationId:u}=r||{};return this._tags={...this._tags,...n},this._attributes={...this._attributes,...o},this._extra={...this._extra,...i},this._contexts={...this._contexts,...a},s&&Object.keys(s).length&&(this._user=s),l&&(this._level=l),c.length&&(this._fingerprint=c),d&&(this._propagationContext=d),u&&(this._conversationId=u),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,zDe(this,void 0),this._attachments=[],this.setPropagationContext({traceId:RDe(),sampleRand:KPe()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const r="number"==typeof t?t:100;if(r<=0)return this;const n={timestamp:ODe(),...e,message:e.message?UDe(e.message,2048):e.message};return this._breadcrumbs.push(n),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:FDe(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=NDe(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const r=t?.event_id||CDe();if(!this._client)return KRe&&oPe.warn("No client configured on scope - will not capture exception!"),r;const n=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:n,...t,event_id:r},this),r}captureMessage(e,t,r){const n=r?.event_id||CDe();if(!this._client)return KRe&&oPe.warn("No client configured on scope - will not capture message!"),n;const o=r?.syntheticException??new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:o,...r,event_id:n},this),n}captureEvent(e,t){const r=e.event_id||t?.event_id||CDe();return this._client?(this._client.captureEvent(e,{...t,event_id:r},this),r):(KRe&&oPe.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEac
5991h(e=>{e(this)}),this._notifyingListeners=!1)}}const WDe=e=>e instanceof Promise&&!e[KDe],KDe=Symbol("chained PromiseLike");class qDe{constructor(e,t){let r,n;r=e||new VDe,n=t||new VDe,this._stack=[{scope:r}],this._isolationScope=n}withScope(e){const t=this._pushScope();let r;try{r=e(t)}catch(e){throw this._popScope(),e}return kPe(r)?((e,t,r)=>{const n=e.then(e=>(t(),e),e=>{throw r(),e});return WDe(n)&&WDe(e)?n:((e,t)=>{if(!t)return e;let r=!1;for(const n in e){if(n in t)continue;r=!0;const o=e[n];"function"==typeof o?Object.defineProperty(t,n,{value:(...t)=>o.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[n]=o}return r&&Object.assign(t,{[KDe]:!0}),t})(e,n)})(r,()=>this._popScope(),()=>this._popScope()):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1||!this._stack.pop())}}function GDe(){const e=YRe(ZRe());return e.stack=e.stack||new qDe(JRe("defaultCurrentScope",()=>new VDe),JRe("defaultIsolationScope",()=>new VDe))}function ZDe(e){return GDe().withScope(e)}function YDe(e,t){const r=GDe();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function JDe(e){return GDe().withScope(()=>e(GDe().getIsolationScope()))}function QDe(e){const t=YRe(e);return t.acs?t.acs:{withIsolationScope:JDe,withScope:ZDe,withSetScope:YDe,withSetIsolationScope:(e,t)=>JDe(t),getCurrentScope:()=>GDe().getScope(),getIsolationScope:()=>GDe().getIsolationScope()}}function XDe(){return QDe(ZRe()).getCurrentScope()}function eMe(){return QDe(ZRe()).getIsolationScope()}function tMe(){return XDe().getClient()}function rMe(e){const t=void 0;const r=e.getPropagationContext(),{traceId:n,parentSpanId:o,propagationSpanId:i}=r,s={trace_id:n,span_id:i||PDe()};return o&&(s.parent_span_id=o),s}const nMe="production";function oMe(e,t,r,n=0){try{const o=iMe(t,r,e,n);return kPe(o)?o:iDe(o)}catch(e){return sDe(e)}}function iMe(e,t,r,n){const o=r[n];if(!e||!o)return e;const i=o({...e},t);return KRe&&null===i&&oPe.log(`Event processor "${o.id||"?"}" dropped event`),kPe(i)?i.then(e=>iMe(e,t,r,n+1)):iMe(i,t,r,n+1)}let sMe,aMe,lMe,cMe;const dMe="sentry.profile_id",uMe="sentry.exclusive_time";function hMe(e){return e.split(",").map(e=>{const t=e.indexOf("=");return-1===t?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,r])=>(t&&r&&(e[t]=r),e),{})}function pMe(e,t){const{value:r,unit:n}="object"==typeof(o=e)&&null!=o&&!Array.isArray(o)&&Object.keys(o).includes("value")?e:{value:e,unit:void 0};var o;const i=function(e){if(Array.isArray(e))return{value:e,type:"array"};const t="string"==typeof e?"string":"boolean"==typeof e?"boolean":"number"!=typeof e||Number.isNaN(e)?null:Number.isInteger(e)?"integer":"double";return t?{value:e,type:t}:void 0}(r),s=n&&"string"==typeof n?{unit:n}:{};if(i)return{...i,...s};if(!t||"skip-undefined"===t&&void 0===r)return;let a="";try{a=JSON.stringify(r)??""}catch{}return{value:a,type:"string",...s}}function gMe(e,t=!1){const r={};for(const[n,o]of Object.entries(e??{})){const e=pMe(o,t);e&&(r[n]=e)}return r}function fMe(e){const t=e;return{scope:t._sentryScope,isolationScope:DDe(t._sentryIsolationScope)}}let mMe=!1;function vMe(e){const{spanId:t,traceId:r,isRemote:n}=e.spanContext(),o=n?t:xMe(e).parent_span_id,i=fMe(e).scope;return{parent_span_id:o,span_id:n?i?.getPropagationContext().propagationSpanId||PDe():t,trace_id:r}}function bMe(e){return e&&e.length>0?e.map(({context:{spanId:e,traceId:t,traceFlags:r,...n},attributes:o})=>({span_id:e,trace_id:t,sampled:1===r,attributes:o,...n})):void 0}function yMe(e){return"number"==typeof e?wMe(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?wMe(e.getTime()):LDe()}function wMe(e){return e>9999999999?e/1e3:e}function xMe(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();const{spanId:t,traceId:r}=e.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){const{attributes:n,startTime:o,name:i,endTime:s,status:a,links:l}=e;return{span_id:t,trace_id:r,data:n,description:i,parent_span_id:_Me(e),start_timestamp:yMe(o),timestamp:yMe(s)||void 0,status:kMe(a),op:n["sentry.op"],origin:n["sentry.origin"],links:bMe(l)}}return{span_id:t,trace_id:r,start_timestamp:0,data:{}}}function _Me(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function kMe(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"internal_error"}const CMe=function(e){return e._sentryRootSpan||e};function SMe(){mMe||(ePe(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),mMe=!0)}function EMe(e,t){const r=t.getOptions(),{publicKey:n}=t.getDsn()||{},o={environment:r.environment||nMe,release:r.release,public_key:n,trace_id:e,org_id:dPe(t)};return t.emit("createDsc",o),o}function IMe(e){const t=tMe();if(!t)return{};const r=CMe(e),n=xMe(r),o=n.data,i=r.spanContext().traceState,s=i?.get("sentry.sample_rate")??o["sentry.sample_rate"]??o["sentry.previous_trace_sample_rate"];function a(e){return"number"!=typeof s&&"string"!=typeof s||(e.sample_rate=`${s}`),e}const l=r._frozenDsc;if(l)return a(l);const c=i?.get("sentry.dsc"),d=c&&function(e){const t=function(e){if(e&&(bPe(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>
5991{const r=hMe(t);return Object.entries(r).forEach(([t,r])=>{e[t]=r}),e},{}):hMe(e)}(e);if(!t)return;const r=Object.entries(t).reduce((e,[t,r])=>(t.startsWith("sentry-")&&(e[t.slice(7)]=r),e),{});return Object.keys(r).length>0?r:void 0}(c);if(d)return a(d);const u=EMe(e.spanContext().traceId,t),h=o["sentry.source"]??o["sentry.span.source"],p=n.description;return"url"!==h&&p&&(u.transaction=p),function(){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const e=tMe()?.getOptions();return!(!e||null==e.tracesSampleRate&&!e.tracesSampler)}()&&(u.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return 1===t}(r)),u.sample_rand=i?.get("sentry.sample_rand")??fMe(r).scope?.getPropagationContext().sampleRand.toString()),a(u),t.emit("createDsc",u,r),u}function AMe(e,t){const{extra:r,tags:n,attributes:o,user:i,contexts:s,level:a,sdkProcessingMetadata:l,breadcrumbs:c,fingerprint:d,eventProcessors:u,attachments:h,propagationContext:p,transactionName:g,span:f}=t;TMe(e,"extra",r),TMe(e,"tags",n),TMe(e,"attributes",o),TMe(e,"user",i),TMe(e,"contexts",s),e.sdkProcessingMetadata=NDe(e.sdkProcessingMetadata,l,2),a&&(e.level=a),g&&(e.transactionName=g),f&&(e.span=f),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),d.length&&(e.fingerprint=[...e.fingerprint,...d]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),h.length&&(e.attachments=[...e.attachments,...h]),e.propagationContext={...e.propagationContext,...p}}function TMe(e,t,r){e[t]=NDe(e[t],r,1)}function OMe(e,t){const r=JRe("globalScope",()=>new VDe).getScopeData();return e&&AMe(r,e.getScopeData()),t&&AMe(r,t.getScopeData()),r}function LMe(e,t,r,n,o,i){const{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||r.event_id||CDe(),timestamp:t.timestamp||ODe()},c=r.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:r,release:n,dist:o,maxValueLength:i}=t;e.environment=e.environment||r||nMe,!e.release&&n&&(e.release=n),!e.dist&&o&&(e.dist=o);const s=e.request;s?.url&&i&&(s.url=UDe(s.url,i)),i&&e.exception?.values?.forEach(e=>{e.value&&(e.value=UDe(e.value,i))})}(l,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(l,c),o&&o.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const r=function(e){const t=GRe._sentryDebugIds,r=GRe._debugIds;if(!t&&!r)return{};const n=t?Object.keys(t):[],o=r?Object.keys(r):[];if(cMe&&n.length===aMe&&o.length===lMe)return cMe;aMe=n.length,lMe=o.length,cMe={},sMe||(sMe={});const i=(t,r)=>{for(const n of t){const t=r[n],o=sMe?.[n];if(o&&cMe&&t)cMe[o[0]]=t,sMe&&(sMe[n]=[o[0],t]);else if(t){const r=e(n);for(let e=r.length-1;e>=0;e--){const o=r[e],i=o?.filename;if(i&&cMe&&sMe){cMe[i]=t,sMe[n]=[i,t];break}}}}};return t&&i(n,t),r&&i(o,r),cMe}(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=r[e.filename])})})}(l,e.stackParser);const d=function(e,t){if(!t)return e;const r=e?e.clone():new VDe;return r.update(t),r}(n,r.captureContext);r.mechanism&&ADe(l,r.mechanism);const u=o?o.getEventProcessors():[],h=OMe(i,d),p=[...r.attachments||[],...h.attachments];p.length&&(r.attachments=p),function(e,t){const{fingerprint:r,span:n,breadcrumbs:o,sdkProcessingMetadata:i}=t;!function(e,t){const{extra:r,tags:n,user:o,contexts:i,level:s,transactionName:a}=t;Object.keys(r).length&&(e.extra={...r,...e.extra}),Object.keys(n).length&&(e.tags={...n,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(i).length&&(e.contexts={...i,...e.contexts}),s&&(e.level=s),a&&"transaction"!==e.type&&(e.transaction=a)}(e,t),n&&function(e,t){e.contexts={trace:vMe(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:IMe(t),...e.sdkProcessingMetadata};const r=xMe(CMe(t)).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,n),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}(e,r),function(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}(e,o),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,i)}(l,h);const g=[...u,...h.eventProcessors];return(r.data&&!0===r.data.__sentry__?iDe(l):oMe(g,l,r)).then(e=>(e&&function(e){const t={};
5991if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const r=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{r.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof s&&s>0?function(e,t,r){if(!e)return null;const n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:BPe(e.data,t,r)}}))},...e.user&&{user:BPe(e.user,t,r)},...e.contexts&&{contexts:BPe(e.contexts,t,r)},...e.extra&&{extra:BPe(e.extra,t,r)}};return e.contexts?.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=BPe(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(e=>({...e,...e.data&&{data:BPe(e.data,t,r)}}))),e.contexts?.flags&&n.contexts&&(n.contexts.flags=BPe(e.contexts.flags,3,r)),n}(e,s,a):e))}const $Me=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function NMe(e,t){return XDe().captureEvent(e,t)}function RMe(e){const t=eMe(),{user:r}=OMe(t,XDe()),{userAgent:n}=GRe.navigator||{},o=function(e){const t=LDe(),r={sid:CDe(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return{sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}(r)};return e&&$De(r,e),r}({user:r,...n&&{userAgent:n},...e}),i=t.getSession();return"ok"===i?.status&&$De(i,{status:"exited"}),PMe(),t.setSession(o),o}function PMe(){const e=eMe(),t=XDe().getSession()||e.getSession();t&&function(e){let t={};"ok"===e.status&&(t={status:"exited"}),$De(e,t)}(t),DMe(),e.setSession()}function DMe(){const e=eMe(),t=tMe(),r=e.getSession();r&&t&&t.captureSession(r)}function MMe(e=!1){e?PMe():DMe()}const zMe={},FMe={};function UMe(e,t){return zMe[e]=zMe[e]||[],zMe[e].push(t),()=>{const r=zMe[e];if(r){const e=r.indexOf(t);-1!==e&&r.splice(e,1)}}}function BMe(e,t){if(!FMe[e]){FMe[e]=!0;try{t()}catch(t){KRe&&oPe.error(`Error while instrumenting ${e}`,t)}}}function HMe(e,t){const r=e&&zMe[e];if(r)for(const n of r)try{n(t)}catch(t){KRe&&oPe.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${MPe(n)}\nError:`,t)}}let jMe;
5991function VMe(e){const t="history";UMe(t,e),BMe(t,WMe)}function WMe(){function e(e){return function(...t){const r=t.length>2?t[2]:void 0;if(r){const n=jMe,o=function(e){try{return new URL(e,fDe.location.origin).toString()}catch{return e}}(String(r));if(jMe=o,n===o)return e.apply(this,t);HMe("history",{from:n,to:o})}return e.apply(this,t)}}fDe.addEventListener("popstate",()=>{const e=fDe.location.href,t=jMe;jMe=e,t!==e&&HMe("history",{from:t,to:e})}),"history"in hDe&&hDe.history&&(EPe(fDe.history,"pushState",e),EPe(fDe.history,"replaceState",e))}const KMe="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,qMe=GRe;function GMe(){try{return qMe.document.location.href}catch{return""}}const ZMe=GRe;let YMe=0;function JMe(){return YMe>0}function QMe(e,t={}){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(TPe(e))return e}catch{return e}const r=function(...r){GRe._sentryWrappedDepth=(GRe._sentryWrappedDepth||0)+1;try{const n=r.map(e=>QMe(e,t));return e.apply(this,n)}catch(e){throw YMe++,setTimeout(()=>{YMe--}),function(...e){const t=QDe(ZRe());if(2===e.length){const[r,n]=e;return r?t.withSetScope(r,n):t.withScope(n)}t.withScope(e[0])}(n=>{var o;n.addEventProcessor(e=>(t.mechanism&&(IDe(e,void 0,void 0),ADe(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),o=e,XDe().captureException(o,function(e){if(e)return function(e){return e instanceof VDe||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>$Me.includes(e))}(e)?{captureContext:e}:e}(void 0))}),e}finally{GRe._sentryWrappedDepth=(GRe._sentryWrappedDepth||0)-1}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch{}APe(r,e),IPe(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function XMe(){const e=GMe(),{referrer:t}=ZMe.document||{},{userAgent:r}=ZMe.navigator||{};return{url:e,headers:{...t&&{Referer:t},...r&&{"User-Agent":r}}}}const eze=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(void 0===ZMe.document)return void(KMe&&oPe.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."));RMe({ignoreDuration:!0}),MMe();const e=eMe();let r=e.getUser();e.addScopeListener(e=>{const t=e.getUser();r?.id===t?.id&&r?.ip_address===t?.ip_address||(MMe(),r=t)}),"route"===t&&VMe(({from:e,to:t})=>{e!==t&&(RMe({ignoreDuration:!0}),MMe())})}}},tze="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),rze=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&EPe(ZMe,"setTimeout",nze),t.setInterval&&EPe(ZMe,"setInterval",nze),t.requestAnimationFrame&&EPe(ZMe,"requestAnimationFrame",oze),t.XMLHttpRequest&&"XMLHttpRequest"in ZMe&&EPe(XMLHttpRequest.prototype,"send",ize);const e=t.eventTarget;e&&(Array.isArray(e)?e:tze).forEach(e=>function(e,t){const r=ZMe,n=r[e]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(EPe(n,"addEventListener",function(r){return function(n,o,i){try{"function"==typeof o.handleEvent&&(o.handleEvent=QMe(o.handleEvent,{mechanism:{data:{handler:MPe(o),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&function(e,t,r){e&&"object"==typeof e&&"removeEventListener"in e&&"function"==typeof e.removeEventListener&&e.removeEventListener(t,r)}(this,n,o),r.apply(this,[n,QMe(o,{mechanism:{data:{handler:MPe(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),i])}}),EPe(n,"removeEventListener",function(e){return function(t,r,n){try{const o=r.__sentry_wrapped__;o&&e.call(this,t,o,n)}catch{}return e.call(this,t,r,n)}}))}(e,t))}}};function nze(e){return function(...t){const r=t[0];return t[0]=QMe(r,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${MPe(e)}`}}),e.apply(this,t)}}function oze(e){return function(t){return e.apply(this,[QMe(t,{mechanism:{data:{handler:MPe(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function ize(e){return function(...t){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e
5991=>{e in r&&"function"==typeof r[e]&&EPe(r,e,function(t){const r={mechanism:{data:{handler:MPe(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},n=TPe(t);return n&&(r.mechanism.data.handler=MPe(n)),QMe(t,r)})}),e.apply(this,t)}}const sze=new Map,aze=new Set;const lze=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",e=>{YPe(e,(e,t)=>{if("event"===t){const t=Array.isArray(e)?e[1]:void 0;t&&(function(e){e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{delete e.module_metadata})})}(t),e[1]=t)}})}),e.on("applyFrameMetadata",t=>{t.type||function(e,t){t.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(t=>{if(!t.filename||t.module_metadata)return;const r=function(e,t){return function(e){if(GRe._sentryModuleMetadata)for(const t of Object.keys(GRe._sentryModuleMetadata)){const r=GRe._sentryModuleMetadata[t];if(aze.has(t))continue;aze.add(t);const n=e(t);for(const e of n.reverse())if(e.filename){sze.set(e.filename,r);break}}}(e),sze.get(t)}(e,t.filename);r&&(t.module_metadata=r)})})}(e.getOptions().stackParser,t)})}});function cze(e){const t=[];e.message&&t.push(e.message);try{const r=e.exception.values[e.exception.values.length-1];r?.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`))}catch{}return t}const dze=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],uze=(e={})=>{let t;return{name:"EventFilters",setup(r){const n=r.getOptions();t=pze(e,n)},processEvent(r,n,o){if(!t){const r=o.getOptions();t=pze(e,r)}return function(e,t){if(e.type){if("transaction"===e.type&&function(e,t){if(!t?.length)return!1;const r=e.transaction;return!!r&&jDe(r,t)}(e,t.ignoreTransactions))return KRe&&oPe.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${EDe(e)}`),!0}else{if(function(e,t){return!!t?.length&&cze(e).some(e=>jDe(e,t))}(e,t.ignoreErrors))return KRe&&oPe.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${EDe(e)}`),!0;if(function(e){return!!e.exception?.values?.length&&(!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value))}(e))return KRe&&oPe.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${EDe(e)}`),!0;if(function(e,t){if(!t?.length)return!1;const r=gze(e);return!!r&&jDe(r,t)}(e,t.denyUrls))return KRe&&oPe.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${EDe(e)}.\nUrl: ${gze(e)}`),!0;if(!function(e,t){if(!t?.length)return!0;const r=gze(e);return!r||jDe(r,t)}(e,t.allowUrls))return KRe&&oPe.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${EDe(e)}.\nUrl: ${gze(e)}`),!0}return!1}(r,t)?null:r}}},hze=(e={})=>({...uze(e),name:"InboundFilters"});function pze(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:dze],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function gze(e){try{const t=[...e.exception?.values??[]].reverse().find(e=>void 0===e.mechanism?.parent_id&&e.stacktrace?.frames?.length),r=t?.stacktrace?.frames;return r?function(e=[]){for(let t=e.length-1;t>=0;t--){const r=e[t];if(r&&"<anonymous>"!==r.filename&&"[native code]"!==r.filename)return r.filename||null}return null}(r):null}catch{return KRe&&oPe.error(`Cannot extract url for event ${EDe(e)}`),null}}let fze;const mze=new WeakMap,vze=()=>({name:"FunctionToString",setupOnce(){fze=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=TPe(this),r=mze.has(tMe())&&void 0!==t?t:this;return fze.apply(r,e)}}catch{}},setup(e){mze.set(e,!0)}}),bze=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){return!!t&&(!!function(e,t){const r=e.message,n=t.message;return!(!r&&!n)&&(!(r&&!n||!r&&n)&&(r===n&&(!!wze(e,t)&&!!yze(e,t))))}(e,t)||!!function(e,t){const r=xze(t),n=xze(e);return!(!r||!n)&&(r.type===n.type&&r.value===n.value&&(!!wze(e,t)&&!!yze(e,t)))}(e,t))}(t,e))return KRe&&oPe.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function yze(e,t){let r=zPe(e),n=zPe(t);if(!r&&!n)return!0;
5991if(r&&!n||!r&&n)return!1;if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++){const t=n[e],o=r[e];if(t.filename!==o.filename||t.lineno!==o.lineno||t.colno!==o.colno||t.function!==o.function)return!1}return!0}function wze(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;try{return!(r.join("")!==n.join(""))}catch{return!1}}function xze(e){return e.exception?.values?.[0]}function _ze(){return"undefined"!=typeof window&&(!(("undefined"==typeof __SENTRY_BROWSER_BUNDLE__||!__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0))||function(){const e=GRe.process;return"renderer"===e?.type}())}function kze(e,t){const r=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,..._ze()&&{ingest_settings:{infer_ip:r,infer_user_agent:r}},items:e}]}function Cze(e,t){const r=t??function(e){return Sze().get(e)}(e)??[];if(0===r.length)return;const n=e.getOptions(),o=function(e,t,r,n,o){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),r&&n&&(i.dsn=aPe(n)),GPe(i,[kze(e,o)])}(r,n._metadata,n.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Sze().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function Sze(){return JRe("clientToLogBufferMap",()=>new WeakMap)}function Eze(e,t){const r=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,..._ze()&&{ingest_settings:{infer_ip:r,infer_user_agent:r}},items:e}]}function Ize(e,t){const r=t??function(e){return Aze().get(e)}(e)??[];if(0===r.length)return;const n=e.getOptions(),o=function(e,t,r,n,o){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),r&&n&&(i.dsn=aPe(n)),GPe(i,[Eze(e,o)])}(r,n._metadata,n.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Aze().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function Aze(){return JRe("clientToMetricBufferMap",()=>new WeakMap)}function Tze(e){return t={trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||"",start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:e.status&&"ok"!==e.status&&"cancelled"!==e.status?"error":"ok",is_segment:!1,attributes:{...e.data},links:e.links},{...t,attributes:gMe(t.attributes),links:t.links?.map(e=>({...e,attributes:gMe(e.attributes)}))};var t}function Oze(e){oPe.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Lze(e,t){if(!t?.length)return!1;for(const r of t){if(Nze(r)){if(e.description&&HDe(e.description,r))return KRe&&Oze(e),!0;continue}const t=!!r.attributes&&Object.keys(r.attributes).length>0;if(!r.name&&!r.op&&!t)continue;const n=!r.name||e.description&&HDe(e.description,r.name),o=!r.op||e.op&&HDe(e.op,r.op),i=!r.attributes||Object.entries(r.attributes).every(([t,r])=>{return n=e.attributes?.[t],o=r,"string"==typeof n&&("string"==typeof o||o instanceof RegExp)?HDe(n,o):Array.isArray(n)&&Array.isArray(o)?n.length===o.length&&n.every((e,t)=>e===o[t]):n===o;var n,o});if(n&&o&&i)return KRe&&Oze(e),!0}return!1}function $ze(e,t){const r=t.parent_span_id,n=t.span_id;if(r)for(const t of e)t.parent_span_id===n&&(t.parent_span_id=r)}function Nze(e){return"string"==typeof e||e instanceof RegExp}const Rze=["forwarded","-ip","remote-","via","-user"],Pze={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5};const Dze="Not capturing exception because it's already been captured.",Mze="Discarded session because of missing or non-string release",zze=Symbol.for("SentryInternalError"),Fze=Symbol.for("SentryDoNotSendEventError");function Uze(e){return{message:e,[zze]:!0}}function Bze(e){return{message:e,[Fze]:!0}}function Hze(e){return!!e&&"object"==typeof e&&zze in e}function jze(e){return!!e&&"object"==typeof e&&Fze in e}function Vze(e,t,r,n,o){let i,s=0,a=!1;e.on(r,()=>{s=0,clearTimeout(i),a=!1}),e.on(t,t=>{if(s+=n(t),s>=8e5)o(e);else if(!a){const t=e.getOptions()._flushInterval??5e3;t>0&&(a=!0,i=lDe(setTimeout(()=>{o(e)},t)))}}),e.on("flush",()=>{o(e)})}class Wze{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=dDe(e.transportOptions?.bufferSize??64),this._dataCollection=function(e){const t=null!=e.dataCollection?Pze:!0===e.sendDefaultPii?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],queryParams:!0,genAI:{inputs:!0,outputs:!0}
5991,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:Rze},httpHeaders:{request:{deny:Rze},response:{deny:Rze}},httpBodies:[],queryParams:{deny:Rze},genAI:{inputs:!1,outputs:!1},stackFrameVariables:!0,frameContextLines:7},r=e.dataCollection??{};return{userInfo:r.userInfo??t.userInfo,cookies:r.cookies??t.cookies,httpHeaders:{request:r.httpHeaders?.request??t.httpHeaders.request,response:r.httpHeaders?.response??t.httpHeaders.response},httpBodies:r.httpBodies??t.httpBodies,queryParams:r.queryParams??t.queryParams,genAI:{inputs:r.genAI?.inputs??t.genAI.inputs,outputs:r.genAI?.outputs??t.genAI.outputs},stackFrameVariables:r.stackFrameVariables??t.stackFrameVariables,frameContextLines:r.frameContextLines??t.frameContextLines}}(e),e.dsn?this._dsn=function(e){const t="string"==typeof e?lPe(e):cPe(e);if(t&&function(e){if(!KRe)return!0;const{port:t,projectId:r,protocol:n}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(oPe.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(r.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(n)?t&&isNaN(parseInt(t,10))&&(oPe.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(oPe.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),1):(oPe.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),1)))}(t))return t}(e.dsn):KRe&&oPe.warn("No DSN provided, client will not send events."),this._dsn){const t=WRe(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&Vze(this,"afterCaptureLog","flushLogs",Yze,Cze),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Vze(this,"afterCaptureMetric","flushMetrics",Zze,Ize)}captureException(e,t,r){const n=CDe();if(TDe(e))return KRe&&oPe.log(Dze),n;const o={event_id:n,...t};return this._process(()=>this.eventFromException(e,o).then(e=>this._captureEvent(e,o,r)).then(e=>e),"error"),o.event_id}captureMessage(e,t,r,n){const o={event_id:CDe(),...r},i=yPe(e)?e:String(e),s=wPe(e),a=s?this.eventFromMessage(i,t,o):this.eventFromException(e,o);return this._process(()=>a.then(e=>this._captureEvent(e,o,n)),s?"unknown":"error"),o.event_id}captureEvent(e,t,r){const n=CDe();if(t?.originalException&&TDe(t.originalException))return KRe&&oPe.log(Dze),n;const o={event_id:n,...t},i=e.sdkProcessingMetadata||{},s=i.capturedSpanScope,a=i.capturedSpanIsolationScope,l=Kze(e.type);return this._process(()=>this._captureEvent(e,o,s||r,a),l),o.event_id}captureSession(e){this.sendSession(e),$De(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){const t=this._transport;if(this.emit("flush"),!t)return!0;const r=await this._isClientDoneProcessing(e),n=await t.flush(e);return r&&n}async close(e){Cze(this);const t=await this.flush(e);return this.getOptions().enabled=!1,this.emit("close"),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){const t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),xDe(this,e,this._integrations),t||wDe(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);const r=function(e,t){if("transaction"!==e.type||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!t.getOptions().streamGenAiSpans||function(e){return"stream"===e.getOptions().traceLifecycle}(t))return;const r=[],n=[];for(const t of e.spans)t.op?.startsWith("gen_ai.")?r.push(Tze(t)):n.push(t);if(0===r.length)return;e.spans=n;const o=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:r.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,..._ze()&&{ingest_settings:{infer_ip:o,infer_user_agent:o}},items:r}]}(e,this);let n=function(e,t,r,n){const o=rDe(r),i=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){if(!t)return e;const r=e.sdk||{};e.sdk={...r,name:r.name||t.name,version:r.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0}}(e,r?.sdk);const s=function(e,t,r,n){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(qPe()).toISOString(),...t&&{sdk:t},...!!r&&n&&{dsn:aPe(n)},...o&&{trace:o}}}(e,o,n,t);return delete e.sdkProcessingMetadata,GPe(s,[[{type:i},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=ZPe(n,XPe(e));r&&(n=ZPe(n,r)),this.sendEnvelope(n).then(t=>
5991this.emit("afterSendEvent",e,t))}sendSession(e){const{release:t,environment:r=nMe}=this._options;if("aggregates"in e){const n=e.attrs||{};if(!n.release&&!t)return void(KRe&&oPe.warn(Mze));n.release=n.release||t,n.environment=n.environment||r,e.attrs=n}else{if(!e.release&&!t)return void(KRe&&oPe.warn(Mze));e.release=e.release||t,e.environment=e.environment||r}this.emit("beforeSendSession",e);const n=function(e,t,r,n){const o=rDe(r);return GPe({sent_at:new Date(qPe()).toISOString(),...o&&{sdk:o},...!!n&&t&&{dsn:aPe(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(e,t,r=1){if(this._options.sendClientReports){const n=`${e}:${t}`;KRe&&oPe.log(`Recording outcome: "${n}"${r>1?` (${r} times)`:""}`),this._outcomes[n]=(this._outcomes[n]||0)+r}}on(e,t){const r=this._hooks[e]=this._hooks[e]||new Set,n=(...e)=>t(...e);return r.add(n),()=>{r.delete(n)}}emit(e,...t){const r=this._hooks[e];r&&r.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(e){return KRe&&oPe.error("Error while sending envelope:",e),{}}return KRe&&oPe.error("Transport disabled"),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const r={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&xDe(e,t,r)}),r}(this,e),wDe(this,e)}_updateSessionFromEvent(e,t){let r="fatal"===t.level,n=!1;const o=t.exception?.values;if(o){n=!0,r=!1;for(const e of o)if(!1===e.mechanism?.handled){r=!0;break}}const i="ok"===e.status;(i&&0===e.errors||i&&r)&&($De(e,{...r&&{status:"crashed"},errors:e.errors||Number(n||r)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,r,n){const o=this.getOptions(),i=this.getIntegrationNames();return!t.integrations&&i.length&&(t.integrations=i),this.emit("preprocessEvent",e,t),e.type||n.setLastEventId(e.event_id||t.event_id),LMe(o,e,t,r,this,n).then(e=>{if(null===e)return e;this.emit("postprocessEvent",e,t),e.contexts={trace:{...e.contexts?.trace,...rMe(r)},...e.contexts};const n=function(e,t){const r=t.getPropagationContext();return r.dsc||EMe(r.traceId,e)}(this,r);return e.sdkProcessingMetadata={dynamicSamplingContext:n,...e.sdkProcessingMetadata},e})}_captureEvent(e,t={},r=XDe(),n=eMe()){return KRe&&qze(e)&&oPe.log(`Captured error event \`${cze(e)[0]||"<unknown>"}\``),this._processEvent(e,t,r,n).then(e=>e.event_id,e=>{KRe&&(jze(e)?oPe.log(e.message):Hze(e)?oPe.warn(e.message):oPe.warn(e))})}_processEvent(e,t,r,n){const o=this.getOptions(),{sampleRate:i}=o,s=Gze(e),a=qze(e),l=`before send for type \`${e.type||"error"}\``,c=void 0===i?void 0:function(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}(i);if(a&&"number"==typeof c&&KPe()>c)return this.recordDroppedEvent("sample_rate","error"),sDe(Bze(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));const d=Kze(e.type);return this._prepareEvent(e,t,r,n).then(e=>{if(null===e)throw this.recordDroppedEvent("event_processor",d),Bze("An event processor returned `null`, will not send event.");if(!0===t.data?.__sentry__)return e;const r=function(e,t,r,n){const{beforeSend:o,beforeSendTransaction:i,ignoreSpans:s}=t,a=!((l=t.beforeSendSpan)&&"function"==typeof l&&"_streamed"in l&&l._streamed)&&t.beforeSendSpan;var l;let c=r;if(qze(c)&&o)return o(c,n);if(Gze(c)){if(a||s){const t=function(e){const{trace_id:t,parent_span_id:r,span_id:n,status:o,origin:i,data:s,op:a}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:a,parent_span_id:r,span_id:n??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:s?.[dMe],exclusive_time:s?.[uMe],measurements:e.measurements,is_segment:!0}}(c);if(s?.length&&Lze({description:t.description,op:t.op,attributes:t.data},s))return null;if(a){const e=a(t);e?c=NDe(r,{type:"transaction",timestamp:(d=e).timestamp,start_timestamp:d.start_timestamp,transaction:d.description,contexts:{trace:{trace_id:d.trace_id,span_id:d.span_id,parent_span_id:d.parent_span_id,op:d.op,status:d.status,origin:d.origin,data:{...d.data,...d.profile_id&&{[dMe]:d.profile_id},...d.exclusive_time&&{[uMe]:d.exclusive_time}}}},measurements:d.measurements}):SMe()}if(c.spans){const t=[],r=c.spans;for(const e of r)if(s?.length&&Lze({description:e.description,op:e.op,attributes:e.data},s))$ze(r,e);else if(a){const r=a(e);r?t.push(r):(SMe(),t.push(e))}else t.push(e);const n=c.spans.length-t.length;n&&e.recordDroppedEvent("before_send","span",n),c.spans=t}}if(i){if(c.spans){const e=c.spans.length;c.sdkProcessingMetadata={...r.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return i(c,n)}}var d;return c}(this,o,e,t);return function(e,t){const r=`${t} must return \`null\` or a valid event.`;if(kPe(e))return e.then(e=>{if(!xPe(e)&&null!==e)throw Uze(r);return e},e=>{throw Uze(`${t} rejected with ${e}`)});if(!xPe(e)&&null!==e)throw Uze(r);return e}(r,l)}).then(o=>{if(null===o){if(this.recordDroppedEvent("before_send",d),s){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw Bze(`${l} returned \`null\`, will not send event.`)}const i=r.getSession()||n.getSession();if(a&&i&&this._updateSessionFromEvent(i,o),s){const e=(o.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(o.spans?o.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const c=o.transaction_info;if(s&&c&&o.transaction!==e.transaction){const e="custom";o.transaction_info={...c,source:e}}return this.sendEvent(o,t),o}).then(null,e=>{if(jze(e)||Hze(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),Uze(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===cDe&&this.recordDroppedEvent("queue_overflow",t),e))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{const[r,n]=e.split(":");return{reason:r,category:n,quantity:t}})}_flushOutcomes(){KRe&&oPe.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(KRe&&oPe.log("No outcomes to send"));if(!this._dsn)return void(KRe&&oPe.log("No dsn provided, will not send outcomes"));KRe&&oPe.log("Sending outcomes:",e);const t=(r=e,GPe((n=this._options.tunnel&&aPe(this._dsn))?{dsn:n}:{},[[{type:"client_report"},{timestamp:ODe(),discarded_events:r}]]));var r,n;this.sendEnvelope(t)}}function Kze(e){return"replay_event"===e?"replay":e||"error"}function qze(e){return void 0===e.type}function Gze(e){return"transaction"===e.type}function Zze(e){let t=0;return e.name&&(t+=2*e.name.length),t+=8,t+Jze(e.attributes)}function Yze(e){let t=0;return e.message&&(t+=2*e.message.length),t+Jze(e.attributes)}function Jze(e){if(!e)return 0;let t=0;
5991return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*Qze(e[0]):wPe(e)?t+=Qze(e):t+=100}),t}function Qze(e){return"string"==typeof e?2*e.length:"number"==typeof e?8:"boolean"==typeof e?4:0}function Xze(e){"aggregates"in e?void 0===e.attrs?.ip_address&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}function eFe(e){return function(e){return gPe(e)&&"__sentry_fetch_url_host__"in e&&"string"==typeof e.__sentry_fetch_url_host__}(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function tFe(e,t){const r=nFe(e,t),n={type:sFe(t),value:aFe(t)};return r.length&&(n.stacktrace={frames:r}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function rFe(e,t){return{exception:{values:[tFe(e,t)]}}}function nFe(e,t){const r=t.stacktrace||t.stack||"",n=function(e){return e&&oFe.test(e.message)?1:0}(t),o=function(e){return"number"==typeof e.framesToPop?e.framesToPop:0}(t);try{return e(r,n,o)}catch{}return[]}const oFe=/Minified React error #\d+;/i;function iFe(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function sFe(e){const t=e?.name;return!t&&iFe(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}function aFe(e){const t=e?.message;return iFe(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?eFe(t.error):eFe(e):"No error message"}function lFe(e,t,r,n,o){let i;if(mPe(t)&&t.error)return rFe(e,t.error);if(vPe(t)||fPe(t,"DOMException")){const o=t;if("stack"in t){i=rFe(e,t);const o=i.exception?.values?.[0];if(n&&r&&o&&!o.stacktrace){const t=nFe(e,r);t.length&&(o.stacktrace={frames:t},ADe(i,{synthetic:!0}))}}else{const t=o.name||(vPe(o)?"DOMError":"DOMException"),s=o.message?`${t}: ${o.message}`:t;i=cFe(e,s,r,n),IDe(i,s)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return gPe(t)?rFe(e,t):xPe(t)||_Pe(t)?(i=function(e,t,r,n){const o=tMe(),i=o?.getOptions().normalizeDepth,s=(a=t,Object.values(a).find(e=>e instanceof Error));var a;const l={__serialized__:HPe(t,i)};if(s)return{exception:{values:[tFe(e,s)]},extra:l};const c={exception:{values:[{type:_Pe(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:dFe(t,{isUnhandledRejection:n})}]},extra:l};if(r){const t=nFe(e,r);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}(e,t,r,o),ADe(i,{synthetic:!0}),i):(i=cFe(e,t,r,n),IDe(i,`${t}`,void 0),ADe(i,{synthetic:!0}),i)}function cFe(e,t,r,n){const o={};if(n&&r){const n=nFe(e,r);n.length&&(o.exception={values:[{value:t,stacktrace:{frames:n}}]}),ADe(o,{synthetic:!0})}if(yPe(t)){const{__sentry_template_string__:e,__sentry_template_values__:r}=t;return o.logentry={message:e,params:r},o}return o.message=t,o}function dFe(e,{isUnhandledRejection:t}){const r=function(e){const t=Object.keys(OPe(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}(e),n=t?"promise rejection":"exception";return mPe(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:_Pe(e)?`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}class uFe extends Wze{constructor(e){const t=(r=e,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:ZMe.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...r});var r;!function(e,t,r=[t],n="npm"){const o=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};o.name||(o.name=`sentry.javascript.${t}`,o.packages=r.map(e=>({name:`${n}:@sentry/${e}`,version:qRe})),o.version=qRe)}(t,"browser",["browser"],ZMe.SENTRY_SDK_SOURCE||"npm"),super(t);const{userInfo:n}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:n?"auto":"never",...t._metadata.sdk.settings});const{sendClientReports:o,enableLogs:i,_experiments:s,enableMetrics:a}=this._options,l=a??s?.enableMetrics??!0;ZMe.document&&(o||i||l)&&ZMe.document.addEventListener("visibilitychange",()=>{"hidden"===ZMe.document.visibilityState&&(o&&this._flushOutcomes(),i&&Cze(this),l&&Ize(this))}),n&&this.on("beforeSendSession",Xze)}eventFromException(e,t){return function(e,t,r,n){const o=lFe(e,t,r?.syntheticException||void 0,n);return ADe(o),o.level="error",r?.event_id&&(o.event_id=r.event_id),iDe(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",r){return function(e,t,r="info",n,o){const i=cFe(e,t,n?.syntheticException||void 0,o);return i.level=r,n?.event_id&&(i.event_id=n.event_id),iDe(i)}(this._options.stackParser,e,t,r,this._options.attachStacktrace)}_prepareEvent(e,t,r,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,r,n)}}const hFe=new Set([]);function pFe(){"console"in GRe&&QRe.forEach(function(e){e in GRe.console&&EPe(GRe.console,e,function(t){return XRe[e]=t,function(...t){const r=t[0],n=XRe[e],o=hFe.size&&"string"==typeof r&&jDe(r,hFe);
5991o||HMe("console",{args:t,level:e}),(!o||KRe&&oPe.isEnabled())&&n?.apply(GRe.console,t)}})})}function gFe(e,t=!1){t&&!function(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in hDe))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}())return!1;if(pDe(hDe.fetch))return!0;let e=!1;const t=hDe.document;if(t&&"function"==typeof t.createElement)try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow?.fetch&&(e=pDe(r.contentWindow.fetch)),t.head.removeChild(r)}catch(e){KRe&&oPe.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}()||EPe(GRe,"fetch",function(t){return function(...r){const n=new Error,{method:o,url:i}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,r]=e;return{url:mFe(t),method:fFe(r,"method")?String(r.method).toUpperCase():SPe(t)&&fFe(t,"method")?String(t.method).toUpperCase():"GET"}}const t=e[0];return{url:mFe(t),method:fFe(t,"method")?String(t.method).toUpperCase():"GET"}}(r),s={args:r,fetchData:{method:o,url:i},startTimestamp:1e3*LDe(),virtualError:n,headers:vFe(r)};return e||HMe("fetch",{...s}),t.apply(GRe,r).then(async t=>(e?e(t):HMe("fetch",{...s,endTimestamp:1e3*LDe(),response:t}),t),e=>{HMe("fetch",{...s,endTimestamp:1e3*LDe(),error:e}),gPe(e)&&void 0===e.stack&&(e.stack=n.stack,IPe(e,"framesToPop",1));const t=tMe(),r=t?.getOptions().enhanceFetchErrorMessages??"always";if(!1!==r&&e instanceof TypeError&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{const t=new URL(s.fetchData.url).host;"always"===r?e.message=`${e.message} (${t})`:IPe(e,"__sentry_fetch_url_host__",t)}catch{}throw e})}})}function fFe(e,t){return!!e&&"object"==typeof e&&!!e[t]}function mFe(e){return"string"==typeof e?e:e?fFe(e,"url")?e.url:e.toString?e.toString():"":""}function vFe(e){const[t,r]=e;try{if("object"==typeof r&&null!==r&&"headers"in r&&r.headers)return new Headers(r.headers);if(SPe(t))return new Headers(t.headers)}catch{}}const bFe=100;function yFe(e,t){const r=tMe(),n=eMe();if(!r)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=bFe}=r.getOptions();if(i<=0)return;const s={timestamp:ODe(),...e},a=o?ePe(()=>o(s,t)):s;null!==a&&(r.emit&&r.emit("beforeAddBreadcrumb",a,t),n.addBreadcrumb(a,i))}function wFe(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}function xFe(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:n,relative:t[5]+r+n}}let _Fe,kFe,CFe;function SFe(){if(!fDe.document)return;const e=HMe.bind(null,"dom"),t=EFe(e,!0);fDe.document.addEventListener("click",t,!1),fDe.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const r=fDe,n=r[t]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(EPe(n,"addEventListener",function(t){return function(r,n,o){if("click"===r||"keypress"==r)try{const n=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},i=n[r]=n[r]||{refCount:0};if(!i.handler){const n=EFe(e);i.handler=n,t.call(this,r,n,o)}i.refCount++}catch{}return t.call(this,r,n,o)}}),EPe(n,"removeEventListener",function(e){return function(t,r,n){if("click"===t||"keypress"==t)try{const r=this.__sentry_instrumentation_handlers__||{},o=r[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,n),o.handler=void 0,delete r[t]),0===Object.keys(r).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,r,n)}}))})}function EFe(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;const n=function(e){try{return e.target}catch{return null}}(r);if(function(e,t){return"keypress"===e&&(!t?.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(r.type,n))return;IPe(r,"_sentryCaptured",!0),n&&!n._sentryId&&IPe(n,"_sentryId",CDe());const o="keypress"===r.type?"input":r.type;(function(e){if(e.type!==kFe)return!1;try{if(!e.target||e.target._sentryId!==CFe)return!1}catch{}return!0})(r)||(e({event:r,name:o,global:t}),kFe=r.type,CFe=n?n._sentryId:void 0),clearTimeout(_Fe),_Fe=fDe.setTimeout(()=>{CFe=void 0,kFe=void 0},1e3)}}const IFe="__sentry_xhr_v3__";function AFe(){if(!fDe.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,r){const n=new Error,o=1e3*LDe(),i=bPe(r[0])?r[0].toUpperCase():void 0,s=function(e){if(bPe(e))return e;try{return e.toString()}catch{}}(r[1]);if(!i||!s)return e.apply(t,r);t[IFe]={method:i,url:s,request_headers:{}}
5991,"POST"===i&&s.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[IFe];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}HMe("xhr",{endTimestamp:1e3*LDe(),startTimestamp:o,xhr:t,virtualError:n})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,r){return a(),e.apply(t,r)}}):t.addEventListener("readystatechange",a),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,r){const[n,o]=r,i=t[IFe];return i&&bPe(n)&&bPe(o)&&(i.request_headers[n.toLowerCase()]=o),e.apply(t,r)}}),e.apply(t,r)}}),e.send=new Proxy(e.send,{apply(e,t,r){const n=t[IFe];return n?(void 0!==r[0]&&(n.body=r[0]),HMe("xhr",{startTimestamp:1e3*LDe(),xhr:t}),e.apply(t,r)):e.apply(t,r)}})}function TFe(e,t={}){if(!e)return"<unknown>";try{let r=e;const n=5,o=[];let i=0,s=0;const a=" > ",l=a.length;let c;const d=Array.isArray(t)?t:t.keyAttrs,u=!Array.isArray(t)&&t.maxStringLength||80;for(;r&&i++<n&&(c=OFe(r,d),!("html"===c||i>1&&s+o.length*l+c.length>=u));)o.push(c),s+=c.length,r=r.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function OFe(e,t){const r=e,n=[];if(!r?.tagName)return"";if("undefined"!=typeof HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}n.push(r.tagName.toLowerCase());const o=t?.length?t.filter(e=>r.getAttribute(e)).map(e=>[e,r.getAttribute(e)]):null;if(o?.length)o.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{r.id&&n.push(`#${r.id}`);const e=r.className;if(e&&bPe(e)){const t=e.split(/\s+/);for(const e of t)n.push(`.${e}`)}}for(const e of["aria-label","type","name","title","alt"]){const t=r.getAttribute(e);t&&n.push(`[${e}="${t}"]`)}return n.join("")}const LFe=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var r;t.console&&function(e){const t="console";
5991UMe(t,e);BMe(t,pFe)}(function(e){return function(t){if(tMe()!==e)return;const r={category:"console",data:{arguments:t.args,logger:"console"},level:(n=t.level,"warn"===n?"warning":["fatal","error","warning","log","info","debug"].includes(n)?n:"log"),message:BDe(t.args," ")};var n;if("assert"===t.level){if(!1!==t.args[0])return;r.message=`Assertion failed: ${BDe(t.args.slice(1)," ")||"console.assert"}`,r.data.arguments=t.args.slice(1)}yFe(r,{input:t.args,level:t.level})}}(e)),t.dom&&(r=function(e,t){return function(r){if(tMe()!==e)return;let n,o,i="object"==typeof t?t.serializeAttribute:void 0,s="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;s&&s>1024&&(KMe&&oPe.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${s} was configured. Sentry will use 1024 instead.`),s=1024),"string"==typeof i&&(i=[i]);try{const e=r.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;n=TFe(t,{keyAttrs:i,maxStringLength:s}),o=function(e,t=5){if(!qMe.HTMLElement)return null;let r=e;for(let e=0;e<t;e++){if(!r)return null;if(r instanceof HTMLElement){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}r=r.parentNode}return null}(t)}catch{n="<unknown>"}if(0===n.length)return;const a={category:`ui.${r.name}`,message:n};o&&(a.data={"ui.component_name":o}),yFe(a,{event:r.event,name:r.name,global:r.global})}}(e,t.dom),UMe("dom",r),BMe("dom",SFe)),t.xhr&&function(e){UMe("xhr",e),BMe("xhr",AFe)}(function(e){return function(t){if(tMe()!==e)return;const{startTimestamp:r,endTimestamp:n}=t,o=t.xhr[IFe];if(!r||!n||!o)return;const{method:i,url:s,status_code:a,body:l}=o,c={method:i,url:s,status_code:a},d={xhr:t.xhr,input:l,startTimestamp:r,endTimestamp:n},u={category:"xhr",data:c,type:"http",level:wFe(a)};e.emit("beforeOutgoingRequestBreadcrumb",u,d),yFe(u,d)}}(e)),t.fetch&&function(e){const t="fetch";UMe(t,e);BMe(t,()=>gFe(void 0,void 0))}(function(e){return function(t){if(tMe()!==e)return;const{startTimestamp:r,endTimestamp:n}=t;if(n&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){const o={data:t.error,input:t.args,startTimestamp:r,endTimestamp:n},i={category:"fetch",data:t.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",i,o),yFe(i,o)}else{const o=t.response,i={...t.fetchData,status_code:o?.status},s={input:t.args,response:o,startTimestamp:r,endTimestamp:n},a={category:"fetch",data:i,type:"http",level:wFe(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",a,s),yFe(a,s)}}}(e)),t.history&&VMe(function(e){return function(t){if(tMe()!==e)return;let r=t.from,n=t.to;const o=xFe(ZMe.location.href);let i=r?xFe(r):void 0;const s=xFe(n);i?.path||(i=o),o.protocol===s.protocol&&o.host===s.host&&(n=s.relative),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),yFe({category:"navigation",data:{from:r,to:n}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){tMe()===e&&yFe({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:EDe(t)},{event:t})}}(e))}}};function $Fe(e,t){const r=e.attributes??(e.attributes={});Object.entries(t).forEach(([e,t])=>{null==t||e in r||(r[e]=t)})}function NFe(){try{const e=ZMe.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}let RFe=null;function PFe(){RFe=GRe.onerror,GRe.onerror=function(e,t,r,n,o){return HMe("error",{column:n,error:o,line:r,msg:e,url:t}),!!RFe&&RFe.apply(this,arguments)},GRe.onerror.__SENTRY_INSTRUMENTED__=!0}let DFe=null;function MFe(){DFe=GRe.onunhandledrejection,GRe.onunhandledrejection=function(e){return HMe("unhandledrejection",e),!DFe||DFe.apply(this,arguments)},GRe.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const zFe=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(function(e){!function(){const t="error";UMe(t,t=>{const{stackParser:r,attachStacktrace:n}=UFe();if(tMe()!==e||JMe())return;const{msg:o,url:i,line:s,column:a,error:l}=t,c=function(e,t,r,n){const o=e.exception=e.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},l=a.frames=a.frames||[];return 0===l.length&&l.push({colno:n,lineno:r,filename:BFe(t)??GMe(),function:"?",in_app:!0}),e}(lFe(r,l||o,void 0,n,!1),i,s,a);c.level="error",NMe(c,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})}),BMe(t,PFe)}()}(e),FFe("onerror")),t.onunhandledrejection&&(function(e){!function(){const t="unhandledrejection";UMe(t,t=>{const{stackParser:r,attachStacktrace:n}=UFe();if(tMe()!==e||JMe())return;const o=function(e){if(wPe(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t),i=wPe(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:lFe(r,o,void 0,n,!0);i.level="error",NMe(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})}),BMe(t,MFe)}()}(e),FFe("onunhandledrejection"))}}};function FFe(e){KMe&&oPe.log(`Global Handler attached: ${e}`)}function UFe(){const e=tMe();return e?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function BFe(e){if(bPe(e)&&0!==e.length)return e.startsWith("data:")?`<${function(e,t=!0){if(e.startsWith("data:")){const r=e.match(/^data:([^;,]+)/),n=r?r[1]:"text/plain",o=e.includes(";base64,"),i=e.indexOf(",");let s="";if(t&&-1!==i){const t=e.slice(i+1);s=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${n}${o?",base64":""}${s?`,${s}`:""}`}return e}(e,!1)}>`:e}function HFe(e,t,r,n,o,i){if(!o.exception?.values||!i||!CPe(i.originalException,Error))return;const s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;s&&(o.exception.values=jFe(e,t,n,i.originalException,r,o.exception.values,s,0))}function jFe(e,t,r,n,o,i,s,a){if(i.length>=r+1)return i;let l=[...i];if(CPe(n[o],Error)){WFe(s,a,n);const i=e(t,n[o]),c=l.length;
5991KFe(i,o,c,a),l=jFe(e,t,r,n[o],o,[i,...l],i,c)}return VFe(n)&&n.errors.forEach((i,c)=>{if(CPe(i,Error)){WFe(s,a,n);const d=e(t,i),u=l.length;KFe(d,`errors[${c}]`,u,a),l=jFe(e,t,r,i,o,[d,...l],d,u)}}),l}function VFe(e){return Array.isArray(e.errors)}function WFe(e,t,r){e.mechanism={handled:!0,type:"auto.core.linked_errors",...VFe(r)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function KFe(e,t,r,n){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}const qFe=(e={})=>{const t=e.limit||5,r=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,n,o){HFe(tFe,o.getOptions().stackParser,r,t,e,n)}}};function GFe(e,t,r,n){const o={filename:e,function:"<anonymous>"===t?"?":t,in_app:!0};return void 0!==r&&(o.lineno=r),void 0!==n&&(o.colno=n),o}const ZFe=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,YFe=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,JFe=/\((\S*)(?::(\d+))(?::(\d+))\)/,QFe=/at (.+?) ?\(data:(.+?),/,XFe=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,eUe=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,tUe=RPe([30,e=>{const t=e.match(QFe);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const r=ZFe.exec(e);if(r){const[,e,t,n]=r;return GFe(e,"?",+t,+n)}const n=YFe.exec(e);if(n){if(0===n[2]?.indexOf("eval")){const e=JFe.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=rUe(n[1]||"?",n[2]);return GFe(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{const t=XFe.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=eUe.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],r=t[1]||"?";return[r,e]=rUe(r,e),GFe(e,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),rUe=(e,t)=>{const r=-1!==e.indexOf("safari-extension"),n=-1!==e.indexOf("safari-web-extension");return r||n?[-1!==e.indexOf("@")?e.split("@")[0]:"?",r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},nUe=/^HTML(\w*)Element$/;function oUe(e){if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(function(e){if("undefined"==typeof Element)return!1;try{return e instanceof Element}catch{return!1}}(e)){const t=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(e);if(nUe.test(t))return`[HTMLElement: ${TFe(e)}]`}}function iUe(e={}){const t=!e.skipBrowserExtensionCheck&&!!function(){if(void 0===ZMe.window)return!1;const e=ZMe;if(e.nw)return!1;const t=e.chrome||e.browser;if(!t?.runtime?.id)return!1;const r=GMe();return!(ZMe===ZMe.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(r))}()&&(KMe&&ePe(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0);let r=null==e.defaultIntegrations?[hze(),vze(),{name:"ConversationId",setup(e){e.on("spanStart",e=>{const t=XDe().getScopeData(),r=eMe().getScopeData(),n=t.conversationId||r.conversationId;if(n){const{op:t,data:r,description:o}=xMe(e);if(!t?.startsWith("gen_ai.")&&!r["ai.operationId"]&&!o?.startsWith("ai."))return;e.setAttribute("gen_ai.conversation.id",n)}})}},rze(),LFe(),zFe(),qFe(),bze(),{name:"HttpContext",preprocessEvent(e){if(!ZMe.navigator&&!ZMe.location&&!ZMe.document)return;const t=XMe(),r={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:r}},processSegmentSpan(e){if(!ZMe.navigator&&!ZMe.location&&!ZMe.document)return;const t=XMe();$Fe(e,{"url.full":t.url||void 0,"http.request.header.user_agent":t.headers["User-Agent"],"http.request.header.referer":t.headers.Referer})}},{name:"CultureContext",preprocessEvent(e){const t=NFe();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=NFe();t&&$Fe(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}},eze()]:e.defaultIntegrations;const n={...e,enabled:!t&&e.enabled,stackParser:(o=e.stackParser||tUe,Array.isArray(o)?RPe(...o):o),integrations:yDe({integrations:e.integrations,defaultIntegrations:r}),transport:e.transport||vDe};var o;return FPe=oUe,function(e,t){!0===t.debug&&(KRe?oPe.enable():ePe(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),XDe().update(t.initialScope);const r=new e(t);return function(e){XDe().setClient(e)}(r),r.init(),r}(uFe,n)}var sUe;!function(e){e.Available="available",e.Away="away",e.Busy="busy",e.Disconnected="disconnected",e.DoNotDisturb="dnd",e.Initial="initial",e.Offline="offline"}(sUe||(sUe={}));const aUe={config:{name:"Badge",platforms:["web"]},setBadgeCount:e=>navigator.setAppBadge?.(e),setBadgeStatus:()=>{}};var lUe,cUe,dUe,uUe,hUe,pUe,gUe,fUe;!function(e){e.PermissionDeniedMac="Cannot update: mac permission denied",e.CheckFailed="Check for updates failed",e.AnotherCheckInProgress="Another check for updates is currently in progress",e.UpdatesAreDisabled="Updates are disabled"}(lUe||(lUe={})),function(e){e.iAmInContainer="I am in container",e.iAmOutside="I am outside"}(cUe||(cUe={})),function(e){e.confirmed="confirmed",e.newNetworkClientVersion="new_network_client_version"}(dUe||(dUe={})),function(e){e.disconnected="disconnected",e.connecting="connecting",e.connected="connected"}(uUe||(uUe={})),function(e){e.attribution="attribution"}(hUe||(hUe={})),function(e){e.appLogoOverride="appLogoOverride",e.hero="hero"}(pUe||(pUe={})),function(e){e.circle="circle"}(gUe||(gUe={})),function(e){e.reminder="reminder",e.alarm="alarm",e.incomingCall="incomingCall"}(fUe||(fUe={}));const mUe={nativeContainer:()=>globalThis[mHe],connectionPort(e){try{const t=new URL(e.url);return parseInt(t.port)}catch{return Number.NaN}}},vUe=console,bUe={config:{name:"Logger",platforms:["web"]},createLogger:()=>vUe,debug:vUe.debug,log:vUe.log,info:vUe.info,warn:vUe.warn,error:vUe.error},yUe=bUe.createLogger("DesktopCompanion"),wUe=e=>{let t="";for(let r=e.length-1;r>=0;--r)t+=e[r];return t};var xUe=new class{constructor(){this._clientLocalVersion="0.0.2",this._clientNetworkVersion=this._clientLocalVersion}getEncodingFunc(){switch(this._clientNetworkVersion){case"0.0.1":return e=>wUe(btoa(e)).replace(/=/g,"");case"0.0.2":return e=>wUe(btoa(encodeURIComponent(e))).replace(/=/g,"");default:return e=>e}}getDecodingFunc(){switch(this._clientNetworkVersion){case"0.0.1":return e=>atob(wUe(e));case"0.0.2":return e=>decodeURIComponent(atob(wUe(e)));default:return e=>e}}getEncodedMessage(e){try{return{success:!0,message:this.getEncodingFunc()(e)}}catch(t){return yUe.error("Cannot encode a message, ignoring"),{success:!1,message:e}}}getDecodedMessage(e){try{return{success:!0,message:this.getDecodingFunc()(e)}}catch(t){return yUe.error("Cannot decode a message, ignoring"),{success:!1,message:e}}}getClientNetworkVersion(){return this._clientNetworkVersion}getClientLocalVersion(){return this._clientLocalVersion}setClientNetworkVersion(e){this._clientNetworkVersion=e}};const _Ue=bUe.createLogger("DesktopCompanionHandshake"),kUe=new class{async newConfirmedConnectionWithConfig(e){const t=e.ports.map(e=>this._newConfirmedConnectionToPort(e));try{return await Promise.any(t)}catch{throw new Error("Failed to establish connection")}}async _newConfirmedConnectionToPort(e){const t=await this._newConnectionToPort(e);return await this._confirmConnection(t),t}_newConnectionToPort(e){return new Promise((t,r)=>{const n=new WebSocket(`ws://127.0.0.1:${e}`),o=()=>{s(),t(n)},i=()=>{s(),n.close(),r()},s=()=>{n.removeEventListener("open",o),n.removeEventListener("error",i)};n.addEventListener("open",o),n.addEventListener("error",i)})}_confirmConnection(e){return new Promise((t,r)=>{const n=()=>{o(),e.close(),r()},o=()=>{clearTimeout(i),e.removeEventListener("message",s),e.removeEventListener("close",a),e.removeEventListener("error",l)},i=setTimeout(()=>{const t=mUe.connectionPort(e);_Ue.error(`Connected to port ${t} but server did not respond on time`),n()},2e3),s=r=>{const i=mUe.connectionPort(e);if("string"==typeof r.data)try{const e=JSON.parse(r.data);e.message===dUe.confirmed?(xUe.setClientNetworkVersion(e.clientVersion),o(),t()):(_Ue.error(`Connected to port ${i} but received unexpected response from server`),n())}catch(e){_Ue.error(`Connected to port ${i} but received error trying to parse the data: ${JSON.stringify(e)}`),n()}else _Ue.error(`Connected to port ${i} but received a data with a type different than a string: ${typeof r.data}`),n()},a=t=>{const r=mUe.connectionPort(e);_Ue.error(`Connected to port ${r} but connection closed before server response`),n()},l=t=>{const r=mUe.connectionPort(e);_Ue.error(`Connected to port ${r} but connection error before server response`),n()};e.addEventListener("message",s,{once:!0}),e.addEventListener("close",a,{once:!0}),e.addEventListener("error",l,{once:!0});const c={message:mUe.nativeContainer()?cUe.iAmInContainer:cUe.iAmOutside,clientVersion:xUe.getClientLocalVersion()};e.send(JSON.stringify(c))})}};var CUe=kUe;const SUe=bUe.createLogger("DesktopCompanion"),EUe=()=>{const e=mUe.nativeContainer();return e?.plugins.DesktopCompanionServer};
5991class IUe extends Event{constructor(e){super("connectionStatusChanged"),this.connectionStatus=e}}const AUe=e=>`message-${e}`;class TUe extends Event{constructor(e){super(AUe(e.type)),this.message=e}}class OUe{constructor(){this.config={name:"DesktopCompanion",platforms:["web"]},this._eventTarget=new EventTarget,this._connectionStatus=uUe.disconnected,this._ws=void 0,this._currentConfig=void 0,this._tryConnectTimerId=void 0}_setConnectionStatus(e){this._connectionStatus!==e&&(this._connectionStatus=e,SUe.log(`Connection status changed: ${e}`),this._eventTarget.dispatchEvent(new IUe(e)))}_connectedWithCompatibleConfig(e){if(!this._ws)return!1;const t=mUe.connectionPort(this._ws);return e.ports.includes(t)}_closeConnection(){this._tryConnectTimerId&&(clearTimeout(this._tryConnectTimerId),this._tryConnectTimerId=void 0),this._currentConfig=void 0,this._ws?.close(),this._ws=void 0,this._setConnectionStatus(uUe.disconnected)}async _tryConnectTimerHandler(){if(this._currentConfig)try{if(this._ws=await CUe.newConfirmedConnectionWithConfig(this._currentConfig),SUe.log(`Connected to port ${mUe.connectionPort(this._ws)}`),this._tryConnectTimerId=void 0,!this._currentConfig)return void this._closeConnection();this._ws.addEventListener("close",()=>this._closeHandler()),this._ws.addEventListener("message",e=>this._messageHandler(e)),this._setConnectionStatus(uUe.connected)}catch{this._tryConnectTimerId=setTimeout(this._tryConnectTimerHandler.bind(this),1e3)}}_closeHandler(){this._ws=void 0,this._currentConfig?.autoReconnect?(SUe.log("Connection closed but reconnecting due to autoReconnect being enabled"),this._setConnectionStatus(uUe.connecting),this._tryConnectTimerHandler()):this._setConnectionStatus(uUe.disconnected)}static _isDesktopCompanionMessage(e){return e&&"object"==typeof e&&"string"==typeof e.type&&"object"==typeof e.payload}static _isDesktopCompanionHandshakeMessage(e){return e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.clientVersion}_messageHandler(e){const t=e.data;if("string"==typeof t)try{const e=xUe.getDecodedMessage(t.toString());if(e.success){const t=JSON.parse(e.message);if(OUe._isDesktopCompanionMessage(t))return void this._eventTarget.dispatchEvent(new TUe(t));SUe.error("Failed to parse a decoded message as DesktopCompanionMessage, ignoring")}const r=JSON.parse(t.toString());OUe._isDesktopCompanionHandshakeMessage(r)?r.message===dUe.newNetworkClientVersion&&xUe.setClientNetworkVersion(r.clientVersion):SUe.error("Failed to parse a message as DesktopCompanionHandshakeMessage, ignoring")}catch(e){SUe.error("Failed to parse message, ignoring, error: "+JSON.stringify(e))}else SUe.error(`Received message with non-string type (${typeof t}), ignoring`)}get connectionStatus(){return this._connectionStatus}startConnecting(e){this._connectedWithCompatibleConfig(e)?SUe.log("Already connected with compatible config"):(this._closeConnection(),this._currentConfig=e,SUe.log("Starting connecting",this._currentConfig),this._setConnectionStatus(uUe.connecting),EUe()?.startListening(e),this._tryConnectTimerHandler())}disconnect(){EUe()?.stop(),this._closeConnection()}send(e){if(this._ws&&this._ws.readyState===WebSocket.OPEN)try{const t=xUe.getEncodedMessage(JSON.stringify(e));t.success?this._ws.send(t.message):SUe.error("We cannot send a message because the encoding is failing, ignoring")}catch(e){const t="We cannot send this message because the JSON.stringify is failing, ignoring, error: "+JSON.stringify(e);throw SUe.error(t),new Error(t)}}addEventListener(e,t,r){this._eventTarget.addEventListener(e,t,r)}addMessageEventListener(e,t,r){this._eventTarget.addEventListener(AUe(e),t,r)}removeEventListener(e,t,r){this._eventTarget.removeEventListener(e,t,r)}removeMessageEventListener(e,t,r){this._eventTarget.removeEventListener(AUe(e),t,r)}}const LUe=new OUe;var $Ue=r(260);const NUe={config:{name:"DiagnosticsReporter",platforms:["web"]},report:async(e,t,r=[])=>{if(!e.reportName)throw new TypeError('Missing required "reportName" from options');const n=await RUe(e,t,r);return e.environment&&DUe(e.environment,n.filename,n.archive),n}},RUe=async(e,t,r)=>({filename:zUe(e.reportName),archive:await PUe(t,r)}),PUe=async(e,t)=>{const r=new $Ue;r.file("air.json",JSON.stringify(e));for(const e of t){const t=FUe(e.name),n=UUe(e.data);r.file(t,n)}return await r.generateAsync({type:"uint8array",compression:"DEFLATE",compressionOptions:{level:9}})},DUe=async(e,t,r)=>{const n=await MUe(e,t);return fetch(n,{body:r,headers:{"Content-Type":"application/zip"},method:"PUT"})},MUe=async(e,t)=>{const r=`https://${jUe[e]}/fileupload/tenants/gir/public/path/reports?url`,n=await fetch(r,{body:JSON.stringify({filename:t}),headers:{"Content-Type":"application/json"},method:"POST"}),{uploadUrl:o}=await n.json();return o},zUe=e=>`${BUe(e)}.zip`,FUe=e=>{let t=BUe(e);return HUe(t)||(t+=".json"),t},UUe=e=>{if(Array.isArray(e)){const t=e.map(e=>(e=>{let t;try{return JSON.stringify(e,(e,t)=>{if(!/^_/.test(e))return void 0===t?"undefined":t})}catch(e){e instanceof Error&&(t=e.message)}return JSON.stringify({exception:"UNABLE TO SERIALIZE DATA",errorMessage:t})})(e));return t.join("\n")}return"string"!=typeof e?JSON.stringify(e):e},BUe=e=>e.replace(/[^0-9a-z_.]+/gi,"-"),HUe=e=>e.slice((Math.max(0,e.lastIndexOf("."))||1/0)+1),jUe={ed:"apied-int-fileupload.services-ed.goto.com",rc:"apirc-int-fileupload.services-rc.goto.com",stage:"apistage-int-fileupload.services-stage.goto.com",live:"api-fileupload.services.goto.com"},VUe=new Uint8Array(16),WUe=[];for(let e=0;e<256;++e)WUe.push((e+256).toString(16).slice(1));var KUe=function(e,t,r){return t||e||!crypto.randomUUID?function(e,t,r){const n=(e=e||{}).random??e.rng?.()??crypto.getRandomValues(VUe);if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){if((r=r||0)<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return(WUe[e[t+0]]+WUe[e[t+1]]+WUe[e[t+2]]+WUe[e[t+3]]+"-"+WUe[e[t+4]]+WUe[e[t+5]]+"-"+WUe[e[t+6]]+WUe[e[t+7]]+"-"+WUe[e[t+8]]+WUe[e[t+9]]+"-"+WUe[e[t+10]]+WUe[e[t+11]]+WUe[e[t+12]]+WUe[e[t+13]]+WUe[e[t+14]]+WUe[e[t+15]]).toLowerCase()}(n)}(e,t,r):crypto.randomUUID()};const qUe="GoToContainer.machineId",GUe={config:{name:"ExecutionContext",platforms:["electron","web"]},getContext:()=>ZUe()??YUe(),internalCache:{runId:KUe(),machineId:null}},ZUe=()=>window[mHe]?.executionContext,YUe=()=>{if(GUe.internalCache.machineId)return{...GUe.internalCache};if(GUe.internalCache.machineId=localStorage.getItem(qUe),GUe.internalCache.machineId)return{...GUe.internalCache};GUe.internalCache.machineId=KUe();try{localStorage.setItem(qUe,GUe.internalCache.machineId)}catch{}return{...GUe.internalCache}};var JUe;!function(e){e.MUTE="MUTE",e.ACCEPTCALL="ACCEPTCALL",e.REJECTCALL="REJECTCALL",e.HANGUP="HANGUP",e.RING="RING"}(JUe||(JUe={}));const QUe="Hid is not available";var XUe,eBe;!function(e){e[e.LED=8]="LED",e[e.TELEPHONY=11]="TELEPHONY",e[e.CONSUMER=12]="CONSUMER"}(XUe||(XUe={})),function(e){e[e.MUTED=0]="MUTED",e[e.IN_CALL=1]="IN_CALL",e[e.RINGING=2]="RINGING"}(eBe||(eBe={}));const tBe=(e,t)=>e<<16|t,rBe=e=>{const t=(4294901760&e)>>16,r=Object.values(XUe).indexOf(parseInt(t.toString(16),16)),n=Object.values(oBe).indexOf(e);return{usagePage:Object.keys(XUe)[r],headsetHIDUsages:Object.keys(oBe)[n]}},nBe=(e,t)=>{const r=Math.floor(t/8);return!!(e.getUint8(r)>>>t%8&1)};var oBe;!function(e){e[e.LED_MUTE=tBe(XUe.LED,9)]="LED_MUTE",e[e.LED_OFF_HOOK=tBe(XUe.LED,23)]="LED_OFF_HOOK",e[e.LED_RING=tBe(XUe.LED,24)]="LED_RING",e[e.LED_HOLD=tBe(XUe.LED,32)]="LED_HOLD",e[e.LED_MICROPHONE=tBe(XUe.LED,33)]="LED_MICROPHONE",e[e.LED_ONLINE=tBe(XUe.LED,42)]="LED_ONLINE",e[e.TELEPHONY_RINGER=tBe(XUe.TELEPHONY,158)]="TELEPHONY_RINGER",e[e.TELEPHONY_HOOK_SWITCH=tBe(XUe.TELEPHONY,32)]="TELEPHONY_HOOK_SWITCH",e[e.TELEPHONY_FLASH=tBe(XUe.TELEPHONY,33)]="TELEPHONY_FLASH",e[e.TELEPHONY_REDIAL=tBe(XUe.TELEPHONY,36)]="TELEPHONY_REDIAL",e[e.TELEPHONY_MUTE=tBe(XUe.TELEPHONY,47)]="TELEPHONY_MUTE",e[e.TELEPHONY_LINE_BUSY=tBe(XUe.TELEPHONY,151)]="TELEPHONY_LINE_BUSY",e[e.TELEPHONY_PROGRAMMABLE_BUTTON=tBe(XUe.TELEPHONY,7)]="TELEPHONY_PROGRAMMABLE_BUTTON"}(oBe||(oBe={}));const iBe=()=>navigator.hid,sBe=e=>{if(!e)return[];const t=new Array;for(const r of e){const e=r.items.map(e=>e.reportSize*e.reportCount).reduce((e,t)=>
5991e+t),n={reportId:r.reportId,bitsUsage:new Array(e)};let o=0;for(const e of r.items)e.usages?.forEach((e,t)=>{e in oBe&&(n.bitsUsage[o+t]=e)}),o+=e.reportSize*e.reportCount;n.bitsUsage.some(e=>!!e)&&t.push(n)}return t},aBe=e=>`0x${e.toString(16).padStart(4,"0")}`;class lBe{constructor(e){const t=[],r=[];e.collections.forEach(({outputReports:e,inputReports:n})=>{r.push(...sBe(e)),t.push(...sBe(n))}),this.inputDescriptors=t,this.outputDescriptors=r}getInputDescriptors(){return this.inputDescriptors}getOutputDescriptors(){return this.outputDescriptors}findInputByReportId(e){return this.inputDescriptors.find(t=>t.reportId===e)}findOutputByReportId(e){return this.outputDescriptors.find(t=>t.reportId===e)}findOutputByUsage(e){return this.outputDescriptors.find(t=>t.bitsUsage.some(t=>t===e))}}let cBe;const dBe=()=>(cBe||(cBe=bUe.createLogger("HID")),cBe);class uBe{constructor(e){this.device=e}logInitialization(){const e=aBe(this.device.vendorId),t=aBe(this.device.productId);dBe().info(`Initializing HID device: ${this.device.productName} (vendorId=${e}, productId=${t})`)}logDeviceCapabilities(e,t){dBe().info("=== Device Report Structure ==="),this.logCollections(),this.logRecognizedReports(e,t),this.logSupportedUsages(e,t),dBe().info("=== End Device Report Structure ===")}logReport(e,t){const r=this.calculateTotalBits(t.items);dBe().info(`  ${e} Report ${t.reportId}: ${t.items.length} items, ${r} bits total`),t.items.forEach((e,t)=>{const r=this.formatItemUsages(e);dBe().info(`    Item ${t}: size=${e.reportSize} count=${e.reportCount} usages=[${r}]`)})}logCollections(){this.device.collections.forEach((e,t)=>{const r=aBe(e.usagePage),n=aBe(e.usage);dBe().info(`Collection ${t}: usagePage=${r} usage=${n}`),e.inputReports.forEach(e=>{this.logReport("Input",e)}),e.outputReports.forEach(e=>{this.logReport("Output",e)})})}logRecognizedReports(e,t){const r=e.map(e=>e.reportId).join(", "),n=t.map(e=>e.reportId).join(", ");dBe().info(`Recognized Input Reports: [${r}]`),dBe().info(`Recognized Output Reports: [${n}]`)}logSupportedUsages(e,t){const r=this.collectSupportedUsages(e,t),n=this.formatUsageNames(r);dBe().info(`Supported Usages: [${n}]`)}collectSupportedUsages(e,t){const r=new Set;return[...e,...t].forEach(e=>{e.bitsUsage.forEach(e=>{void 0!==e&&r.add(e)})}),r}formatUsageNames(e){return Array.from(e).map(e=>rBe(e).headsetHIDUsages).join(", ")}calculateTotalBits(e){return e.reduce((e,t)=>e+t.reportSize*t.reportCount,0)}formatItemUsages(e){return e.usages?e.usages.map(e=>aBe(e)).join(", "):e.isRange?`range(${aBe(e.usageMinimum)}-${aBe(e.usageMaximum)})`:"none"}}class hBe{evaluateLineBusy(e,t,r){const n=e&&!1===t;return n&&r.isRinging?{action:JUe.ACCEPTCALL,reason:"LINE_BUSY pressed while ringing, Yealink-style"}:n&&r.isInCall?{action:JUe.HANGUP,reason:"LINE_BUSY pressed while in call, Yealink-style"}:{action:null,reason:`LINE_BUSY ${e?"pressed":"released"} but no matching state (previousValue=${t})`}}shouldIgnoreLineBusyInHookSwitch(e,t){return e&&t.isRinging}}class pBe{evaluateLineBusy(e,t,r){return{action:null,reason:"IGNORE LINE_BUSY (used as status flag by this vendor)"}}shouldIgnoreLineBusyInHookSwitch(e,t){return!1}}class gBe{static createStrategy(e){return 27027===e?new hBe:new pBe}}class fBe{constructor(){this.lastMuteCommandTime=0,this.lastRingCommandTime=0,this.ignoreUntilTime=0,this.MUTE_ECHO_IGNORE_MS=500,this.RING_ECHO_SUPPRESS_MS=1e3,this.RING_REJECT_WINDOW_MS=3e4,this.IGNORE_AFTER_RING_MS=500}recordMuteCommand(){this.lastMuteCommandTime=performance.now()}recordRingCommand(){this.lastRingCommandTime=performance.now(),this.ignoreUntilTime=performance.now()+this.IGNORE_AFTER_RING_MS}shouldIgnoreMuteEcho(){return performance.now()-this.lastMuteCommandTime<this.MUTE_ECHO_IGNORE_MS}isWithinRejectWindow(){const e=performance.now()-this.lastRingCommandTime;return e>this.RING_ECHO_SUPPRESS_MS&&e<this.RING_REJECT_WINDOW_MS}getTimeSinceRing(){return performance.now()-this.lastRingCommandTime}getTimeSinceMute(){return performance.now()-this.lastMuteCommandTime}shouldIgnoreAllReports(){return performance.now()<this.ignoreUntilTime}}class mBe{constructor(){this.inUseByAnotherApp=!1}isBlocked(){return this.inUseByAnotherApp}checkForRelease(e,t){this.inUseByAnotherApp&&this.isHookSwitchOff(e,t)&&this.releaseDevice()}checkForTakeover(e,t,r,n){this.inUseByAnotherApp||this.isIdle(r,n)&&this.isHookSwitchOn(e,t)&&this.blockDevice()}isHookSwitchOn(e,t){return e===oBe.TELEPHONY_HOOK_SWITCH&&t}isHookSwitchOff(e,t){return e===oBe.TELEPHONY_HOOK_SWITCH&&!t}isIdle(e,t){return!e&&!t}releaseDevice(){dBe().info("Device released by other app (hook switch off detected)"),this.inUseByAnotherApp=!1}blockDevice(){dBe().warn("Device appears to be controlled by another app (received HOOK_SWITCH=true while idle)"),this.inUseByAnotherApp=!0}}class vBe{constructor(e,t){this.timeWindowFilter=e,this.vendorStrategy=t}evaluate(e,t,r,n){return e&&r.isRinging?{action:JUe.ACCEPTCALL,reason:"hook pressed while ringing"}:!e||r.isInCall||r.isRinging?!e&&!0===t&&r.isInCall?{action:JUe.HANGUP,reason:"hook released while in call"}:!e&&r.isRinging?this.evaluateReject(t,r,n):{action:null,reason:`hook ${e?"pressed":"released"} but no matching state`}:{action:JUe.ACCEPTCALL,reason:"hook pressed, not in call"}}evaluateReject(e,t,r){const n=r?.find(({usage:e,value:t})=>e===oBe.TELEPHONY_LINE_BUSY&&!0===t);if(this.vendorStrategy.shouldIgnoreLineBusyInHookSwitch(!!n,t))return{action:null,reason:"HOOK_SWITCH=false with LINE_BUSY=true, waiting for LINE_BUSY handler"};const o=this.timeWindowFilter.isWithinRejectWindow();return!0===e||o?{action:JUe.REJECTCALL,reason:`hook=false, previousValue=${e}, timeSinceRing=${this.timeWindowFilter.getTimeSinceRing().toFixed(0)}ms`}:{action:null,reason:`hook released but outside reject window, timeSinceRing=${this.timeWindowFilter.getTimeSinceRing().toFixed(0)}ms`}}}class bBe{constructor(e){this.vendorStrategy=e}evaluate(e,t,r,n){return this.vendorStrategy.evaluateLineBusy(e,t,r)}}class yBe{evaluate(e,t,r,n){return e&&r.isRinging?{action:JUe.REJECTCALL,reason:"programmable button pressed while ringing, Yealink-style"}:{action:null,reason:`programmable button ${e?"pressed":"released"} but no matching state`}}}class wBe{constructor(e){this.timeWindowFilter=e}evaluate(e,t,r,n){return e?this.timeWindowFilter.shouldIgnoreMuteEcho()?{action:null,reason:`IGNORE MUTE (echo ${this.timeWindowFilter.getTimeSinceMute()}ms after app command)`}:{action:JUe.MUTE,reason:"MUTE/UNMUTE (physical button pressed)"}:{action:null,reason:"MUTE released (no action)"}}}class xBe{constructor(e){this.context=e}async execute(e=!0){const t=!0===this.context.deviceState.get(eBe.MUTED);
5991dBe().info("Action: "+(t?"UNMUTE":"MUTE"));const r=new Set;this.context.updateUsageState(r,oBe.LED_MUTE,!t),this.context.deviceState.set(eBe.MUTED,!t),this.context.timeWindowFilter.recordMuteCommand(),await this.context.sendReports(r),e&&this.context.dispatchEvent(JUe.MUTE)}}class _Be{constructor(e){this.context=e}async execute(){dBe().info("Action: ACCEPT CALL");const e=new Set;this.context.updateUsageState(e,oBe.LED_OFF_HOOK,!0),this.context.updateUsageState(e,oBe.LED_ONLINE,!0),this.context.updateUsageState(e,oBe.TELEPHONY_HOOK_SWITCH,!0),this.context.updateUsageState(e,oBe.LED_RING,!1),this.context.updateUsageState(e,oBe.TELEPHONY_RINGER,!1),this.context.deviceState.set(eBe.IN_CALL,!0),this.context.deviceState.set(eBe.RINGING,!1),await this.context.sendReports(e),this.context.dispatchEvent(JUe.ACCEPTCALL)}}class kBe{constructor(e){this.context=e}async execute(){dBe().info("Action: HANGUP");const e=new Set;this.context.updateUsageState(e,oBe.LED_OFF_HOOK,!1),this.context.updateUsageState(e,oBe.TELEPHONY_HOOK_SWITCH,!1),this.context.updateUsageState(e,oBe.TELEPHONY_LINE_BUSY,!1),this.context.updateUsageState(e,oBe.LED_ONLINE,!1),this.context.deviceState.set(eBe.IN_CALL,!1),this.context.deviceState.set(eBe.MUTED,!1),await this.context.sendReports(e),this.context.dispatchEvent(JUe.HANGUP)}}class CBe{constructor(e){this.context=e}async execute(){dBe().info("Action: REJECT CALL");const e=new Set;this.context.updateUsageState(e,oBe.LED_OFF_HOOK,!1),this.context.updateUsageState(e,oBe.TELEPHONY_HOOK_SWITCH,!1),this.context.updateUsageState(e,oBe.LED_RING,!1),this.context.updateUsageState(e,oBe.TELEPHONY_RINGER,!1),this.context.updateUsageState(e,oBe.LED_ONLINE,!1),this.context.deviceState.set(eBe.RINGING,!1),await this.context.sendReports(e),this.context.dispatchEvent(JUe.REJECTCALL)}}class SBe{constructor(e){this.context=e}async execute(){dBe().info("Action: RING"),this.context.deviceState.get(eBe.IN_CALL)&&(dBe().info("Call in progress, resetting to initial state first"),await this.context.setToInitialState(),await new Promise(e=>setTimeout(e,500)));const e=new Set;this.context.updateUsageState(e,oBe.LED_RING,!0),this.context.updateUsageState(e,oBe.TELEPHONY_RINGER,!0),this.context.updateUsageState(e,oBe.TELEPHONY_LINE_BUSY,!1),this.context.deviceState.set(eBe.RINGING,!0),this.context.timeWindowFilter.recordRingCommand(),await this.context.sendReports(e),this.context.dispatchEvent(JUe.RING)}}class EBe{get eventTarget(){return this._eventTarget}get device(){return this._device}constructor(e){this._eventTarget=new EventTarget,this.timeWindowFilter=new fBe,this.externalAppDetector=new mBe,this.programmableButtonHandler=new yBe,this.outputReportDescriptors=[],this.inputReportDescriptors=[],this.deviceState=new Map([[eBe.MUTED,!1],[eBe.IN_CALL,!1],[eBe.RINGING,!1]]),this.states=new Map,this.handleInputReport=({data:e,reportId:t})=>{if(this.timeWindowFilter.shouldIgnoreAllReports())return void dBe().info(`Ignoring input report (report ID: ${t}) - within post-RING ignore window`);const r=this.registry.findInputByReportId(t);if(!r)return void dBe().warn(`Unknown input report ID ${t} from ${this._device.productName}. Known report IDs: [${this.inputReportDescriptors.map(e=>e.reportId).join(", ")}]`);if(!this.validateReportPayload(e,r,t))return;const n=((e,t)=>{const r=[];for(let n=0;n<t.bitsUsage.length;n++){const o=t.bitsUsage[n];if(void 0===o)continue;const i=nBe(e,n);r.push({usage:o,value:i})}return r})(e,r);0!==n.length&&this.processUsageValues(n)},this._device=e,this.registry=new lBe(e),this.logger=new uBe(e),this.logger.logInitialization(),this.inputReportDescriptors.push(...this.registry.getInputDescriptors()),this.outputReportDescriptors.push(...this.registry.getOutputDescriptors()),this.vendorStrategy=gBe.createStrategy(e.vendorId),this.hookSwitchHandler=new vBe(this.timeWindowFilter,this.vendorStrategy),this.lineBusyHandler=new bBe(this.vendorStrategy),this.muteHandler=new wBe(this.timeWindowFilter),this.handlerRegistry=new Map([[oBe.TELEPHONY_HOOK_SWITCH,this.hookSwitchHandler],[oBe.TELEPHONY_LINE_BUSY,this.lineBusyHandler],[oBe.TELEPHONY_PROGRAMMABLE_BUTTON,this.programmableButtonHandler],[oBe.TELEPHONY_MUTE,this.muteHandler]]);const t=this.createActionContext();this.muteAction=new xBe(t),this.acceptCallAction=new _Be(t),this.hangupAction=new kBe(t),this.rejectCallAction=new CBe(t),this.ringAction=new SBe(t),this.logger.logDeviceCapabilities(this.registry.getInputDescriptors(),this.registry.getOutputDescriptors()),this._device.addEventListener("inputreport",this.handleInputReport)}
5991async setToInitialState(){if(this.externalAppDetector.isBlocked())return void dBe().warn("Skipping reset: device in use by another app");dBe().info("Action: RESET TO INITIAL STATE");const e=new Set;[oBe.LED_OFF_HOOK,oBe.LED_ONLINE,oBe.LED_RING,oBe.LED_MUTE,oBe.TELEPHONY_HOOK_SWITCH,oBe.TELEPHONY_RINGER,oBe.TELEPHONY_LINE_BUSY,oBe.TELEPHONY_PROGRAMMABLE_BUTTON].forEach(t=>{const r=this.registry.findOutputByUsage(t);r&&(e.add(r.reportId),this.states.set(t,!1))}),await this.sendReports(e),this.deviceState.set(eBe.IN_CALL,!1),this.deviceState.set(eBe.MUTED,!1),this.deviceState.set(eBe.RINGING,!1)}async triggerAction(e){if(this.externalAppDetector.isBlocked())dBe().warn(`Blocking action ${e}: device in use by another app`);else switch(e){case JUe.MUTE:await this.muteAction.execute(!1);break;case JUe.ACCEPTCALL:await this.acceptCallAction.execute();break;case JUe.HANGUP:await this.hangupAction.execute();break;case JUe.RING:await this.ringAction.execute();break;case JUe.REJECTCALL:await this.rejectCallAction.execute()}}validateReportPayload(e,t,r){const n=t.bitsUsage.length/8;return e.byteLength===n||(dBe().warn(`Invalid payload size for report ${r}: expected ${n}, got ${e.byteLength}`),!1)}processUsageValues(e){const t=this.deviceState.get(eBe.RINGING)??!1,r=this.deviceState.get(eBe.IN_CALL)??!1;e.forEach(({usage:n,value:o})=>{const i=this.states.get(n);this.states.set(n,o),this.externalAppDetector.checkForRelease(n,o),this.externalAppDetector.checkForTakeover(n,o,t,r),i!==o&&this.handleUsageChange(n,o,i,e)});const n=e.find(({usage:e})=>e===oBe.TELEPHONY_HOOK_SWITCH);if(n){const t=this.states.get(oBe.TELEPHONY_HOOK_SWITCH);t!==n.value||this.handleUsageChange(n.usage,n.value,t,e)}}handleUsageChange(e,t,r,n){const o=this.createDeviceContext(),{action:i,reason:s}=this.evaluateUsageAction(e,t,r,n||[],o);i&&(dBe().info(`DECISION: ${i} (${s})`),this.triggerAction(i))}createDeviceContext(){return{isRinging:this.deviceState.get(eBe.RINGING)??!1,isInCall:this.deviceState.get(eBe.IN_CALL)??!1,isMuted:this.deviceState.get(eBe.MUTED)??!1,vendorId:this._device.vendorId}}createActionContext(){return{deviceState:this.deviceState,timeWindowFilter:this.timeWindowFilter,updateUsageState:this.updateUsageState.bind(this),sendReports:this.sendReports.bind(this),dispatchEvent:this.dispatchEvent.bind(this),setToInitialState:this.setToInitialState.bind(this)}}evaluateUsageAction(e,t,r,n,o){const i=this.handlerRegistry.get(e);if(!i){const{headsetHIDUsages:t}=rBe(e);return{action:null,reason:`usage ${t} not handled`}}const s=i.evaluate(t,r,o,n);return e===oBe.TELEPHONY_MUTE&&t&&s.action===JUe.MUTE?(this.muteAction.execute(!0),{action:null,reason:s.reason}):s}updateUsageState(e,t,r){const n=this.registry.findOutputByUsage(t);n&&(e.add(n.reportId),this.states.set(t,r))}async sendReports(e){const t=Array.from(e).map(e=>this.sendOutputReport(e));await Promise.all(t)}async sendOutputReport(e){const t=this.registry.findOutputByReportId(e);if(!t)return;const r=[];t.bitsUsage.forEach(e=>{if(void 0===e)return;const t=this.states.get(e)??!1,{headsetHIDUsages:n}=rBe(e);r.push(`${n}=${t}`)}),dBe().info(`Sending to headset (Report ID: ${e}): ${r.join(", ")}`);const n=((e,t)=>{const r=t.bitsUsage.length/8,n=new ArrayBuffer(r),o=new Uint8Array(n);return t.bitsUsage.forEach((t,r)=>{if(!t)return;const n=Math.floor(r/8),i=r%8;!0===e.get(t)&&(o[n]|=1<<i)}),o})(this.states,t);await this._device.sendReport(e,n)}dispatchEvent(e){this._eventTarget.dispatchEvent(new Event(e))}getUsagePageDescriptors(e,t,r=!1){const n={INPUT:[],OUTPUT:[]};return e.collections.forEach(({usagePage:e,inputReports:o,outputReports:i})=>{if(!t.includes(e))return;const s=this.extractUsages(o),a=this.extractUsages(i);n.INPUT.push(...this.formatDescriptors(s,r)),n.OUTPUT.push(...this.formatDescriptors(a,r))}),n}extractUsages(e){const t=[];for(const r of e)for(const e of r.items)Array.isArray(e.usages)&&t.push(...e.usages);return t}formatDescriptors(e,t){const r=[];for(const n of e){const{usagePage:e,headsetHIDUsages:o}=rBe(n),i=n.toString(16),s=i.slice(0,1),a=i.slice(1,5),l=t?e:s,c=t?o?.toString()??a:a;let d=r.find(e=>e.usagePage===l);d||(d={usagePage:l,usages:[]},r.push(d)),c&&!d.usages.includes(c)&&d.usages.push(c)}return r}}const IBe=new Map,ABe=e=>{const t=IBe.get(e);if(!t)throw Error("This device is not opened.");return t};let TBe=[];const OBe={config:{name:"Hid",platforms:["web"]},getHid(){return navigator?.hid},async getDevices(){return navigator.hid?(await iBe().getDevices()).filter(({vendorId:e,productId:t})=>!TBe.some(r=>r.productId===t&&r.vendorId===e)):Promise.reject(QUe)},async requestDeviceAccess(e){const[t]=await iBe().requestDevice(e);return t},async openDevice(e){var t;!e.opened&&await e.open(),t=e,IBe.get(t)||IBe.set(t,new EBe(t))},async closeDevice(e){e.opened&&await e.close()},bindEvent(e){return ABe(e).eventTarget},async triggerAction(e,t){const r=ABe(e);await r.triggerAction(t)},getDeviceState(e){return ABe(e).deviceState},resetToInitialState(e){ABe(e).setToInitialState()},isSupported(){return"hid"in navigator},setUnsupportedDevices:e=>{TBe=e},getUsagePageDescriptors:(e,t,r=!1)=>ABe(e).getUsagePageDescriptors(e,t,r)},LBe=(e,t)=>"object"==typeof e&&"object"==typeof t?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>LBe(e[r],t[r])):e===t,$Be=(e,t)=>e.keyCombination.code>t.keyCombination.code?1:e.keyCombination.code<t.keyCombination.code?-1:((e,t)=>!e.global&&t.global?1:e.global&&!t.global?-1:0)(e,t);var NBe=(e,t)=>{if(e.length!==t.length)return!1;const r=[...e].sort($Be),n=[...t].sort($Be);return LBe(n,r)},RBe=e=>"object"==typeof e&&"string"==typeof e.code&&"boolean"==typeof e.ctrlKey&&"boolean"==typeof e.altKey&&"boolean"==typeof e.metaKey&&"boolean"==typeof e.shiftKey;const PBe=(e,t,r,n)=>`action=${e} ${(e=>`code=${e.code} altKey=${e.altKey.toString()} ctrlKey=${e.ctrlKey.toString()} metaKey=${e.metaKey.toString()} shiftKey=${e.shiftKey.toString()}`)(t)} global=${n.toString()} shortcutId=${r}`,DBe=(e,t,r)=>{let n=`action=updateConfiguration type=${e}`;return r&&(n+=` shortcutId=${r}`),t&&(n+=` ${(e=>{let t=`configurationCount=${e.length}"`;return e.length&&(t+=` configuration="${JSON.stringify(e)}`),t})(t)}`),n},MBe=(e,t,r)=>`failure=${e} type=${t} error=${r}`;var zBe;!function(e){e[e.MetaLeft=0]="MetaLeft",e[e.MetaRight=1]="MetaRight",e[e.AltLeft=2]="AltLeft",e[e.AltRight=3]="AltRight",e[e.ControlLeft=4]="Control
5991Left",e[e.ControlRight=5]="ControlRight",e[e.ShiftLeft=6]="ShiftLeft",e[e.ShiftRight=7]="ShiftRight"}(zBe||(zBe={}));class FBe{getCode(e){return e?.split("Key")?.pop()?.toLowerCase()}}class UBe extends FBe{constructor(){super(...arguments),this.listOfCommandMacOsCombinationUnavailable=["c","v","a","z","x","f","g","h","m","o","p","s","t","w","q"]}isValidKeyboardShortcutKeyCombination({altKey:e,metaKey:t,ctrlKey:r,shiftKey:n,code:o}){const i=[];let s=!1;const a=this.getCode(o);return a?Object.keys(zBe).map(e=>e.toLowerCase()).includes(a)?s=!0:e||t||r||n?!t||e||r||n||!this.listOfCommandMacOsCombinationUnavailable.some(e=>e==a)?(t&&e&&"escape"===a||t&&r&&("space"===a||"f"===a))&&i.push("AlreadyUsedSystem"):i.push("AlreadyUsedGoTo"):s=!0:s=!0,{errorCodes:i,isInvalid:s||i.length>0}}}class BBe extends FBe{constructor(){super(...arguments),this.listOfControlWindowsCombinationUnavailable=["x","c","v","z","f4","a","d","e","r","y","arrowleft","arrowright","arrowdown","arrowup","escape","space","f10","f13"]}isValidKeyboardS
5991hortcutKeyCombination({altKey:e,metaKey:t,ctrlKey:r,shiftKey:n,code:o}){const i=[];let s=!1;const a=this.getCode(o);return a?Object.keys(zBe).map(e=>e.toLowerCase()).includes(a)?s=!0:e||t||r||n?!r||e||t||n||!this.listOfControlWindowsCombinationUnavailable.some(e=>e==a)||i.push("AlreadyUsedGoTo"):s=!0:s=!0,{errorCodes:i,isInvalid:s||i.length>0}}}class HBe{static getInstance(){return HBe.instance||(HBe.instance=window.navigator.userAgent.toLowerCase().indexOf("mac")>0?new UBe:new BBe),HBe.instance}}let jBe={},VBe=0;const WBe=new Map;let KBe=bUe.createLogger("KeyboardShortcuts");const qBe={config:{name:"KeyboardShortcuts",platforms:["web"]},subscribe:async(e,t,r)=>{const n=VBe++,o=await GBe(e,t,r),i={shortcutId:e,windowForLocalShortcuts:t,onShortcutPressedListener:r,internalUnsubscribeFn:o};return WBe.set(n,i),async()=>{const t=WBe.get(n);if(!t)throw new Error(`Keyboard shortcuts unsubscribe function for shortcut ${e} called more than once`);WBe.delete(n),await t.internalUnsubscribeFn()}},systemInterface:{initializeLogger:e=>{KBe=e},updateConfiguration:async(e,t)=>{const r={...jBe};jBe[e]=t,await JBe(r,e),KBe.log(DBe("updateConfiguration",t,e))},updateConfigurations:async e=>{const t=jBe;jBe=e,await JBe(t),KBe.log(DBe("updateConfigurations"))},isValidConfiguration:e=>{if("object"!=typeof e)return!1;try{for(const t in e){const r=e[t];if(!Array.isArray(r))return!1;for(let e=0;e<r.length;e++)if(!RBe(r[e].keyCombination))return!1}return!0}catch(e){return console.error(e),!1}},isValidKeyboardShortcutKeyCombination:e=>HBe.getInstance().isValidKeyboardShortcutKeyCombination(e)}},GBe=async(e,t,r)=>{const n=jBe[e]??[],o=[];for(const i of n)if(i.global)try{const t=await ZBe(e,r,i.keyCombination);o.push(t)}catch(e){throw KBe.error(MBe("subscribe","global",JSON.stringify(e))),new Error(`${e}`)}else{const n=YBe(e,t,r,i.keyCombination,i.useKeyUp);o.push(async()=>n())}return async()=>{for(const e of o)try{await e()}catch(e){KBe.error(MBe("unsubscribe","global",JSON.stringify(e)))}}},ZBe=async(e,t,r)=>{const n=(()=>{const e=globalThis[mHe];return e?e.plugins.GlobalKeyboardShortcuts:void 0})();return n?await n.subscribe(r,n=>{t(e),KBe.log(PBe("press",r,e,!0))}):(KBe.error(MBe("pluginNotAvailable","global")),async()=>{})},YBe=(e,t,r,n,o)=>{const i=o?"keyup":"keydown",s=t=>{if(!t.repeat&&((e,t)=>e.code===t.code&&e.altKey===t.altKey&&e.ctrlKey===t.ctrlKey&&e.metaKey===t.metaKey&&e.shiftKey===t.shiftKey)(t,n))return r(e),KBe.log(PBe("press",n,e,!1)),t.preventDefault(),t.stopPropagation(),!1};return t.addEventListener(i,s),()=>t.removeEventListener(i,s)},JBe=async(e,t)=>{const r=[...WBe.keys()];for(const n of r){let r=WBe.get(n);if(!r)continue;if(t&&r.shortcutId!==t)continue;const o=e[r.shortcutId]??[],i=jBe[r.shortcutId]??[];if(NBe(o,i))continue;const s=r.internalUnsubscribeFn;r.internalUnsubscribeFn=async()=>{},await s();const a=await GBe(r.shortcutId,r.windowForLocalShortcuts,r.onShortcutPressedListener);r=WBe.get(n),r?r.internalUnsubscribeFn=a:await a()}},QBe=new Map,XBe=new Map;let eHe=0;const tHe=new Map,rHe={config:{name:"Notification",platforms:["web"]},isSupported:async()=>"Notification"in globalThis,show:async e=>{await nHe();const{title:t,body:r}=oHe(e.texts),{icon:n,image:o}=iHe(e.images??[]),i=new globalThis.Notification(t,{body:r,icon:n,image:o,silent:e.silent});sHe(i,e,aHe),QBe.set(e.id,i)},close:async e=>{const t=QBe.get(e);if(!t)throw new Error(`Notification not found in map by ID ${e}`);t.close(),QBe.delete(e)},subscribeForEvents:async(e,t)=>{const r=eHe++,n=tHe.get(e);if(n)n.set(r,t);else{tHe.set(e,new Map([[r,t]]));const n=XBe.get(e);n&&(n.forEach(e=>t(e)),XBe.delete(e))}return async()=>{const t=tHe.get(e);if(!t)throw new Error(`Listener not found in map by source ${e}`);if(!t.delete(r))throw new Error(`Listener not found in map by ID ${r}`);0===t.size&&tHe.delete(e)}}},nHe=async()=>{if("denied"===globalThis.Notification.permission||"default"===globalThis.Notification.permission&&"granted"!==await globalThis.Notification.requestPermission())throw new Error("Permission not granted for notifications")},oHe=e=>{let t,r="";return e.length>0&&(r=e[0].content,e.length>1&&(t=e.slice(1).map(e=>e.content).join("\n"))),{title:r,body:t}},iHe=e=>{let t,r;return e.length>0&&(t=e[0].url,e.length>1&&(r=e[1].url)),{icon:t,image:r}},sHe=(e,t,r)=>{const n=e=>r({notificationId:t.id,notificationSource:t.source,eventId:e});e.onshow=e=>n("show"),e.onclick=e=>n("click"),e.onclose=e=>n("close")},aHe=e=>{const t=tHe.get(e.notificationSource);if(t)t.forEach(t=>t(e));else{const t=XBe.get(e.notificationSource);t?t.push(e):XBe.set(e.notificationSource,[e])}},lHe={config:{name:"WindowManager"},createWindow:(e,t,r)=>{const n=e||"about:blank",o=r?.groupId?`${r.groupId}-${t}`:t,i=o||n;let s;i&&r?.saveSizeAndPosition&&(s=uHe(i),s&&(r.features={...r.features,...s}));const a=r?.openAsSibling?window.opener:window;if(!a)return null;const l=a.open(n,o,cHe(r?.features));if(!l)return null;if(i&&r?.saveSizeAndPosition){if(s){const e=()=>{if(gHe(l))return;
5991const e=pHe(l.screen),t=e.x+l.screen.availWidth/3,r=e.y+l.screen.availHeight/3,n=l.screen.availWidth/3,o=l.screen.availHeight/3;l.moveTo(t,r),l.resizeTo(n,o)};l.addEventListener("DOMContentLoaded",e,{once:!0})}const e=()=>{gHe(l)&&hHe(i,{left:l.screenLeft,top:l.screenTop,width:l.innerWidth,height:l.innerHeight})};l.addEventListener("blur",e)}return r?.store&&(l.window.ReduxStore=r.store),window.WindowManagerState||(window.WindowManagerState={}),l.window.WindowManagerState=window.WindowManagerState,l},getStore:()=>window.ReduxStore,getState:e=>window.WindowManagerState?.[e],addToState:(e,t)=>(window.WindowManagerState||(window.WindowManagerState={}),window.WindowManagerState[e]=t,t),removeFromState:e=>{window.WindowManagerState&&delete window.WindowManagerState[e]}},cHe=(e={})=>Object.keys(e).reduce((t,r)=>{const n=e[r];var o;return"boolean"==typeof n?t.push(`${r}=${n?"yes":"no"}`):"gotoWindowTitleBarColors"===r&&e.gotoWindowTitleBarColors?t.push(`${r}=${o=e.gotoWindowTitleBarColors,encodeURIComponent(JSON.stringify(o))}`):t.push(`${r}=${n}`),t},[]).join(",")||void 0,dHe="goto.container.WindowManagerSizeAndPosition",uHe=e=>{const t=localStorage.getItem(`${dHe}${e}`);if(t)try{return JSON.parse(t)}catch(e){}},hHe=(e,t)=>localStorage.setItem(`${dHe}${e}`,JSON.stringify(t)),pHe=e=>({x:e.availLeft??0,y:e.availTop??0}),gHe=e=>{const t=pHe(e.screen);return fHe(e.screenLeft,t.x,t.x+e.screen.availWidth)&&fHe(e.screenTop,t.y,t.y+e.screen.availHeight)&&e.innerWidth>
59910&&e.innerHeight>0},fHe=(e,t,r)=>e>=t&&e<=r,mHe="AppContainer",vHe=new class{constructor(t="web",r=!1){this.platform=t,this.isNative=r,this.plugins={},this.shouldMergePlugin=e=>!e.config?.platforms||e.config?.platforms.includes(this.platform),this.addPlugins(Object.values(e));const n=globalThis[mHe];n&&(this.platform=n.platform,this.isNative=!!n.isNative,this.addPlugins(Object.values(n.plugins)),n.bridgeIncompatiblePluginsPromise&&(this.plugins.DisplayMedia={config:{name:"DisplayMedia",platforms:["electron"]},load:async()=>(await n.bridgeIncompatiblePluginsPromise,globalThis?.BridgeIncompatiblePlugins?.DisplayMedia)})),this.plugins=new Proxy(this.plugins,{get:(e,t)=>{if(void 0===e[t]){let e=this;return new Proxy({},{get:(r,n)=>void 0===r[n]?e.pluginMethodNoop.bind(e,r,n,t):r[n]})}return e[t]}})}pluginMethodNoop(e,t,r){return Promise.reject(`${r} plugin not found for ${this.platform}.`)}isPluginAvailable(e){return this.plugins.hasOwnProperty(e)}addPlugin(e){if(!this.plugins.hasOwnProperty(e.config.name)||this.shouldMergePlugin(e))if(this.isNative&&!0===e.config.isAsync){const t={config:e.config,load:async()=>{await(globalThis[mHe].webContextPluginsPromise||Promise.reject(Error(`could not load async plugin ${e.config.name}, unsupported container version?`)));const t=globalThis.__LMIGoToContainerPrivate_WebContextPlugins__;return t&&t.hasOwnProperty(e.config.name)?t[e.config.name]:Promise.reject(Error(`${e.config.name} not found, async plugin failed to load in web context.`))}};this.plugins[e.config.name]=t}else this.plugins[e.config.name]=e}addPlugins(e){for(const t of e)this.addPlugin(t)}},bHe=vHe.plugins,yHe="ROUTE_TO",wHe=e=>{var t,r,n;const o=null===(n=null===(r=null===(t=null==e?void 0:e.exception)||void 0===t?void 0:t.values)||void 0===r?void 0:r[0].stacktrace)||void 0===n?void 0:n.frames;if(o){const t=o.filter(e=>e.module_metadata&&e.module_metadata.dsn).map(e=>e.module_metadata).slice(-1);t.length&&(e.extra={...e.extra,[yHe]:t})}return e},xHe=function(e,t){return r=>{const n=e(r),o=new Map,i=t||(e=>{const t=e.getEvent();return t?.extra?.[nDe]&&Array.isArray(t.extra[nDe])?t.extra[nDe]:[]});function s(t,n){const i=n?`${t}:${n}`:t;let s=o.get(i);if(!s){const a=lPe(t);if(!a)return;const l=WRe(a,r.tunnel);s=n?function(e,t){return r=>{const n=e(r);return{...n,send:async e=>{const r=oDe(e,["event","transaction","profile","replay_event"]);return r&&(r.release=t),n.send(e)}}}}(e,n)({...r,url:l}):e({...r,url:l}),o.set(i,s)}return[t,s]}return{send:async function(e){const t=i({envelope:e,getEvent:function(t){return oDe(e,t?.length?t:["event"])}}).map(e=>"string"==typeof e?s(e,void 0):s(e.dsn,e.release)).filter(e=>!!e),r=t.length?t:[["",n]],o=await Promise.all(r.map(([t,r])=>r.send(function(e,t){return GPe(t?{...e[0],dsn:t}:e[0],e[1])}(e,t))));return o[0]},flush:async function(e){const t=[...o.values(),n],r=await Promise.all(t.map(t=>t.flush(e)));return r.every(e=>e)}}}}(vDe,e=>{const t=e.getEvent();return t&&t.extra&&yHe in t.extra&&Array.isArray(t.extra[yHe])?t.extra[yHe]:[]}),_He=e=>{const t=[eze().name,rze().name],r=e.filter(e=>!t.includes(e.name));return r.push(lze()),r};window.document.body.style.fontFamily="var(--goto-font-family)",window.document.body.style.backgroundColor="var(--goto-background-color-default)";class kHe extends HTMLElement{constructor(){super();const e=this.attachShadow({mode:"open"}),t=document.createElement("chameleon-svg"),r=document.createElement("slot");r.onslotchange=()=>{var e,r;const n=null!==(r=null===(e=this.textContent)||void 0===e?void 0:e.trim())&&void 0!==r?r:"";n&&(this.textContent="",t.innerHTML=n)},e.appendChild(r),e.appendChild(t)}}customElements.define("chameleon-svg-v-next",kHe);const CHe=["@goto/insights.main","@goto/voice-main","inbox","@messaging","oos-meeting-app","@meetings","engagements","@goto/contacts-ui-extension","@contacts","@contact","contact-center","oos-training-app","oos-webinar-app","analytics"],SHe=["@contacts","@messages","@analytics-transcript","@meetings"];"/errored"===localStorage.getItem("goto-current-route")&&localStorage.removeItem("goto-current-route"),async function(){var e;try{const t=await fetch(location.href);return window.environment=t.headers.get("x-amz-meta-gotoenv"),console.log("window.environment",window.environment),null!==(e=window.environment)&&void 0!==e?e:Dv.E.PROD}catch{return Dv.E.PROD}}().then(async e=>{try{(e=>{if(iUe({dsn:"https://[email protected]/4505987624599552",release:FNe,environment:e,attachStacktrace:!0,beforeSend:wHe,transport:xHe,integrations:_He}),vHe.isPluginAvailable("ExecutionContext")){const{machineId:e}=bHe.ExecutionContext.getContext();t={id:e},eMe().setUser(t)}var t})(e),zNe.addChameleonStyles("7.14.0"),zNe.addExtensions(VRe),zNe.setNavigationOrder(CHe),zNe.setMeta({hostAppVersion:FNe,chameleonWebVersion:"10.5.1",chameleonCoreVersion:"7.14.0"}),zNe.setGlobalSearchCategoriesOrder(SHe),await zNe.start({environment:e})}catch(e){throw(0,Dv.g)().error(`shell encountered an error when starting: ${e}`,e instanceof Error?[e.name,e.message,e.stack]:void 0),zNe.showErrorPage(),(()=>{var e;const t=null===(e=globalThis.shell)||void 0===e?void 0:e.eventBus;if(!t)return;const r=t.subscribeTo(Dv.r),n=()=>{(()=>{var e;if(!BNe("reload-app-error-page-on-reconnect",!1))return!1;const t=(new Date).getTime(),r=JSON.parse(null!==(e=localStorage.getItem(UNe))&&void 0!==e?e:JSON.stringify({lastReloadTimestamp:0,reloadAttemptCount:0}));let n=r.reloadAttemptCount,o=r.lastReloadTimestamp;return t-r.lastReloadTimestamp>=36e5&&(n=0,o=t,localStorage.setItem(UNe,JSON.stringify({lastReloadTimestamp:o,reloadAttemptCount:n}))),!(r.reloadAttemptCount>=2||(localStorage.setItem(UNe,JSON.stringify({lastReloadTimestamp:o,reloadAttemptCount:n+1})),0))})()&&(r.connected.removeListener(n),window.location.reload())};r.connected.addListener(n),window.addEventListener("unload",()=>{r.connected.removeListener(n)})})(),e}})}(),{}}()});
5992//# sourceMappingURL=index.db001cc74c185d56e618.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.