@amplitude/session-replay-browser 1.22.3 → 1.22.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/session-replay.d.ts +3 -3
- package/lib/cjs/session-replay.d.ts.map +1 -1
- package/lib/cjs/session-replay.js +131 -97
- package/lib/cjs/session-replay.js.map +1 -1
- package/lib/cjs/version.d.ts +1 -1
- package/lib/cjs/version.js +1 -1
- package/lib/cjs/version.js.map +1 -1
- package/lib/esm/session-replay.d.ts +3 -3
- package/lib/esm/session-replay.d.ts.map +1 -1
- package/lib/esm/session-replay.js +131 -97
- package/lib/esm/session-replay.js.map +1 -1
- package/lib/esm/version.d.ts +1 -1
- package/lib/esm/version.js +1 -1
- package/lib/esm/version.js.map +1 -1
- package/lib/scripts/console-plugin-min.js +2 -0
- package/lib/scripts/console-plugin-min.js.gz +0 -0
- package/lib/scripts/console-plugin-min.js.map +1 -0
- package/lib/scripts/session-replay-browser-esm.js +2 -0
- package/lib/scripts/session-replay-browser-esm.js.gz +0 -0
- package/lib/scripts/session-replay-browser-esm.js.map +1 -0
- package/lib/scripts/session-replay-browser-min.js +2 -0
- package/lib/scripts/session-replay-browser-min.js.gz +0 -0
- package/lib/scripts/session-replay-browser-min.js.map +1 -0
- package/package.json +3 -3
- package/lib/scripts/amplitude-min.js +0 -2
- package/lib/scripts/amplitude-min.js.gz +0 -0
- package/lib/scripts/amplitude-min.js.map +0 -1
- package/lib/scripts/amplitude-min.umd.js +0 -1
- package/lib/scripts/amplitude-min.umd.js.gz +0 -0
- package/lib/scripts/beacon-transport.d.ts +0 -28
- package/lib/scripts/beacon-transport.d.ts.map +0 -1
- package/lib/scripts/config/joined-config.d.ts +0 -13
- package/lib/scripts/config/joined-config.d.ts.map +0 -1
- package/lib/scripts/config/local-config.d.ts +0 -27
- package/lib/scripts/config/local-config.d.ts.map +0 -1
- package/lib/scripts/config/types.d.ts +0 -147
- package/lib/scripts/config/types.d.ts.map +0 -1
- package/lib/scripts/constants.d.ts +0 -29
- package/lib/scripts/constants.d.ts.map +0 -1
- package/lib/scripts/events/base-events-store.d.ts +0 -31
- package/lib/scripts/events/base-events-store.d.ts.map +0 -1
- package/lib/scripts/events/event-compressor.d.ts +0 -27
- package/lib/scripts/events/event-compressor.d.ts.map +0 -1
- package/lib/scripts/events/events-idb-store.d.ts +0 -52
- package/lib/scripts/events/events-idb-store.d.ts.map +0 -1
- package/lib/scripts/events/events-manager.d.ts +0 -13
- package/lib/scripts/events/events-manager.d.ts.map +0 -1
- package/lib/scripts/events/events-memory-store.d.ts +0 -15
- package/lib/scripts/events/events-memory-store.d.ts.map +0 -1
- package/lib/scripts/events/legacy-idb-types.d.ts +0 -26
- package/lib/scripts/events/legacy-idb-types.d.ts.map +0 -1
- package/lib/scripts/events/multi-manager.d.ts +0 -26
- package/lib/scripts/events/multi-manager.d.ts.map +0 -1
- package/lib/scripts/helpers.d.ts +0 -46
- package/lib/scripts/helpers.d.ts.map +0 -1
- package/lib/scripts/hooks/click.d.ts +0 -27
- package/lib/scripts/hooks/click.d.ts.map +0 -1
- package/lib/scripts/hooks/scroll.d.ts +0 -44
- package/lib/scripts/hooks/scroll.d.ts.map +0 -1
- package/lib/scripts/identifiers.d.ts +0 -11
- package/lib/scripts/identifiers.d.ts.map +0 -1
- package/lib/scripts/index.d.ts +0 -7
- package/lib/scripts/index.d.ts.map +0 -1
- package/lib/scripts/libs/finder.d.ts +0 -14
- package/lib/scripts/libs/finder.d.ts.map +0 -1
- package/lib/scripts/logger.d.ts +0 -13
- package/lib/scripts/logger.d.ts.map +0 -1
- package/lib/scripts/messages.d.ts +0 -7
- package/lib/scripts/messages.d.ts.map +0 -1
- package/lib/scripts/observers.d.ts +0 -24
- package/lib/scripts/observers.d.ts.map +0 -1
- package/lib/scripts/session-replay-factory.d.ts +0 -7
- package/lib/scripts/session-replay-factory.d.ts.map +0 -1
- package/lib/scripts/session-replay.d.ts +0 -56
- package/lib/scripts/session-replay.d.ts.map +0 -1
- package/lib/scripts/track-destination.d.ts +0 -37
- package/lib/scripts/track-destination.d.ts.map +0 -1
- package/lib/scripts/typings/session-replay.d.ts +0 -129
- package/lib/scripts/typings/session-replay.d.ts.map +0 -1
- package/lib/scripts/version.d.ts +0 -2
- package/lib/scripts/version.d.ts.map +0 -1
- package/lib/scripts/worker/compression.d.ts +0 -2
- package/lib/scripts/worker/compression.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).amplitude={})}(this,(function(e){"use strict";var t=function(e,r){return t=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])},t(e,r)};function r(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function s(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(s.prototype=r.prototype,new s)}var s=function(){return s=Object.assign||function(e){for(var t,r=1,s=arguments.length;r<s;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)};function n(e,t,r,s){return new(r||(r=Promise))((function(n,o){function i(e){try{l(s.next(e))}catch(e){o(e)}}function a(e){try{l(s.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}l((s=s.apply(e,t||[])).next())}))}function o(e,t){var r,s,n,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=a(0),i.throw=a(1),i.return=a(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(r=1,s&&(n=2&a[0]?s.return:a[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,a[1])).done)return n;switch(s=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,s=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(n=o.trys,(n=n.length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){o.label=a[1];break}if(6===a[0]&&o.label<n[1]){o.label=n[1],n=a;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(a);break}n[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],s=0}finally{r=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function i(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],s=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var s,n,o=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(s=o.next()).done;)i.push(s.value)}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}function l(e,t,r){if(r||2===arguments.length)for(var s,n=0,o=t.length;n<o;n++)!s&&n in t||(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var c,u="".concat("AMP","_unsent"),h="https://api2.amplitude.com/2/httpapi";!function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(c||(c={}));var p,d=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},f=function(e){return{promise:e||Promise.resolve()}};!function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"}(p||(p={}));var m="Amplitude Logger ",g=function(){function e(){this.logLevel=p.None}return e.prototype.disable=function(){this.logLevel=p.None},e.prototype.enable=function(e){void 0===e&&(e=p.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<p.Verbose||console.log("".concat(m,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<p.Warn||console.warn("".concat(m,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<p.Error||console.error("".concat(m,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<p.Debug||console.log("".concat(m,"[Debug]: ").concat(e.join(" ")))},e}(),y=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:"$default_instance",logLevel:p.Warn,loggerProvider:new g,offline:!1,optOut:!1,serverUrl:h,serverZone:"US",useBatch:!1}},v=function(){function e(e){var t,r,s,n;this._optOut=!1;var o=y();this.apiKey=e.apiKey,this.flushIntervalMillis=null!==(t=e.flushIntervalMillis)&&void 0!==t?t:o.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||o.flushQueueSize,this.instanceName=e.instanceName||o.instanceName,this.loggerProvider=e.loggerProvider||o.loggerProvider,this.logLevel=null!==(r=e.logLevel)&&void 0!==r?r:o.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=void 0!==e.offline?e.offline:o.offline,this.optOut=null!==(s=e.optOut)&&void 0!==s?s:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!==(n=e.useBatch)&&void 0!==n?n:o.useBatch,this.loggerProvider.enable(this.logLevel);var i=b(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=i.serverZone,this.serverUrl=i.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),w=function(e,t){return"EU"===e?t?"https://api.eu.amplitude.com/batch":"https://api.eu.amplitude.com/2/httpapi":t?"https://api2.amplitude.com/batch":h},b=function(e,t,r){if(void 0===e&&(e=""),void 0===t&&(t=y().serverZone),void 0===r&&(r=y().useBatch),e)return{serverUrl:e,serverZone:void 0};var s=["US","EU"].includes(t)?t:y().serverZone;return{serverZone:s,serverUrl:w(s,r)}},S=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:C(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),C=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},x=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach((function(t){e(t)})),this.queue=[])},e}(),I=function(){return I=Object.assign||function(e){for(var t,r=1,s=arguments.length;r<s;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},I.apply(this,arguments)};function k(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],s=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function O(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var s,n,o=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(s=o.next()).done;)i.push(s.value)}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}"function"==typeof SuppressedError&&SuppressedError;var E=function(e,t){var r,s,n=typeof e;if(n!==typeof t)return!1;try{for(var o=k(["string","number","boolean","undefined"]),i=o.next();!i.done;i=o.next()){if(i.value===n)return e===t}}catch(e){r={error:e}}finally{try{i&&!i.done&&(s=o.return)&&s.call(o)}finally{if(r)throw r.error}}if(null==e&&null==t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;var a=Array.isArray(e),l=Array.isArray(t);if(a!==l)return!1;if(!a||!l){var c=Object.keys(e).sort(),u=Object.keys(t).sort();if(!E(c,u))return!1;var h=!0;return Object.keys(e).forEach((function(r){E(e[r],t[r])||(h=!1)})),h}for(var p=0;p<e.length;p++)if(!E(e[p],t[p]))return!1;return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,s=new Array(r);r--;)s[r]=[t[r],e[t[r]]];return s});var A,R=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=I({},this.identity.userProperties),r=I(I({},this.identity),{userProperties:t});return{setUserId:function(e){return r.userId=e,this},setDeviceId:function(e){return r.deviceId=e,this},setUserProperties:function(e){return r.userProperties=e,this},setOptOut:function(e){return r.optOut=e,this},updateUserProperties:function(e){var t,s,n,o,i,a,l=r.userProperties||{};try{for(var c=k(Object.entries(e)),u=c.next();!u.done;u=c.next()){var h=O(u.value,2),p=h[0],d=h[1];switch(p){case"$set":try{for(var f=(n=void 0,k(Object.entries(d))),m=f.next();!m.done;m=f.next()){var g=O(m.value,2),y=g[0],v=g[1];l[y]=v}}catch(e){n={error:e}}finally{try{m&&!m.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}break;case"$unset":try{for(var w=(i=void 0,k(Object.keys(d))),b=w.next();!b.done;b=w.next()){delete l[y=b.value]}}catch(e){i={error:e}}finally{try{b&&!b.done&&(a=w.return)&&a.call(w)}finally{if(i)throw i.error}}break;case"$clearAll":l={}}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(s=c.return)&&s.call(c)}finally{if(t)throw t.error}}return r.userProperties=l,this},commit:function(){return e.setIdentity(r),this}}},e.prototype.getIdentity=function(){return I({},this.identity)},e.prototype.setIdentity=function(e){var t=I({},this.identity);this.identity=I({},e),E(t,this.identity)||this.listeners.forEach((function(t){t(e)}))},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),M="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:self,P=function(){function e(){this.identityStore=new R,this.eventBridge=new x,this.applicationContextProvider=new S}return e.getInstance=function(t){return M.analyticsConnectorInstances||(M.analyticsConnectorInstances={}),M.analyticsConnectorInstances[t]||(M.analyticsConnectorInstances[t]=new e),M.analyticsConnectorInstances[t]},e}(),N=function(e,t,r,s,n){return void 0===n&&(n=null),function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var a=r(),l=a.logger,c=a.logLevel;if(c&&c<p.Debug||!c||!l)return e.apply(n,o);var u,h={type:"invoke public method",name:t,args:o,stacktrace:(u=1,void 0===u&&(u=0),((new Error).stack||"").split("\n").slice(2+u).map((function(e){return e.trim()}))),time:{start:(new Date).toISOString()},states:{}};s&&h.states&&(h.states.before=s());var d=e.apply(n,o);return d&&d.promise?d.promise.then((function(){s&&h.states&&(h.states.after=s()),h.time&&(h.time.end=(new Date).toISOString()),l.debug(JSON.stringify(h,null,2))})):(s&&h.states&&(h.states.after=s()),h.time&&(h.time.end=(new Date).toISOString()),l.debug(JSON.stringify(h,null,2))),d}},T=function(){function e(){}return e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,r,s,n,o,i,a,l,u,h,p,d,f,m,g,y,v,w,b,S,C,x;if("object"!=typeof e)return null;var I=e.code||0,k=this.buildStatus(I);switch(k){case c.Success:return{status:k,statusCode:I,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(r=e.payload_size_bytes)&&void 0!==r?r:0,serverUploadTime:null!==(s=e.server_upload_time)&&void 0!==s?s:0}};case c.Invalid:return{status:k,statusCode:I,body:{error:null!==(n=e.error)&&void 0!==n?n:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(i=e.events_with_invalid_fields)&&void 0!==i?i:{},eventsWithMissingFields:null!==(a=e.events_with_missing_fields)&&void 0!==a?a:{},eventsWithInvalidIdLengths:null!==(l=e.events_with_invalid_id_lengths)&&void 0!==l?l:{},epsThreshold:null!==(u=e.eps_threshold)&&void 0!==u?u:0,exceededDailyQuotaDevices:null!==(h=e.exceeded_daily_quota_devices)&&void 0!==h?h:{},silencedDevices:null!==(p=e.silenced_devices)&&void 0!==p?p:[],silencedEvents:null!==(d=e.silenced_events)&&void 0!==d?d:[],throttledDevices:null!==(f=e.throttled_devices)&&void 0!==f?f:{},throttledEvents:null!==(m=e.throttled_events)&&void 0!==m?m:[]}};case c.PayloadTooLarge:return{status:k,statusCode:I,body:{error:null!==(g=e.error)&&void 0!==g?g:""}};case c.RateLimit:return{status:k,statusCode:I,body:{error:null!==(y=e.error)&&void 0!==y?y:"",epsThreshold:null!==(v=e.eps_threshold)&&void 0!==v?v:0,throttledDevices:null!==(w=e.throttled_devices)&&void 0!==w?w:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(S=e.exceeded_daily_quota_devices)&&void 0!==S?S:{},exceededDailyQuotaUsers:null!==(C=e.exceeded_daily_quota_users)&&void 0!==C?C:{},throttledEvents:null!==(x=e.throttled_events)&&void 0!==x?x:[]}};case c.Timeout:default:return{status:k,statusCode:I}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?c.Success:429===e?c.RateLimit:413===e?c.PayloadTooLarge:408===e?c.Timeout:e>=400&&e<500?c.Invalid:e>=500?c.Failed:c.Unknown},e}(),L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.send=function(e,t){return n(this,void 0,void 0,(function(){var r,s,n;return o(this,(function(o){switch(o.label){case 0:if("undefined"==typeof fetch)throw new Error("FetchTransport is not supported");return r={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(t),method:"POST"},[4,fetch(e,r)];case 1:return[4,(s=o.sent()).text()];case 2:n=o.sent();try{return[2,this.buildResponse(JSON.parse(n))]}catch(e){return[2,this.buildResponse({code:s.status})]}return[2]}}))}))},t}(T);!function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(A||(A={}));var D,F="[Amplitude]",_="".concat(F," Session Replay ID"),B=A.US,U="".concat(F," Session Replay Debug"),j="amp-mask";!function(e){e.GET_SR_PROPS="get-sr-props",e.DEBUG_INFO="debug-info",e.FETCH_REQUEST="fetch-request"}(D||(D={}));var z,W=function(){function e(e){this.logger=e,this.log=this.getSafeMethod("log"),this.warn=this.getSafeMethod("warn"),this.error=this.getSafeMethod("error"),this.debug=this.getSafeMethod("debug")}return e.prototype.getSafeMethod=function(e){var t;if(!this.logger)return function(){};var r=this.logger[e];return"function"==typeof r?(null!==(t=r.__rrweb_original__)&&void 0!==t?t:r).bind(this.logger):function(){}},e.prototype.enable=function(e){this.logger.enable(e)},e.prototype.disable=function(){this.logger.disable()},e}(),V=function(){return{flushMaxRetries:2,logLevel:p.Warn,loggerProvider:new g,transportProvider:new L}},G=function(e){function t(t,r){var n,o=this,i=V();return(o=e.call(this,s(s({transportProvider:i.transportProvider,loggerProvider:new W(r.loggerProvider||i.loggerProvider)},r),{apiKey:t}))||this).flushMaxRetries=void 0!==r.flushMaxRetries&&r.flushMaxRetries<=i.flushMaxRetries?r.flushMaxRetries:i.flushMaxRetries,o.apiKey=t,o.sampleRate=r.sampleRate||0,o.serverZone=r.serverZone||B,o.configServerUrl=r.configServerUrl,o.trackServerUrl=r.trackServerUrl,o.shouldInlineStylesheet=r.shouldInlineStylesheet,o.version=r.version,o.performanceConfig=r.performanceConfig,o.storeType=null!==(n=r.storeType)&&void 0!==n?n:"idb",r.privacyConfig&&(o.privacyConfig=r.privacyConfig),r.debugMode&&(o.debugMode=r.debugMode),r.experimental&&(o.experimental=r.experimental),o}return r(t,e),t}(v),Z=Object.defineProperty,Y=(e,t,r)=>((e,t,r)=>t in e?Z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),J=Object.defineProperty,q=(e,t,r)=>((e,t,r)=>t in e?J(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),K=(e=>(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))(K||{});const X={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},H={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},$={};function Q(e){if($[e])return $[e];const t=globalThis[e],r=t.prototype,s=e in X?X[e]:void 0,n=Boolean(s&&s.every((e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))}))),o=e in H?H[e]:void 0,i=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(n&&i&&!globalThis.Zone)return $[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?$[e]=o:r}catch{return r}}const ee={};function te(e,t,r){var s;const n=`${e}.${String(r)}`;if(ee[n])return ee[n].call(t);const o=Q(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(ee[n]=i,i.call(t)):t[r]}const re={};function se(e,t,r){const s=`${e}.${String(r)}`;if(re[s])return re[s].bind(t);const n=Q(e)[r];return"function"!=typeof n?t[r]:(re[s]=n,n.bind(t))}const ne={childNodes:function(e){return te("Node",e,"childNodes")},parentNode:function(e){return te("Node",e,"parentNode")},parentElement:function(e){return te("Node",e,"parentElement")},textContent:function(e){return te("Node",e,"textContent")},contains:function(e,t){return se("Node",e,"contains")(t)},getRootNode:function(e){return se("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?te("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?te("Element",e,"shadowRoot"):null},querySelector:function(e,t){return te("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return te("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Q("MutationObserver").constructor}};function oe(e){return e.nodeType===e.ELEMENT_NODE}function ie(e){const t=e&&"host"in e&&"mode"in e&&ne.host(e)||null;return Boolean(t&&"shadowRoot"in t&&ne.shadowRoot(t)===e)}function ae(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function le(e){try{const r=e.rules||e.cssRules;if(!r)return null;let s=e.href;!s&&e.ownerNode&&e.ownerNode.ownerDocument&&(s=e.ownerNode.ownerDocument.location.href);const n=Array.from(r,(e=>ce(e,s))).join("");return(t=n).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(e){return null}var t}function ce(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=le(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const 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){t=e.cssText}return e.styleSheet.href?be(t,e.styleSheet.href):t}{let r=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(r)),t?be(r,t):r}}class ue{constructor(){q(this,"idNodeMap",new Map),q(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function he({element:e,maskInputOptions:t,tagName:r,type:s,value:n,maskInputFn:o}){let i=n||"";const a=s&&pe(s);return(t[r.toLowerCase()]||a&&t[a])&&(i=o?o(i,e):"*".repeat(i.length)),i}function pe(e){return e.toLowerCase()}const de="__rrweb_original__";function fe(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?pe(t):null}function me(e,t){let r;try{r=new URL(e,t??window.location.href)}catch(e){return null}const s=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==s?void 0:s[1])??null}const ge=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ye=/^(?:[a-z+]+:)?\/\//i,ve=/^www\..*/i,we=/^(data:)([^,]*),(.*)/i;function be(e,t){return(e||"").replace(ge,((e,r,s,n,o,i)=>{const a=s||o||i,l=r||n||"";if(!a)return e;if(ye.test(a)||ve.test(a))return`url(${l}${a}${l})`;if(we.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${l})`;const c=t.split("/"),u=a.split("/");c.pop();for(const e of u)"."!==e&&(".."===e?c.pop():c.push(e));return`url(${l}${c.join("/")}${l})`}))}function Se(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Ce(e,t){return function(e,t,r=!1){const s=Array.from(t.childNodes),n=[];let o=0;if(s.length>1&&e&&"string"==typeof e){let t=Se(e,r);const i=t.length/e.length;for(let a=1;a<s.length;a++)if(s[a].textContent&&"string"==typeof s[a].textContent){const l=Se(s[a].textContent,r),c=100;let u=3;for(;u<l.length&&(l[u].match(/[a-zA-Z0-9]/)||-1!==l.indexOf(l.substring(0,u),1));u++);for(;u<l.length;u++){let h=l.substring(0,u),p=t.split(h),d=-1;if(2===p.length)d=p[0].length;else if(p.length>2&&""===p[0]&&""!==s[a-1].textContent)d=t.indexOf(h,1);else if(1===p.length){if(h=h.substring(0,h.length-1),p=t.split(h),p.length<=1)return n.push(e),n;u=c+1}else u===l.length-1&&(d=t.indexOf(h));if(p.length>=2&&u>c){const e=s[a-1].textContent;if(e&&"string"==typeof e){const r=Se(e).length;d=t.indexOf(h,r)}-1===d&&(d=p[0].length)}if(-1!==d){let a=Math.floor(d/i);for(;a>0&&a<e.length;){if(o+=1,o>50*s.length)return n.push(e),n;const l=Se(e.substring(0,a),r);if(l.length===d){n.push(e.substring(0,a)),e=e.substring(a),t=t.substring(d);break}l.length<d?a+=Math.max(1,Math.floor((d-l.length)/i)):a-=Math.max(1,Math.floor((l.length-d)*i))}break}}}}return n.push(e),n}(e,t).join("/* rr_split */")}let xe=1;const Ie=new RegExp("[^a-z0-9-_:]");function ke(){return xe++}let Oe,Ee;const Ae=/^[^ \t\n\r\u000c]+/,Re=/^[, \t\n\r\u000c]+/;const Me=new WeakMap;function Pe(e,t){return t&&""!==t.trim()?Te(e,t):t}function Ne(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function Te(e,t){let r=Me.get(e);if(r||(r=e.createElement("a"),Me.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function Le(e,t,r,s){return s?"src"===r||"href"===r&&("use"!==t||"#"!==s[0])||"xlink:href"===r&&"#"!==s[0]?Pe(e,s):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;let r=0;function s(e){let s;const n=e.exec(t.substring(r));return n?(s=n[0],r+=s.length,s):""}const n=[];for(;s(Re),!(r>=t.length);){let o=s(Ae);if(","===o.slice(-1))o=Pe(e,o.substring(0,o.length-1)),n.push(o);else{let s="";o=Pe(e,o);let i=!1;for(;;){const e=t.charAt(r);if(""===e){n.push((o+s).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){r+=1,n.push((o+s).trim());break}"("===e&&(i=!0)}s+=e,r+=1}}}return n.join(", ")}(e,s):"style"===r?be(s,Te(e)):"object"===t&&"data"===r?Pe(e,s):s:Pe(e,s):s}function De(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function Fe(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&Fe(ne.parentNode(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&Fe(ne.parentNode(e),t,r)}function _e(e,t,r,s){let n;if(oe(e)){if(n=e,!ne.childNodes(n).length)return!1}else{if(null===ne.parentElement(e))return!1;n=ne.parentElement(e)}try{if("string"==typeof t){if(s){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(Fe(n,t,s))return!0;if(r)if(s){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(e){}return!1}function Be(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:i,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:c,maskInputFn:u,dataURLOptions:h={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:f,newlyAddedElement:m=!1,cssCaptured:g=!1}=t,y=function(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return 1===r?void 0:r}(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:K.Document,childNodes:[],compatMode:e.compatMode}:{type:K.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:K.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return function(e,t){const{doc:r,blockClass:s,blockSelector:n,inlineStylesheet:o,maskInputOptions:i={},maskInputFn:a,dataURLOptions:l={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:d}=t,f=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,s,n),m=function(e){if(e instanceof HTMLFormElement)return"form";const t=pe(e.tagName);return Ie.test(t)?"div":t}(e);let g={};const y=e.attributes.length;for(let t=0;t<y;t++){const s=e.attributes[t];De(m,s.name,s.value)||(g[s.name]=Le(r,m,pe(s.name),s.value))}if("link"===m&&o){const t=Array.from(r.styleSheets).find((t=>t.href===e.href));let s=null;t&&(s=le(t)),s&&(delete g.rel,delete g.href,g._cssText=s)}if("style"===m&&e.sheet){let t=le(e.sheet);t&&(e.childNodes.length>1&&(t=Ce(t,e)),g._cssText=t)}if("input"===m||"textarea"===m||"select"===m){const t=e.value,r=e.checked;"radio"!==g.type&&"checkbox"!==g.type&&"submit"!==g.type&&"button"!==g.type&&t?g.value=he({element:e,type:fe(e),tagName:m,value:t,maskInputOptions:i,maskInputFn:a}):r&&(g.checked=r)}"option"===m&&(e.selected&&!i.select?g.selected=!0:delete g.selected);"dialog"===m&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===m&&u)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let r=0;r<e.width;r+=50)for(let s=0;s<e.height;s+=50){const n=t.getImageData,o=de in n?n[de]:n;if(new Uint32Array(o.call(t,r,s,Math.min(50,e.width-r),Math.min(50,e.height-s)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(g.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),s=r.createElement("canvas");s.width=e.width,s.height=e.height;t!==s.toDataURL(l.type,l.quality)&&(g.rr_dataURL=t)}if("img"===m&&c){Oe||(Oe=r.createElement("canvas"),Ee=Oe.getContext("2d"));const t=e,s=t.currentSrc||t.getAttribute("src")||"<unknown-src>",n=t.crossOrigin,o=()=>{t.removeEventListener("load",o);try{Oe.width=t.naturalWidth,Oe.height=t.naturalHeight,Ee.drawImage(t,0,0),g.rr_dataURL=Oe.toDataURL(l.type,l.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o));console.warn(`Cannot inline img src=${s}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(n?g.crossOrigin=n:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}if("audio"===m||"video"===m){const t=g;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}p||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop));if(f){const{width:t,height:r}=e.getBoundingClientRect();g={class:g.class,rr_width:`${t}px`,rr_height:`${r}px`}}"iframe"!==m||h(g.src)||(e.contentDocument||(g.rr_src=g.src),delete g.src);let v;try{customElements.get(m)&&(v=!0)}catch(e){}return{type:K.Element,tagName:m,attributes:g,childNodes:[],isSVG:Ne(e)||void 0,needBlock:f,rootId:d,isCustom:v}}(e,{doc:r,blockClass:n,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:u,dataURLOptions:h,inlineImages:p,recordCanvas:d,keepIframeSrcFn:f,newlyAddedElement:m,rootId:y});case e.TEXT_NODE:return function(e,t){const{needsMask:r,maskTextFn:s,rootId:n,cssCaptured:o}=t,i=ne.parentNode(e),a=i&&i.tagName;let l="";const c="STYLE"===a||void 0,u="SCRIPT"===a||void 0;u?l="SCRIPT_PLACEHOLDER":o||(l=ne.textContent(e),c&&l&&(l=be(l,Te(t.doc))));!c&&!u&&l&&r&&(l=s?s(l,ne.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:K.Text,textContent:l||"",rootId:n}}(e,{doc:r,needsMask:i,maskTextFn:c,rootId:y,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:K.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:K.Comment,textContent:ne.textContent(e)||"",rootId:y};default:return!1}}function Ue(e){return null==e?"":e.toLowerCase()}function je(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:o,maskTextClass:i,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:c=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w=5e3,onStylesheetLoad:b,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:x=!1,cssCaptured:I=!1}=t;let{needsMask:k}=t,{preserveWhiteSpace:O=!0}=t;if(!k){k=_e(e,i,a,void 0===k)}const E=Be(e,{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:k,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,keepIframeSrcFn:C,newlyAddedElement:x,cssCaptured:I});if(!E)return console.warn(e,"not serialized"),null;let A;A=s.hasNode(e)?s.getId(e):function(e,t){if(t.comment&&e.type===K.Comment)return!0;if(e.type===K.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===me(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Ue(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Ue(e.attributes.name)||"icon"===Ue(e.attributes.rel)||"apple-touch-icon"===Ue(e.attributes.rel)||"shortcut icon"===Ue(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Ue(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Ue(e.attributes.property).match(/^(og|twitter|fb):/)||Ue(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Ue(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Ue(e.attributes.name)||"googlebot"===Ue(e.attributes.name)||"bingbot"===Ue(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Ue(e.attributes.name)||"generator"===Ue(e.attributes.name)||"framework"===Ue(e.attributes.name)||"publisher"===Ue(e.attributes.name)||"progid"===Ue(e.attributes.name)||Ue(e.attributes.property).match(/^article:/)||Ue(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Ue(e.attributes.name)||"yandex-verification"===Ue(e.attributes.name)||"csrf-token"===Ue(e.attributes.name)||"p:domain_verify"===Ue(e.attributes.name)||"verify-v1"===Ue(e.attributes.name)||"verification"===Ue(e.attributes.name)||"shopify-checkout-api-token"===Ue(e.attributes.name)))return!0}}return!1}(E,d)||!O&&E.type===K.Text&&!E.textContent.replace(/^\s+|\s+$/gm,"").length?-2:ke();const R=Object.assign(E,{id:A});if(s.add(e,R),-2===A)return null;y&&y(e);let M=!l;if(R.type===K.Element){M=M&&!R.needBlock,delete R.needBlock;const t=ne.shadowRoot(e);t&&ae(t)&&(R.isShadowHost=!0)}if((R.type===K.Document||R.type===K.Element)&&M){d.headWhitespace&&R.type===K.Element&&"head"===R.tagName&&(O=!1);const t={doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:k,maskTextClass:i,maskTextSelector:a,skipChild:l,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C,cssCaptured:!1};if(R.type===K.Element&&"textarea"===R.tagName&&void 0!==R.attributes.value);else{R.type===K.Element&&void 0!==R.attributes._cssText&&"string"==typeof R.attributes._cssText&&(t.cssCaptured=!0);for(const r of Array.from(ne.childNodes(e))){const e=je(r,t);e&&R.childNodes.push(e)}}let x=null;if(oe(e)&&(x=ne.shadowRoot(e)))for(const e of Array.from(ne.childNodes(x))){const r=je(e,t);r&&(ae(x)&&(r.isShadow=!0),R.childNodes.push(r))}}const P=ne.parentNode(e);return P&&ie(P)&&ae(P)&&(R.isShadow=!0),R.type===K.Element&&"iframe"===R.tagName&&function(e,t,r){const s=e.contentWindow;if(!s)return;let n,o=!1;try{n=s.document.readyState}catch(e){return}if("complete"!==n){const s=setTimeout((()=>{o||(t(),o=!0)}),r);return void e.addEventListener("load",(()=>{clearTimeout(s),o=!0,t()}))}const i="about:blank";if(s.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,(()=>{const t=e.contentDocument;if(t&&v){const r=je(t,{doc:t,mirror:s,blockClass:n,blockSelector:o,needsMask:k,maskTextClass:i,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C});r&&v(e,r)}}),w),R.type===K.Element&&"link"===R.tagName&&"string"==typeof R.attributes.rel&&("stylesheet"===R.attributes.rel||"preload"===R.attributes.rel&&"string"==typeof R.attributes.href&&"css"===me(R.attributes.href))&&function(e,t,r){let s,n=!1;try{s=e.sheet}catch(e){return}if(s)return;const o=setTimeout((()=>{n||(t(),n=!0)}),r);e.addEventListener("load",(()=>{clearTimeout(o),n=!0,t()}))}(e,(()=>{if(b){const t=je(e,{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:k,maskTextClass:i,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C});t&&b(e,t)}}),S),R}function ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function We(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof 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 s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),r}var Ve={exports:{}},Ge=String,Ze=function(){return{isColorSupported:!1,reset:Ge,bold:Ge,dim:Ge,italic:Ge,underline:Ge,inverse:Ge,hidden:Ge,strikethrough:Ge,black:Ge,red:Ge,green:Ge,yellow:Ge,blue:Ge,magenta:Ge,cyan:Ge,white:Ge,gray:Ge,bgBlack:Ge,bgRed:Ge,bgGreen:Ge,bgYellow:Ge,bgBlue:Ge,bgMagenta:Ge,bgCyan:Ge,bgWhite:Ge}};Ve.exports=Ze(),Ve.exports.createColors=Ze;var Ye=Ve.exports;const Je=We(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let qe=Ye,Ke=Je,Xe=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=qe.isColorSupported),Ke&&e&&(t=Ke(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=qe.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var He=Xe;Xe.default=Xe;var $e={};$e.isClean=Symbol("isClean"),$e.my=Symbol("my");const Qe={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let et=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let 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");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",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")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Qe[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=Qe[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(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)}};var tt=et;et.default=et;let rt=tt;function st(e,t){new rt(t).stringify(e)}var nt=st;st.default=st;let{isClean:ot,my:it}=$e,at=He,lt=tt,ct=nt;function ut(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>ut(e,r))):("object"===o&&null!==n&&(n=ut(n)),r[s]=n)}return r}let ht=class{constructor(e={}){this.raws={},this[ot]=!1,this[it]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ut(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new at(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[ot]){this[ot]=!1;let e=this;for(;e=e.parent;)e[ot]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let 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){let s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}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}}raw(e,t){return(new lt).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ct){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var pt=ht;ht.default=ht;let dt=pt,ft=class extends dt{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var mt=ft;ft.default=ft;var gt={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}};let{SourceMapConsumer:yt,SourceMapGenerator:vt}=Je,{existsSync:wt,readFileSync:bt}=Je,{dirname:St,join:Ct}=Je;let xt=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=St(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new yt(this.text)),this.consumerCache}decodeInline(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 t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=St(e),wt(e))return this.mapFile=e,bt(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof yt)return vt.fromSourceMap(t).toString();if(t instanceof vt)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=Ct(St(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var It=xt;xt.default=xt;let{SourceMapConsumer:kt,SourceMapGenerator:Ot}=Je,{fileURLToPath:Et,pathToFileURL:At}=Je,{isAbsolute:Rt,resolve:Mt}=Je,{nanoid:Pt}=gt,Nt=Je,Tt=He,Lt=It,Dt=Symbol("fromOffsetCache"),Ft=Boolean(kt&&Ot),_t=Boolean(Mt&&Rt),Bt=class{constructor(e,t={}){if(null==e||"object"==typeof 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&&(!_t||/^\w+:\/\//.test(t.from)||Rt(t.from)?this.file=t.from:this.file=Mt(t.from)),_t&&Ft){let e=new Lt(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+Pt(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new Tt(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new Tt(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(At&&(n.input.url=At(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Dt])r=this[Dt];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[Dt]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Mt(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=Rt(a.source)?At(a.source):new URL(a.source,this.map.consumer().sourceRoot||At(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!Et)throw new Error("file: protocol is not available in this PostCSS build");l.file=Et(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Ut=Bt;Bt.default=Bt,Nt&&Nt.registerInput&&Nt.registerInput(Bt);let{SourceMapConsumer:jt,SourceMapGenerator:zt}=Je,{dirname:Wt,relative:Vt,resolve:Gt,sep:Zt}=Je,{pathToFileURL:Yt}=Je,Jt=Ut,qt=Boolean(jt&&zt),Kt=Boolean(Wt&&Gt&&Vt&&Zt);var Xt=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let 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";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||Wt(e.file);!1===this.mapOpts.sourcesContent?(t=new jt(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Kt&&qt&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=zt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new zt({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]}generateString(){this.css="",this.map=new zt({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Wt(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Wt(Gt(r,this.mapOpts.annotation)));let s=Vt(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new Jt(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(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))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Yt){let t=Yt(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Zt&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Ht=pt,$t=class extends Ht{constructor(e){super(e),this.type="comment"}};var Qt=$t;$t.default=$t;let er,tr,rr,sr,{isClean:nr,my:or}=$e,ir=mt,ar=Qt,lr=pt;function cr(e){return e.map((e=>(e.nodes&&(e.nodes=cr(e.nodes)),delete e.source,e)))}function ur(e){if(e[nr]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)ur(t)}let hr=class e extends lr{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=cr(er(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new ir(t)]}else if(t.selector)t=[new tr(t)];else if(t.name)t=[new rr(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new ar(t)]}return t.map((t=>(t[or]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[nr]&&ur(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)})):this.walk(((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)})):this.walk(((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)})):this.walk(((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};hr.registerParse=e=>{er=e},hr.registerRule=e=>{tr=e},hr.registerAtRule=e=>{rr=e},hr.registerRoot=e=>{sr=e};var pr=hr;hr.default=hr,hr.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,rr.prototype):"rule"===e.type?Object.setPrototypeOf(e,tr.prototype):"decl"===e.type?Object.setPrototypeOf(e,ir.prototype):"comment"===e.type?Object.setPrototypeOf(e,ar.prototype):"root"===e.type&&Object.setPrototypeOf(e,sr.prototype),e[or]=!0,e.nodes&&e.nodes.forEach((e=>{hr.rebuild(e)}))};let dr,fr,mr=pr,gr=class extends mr{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new dr(new fr,this,e).stringify()}};gr.registerLazyResult=e=>{dr=e},gr.registerProcessor=e=>{fr=e};var yr=gr;gr.default=gr;let vr={};var wr=function(e){vr[e]||(vr[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let br=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){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}};var Sr=br;br.default=br;let Cr=Sr,xr=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Cr(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var Ir=xr;xr.default=xr;const kr="'".charCodeAt(0),Or='"'.charCodeAt(0),Er="\\".charCodeAt(0),Ar="/".charCodeAt(0),Rr="\n".charCodeAt(0),Mr=" ".charCodeAt(0),Pr="\f".charCodeAt(0),Nr="\t".charCodeAt(0),Tr="\r".charCodeAt(0),Lr="[".charCodeAt(0),Dr="]".charCodeAt(0),Fr="(".charCodeAt(0),_r=")".charCodeAt(0),Br="{".charCodeAt(0),Ur="}".charCodeAt(0),jr=";".charCodeAt(0),zr="*".charCodeAt(0),Wr=":".charCodeAt(0),Vr="@".charCodeAt(0),Gr=/[\t\n\f\r "#'()/;[\\\]{}]/g,Zr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Yr=/.[\r\n"'(/\\]/,Jr=/[\da-f]/i;let qr=pr,Kr=class extends qr{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Xr=Kr;Kr.default=Kr,qr.registerAtRule(Kr);let Hr,$r,Qr=pr,es=class extends Qr{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Hr(new $r,this,e).stringify()}};es.registerLazyResult=e=>{Hr=e},es.registerProcessor=e=>{$r=e};var ts=es;es.default=es,Qr.registerRoot(es);let rs={comma:e=>rs.split(e,[","],!0),space:e=>rs.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var ss=rs;rs.default=rs;let ns=pr,os=ss,is=class extends ns{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return os.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var as=is;is.default=is,ns.registerRule(is);let ls=mt,cs=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function v(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=p.charCodeAt(m),r){case Rr:case Mr:case Nr:case Tr:case Pr:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===Mr||r===Rr||r===Nr||r===Tr||r===Pr);h=["space",p.slice(m,s)],m=s-1;break;case Lr:case Dr:case Br:case Ur:case Wr:case jr:case _r:{let e=String.fromCharCode(r);h=[e,e,m];break}case Fr:if(c=g.length?g.pop()[1]:"",u=p.charCodeAt(m+1),"url"===c&&u!==kr&&u!==Or&&u!==Mr&&u!==Rr&&u!==Nr&&u!==Pr&&u!==Tr){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}v("bracket")}for(l=s;p.charCodeAt(l-1)===Er;)l-=1,a=!a}while(a);h=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),o=p.slice(m,s+1),-1===s||Yr.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case kr:case Or:n=r===kr?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}v("string")}for(l=s;p.charCodeAt(l-1)===Er;)l-=1,a=!a}while(a);h=["string",p.slice(m,s+1),m,s],m=s;break;case Vr:Gr.lastIndex=m+1,Gr.test(p),s=0===Gr.lastIndex?p.length-1:Gr.lastIndex-2,h=["at-word",p.slice(m,s+1),m,s],m=s;break;case Er:for(s=m,i=!0;p.charCodeAt(s+1)===Er;)s+=1,i=!i;if(r=p.charCodeAt(s+1),i&&r!==Ar&&r!==Mr&&r!==Rr&&r!==Nr&&r!==Tr&&r!==Pr&&(s+=1,Jr.test(p.charAt(s)))){for(;Jr.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===Mr&&(s+=1)}h=["word",p.slice(m,s+1),m,s],m=s;break;default:r===Ar&&p.charCodeAt(m+1)===zr?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:v("comment")),h=["comment",p.slice(m,s+1),m,s],m=s):(Zr.lastIndex=m+1,Zr.test(p),s=0===Zr.lastIndex?p.length-1:Zr.lastIndex-2,h=["word",p.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},us=Qt,hs=Xr,ps=ts,ds=as;const fs={empty:!0,space:!0};var ms=class{constructor(e){this.input=e,this.root=new ps,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,s,n=new hs;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new us;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=cs(this.input)}decl(e,t){let r=new ls;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(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;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new ds;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(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)}endFile(){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())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(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)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}parse(){let e;for(;!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()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,i,a,l=r.length,c="",u=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",fs[a]||fs[i]||","===c.slice(-1)?u=!1:c+=n[1]):c+=n[1]:u=!1;if(!u){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new ds;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};let gs=pr,ys=ms,vs=Ut;function ws(e,t){let r=new vs(e,t),s=new ys(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var bs=ws;ws.default=ws,gs.registerParse(ws);let{isClean:Ss,my:Cs}=$e,xs=Xt,Is=nt,ks=pr,Os=yr,Es=wr,As=Ir,Rs=bs,Ms=ts;const Ps={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ns={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},Ts={Once:!0,postcssPlugin:!0,prepare:!0};function Ls(e){return"object"==typeof e&&"function"==typeof e.then}function Ds(e){let t=!1,r=Ps[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 Fs(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Ds(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function _s(e){return e[Ss]=!1,e.nodes&&e.nodes.forEach((e=>_s(e))),e}let Bs={},Us=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof As)n=_s(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=Rs;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[Cs]&&ks.rebuild(n)}else n=_s(r);this.result=new As(t,n,s),this.helpers={...Bs,postcss:Bs,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!Ns[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ts[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Ls(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ss];){e[Ss]=!0;let t=[Fs(e)];for(;t.length>0;){let e=this.visitTick(t);if(Ls(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return Ls(t[0])?Promise.all(t):t}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)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Is;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new xs(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(Ls(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ss];)e[Ss]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||Es("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(Ls(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[Ss])return s[Ss]=!0,void e.push(Fs(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[Ss]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Ss]=!0;let t=Ds(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[Ss]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Us.registerPostcss=e=>{Bs=e};var js=Us;Us.default=Us,Ms.registerLazyResult(Us),Os.registerLazyResult(Us);let zs=Xt,Ws=nt,Vs=wr,Gs=bs;const Zs=Ir;let Ys=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=Ws;this.result=new Zs(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new zs(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||Vs("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Gs;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Js=Ys;Ys.default=Ys;let qs=Js,Ks=js,Xs=yr,Hs=ts,$s=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Ks(this,e,t):new qs(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Qs=$s;$s.default=$s,Hs.registerProcessor($s),Xs.registerProcessor($s);let en=mt,tn=It,rn=Qt,sn=Xr,nn=Ut,on=ts,an=as;function ln(e,t){if(Array.isArray(e))return e.map((e=>ln(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:nn.prototype};r.map&&(r.map={...r.map,__proto__:tn.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>ln(e,t)))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new on(s);if("decl"===s.type)return new en(s);if("rule"===s.type)return new an(s);if("comment"===s.type)return new rn(s);if("atrule"===s.type)return new sn(s);throw new Error("Unknown node type: "+e.type)}var cn=ln;ln.default=ln;let un=He,hn=mt,pn=js,dn=pr,fn=Qs,mn=nt,gn=cn,yn=yr,vn=Sr,wn=Qt,bn=Xr,Sn=Ir,Cn=Ut,xn=bs,In=ss,kn=as,On=ts,En=pt;function An(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new fn(e)}An.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!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"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new fn).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return An([n(r)]).process(e,t)},n},An.stringify=mn,An.parse=xn,An.fromJSON=gn,An.list=In,An.comment=e=>new wn(e),An.atRule=e=>new bn(e),An.decl=e=>new hn(e),An.rule=e=>new kn(e),An.root=e=>new On(e),An.document=e=>new yn(e),An.CssSyntaxError=un,An.Declaration=hn,An.Container=dn,An.Processor=fn,An.Document=yn,An.Comment=wn,An.Warning=vn,An.AtRule=bn,An.Result=Sn,An.Input=Cn,An.Rule=kn,An.Root=On,An.Node=En,pn.registerPostcss(An);var Rn=An;An.default=An;const Mn=ze(Rn);Mn.stringify,Mn.fromJSON,Mn.plugin,Mn.parse,Mn.list,Mn.document,Mn.comment,Mn.atRule,Mn.rule,Mn.decl,Mn.root,Mn.CssSyntaxError,Mn.Declaration,Mn.Container,Mn.Processor,Mn.Document,Mn.Comment,Mn.Warning,Mn.AtRule,Mn.Result,Mn.Input,Mn.Rule,Mn.Root,Mn.Node;var Pn=Object.defineProperty,Nn=(e,t,r)=>((e,t,r)=>t in e?Pn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function Tn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ln(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof 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 s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),r}var Dn={exports:{}},Fn=String,_n=function(){return{isColorSupported:!1,reset:Fn,bold:Fn,dim:Fn,italic:Fn,underline:Fn,inverse:Fn,hidden:Fn,strikethrough:Fn,black:Fn,red:Fn,green:Fn,yellow:Fn,blue:Fn,magenta:Fn,cyan:Fn,white:Fn,gray:Fn,bgBlack:Fn,bgRed:Fn,bgGreen:Fn,bgYellow:Fn,bgBlue:Fn,bgMagenta:Fn,bgCyan:Fn,bgWhite:Fn}};Dn.exports=_n(),Dn.exports.createColors=_n;var Bn=Dn.exports;const Un=Ln(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let jn=Bn,zn=Un,Wn=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=jn.isColorSupported),zn&&e&&(t=zn(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=jn.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Vn=Wn;Wn.default=Wn;var Gn={};Gn.isClean=Symbol("isClean"),Gn.my=Symbol("my");const Zn={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Yn=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let 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");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",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")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Zn[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=Zn[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(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)}};var Jn=Yn;Yn.default=Yn;let qn=Jn;function Kn(e,t){new qn(t).stringify(e)}var Xn=Kn;Kn.default=Kn;let{isClean:Hn,my:$n}=Gn,Qn=Vn,eo=Jn,to=Xn;function ro(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>ro(e,r))):("object"===o&&null!==n&&(n=ro(n)),r[s]=n)}return r}let so=class{constructor(e={}){this.raws={},this[Hn]=!1,this[$n]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ro(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Qn(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Hn]){this[Hn]=!1;let e=this;for(;e=e.parent;)e[Hn]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let 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){let s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}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}}raw(e,t){return(new eo).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=to){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var no=so;so.default=so;let oo=no,io=class extends oo{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var ao=io;io.default=io;var lo={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}};let{SourceMapConsumer:co,SourceMapGenerator:uo}=Un,{existsSync:ho,readFileSync:po}=Un,{dirname:fo,join:mo}=Un;let go=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=fo(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new co(this.text)),this.consumerCache}decodeInline(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 t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=fo(e),ho(e))return this.mapFile=e,po(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof co)return uo.fromSourceMap(t).toString();if(t instanceof uo)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=mo(fo(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var yo=go;go.default=go;let{SourceMapConsumer:vo,SourceMapGenerator:wo}=Un,{fileURLToPath:bo,pathToFileURL:So}=Un,{isAbsolute:Co,resolve:xo}=Un,{nanoid:Io}=lo,ko=Un,Oo=Vn,Eo=yo,Ao=Symbol("fromOffsetCache"),Ro=Boolean(vo&&wo),Mo=Boolean(xo&&Co),Po=class{constructor(e,t={}){if(null==e||"object"==typeof 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&&(!Mo||/^\w+:\/\//.test(t.from)||Co(t.from)?this.file=t.from:this.file=xo(t.from)),Mo&&Ro){let e=new Eo(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+Io(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new Oo(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new Oo(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(So&&(n.input.url=So(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Ao])r=this[Ao];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[Ao]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:xo(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=Co(a.source)?So(a.source):new URL(a.source,this.map.consumer().sourceRoot||So(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!bo)throw new Error("file: protocol is not available in this PostCSS build");l.file=bo(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var No=Po;Po.default=Po,ko&&ko.registerInput&&ko.registerInput(Po);let{SourceMapConsumer:To,SourceMapGenerator:Lo}=Un,{dirname:Do,relative:Fo,resolve:_o,sep:Bo}=Un,{pathToFileURL:Uo}=Un,jo=No,zo=Boolean(To&&Lo),Wo=Boolean(Do&&_o&&Fo&&Bo);var Vo=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let 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";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||Do(e.file);!1===this.mapOpts.sourcesContent?(t=new To(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Wo&&zo&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Lo.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Lo({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]}generateString(){this.css="",this.map=new Lo({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Do(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Do(_o(r,this.mapOpts.annotation)));let s=Fo(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new jo(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(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))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Uo){let t=Uo(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Bo&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Go=no,Zo=class extends Go{constructor(e){super(e),this.type="comment"}};var Yo=Zo;Zo.default=Zo;let Jo,qo,Ko,Xo,{isClean:Ho,my:$o}=Gn,Qo=ao,ei=Yo,ti=no;function ri(e){return e.map((e=>(e.nodes&&(e.nodes=ri(e.nodes)),delete e.source,e)))}function si(e){if(e[Ho]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)si(t)}let ni=class e extends ti{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=ri(Jo(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Qo(t)]}else if(t.selector)t=[new qo(t)];else if(t.name)t=[new Ko(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new ei(t)]}return t.map((t=>(t[$o]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Ho]&&si(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)})):this.walk(((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)})):this.walk(((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)})):this.walk(((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};ni.registerParse=e=>{Jo=e},ni.registerRule=e=>{qo=e},ni.registerAtRule=e=>{Ko=e},ni.registerRoot=e=>{Xo=e};var oi=ni;ni.default=ni,ni.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Ko.prototype):"rule"===e.type?Object.setPrototypeOf(e,qo.prototype):"decl"===e.type?Object.setPrototypeOf(e,Qo.prototype):"comment"===e.type?Object.setPrototypeOf(e,ei.prototype):"root"===e.type&&Object.setPrototypeOf(e,Xo.prototype),e[$o]=!0,e.nodes&&e.nodes.forEach((e=>{ni.rebuild(e)}))};let ii,ai,li=oi,ci=class extends li{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new ii(new ai,this,e).stringify()}};ci.registerLazyResult=e=>{ii=e},ci.registerProcessor=e=>{ai=e};var ui=ci;ci.default=ci;let hi={};var pi=function(e){hi[e]||(hi[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let di=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){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}};var fi=di;di.default=di;let mi=fi,gi=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new mi(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var yi=gi;gi.default=gi;const vi="'".charCodeAt(0),wi='"'.charCodeAt(0),bi="\\".charCodeAt(0),Si="/".charCodeAt(0),Ci="\n".charCodeAt(0),xi=" ".charCodeAt(0),Ii="\f".charCodeAt(0),ki="\t".charCodeAt(0),Oi="\r".charCodeAt(0),Ei="[".charCodeAt(0),Ai="]".charCodeAt(0),Ri="(".charCodeAt(0),Mi=")".charCodeAt(0),Pi="{".charCodeAt(0),Ni="}".charCodeAt(0),Ti=";".charCodeAt(0),Li="*".charCodeAt(0),Di=":".charCodeAt(0),Fi="@".charCodeAt(0),_i=/[\t\n\f\r "#'()/;[\\\]{}]/g,Bi=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ui=/.[\r\n"'(/\\]/,ji=/[\da-f]/i;let zi=oi,Wi=class extends zi{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Vi=Wi;Wi.default=Wi,zi.registerAtRule(Wi);let Gi,Zi,Yi=oi,Ji=class extends Yi{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Gi(new Zi,this,e).stringify()}};Ji.registerLazyResult=e=>{Gi=e},Ji.registerProcessor=e=>{Zi=e};var qi=Ji;Ji.default=Ji,Yi.registerRoot(Ji);let Ki={comma:e=>Ki.split(e,[","],!0),space:e=>Ki.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var Xi=Ki;Ki.default=Ki;let Hi=oi,$i=Xi,Qi=class extends Hi{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return $i.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var ea=Qi;Qi.default=Qi,Hi.registerRule(Qi);let ta=ao,ra=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function v(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=p.charCodeAt(m),r){case Ci:case xi:case ki:case Oi:case Ii:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===xi||r===Ci||r===ki||r===Oi||r===Ii);h=["space",p.slice(m,s)],m=s-1;break;case Ei:case Ai:case Pi:case Ni:case Di:case Ti:case Mi:{let e=String.fromCharCode(r);h=[e,e,m];break}case Ri:if(c=g.length?g.pop()[1]:"",u=p.charCodeAt(m+1),"url"===c&&u!==vi&&u!==wi&&u!==xi&&u!==Ci&&u!==ki&&u!==Ii&&u!==Oi){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}v("bracket")}for(l=s;p.charCodeAt(l-1)===bi;)l-=1,a=!a}while(a);h=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),o=p.slice(m,s+1),-1===s||Ui.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case vi:case wi:n=r===vi?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}v("string")}for(l=s;p.charCodeAt(l-1)===bi;)l-=1,a=!a}while(a);h=["string",p.slice(m,s+1),m,s],m=s;break;case Fi:_i.lastIndex=m+1,_i.test(p),s=0===_i.lastIndex?p.length-1:_i.lastIndex-2,h=["at-word",p.slice(m,s+1),m,s],m=s;break;case bi:for(s=m,i=!0;p.charCodeAt(s+1)===bi;)s+=1,i=!i;if(r=p.charCodeAt(s+1),i&&r!==Si&&r!==xi&&r!==Ci&&r!==ki&&r!==Oi&&r!==Ii&&(s+=1,ji.test(p.charAt(s)))){for(;ji.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===xi&&(s+=1)}h=["word",p.slice(m,s+1),m,s],m=s;break;default:r===Si&&p.charCodeAt(m+1)===Li?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:v("comment")),h=["comment",p.slice(m,s+1),m,s],m=s):(Bi.lastIndex=m+1,Bi.test(p),s=0===Bi.lastIndex?p.length-1:Bi.lastIndex-2,h=["word",p.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},sa=Yo,na=Vi,oa=qi,ia=ea;const aa={empty:!0,space:!0};var la=class{constructor(e){this.input=e,this.root=new oa,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,s,n=new na;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new sa;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=ra(this.input)}decl(e,t){let r=new ta;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(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;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new ia;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(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)}endFile(){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())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(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)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}parse(){let e;for(;!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()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,i,a,l=r.length,c="",u=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",aa[a]||aa[i]||","===c.slice(-1)?u=!1:c+=n[1]):c+=n[1]:u=!1;if(!u){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new ia;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};let ca=oi,ua=la,ha=No;function pa(e,t){let r=new ha(e,t),s=new ua(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var da=pa;pa.default=pa,ca.registerParse(pa);let{isClean:fa,my:ma}=Gn,ga=Vo,ya=Xn,va=oi,wa=ui,ba=pi,Sa=yi,Ca=da,xa=qi;const Ia={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ka={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},Oa={Once:!0,postcssPlugin:!0,prepare:!0};function Ea(e){return"object"==typeof e&&"function"==typeof e.then}function Aa(e){let t=!1,r=Ia[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 Ra(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Aa(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Ma(e){return e[fa]=!1,e.nodes&&e.nodes.forEach((e=>Ma(e))),e}let Pa={},Na=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof Sa)n=Ma(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=Ca;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[ma]&&va.rebuild(n)}else n=Ma(r);this.result=new Sa(t,n,s),this.helpers={...Pa,postcss:Pa,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!ka[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Oa[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Ea(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fa];){e[fa]=!0;let t=[Ra(e)];for(;t.length>0;){let e=this.visitTick(t);if(Ea(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return Ea(t[0])?Promise.all(t):t}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)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=ya;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new ga(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(Ea(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fa];)e[fa]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||ba("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(Ea(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[fa])return s[fa]=!0,void e.push(Ra(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[fa]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[fa]=!0;let t=Aa(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[fa]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Na.registerPostcss=e=>{Pa=e};var Ta=Na;Na.default=Na,xa.registerLazyResult(Na),wa.registerLazyResult(Na);let La=Vo,Da=Xn,Fa=pi,_a=da;const Ba=yi;let Ua=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=Da;this.result=new Ba(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new La(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||Fa("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let 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}get[Symbol.toStringTag](){return"NoWorkResult"}};var ja=Ua;Ua.default=Ua;let za=ja,Wa=Ta,Va=ui,Ga=qi,Za=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Wa(this,e,t):new za(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ya=Za;Za.default=Za,Ga.registerProcessor(Za),Va.registerProcessor(Za);let Ja=ao,qa=yo,Ka=Yo,Xa=Vi,Ha=No,$a=qi,Qa=ea;function el(e,t){if(Array.isArray(e))return e.map((e=>el(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Ha.prototype};r.map&&(r.map={...r.map,__proto__:qa.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>el(e,t)))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new $a(s);if("decl"===s.type)return new Ja(s);if("rule"===s.type)return new Qa(s);if("comment"===s.type)return new Ka(s);if("atrule"===s.type)return new Xa(s);throw new Error("Unknown node type: "+e.type)}var tl=el;el.default=el;let rl=Vn,sl=ao,nl=Ta,ol=oi,il=Ya,al=Xn,ll=tl,cl=ui,ul=fi,hl=Yo,pl=Vi,dl=yi,fl=No,ml=da,gl=Xi,yl=ea,vl=qi,wl=no;function bl(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new il(e)}bl.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!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"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new il).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return bl([n(r)]).process(e,t)},n},bl.stringify=al,bl.parse=ml,bl.fromJSON=ll,bl.list=gl,bl.comment=e=>new hl(e),bl.atRule=e=>new pl(e),bl.decl=e=>new sl(e),bl.rule=e=>new yl(e),bl.root=e=>new vl(e),bl.document=e=>new cl(e),bl.CssSyntaxError=rl,bl.Declaration=sl,bl.Container=ol,bl.Processor=il,bl.Document=cl,bl.Comment=hl,bl.Warning=ul,bl.AtRule=pl,bl.Result=dl,bl.Input=fl,bl.Rule=yl,bl.Root=vl,bl.Node=wl,nl.registerPostcss(bl);var Sl=bl;bl.default=bl;const Cl=Tn(Sl);Cl.stringify,Cl.fromJSON,Cl.plugin,Cl.parse,Cl.list,Cl.document,Cl.comment,Cl.atRule,Cl.rule,Cl.decl,Cl.root,Cl.CssSyntaxError,Cl.Declaration,Cl.Container,Cl.Processor,Cl.Document,Cl.Comment,Cl.Warning,Cl.AtRule,Cl.Result,Cl.Input,Cl.Rule,Cl.Root,Cl.Node;class xl{constructor(...e){Nn(this,"parentElement",null),Nn(this,"parentNode",null),Nn(this,"ownerDocument"),Nn(this,"firstChild",null),Nn(this,"lastChild",null),Nn(this,"previousSibling",null),Nn(this,"nextSibling",null),Nn(this,"ELEMENT_NODE",1),Nn(this,"TEXT_NODE",3),Nn(this,"nodeType"),Nn(this,"nodeName"),Nn(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof xl))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const Il={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},kl={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ol={};function El(e){if(Ol[e])return Ol[e];const t=globalThis[e],r=t.prototype,s=e in Il?Il[e]:void 0,n=Boolean(s&&s.every((e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))}))),o=e in kl?kl[e]:void 0,i=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(n&&i&&!globalThis.Zone)return Ol[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?Ol[e]=o:r}catch{return r}}const Al={};function Rl(e,t,r){var s;const n=`${e}.${String(r)}`;if(Al[n])return Al[n].call(t);const o=El(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(Al[n]=i,i.call(t)):t[r]}const Ml={};function Pl(e,t,r){const s=`${e}.${String(r)}`;if(Ml[s])return Ml[s].bind(t);const n=El(e)[r];return"function"!=typeof n?t[r]:(Ml[s]=n,n.bind(t))}function Nl(){return El("MutationObserver").constructor}const Tl={childNodes:function(e){return Rl("Node",e,"childNodes")},parentNode:function(e){return Rl("Node",e,"parentNode")},parentElement:function(e){return Rl("Node",e,"parentElement")},textContent:function(e){return Rl("Node",e,"textContent")},contains:function(e,t){return Pl("Node",e,"contains")(t)},getRootNode:function(e){return Pl("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Rl("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Rl("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Rl("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Rl("Element",e,"querySelectorAll")(t)},mutationObserver:Nl};function Ll(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const Dl="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.";let Fl={map:{},getId:()=>(console.error(Dl),-1),getNode:()=>(console.error(Dl),null),removeNodeFromMap(){console.error(Dl)},has:()=>(console.error(Dl),!1),reset(){console.error(Dl)}};function _l(e,t,r={}){let s=null,n=0;return function(...o){const i=Date.now();n||!1!==r.leading||(n=i);const a=t-(i-n),l=this;a<=0||a>t?(s&&(clearTimeout(s),s=null),n=i,e.apply(l,o)):s||!1===r.trailing||(s=setTimeout((()=>{n=!1===r.leading?0:Date.now(),s=null,e.apply(l,o)}),a))}}function Bl(e,t,r,s,n=window){const o=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,s?r:{set(e){setTimeout((()=>{r.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>Bl(e,t,o||{},!0)}function Ul(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],n=r(s);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=n,()=>{e[t]=s}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Fl=new Proxy(Fl,{get:(e,t,r)=>("map"===t&&console.error(Dl),Reflect.get(e,t,r))}));let jl=Date.now;function zl(e){var t,r,s,n;const o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=Tl.parentElement(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(s=Tl.parentElement(o.body))?void 0:s.scrollTop)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollTop)||0}}function Wl(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Vl(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Gl(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:Tl.parentElement(e)}function Zl(e,t,r,s){if(!e)return!1;const n=Gl(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(s&&null!==n.closest("."+t))return!0}else if(Fe(n,t,s))return!0}catch(e){}if(r){if(n.matches(r))return!0;if(s&&null!==n.closest(r))return!0}return!1}function Yl(e,t){return-1!==t.getId(e)}function Jl(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)}function ql(e,t){if(ie(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=Tl.parentNode(e);return(!s||s.nodeType!==e.DOCUMENT_NODE)&&(!s||ql(s,t))}function Kl(e){return Boolean(e.changedTouches)}function Xl(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)}function Hl(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function $l(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Ql(e){return!!e&&(e instanceof xl&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Tl.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(jl=()=>(new Date).getTime());class ec{constructor(){Y(this,"id",1),Y(this,"styleIDMap",new WeakMap),Y(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function tc(e){var t;let r=null;return"getRootNode"in e&&(null==(t=Tl.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Tl.host(Tl.getRootNode(e))&&(r=Tl.host(Tl.getRootNode(e))),r}function rc(e){let t,r=e;for(;t=tc(r);)r=t;return r}function sc(e){const t=e.ownerDocument;if(!t)return!1;const r=rc(e);return Tl.contains(t,r)}function nc(e){const t=e.ownerDocument;return!!t&&(Tl.contains(t,e)||sc(e))}const oc=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:ec,get _mirror(){return Fl},closestElementOfNode:Gl,getBaseDimension:function e(t,r){var s,n;const o=null==(n=null==(s=t.ownerDocument)?void 0:s.defaultView)?void 0:n.frameElement;if(!o||o===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};const i=o.getBoundingClientRect(),a=e(o,r),l=i.height/o.clientHeight;return{x:i.x*a.relativeScale+a.x,y:i.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,r){const s=t[r[0]];return 1===r.length?s:e(s.cssRules[r[1]].cssRules,r.slice(2))},getPositionsAndIndex:function(e){const t=[...e],r=t.pop();return{positions:t,index:r}},getRootShadowHost:rc,getShadowHost:tc,getWindowHeight:Wl,getWindowScroll:zl,getWindowWidth:Vl,hasShadowRoot:Ql,hookSetter:Bl,inDom:nc,isAncestorRemoved:ql,isBlocked:Zl,isIgnored:Jl,isSerialized:Yl,isSerializedIframe:Hl,isSerializedStylesheet:$l,iterateResolveTree:function e(t,r){r(t.value);for(let s=t.children.length-1;s>=0;s--)e(t.children[s],r)},legacy_isTouchEvent:Kl,get nowTimestamp(){return jl},on:Ll,patch:Ul,polyfill:Xl,queueToResolveTrees:function(e){const t={},r=(e,r)=>{const s={value:e,parent:r,children:[]};return t[e.node.id]=s,s},s=[];for(const n of e){const{nextId:e,parentId:o}=n;if(e&&e in t){const o=t[e];if(o.parent){const e=o.parent.children.indexOf(o);o.parent.children.splice(e,0,r(n,o.parent))}else{const e=s.indexOf(o);s.splice(e,0,r(n,null))}}else if(o in t){const e=t[o];e.children.push(r(n,e))}else s.push(r(n,null))}return s},shadowHostInDom:sc,throttle:_l,uniqueTextMutations:function(e){const t=new Set,r=[];for(let s=e.length;s--;){const n=e[s];t.has(n.id)||(r.push(n),t.add(n.id))}return r}},Symbol.toStringTag,{value:"Module"}));var ic=(e=>(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))(ic||{}),ac=(e=>(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))(ac||{}),lc=(e=>(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))(lc||{}),cc=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(cc||{}),uc=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(uc||{}),hc=(e=>(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))(hc||{}),pc=(e=>(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))(pc||{});function dc(e){return"__ln"in e}class fc{constructor(){Y(this,"length",0),Y(this,"head",null),Y(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&dc(e.previousSibling)){const 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&&dc(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const 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--)}}const mc=(e,t)=>`${e}@${t}`;class gc{constructor(){Y(this,"frozen",!1),Y(this,"locked",!1),Y(this,"texts",[]),Y(this,"attributes",[]),Y(this,"attributeMap",new WeakMap),Y(this,"removes",[]),Y(this,"mapRemoves",[]),Y(this,"movedMap",{}),Y(this,"addedSet",new Set),Y(this,"movedSet",new Set),Y(this,"droppedSet",new Set),Y(this,"removesSubTreeCache",new Set),Y(this,"mutationCb"),Y(this,"blockClass"),Y(this,"blockSelector"),Y(this,"maskTextClass"),Y(this,"maskTextSelector"),Y(this,"inlineStylesheet"),Y(this,"maskInputOptions"),Y(this,"maskTextFn"),Y(this,"maskInputFn"),Y(this,"keepIframeSrcFn"),Y(this,"recordCanvas"),Y(this,"inlineImages"),Y(this,"slimDOMOptions"),Y(this,"dataURLOptions"),Y(this,"doc"),Y(this,"mirror"),Y(this,"iframeManager"),Y(this,"stylesheetManager"),Y(this,"shadowDomManager"),Y(this,"canvasManager"),Y(this,"processedNodeManager"),Y(this,"unattachedDoc"),Y(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),Y(this,"emit",(()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new fc,s=e=>{let t=e,r=-2;for(;-2===r;)t=t&&t.nextSibling,r=t&&this.mirror.getId(t);return r},n=n=>{const o=Tl.parentNode(n);if(!o||!nc(n))return;let i=!1;if(n.nodeType===Node.TEXT_NODE){const e=o.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(o)&&(i=!0)}const a=ie(o)?this.mirror.getId(tc(n)):this.mirror.getId(o),l=s(n);if(-1===a||-1===l)return r.addNode(n);const c=je(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Hl(e,this.mirror)&&this.iframeManager.addIframe(e),$l(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Ql(n)&&this.shadowDomManager.addShadowRoot(Tl.shadowRoot(n),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:i});c&&(e.push({parentId:a,nextId:l,node:c}),t.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)vc(this.removesSubTreeCache,e,this.mirror)&&!this.movedSet.has(Tl.parentNode(e))||n(e);for(const e of this.addedSet)wc(this.droppedSet,e)||vc(this.removesSubTreeCache,e,this.mirror)?wc(this.movedSet,e)?n(e):this.droppedSet.add(e):n(e);let o=null;for(;r.length;){let e=null;if(o){const t=this.mirror.getId(Tl.parentNode(o.value)),r=s(o.value);-1!==t&&-1!==r&&(e=o)}if(!e){let t=r.tail;for(;t;){const r=t;if(t=t.previous,r){const t=this.mirror.getId(Tl.parentNode(r.value));if(-1===s(r.value))continue;if(-1!==t){e=r;break}{const t=r.value,s=Tl.parentNode(t);if(s&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=Tl.host(s);if(-1!==this.mirror.getId(t)){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}o=e.previous,r.removeNode(e.value),n(e.value)}const i={texts:this.texts.map((e=>{const t=e.node,r=Tl.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{const{attributes:t}=e;if("string"==typeof t.style){const r=JSON.stringify(e.styleDiff),s=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+s).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(i.texts.length||i.attributes.length||i.removes.length||i.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(i))})),Y(this,"genTextAreaValueMutation",(e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(Tl.childNodes(e),(e=>Tl.textContent(e)||"")).join("");t.attributes.value=he({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:fe(e),value:r,maskInputFn:this.maskInputFn})})),Y(this,"processMutation",(e=>{if(!Jl(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=Tl.textContent(e.target);Zl(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:_e(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Gl(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,s=e.target.getAttribute(r);if("value"===r){const e=fe(t);s=he({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:s,maskInputFn:this.maskInputFn})}if(Zl(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let n=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(s)){if(t.contentDocument)return;r="rr_src"}if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),"type"===r&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!De(t.tagName,r))if(n.attributes[r]=Le(this.doc,pe(t.tagName),pe(r),s),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const r=this.unattachedDoc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const s=t.style.getPropertyValue(e),o=t.style.getPropertyPriority(e);s!==r.style.getPropertyValue(e)||o!==r.style.getPropertyPriority(e)?n.styleDiff[e]=""===o?s:[s,o]:n._unchangedStyles[e]=[s,o]}for(const e of Array.from(r.style))""===t.style.getPropertyValue(e)&&(n.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===t.tagName&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":if(Zl(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const r=this.mirror.getId(t),s=ie(e.target)?this.mirror.getId(Tl.host(e.target)):this.mirror.getId(e.target);Zl(e.target,this.blockClass,this.blockSelector,!1)||Jl(t,this.mirror,this.slimDOMOptions)||!Yl(t,this.mirror)||(this.addedSet.has(t)?(yc(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||ql(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[mc(r,s)]?yc(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:!(!ie(e.target)||!ae(e.target))||void 0}),function(e,t){const r=[e];for(;r.length;){const e=r.pop();t.has(e)||(t.add(e),Tl.childNodes(e).forEach((e=>r.push(e))))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))}))}})),Y(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Jl(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[mc(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Zl(e,this.blockClass,this.blockSelector,!1)||(Tl.childNodes(e).forEach((e=>this.genAdds(e))),Ql(e)&&Tl.childNodes(Tl.shadowRoot(e)).forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}))}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function yc(e,t){e.delete(t),Tl.childNodes(t).forEach((t=>yc(e,t)))}function vc(e,t,r){return 0!==e.size&&function(e,t){const r=Tl.parentNode(t);return!!r&&e.has(r)}(e,t)}function wc(e,t){return 0!==e.size&&bc(e,t)}function bc(e,t){const r=Tl.parentNode(t);return!!r&&(!!e.has(r)||bc(e,r))}let Sc;const Cc=e=>{if(!Sc)return e;return(...t)=>{try{return e(...t)}catch(e){if(Sc&&!0===Sc(e))return;throw e}}};function xc(e){return(...t)=>{try{return e(...t)}catch(e){try{e._external_=!0}catch{}throw e}}}const Ic=[];function kc(e){try{if("composedPath"in e){const 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 Oc(e,t){const r=new gc;Ic.push(r),r.init(e);const s=new(Nl())(Cc(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Ec({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:o}){if(!1===o.mouseInteraction)return()=>{};const i=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,a=[];let l=null;return Object.keys(lc).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==i[e])).forEach((o=>{let i=pe(o);const c=(t=>o=>{const i=kc(o);if(Zl(i,s,n,!0))return;let a=null,c=t;if("pointerType"in o){switch(o.pointerType){case"mouse":a=cc.Mouse;break;case"touch":a=cc.Touch;break;case"pen":a=cc.Pen}a===cc.Touch?lc[t]===lc.MouseDown?c="TouchStart":lc[t]===lc.MouseUp&&(c="TouchEnd"):cc.Pen}else Kl(o)&&(a=cc.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===cc.Touch||c.startsWith("Mouse")&&a===cc.Mouse)&&(a=null)):lc[t]===lc.Click&&(a=l,l=null);const u=Kl(o)?o.changedTouches[0]:o;if(!u)return;const h=r.getId(i),{clientX:p,clientY:d}=u;Cc(e)({type:lc[c],id:h,x:p,y:d,...null!==a&&{pointerType:a}})})(o);if(window.PointerEvent)switch(lc[o]){case lc.MouseDown:case lc.MouseUp:i=i.replace("mouse","pointer");break;case lc.TouchStart:case lc.TouchEnd:return}a.push(Ll(i,c,t))})),Cc((()=>{a.forEach((e=>e()))}))}function Ac({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:o}){const i=Cc(_l(Cc((o=>{const i=kc(o);if(!i||Zl(i,s,n,!0))return;const a=r.getId(i);if(i===t&&t.defaultView){const r=zl(t.defaultView);e({id:a,x:r.left,y:r.top})}else e({id:a,x:i.scrollLeft,y:i.scrollTop})})),o.scroll||100));return Ll("scroll",i,t)}const Rc=["INPUT","TEXTAREA","SELECT"],Mc=new WeakMap;function Pc(e){return function(e,t){if(Dc("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Dc("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Dc("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Dc("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){const r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function Nc(e,t,r){let s,n;return e?(e.ownerNode?s=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:s}):{}}function Tc({mirror:e,stylesheetManager:t},r){var s,n,o;let i=null;i="#document"===r.nodeName?e.getId(r):e.getId(Tl.host(r));const a="#document"===r.nodeName?null==(s=r.defaultView)?void 0:s.Document:null==(o=null==(n=r.ownerDocument)?void 0:n.defaultView)?void 0:o.ShadowRoot,l=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==i&&-1!==i&&a&&l?(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var r;const s=null==(r=l.set)?void 0:r.call(this,e);if(null!==i&&-1!==i)try{t.adoptStyleSheets(e,i)}catch(e){}return s}}),Cc((()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))):()=>{}}function Lc(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};let s;!function(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:n,scrollCb:o,viewportResizeCb:i,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:h,fontCb:p,selectionCb:d,customElementCb:f}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),r(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),s(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),n(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),o(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),i(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),u(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),h(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),p(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),d(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(s=Oc(e,e.doc));const n=function({mousemoveCb:e,sampling:t,doc:r,mirror:s}){if(!1===t.mousemove)return()=>{};const n="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const l=_l(Cc((t=>{const r=Date.now()-i;e(a.map((e=>(e.timeOffset-=r,e))),t),a=[],i=null})),o),c=Cc(_l(Cc((e=>{const t=kc(e),{clientX:r,clientY:n}=Kl(e)?e.changedTouches[0]:e;i||(i=jl()),a.push({x:r,y:n,id:s.getId(t),timeOffset:jl()-i}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?ac.Drag:e instanceof MouseEvent?ac.MouseMove:ac.TouchMove)})),n,{trailing:!1})),u=[Ll("mousemove",c,r),Ll("touchmove",c,r),Ll("drag",c,r)];return Cc((()=>{u.forEach((e=>e()))}))}(e),o=Ec(e),i=Ac(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,s=-1;return Ll("resize",Cc(_l(Cc((()=>{const t=Wl(),n=Vl();r===t&&s===n||(e({width:Number(n),height:Number(t)}),r=t,s=n)})),200)),t)}(e,{win:r}),l=function({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,ignoreClass:o,ignoreSelector:i,maskInputOptions:a,maskInputFn:l,sampling:c,userTriggeredOnInput:u}){function h(e){let r=kc(e);const c=e.isTrusted,h=r&&r.tagName;if(r&&"OPTION"===h&&(r=Tl.parentElement(r)),!r||!h||Rc.indexOf(h)<0||Zl(r,s,n,!0))return;if(r.classList.contains(o)||i&&r.matches(i))return;let d=r.value,f=!1;const m=fe(r)||"";"radio"===m||"checkbox"===m?f=r.checked:(a[h.toLowerCase()]||a[m])&&(d=he({element:r,maskInputOptions:a,tagName:h,type:m,value:d,maskInputFn:l})),p(r,u?{text:d,isChecked:f,userTriggered:c}:{text:d,isChecked:f});const g=r.name;"radio"===m&&g&&f&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach((e=>{if(e!==r){const t=e.value;p(e,u?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}}))}function p(t,s){const n=Mc.get(t);if(!n||n.text!==s.text||n.isChecked!==s.isChecked){Mc.set(t,s);const n=r.getId(t);Cc(e)({...s,id:n})}}const d=("last"===c.input?["change"]:["input","change"]).map((e=>Ll(e,Cc(h),t))),f=t.defaultView;if(!f)return()=>{d.forEach((e=>e()))};const m=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),g=[[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 m&&m.set&&d.push(...g.map((e=>Bl(e[0],e[1],{set(){Cc(h)({target:this,isTrusted:!1})}},!1,f)))),Cc((()=>{d.forEach((e=>e()))}))}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:n,doc:o}){const i=Cc((o=>_l(Cc((n=>{const i=kc(n);if(!i||Zl(i,t,r,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:u,loop:h}=i;e({type:o,id:s.getId(i),currentTime:a,volume:l,muted:c,playbackRate:u,loop:h})})),n.media||500))),a=[Ll("play",i(hc.Play),o),Ll("pause",i(hc.Pause),o),Ll("seeked",i(hc.Seeked),o),Ll("volumechange",i(hc.VolumeChange),o),Ll("ratechange",i(hc.RateChange),o)];return Cc((()=>{a.forEach((e=>e()))}))}(e);let u=()=>{},h=()=>{},p=()=>{},d=()=>{};e.recordDOM&&(u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const n=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:Cc(((s,n,o)=>{const[i,a]=o,{id:l,styleId:c}=Nc(n,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:i,index:a}]}),xc((()=>s.apply(n,o)))()}))}),s.CSSStyleSheet.prototype.addRule=function(e,t,r=this.cssRules.length){const n=`${e} { ${t} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[n,r])};const o=s.CSSStyleSheet.prototype.deleteRule;let i,a;s.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:Cc(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=Nc(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:i}]}),xc((()=>s.apply(n,o)))()}))}),s.CSSStyleSheet.prototype.removeRule=function(e){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},s.CSSStyleSheet.prototype.replace&&(i=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:Cc(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=Nc(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:i}),s.apply(n,o)}))})),s.CSSStyleSheet.prototype.replaceSync&&(a=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:Cc(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=Nc(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:i}),s.apply(n,o)}))}));const l={};Fc("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(Fc("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),Fc("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),Fc("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));const c={};return Object.entries(l).forEach((([s,n])=>{c[s]={insertRule:n.prototype.insertRule,deleteRule:n.prototype.deleteRule},n.prototype.insertRule=new Proxy(c[s].insertRule,{apply:Cc(((s,n,o)=>{const[i,a]=o,{id:l,styleId:c}=Nc(n.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:i,index:[...Pc(n),a||0]}]}),s.apply(n,o)}))}),n.prototype.deleteRule=new Proxy(c[s].deleteRule,{apply:Cc(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=Nc(n.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...Pc(n),i]}]}),s.apply(n,o)}))})})),Cc((()=>{s.CSSStyleSheet.prototype.insertRule=n,s.CSSStyleSheet.prototype.deleteRule=o,i&&(s.CSSStyleSheet.prototype.replace=i),a&&(s.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach((([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule}))}))}(e,{win:r}),h=Tc(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:n}){const o=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:Cc(((n,i,a)=>{var l;const[c,u,h]=a;if(r.has(c))return o.apply(i,[c,u,h]);const{id:p,styleId:d}=Nc(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(p&&-1!==p||d&&-1!==d)&&e({id:p,styleId:d,set:{property:c,value:u,priority:h},index:Pc(i.parentRule)}),n.apply(i,a)}))});const i=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:Cc(((n,o,a)=>{var l;const[c]=a;if(r.has(c))return i.apply(o,[c]);const{id:u,styleId:h}=Nc(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(u&&-1!==u||h&&-1!==h)&&e({id:u,styleId:h,remove:{property:c},index:Pc(o.parentRule)}),n.apply(o,a)}))}),Cc((()=>{n.CSSStyleDeclaration.prototype.setProperty=o,n.CSSStyleDeclaration.prototype.removeProperty=i}))}(e,{win:r}),e.collectFonts&&(d=function({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const s=[],n=new WeakMap,o=r.FontFace;r.FontFace=function(e,t,r){const s=new o(e,t,r);return n.set(s,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),s};const i=Ul(t.fonts,"add",(function(t){return function(r){return setTimeout(Cc((()=>{const t=n.get(r);t&&(e(t),n.delete(r))})),0),t.apply(this,[r])}}));return s.push((()=>{r.FontFace=o})),s.push(i),Cc((()=>{s.forEach((e=>e()))}))}(e)));const f=function(e){const{doc:t,mirror:r,blockClass:s,blockSelector:n,selectionCb:o}=e;let i=!0;const a=Cc((()=>{const e=t.getSelection();if(!e||i&&(null==e?void 0:e.isCollapsed))return;i=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const o=e.getRangeAt(t),{startContainer:i,startOffset:l,endContainer:c,endOffset:u}=o;Zl(i,s,n,!0)||Zl(c,s,n,!0)||a.push({start:r.getId(i),startOffset:l,end:r.getId(c),endOffset:u})}o({ranges:a})}));return a(),Ll("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){const r=e.defaultView;return r&&r.customElements?Ul(r.customElements,"define",(function(e){return function(r,s,n){try{t({define:{name:r}})}catch(e){console.warn(`Custom element callback failed for ${r}`)}return e.apply(this,[r,s,n])}})):()=>{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,r,t.options));return Cc((()=>{Ic.forEach((e=>e.reset())),null==s||s.disconnect(),n(),o(),i(),a(),l(),c(),u(),h(),p(),d(),f(),m(),g.forEach((e=>e()))}))}function Dc(e){return void 0!==window[e]}function Fc(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class _c{constructor(e){Y(this,"iframeIdToRemoteIdMap",new WeakMap),Y(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,s){const n=r||this.getIdToRemoteIdMap(e),o=s||this.getRemoteIdToIdMap(e);let i=n.get(t);return i||(i=this.generateIdFn(),n.set(t,i),o.set(i,t)),i}getIds(e,t){const r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,r,s)))}getRemoteId(e,t,r){const s=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const n=s.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,r)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Bc{constructor(e){Y(this,"iframes",new WeakMap),Y(this,"crossOriginIframeMap",new WeakMap),Y(this,"crossOriginIframeMirror",new _c(ke)),Y(this,"crossOriginIframeStyleMirror"),Y(this,"crossOriginIframeRootIdMap",new WeakMap),Y(this,"mirror"),Y(this,"mutationCb"),Y(this,"wrappedEmit"),Y(this,"loadListener"),Y(this,"stylesheetManager"),Y(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new _c(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,s;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(s=this.loadListener)||s.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const r=this.crossOriginIframeMap.get(e.source);if(!r)return;const s=this.transformCrossOriginEvent(r,t.data.event);s&&this.wrappedEmit(s,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case ic.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:ic.IncrementalSnapshot,data:{source:ac.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ic.Meta:case ic.Load:case ic.DomContentLoaded:return!1;case ic.Plugin:return t;case ic.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case ic.IncrementalSnapshot:switch(t.data.source){case ac.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case ac.Drag:case ac.TouchMove:case ac.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case ac.ViewportResize:return!1;case ac.MediaInteraction:case ac.MouseInteraction:case ac.Scroll:case ac.CanvasMutation:case ac.Input:return this.replaceIds(t.data,e,["id"]),t;case ac.StyleSheetRule:case ac.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case ac.Font:return t;case ac.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case ac.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,r,s){for(const n of s)(Array.isArray(t[n])||"number"==typeof t[n])&&(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type===pc.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class Uc{constructor(e){Y(this,"shadowDoms",new WeakSet),Y(this,"mutationCb"),Y(this,"scrollCb"),Y(this,"bypassOptions"),Y(this,"mirror"),Y(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!ae(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Oc({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>r.disconnect())),this.restoreHandlers.push(Ac({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(Tl.host(e))),this.restoreHandlers.push(Tc({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(Ul(e.prototype,"attachShadow",(function(e){return function(s){const n=e.call(this,s),o=Tl.shadowRoot(this);return o&&nc(this)&&r.addShadowRoot(o,t),n}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var jc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zc="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Wc=0;Wc<64;Wc++)zc[jc.charCodeAt(Wc)]=Wc;const Vc=new Map;const Gc=(e,t,r)=>{if(!e||!Jc(e,t)&&"object"!=typeof e)return;const s=function(e,t){let r=Vc.get(e);return r||(r=new Map,Vc.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name);let n=s.indexOf(e);return-1===n&&(n=s.length,s.push(e)),n};function Zc(e,t,r){if(e instanceof Array)return e.map((e=>Zc(e,t,r)));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){return{rr_type:e.constructor.name,base64:function(e){var t,r=new Uint8Array(e),s=r.length,n="";for(t=0;t<s;t+=3)n+=jc[r[t]>>2],n+=jc[(3&r[t])<<4|r[t+1]>>4],n+=jc[(15&r[t+1])<<2|r[t+2]>>6],n+=jc[63&r[t+2]];return s%3==2?n=n.substring(0,n.length-1)+"=":s%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Zc(e.buffer,t,r),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:r}=e;return{rr_type:t,src:r}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Zc(e.data,t,r),e.width,e.height]}}if(Jc(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Gc(e,t,r)}}return e}const Yc=(e,t,r)=>e.map((e=>Zc(e,t,r))),Jc=(e,t)=>{const r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(r.find((r=>e instanceof t[r])))};function qc(e,t,r,s){const n=[];try{const o=Ul(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(n,...o){if(!Zl(this,t,r,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(n);if("__context"in this||(this.__context=e),s&&["webgl","webgl2"].includes(e))if(o[0]&&"object"==typeof o[0]){const e=o[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[n,...o])}}));n.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach((e=>e()))}}function Kc(e,t,r,s,n,o){const i=[],a=Object.getOwnPropertyNames(e);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;const a=Ul(e,l,(function(e){return function(...i){const a=e.apply(this,i);if(Gc(a,o,this),"tagName"in this.canvas&&!Zl(this.canvas,s,n,!0)){const e=Yc(i,o,this),s={type:t,property:l,args:e};r(this.canvas,s)}return a}}));i.push(a)}catch{const s=Bl(e,l,{set(e){r(this.canvas,{type:t,property:l,args:[e],setter:!0})}});i.push(s)}return i}const Xc="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Hc="undefined"!=typeof window&&window.Blob&&new Blob([($c=Xc,Uint8Array.from(atob($c),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});var $c;function Qc(e){let t;try{if(t=Hc&&(window.URL||window.webkitURL).createObjectURL(Hc),!t)throw"";const r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",(()=>{(window.URL||window.webkitURL).revokeObjectURL(t)})),r}catch(t){return new Worker("data:text/javascript;base64,"+Xc,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class eu{constructor(e){Y(this,"pendingCanvasMutations",new Map),Y(this,"rafStamps",{latestId:0,invokeId:null}),Y(this,"mirror"),Y(this,"mutationCb"),Y(this,"resetObservers"),Y(this,"frozen",!1),Y(this,"locked",!1),Y(this,"processMutation",((e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)}));const{sampling:t="all",win:r,blockClass:s,blockSelector:n,recordCanvas:o,dataURLOptions:i}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&"all"===t&&this.initCanvasMutationObserver(r,s,n),o&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,s,n,{dataURLOptions:i})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,s,n){const o=qc(t,r,s,!0),i=new Map,a=new Qc;a.onmessage=e=>{const{id:t}=e.data;if(i.set(t,!1),!("base64"in e.data))return;const{base64:r,type:s,width:n,height:o}=e.data;this.mutationCb({id:t,type:uc["2D"],commands:[{property:"clearRect",args:[0,0,n,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:s}]},0,0]}]})};const l=1e3/e;let c,u=0;const h=e=>{u&&e-u<l||(u=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach((t=>{Zl(t,r,s,!0)||e.push(t)})),e})().forEach((async e=>{var t;const r=this.mirror.getId(e);if(i.get(r))return;if(0===e.width||0===e.height)return;if(i.set(r,!0),["webgl","webgl2"].includes(e.__context)){const r=e.getContext(e.__context);!1===(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&r.clear(r.COLOR_BUFFER_BIT)}const s=await createImageBitmap(e);a.postMessage({id:r,bitmap:s,width:e.width,height:e.height,dataURLOptions:n.dataURLOptions},[s])}))),c=requestAnimationFrame(h)};c=requestAnimationFrame(h),this.resetObservers=()=>{o(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=qc(e,t,r,!1),n=function(e,t,r,s){const n=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const i of o)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[i])continue;const o=Ul(t.CanvasRenderingContext2D.prototype,i,(function(n){return function(...o){return Zl(this.canvas,r,s,!0)||setTimeout((()=>{const r=Yc(o,t,this);e(this.canvas,{type:uc["2D"],property:i,args:r})}),0),n.apply(this,o)}}));n.push(o)}catch{const r=Bl(t.CanvasRenderingContext2D.prototype,i,{set(t){e(this.canvas,{type:uc["2D"],property:i,args:[t],setter:!0})}});n.push(r)}return()=>{n.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r),o=function(e,t,r,s){const n=[];return n.push(...Kc(t.WebGLRenderingContext.prototype,uc.WebGL,e,r,s,t)),void 0!==t.WebGL2RenderingContext&&n.push(...Kc(t.WebGL2RenderingContext.prototype,uc.WebGL2,e,r,s,t)),()=>{n.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{s(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||-1===t)return;const s=r.map((e=>{const{type:t,...r}=e;return r})),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:s}),this.pendingCanvasMutations.delete(e)}}class tu{constructor(e){Y(this,"trackedLinkElements",new WeakSet),Y(this,"mutationCb"),Y(this,"adoptedStyleSheetCb"),Y(this,"styleMirror",new ec),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const r={id:t,styleIds:[]},s=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),s.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,r)=>({rule:ce(e,t.href),index:r})))})),r.styleIds.push(e)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class ru{constructor(){Y(this,"nodeMap",new WeakMap),Y(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let su,nu,ou,iu=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(z=e.contentWindow)?void 0:z.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const au=new ue;function lu(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:n="rr-block",blockSelector:o=null,ignoreClass:i="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:p,slimDOMOptions:d,maskInputFn:f,maskTextFn:m,hooks:g,packFn:y,sampling:v={},dataURLOptions:w={},mousemoveWait:b,recordDOM:S=!0,recordCanvas:C=!1,recordCrossOriginIframes:x=!1,recordAfter:I=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:k=!1,collectFonts:O=!1,inlineImages:E=!1,plugins:A,keepIframeSrcFn:R=()=>!1,ignoreCSSAttributes:M=new Set([]),errorHandler:P}=e;Sc=P;const N=!x||window.parent===window;let T=!1;if(!N)try{window.parent.document&&(T=!1)}catch(e){T=!0}if(N&&!t)throw new Error("emit function is required");if(!N&&!T)return()=>{};void 0!==b&&void 0===v.mousemove&&(v.mousemove=b),au.reset();const L=!0===h?{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}:void 0!==p?p:{password:!0},D=!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===d,headMetaDescKeywords:"all"===d,headTitleMutations:"all"===d}:d||{};let F;Xl();let _=0;const B=e=>{for(const t of A||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!T&&(e=y(e)),e};su=(e,n)=>{var o;const i=e;if(i.timestamp=jl(),!(null==(o=Ic[0])?void 0:o.isFrozen())||i.type===ic.FullSnapshot||i.type===ic.IncrementalSnapshot&&i.data.source===ac.Mutation||Ic.forEach((e=>e.unfreeze())),N)null==t||t(B(i),n);else if(T){const e={type:"rrweb",event:B(i),origin:window.location.origin,isCheckout:n};window.parent.postMessage(e,"*")}if(i.type===ic.FullSnapshot)F=i,_=0;else if(i.type===ic.IncrementalSnapshot){if(i.data.source===ac.Mutation&&i.data.isAttachIframe)return;_++;const e=s&&_>=s,t=r&&i.timestamp-F.timestamp>r;(e||t)&&nu(!0)}};const U=e=>{su({type:ic.IncrementalSnapshot,data:{source:ac.Mutation,...e}})},j=e=>su({type:ic.IncrementalSnapshot,data:{source:ac.Scroll,...e}}),z=e=>su({type:ic.IncrementalSnapshot,data:{source:ac.CanvasMutation,...e}}),W=new tu({mutationCb:U,adoptedStyleSheetCb:e=>su({type:ic.IncrementalSnapshot,data:{source:ac.AdoptedStyleSheet,...e}})}),V=new Bc({mirror:au,mutationCb:U,stylesheetManager:W,recordCrossOriginIframes:x,wrappedEmit:su});for(const e of A||[])e.getMirror&&e.getMirror({nodeMirror:au,crossOriginIframeMirror:V.crossOriginIframeMirror,crossOriginIframeStyleMirror:V.crossOriginIframeStyleMirror});const G=new ru;ou=new eu({recordCanvas:C,mutationCb:z,win:window,blockClass:n,blockSelector:o,mirror:au,sampling:v.canvas,dataURLOptions:w});const Z=new Uc({mutationCb:U,scrollCb:j,bypassOptions:{blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:L,dataURLOptions:w,maskTextFn:m,maskInputFn:f,recordCanvas:C,inlineImages:E,sampling:v,slimDOMOptions:D,iframeManager:V,stylesheetManager:W,canvasManager:ou,keepIframeSrcFn:R,processedNodeManager:G},mirror:au});nu=(e=!1)=>{if(!S)return;su({type:ic.Meta,data:{href:window.location.href,width:Vl(),height:Wl()}},e),W.reset(),Z.init(),Ic.forEach((e=>e.lock()));const t=function(e,t){const{mirror:r=new ue,blockClass:s="rr-block",blockSelector:n=null,maskTextClass:o="rr-mask",maskTextSelector:i=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:h,maskInputFn:p,slimDOM:d=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:b,keepIframeSrcFn:S=()=>!1}=t||{};return je(e,{doc:e,mirror:r,blockClass:s,blockSelector:n,maskTextClass:o,maskTextSelector:i,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===u?{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}:!1===u?{password:!0}:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===d,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===d?{}:d,dataURLOptions:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:b,keepIframeSrcFn:S,newlyAddedElement:!1})}(document,{mirror:au,blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:L,maskTextFn:m,maskInputFn:f,slimDOM:D,dataURLOptions:w,recordCanvas:C,inlineImages:E,onSerialize:e=>{Hl(e,au)&&V.addIframe(e),$l(e,au)&&W.trackLinkElement(e),Ql(e)&&Z.addShadowRoot(Tl.shadowRoot(e),document)},onIframeLoad:(e,t)=>{V.attachIframe(e,t),Z.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{W.attachLinkElement(e,t)},keepIframeSrcFn:R});if(!t)return console.warn("Failed to snapshot the document");su({type:ic.FullSnapshot,data:{node:t,initialOffset:zl(window)}},e),Ic.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&W.adoptStyleSheets(document.adoptedStyleSheets,au.getId(document))};try{const e=[],t=e=>{var t;return Cc(Lc)({mutationCb:U,mousemoveCb:(e,t)=>su({type:ic.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>su({type:ic.IncrementalSnapshot,data:{source:ac.MouseInteraction,...e}}),scrollCb:j,viewportResizeCb:e=>su({type:ic.IncrementalSnapshot,data:{source:ac.ViewportResize,...e}}),inputCb:e=>su({type:ic.IncrementalSnapshot,data:{source:ac.Input,...e}}),mediaInteractionCb:e=>su({type:ic.IncrementalSnapshot,data:{source:ac.MediaInteraction,...e}}),styleSheetRuleCb:e=>su({type:ic.IncrementalSnapshot,data:{source:ac.StyleSheetRule,...e}}),styleDeclarationCb:e=>su({type:ic.IncrementalSnapshot,data:{source:ac.StyleDeclaration,...e}}),canvasMutationCb:z,fontCb:e=>su({type:ic.IncrementalSnapshot,data:{source:ac.Font,...e}}),selectionCb:e=>{su({type:ic.IncrementalSnapshot,data:{source:ac.Selection,...e}})},customElementCb:e=>{su({type:ic.IncrementalSnapshot,data:{source:ac.CustomElement,...e}})},blockClass:n,ignoreClass:i,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:L,inlineStylesheet:u,sampling:v,recordDOM:S,recordCanvas:C,inlineImages:E,userTriggeredOnInput:k,collectFonts:O,doc:e,maskInputFn:f,maskTextFn:m,keepIframeSrcFn:R,blockSelector:o,slimDOMOptions:D,dataURLOptions:w,mirror:au,iframeManager:V,stylesheetManager:W,shadowDomManager:Z,processedNodeManager:G,canvasManager:ou,ignoreCSSAttributes:M,plugins:(null==(t=null==A?void 0:A.filter((e=>e.observer)))?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>su({type:ic.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},g)};V.addLoadListener((r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}}));const r=()=>{nu(),e.push(t(document)),iu=!0};return"interactive"===document.readyState||"complete"===document.readyState?r():(e.push(Ll("DOMContentLoaded",(()=>{su({type:ic.DomContentLoaded,data:{}}),"DOMContentLoaded"===I&&r()}))),e.push(Ll("load",(()=>{su({type:ic.Load,data:{}}),"load"===I&&r()}),window))),()=>{e.forEach((e=>e())),G.destroy(),iu=!1,Sc=void 0}}catch(e){console.warn(e)}}var cu,uu,hu,pu;lu.addCustomEvent=(e,t)=>{if(!iu)throw new Error("please add custom event after start recording");su({type:ic.Custom,data:{tag:e,payload:t}})},lu.freezePage=()=>{Ic.forEach((e=>e.freeze()))},lu.takeFullSnapshot=e=>{if(!iu)throw new Error("please take full snapshot after start recording");nu(e)},lu.mirror=au,(uu=cu||(cu={}))[uu.NotStarted=0]="NotStarted",uu[uu.Running=1]="Running",uu[uu.Stopped=2]="Stopped",function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(hu||(hu={})),function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(pu||(pu={}));var du=function(){function e(){}return e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,r,s,n,o,i,a,l,c,u,h,p,d,f,m,g,y,v,w,b,S,C;if("object"!=typeof e)return null;var x=e.code||0,I=this.buildStatus(x);switch(I){case pu.Success:return{status:I,statusCode:x,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(r=e.payload_size_bytes)&&void 0!==r?r:0,serverUploadTime:null!==(s=e.server_upload_time)&&void 0!==s?s:0}};case pu.Invalid:return{status:I,statusCode:x,body:{error:null!==(n=e.error)&&void 0!==n?n:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(i=e.events_with_invalid_fields)&&void 0!==i?i:{},eventsWithMissingFields:null!==(a=e.events_with_missing_fields)&&void 0!==a?a:{},eventsWithInvalidIdLengths:null!==(l=e.events_with_invalid_id_lengths)&&void 0!==l?l:{},epsThreshold:null!==(c=e.eps_threshold)&&void 0!==c?c:0,exceededDailyQuotaDevices:null!==(u=e.exceeded_daily_quota_devices)&&void 0!==u?u:{},silencedDevices:null!==(h=e.silenced_devices)&&void 0!==h?h:[],silencedEvents:null!==(p=e.silenced_events)&&void 0!==p?p:[],throttledDevices:null!==(d=e.throttled_devices)&&void 0!==d?d:{},throttledEvents:null!==(f=e.throttled_events)&&void 0!==f?f:[]}};case pu.PayloadTooLarge:return{status:I,statusCode:x,body:{error:null!==(m=e.error)&&void 0!==m?m:""}};case pu.RateLimit:return{status:I,statusCode:x,body:{error:null!==(g=e.error)&&void 0!==g?g:"",epsThreshold:null!==(y=e.eps_threshold)&&void 0!==y?y:0,throttledDevices:null!==(v=e.throttled_devices)&&void 0!==v?v:{},throttledUsers:null!==(w=e.throttled_users)&&void 0!==w?w:{},exceededDailyQuotaDevices:null!==(b=e.exceeded_daily_quota_devices)&&void 0!==b?b:{},exceededDailyQuotaUsers:null!==(S=e.exceeded_daily_quota_users)&&void 0!==S?S:{},throttledEvents:null!==(C=e.throttled_events)&&void 0!==C?C:[]}};case pu.Timeout:default:return{status:I,statusCode:x}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?pu.Success:429===e?pu.RateLimit:413===e?pu.PayloadTooLarge:408===e?pu.Timeout:e>=400&&e<500?pu.Invalid:e>=500?pu.Failed:pu.Unknown},e}(),fu="Remote config fetch rejected due to timeout after 5 seconds",mu="Unexpected error occurred",gu=function(){function e(e){var t=e.localConfig,r=e.configKeys,a=this;this.retryTimeout=1e3,this.attempts=0,this.sessionTargetingMatch=!1,this.metrics={},this.getRemoteConfig=function(e,t,r){return n(a,void 0,void 0,(function(){var s,n,i;return o(this,(function(o){switch(o.label){case 0:return s=Date.now(),[4,this.fetchWithTimeout(r)];case 1:return(n=o.sent())&&(i=n.configs&&n.configs[e])?(this.metrics.fetchTimeAPISuccess=Date.now()-s,[2,i[t]]):(this.metrics.fetchTimeAPIFail=Date.now()-s,[2,void 0])}}))}))},this.fetchWithTimeout=function(e){return n(a,void 0,void 0,(function(){var t,r,s;return o(this,(function(n){switch(n.label){case 0:return t=new AbortController,r=setTimeout((function(){return t.abort()}),5e3),[4,this.fetchRemoteConfig(t.signal,e)];case 1:return s=n.sent(),clearTimeout(r),[2,s]}}))}))},this.fetchRemoteConfig=function(e,t){return n(a,void 0,void 0,(function(){var r,n,a,l,c,u,h,p,d,f,m,g;return o(this,(function(o){switch(o.label){case 0:if(t===this.lastFetchedSessionId&&this.attempts>=this.localConfig.flushMaxRetries)return[2,this.completeRequest({err:"Remote config fetch rejected due to exceeded retry count"})];if(e.aborted)return[2,this.completeRequest({err:fu})];t!==this.lastFetchedSessionId&&(this.lastFetchedSessionId=t,this.attempts=0),o.label=1;case 1:o.trys.push([1,3,,4]),r=new URLSearchParams({api_key:this.localConfig.apiKey});try{for(n=i(this.configKeys),a=n.next();!a.done;a=n.next())l=a.value,r.append("config_keys",l)}catch(e){f={error:e}}finally{try{a&&!a.done&&(m=n.return)&&m.call(n)}finally{if(f)throw f.error}}return t&&r.set("session_id",String(t)),c={headers:{Accept:"*/*"},method:"GET"},u="".concat(this.getServerUrl(),"?").concat(r.toString()),this.attempts+=1,[4,fetch(u,s(s({},c),{signal:e}))];case 2:if(null===(h=o.sent()))return[2,this.completeRequest({err:mu})];switch((new du).buildStatus(h.status)){case pu.Success:return this.attempts=0,[2,this.parseAndStoreConfig(h)];case pu.Failed:return[2,this.retryFetch(e,t)];default:return[2,this.completeRequest({err:"Network error occurred, remote config fetch failed"})]}case 3:return p=o.sent(),d=p,e.aborted?[2,this.completeRequest({err:fu})]:[2,this.completeRequest({err:null!==(g=d.message)&&void 0!==g?g:mu})];case 4:return[2]}}))}))},this.retryFetch=function(e,t){return n(a,void 0,void 0,(function(){var r=this;return o(this,(function(s){switch(s.label){case 0:return[4,new Promise((function(e){return setTimeout(e,r.attempts*r.retryTimeout)}))];case 1:return s.sent(),[2,this.fetchRemoteConfig(e,t)]}}))}))},this.parseAndStoreConfig=function(e){return n(a,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return[4,e.json()];case 1:return t=r.sent(),this.completeRequest({success:"Remote config successfully fetched"}),[2,t]}}))}))},this.localConfig=t,this.configKeys=r}return e.prototype.getServerUrl=function(){return this.localConfig.configServerUrl?this.localConfig.configServerUrl:this.localConfig.serverZone===hu.STAGING?"https://sr-client-cfg.stag2.amplitude.com/config":this.localConfig.serverZone===hu.EU?"https://sr-client-cfg.eu.amplitude.com/config":"https://sr-client-cfg.amplitude.com/config"},e.prototype.completeRequest=function(e){var t=e.err,r=e.success;if(t)throw new Error(t);r&&this.localConfig.loggerProvider.log(r)},e}(),yu=function(e){var t=e.localConfig,r=e.configKeys;return n(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,new gu({localConfig:t,configKeys:r})]}))}))};function vu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wu(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof 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 s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),r}var bu={exports:{}},Su=String,Cu=function(){return{isColorSupported:!1,reset:Su,bold:Su,dim:Su,italic:Su,underline:Su,inverse:Su,hidden:Su,strikethrough:Su,black:Su,red:Su,green:Su,yellow:Su,blue:Su,magenta:Su,cyan:Su,white:Su,gray:Su,bgBlack:Su,bgRed:Su,bgGreen:Su,bgYellow:Su,bgBlue:Su,bgMagenta:Su,bgCyan:Su,bgWhite:Su}};bu.exports=Cu(),bu.exports.createColors=Cu;var xu=bu.exports;const Iu=wu(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let ku=xu,Ou=Iu,Eu=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=ku.isColorSupported),Ou&&e&&(t=Ou(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=ku.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Au=Eu;Eu.default=Eu;var Ru={};Ru.isClean=Symbol("isClean"),Ru.my=Symbol("my");const Mu={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Pu=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let 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");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",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")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Mu[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=Mu[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(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)}};var Nu=Pu;Pu.default=Pu;let Tu=Nu;function Lu(e,t){new Tu(t).stringify(e)}var Du=Lu;Lu.default=Lu;let{isClean:Fu,my:_u}=Ru,Bu=Au,Uu=Nu,ju=Du;function zu(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>zu(e,r))):("object"===o&&null!==n&&(n=zu(n)),r[s]=n)}return r}let Wu=class{constructor(e={}){this.raws={},this[Fu]=!1,this[_u]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=zu(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Bu(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Fu]){this[Fu]=!1;let e=this;for(;e=e.parent;)e[Fu]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let 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){let s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}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}}raw(e,t){return(new Uu).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ju){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var Vu=Wu;Wu.default=Wu;let Gu=Vu,Zu=class extends Gu{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Yu=Zu;Zu.default=Zu;var Ju={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}};let{SourceMapConsumer:qu,SourceMapGenerator:Ku}=Iu,{existsSync:Xu,readFileSync:Hu}=Iu,{dirname:$u,join:Qu}=Iu;let eh=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=$u(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new qu(this.text)),this.consumerCache}decodeInline(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 t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=$u(e),Xu(e))return this.mapFile=e,Hu(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof qu)return Ku.fromSourceMap(t).toString();if(t instanceof Ku)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=Qu($u(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var th=eh;eh.default=eh;let{SourceMapConsumer:rh,SourceMapGenerator:sh}=Iu,{fileURLToPath:nh,pathToFileURL:oh}=Iu,{isAbsolute:ih,resolve:ah}=Iu,{nanoid:lh}=Ju,ch=Iu,uh=Au,hh=th,ph=Symbol("fromOffsetCache"),dh=Boolean(rh&&sh),fh=Boolean(ah&&ih),mh=class{constructor(e,t={}){if(null==e||"object"==typeof 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&&(!fh||/^\w+:\/\//.test(t.from)||ih(t.from)?this.file=t.from:this.file=ah(t.from)),fh&&dh){let e=new hh(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+lh(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new uh(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new uh(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(oh&&(n.input.url=oh(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[ph])r=this[ph];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[ph]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ah(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=ih(a.source)?oh(a.source):new URL(a.source,this.map.consumer().sourceRoot||oh(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!nh)throw new Error("file: protocol is not available in this PostCSS build");l.file=nh(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var gh=mh;mh.default=mh,ch&&ch.registerInput&&ch.registerInput(mh);let{SourceMapConsumer:yh,SourceMapGenerator:vh}=Iu,{dirname:wh,relative:bh,resolve:Sh,sep:Ch}=Iu,{pathToFileURL:xh}=Iu,Ih=gh,kh=Boolean(yh&&vh),Oh=Boolean(wh&&Sh&&bh&&Ch);var Eh=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let 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";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||wh(e.file);!1===this.mapOpts.sourcesContent?(t=new yh(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Oh&&kh&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=vh.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new vh({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]}generateString(){this.css="",this.map=new vh({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?wh(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=wh(Sh(r,this.mapOpts.annotation)));let s=bh(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new Ih(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(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))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(xh){let t=xh(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Ch&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Ah=Vu,Rh=class extends Ah{constructor(e){super(e),this.type="comment"}};var Mh=Rh;Rh.default=Rh;let Ph,Nh,Th,Lh,{isClean:Dh,my:Fh}=Ru,_h=Yu,Bh=Mh,Uh=Vu;function jh(e){return e.map((e=>(e.nodes&&(e.nodes=jh(e.nodes)),delete e.source,e)))}function zh(e){if(e[Dh]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)zh(t)}let Wh=class e extends Uh{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=jh(Ph(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new _h(t)]}else if(t.selector)t=[new Nh(t)];else if(t.name)t=[new Th(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Bh(t)]}let s=t.map((t=>(t[Fh]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Dh]&&zh(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)));return s}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)})):this.walk(((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)})):this.walk(((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)})):this.walk(((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Wh.registerParse=e=>{Ph=e},Wh.registerRule=e=>{Nh=e},Wh.registerAtRule=e=>{Th=e},Wh.registerRoot=e=>{Lh=e};var Vh=Wh;Wh.default=Wh,Wh.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Th.prototype):"rule"===e.type?Object.setPrototypeOf(e,Nh.prototype):"decl"===e.type?Object.setPrototypeOf(e,_h.prototype):"comment"===e.type?Object.setPrototypeOf(e,Bh.prototype):"root"===e.type&&Object.setPrototypeOf(e,Lh.prototype),e[Fh]=!0,e.nodes&&e.nodes.forEach((e=>{Wh.rebuild(e)}))};let Gh,Zh,Yh=Vh,Jh=class extends Yh{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Gh(new Zh,this,e).stringify()}};Jh.registerLazyResult=e=>{Gh=e},Jh.registerProcessor=e=>{Zh=e};var qh=Jh;Jh.default=Jh;let Kh={};var Xh=function(e){Kh[e]||(Kh[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let Hh=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){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}};var $h=Hh;Hh.default=Hh;let Qh=$h,ep=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Qh(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var tp=ep;ep.default=ep;const rp="'".charCodeAt(0),sp='"'.charCodeAt(0),np="\\".charCodeAt(0),op="/".charCodeAt(0),ip="\n".charCodeAt(0),ap=" ".charCodeAt(0),lp="\f".charCodeAt(0),cp="\t".charCodeAt(0),up="\r".charCodeAt(0),hp="[".charCodeAt(0),pp="]".charCodeAt(0),dp="(".charCodeAt(0),fp=")".charCodeAt(0),mp="{".charCodeAt(0),gp="}".charCodeAt(0),yp=";".charCodeAt(0),vp="*".charCodeAt(0),wp=":".charCodeAt(0),bp="@".charCodeAt(0),Sp=/[\t\n\f\r "#'()/;[\\\]{}]/g,Cp=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,xp=/.[\r\n"'(/\\]/,Ip=/[\da-f]/i;let kp=Vh,Op=class extends kp{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Ep=Op;Op.default=Op,kp.registerAtRule(Op);let Ap,Rp,Mp=Vh,Pp=class extends Mp{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Ap(new Rp,this,e).stringify()}};Pp.registerLazyResult=e=>{Ap=e},Pp.registerProcessor=e=>{Rp=e};var Np=Pp;Pp.default=Pp,Mp.registerRoot(Pp);let Tp={comma:e=>Tp.split(e,[","],!0),space:e=>Tp.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var Lp=Tp;Tp.default=Tp;let Dp=Vh,Fp=Lp,_p=class extends Dp{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Fp.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Bp=_p;_p.default=_p,Dp.registerRule(_p);let Up=Yu,jp=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function v(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=p.charCodeAt(m),r){case ip:case ap:case cp:case up:case lp:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===ap||r===ip||r===cp||r===up||r===lp);h=["space",p.slice(m,s)],m=s-1;break;case hp:case pp:case mp:case gp:case wp:case yp:case fp:{let e=String.fromCharCode(r);h=[e,e,m];break}case dp:if(c=g.length?g.pop()[1]:"",u=p.charCodeAt(m+1),"url"===c&&u!==rp&&u!==sp&&u!==ap&&u!==ip&&u!==cp&&u!==lp&&u!==up){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}v("bracket")}for(l=s;p.charCodeAt(l-1)===np;)l-=1,a=!a}while(a);h=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),o=p.slice(m,s+1),-1===s||xp.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case rp:case sp:n=r===rp?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}v("string")}for(l=s;p.charCodeAt(l-1)===np;)l-=1,a=!a}while(a);h=["string",p.slice(m,s+1),m,s],m=s;break;case bp:Sp.lastIndex=m+1,Sp.test(p),s=0===Sp.lastIndex?p.length-1:Sp.lastIndex-2,h=["at-word",p.slice(m,s+1),m,s],m=s;break;case np:for(s=m,i=!0;p.charCodeAt(s+1)===np;)s+=1,i=!i;if(r=p.charCodeAt(s+1),i&&r!==op&&r!==ap&&r!==ip&&r!==cp&&r!==up&&r!==lp&&(s+=1,Ip.test(p.charAt(s)))){for(;Ip.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===ap&&(s+=1)}h=["word",p.slice(m,s+1),m,s],m=s;break;default:r===op&&p.charCodeAt(m+1)===vp?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:v("comment")),h=["comment",p.slice(m,s+1),m,s],m=s):(Cp.lastIndex=m+1,Cp.test(p),s=0===Cp.lastIndex?p.length-1:Cp.lastIndex-2,h=["word",p.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},zp=Mh,Wp=Ep,Vp=Np,Gp=Bp;const Zp={empty:!0,space:!0};var Yp=class{constructor(e){this.input=e,this.root=new Vp,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,s,n=new Wp;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new zp;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=jp(this.input)}decl(e,t){let r=new Up;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(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;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}let a=e.some((e=>"space"!==e[0]&&"comment"!==e[0]));a&&(r.raws.between+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Gp;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(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)}endFile(){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())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(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)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}parse(){let e;for(;!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()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,i,a,l=r.length,c="",u=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",Zp[a]||Zp[i]||","===c.slice(-1)?u=!1:c+=n[1]):c+=n[1]:u=!1;if(!u){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new Gp;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};let Jp=Vh,qp=Yp,Kp=gh;function Xp(e,t){let r=new Kp(e,t),s=new qp(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var Hp=Xp;Xp.default=Xp,Jp.registerParse(Xp);let{isClean:$p,my:Qp}=Ru,ed=Eh,td=Du,rd=Vh,sd=qh,nd=Xh,od=tp,id=Hp,ad=Np;const ld={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},cd={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},ud={Once:!0,postcssPlugin:!0,prepare:!0};function hd(e){return"object"==typeof e&&"function"==typeof e.then}function pd(e){let t=!1,r=ld[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 dd(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:pd(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function fd(e){return e[$p]=!1,e.nodes&&e.nodes.forEach((e=>fd(e))),e}let md={},gd=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof od)n=fd(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=id;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[Qp]&&rd.rebuild(n)}else n=fd(r);this.result=new od(t,n,s),this.helpers={...md,postcss:md,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!cd[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ud[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(hd(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[$p];){e[$p]=!0;let t=[dd(e)];for(;t.length>0;){let e=this.visitTick(t);if(hd(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return hd(t[0])?Promise.all(t):t}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)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=td;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new ed(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(hd(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[$p];)e[$p]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||nd("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(hd(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[$p])return s[$p]=!0,void e.push(dd(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[$p]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[$p]=!0;let t=pd(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[$p]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};gd.registerPostcss=e=>{md=e};var yd=gd;gd.default=gd,ad.registerLazyResult(gd),sd.registerLazyResult(gd);let vd=Eh,wd=Du,bd=Xh,Sd=Hp;const Cd=tp;let xd=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=wd;this.result=new Cd(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new vd(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||bd("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Sd;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Id=xd;xd.default=xd;let kd=Id,Od=yd,Ed=qh,Ad=Np,Rd=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Od(this,e,t):new kd(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Md=Rd;Rd.default=Rd,Ad.registerProcessor(Rd),Ed.registerProcessor(Rd);let Pd=Yu,Nd=th,Td=Mh,Ld=Ep,Dd=gh,Fd=Np,_d=Bp;function Bd(e,t){if(Array.isArray(e))return e.map((e=>Bd(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Dd.prototype};r.map&&(r.map={...r.map,__proto__:Nd.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>Bd(e,t)))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new Fd(s);if("decl"===s.type)return new Pd(s);if("rule"===s.type)return new _d(s);if("comment"===s.type)return new Td(s);if("atrule"===s.type)return new Ld(s);throw new Error("Unknown node type: "+e.type)}var Ud=Bd;Bd.default=Bd;let jd=Au,zd=Yu,Wd=yd,Vd=Vh,Gd=Md,Zd=Du,Yd=Ud,Jd=qh,qd=$h,Kd=Mh,Xd=Ep,Hd=tp,$d=gh,Qd=Hp,ef=Lp,tf=Bp,rf=Np,sf=Vu;function nf(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Gd(e)}nf.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!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"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new Gd).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return nf([n(r)]).process(e,t)},n},nf.stringify=Zd,nf.parse=Qd,nf.fromJSON=Yd,nf.list=ef,nf.comment=e=>new Kd(e),nf.atRule=e=>new Xd(e),nf.decl=e=>new zd(e),nf.rule=e=>new tf(e),nf.root=e=>new rf(e),nf.document=e=>new Jd(e),nf.CssSyntaxError=jd,nf.Declaration=zd,nf.Container=Vd,nf.Processor=Gd,nf.Document=Jd,nf.Comment=Kd,nf.Warning=qd,nf.AtRule=Xd,nf.Result=Hd,nf.Input=$d,nf.Rule=tf,nf.Root=rf,nf.Node=sf,Wd.registerPostcss(nf);var of=nf;nf.default=nf;const af=vu(of);af.stringify,af.fromJSON,af.plugin,af.parse,af.list,af.document,af.comment,af.atRule,af.rule,af.decl,af.root,af.CssSyntaxError,af.Declaration,af.Container,af.Processor,af.Document,af.Comment,af.Warning,af.AtRule,af.Result,af.Input,af.Rule,af.Root,af.Node;var lf="medium",cf=function(e,t,r){switch(t){case"light":if("input"!==e)return!0;var s=r?function(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?t.toLowerCase():null}(r):"";return!!s&&(!!["password","hidden","email","tel"].includes(s)||!!r.autocomplete.startsWith("cc-"));case"medium":case"conservative":return!0;default:return cf(e,lf,r)}},uf=function(e,t){return function(r,s){return function(e,t,r){var s,n,o;if(void 0===t&&(t={defaultMaskLevel:lf}),r){if(r.closest("."+j))return!0;var i=(null!==(s=t.maskSelector)&&void 0!==s?s:[]).some((function(e){return r.closest(e)}));if(i)return!0;if(r.closest(".amp-unmask"))return!1;var a=(null!==(n=t.unmaskSelector)&&void 0!==n?n:[]).some((function(e){return r.closest(e)}));if(a)return!1}return cf(e,null!==(o=t.defaultMaskLevel)&&void 0!==o?o:lf,r)}(e,t,s)?r.replace(/[^\s]/g,"*"):r}},hf=function(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++){t=(t<<5)-t+e.charCodeAt(r),t|=0}return t},pf=function(e,t){return t||(e===A.STAGING?"https://api-sr.stag2.amplitude.com/sessions/v2/track":e===A.EU?"https://api-sr.eu.amplitude.com/sessions/v2/track":"https://api-sr.amplitude.com/sessions/v2/track")},df=function(){return n(void 0,void 0,void 0,(function(){var e,t,r,s,n,i,a;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),(e=d())?[4,e.navigator.storage.estimate()]:[3,2];case 1:return t=o.sent(),r=t.usage,s=t.quota,n=t.usageDetails,i=r?Math.round(r/1024):0,a=r&&s?Math.round(1e3*(r/s+Number.EPSILON))/1e3:0,[2,{totalStorageSize:i,percentOfQuota:a,usageDetails:JSON.stringify(n)}];case 2:return[3,4];case 3:return o.sent(),[3,4];case 4:return[2,{totalStorageSize:0,percentOfQuota:0,usageDetails:""}]}}))}))},ff=function(e){var t=s({},e),r=t.apiKey;return t.apiKey="****".concat(r.substring(r.length-4)),t},mf=function(){function e(e,t){this.localConfig=t,this.remoteConfigFetch=e}return e.prototype.generateJoinedConfig=function(e){var t,r,l;return n(this,void 0,void 0,(function(){var n,c,u,h,p,d,f,m,g,y,v,w,b,S,C,x,I,k,O,E,A;return o(this,(function(o){switch(o.label){case 0:(n=s({},this.localConfig)).optOut=this.localConfig.optOut,n.captureEnabled=!0,o.label=1;case 1:return o.trys.push([1,6,,7]),[4,this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_sampling_config",e)];case 2:return u=o.sent(),[4,this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_privacy_config",e)];case 3:return h=o.sent(),p=n,[4,this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_interaction_config",e)];case 4:return p.interactionConfig=o.sent(),d=n,[4,this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_logging_config",e)];case 5:return d.loggingConfig=o.sent(),(u||h)&&(c={},u&&(c.sr_sampling_config=u),h&&(c.sr_privacy_config=h)),[3,7];case 6:return f=o.sent(),m=f,this.localConfig.loggerProvider.warn(m.message),n.captureEnabled=!1,[3,7];case 7:if(!c)return[2,n];if(g=c.sr_sampling_config,y=c.sr_privacy_config,g&&Object.keys(g).length>0?(Object.prototype.hasOwnProperty.call(g,"capture_enabled")?n.captureEnabled=g.capture_enabled:n.captureEnabled=!1,Object.prototype.hasOwnProperty.call(g,"sample_rate")&&(n.sampleRate=g.sample_rate)):(n.captureEnabled=!0,this.localConfig.loggerProvider.debug("Remote config successfully fetched, but no values set for project, Session Replay capture enabled.")),y){v=null!==(t=n.privacyConfig)&&void 0!==t?t:{},w={defaultMaskLevel:null!==(l=null!==(r=y.defaultMaskLevel)&&void 0!==r?r:v.defaultMaskLevel)&&void 0!==l?l:"medium",blockSelector:[],maskSelector:[],unmaskSelector:[]},b=function(e){var t,r,s,n,o,a,l,c,u,h={};"string"==typeof e.blockSelector&&(e.blockSelector=[e.blockSelector]);try{for(var p=i(null!==(l=e.blockSelector)&&void 0!==l?l:[]),d=p.next();!d.done;d=p.next()){h[d.value]="block"}}catch(e){t={error:e}}finally{try{d&&!d.done&&(r=p.return)&&r.call(p)}finally{if(t)throw t.error}}try{for(var f=i(null!==(c=e.maskSelector)&&void 0!==c?c:[]),m=f.next();!m.done;m=f.next()){h[m.value]="mask"}}catch(e){s={error:e}}finally{try{m&&!m.done&&(n=f.return)&&n.call(f)}finally{if(s)throw s.error}}try{for(var g=i(null!==(u=e.unmaskSelector)&&void 0!==u?u:[]),y=g.next();!y.done;y=g.next()){h[y.value]="unmask"}}catch(e){o={error:e}}finally{try{y&&!y.done&&(a=g.return)&&a.call(g)}finally{if(o)throw o.error}}return h},S=s(s({},b(v)),b(y));try{for(C=i(Object.entries(S)),x=C.next();!x.done;x=C.next())I=a(x.value,2),k=I[0],"mask"===(O=I[1])?w.maskSelector.push(k):"block"===O?w.blockSelector.push(k):"unmask"===O&&w.unmaskSelector.push(k)}catch(e){E={error:e}}finally{try{x&&!x.done&&(A=C.return)&&A.call(C)}finally{if(E)throw E.error}}n.privacyConfig=function(e,t){var r=document.createDocumentFragment(),s=function(e){if(void 0===e&&(e=[]),"string"==typeof e&&(e=[e]),e=e.filter((function(e){try{r.querySelector(e)}catch(r){return t.warn('[session-replay-browser] omitting selector "'.concat(e,'" because it is invalid')),!1}return!0})),0!==e.length)return e};return e.blockSelector=s(e.blockSelector),e.maskSelector=s(e.maskSelector),e.unmaskSelector=s(e.unmaskSelector),e}(w,this.localConfig.loggerProvider)}return this.localConfig.loggerProvider.debug(JSON.stringify({name:"session replay joined config",config:ff(n)},null,2)),[2,n]}}))}))},e}(),gf=function(e,t){return n(void 0,void 0,void 0,(function(){var r,s;return o(this,(function(n){switch(n.label){case 0:return r=new G(e,t),[4,yu({localConfig:r,configKeys:["sessionReplay"]})];case 1:return s=n.sent(),[2,new mf(s,r)]}}))}))},yf="Failed to store session replay events in IndexedDB",vf="1.22.3",wf=function(){function e(e){var t=e.trackServerUrl,r=e.loggerProvider,s=e.payloadBatcher;this.storageKey="",this.retryTimeout=1e3,this.scheduled=null,this.queue=[],this.loggerProvider=r,this.payloadBatcher=s||function(e){return e},this.trackServerUrl=t}return e.prototype.sendEventsList=function(e){this.addToQueue(s(s({},e),{attempts:0,timeout:0}))},e.prototype.addToQueue=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];t.filter((function(t){return t.attempts<(t.flushMaxRetries||0)?(t.attempts+=1,!0):(e.completeRequest({context:t,err:"Session replay event batch rejected due to exceeded retry count"}),!1)})).forEach((function(t){e.queue=e.queue.concat(t),0!==t.timeout?setTimeout((function(){t.timeout=0,e.schedule(0)}),t.timeout):e.schedule(0)}))},e.prototype.schedule=function(e){var t=this;this.scheduled||(this.scheduled=setTimeout((function(){t.flush(!0).then((function(){t.queue.length>0&&t.schedule(e)}))}),e))},e.prototype.flush=function(e){return void 0===e&&(e=!1),n(this,void 0,void 0,(function(){var t,r,s=this;return o(this,(function(n){switch(n.label){case 0:return t=[],r=[],this.queue.forEach((function(e){return 0===e.timeout?t.push(e):r.push(e)})),this.queue=r,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),[4,Promise.all(t.map((function(t){return s.send(t,e)})))];case 1:return n.sent(),[2]}}))}))},e.prototype.send=function(e,t){var r,s;return void 0===t&&(t=!0),n(this,void 0,void 0,(function(){var n,i,a,l,c,u,h,p,f,m,g,y,v;return o(this,(function(o){switch(o.label){case 0:if(!(n=e.apiKey))return[2,this.completeRequest({context:e,err:"Session replay event batch not sent due to missing api key"})];if(!(i=e.deviceId))return[2,this.completeRequest({context:e,err:"Session replay event batch not sent due to missing device ID"})];if(w=d(),a=(null==w?void 0:w.location)?w.location.href:"",l=vf,c=e.sampleRate,u=new URLSearchParams({device_id:i,session_id:"".concat(e.sessionId),type:"".concat(e.type)}),h="".concat((null===(r=e.version)||void 0===r?void 0:r.type)||"standalone","/").concat((null===(s=e.version)||void 0===s?void 0:s.version)||l),0===(p=this.payloadBatcher({version:1,events:e.events})).events.length)return this.completeRequest({context:e}),[2];o.label=1;case 1:return o.trys.push([1,3,,4]),f={headers:{"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(n),"X-Client-Version":l,"X-Client-Library":h,"X-Client-Url":a.substring(0,1e3),"X-Client-Sample-Rate":"".concat(c)},body:JSON.stringify(p),method:"POST"},m="".concat(pf(e.serverZone,this.trackServerUrl),"?").concat(u.toString()),[4,fetch(m,f)];case 2:if(null===(g=o.sent()))return this.completeRequest({context:e,err:"Unexpected error occurred"}),[2];if(t)this.handleReponse(g.status,e);else{y="";try{y=JSON.stringify(g.body,null,2)}catch(e){}this.completeRequest({context:e,success:"".concat(g.status,": ").concat(y)})}return[3,4];case 3:return v=o.sent(),this.completeRequest({context:e,err:v}),[3,4];case 4:return[2]}var w}))}))},e.prototype.handleReponse=function(e,t){switch((new T).buildStatus(e)){case c.Success:this.handleSuccessResponse(t);break;case c.Failed:this.handleOtherResponse(t);break;default:this.completeRequest({context:t,err:"Network error occurred, event batch rejected"})}},e.prototype.handleSuccessResponse=function(e){var t=Math.round(new Blob(e.events).size/1024);this.completeRequest({context:e,success:"Session replay event batch tracked successfully for session id ".concat(e.sessionId,", size of events: ").concat(t," KB")})},e.prototype.handleOtherResponse=function(e){this.addToQueue(s(s({},e),{timeout:e.attempts*this.retryTimeout}))},e.prototype.completeRequest=function(e){var t=e.context,r=e.err,s=e.success;t.onComplete(),r?this.loggerProvider.warn(r):s&&this.loggerProvider.log(s)},e}();const bf=(e,t)=>t.some((t=>e instanceof t));let Sf,Cf;const xf=new WeakMap,If=new WeakMap,kf=new WeakMap;let Of={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return xf.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Mf(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function Ef(e){Of=e(Of)}function Af(e){return(Cf||(Cf=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(Pf(this),t),Mf(this.request)}:function(...t){return Mf(e.apply(Pf(this),t))}}function Rf(e){return"function"==typeof e?Af(e):(e instanceof IDBTransaction&&function(e){if(xf.has(e))return;const t=new Promise(((t,r)=>{const s=()=>{e.removeEventListener("complete",n),e.removeEventListener("error",o),e.removeEventListener("abort",o)},n=()=>{t(),s()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),s()};e.addEventListener("complete",n),e.addEventListener("error",o),e.addEventListener("abort",o)}));xf.set(e,t)}(e),bf(e,Sf||(Sf=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,Of):e)}function Mf(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,r)=>{const s=()=>{e.removeEventListener("success",n),e.removeEventListener("error",o)},n=()=>{t(Mf(e.result)),s()},o=()=>{r(e.error),s()};e.addEventListener("success",n),e.addEventListener("error",o)}));return kf.set(t,e),t}(e);if(If.has(e))return If.get(e);const t=Rf(e);return t!==e&&(If.set(e,t),kf.set(t,e)),t}const Pf=e=>kf.get(e);function Nf(e,t,{blocked:r,upgrade:s,blocking:n,terminated:o}={}){const i=indexedDB.open(e,t),a=Mf(i);return s&&i.addEventListener("upgradeneeded",(e=>{s(Mf(i.result),e.oldVersion,e.newVersion,Mf(i.transaction),e)})),r&&i.addEventListener("blocked",(e=>r(e.oldVersion,e.newVersion,e))),a.then((e=>{o&&e.addEventListener("close",(()=>o())),n&&e.addEventListener("versionchange",(e=>n(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a}const Tf=["get","getKey","getAll","getAllKeys","count"],Lf=["put","add","delete","clear"],Df=new Map;function Ff(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(Df.get(t))return Df.get(t);const r=t.replace(/FromIndex$/,""),s=t!==r,n=Lf.includes(r);if(!(r in(s?IDBIndex:IDBObjectStore).prototype)||!n&&!Tf.includes(r))return;const o=async function(e,...t){const o=this.transaction(e,n?"readwrite":"readonly");let i=o.store;return s&&(i=i.index(t.shift())),(await Promise.all([i[r](...t),n&&o.done]))[0]};return Df.set(t,o),o}Ef((e=>({...e,get:(t,r,s)=>Ff(t,r)||e.get(t,r,s),has:(t,r)=>!!Ff(t,r)||e.has(t,r)})));const _f=["continue","continuePrimaryKey","advance"],Bf={},Uf=new WeakMap,jf=new WeakMap,zf={get(e,t){if(!_f.includes(t))return e[t];let r=Bf[t];return r||(r=Bf[t]=function(...e){Uf.set(this,jf.get(this)[t](...e))}),r}};async function*Wf(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const r=new Proxy(t,zf);for(jf.set(r,t),kf.set(r,Pf(t));t;)yield r,t=await(Uf.get(r)||t.continue()),Uf.delete(r)}function Vf(e,t){return t===Symbol.asyncIterator&&bf(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&bf(e,[IDBIndex,IDBObjectStore])}Ef((e=>({...e,get:(t,r,s)=>Vf(t,r)?Wf:e.get(t,r,s),has:(t,r)=>Vf(t,r)||e.has(t,r)})));var Gf,Zf=function(){function e(e){var t,r,s,n=this;this.minInterval=500,this.maxInterval=1e4,this.maxPersistedEventsSize=1e6,this.interval=this.minInterval,this._timeAtLastSplit=Date.now(),this.shouldSplitEventsList=function(e,t){var r=new Blob([t]).size;return new Blob(e).size+r>=n.maxPersistedEventsSize||!!(Date.now()-n.timeAtLastSplit>n.interval&&e.length)&&(n.interval=Math.min(n.maxInterval,n.interval+n.minInterval),n._timeAtLastSplit=Date.now(),!0)},this.loggerProvider=e.loggerProvider,this.minInterval=null!==(t=e.minInterval)&&void 0!==t?t:this.minInterval,this.maxInterval=null!==(r=e.maxInterval)&&void 0!==r?r:this.maxInterval,this.maxPersistedEventsSize=null!==(s=e.maxPersistedEventsSize)&&void 0!==s?s:this.maxPersistedEventsSize}return Object.defineProperty(e.prototype,"timeAtLastSplit",{get:function(){return this._timeAtLastSplit},enumerable:!1,configurable:!0}),e}();!function(e){e.RECORDING="recording",e.SENT="sent"}(Gf||(Gf={}));var Yf,Jf,qf,Kf="sessionCurrentSequence",Xf="sequencesToSend",Hf=function(){var e=d();return new Promise((function(t,r){if(!e)return r(new Error("Global scope not found"));if(!e.indexedDB)return r(new Error("Session Replay: cannot find indexedDB"));try{var s=e.indexedDB.open("keyval-store");s.onupgradeneeded=function(){1===s.result.version&&(s.result.close(),s.transaction&&s.transaction.abort(),e.indexedDB.deleteDatabase("keyval-store"),t())},s.onsuccess=function(){t(s.result)}}catch(e){r(e)}}))},$f=function(e){return n(void 0,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return e.length>0?(t=e.splice(0,10),[4,Promise.all(t)]):[3,2];case 1:return r.sent(),[3,0];case 2:return[2]}}))}))},Qf=function(e){var t,r;return e.objectStoreNames.contains(Kf)||(r=e.createObjectStore(Kf,{keyPath:"sessionId"})),e.objectStoreNames.contains(Xf)||(t=e.createObjectStore(Xf,{keyPath:"sequenceId",autoIncrement:!0})).createIndex("sessionId","sessionId"),{sequencesStore:t,currentSequenceStore:r}},em=function(e){return n(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,Nf(e,1,{upgrade:Qf})];case 1:return[2,t.sent()]}}))}))},tm=function(e){function t(t){var r=e.call(this,t)||this;return r.getSequencesToSend=function(){return n(r,void 0,void 0,(function(){var e,t,r,s,n,i;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,5,,6]),e=[],[4,this.db.transaction("sequencesToSend").store.openCursor()];case 1:t=o.sent(),o.label=2;case 2:return t?(r=t.value,s=r.sessionId,n=r.events,e.push({events:n,sequenceId:t.key,sessionId:s}),[4,t.continue()]):[3,4];case 3:return t=o.sent(),[3,2];case 4:return[2,e];case 5:return i=o.sent(),this.loggerProvider.warn("".concat(yf,": ").concat(i)),[3,6];case 6:return[2,void 0]}}))}))},r.storeCurrentSequence=function(e){return n(r,void 0,void 0,(function(){var t,r,n;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,4,,5]),[4,this.db.get(Kf,e)];case 1:return(t=o.sent())?[4,this.db.put(Xf,{sessionId:e,events:t.events})]:[2,void 0];case 2:return r=o.sent(),[4,this.db.put(Kf,{sessionId:e,events:[]})];case 3:return o.sent(),[2,s(s({},t),{sessionId:e,sequenceId:r})];case 4:return n=o.sent(),this.loggerProvider.warn("".concat(yf,": ").concat(n)),[3,5];case 5:return[2,void 0]}}))}))},r.addEventToCurrentSequence=function(e,t){return n(r,void 0,void 0,(function(){var r,s,n,i,a,l;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,10,,11]),[4,(r=this.db.transaction(Kf,"readwrite")).store.get(e)];case 1:return(s=o.sent())?[3,3]:[4,r.store.put({sessionId:e,events:[t]})];case 2:return o.sent(),[2];case 3:return n=void 0,this.shouldSplitEventsList(s.events,t)?(n=s.events,[4,r.store.put({sessionId:e,events:[t]})]):[3,5];case 4:return o.sent(),[3,7];case 5:return i=s.events.concat(t),[4,r.store.put({sessionId:e,events:i})];case 6:o.sent(),o.label=7;case 7:return[4,r.done];case 8:return o.sent(),n?[4,this.storeSendingEvents(e,n)]:[2,void 0];case 9:return(a=o.sent())?[2,{events:n,sessionId:e,sequenceId:a}]:[2,void 0];case 10:return l=o.sent(),this.loggerProvider.warn("".concat(yf,": ").concat(l)),[3,11];case 11:return[2,void 0]}}))}))},r.storeSendingEvents=function(e,t){return n(r,void 0,void 0,(function(){var r;return o(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,this.db.put(Xf,{sessionId:e,events:t})];case 1:return[2,s.sent()];case 2:return r=s.sent(),this.loggerProvider.warn("".concat(yf,": ").concat(r)),[3,3];case 3:return[2,void 0]}}))}))},r.cleanUpSessionEventsStore=function(e,t){return n(r,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:if(!t)return[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.db.delete(Xf,t)];case 2:return r.sent(),[3,4];case 3:return e=r.sent(),this.loggerProvider.warn("".concat(yf,": ").concat(e)),[3,4];case 4:return[2]}}))}))},r.transitionFromKeyValStore=function(e){return n(r,void 0,void 0,(function(){var t,r,s,i,a,l,c,h,p=this;return o(this,(function(f){switch(f.label){case 0:return f.trys.push([0,6,,7]),[4,Hf()];case 1:if(!(t=f.sent()))return[2];r=function(e,t){return n(p,void 0,void 0,(function(){var r,s,i=this;return o(this,(function(a){switch(a.label){case 0:return r=t.sessionSequences,s=[],Object.keys(r).forEach((function(a){var l=parseInt(a,10),c=r[l];if(l===t.currentSequenceId){var u=c.events.map((function(t){return n(i,void 0,void 0,(function(){return o(this,(function(r){return[2,this.addEventToCurrentSequence(e,t)]}))}))}));s.concat(u)}else c.status!==Gf.SENT&&s.push(i.storeSendingEvents(e,c.events))})),[4,$f(s)];case 1:return a.sent(),[2]}}))}))},s="".concat(u,"_").concat(this.apiKey.substring(0,10)),f.label=2;case 2:return f.trys.push([2,4,,5]),i=t.transaction("keyval").objectStore("keyval").getAll(s),a=new Promise((function(t){i.onsuccess=function(s){return n(p,void 0,void 0,(function(){var n,i,a,l=this;return o(this,(function(o){switch(o.label){case 0:return n=s&&s.target.result,(i=n&&n[0])?(a=[],Object.keys(i).forEach((function(t){var s=parseInt(t,10),n=i[s];if(e===s)a.push(r(s,n));else{var o=n.sessionSequences;Object.keys(o).forEach((function(e){var t=parseInt(e,10);o[t].status!==Gf.SENT&&a.push(l.storeSendingEvents(s,o[t].events))}))}})),[4,$f(a)]):[3,2];case 1:o.sent(),o.label=2;case 2:return t(),[2]}}))}))}})),[4,a];case 3:return f.sent(),(l=d())&&l.indexedDB.deleteDatabase("keyval-store"),[3,5];case 4:return c=f.sent(),this.loggerProvider.warn("Failed to transition session replay events from keyval to new store: ".concat(c)),[3,5];case 5:return[3,7];case 6:return h=f.sent(),this.loggerProvider.warn("Failed to access keyval store: ".concat(h,". For more information, visit: https://www.docs.developers.amplitude.com/session-replay/sdks/standalone/#indexeddb-best-practices")),[3,7];case 7:return[2]}}))}))},r.apiKey=t.apiKey,r.db=t.db,r}return r(t,e),t.new=function(e,r,i){return n(this,void 0,void 0,(function(){var n,a,l,c,u;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),n="replay"===e?"":"_".concat(e),a="".concat(r.apiKey.substring(0,10),"_amp_session_replay_events").concat(n),[4,em(a)];case 1:return l=o.sent(),[4,(c=new t(s(s({},r),{db:l}))).transitionFromKeyValStore(i)];case 2:return o.sent(),[2,c];case 3:return u=o.sent(),r.loggerProvider.warn("".concat(yf,": ").concat(u)),[3,4];case 4:return[2]}}))}))},t.prototype.getCurrentSequenceEvents=function(e){return n(this,void 0,void 0,(function(){var t,r,s,n,a,l,c;return o(this,(function(o){switch(o.label){case 0:return e?[4,this.db.get("sessionCurrentSequence",e)]:[3,2];case 1:return(n=o.sent())?[2,[n]]:[2,void 0];case 2:t=[],o.label=3;case 3:return o.trys.push([3,8,9,10]),[4,this.db.getAll("sessionCurrentSequence")];case 4:r=i.apply(void 0,[o.sent()]),s=r.next(),o.label=5;case 5:if(s.done)return[3,7];n=s.value,t.push(n),o.label=6;case 6:return s=r.next(),[3,5];case 7:return[3,10];case 8:return a=o.sent(),l={error:a},[3,10];case 9:try{s&&!s.done&&(c=r.return)&&c.call(r)}finally{if(l)throw l.error}return[7];case 10:return[2,t]}}))}))},t}(Zf),rm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.finalizedSequences={},t.sequences={},t.sequenceId=0,t}return r(t,e),t.prototype.resetCurrentSequence=function(e){this.sequences[e]=[]},t.prototype.addSequence=function(e){var t=this.sequenceId++,r=l([],a(this.sequences[e]),!1);return this.finalizedSequences[t]={sessionId:e,events:r},this.resetCurrentSequence(e),{sequenceId:t,events:r,sessionId:e}},t.prototype.getSequencesToSend=function(){return n(this,void 0,void 0,(function(){return o(this,(function(e){return[2,Object.entries(this.finalizedSequences).map((function(e){var t=a(e,2),r=t[0],s=t[1],n=s.sessionId,o=s.events;return{sequenceId:Number(r),sessionId:n,events:o}}))]}))}))},t.prototype.storeCurrentSequence=function(e){return n(this,void 0,void 0,(function(){return o(this,(function(t){return this.sequences[e]?[2,this.addSequence(e)]:[2,void 0]}))}))},t.prototype.addEventToCurrentSequence=function(e,t){return n(this,void 0,void 0,(function(){var r;return o(this,(function(s){return this.sequences[e]||this.resetCurrentSequence(e),this.shouldSplitEventsList(this.sequences[e],t)&&(r=this.addSequence(e)),this.sequences[e].push(t),[2,r]}))}))},t.prototype.storeSendingEvents=function(e,t){return n(this,void 0,void 0,(function(){return o(this,(function(r){return this.finalizedSequences[this.sequenceId]={sessionId:e,events:t},[2,this.sequenceId++]}))}))},t.prototype.cleanUpSessionEventsStore=function(e,t){return n(this,void 0,void 0,(function(){return o(this,(function(e){return void 0!==t&&delete this.finalizedSequences[t],[2]}))}))},t}(Zf),sm=function(e){var t=e.config,r=e.sessionId,i=e.minInterval,a=e.maxInterval,l=e.type,c=e.payloadBatcher,u=e.storeType;return n(void 0,void 0,void 0,(function(){function e(e){return void 0===e&&(e=!1),n(this,void 0,void 0,(function(){return o(this,(function(t){return[2,h.flush(e)]}))}))}var h,p,d,f,m,g,y,v,w;return o(this,(function(b){switch(b.label){case 0:return h=new wf(s(s({},t),{loggerProvider:t.loggerProvider,payloadBatcher:c})),p=function(){return new rm({loggerProvider:t.loggerProvider,maxInterval:a,minInterval:i})},d=function(){return n(void 0,void 0,void 0,(function(){var e;return o(this,(function(s){switch(s.label){case 0:return[4,tm.new(l,{loggerProvider:t.loggerProvider,minInterval:i,maxInterval:a,apiKey:t.apiKey},r)];case 1:return e=s.sent(),t.loggerProvider.log("Failed to initialize idb store, falling back to memory store."),[2,null!=e?e:p()]}}))}))},"idb"!==u?[3,2]:[4,d()];case 1:return m=b.sent(),[3,3];case 2:m=p(),b.label=3;case 3:return f=m,g=function(e){var r=e.events,s=e.sessionId,i=e.deviceId,a=e.sequenceId;t.debugMode&&df().then((function(e){var r=e.totalStorageSize,s=e.percentOfQuota,n=e.usageDetails;t.loggerProvider.debug("Total storage size: ".concat(r," KB, percentage of quota: ").concat(s,"%, usage details: ").concat(n))})).catch((function(){})),h.sendEventsList({events:r,sessionId:s,flushMaxRetries:t.flushMaxRetries,apiKey:t.apiKey,deviceId:i,sampleRate:t.sampleRate,serverZone:t.serverZone,version:t.version,type:l,onComplete:function(){return n(void 0,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,f.cleanUpSessionEventsStore(s,a)];case 1:return e.sent(),[2]}}))}))}})},y=function(e){var r=e.sessionId,s=e.deviceId;f.storeCurrentSequence(r).then((function(e){e&&g({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:s})})).catch((function(e){t.loggerProvider.warn("Failed to get current sequence of session replay events for session:",e)}))},v=function(e){var t=e.deviceId;return n(void 0,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return[4,f.getSequencesToSend()];case 1:return(e=r.sent())&&e.forEach((function(e){g({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:t})})),[2]}}))}))},w=function(e){var r=e.event,s=e.sessionId,n=e.deviceId;f.addEventToCurrentSequence(s,r.data).then((function(e){return e&&g({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:n})})).catch((function(e){t.loggerProvider.warn("Failed to add event to session replay capture:",e)}))},[2,{sendCurrentSequenceEvents:y,addEvent:w,sendStoredEvents:v,flush:e}]}}))}))},nm=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=new Map;e.forEach((function(e){r.set(e.name,e.manager)})),this.managers=r}return e.prototype.sendStoredEvents=function(e){return n(this,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return t=[],this.managers.forEach((function(r){t.push(r.sendStoredEvents(e))})),[4,Promise.all(t)];case 1:return r.sent(),[2]}}))}))},e.prototype.addEvent=function(e){var t,r=e.sessionId,s=e.event,n=e.deviceId;null===(t=this.managers.get(s.type))||void 0===t||t.addEvent({sessionId:r,event:s,deviceId:n})},e.prototype.sendCurrentSequenceEvents=function(e){var t=e.sessionId,r=e.deviceId;this.managers.forEach((function(e){e.sendCurrentSequenceEvents({sessionId:t,deviceId:r})}))},e.prototype.flush=function(e){return n(this,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return t=[],this.managers.forEach((function(r){t.push(r.flush(e))})),[4,Promise.all(t)];case 1:return r.sent(),[2]}}))}))},e}(),om=(e=>(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))(om||{});function im(e,t){if(qf=new Date,e.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if("html"===e.tagName.toLowerCase())return"html";var r={root:document.body,idName:function(e){return!0},className:function(e){return!0},tagName:function(e){return!0},attr:function(e,t){return!1},seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};Yf=s(s({},r),t),Jf=function(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return e;if(e===t.root)return e.ownerDocument;return e}(Yf.root,r);var n=am(e,"all",(function(){return am(e,"two",(function(){return am(e,"one",(function(){return am(e,"none")}))}))}));if(n){var o=ym(vm(n,e));return o.length>0&&(n=o[0]),cm(n)}throw new Error("Selector was not found.")}function am(e,t,r){for(var s=null,n=[],o=e,c=0,u=function(){var e,u,h=(new Date).getTime()-qf.getTime();if(void 0!==Yf.timeoutMs&&h>Yf.timeoutMs)throw new Error("Timeout: Can't find a unique selector after ".concat(h,"ms"));var p=fm(function(e){var t=e.getAttribute("id");if(t&&Yf.idName(t))return{name:"#"+CSS.escape(t),penalty:0};return null}(o))||fm.apply(void 0,l([],a(function(e){var t=Array.from(e.attributes).filter((function(e){return Yf.attr(e.name,e.value)}));return t.map((function(e){return{name:"[".concat(CSS.escape(e.name),'="').concat(CSS.escape(e.value),'"]'),penalty:.5}}))}(o)),!1))||fm.apply(void 0,l([],a(function(e){var t=Array.from(e.classList).filter(Yf.className);return t.map((function(e){return{name:"."+CSS.escape(e),penalty:1}}))}(o)),!1))||fm(function(e){var t=e.tagName.toLowerCase();if(Yf.tagName(t))return{name:t,penalty:2};return null}(o))||[{name:"*",penalty:3}],d=function(e){var t=e.parentNode;if(!t)return null;var r=t.firstChild;if(!r)return null;var s=0;for(;r&&(r.nodeType===Node.ELEMENT_NODE&&s++,r!==e);)r=r.nextSibling;return s}(o);if("all"==t)d&&(p=p.concat(p.filter(dm).map((function(e){return pm(e,d)}))));else if("two"==t)p=p.slice(0,1),d&&(p=p.concat(p.filter(dm).map((function(e){return pm(e,d)}))));else if("one"==t){var f=a(p=p.slice(0,1),1)[0];d&&dm(f)&&(p=[pm(f,d)])}else"none"==t&&(p=[{name:"*",penalty:3}],d&&(p=[pm(p[0],d)]));try{for(var m=(e=void 0,i(p)),g=m.next();!g.done;g=m.next()){(f=g.value).level=c}}catch(t){e={error:t}}finally{try{g&&!g.done&&(u=m.return)&&u.call(m)}finally{if(e)throw e.error}}if(n.push(p),n.length>=Yf.seedMinLength&&(s=lm(n,r)))return"break";o=o.parentElement,c++};o;){if("break"===u())break}return s||(s=lm(n,r)),!s&&r?r():s}function lm(e,t){var r,s,n=ym(gm(e));if(n.length>Yf.threshold)return t?t():null;try{for(var o=i(n),a=o.next();!a.done;a=o.next()){var l=a.value;if(hm(l))return l}}catch(e){r={error:e}}finally{try{a&&!a.done&&(s=o.return)&&s.call(o)}finally{if(r)throw r.error}}return null}function cm(e){for(var t=e[0],r=t.name,s=1;s<e.length;s++){var n=e[s].level||0;r=t.level===n-1?"".concat(e[s].name," > ").concat(r):"".concat(e[s].name," ").concat(r),t=e[s]}return r}function um(e){return e.map((function(e){return e.penalty})).reduce((function(e,t){return e+t}),0)}function hm(e){var t=cm(e);switch(Jf.querySelectorAll(t).length){case 0:throw new Error("Can't select any node with this selector: ".concat(t));case 1:return!0;default:return!1}}function pm(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}}function dm(e){return"html"!==e.name&&!e.name.startsWith("#")}function fm(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.filter(mm);return r.length>0?r:null}function mm(e){return null!=e}function gm(e,t){var r,s,n,a,l,c;return void 0===t&&(t=[]),o(this,(function(o){switch(o.label){case 0:if(!(e.length>0))return[3,9];o.label=1;case 1:o.trys.push([1,6,7,8]),r=i(e[0]),s=r.next(),o.label=2;case 2:return s.done?[3,5]:(n=s.value,[5,i(gm(e.slice(1,e.length),t.concat(n)))]);case 3:o.sent(),o.label=4;case 4:return s=r.next(),[3,2];case 5:return[3,8];case 6:return a=o.sent(),l={error:a},[3,8];case 7:try{s&&!s.done&&(c=r.return)&&c.call(r)}finally{if(l)throw l.error}return[7];case 8:return[3,11];case 9:return[4,t];case 10:o.sent(),o.label=11;case 11:return[2]}}))}function ym(e){return l([],a(e),!1).sort((function(e,t){return um(e)-um(t)}))}function vm(e,t,r){var s,n,c;return void 0===r&&(r={counter:0,visited:new Map}),o(this,(function(o){switch(o.label){case 0:if(!(e.length>2&&e.length>Yf.optimizedMinLength))return[3,5];s=1,o.label=1;case 1:return s<e.length-1?r.counter>Yf.maxNumberOfTries?[2]:(r.counter+=1,(n=l([],a(e),!1)).splice(s,1),c=cm(n),r.visited.has(c)?[2]:hm(n)&&function(e,t){return Jf.querySelector(cm(e))===t}(n,t)?[4,n]:[3,4]):[3,5];case 2:return o.sent(),r.visited.set(c,!0),[5,i(vm(n,t,r))];case 3:o.sent(),o.label=4;case 4:return s++,[3,1];case 5:return[2]}}))}var wm=function(e){var t=e.version,r=e.events,s=[];return r.forEach((function(e){var t=JSON.parse(e);t.count=1,"click"===t.type&&s.push(t)})),{version:t,events:s}},bm=function(e){var t=e.version,r=e.events,n=[];r.forEach((function(e){var t=JSON.parse(e);"click"===t.type&&n.push(t)}));var o=n.reduce((function(e,t){var r=t.x,n=t.y,o=t.selector,i=t.timestamp,a=i-i%36e5,l="".concat(r,":").concat(n,":").concat(null!=o?o:"",":").concat(a);return e[l]?e[l].count+=1:e[l]=s(s({},t),{timestamp:a,count:1}),e}),{});return{version:t,events:Object.values(o)}},Sm=function(e,t){var r=t.eventsManager,s=t.sessionId,n=t.deviceIdFn;return function(t){if(t.type===om.Click){var o=d();if(o){var i=o.location,a=o.innerHeight,l=o.innerWidth;if(i){var c=t.x,u=t.y;if(void 0!==c&&void 0!==u){var h,p=lu.mirror.getNode(t.id);if(p)try{h=im(p)}catch(t){e.debug("error resolving selector from finder")}var f=oc.getWindowScroll(o),m={x:c+f.left,y:u+f.top,selector:h,viewportHeight:a,viewportWidth:l,pageUrl:i.href,timestamp:Date.now(),type:"click"},g=n();g&&r.addEvent({sessionId:s,event:{type:"interaction",data:JSON.stringify(m)},deviceId:g})}}}}}},Cm=function(){function e(e,t){var r=d();r&&r.navigator&&"function"==typeof r.navigator.sendBeacon?this.sendBeacon=function(e,t){try{if(r.navigator.sendBeacon(e,JSON.stringify(t)))return!0}catch(e){}return!1}:this.sendBeacon=function(){return!1},this.sendXhr=function(e,t){var r=new XMLHttpRequest;return r.open("POST",e,!0),r.setRequestHeader("Accept","*/*"),r.send(JSON.stringify(t)),!0},this.basePageUrl=pf(t.serverZone,t.trackServerUrl),this.apiKey=t.apiKey,this.context=e}return e.prototype.send=function(e,t){var r=this.context,s=r.sessionId,n=r.type,o=new URLSearchParams({device_id:e,session_id:String(s),type:String(n),api_key:this.apiKey}),i="".concat(this.basePageUrl,"?").concat(o.toString());this.sendBeacon(i,t)||this.sendXhr(i,t)},e}(),xm=oc.getWindowHeight,Im=oc.getWindowWidth,km=function(){function e(e){var t=this;this.timestamp=Date.now(),this.hook=function(e){t.update(e)},this.send=function(e){return function(r){var s=e(),n=d();n&&s&&t.transport.send(s,{version:1,events:[{maxScrollX:t._maxScrollX,maxScrollY:t._maxScrollY,maxScrollWidth:t._maxScrollWidth,maxScrollHeight:t._maxScrollHeight,viewportHeight:xm(),viewportWidth:Im(),pageUrl:n.location.href,timestamp:t.timestamp,type:"scroll"}]})}},this._maxScrollX=0,this._maxScrollY=0,this._maxScrollWidth=Im(),this._maxScrollHeight=xm(),this.transport=e}return e.default=function(t,r){return new e(new Cm(t,r))},Object.defineProperty(e.prototype,"maxScrollX",{get:function(){return this._maxScrollX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollY",{get:function(){return this._maxScrollY},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollWidth",{get:function(){return this._maxScrollWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollHeight",{get:function(){return this._maxScrollHeight},enumerable:!1,configurable:!0}),e.prototype.update=function(e){var t=Date.now();if(e.x>this._maxScrollX){var r=Im();this._maxScrollX=e.x;var s=e.x+r;s>this._maxScrollWidth&&(this._maxScrollWidth=s),this.timestamp=t}if(e.y>this._maxScrollY){var n=xm();this._maxScrollY=e.y;var o=e.y+n;o>this._maxScrollHeight&&(this._maxScrollHeight=o),this.timestamp=t}},e}(),Om=function(e){var t=e.sessionId,r=e.deviceId;this.deviceId=r,this.sessionId=t,t&&r&&(this.sessionReplayId=function(e,t){return"".concat(t,"/").concat(e)}(t,r))},Em=Uint8Array,Am=Uint16Array,Rm=Uint32Array,Mm=new Em([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Pm=new Em([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Nm=new Em([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Tm=function(e,t){for(var r=new Am(31),s=0;s<31;++s)r[s]=t+=1<<e[s-1];var n=new Rm(r[30]);for(s=1;s<30;++s)for(var o=r[s];o<r[s+1];++o)n[o]=o-r[s]<<5|s;return[r,n]},Lm=Tm(Mm,2),Dm=Lm[0],Fm=Lm[1];Dm[28]=258,Fm[258]=28;for(var _m=Tm(Pm,0)[1],Bm=new Am(32768),Um=0;Um<32768;++Um){var jm=(43690&Um)>>>1|(21845&Um)<<1;jm=(61680&(jm=(52428&jm)>>>2|(13107&jm)<<2))>>>4|(3855&jm)<<4,Bm[Um]=((65280&jm)>>>8|(255&jm)<<8)>>>1}var zm=function(e,t,r){for(var s=e.length,n=0,o=new Am(t);n<s;++n)++o[e[n]-1];var i,a=new Am(t);for(n=0;n<t;++n)a[n]=a[n-1]+o[n-1]<<1;if(r){i=new Am(1<<t);var l=15-t;for(n=0;n<s;++n)if(e[n])for(var c=n<<4|e[n],u=t-e[n],h=a[e[n]-1]++<<u,p=h|(1<<u)-1;h<=p;++h)i[Bm[h]>>>l]=c}else for(i=new Am(s),n=0;n<s;++n)i[n]=Bm[a[e[n]-1]++]>>>15-e[n];return i},Wm=new Em(288);for(Um=0;Um<144;++Um)Wm[Um]=8;for(Um=144;Um<256;++Um)Wm[Um]=9;for(Um=256;Um<280;++Um)Wm[Um]=7;for(Um=280;Um<288;++Um)Wm[Um]=8;var Vm=new Em(32);for(Um=0;Um<32;++Um)Vm[Um]=5;var Gm=zm(Wm,9,0),Zm=zm(Vm,5,0),Ym=function(e){return(e/8|0)+(7&e&&1)},Jm=function(e,t,r){(null==r||r>e.length)&&(r=e.length);var s=new(e instanceof Am?Am:e instanceof Rm?Rm:Em)(r-t);return s.set(e.subarray(t,r)),s},qm=function(e,t,r){r<<=7&t;var s=t/8|0;e[s]|=r,e[s+1]|=r>>>8},Km=function(e,t,r){r<<=7&t;var s=t/8|0;e[s]|=r,e[s+1]|=r>>>8,e[s+2]|=r>>>16},Xm=function(e,t){for(var r=[],s=0;s<e.length;++s)e[s]&&r.push({s:s,f:e[s]});var n=r.length,o=r.slice();if(!n)return[new Em(0),0];if(1==n){var i=new Em(r[0].s+1);return i[r[0].s]=1,[i,1]}r.sort((function(e,t){return e.f-t.f})),r.push({s:-1,f:25001});var a=r[0],l=r[1],c=0,u=1,h=2;for(r[0]={s:-1,f:a.f+l.f,l:a,r:l};u!=n-1;)a=r[r[c].f<r[h].f?c++:h++],l=r[c!=u&&r[c].f<r[h].f?c++:h++],r[u++]={s:-1,f:a.f+l.f,l:a,r:l};var p=o[0].s;for(s=1;s<n;++s)o[s].s>p&&(p=o[s].s);var d=new Am(p+1),f=Hm(r[u-1],d,0);if(f>t){s=0;var m=0,g=f-t,y=1<<g;for(o.sort((function(e,t){return d[t.s]-d[e.s]||e.f-t.f}));s<n;++s){var v=o[s].s;if(!(d[v]>t))break;m+=y-(1<<f-d[v]),d[v]=t}for(m>>>=g;m>0;){var w=o[s].s;d[w]<t?m-=1<<t-d[w]++-1:++s}for(;s>=0&&m;--s){var b=o[s].s;d[b]==t&&(--d[b],++m)}f=t}return[new Em(d),f]},Hm=function(e,t,r){return-1==e.s?Math.max(Hm(e.l,t,r+1),Hm(e.r,t,r+1)):t[e.s]=r},$m=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Am(++t),s=0,n=e[0],o=1,i=function(e){r[s++]=e},a=1;a<=t;++a)if(e[a]==n&&a!=t)++o;else{if(!n&&o>2){for(;o>138;o-=138)i(32754);o>2&&(i(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(i(n),--o;o>6;o-=6)i(8304);o>2&&(i(o-3<<5|8208),o=0)}for(;o--;)i(n);o=1,n=e[a]}return[r.subarray(0,s),t]},Qm=function(e,t){for(var r=0,s=0;s<t.length;++s)r+=e[s]*t[s];return r},eg=function(e,t,r){var s=r.length,n=Ym(t+2);e[n]=255&s,e[n+1]=s>>>8,e[n+2]=255^e[n],e[n+3]=255^e[n+1];for(var o=0;o<s;++o)e[n+o+4]=r[o];return 8*(n+4+s)},tg=function(e,t,r,s,n,o,i,a,l,c,u){qm(t,u++,r),++n[256];for(var h=Xm(n,15),p=h[0],d=h[1],f=Xm(o,15),m=f[0],g=f[1],y=$m(p),v=y[0],w=y[1],b=$m(m),S=b[0],C=b[1],x=new Am(19),I=0;I<v.length;++I)x[31&v[I]]++;for(I=0;I<S.length;++I)x[31&S[I]]++;for(var k=Xm(x,7),O=k[0],E=k[1],A=19;A>4&&!O[Nm[A-1]];--A);var R,M,P,N,T=c+5<<3,L=Qm(n,Wm)+Qm(o,Vm)+i,D=Qm(n,p)+Qm(o,m)+i+14+3*A+Qm(x,O)+(2*x[16]+3*x[17]+7*x[18]);if(T<=L&&T<=D)return eg(t,u,e.subarray(l,l+c));if(qm(t,u,1+(D<L)),u+=2,D<L){R=zm(p,d,0),M=p,P=zm(m,g,0),N=m;var F=zm(O,E,0);qm(t,u,w-257),qm(t,u+5,C-1),qm(t,u+10,A-4),u+=14;for(I=0;I<A;++I)qm(t,u+3*I,O[Nm[I]]);u+=3*A;for(var _=[v,S],B=0;B<2;++B){var U=_[B];for(I=0;I<U.length;++I){var j=31&U[I];qm(t,u,F[j]),u+=O[j],j>15&&(qm(t,u,U[I]>>>5&127),u+=U[I]>>>12)}}}else R=Gm,M=Wm,P=Zm,N=Vm;for(I=0;I<a;++I)if(s[I]>255){j=s[I]>>>18&31;Km(t,u,R[j+257]),u+=M[j+257],j>7&&(qm(t,u,s[I]>>>23&31),u+=Mm[j]);var z=31&s[I];Km(t,u,P[z]),u+=N[z],z>3&&(Km(t,u,s[I]>>>5&8191),u+=Pm[z])}else Km(t,u,R[s[I]]),u+=M[s[I]];return Km(t,u,R[256]),u+M[256]},rg=new Rm([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),sg=function(e,t,r,s,n){return function(e,t,r,s,n,o){var i=e.length,a=new Em(s+i+5*(1+Math.floor(i/7e3))+n),l=a.subarray(s,a.length-n),c=0;if(!t||i<8)for(var u=0;u<=i;u+=65535){var h=u+65535;h<i?c=eg(l,c,e.subarray(u,h)):(l[u]=o,c=eg(l,c,e.subarray(u,i)))}else{for(var p=rg[t-1],d=p>>>13,f=8191&p,m=(1<<r)-1,g=new Am(32768),y=new Am(m+1),v=Math.ceil(r/3),w=2*v,b=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<w)&m},S=new Rm(25e3),C=new Am(288),x=new Am(32),I=0,k=0,O=(u=0,0),E=0,A=0;u<i;++u){var R=b(u),M=32767&u,P=y[R];if(g[M]=P,y[R]=M,E<=u){var N=i-u;if((I>7e3||O>24576)&&N>423){c=tg(e,l,0,S,C,x,k,O,A,u-A,c),O=I=k=0,A=u;for(var T=0;T<286;++T)C[T]=0;for(T=0;T<30;++T)x[T]=0}var L=2,D=0,F=f,_=M-P&32767;if(N>2&&R==b(u-_))for(var B=Math.min(d,N)-1,U=Math.min(32767,u),j=Math.min(258,N);_<=U&&--F&&M!=P;){if(e[u+L]==e[u+L-_]){for(var z=0;z<j&&e[u+z]==e[u+z-_];++z);if(z>L){if(L=z,D=_,z>B)break;var W=Math.min(_,z-2),V=0;for(T=0;T<W;++T){var G=u-_+T+32768&32767,Z=G-g[G]+32768&32767;Z>V&&(V=Z,P=G)}}}_+=(M=P)-(P=g[M])+32768&32767}if(D){S[O++]=268435456|Fm[L]<<18|_m[D];var Y=31&Fm[L],J=31&_m[D];k+=Mm[Y]+Pm[J],++C[257+Y],++x[J],E=u+L,++I}else S[O++]=e[u],++C[e[u]]}}c=tg(e,l,o,S,C,x,k,O,A,u-A,c)}return Jm(a,0,s+Ym(c)+n)}(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,r,s,!n)};function ng(e,t){void 0===t&&(t={});var r=function(){var e=1,t=0;return{p:function(r){for(var s=e,n=t,o=r.length,i=0;i!=o;){for(var a=Math.min(i+5552,o);i<a;++i)n+=s+=r[i];s%=65521,n%=65521}e=s,t=n},d:function(){return(e>>>8<<16|(255&t)<<8|t>>>8)+2*((255&e)<<23)}}}();r.p(e);var s,n,o,i=sg(e,t,2,4);return s=i,n=t.level,o=0==n?0:n<6?1:9==n?3:2,s[0]=120,s[1]=o<<6|(o?32-2*o:1),function(e,t,r){for(;r;++t)e[t]=r,r>>>=8}(i,i.length-4,r.d()),i}const og=e=>{const t={...e,v:"v1"};return function(e,t){var r="";if(!t&&"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var s=0;s<e.length;){var n=e[s++];n<128||t?r+=String.fromCharCode(n):n<224?r+=String.fromCharCode((31&n)<<6|63&e[s++]):n<240?r+=String.fromCharCode((15&n)<<12|(63&e[s++])<<6|63&e[s++]):(n=((15&n)<<18|(63&e[s++])<<12|(63&e[s++])<<6|63&e[s++])-65536,r+=String.fromCharCode(55296|n>>10,56320|1023&n))}return r}(ng(function(e,t){var r=e.length;if(!t&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var s=new Em(e.length+(e.length>>>1)),n=0,o=function(e){s[n++]=e},i=0;i<r;++i){if(n+5>s.length){var a=new Em(n+8+(r-i<<1));a.set(s),s=a}var l=e.charCodeAt(i);l<128||t?o(l):l<2048?(o(192|l>>>6),o(128|63&l)):l>55295&&l<57344?(o(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++i))>>>18),o(128|l>>>12&63),o(128|l>>>6&63),o(128|63&l)):(o(224|l>>>12),o(128|l>>>6&63),o(128|63&l))}return Jm(s,0,n)}(JSON.stringify(t))),!0)};var ig,ag=function(){function e(e,t,r,s){var n,o,i,a=this;this.taskQueue=[],this.isProcessing=!1,this.compressEvent=function(e){var t=og(e);return JSON.stringify(t)},this.addCompressedEventToManager=function(e,t){a.eventsManager&&a.deviceId&&a.eventsManager.addEvent({event:{type:"replay",data:e},sessionId:t,deviceId:a.deviceId})},this.addCompressedEvent=function(e,t){if(a.worker)a.worker.postMessage({event:e,sessionId:t});else{var r=a.compressEvent(e);a.addCompressedEventToManager(r,t)}},this.terminate=function(){var e;null===(e=a.worker)||void 0===e||e.terminate()};var l=d();this.canUseIdleCallback=l&&"requestIdleCallback"in l,this.eventsManager=e,this.config=t,this.deviceId=r,this.timeout=(null===(n=t.performanceConfig)||void 0===n?void 0:n.timeout)||2e3;var c=null!==(o='var WebWorker=function(r){"use strict";var n=Uint8Array,e=Uint16Array,f=Uint32Array,t=new n([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new n([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new n([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),i=function(r,n){for(var t=new e(31),a=0;a<31;++a)t[a]=n+=1<<r[a-1];var o=new f(t[30]);for(a=1;a<30;++a)for(var i=t[a];i<t[a+1];++i)o[i]=i-t[a]<<5|a;return[t,o]},v=i(t,2),u=v[0],s=v[1];u[28]=258,s[258]=28;for(var l=i(a,0)[1],c=new e(32768),h=0;h<32768;++h){var g=(43690&h)>>>1|(21845&h)<<1;g=(61680&(g=(52428&g)>>>2|(13107&g)<<2))>>>4|(3855&g)<<4,c[h]=((65280&g)>>>8|(255&g)<<8)>>>1}var w=function(r,n,f){for(var t=r.length,a=0,o=new e(n);a<t;++a)++o[r[a]-1];var i,v=new e(n);for(a=0;a<n;++a)v[a]=v[a-1]+o[a-1]<<1;if(f){i=new e(1<<n);var u=15-n;for(a=0;a<t;++a)if(r[a])for(var s=a<<4|r[a],l=n-r[a],h=v[r[a]-1]++<<l,g=h|(1<<l)-1;h<=g;++h)i[c[h]>>>u]=s}else for(i=new e(t),a=0;a<t;++a)i[a]=c[v[r[a]-1]++]>>>15-r[a];return i},d=new n(288);for(h=0;h<144;++h)d[h]=8;for(h=144;h<256;++h)d[h]=9;for(h=256;h<280;++h)d[h]=7;for(h=280;h<288;++h)d[h]=8;var m=new n(32);for(h=0;h<32;++h)m[h]=5;var M=w(d,9,0),y=w(m,5,0),b=function(r){return(r/8|0)+(7&r&&1)},p=function(r,t,a){(null==a||a>r.length)&&(a=r.length);var o=new(r instanceof e?e:r instanceof f?f:n)(a-t);return o.set(r.subarray(t,a)),o},C=function(r,n,e){e<<=7&n;var f=n/8|0;r[f]|=e,r[f+1]|=e>>>8},x=function(r,n,e){e<<=7&n;var f=n/8|0;r[f]|=e,r[f+1]|=e>>>8,r[f+2]|=e>>>16},S=function(r,f){for(var t=[],a=0;a<r.length;++a)r[a]&&t.push({s:a,f:r[a]});var o=t.length,i=t.slice();if(!o)return[new n(0),0];if(1==o){var v=new n(t[0].s+1);return v[t[0].s]=1,[v,1]}t.sort((function(r,n){return r.f-n.f})),t.push({s:-1,f:25001});var u=t[0],s=t[1],l=0,c=1,h=2;for(t[0]={s:-1,f:u.f+s.f,l:u,r:s};c!=o-1;)u=t[t[l].f<t[h].f?l++:h++],s=t[l!=c&&t[l].f<t[h].f?l++:h++],t[c++]={s:-1,f:u.f+s.f,l:u,r:s};var g=i[0].s;for(a=1;a<o;++a)i[a].s>g&&(g=i[a].s);var w=new e(g+1),d=A(t[c-1],w,0);if(d>f){a=0;var m=0,M=d-f,y=1<<M;for(i.sort((function(r,n){return w[n.s]-w[r.s]||r.f-n.f}));a<o;++a){var b=i[a].s;if(!(w[b]>f))break;m+=y-(1<<d-w[b]),w[b]=f}for(m>>>=M;m>0;){var p=i[a].s;w[p]<f?m-=1<<f-w[p]++-1:++a}for(;a>=0&&m;--a){var C=i[a].s;w[C]==f&&(--w[C],++m)}d=f}return[new n(w),d]},A=function(r,n,e){return-1==r.s?Math.max(A(r.l,n,e+1),A(r.r,n,e+1)):n[r.s]=e},O=function(r){for(var n=r.length;n&&!r[--n];);for(var f=new e(++n),t=0,a=r[0],o=1,i=function(r){f[t++]=r},v=1;v<=n;++v)if(r[v]==a&&v!=n)++o;else{if(!a&&o>2){for(;o>138;o-=138)i(32754);o>2&&(i(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(i(a),--o;o>6;o-=6)i(8304);o>2&&(i(o-3<<5|8208),o=0)}for(;o--;)i(a);o=1,a=r[v]}return[f.subarray(0,t),n]},T=function(r,n){for(var e=0,f=0;f<n.length;++f)e+=r[f]*n[f];return e},k=function(r,n,e){var f=e.length,t=b(n+2);r[t]=255&f,r[t+1]=f>>>8,r[t+2]=255^r[t],r[t+3]=255^r[t+1];for(var a=0;a<f;++a)r[t+a+4]=e[a];return 8*(t+4+f)},E=function(r,n,f,i,v,u,s,l,c,h,g){C(n,g++,f),++v[256];for(var b=S(v,15),p=b[0],A=b[1],E=S(u,15),U=E[0],D=E[1],I=O(p),J=I[0],N=I[1],W=O(U),_=W[0],j=W[1],P=new e(19),q=0;q<J.length;++q)P[31&J[q]]++;for(q=0;q<_.length;++q)P[31&_[q]]++;for(var z=S(P,7),B=z[0],F=z[1],G=19;G>4&&!B[o[G-1]];--G);var H,K,L,Q,R=h+5<<3,V=T(v,d)+T(u,m)+s,X=T(v,p)+T(u,U)+s+14+3*G+T(P,B)+(2*P[16]+3*P[17]+7*P[18]);if(R<=V&&R<=X)return k(n,g,r.subarray(c,c+h));if(C(n,g,1+(X<V)),g+=2,X<V){H=w(p,A,0),K=p,L=w(U,D,0),Q=U;var Y=w(B,F,0);C(n,g,N-257),C(n,g+5,j-1),C(n,g+10,G-4),g+=14;for(q=0;q<G;++q)C(n,g+3*q,B[o[q]]);g+=3*G;for(var Z=[J,_],$=0;$<2;++$){var rr=Z[$];for(q=0;q<rr.length;++q){var nr=31&rr[q];C(n,g,Y[nr]),g+=B[nr],nr>15&&(C(n,g,rr[q]>>>5&127),g+=rr[q]>>>12)}}}else H=M,K=d,L=y,Q=m;for(q=0;q<l;++q)if(i[q]>255){nr=i[q]>>>18&31;x(n,g,H[nr+257]),g+=K[nr+257],nr>7&&(C(n,g,i[q]>>>23&31),g+=t[nr]);var er=31&i[q];x(n,g,L[er]),g+=Q[er],er>3&&(x(n,g,i[q]>>>5&8191),g+=a[er])}else x(n,g,H[i[q]]),g+=K[i[q]];return x(n,g,H[256]),g+K[256]},U=new f([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),D=function(r,o,i,v,u){return function(r,o,i,v,u,c){var h=r.length,g=new n(v+h+5*(1+Math.floor(h/7e3))+u),w=g.subarray(v,g.length-u),d=0;if(!o||h<8)for(var m=0;m<=h;m+=65535){var M=m+65535;M<h?d=k(w,d,r.subarray(m,M)):(w[m]=c,d=k(w,d,r.subarray(m,h)))}else{for(var y=U[o-1],C=y>>>13,x=8191&y,S=(1<<i)-1,A=new e(32768),O=new e(S+1),T=Math.ceil(i/3),D=2*T,I=function(n){return(r[n]^r[n+1]<<T^r[n+2]<<D)&S},J=new f(25e3),N=new e(288),W=new e(32),_=0,j=0,P=(m=0,0),q=0,z=0;m<h;++m){var B=I(m),F=32767&m,G=O[B];if(A[F]=G,O[B]=F,q<=m){var H=h-m;if((_>7e3||P>24576)&&H>423){d=E(r,w,0,J,N,W,j,P,z,m-z,d),P=_=j=0,z=m;for(var K=0;K<286;++K)N[K]=0;for(K=0;K<30;++K)W[K]=0}var L=2,Q=0,R=x,V=F-G&32767;if(H>2&&B==I(m-V))for(var X=Math.min(C,H)-1,Y=Math.min(32767,m),Z=Math.min(258,H);V<=Y&&--R&&F!=G;){if(r[m+L]==r[m+L-V]){for(var $=0;$<Z&&r[m+$]==r[m+$-V];++$);if($>L){if(L=$,Q=V,$>X)break;var rr=Math.min(V,$-2),nr=0;for(K=0;K<rr;++K){var er=m-V+K+32768&32767,fr=er-A[er]+32768&32767;fr>nr&&(nr=fr,G=er)}}}V+=(F=G)-(G=A[F])+32768&32767}if(Q){J[P++]=268435456|s[L]<<18|l[Q];var tr=31&s[L],ar=31&l[Q];j+=t[tr]+a[ar],++N[257+tr],++W[ar],q=m+L,++_}else J[P++]=r[m],++N[r[m]]}}d=E(r,w,c,J,N,W,j,P,z,m-z,d)}return p(g,0,v+b(d)+u)}(r,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(r.length)))):12+o.mem,i,v,!u)};function I(r,n){void 0===n&&(n={});var e=function(){var r=1,n=0;return{p:function(e){for(var f=r,t=n,a=e.length,o=0;o!=a;){for(var i=Math.min(o+5552,a);o<i;++o)t+=f+=e[o];f%=65521,t%=65521}r=f,n=t},d:function(){return(r>>>8<<16|(255&n)<<8|n>>>8)+2*((255&r)<<23)}}}();e.p(r);var f,t,a,o=D(r,n,2,4);return f=o,t=n.level,a=0==t?0:t<6?1:9==t?3:2,f[0]=120,f[1]=a<<6|(a?32-2*a:1),function(r,n,e){for(;e;++n)r[n]=e,e>>>=8}(o,o.length-4,e.d()),o}const J=r=>{const e={...r,v:"v1"};return function(r,n){var e="";if(!n&&"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(r);for(var f=0;f<r.length;){var t=r[f++];t<128||n?e+=String.fromCharCode(t):t<224?e+=String.fromCharCode((31&t)<<6|63&r[f++]):t<240?e+=String.fromCharCode((15&t)<<12|(63&r[f++])<<6|63&r[f++]):(t=((15&t)<<18|(63&r[f++])<<12|(63&r[f++])<<6|63&r[f++])-65536,e+=String.fromCharCode(55296|t>>10,56320|1023&t))}return e}(I(function(r,e){var f=r.length;if(!e&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(r);for(var t=new n(r.length+(r.length>>>1)),a=0,o=function(r){t[a++]=r},i=0;i<f;++i){if(a+5>t.length){var v=new n(a+8+(f-i<<1));v.set(t),t=v}var u=r.charCodeAt(i);u<128||e?o(u):u<2048?(o(192|u>>>6),o(128|63&u)):u>55295&&u<57344?(o(240|(u=65536+(1047552&u)|1023&r.charCodeAt(++i))>>>18),o(128|u>>>12&63),o(128|u>>>6&63),o(128|63&u)):(o(224|u>>>12),o(128|u>>>6&63),o(128|63&u))}return p(t,0,a)}(JSON.stringify(e))),!0)};onmessage=function(r){var n=r.data,e=n.event,f=n.sessionId,t=JSON.stringify(J(e));postMessage({compressedEvent:t,sessionId:f})};var N=onmessage;return r.compressionOnMessage=N,Object.defineProperty(r,"__esModule",{value:!0}),r}({});\n')?o:s;if((null===(i=this.config.experimental)||void 0===i?void 0:i.useWebWorker)&&l&&l.Worker&&c){t.loggerProvider.log("[Experimental] Enabling web worker for compression");var u=new Worker(URL.createObjectURL(new Blob([c],{type:"application/javascript"})));u.onerror=function(e){t.loggerProvider.error(e)},u.onmessage=function(e){var t=e.data,r=t.compressedEvent,s=t.sessionId;a.addCompressedEventToManager(r,s)},this.worker=u}}return e.prototype.scheduleIdleProcessing=function(){var e=this;this.isProcessing||(this.isProcessing=!0,requestIdleCallback((function(t){e.processQueue(t)}),{timeout:this.timeout}))},e.prototype.enqueueEvent=function(e,t){var r;this.canUseIdleCallback&&(null===(r=this.config.performanceConfig)||void 0===r?void 0:r.enabled)?(this.config.loggerProvider.debug("Enqueuing event for processing during idle time."),this.taskQueue.push({event:e,sessionId:t}),this.scheduleIdleProcessing()):(this.config.loggerProvider.debug("Processing event without idle callback."),this.addCompressedEvent(e,t))},e.prototype.processQueue=function(e){for(var t=this;this.taskQueue.length>0&&(e.timeRemaining()>0||e.didTimeout);){var r=this.taskQueue.shift();if(r){var s=r.event,n=r.sessionId;this.addCompressedEvent(s,n)}}this.taskQueue.length>0?requestIdleCallback((function(e){t.processQueue(e)}),{timeout:this.timeout}):this.isProcessing=!1},e}(),lg=Object.defineProperty,cg=(e,t,r)=>((e,t,r)=>t in e?lg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),ug=Object.defineProperty,hg=(e,t,r)=>((e,t,r)=>t in e?ug(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),pg=Object.defineProperty,dg=(e,t,r)=>((e,t,r)=>t in e?pg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);const fg={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},mg={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},gg={};function yg(e){if(gg[e])return gg[e];const t=globalThis[e],r=t.prototype,s=e in fg?fg[e]:void 0,n=Boolean(s&&s.every((e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))}))),o=e in mg?mg[e]:void 0,i=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(n&&i&&!globalThis.Zone)return gg[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?gg[e]=o:r}catch{return r}}const vg={};function wg(e,t,r){var s;const n=`${e}.${String(r)}`;if(vg[n])return vg[n].call(t);const o=yg(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(vg[n]=i,i.call(t)):t[r]}const bg={};function Sg(e,t,r){const s=`${e}.${String(r)}`;if(bg[s])return bg[s].bind(t);const n=yg(e)[r];return"function"!=typeof n?t[r]:(bg[s]=n,n.bind(t))}const Cg={childNodes:function(e){return wg("Node",e,"childNodes")},parentNode:function(e){return wg("Node",e,"parentNode")},parentElement:function(e){return wg("Node",e,"parentElement")},textContent:function(e){return wg("Node",e,"textContent")},contains:function(e,t){return Sg("Node",e,"contains")(t)},getRootNode:function(e){return Sg("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?wg("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?wg("Element",e,"shadowRoot"):null},querySelector:function(e,t){return wg("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return wg("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return yg("MutationObserver").constructor}};class xg{constructor(){dg(this,"idNodeMap",new Map),dg(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Ig(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&Ig(Cg.parentNode(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&Ig(Cg.parentNode(e),t,r)}function kg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Og(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof 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 s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),r}var Eg={exports:{}},Ag=String,Rg=function(){return{isColorSupported:!1,reset:Ag,bold:Ag,dim:Ag,italic:Ag,underline:Ag,inverse:Ag,hidden:Ag,strikethrough:Ag,black:Ag,red:Ag,green:Ag,yellow:Ag,blue:Ag,magenta:Ag,cyan:Ag,white:Ag,gray:Ag,bgBlack:Ag,bgRed:Ag,bgGreen:Ag,bgYellow:Ag,bgBlue:Ag,bgMagenta:Ag,bgCyan:Ag,bgWhite:Ag}};Eg.exports=Rg(),Eg.exports.createColors=Rg;var Mg=Eg.exports;const Pg=Og(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Ng=Mg,Tg=Pg,Lg=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Ng.isColorSupported),Tg&&e&&(t=Tg(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=Ng.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Dg=Lg;Lg.default=Lg;var Fg={};Fg.isClean=Symbol("isClean"),Fg.my=Symbol("my");const _g={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Bg=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let 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");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",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")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return _g[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=_g[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(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)}};var Ug=Bg;Bg.default=Bg;let jg=Ug;function zg(e,t){new jg(t).stringify(e)}var Wg=zg;zg.default=zg;let{isClean:Vg,my:Gg}=Fg,Zg=Dg,Yg=Ug,Jg=Wg;function qg(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>qg(e,r))):("object"===o&&null!==n&&(n=qg(n)),r[s]=n)}return r}let Kg=class{constructor(e={}){this.raws={},this[Vg]=!1,this[Gg]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=qg(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Zg(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Vg]){this[Vg]=!1;let e=this;for(;e=e.parent;)e[Vg]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let 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){let s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}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}}raw(e,t){return(new Yg).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Jg){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var Xg=Kg;Kg.default=Kg;let Hg=Xg,$g=class extends Hg{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Qg=$g;$g.default=$g;var ey={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}};let{SourceMapConsumer:ty,SourceMapGenerator:ry}=Pg,{existsSync:sy,readFileSync:ny}=Pg,{dirname:oy,join:iy}=Pg;let ay=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=oy(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new ty(this.text)),this.consumerCache}decodeInline(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 t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=oy(e),sy(e))return this.mapFile=e,ny(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof ty)return ry.fromSourceMap(t).toString();if(t instanceof ry)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=iy(oy(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var ly=ay;ay.default=ay;let{SourceMapConsumer:cy,SourceMapGenerator:uy}=Pg,{fileURLToPath:hy,pathToFileURL:py}=Pg,{isAbsolute:dy,resolve:fy}=Pg,{nanoid:my}=ey,gy=Pg,yy=Dg,vy=ly,wy=Symbol("fromOffsetCache"),by=Boolean(cy&&uy),Sy=Boolean(fy&&dy),Cy=class{constructor(e,t={}){if(null==e||"object"==typeof 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&&(!Sy||/^\w+:\/\//.test(t.from)||dy(t.from)?this.file=t.from:this.file=fy(t.from)),Sy&&by){let e=new vy(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+my(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new yy(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new yy(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(py&&(n.input.url=py(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[wy])r=this[wy];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[wy]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:fy(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=dy(a.source)?py(a.source):new URL(a.source,this.map.consumer().sourceRoot||py(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!hy)throw new Error("file: protocol is not available in this PostCSS build");l.file=hy(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var xy=Cy;Cy.default=Cy,gy&&gy.registerInput&&gy.registerInput(Cy);let{SourceMapConsumer:Iy,SourceMapGenerator:ky}=Pg,{dirname:Oy,relative:Ey,resolve:Ay,sep:Ry}=Pg,{pathToFileURL:My}=Pg,Py=xy,Ny=Boolean(Iy&&ky),Ty=Boolean(Oy&&Ay&&Ey&&Ry);var Ly=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let 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";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||Oy(e.file);!1===this.mapOpts.sourcesContent?(t=new Iy(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Ty&&Ny&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=ky.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new ky({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]}generateString(){this.css="",this.map=new ky({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Oy(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Oy(Ay(r,this.mapOpts.annotation)));let s=Ey(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new Py(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(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))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(My){let t=My(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Ry&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Dy=Xg,Fy=class extends Dy{constructor(e){super(e),this.type="comment"}};var _y=Fy;Fy.default=Fy;let By,Uy,jy,zy,{isClean:Wy,my:Vy}=Fg,Gy=Qg,Zy=_y,Yy=Xg;function Jy(e){return e.map((e=>(e.nodes&&(e.nodes=Jy(e.nodes)),delete e.source,e)))}function qy(e){if(e[Wy]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)qy(t)}let Ky=class e extends Yy{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=Jy(By(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Gy(t)]}else if(t.selector)t=[new Uy(t)];else if(t.name)t=[new jy(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Zy(t)]}return t.map((t=>(t[Vy]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Wy]&&qy(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)})):this.walk(((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)})):this.walk(((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)})):this.walk(((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Ky.registerParse=e=>{By=e},Ky.registerRule=e=>{Uy=e},Ky.registerAtRule=e=>{jy=e},Ky.registerRoot=e=>{zy=e};var Xy=Ky;Ky.default=Ky,Ky.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,jy.prototype):"rule"===e.type?Object.setPrototypeOf(e,Uy.prototype):"decl"===e.type?Object.setPrototypeOf(e,Gy.prototype):"comment"===e.type?Object.setPrototypeOf(e,Zy.prototype):"root"===e.type&&Object.setPrototypeOf(e,zy.prototype),e[Vy]=!0,e.nodes&&e.nodes.forEach((e=>{Ky.rebuild(e)}))};let Hy,$y,Qy=Xy,ev=class extends Qy{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Hy(new $y,this,e).stringify()}};ev.registerLazyResult=e=>{Hy=e},ev.registerProcessor=e=>{$y=e};var tv=ev;ev.default=ev;let rv={};var sv=function(e){rv[e]||(rv[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let nv=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){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}};var ov=nv;nv.default=nv;let iv=ov,av=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new iv(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var lv=av;av.default=av;const cv="'".charCodeAt(0),uv='"'.charCodeAt(0),hv="\\".charCodeAt(0),pv="/".charCodeAt(0),dv="\n".charCodeAt(0),fv=" ".charCodeAt(0),mv="\f".charCodeAt(0),gv="\t".charCodeAt(0),yv="\r".charCodeAt(0),vv="[".charCodeAt(0),wv="]".charCodeAt(0),bv="(".charCodeAt(0),Sv=")".charCodeAt(0),Cv="{".charCodeAt(0),xv="}".charCodeAt(0),Iv=";".charCodeAt(0),kv="*".charCodeAt(0),Ov=":".charCodeAt(0),Ev="@".charCodeAt(0),Av=/[\t\n\f\r "#'()/;[\\\]{}]/g,Rv=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Mv=/.[\r\n"'(/\\]/,Pv=/[\da-f]/i;let Nv=Xy,Tv=class extends Nv{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Lv=Tv;Tv.default=Tv,Nv.registerAtRule(Tv);let Dv,Fv,_v=Xy,Bv=class extends _v{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Dv(new Fv,this,e).stringify()}};Bv.registerLazyResult=e=>{Dv=e},Bv.registerProcessor=e=>{Fv=e};var Uv=Bv;Bv.default=Bv,_v.registerRoot(Bv);let jv={comma:e=>jv.split(e,[","],!0),space:e=>jv.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var zv=jv;jv.default=jv;let Wv=Xy,Vv=zv,Gv=class extends Wv{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Vv.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Zv=Gv;Gv.default=Gv,Wv.registerRule(Gv);let Yv=Qg,Jv=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function v(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=p.charCodeAt(m),r){case dv:case fv:case gv:case yv:case mv:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===fv||r===dv||r===gv||r===yv||r===mv);h=["space",p.slice(m,s)],m=s-1;break;case vv:case wv:case Cv:case xv:case Ov:case Iv:case Sv:{let e=String.fromCharCode(r);h=[e,e,m];break}case bv:if(c=g.length?g.pop()[1]:"",u=p.charCodeAt(m+1),"url"===c&&u!==cv&&u!==uv&&u!==fv&&u!==dv&&u!==gv&&u!==mv&&u!==yv){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}v("bracket")}for(l=s;p.charCodeAt(l-1)===hv;)l-=1,a=!a}while(a);h=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),o=p.slice(m,s+1),-1===s||Mv.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case cv:case uv:n=r===cv?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}v("string")}for(l=s;p.charCodeAt(l-1)===hv;)l-=1,a=!a}while(a);h=["string",p.slice(m,s+1),m,s],m=s;break;case Ev:Av.lastIndex=m+1,Av.test(p),s=0===Av.lastIndex?p.length-1:Av.lastIndex-2,h=["at-word",p.slice(m,s+1),m,s],m=s;break;case hv:for(s=m,i=!0;p.charCodeAt(s+1)===hv;)s+=1,i=!i;if(r=p.charCodeAt(s+1),i&&r!==pv&&r!==fv&&r!==dv&&r!==gv&&r!==yv&&r!==mv&&(s+=1,Pv.test(p.charAt(s)))){for(;Pv.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===fv&&(s+=1)}h=["word",p.slice(m,s+1),m,s],m=s;break;default:r===pv&&p.charCodeAt(m+1)===kv?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:v("comment")),h=["comment",p.slice(m,s+1),m,s],m=s):(Rv.lastIndex=m+1,Rv.test(p),s=0===Rv.lastIndex?p.length-1:Rv.lastIndex-2,h=["word",p.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},qv=_y,Kv=Lv,Xv=Uv,Hv=Zv;const $v={empty:!0,space:!0};var Qv=class{constructor(e){this.input=e,this.root=new Xv,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,s,n=new Kv;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new qv;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=Jv(this.input)}decl(e,t){let r=new Yv;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(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;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Hv;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(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)}endFile(){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())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(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)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}parse(){let e;for(;!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()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,i,a,l=r.length,c="",u=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",$v[a]||$v[i]||","===c.slice(-1)?u=!1:c+=n[1]):c+=n[1]:u=!1;if(!u){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new Hv;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};let ew=Xy,tw=Qv,rw=xy;function sw(e,t){let r=new rw(e,t),s=new tw(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var nw=sw;sw.default=sw,ew.registerParse(sw);let{isClean:ow,my:iw}=Fg,aw=Ly,lw=Wg,cw=Xy,uw=tv,hw=sv,pw=lv,dw=nw,fw=Uv;const mw={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},gw={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},yw={Once:!0,postcssPlugin:!0,prepare:!0};function vw(e){return"object"==typeof e&&"function"==typeof e.then}function ww(e){let t=!1,r=mw[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 bw(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:ww(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Sw(e){return e[ow]=!1,e.nodes&&e.nodes.forEach((e=>Sw(e))),e}let Cw={},xw=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof pw)n=Sw(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=dw;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[iw]&&cw.rebuild(n)}else n=Sw(r);this.result=new pw(t,n,s),this.helpers={...Cw,postcss:Cw,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!gw[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!yw[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(vw(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ow];){e[ow]=!0;let t=[bw(e)];for(;t.length>0;){let e=this.visitTick(t);if(vw(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return vw(t[0])?Promise.all(t):t}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)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=lw;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new aw(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(vw(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ow];)e[ow]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||hw("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(vw(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[ow])return s[ow]=!0,void e.push(bw(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[ow]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[ow]=!0;let t=ww(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[ow]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};xw.registerPostcss=e=>{Cw=e};var Iw=xw;xw.default=xw,fw.registerLazyResult(xw),uw.registerLazyResult(xw);let kw=Ly,Ow=Wg,Ew=sv,Aw=nw;const Rw=lv;let Mw=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=Ow;this.result=new Rw(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new kw(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||Ew("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Aw;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Pw=Mw;Mw.default=Mw;let Nw=Pw,Tw=Iw,Lw=tv,Dw=Uv,Fw=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Tw(this,e,t):new Nw(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var _w=Fw;Fw.default=Fw,Dw.registerProcessor(Fw),Lw.registerProcessor(Fw);let Bw=Qg,Uw=ly,jw=_y,zw=Lv,Ww=xy,Vw=Uv,Gw=Zv;function Zw(e,t){if(Array.isArray(e))return e.map((e=>Zw(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Ww.prototype};r.map&&(r.map={...r.map,__proto__:Uw.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>Zw(e,t)))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new Vw(s);if("decl"===s.type)return new Bw(s);if("rule"===s.type)return new Gw(s);if("comment"===s.type)return new jw(s);if("atrule"===s.type)return new zw(s);throw new Error("Unknown node type: "+e.type)}var Yw=Zw;Zw.default=Zw;let Jw=Dg,qw=Qg,Kw=Iw,Xw=Xy,Hw=_w,$w=Wg,Qw=Yw,eb=tv,tb=ov,rb=_y,sb=Lv,nb=lv,ob=xy,ib=nw,ab=zv,lb=Zv,cb=Uv,ub=Xg;function hb(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Hw(e)}hb.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!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"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new Hw).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return hb([n(r)]).process(e,t)},n},hb.stringify=$w,hb.parse=ib,hb.fromJSON=Qw,hb.list=ab,hb.comment=e=>new rb(e),hb.atRule=e=>new sb(e),hb.decl=e=>new qw(e),hb.rule=e=>new lb(e),hb.root=e=>new cb(e),hb.document=e=>new eb(e),hb.CssSyntaxError=Jw,hb.Declaration=qw,hb.Container=Xw,hb.Processor=Hw,hb.Document=eb,hb.Comment=rb,hb.Warning=tb,hb.AtRule=sb,hb.Result=nb,hb.Input=ob,hb.Rule=lb,hb.Root=cb,hb.Node=ub,Kw.registerPostcss(hb);var pb=hb;hb.default=hb;const db=kg(pb);db.stringify,db.fromJSON,db.plugin,db.parse,db.list,db.document,db.comment,db.atRule,db.rule,db.decl,db.root,db.CssSyntaxError,db.Declaration,db.Container,db.Processor,db.Document,db.Comment,db.Warning,db.AtRule,db.Result,db.Input,db.Rule,db.Root,db.Node;var fb=Object.defineProperty,mb=(e,t,r)=>((e,t,r)=>t in e?fb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function gb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function yb(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof 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 s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),r}var vb={exports:{}},wb=String,bb=function(){return{isColorSupported:!1,reset:wb,bold:wb,dim:wb,italic:wb,underline:wb,inverse:wb,hidden:wb,strikethrough:wb,black:wb,red:wb,green:wb,yellow:wb,blue:wb,magenta:wb,cyan:wb,white:wb,gray:wb,bgBlack:wb,bgRed:wb,bgGreen:wb,bgYellow:wb,bgBlue:wb,bgMagenta:wb,bgCyan:wb,bgWhite:wb}};vb.exports=bb(),vb.exports.createColors=bb;var Sb=vb.exports;const Cb=yb(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let xb=Sb,Ib=Cb,kb=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=xb.isColorSupported),Ib&&e&&(t=Ib(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=xb.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Ob=kb;kb.default=kb;var Eb={};Eb.isClean=Symbol("isClean"),Eb.my=Symbol("my");const Ab={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Rb=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let 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");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",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")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Ab[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=Ab[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(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)}};var Mb=Rb;Rb.default=Rb;let Pb=Mb;function Nb(e,t){new Pb(t).stringify(e)}var Tb=Nb;Nb.default=Nb;let{isClean:Lb,my:Db}=Eb,Fb=Ob,_b=Mb,Bb=Tb;function Ub(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>Ub(e,r))):("object"===o&&null!==n&&(n=Ub(n)),r[s]=n)}return r}let jb=class{constructor(e={}){this.raws={},this[Lb]=!1,this[Db]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Ub(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Fb(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Lb]){this[Lb]=!1;let e=this;for(;e=e.parent;)e[Lb]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let 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){let s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}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}}raw(e,t){return(new _b).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Bb){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var zb=jb;jb.default=jb;let Wb=zb,Vb=class extends Wb{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Gb=Vb;Vb.default=Vb;var Zb={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}};let{SourceMapConsumer:Yb,SourceMapGenerator:Jb}=Cb,{existsSync:qb,readFileSync:Kb}=Cb,{dirname:Xb,join:Hb}=Cb;let $b=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Xb(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Yb(this.text)),this.consumerCache}decodeInline(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 t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=Xb(e),qb(e))return this.mapFile=e,Kb(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Yb)return Jb.fromSourceMap(t).toString();if(t instanceof Jb)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=Hb(Xb(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Qb=$b;$b.default=$b;let{SourceMapConsumer:eS,SourceMapGenerator:tS}=Cb,{fileURLToPath:rS,pathToFileURL:sS}=Cb,{isAbsolute:nS,resolve:oS}=Cb,{nanoid:iS}=Zb,aS=Cb,lS=Ob,cS=Qb,uS=Symbol("fromOffsetCache"),hS=Boolean(eS&&tS),pS=Boolean(oS&&nS),dS=class{constructor(e,t={}){if(null==e||"object"==typeof 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&&(!pS||/^\w+:\/\//.test(t.from)||nS(t.from)?this.file=t.from:this.file=oS(t.from)),pS&&hS){let e=new cS(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+iS(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new lS(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new lS(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(sS&&(n.input.url=sS(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[uS])r=this[uS];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[uS]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:oS(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=nS(a.source)?sS(a.source):new URL(a.source,this.map.consumer().sourceRoot||sS(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!rS)throw new Error("file: protocol is not available in this PostCSS build");l.file=rS(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var fS=dS;dS.default=dS,aS&&aS.registerInput&&aS.registerInput(dS);let{SourceMapConsumer:mS,SourceMapGenerator:gS}=Cb,{dirname:yS,relative:vS,resolve:wS,sep:bS}=Cb,{pathToFileURL:SS}=Cb,CS=fS,xS=Boolean(mS&&gS),IS=Boolean(yS&&wS&&vS&&bS);var kS=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let 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";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||yS(e.file);!1===this.mapOpts.sourcesContent?(t=new mS(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),IS&&xS&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=gS.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new gS({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]}generateString(){this.css="",this.map=new gS({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?yS(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=yS(wS(r,this.mapOpts.annotation)));let s=vS(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new CS(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(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))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(SS){let t=SS(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===bS&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let OS=zb,ES=class extends OS{constructor(e){super(e),this.type="comment"}};var AS=ES;ES.default=ES;let RS,MS,PS,NS,{isClean:TS,my:LS}=Eb,DS=Gb,FS=AS,_S=zb;function BS(e){return e.map((e=>(e.nodes&&(e.nodes=BS(e.nodes)),delete e.source,e)))}function US(e){if(e[TS]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)US(t)}let jS=class e extends _S{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=BS(RS(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new DS(t)]}else if(t.selector)t=[new MS(t)];else if(t.name)t=[new PS(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new FS(t)]}return t.map((t=>(t[LS]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[TS]&&US(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)})):this.walk(((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)})):this.walk(((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)})):this.walk(((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};jS.registerParse=e=>{RS=e},jS.registerRule=e=>{MS=e},jS.registerAtRule=e=>{PS=e},jS.registerRoot=e=>{NS=e};var zS=jS;jS.default=jS,jS.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,PS.prototype):"rule"===e.type?Object.setPrototypeOf(e,MS.prototype):"decl"===e.type?Object.setPrototypeOf(e,DS.prototype):"comment"===e.type?Object.setPrototypeOf(e,FS.prototype):"root"===e.type&&Object.setPrototypeOf(e,NS.prototype),e[LS]=!0,e.nodes&&e.nodes.forEach((e=>{jS.rebuild(e)}))};let WS,VS,GS=zS,ZS=class extends GS{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new WS(new VS,this,e).stringify()}};ZS.registerLazyResult=e=>{WS=e},ZS.registerProcessor=e=>{VS=e};var YS=ZS;ZS.default=ZS;let JS={};var qS=function(e){JS[e]||(JS[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let KS=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){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}};var XS=KS;KS.default=KS;let HS=XS,$S=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new HS(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var QS=$S;$S.default=$S;const eC="'".charCodeAt(0),tC='"'.charCodeAt(0),rC="\\".charCodeAt(0),sC="/".charCodeAt(0),nC="\n".charCodeAt(0),oC=" ".charCodeAt(0),iC="\f".charCodeAt(0),aC="\t".charCodeAt(0),lC="\r".charCodeAt(0),cC="[".charCodeAt(0),uC="]".charCodeAt(0),hC="(".charCodeAt(0),pC=")".charCodeAt(0),dC="{".charCodeAt(0),fC="}".charCodeAt(0),mC=";".charCodeAt(0),gC="*".charCodeAt(0),yC=":".charCodeAt(0),vC="@".charCodeAt(0),wC=/[\t\n\f\r "#'()/;[\\\]{}]/g,bC=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,SC=/.[\r\n"'(/\\]/,CC=/[\da-f]/i;let xC=zS,IC=class extends xC{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var kC=IC;IC.default=IC,xC.registerAtRule(IC);let OC,EC,AC=zS,RC=class extends AC{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new OC(new EC,this,e).stringify()}};RC.registerLazyResult=e=>{OC=e},RC.registerProcessor=e=>{EC=e};var MC=RC;RC.default=RC,AC.registerRoot(RC);let PC={comma:e=>PC.split(e,[","],!0),space:e=>PC.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var NC=PC;PC.default=PC;let TC=zS,LC=NC,DC=class extends TC{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return LC.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var FC=DC;DC.default=DC,TC.registerRule(DC);let _C=Gb,BC=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function v(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=p.charCodeAt(m),r){case nC:case oC:case aC:case lC:case iC:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===oC||r===nC||r===aC||r===lC||r===iC);h=["space",p.slice(m,s)],m=s-1;break;case cC:case uC:case dC:case fC:case yC:case mC:case pC:{let e=String.fromCharCode(r);h=[e,e,m];break}case hC:if(c=g.length?g.pop()[1]:"",u=p.charCodeAt(m+1),"url"===c&&u!==eC&&u!==tC&&u!==oC&&u!==nC&&u!==aC&&u!==iC&&u!==lC){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}v("bracket")}for(l=s;p.charCodeAt(l-1)===rC;)l-=1,a=!a}while(a);h=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),o=p.slice(m,s+1),-1===s||SC.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case eC:case tC:n=r===eC?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}v("string")}for(l=s;p.charCodeAt(l-1)===rC;)l-=1,a=!a}while(a);h=["string",p.slice(m,s+1),m,s],m=s;break;case vC:wC.lastIndex=m+1,wC.test(p),s=0===wC.lastIndex?p.length-1:wC.lastIndex-2,h=["at-word",p.slice(m,s+1),m,s],m=s;break;case rC:for(s=m,i=!0;p.charCodeAt(s+1)===rC;)s+=1,i=!i;if(r=p.charCodeAt(s+1),i&&r!==sC&&r!==oC&&r!==nC&&r!==aC&&r!==lC&&r!==iC&&(s+=1,CC.test(p.charAt(s)))){for(;CC.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===oC&&(s+=1)}h=["word",p.slice(m,s+1),m,s],m=s;break;default:r===sC&&p.charCodeAt(m+1)===gC?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:v("comment")),h=["comment",p.slice(m,s+1),m,s],m=s):(bC.lastIndex=m+1,bC.test(p),s=0===bC.lastIndex?p.length-1:bC.lastIndex-2,h=["word",p.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},UC=AS,jC=kC,zC=MC,WC=FC;const VC={empty:!0,space:!0};var GC=class{constructor(e){this.input=e,this.root=new zC,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,s,n=new jC;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new UC;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=BC(this.input)}decl(e,t){let r=new _C;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(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;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new WC;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(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)}endFile(){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())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(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)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}parse(){let e;for(;!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()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,i,a,l=r.length,c="",u=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",VC[a]||VC[i]||","===c.slice(-1)?u=!1:c+=n[1]):c+=n[1]:u=!1;if(!u){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new WC;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};let ZC=zS,YC=GC,JC=fS;function qC(e,t){let r=new JC(e,t),s=new YC(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var KC=qC;qC.default=qC,ZC.registerParse(qC);let{isClean:XC,my:HC}=Eb,$C=kS,QC=Tb,ex=zS,tx=YS,rx=qS,sx=QS,nx=KC,ox=MC;const ix={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ax={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},lx={Once:!0,postcssPlugin:!0,prepare:!0};function cx(e){return"object"==typeof e&&"function"==typeof e.then}function ux(e){let t=!1,r=ix[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 hx(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:ux(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function px(e){return e[XC]=!1,e.nodes&&e.nodes.forEach((e=>px(e))),e}let dx={},fx=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof sx)n=px(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=nx;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[HC]&&ex.rebuild(n)}else n=px(r);this.result=new sx(t,n,s),this.helpers={...dx,postcss:dx,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!ax[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!lx[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(cx(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[XC];){e[XC]=!0;let t=[hx(e)];for(;t.length>0;){let e=this.visitTick(t);if(cx(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return cx(t[0])?Promise.all(t):t}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)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=QC;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new $C(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(cx(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[XC];)e[XC]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||rx("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(cx(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[XC])return s[XC]=!0,void e.push(hx(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[XC]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[XC]=!0;let t=ux(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[XC]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};fx.registerPostcss=e=>{dx=e};var mx=fx;fx.default=fx,ox.registerLazyResult(fx),tx.registerLazyResult(fx);let gx=kS,yx=Tb,vx=qS,wx=KC;const bx=QS;let Sx=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=yx;this.result=new bx(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new gx(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||vx("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=wx;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Cx=Sx;Sx.default=Sx;let xx=Cx,Ix=mx,kx=YS,Ox=MC,Ex=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Ix(this,e,t):new xx(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ax=Ex;Ex.default=Ex,Ox.registerProcessor(Ex),kx.registerProcessor(Ex);let Rx=Gb,Mx=Qb,Px=AS,Nx=kC,Tx=fS,Lx=MC,Dx=FC;function Fx(e,t){if(Array.isArray(e))return e.map((e=>Fx(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Tx.prototype};r.map&&(r.map={...r.map,__proto__:Mx.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>Fx(e,t)))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new Lx(s);if("decl"===s.type)return new Rx(s);if("rule"===s.type)return new Dx(s);if("comment"===s.type)return new Px(s);if("atrule"===s.type)return new Nx(s);throw new Error("Unknown node type: "+e.type)}var _x=Fx;Fx.default=Fx;let Bx=Ob,Ux=Gb,jx=mx,zx=zS,Wx=Ax,Vx=Tb,Gx=_x,Zx=YS,Yx=XS,Jx=AS,qx=kC,Kx=QS,Xx=fS,Hx=KC,$x=NC,Qx=FC,eI=MC,tI=zb;function rI(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Wx(e)}rI.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!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"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new Wx).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return rI([n(r)]).process(e,t)},n},rI.stringify=Vx,rI.parse=Hx,rI.fromJSON=Gx,rI.list=$x,rI.comment=e=>new Jx(e),rI.atRule=e=>new qx(e),rI.decl=e=>new Ux(e),rI.rule=e=>new Qx(e),rI.root=e=>new eI(e),rI.document=e=>new Zx(e),rI.CssSyntaxError=Bx,rI.Declaration=Ux,rI.Container=zx,rI.Processor=Wx,rI.Document=Zx,rI.Comment=Jx,rI.Warning=Yx,rI.AtRule=qx,rI.Result=Kx,rI.Input=Xx,rI.Rule=Qx,rI.Root=eI,rI.Node=tI,jx.registerPostcss(rI);var sI=rI;rI.default=rI;const nI=gb(sI);nI.stringify,nI.fromJSON,nI.plugin,nI.parse,nI.list,nI.document,nI.comment,nI.atRule,nI.rule,nI.decl,nI.root,nI.CssSyntaxError,nI.Declaration,nI.Container,nI.Processor,nI.Document,nI.Comment,nI.Warning,nI.AtRule,nI.Result,nI.Input,nI.Rule,nI.Root,nI.Node;class oI{constructor(...e){mb(this,"parentElement",null),mb(this,"parentNode",null),mb(this,"ownerDocument"),mb(this,"firstChild",null),mb(this,"lastChild",null),mb(this,"previousSibling",null),mb(this,"nextSibling",null),mb(this,"ELEMENT_NODE",1),mb(this,"TEXT_NODE",3),mb(this,"nodeType"),mb(this,"nodeName"),mb(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof oI))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const iI={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},aI={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},lI={};function cI(e){if(lI[e])return lI[e];const t=globalThis[e],r=t.prototype,s=e in iI?iI[e]:void 0,n=Boolean(s&&s.every((e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))}))),o=e in aI?aI[e]:void 0,i=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(n&&i&&!globalThis.Zone)return lI[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?lI[e]=o:r}catch{return r}}const uI={};function hI(e,t,r){var s;const n=`${e}.${String(r)}`;if(uI[n])return uI[n].call(t);const o=cI(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(uI[n]=i,i.call(t)):t[r]}const pI={};function dI(e,t,r){const s=`${e}.${String(r)}`;if(pI[s])return pI[s].bind(t);const n=cI(e)[r];return"function"!=typeof n?t[r]:(pI[s]=n,n.bind(t))}const fI={childNodes:function(e){return hI("Node",e,"childNodes")},parentNode:function(e){return hI("Node",e,"parentNode")},parentElement:function(e){return hI("Node",e,"parentElement")},textContent:function(e){return hI("Node",e,"textContent")},contains:function(e,t){return dI("Node",e,"contains")(t)},getRootNode:function(e){return dI("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?hI("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?hI("Element",e,"shadowRoot"):null},querySelector:function(e,t){return hI("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return hI("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return cI("MutationObserver").constructor}};const mI="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.";let gI={map:{},getId:()=>(console.error(mI),-1),getNode:()=>(console.error(mI),null),removeNodeFromMap(){console.error(mI)},has:()=>(console.error(mI),!1),reset(){console.error(mI)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(gI=new Proxy(gI,{get:(e,t,r)=>("map"===t&&console.error(mI),Reflect.get(e,t,r))}));let yI=Date.now;function vI(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:fI.parentElement(e)}/[1-9][0-9]{12}/.test(Date.now().toString())||(yI=()=>(new Date).getTime());function wI(e){var t;let r=null;return"getRootNode"in e&&(null==(t=fI.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&fI.host(fI.getRootNode(e))&&(r=fI.host(fI.getRootNode(e))),r}function bI(e){let t,r=e;for(;t=wI(r);)r=t;return r}function SI(e){const t=e.ownerDocument;if(!t)return!1;const r=bI(e);return fI.contains(t,r)}const CI=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){hg(this,"id",1),hg(this,"styleIDMap",new WeakMap),hg(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},get _mirror(){return gI},closestElementOfNode:vI,getBaseDimension:function e(t,r){var s,n;const o=null==(n=null==(s=t.ownerDocument)?void 0:s.defaultView)?void 0:n.frameElement;if(!o||o===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};const i=o.getBoundingClientRect(),a=e(o,r),l=i.height/o.clientHeight;return{x:i.x*a.relativeScale+a.x,y:i.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,r){const s=t[r[0]];return 1===r.length?s:e(s.cssRules[r[1]].cssRules,r.slice(2))},getPositionsAndIndex:function(e){const t=[...e],r=t.pop();return{positions:t,index:r}},getRootShadowHost:bI,getShadowHost:wI,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,r,s,n;const o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=fI.parentElement(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(s=fI.parentElement(o.body))?void 0:s.scrollTop)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof oI&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(fI.shadowRoot(e)))},hookSetter:function e(t,r,s,n,o=window){const i=o.Object.getOwnPropertyDescriptor(t,r);return o.Object.defineProperty(t,r,n?s:{set(e){setTimeout((()=>{s.set.call(this,e)}),0),i&&i.set&&i.set.call(this,e)}}),()=>e(t,r,i||{},!0)},inDom:function(e){const t=e.ownerDocument;return!!t&&(fI.contains(t,e)||SI(e))},isAncestorRemoved:function e(t,r){if(function(e){const t=e&&"host"in e&&"mode"in e&&Cg.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Cg.shadowRoot(t)===e)}(t))return!1;const s=r.getId(t);if(!r.has(s))return!0;const n=fI.parentNode(t);return(!n||n.nodeType!==t.DOCUMENT_NODE)&&(!n||e(n,r))},isBlocked:function(e,t,r,s){if(!e)return!1;const n=vI(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(s&&null!==n.closest("."+t))return!0}else if(Ig(n,t,s))return!0}catch(e){}if(r){if(n.matches(r))return!0;if(s&&null!==n.closest(r))return!0}return!1},isIgnored:function(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,r){r(t.value);for(let s=t.children.length-1;s>=0;s--)e(t.children[s],r)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return yI},on:function(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)},patch:function(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],n=r(s);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=n,()=>{e[t]=s}}catch{return()=>{}}},polyfill:function(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)},queueToResolveTrees:function(e){const t={},r=(e,r)=>{const s={value:e,parent:r,children:[]};return t[e.node.id]=s,s},s=[];for(const n of e){const{nextId:e,parentId:o}=n;if(e&&e in t){const o=t[e];if(o.parent){const e=o.parent.children.indexOf(o);o.parent.children.splice(e,0,r(n,o.parent))}else{const e=s.indexOf(o);s.splice(e,0,r(n,null))}}else if(o in t){const e=t[o];e.children.push(r(n,e))}else s.push(r(n,null))}return s},shadowHostInDom:SI,throttle:function(e,t,r={}){let s=null,n=0;return function(...o){const i=Date.now();n||!1!==r.leading||(n=i);const a=t-(i-n),l=this;a<=0||a>t?(s&&(clearTimeout(s),s=null),n=i,e.apply(l,o)):s||!1===r.trailing||(s=setTimeout((()=>{n=!1===r.leading?0:Date.now(),s=null,e.apply(l,o)}),a))}},uniqueTextMutations:function(e){const t=new Set,r=[];for(let s=e.length;s--;){const n=e[s];t.has(n.id)||(r.push(n),t.add(n.id))}return r}},Symbol.toStringTag,{value:"Module"}));for(var xI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",II="undefined"==typeof Uint8Array?[]:new Uint8Array(256),kI=0;kI<64;kI++)II[xI.charCodeAt(kI)]=kI;"undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),(e=>e.charCodeAt(0))))("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=")],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(ig=e.contentWindow)?void 0:ig.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var OI;new xg,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(OI||(OI={}));class EI{constructor(e){cg(this,"fileName"),cg(this,"functionName"),cg(this,"lineNumber"),cg(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){const e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${e}:${t})`:`${this.fileName}:${e}:${t}`}}const AI=/(^|@)\S+:\d+/,RI=/^\s*at .*(\S+:\d+|\(native\))/m,MI=/^(eval@)?(\[native code])?$/,PI={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(RI)?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];const 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){return e.stack.split("\n").filter((function(e){return!!e.match(RI)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(");const r=t.match(/ (\((.+):(\d+):(\d+)\)$)/);t=r?t.replace(r[0],""):t;const s=t.split(/\s+/).slice(1),n=this.extractLocation(r?r[1]:s.pop()),o=s.join(" ")||void 0,i=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new EI({functionName:o,fileName:i,lineNumber:n[1],columnNumber:n[2]})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(MI)}),this).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 EI({functionName:e});{const t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),s=r&&r[1]?r[1]:void 0,n=this.extractLocation(e.replace(t,""));return new EI({functionName:s,fileName:n[0],lineNumber:n[1],columnNumber:n[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){const t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),s=[];for(let e=2,n=r.length;e<n;e+=2){const n=t.exec(r[e]);n&&s.push(new EI({fileName:n[2],lineNumber:parseFloat(n[1])}))}return s},parseOpera10:function(e){const t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),s=[];for(let e=0,n=r.length;e<n;e+=2){const n=t.exec(r[e]);n&&s.push(new EI({functionName:n[3]||void 0,fileName:n[2],lineNumber:parseFloat(n[1])}))}return s},parseOpera11:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(AI)&&!e.match(/^Error created at/)}),this).map((function(e){const t=e.split("@"),r=this.extractLocation(t.pop()),s=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new EI({functionName:s,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function NI(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let r=e.localName;if(!r)break;r=r.toLowerCase();const s=e.parentElement,n=[];if(s.children&&s.children.length>0)for(let e=0;e<s.children.length;e++){const t=s.children[e];t.localName&&t.localName.toLowerCase&&t.localName.toLowerCase()===r&&n.push(t)}n.length>1&&(r+=`:eq(${n.indexOf(e)})`),t=r+(t?">"+t:""),e=s}return t}function TI(e){return"[object Object]"===Object.prototype.toString.call(e)}function LI(e,t){if(0===t)return!0;const r=Object.keys(e);for(const s of r)if(TI(e[s])&&LI(e[s],t-1))return!0;return!1}function DI(e,t){const r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);const s=[],n=[];return JSON.stringify(e,(function(e,t){if(s.length>0){const r=s.indexOf(this);~r?s.splice(r+1):s.push(this),~r?n.splice(r,1/0,e):n.push(e),~s.indexOf(t)&&(t=s[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,s.indexOf(t)).join(".")+"]")}else s.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(TI(e)&&Object.keys(e).length>r.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(TI(e)&&LI(e,r.depthOfLimit))return!0;return!1}(t))return function(e){let t=e.toString();r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t=`${t.slice(0,r.stringLengthLimit)}...`);return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){const e={};for(const r in t){const s=t[r];Array.isArray(s)?e[r]=NI(s.length?s[0]:null):e[r]=s}return e}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t}))}const FI={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 _I(e,t,r){const s=r?Object.assign({},FI,r):FI,n=s.logger;if(!n)return()=>{};let o;o="string"==typeof n?t[n]:n;let i=0,a=!1;const l=[];if(s.level.includes("error")){const r=t=>{const r=t.message,n=t.error,o=PI.parse(n).map((e=>e.toString())),i=[DI(r,s.stringifyOptions)];e({level:"error",trace:o,payload:i})};t.addEventListener("error",r),l.push((()=>{t.removeEventListener("error",r)}));const n=t=>{let r,n;t.reason instanceof Error?(r=t.reason,n=[DI(`Uncaught (in promise) ${r.name}: ${r.message}`,s.stringifyOptions)]):(r=new Error,n=[DI("Uncaught (in promise)",s.stringifyOptions),DI(t.reason,s.stringifyOptions)]);const o=PI.parse(r).map((e=>e.toString()));e({level:"error",trace:o,payload:n})};t.addEventListener("unhandledrejection",n),l.push((()=>{t.removeEventListener("unhandledrejection",n)}))}for(const e of s.level)l.push(c(o,e));return()=>{l.forEach((e=>e()))};function c(t,r){return t[r]?CI.patch(t,r,(t=>(...n)=>{if(t.apply(this,n),!("assert"===r&&n[0]||a)){a=!0;try{const t=PI.parse(new Error).map((e=>e.toString())).splice(1),o=("assert"===r?n.slice(1):n).map((e=>DI(e,s.stringifyOptions)));i++,i<s.lengthThreshold?e({level:r,trace:t,payload:o}):i===s.lengthThreshold&&e({level:"warn",trace:[],payload:[DI("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...n)}finally{a=!1}}})):()=>{}}}var BI=function(){function e(){this.fetchObserver=null}return e.prototype.start=function(e){this.eventCallback=e,this.observeFetch()},e.prototype.stop=function(){var e;null===(e=this.fetchObserver)||void 0===e||e.call(this),this.fetchObserver=null,this.eventCallback=void 0},e.prototype.notifyEvent=function(e){var t;null===(t=this.eventCallback)||void 0===t||t.call(this,e)},e.prototype.observeFetch=function(){var e=this,t=d();if(t){var r=t.fetch;r&&(t.fetch=function(t,s){return n(e,void 0,void 0,(function(){var e,n,i,a,l,c,u;return o(this,(function(o){switch(o.label){case 0:e=Date.now(),n={timestamp:e,type:"fetch",method:(null==s?void 0:s.method)||"GET",url:t.toString(),requestHeaders:null==s?void 0:s.headers},o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r(t,s)];case 2:return i=o.sent(),c=Date.now(),n.status=i.status,n.duration=c-e,a={},i.headers.forEach((function(e,t){a[t]=e})),n.responseHeaders=a,this.notifyEvent(n),[2,i];case 3:throw l=o.sent(),c=Date.now(),n.duration=c-e,u=l,n.error={name:u.name||"UnknownError",message:u.message||"An unknown error occurred"},this.notifyEvent(n),l;case 4:return[2]}}))}))},this.fetchObserver=function(){t.fetch=r})}},e}(),UI=function(){function e(){var e=this;this.name="@amplitude/session-replay-browser",this.recordCancelCallback=null,this.eventCount=0,this.pageLeaveFns=[],this.teardownEventListeners=function(t){var r=d();r&&(r.removeEventListener("blur",e.blurListener),r.removeEventListener("focus",e.focusListener),!t&&r.addEventListener("blur",e.blurListener),!t&&r.addEventListener("focus",e.focusListener),r.self&&"onpagehide"in r.self?(r.removeEventListener("pagehide",e.pageLeaveListener),!t&&r.addEventListener("pagehide",e.pageLeaveListener)):(r.removeEventListener("beforeunload",e.pageLeaveListener),!t&&r.addEventListener("beforeunload",e.pageLeaveListener)))},this.blurListener=function(){e.sendEvents()},this.focusListener=function(){e.recordEvents()},this.pageLeaveListener=function(t){e.pageLeaveFns.forEach((function(e){e(t)}))},this.addCustomRRWebEvent=function(t,r,i){return void 0===r&&(r={}),void 0===i&&(i=!0),n(e,void 0,void 0,(function(){var e,n,a,l;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),e=void 0,(n=this.config)?(e={config:ff(n),version:vf},i?[4,df()]:[3,2]):[3,2];case 1:a=o.sent(),e=s(s({},a),e),o.label=2;case 2:return this.recordCancelCallback?lu.addCustomEvent(t,s(s({},r),e)):this.loggerProvider.debug("Not able to add custom replay capture event ".concat(t," due to no ongoing recording.")),[3,4];case 3:return l=o.sent(),this.loggerProvider.debug("Error while adding custom replay capture event: ",l),[3,4];case 4:return[2]}}))}))},this.stopRecordingEvents=function(){var t;try{e.loggerProvider.log("Session Replay capture stopping."),e.recordCancelCallback&&e.recordCancelCallback(),e.recordCancelCallback=null,null===(t=e.networkObservers)||void 0===t||t.stop()}catch(t){var r=t;e.loggerProvider.warn("Error occurred while stopping replay capture: ".concat(r.toString()))}},this.loggerProvider=new W(new g)}return e.prototype.init=function(e,t){return f(this._init(e,t))},e.prototype._init=function(e,t){var r,s,i,c,u,h;return n(this,void 0,void 0,(function(){var n,p,f,m,y,v,w,b,S,C,x;return o(this,(function(o){switch(o.label){case 0:return this.loggerProvider=new W(t.loggerProvider||new g),Object.prototype.hasOwnProperty.call(t,"logLevel")&&this.loggerProvider.enable(t.logLevel),this.identifiers=new Om({sessionId:t.sessionId,deviceId:t.deviceId}),n=this,[4,gf(e,t)];case 1:return n.joinedConfigGenerator=o.sent(),p=this,[4,this.joinedConfigGenerator.generateJoinedConfig(this.identifiers.sessionId)];case 2:p.config=o.sent(),t.sessionId&&(null===(r=this.config.interactionConfig)||void 0===r?void 0:r.enabled)&&(f=km.default({sessionId:t.sessionId,type:"interaction"},this.config),this.pageLeaveFns=[f.send(this.getDeviceId.bind(this)).bind(f)],this.scrollHook=f.hook.bind(f)),m=[],"idb"!==(y=this.config.storeType)||(null===(s=d())||void 0===s?void 0:s.indexedDB)||(y="memory",this.loggerProvider.warn("Could not use preferred indexedDB storage, reverting to in memory option.")),this.loggerProvider.log("Using ".concat(y," for event storage.")),o.label=3;case 3:return o.trys.push([3,5,,6]),[4,sm({config:this.config,sessionId:this.identifiers.sessionId,type:"replay",storeType:y})];case 4:return v=o.sent(),m.push({name:"replay",manager:v}),[3,6];case 5:return w=o.sent(),x=w,this.loggerProvider.warn("Error occurred while creating replay events manager: ".concat(x.toString())),[3,6];case 6:if(!(null===(i=this.config.interactionConfig)||void 0===i?void 0:i.enabled))return[3,10];b=this.config.interactionConfig.batch?bm:wm,o.label=7;case 7:return o.trys.push([7,9,,10]),[4,sm({config:this.config,sessionId:this.identifiers.sessionId,type:"interaction",minInterval:null!==(c=this.config.interactionConfig.trackEveryNms)&&void 0!==c?c:3e4,maxInterval:6e4,payloadBatcher:b,storeType:y})];case 8:return S=o.sent(),m.push({name:"interaction",manager:S}),[3,10];case 9:return C=o.sent(),x=C,this.loggerProvider.warn("Error occurred while creating interaction events manager: ".concat(x.toString())),[3,10];case 10:return this.eventsManager=new(nm.bind.apply(nm,l([void 0],a(m),!1))),this.eventCompressor&&this.eventCompressor.terminate(),this.eventCompressor=new ag(this.eventsManager,this.config,this.getDeviceId()),(null===(h=null===(u=this.config.loggingConfig)||void 0===u?void 0:u.network)||void 0===h?void 0:h.enabled)&&(this.networkObservers=new BI),this.loggerProvider.log("Installing @amplitude/session-replay-browser."),this.teardownEventListeners(!1),this.initialize(!0),[2]}}))}))},e.prototype.setSessionId=function(e,t){return f(this.asyncSetSessionId(e,t))},e.prototype.asyncSetSessionId=function(e,t){return n(this,void 0,void 0,(function(){var r,s,n;return o(this,(function(o){switch(o.label){case 0:return(r=this.identifiers&&this.identifiers.sessionId)&&this.sendEvents(r),s=t||this.getDeviceId(),this.identifiers=new Om({sessionId:e,deviceId:s}),this.joinedConfigGenerator&&r?(n=this,[4,this.joinedConfigGenerator.generateJoinedConfig(this.identifiers.sessionId)]):[3,2];case 1:n.config=o.sent(),o.label=2;case 2:return this.recordEvents(),[2]}}))}))},e.prototype.getSessionReplayProperties=function(){var e,t=this.config,r=this.identifiers;if(!t||!r)return this.loggerProvider.warn("Session replay init has not been called, cannot get session replay properties."),{};var s=this.getShouldRecord(),n={};return s&&((e={})[_]=r.sessionReplayId?r.sessionReplayId:null,n=e,t.debugMode&&(n[U]=JSON.stringify({appHash:hf(t.apiKey).toString()}))),this.addCustomRRWebEvent(D.GET_SR_PROPS,{shouldRecord:s,eventProperties:n},10===this.eventCount),10===this.eventCount&&(this.eventCount=0),this.eventCount++,n},e.prototype.sendEvents=function(e){var t,r=e||(null===(t=this.identifiers)||void 0===t?void 0:t.sessionId),s=this.getDeviceId();this.eventsManager&&r&&s&&this.eventsManager.sendCurrentSequenceEvents({sessionId:r,deviceId:s})},e.prototype.initialize=function(e){var t;if(void 0===e&&(e=!1),null===(t=this.identifiers)||void 0===t?void 0:t.sessionId){var r=this.getDeviceId();r?(this.eventsManager&&e&&this.eventsManager.sendStoredEvents({deviceId:r}),this.recordEvents()):this.loggerProvider.log("Session is not being recorded due to lack of device id.")}else this.loggerProvider.log("Session is not being recorded due to lack of session id.")},e.prototype.shouldOptOut=function(){var e,t,r,s;(null===(e=this.config)||void 0===e?void 0:e.instanceName)&&(r=(s=this.config.instanceName,void 0===s&&(s="$default_instance"),P.getInstance(s)).identityStore.getIdentity().optOut);return void 0!==r?r:null===(t=this.config)||void 0===t?void 0:t.optOut},e.prototype.getShouldRecord=function(){if(!this.identifiers||!this.config||!this.identifiers.sessionId)return this.loggerProvider.warn("Session is not being recorded due to lack of config, please call sessionReplay.init."),!1;if(!this.config.captureEnabled)return this.loggerProvider.log("Session ".concat(this.identifiers.sessionId," not being captured due to capture being disabled for project or because the remote config could not be fetched.")),!1;if(this.shouldOptOut())return this.loggerProvider.log("Opting session ".concat(this.identifiers.sessionId," out of recording due to optOut config.")),!1;var e,t,r,s=(e=this.identifiers.sessionId,t=this.config.sampleRate,r=hf(e.toString()),31*Math.abs(r)%1e6/1e6<t);return s||this.loggerProvider.log("Opting session ".concat(this.identifiers.sessionId," out of recording due to sample rate.")),s},e.prototype.getBlockSelectors=function(){var e,t,r,s=null!==(r=null===(t=null===(e=this.config)||void 0===e?void 0:e.privacyConfig)||void 0===t?void 0:t.blockSelector)&&void 0!==r?r:[];if(0!==s.length)return s},e.prototype.getMaskTextSelectors=function(){var e,t,r,s;if("conservative"===(null===(t=null===(e=this.config)||void 0===e?void 0:e.privacyConfig)||void 0===t?void 0:t.defaultMaskLevel))return"*";var n=null===(s=null===(r=this.config)||void 0===r?void 0:r.privacyConfig)||void 0===s?void 0:s.maskSelector;return n||void 0},e.prototype.getRecordingPlugins=function(e){var t,r=[];return(null===(t=null==e?void 0:e.console)||void 0===t?void 0:t.enabled)&&r.push({name:"rrweb/console@1",observer:_I,options:{level:e.console.levels}}),r.length>0?r:void 0},e.prototype.recordEvents=function(){var e,t,r=this,s=this.config,n=this.getShouldRecord(),o=null===(e=this.identifiers)||void 0===e?void 0:e.sessionId;if(n&&o&&s){this.stopRecordingEvents(),null===(t=this.networkObservers)||void 0===t||t.start((function(e){r.addCustomRRWebEvent(D.FETCH_REQUEST,e)}));var i=s.privacyConfig,a=s.interactionConfig,l=s.loggingConfig,c=(null==a?void 0:a.enabled)?{mouseInteraction:this.eventsManager&&Sm(this.loggerProvider,{eventsManager:this.eventsManager,sessionId:o,deviceIdFn:this.getDeviceId.bind(this)}),scroll:this.scrollHook}:{};this.loggerProvider.log("Session Replay capture beginning for ".concat(o,".")),this.recordCancelCallback=lu({emit:function(e){if(r.shouldOptOut())return r.loggerProvider.log("Opting session ".concat(o," out of recording due to optOut config.")),r.stopRecordingEvents(),void r.sendEvents();r.eventCompressor&&r.eventCompressor.enqueueEvent(e,o)},inlineStylesheet:s.shouldInlineStylesheet,hooks:c,maskAllInputs:!0,maskTextClass:j,blockClass:"amp-block",blockSelector:this.getBlockSelectors(),maskInputFn:uf("input",i),maskTextFn:uf("text",i),maskTextSelector:this.getMaskTextSelectors(),recordCanvas:!1,errorHandler:function(e){var t=e;if(t.message.includes("insertRule")&&t.message.includes("CSSStyleSheet"))throw t;if(t._external_)throw t;return r.loggerProvider.warn("Error while capturing replay: ",t.toString()),!0},plugins:this.getRecordingPlugins(l)}),this.addCustomRRWebEvent(D.DEBUG_INFO)}},e.prototype.getDeviceId=function(){var e;return null===(e=this.identifiers)||void 0===e?void 0:e.deviceId},e.prototype.getSessionId=function(){var e;return null===(e=this.identifiers)||void 0===e?void 0:e.sessionId},e.prototype.flush=function(e){var t;return void 0===e&&(e=!1),n(this,void 0,void 0,(function(){return o(this,(function(r){return[2,null===(t=this.eventsManager)||void 0===t?void 0:t.flush(e)]}))}))},e.prototype.shutdown=function(){this.teardownEventListeners(!0),this.stopRecordingEvents(),this.sendEvents()},e}(),jI=function(e){return function(){var t=e.config||V();return{logger:t.loggerProvider,logLevel:t.logLevel}}},zI=function(){var e=new UI;return{init:N(e.init.bind(e),"init",jI(e)),setSessionId:N(e.setSessionId.bind(e),"setSessionId",jI(e)),getSessionId:N(e.getSessionId.bind(e),"getSessionId",jI(e)),getSessionReplayProperties:N(e.getSessionReplayProperties.bind(e),"getSessionReplayProperties",jI(e)),flush:N(e.flush.bind(e),"flush",jI(e)),shutdown:N(e.shutdown.bind(e),"shutdown",jI(e))}}(),WI=zI.init,VI=zI.setSessionId,GI=zI.getSessionId,ZI=zI.getSessionReplayProperties,YI=zI.flush,JI=zI.shutdown;e.SafeLoggerProvider=W,e.flush=YI,e.getSessionId=GI,e.getSessionReplayProperties=ZI,e.init=WI,e.setSessionId=VI,e.shutdown=JI,Object.defineProperty(e,"__esModule",{value:!0})}));
|