import{g as t,a as e,f as n}from"./p-083180bf.js";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function s(t,e,n){return t(n={path:e,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},n.exports),n.exports}function o(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach((function(n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})})),e}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e&&c(t.prototype,e),n&&c(t,n),t}var a=function(){function t(t){var e=this,n=this;this._status="Initial",this.onChange=function(t,e){n.options.onChange&&n.options.onChange(t,e)},this.onConnect=function(t){try{return e.status="Connected",e.options.onChange&&e.options.onChange(t,t),Promise.resolve(new Promise((function(t){e.resolvePromise=t})))}catch(t){return Promise.reject(t)}},this.onDisconnect=function(){n.status="Connecting",n.start()},this.options=t}var e=t.prototype;return e.start=function(){var t=this,e=0;this.status="Connecting";var n=function(){return t.status},r=h(this.options.attempts)||10,i=function(){if("Connected"!==n()){var i=new CustomEvent(t.options.contextName,{bubbles:!0,cancelable:!0,composed:!0,detail:{onConnect:t.onConnect,onChange:t.onChange,onDisconnect:t.onDisconnect}});h(t.options.element).dispatchEvent(i),"Connected"!==n()?++e>=r&&(t._interval&&clearInterval(t._interval),t.status="Timeout"):"Connected"===n()&&t._interval&&clearInterval(t._interval)}};return(h(this.options.pollingMs)||100)>0&&r>1&&(this._interval=setInterval(i,h(this.options.pollingMs)||100)),i(),this},e.stop=function(){return this._interval&&clearInterval(this._interval),this.resolvePromise&&this.resolvePromise(),this.status="Initial",this},u(t,[{key:"status",set:function(t){this._status=t,this.options.onStatus&&this.options.onStatus(t)},get:function(){return this._status}}]),t}(),f=function(){function t(t){var e=this;this.__listeners=[],this.connectListener=function(t){try{t.stopPropagation(),e.__listeners=[].concat(e.__listeners,[t.detail]);var n=function(n,r){try{var i=Promise.resolve(t.detail.onConnect(e.__current)).then((function(){}))}catch(t){return r(!0,t)}return i&&i.then?i.then(r.bind(null,!1),r.bind(null,!0)):r(!1,i)}(0,(function(n,r){var i,s;if(e.__listeners=(s=(i=e.__listeners).indexOf(t.detail),i.slice(0,s).concat(i.slice(s+1,i.length))),n)throw r;return r}));return Promise.resolve(n&&n.then?n.then((function(){})):void 0)}catch(t){return Promise.reject(t)}},this.options=t,this.__current=h(t.initialState)}var e=t.prototype;return e.start=function(){return h(this.options.element).addEventListener(this.options.contextName,this.connectListener),this},e.stop=function(){return h(this.options.element).removeEventListener(this.options.contextName,this.connectListener),this.__listeners.map((function(t){t.onDisconnect()})),this.__listeners=[],this},u(t,[{key:"context",set:function(t){var e=this.__current;this.__current=t,this.__listeners.forEach((function(n){return n.onChange(t,e)}))},get:function(){return h(this.__current)}},{key:"listeners",get:function(){return Object.freeze([].concat(this.__listeners))}}]),t}();function h(t){return"function"==typeof typeof t?t():t}
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */let C;String(Math.random()).slice(2),window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:t=>t}),
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
(()=>{try{const t={get capture(){return!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}})(),
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");let d=0;function l(t){C=t}function F(){C=null,d=0}const v=Symbol("haunted.hook"),m=Symbol("haunted.effects"),p=Symbol("haunted.layoutEffects");class w{update;host;virtual;[v];[m];[p];constructor(t,e){this.update=t,this.host=e,this[v]=new Map,this[m]=[],this[p]=[]}run(t){l(this);let e=t();return F(),e}_runEffects(t){let e=this[t];l(this);for(let t of e)t.call(this);F()}runEffects(){this._runEffects(m)}runLayoutEffects(){this._runEffects(p)}teardown(){this[v].forEach((t=>{"function"==typeof t.teardown&&t.teardown()}))}}Promise.resolve().then.bind(Promise.resolve());class g{id;state;constructor(t,e){this.id=t,this.state=e}}function y(t,...e){let n=d++,r=C[v],i=r.get(n);return i||(i=new t(n,C,...e),r.set(n,i)),i.update(...e)}function b(t){return y.bind(null,t)}function x(t){return b(class extends g{callback;lastValues;values;_teardown;constructor(e,n,r,i){super(e,n),t(n,this)}update(t,e){this.callback=t,this.values=e}call(){this.values&&!this.hasChanged()||this.run(),this.lastValues=this.values}run(){this.teardown(),this._teardown=this.callback.call(this.state)}teardown(){"function"==typeof this._teardown&&this._teardown()}hasChanged(){return!this.lastValues||this.values.some(((t,e)=>this.lastValues[e]!==t))}})}function E(t,e){t[m].push(e)}const O=x(E),j=(b(class extends g{Context;value;_ranEffect;_unsubscribe;constructor(t,e,n){super(t,e),this._updater=this._updater.bind(this),this._ranEffect=!1,this._unsubscribe=null,E(e,this)}update(t){if(this.state.virtual)throw new Error("can't be used with virtual components");return this.Context!==t&&(this._subscribe(t),this.Context=t),this.value}call(){this._ranEffect||(this._ranEffect=!0,this._unsubscribe&&this._unsubscribe(),this._subscribe(this.Context),this.state.update())}_updater(t){this.value=t,this.state.update()}_subscribe(t){const e={Context:t,callback:this._updater};this.state.host.dispatchEvent(new CustomEvent("haunted.context",{detail:e,bubbles:!0,cancelable:!0,composed:!0}));const{unsubscribe:n=null,value:r}=e;this.value=n?r:t.defaultValue,this._unsubscribe=n}teardown(){this._unsubscribe&&this._unsubscribe()}}),b(class extends g{value;values;constructor(t,e,n,r){super(t,e),this.value=n(),this.values=r}update(t,e){return this.hasChanged(e)&&(this.values=e,this.value=t()),this.value}hasChanged(t=[]){return t.some(((t,e)=>this.values[e]!==t))}}));x((function(t,e){t[p].push(e)}));const k=b(class extends g{args;constructor(t,e,n){super(t,e),this.updater=this.updater.bind(this),"function"==typeof n&&(n=n()),this.makeArgs(n)}update(){return this.args}updater(t){if("function"==typeof t){const e=t,[n]=this.args;t=e(n)}this.makeArgs(t),this.state.update()}makeArgs(t){this.args=Object.freeze([t,this.updater])}}),M=b(class extends g{reducer;currentState;constructor(t,e,n,r,i){super(t,e),this.dispatch=this.dispatch.bind(this),this.currentState=void 0!==i?i(r):r}update(t){return this.reducer=t,[this.currentState,this.dispatch]}dispatch(t){this.currentState=this.reducer(this.currentState,t),this.state.update()}}),S=t=>j((()=>({current:t})),[]);var I=6e4,P=60*I,N=24*P,$=function(t,e){e=e||{};var n=typeof t;if("string"===n&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"weeks":case"week":case"w":return 6048e5*n;case"days":case"day":case"d":return n*N;case"hours":case"hour":case"hrs":case"hr":case"h":return n*P;case"minutes":case"minute":case"mins":case"min":case"m":return n*I;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(t);if("number"===n&&isFinite(t))return e.long?function(t){var e=Math.abs(t);return e>=N?_(t,e,N,"day"):e>=P?_(t,e,P,"hour"):e>=I?_(t,e,I,"minute"):e>=1e3?_(t,e,1e3,"second"):t+" ms"}(t):function(t){var e=Math.abs(t);return e>=N?Math.round(t/N)+"d":e>=P?Math.round(t/P)+"h":e>=I?Math.round(t/I)+"m":e>=1e3?Math.round(t/1e3)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function _(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}var z=s((function(t,e){e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!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`."))}})(),e.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"],e.log=console.debug||console.log||(()=>{}),t.exports=function(t){function e(t){let r,i,s,o=null;function c(...t){if(!c.enabled)return;const n=c,i=Number(new Date);n.diff=i-(r||i),n.prev=r,n.curr=i,r=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";s++;const o=e.formatters[i];return"function"==typeof o&&(r=o.call(n,t[s]),t.splice(s,1),s--),r})),e.formatArgs.call(n,t),(n.log||e.log).apply(n,t)}return c.namespace=t,c.useColors=e.useColors(),c.color=e.selectColor(t),c.extend=n,c.destroy=e.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==e.namespaces&&(i=e.namespaces,s=e.enabled(t)),s),set:t=>{o=t}}),"function"==typeof e.init&&e.init(c),c}function n(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function r(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(r),...e.skips.map(r).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.slice(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=$,e.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(t).forEach((n=>{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}(e);const{formatters:n}=t.exports;n.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}));function J(){var n=e();return t(n)}function L(t,e){return void 0===e&&(e={}),W(J(),t,e)}function R(t,e){return X(J(),t,e)}var T=z("stencil-hook");function A(e){var r,i=t(e),s=(r=!1,new w((function(){T("Queue update on element",i),r||(r=!0,Promise.resolve().then((function(){T("Forced update on element",i),r=!1,n(i)})))}),i)),o=e.disconnectedCallback;if(!o)throw new Error("Stencil hooks requires `disconnectedCallback` to be defined (even if it's empty). This is because of how the Stencil compiler works internally");e.disconnectedCallback=function(){s.teardown(),D(o)};var c=e.connectedCallback;e.connectedCallback=function(){s.update(),D(c)};var u=e.render.bind(e);e.render=function(){var t=s.run(u);return s.runEffects(),t}}function D(t){"function"==typeof t&&t()}function Z(){return(Z=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var q=1e3,U=60*q,H=60*U,Q=24*H,V=function(t,e){e=e||{};var n=typeof t;if("string"===n&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"weeks":case"week":case"w":return 6048e5*n;case"days":case"day":case"d":return n*Q;case"hours":case"hour":case"hrs":case"hr":case"h":return n*H;case"minutes":case"minute":case"mins":case"min":case"m":return n*U;case"seconds":case"second":case"secs":case"sec":case"s":return n*q;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(t);if("number"===n&&isFinite(t))return e.long?function(t){var e=Math.abs(t);return e>=Q?B(t,e,Q,"day"):e>=H?B(t,e,H,"hour"):e>=U?B(t,e,U,"minute"):e>=q?B(t,e,q,"second"):t+" ms"}(t):function(t){var e=Math.abs(t);return e>=Q?Math.round(t/Q)+"d":e>=H?Math.round(t/H)+"h":e>=U?Math.round(t/U)+"m":e>=q?Math.round(t/q)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function B(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}var G,K=(function(t,e){e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!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`."))}})(),e.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"],e.log=console.debug||console.log||(()=>{}),t.exports=function(t){function e(t){let r,i=null;function s(...t){if(!s.enabled)return;const n=s,i=Number(new Date);n.diff=i-(r||i),n.prev=r,n.curr=i,r=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let o=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";o++;const s=e.formatters[i];return"function"==typeof s&&(r=s.call(n,t[o]),t.splice(o,1),o--),r})),e.formatArgs.call(n,t),(n.log||e.log).apply(n,t)}return s.namespace=t,s.useColors=e.useColors(),s.color=e.selectColor(t),s.extend=n,s.destroy=e.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null===i?e.enabled(t):i,set:t=>{i=t}}),"function"==typeof e.init&&e.init(s),s}function n(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function r(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(r),...e.skips.map(r).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=V,e.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(t).forEach((n=>{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}(e);const{formatters:n}=t.exports;n.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}(G={exports:{}},G.exports),G.exports)("useDomContext");function W(t,e,n){void 0===n&&(n={});var r=S(void 0),i=k(void 0),s=i[0],o=i[1],c=j((function(){var i;try{(i=new a(Z({contextName:e,element:t,onChange:function(t){r&&(r.current=t),o(t)}},n))).start()}catch(t){K("Listener failed to start",t)}return K("Listener initialized",i),{listener:i}}),[e,r]).listener;return O((function(){return K("Listener starting (or restarting)",c),c.start(),function(){K("Listener stopping (or restopping)",c),c.stop()}}),[c,t.isConnected]),s||(null==r?void 0:r.current)}function X(t,e,n){var r=j((function(){var r=new f({contextName:e,element:t,initialState:n});return r.start(),K("Provider initialized",r),r}),[e,t]);O((function(){return K("Provider starting (or restarting)",r),r.start(),function(){K("Provider stopping (or re-stopping)",r),r.stop()}}),[r,t.isConnected]);var i=M((function(t,e){var n;return K("New context value",e),n="function"==typeof e?e(r.context):e,r.context=n,r.context}),r.context);return[i[0],i[1],r]}export{r as a,z as b,s as c,f as d,i as e,O as f,o as g,W as h,L as i,M as j,k,J as l,S as m,A as n,R as o,a as s,j as u,X as y}