@amplitude/session-replay-browser 1.25.3 → 1.26.1
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/README.md +1 -1
- package/lib/cjs/config/local-config.d.ts +4 -0
- package/lib/cjs/config/local-config.d.ts.map +1 -1
- package/lib/cjs/config/local-config.js +4 -1
- package/lib/cjs/config/local-config.js.map +1 -1
- package/lib/cjs/config/types.d.ts +13 -0
- package/lib/cjs/config/types.d.ts.map +1 -1
- package/lib/cjs/config/types.js.map +1 -1
- package/lib/cjs/constants.d.ts +4 -1
- package/lib/cjs/constants.d.ts.map +1 -1
- package/lib/cjs/constants.js +3 -2
- package/lib/cjs/constants.js.map +1 -1
- package/lib/cjs/events/base-events-store.d.ts +10 -0
- package/lib/cjs/events/base-events-store.d.ts.map +1 -1
- package/lib/cjs/events/base-events-store.js +39 -3
- package/lib/cjs/events/base-events-store.js.map +1 -1
- package/lib/cjs/helpers.d.ts +4 -0
- package/lib/cjs/helpers.d.ts.map +1 -1
- package/lib/cjs/session-replay.d.ts.map +1 -1
- package/lib/cjs/session-replay.js +19 -15
- package/lib/cjs/session-replay.js.map +1 -1
- package/lib/cjs/utils/rrweb.d.ts +4 -0
- package/lib/cjs/utils/rrweb.d.ts.map +1 -1
- package/lib/cjs/utils/rrweb.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/config/local-config.d.ts +4 -0
- package/lib/esm/config/local-config.d.ts.map +1 -1
- package/lib/esm/config/local-config.js +5 -2
- package/lib/esm/config/local-config.js.map +1 -1
- package/lib/esm/config/types.d.ts +13 -0
- package/lib/esm/config/types.d.ts.map +1 -1
- package/lib/esm/config/types.js.map +1 -1
- package/lib/esm/constants.d.ts +4 -1
- package/lib/esm/constants.d.ts.map +1 -1
- package/lib/esm/constants.js +2 -1
- package/lib/esm/constants.js.map +1 -1
- package/lib/esm/events/base-events-store.d.ts +10 -0
- package/lib/esm/events/base-events-store.d.ts.map +1 -1
- package/lib/esm/events/base-events-store.js +40 -4
- package/lib/esm/events/base-events-store.js.map +1 -1
- package/lib/esm/helpers.d.ts +4 -0
- package/lib/esm/helpers.d.ts.map +1 -1
- package/lib/esm/session-replay.d.ts.map +1 -1
- package/lib/esm/session-replay.js +19 -15
- package/lib/esm/session-replay.js.map +1 -1
- package/lib/esm/utils/rrweb.d.ts +4 -0
- package/lib/esm/utils/rrweb.d.ts.map +1 -1
- package/lib/esm/utils/rrweb.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 +1 -1
- package/lib/scripts/console-plugin-min.js.gz +0 -0
- package/lib/scripts/console-plugin-min.js.map +1 -1
- package/lib/scripts/rrweb-record-min.js +1 -1
- package/lib/scripts/rrweb-record-min.js.gz +0 -0
- package/lib/scripts/rrweb-record-min.js.map +1 -1
- package/lib/scripts/session-replay-browser-min.js +1 -1
- package/lib/scripts/session-replay-browser-min.js.gz +0 -0
- package/lib/scripts/session-replay-browser-min.js.map +1 -1
- package/lib/scripts/session-replay-min.js +1 -1
- package/lib/scripts/session-replay-min.js.gz +0 -0
- package/lib/scripts/session-replay-min.js.map +1 -1
- package/package.json +7 -7
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var sessionReplay=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)};var r=function(){return r=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},r.apply(this,arguments)};function s(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 n(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"==typeof SuppressedError&&SuppressedError;var o,i="".concat("AMP","_unsent"),a="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"}(o||(o={}));var l,c=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},u=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"}(l||(l={}));var h="Amplitude Logger ",d=function(){function e(){this.logLevel=l.None}return e.prototype.disable=function(){this.logLevel=l.None},e.prototype.enable=function(e){void 0===e&&(e=l.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<l.Verbose||console.log("".concat(h,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<l.Warn||console.warn("".concat(h,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<l.Error||console.error("".concat(h,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<l.Debug||console.log("".concat(h,"[Debug]: ").concat(e.join(" ")))},e}(),p=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:"$default_instance",logLevel:l.Warn,loggerProvider:new d,offline:!1,optOut:!1,serverUrl:a,serverZone:"US",useBatch:!1}},f=function(){function e(e){var t,r,s,n;this._optOut=!1;var o=p();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=g(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}(),m=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":a},g=function(e,t,r){if(void 0===e&&(e=""),void 0===t&&(t=p().serverZone),void 0===r&&(r=p().useBatch),e)return{serverUrl:e,serverZone:void 0};var s=["US","EU"].includes(t)?t:p().serverZone;return{serverZone:s,serverUrl:m(s,r)}},y=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:v(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),v=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},w=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}(),b=function(){return b=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},b.apply(this,arguments)};function S(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 C(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 I=function(e,t){var r,s,n=typeof e;if(n!==typeof t)return!1;try{for(var o=S(["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(!I(c,u))return!1;var h=!0;return Object.keys(e).forEach((function(r){I(e[r],t[r])||(h=!1)})),h}for(var d=0;d<e.length;d++)if(!I(e[d],t[d]))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 x,k=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=b({},this.identity.userProperties),r=b(b({},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=S(Object.entries(e)),u=c.next();!u.done;u=c.next()){var h=C(u.value,2),d=h[0],p=h[1];switch(d){case"$set":try{for(var f=(n=void 0,S(Object.entries(p))),m=f.next();!m.done;m=f.next()){var g=C(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,S(Object.keys(p))),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 b({},this.identity)},e.prototype.setIdentity=function(e){var t=b({},this.identity);this.identity=b({},e),I(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}(),O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:self,E=function(){function e(){this.identityStore=new k,this.eventBridge=new w,this.applicationContextProvider=new y}return e.getInstance=function(t){return O.analyticsConnectorInstances||(O.analyticsConnectorInstances={}),O.analyticsConnectorInstances[t]||(O.analyticsConnectorInstances[t]=new e),O.analyticsConnectorInstances[t]},e}(),A=function(){function e(){}return e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,r,s,n,i,a,l,c,u,h,d,p,f,m,g,y,v,w,b,S,C,I;if("object"!=typeof e)return null;var x=e.code||0,k=this.buildStatus(x);switch(k){case o.Success:return{status:k,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 o.Invalid:return{status:k,statusCode:x,body:{error:null!==(n=e.error)&&void 0!==n?n:"",missingField:null!==(i=e.missing_field)&&void 0!==i?i:"",eventsWithInvalidFields:null!==(a=e.events_with_invalid_fields)&&void 0!==a?a:{},eventsWithMissingFields:null!==(l=e.events_with_missing_fields)&&void 0!==l?l:{},eventsWithInvalidIdLengths:null!==(c=e.events_with_invalid_id_lengths)&&void 0!==c?c:{},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!==(d=e.silenced_devices)&&void 0!==d?d:[],silencedEvents:null!==(p=e.silenced_events)&&void 0!==p?p:[],throttledDevices:null!==(f=e.throttled_devices)&&void 0!==f?f:{},throttledEvents:null!==(m=e.throttled_events)&&void 0!==m?m:[]}};case o.PayloadTooLarge:return{status:k,statusCode:x,body:{error:null!==(g=e.error)&&void 0!==g?g:""}};case o.RateLimit:return{status:k,statusCode:x,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!==(I=e.throttled_events)&&void 0!==I?I:[]}};case o.Timeout:default:return{status:k,statusCode:x}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?o.Success:429===e?o.RateLimit:413===e?o.PayloadTooLarge:408===e?o.Timeout:e>=400&&e<500?o.Invalid:e>=500?o.Failed:o.Unknown},e}(),M=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return function(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)}(r,e),r.prototype.send=function(e,t){return s(this,void 0,void 0,(function(){var r,s,o;return n(this,(function(n){switch(n.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=n.sent()).text()];case 2:o=n.sent();try{return[2,this.buildResponse(JSON.parse(o))]}catch(e){return[2,this.buildResponse({code:s.status})]}return[2]}}))}))},r}(A);!function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(x||(x={}));var R,N,P=(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))(P||{}),T=(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))(T||{});!function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(R||(R={})),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"}(N||(N={}));var L=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,d,p,f,m,g,y,v,w,b,S,C;if("object"!=typeof e)return null;var I=e.code||0,x=this.buildStatus(I);switch(x){case N.Success:return{status:x,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 N.Invalid:return{status:x,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!==(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!==(d=e.silenced_events)&&void 0!==d?d:[],throttledDevices:null!==(p=e.throttled_devices)&&void 0!==p?p:{},throttledEvents:null!==(f=e.throttled_events)&&void 0!==f?f:[]}};case N.PayloadTooLarge:return{status:x,statusCode:I,body:{error:null!==(m=e.error)&&void 0!==m?m:""}};case N.RateLimit:return{status:x,statusCode:I,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 N.Timeout:default:return{status:x,statusCode:I}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?N.Success:429===e?N.RateLimit:413===e?N.PayloadTooLarge:408===e?N.Timeout:e>=400&&e<500?N.Invalid:e>=500?N.Failed:N.Unknown},e}(),D="Remote config fetch rejected due to timeout after 5 seconds",F="Unexpected error occurred",B=function(){function e(e){var t=e.localConfig,o=e.configKeys,i=this;this.retryTimeout=1e3,this.attempts=0,this.sessionTargetingMatch=!1,this.metrics={},this.getRemoteNamespaceConfig=function(e,t){return s(i,void 0,void 0,(function(){var r,s,o;return n(this,(function(n){switch(n.label){case 0:return r=Date.now(),[4,this.fetchWithTimeout(t)];case 1:return(s=n.sent())&&(o=s.configs&&s.configs[e])?(this.metrics.fetchTimeAPISuccess=Date.now()-r,[2,o]):(this.metrics.fetchTimeAPIFail=Date.now()-r,[2,void 0])}}))}))},this.getRemoteConfig=function(e,t,r){return s(i,void 0,void 0,(function(){var s;return n(this,(function(n){switch(n.label){case 0:return[4,this.getRemoteNamespaceConfig(e,r)];case 1:return[2,null==(s=n.sent())?void 0:s[t]]}}))}))},this.fetchWithTimeout=function(e){return s(i,void 0,void 0,(function(){var t,r,s;return n(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 s(i,void 0,void 0,(function(){var s,o,i,a,l,c,u,h,d,p,f,m;return n(this,(function(n){switch(n.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:D})];t!==this.lastFetchedSessionId&&(this.lastFetchedSessionId=t,this.attempts=0),n.label=1;case 1:n.trys.push([1,3,,4]),s=new URLSearchParams({api_key:this.localConfig.apiKey});try{for(o=function(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.")}(this.configKeys),i=o.next();!i.done;i=o.next())a=i.value,s.append("config_keys",a)}catch(e){p={error:e}}finally{try{i&&!i.done&&(f=o.return)&&f.call(o)}finally{if(p)throw p.error}}return t&&s.set("session_id",String(t)),l={headers:{Accept:"*/*"},method:"GET"},c="".concat(this.getServerUrl(),"?").concat(s.toString()),this.attempts+=1,[4,fetch(c,r(r({},l),{signal:e}))];case 2:if(null===(u=n.sent()))return[2,this.completeRequest({err:F})];switch((new L).buildStatus(u.status)){case N.Success:return this.attempts=0,[2,this.parseAndStoreConfig(u)];case N.Failed:return[2,this.retryFetch(e,t)];default:return[2,this.completeRequest({err:"Network error occurred, remote config fetch failed"})]}case 3:return h=n.sent(),d=h,e.aborted?[2,this.completeRequest({err:D})]:[2,this.completeRequest({err:null!==(m=d.message)&&void 0!==m?m:F})];case 4:return[2]}}))}))},this.retryFetch=function(e,t){return s(i,void 0,void 0,(function(){var r=this;return n(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 s(i,void 0,void 0,(function(){var t;return n(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=o}return e.prototype.getServerUrl=function(){return this.localConfig.configServerUrl?this.localConfig.configServerUrl:this.localConfig.serverZone===R.STAGING?"https://sr-client-cfg.stag2.amplitude.com/config":this.localConfig.serverZone===R.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}(),_=function(e){var t=e.localConfig,r=e.configKeys;return s(void 0,void 0,void 0,(function(){return n(this,(function(e){return[2,new B({localConfig:t,configKeys:r})]}))}))};const j="medium",U="[Amplitude]",z=`${U} Session Replay ID`,W=x.US,V=`${U} Session Replay Debug`,G="amp-mask";var Z;!function(e){e.GET_SR_PROPS="get-sr-props",e.DEBUG_INFO="debug-info",e.FETCH_REQUEST="fetch-request",e.METADATA="metadata"}(Z||(Z={}));const Y=(e,t,r)=>{switch(t){case"light":{if("input"!==e)return!0;const t=r?function(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?t.toLowerCase():null}(r):"";return!!t&&(!!["password","hidden","email","tel"].includes(t)||!!r.autocomplete.startsWith("cc-"))}case"medium":case"conservative":return!0;default:return Y(e,j,r)}},$=(e,t)=>(r,s)=>((e,t={defaultMaskLevel:j},r)=>{var s,n,o;if(r){if(r.closest("."+G))return!0;const e=(null!==(s=t.maskSelector)&&void 0!==s?s:[]).some((e=>r.closest(e)));if(e)return!0;if(r.closest(".amp-unmask"))return!1;const o=(null!==(n=t.unmaskSelector)&&void 0!==n?n:[]).some((e=>r.closest(e)));if(o)return!1}return Y(e,null!==(o=t.defaultMaskLevel)&&void 0!==o?o:j,r)})(e,t,s)?r.replace(/[^\s]/g,"*"):r,J=function(e){let t=0;if(0===e.length)return t;for(let r=0;r<e.length;r++){t=(t<<5)-t+e.charCodeAt(r),t|=0}return t},q=(e,t)=>t||(e===x.STAGING?"https://api-sr.stag2.amplitude.com/sessions/v2/track":e===x.EU?"https://api-sr.eu.amplitude.com/sessions/v2/track":"https://api-sr.amplitude.com/sessions/v2/track"),K=e=>{const t=e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".");return new RegExp(`^${t}$`)},X=(e,t)=>{for(const r of t){const t=K(r.selector);if(t.test(e))return e.replace(t,r.replacement)}return e},H=()=>s(void 0,void 0,void 0,(function*(){try{const e=c();if(e){const{usage:t,quota:r,usageDetails:s}=yield e.navigator.storage.estimate(),n=t?Math.round(t/1024):0;return{totalStorageSize:n,percentOfQuota:t&&r?Math.round(1e3*(t/r+Number.EPSILON))/1e3:0,usageDetails:JSON.stringify(s)}}}catch(e){}return{totalStorageSize:0,percentOfQuota:0,usageDetails:""}})),Q=e=>{const t=Object.assign({},e),{apiKey:r}=t;return t.apiKey=`****${r.substring(r.length-4)}`,t};class ee{constructor(e){this.logger=e,this.log=this.getSafeMethod("log"),this.warn=this.getSafeMethod("warn"),this.error=this.getSafeMethod("error"),this.debug=this.getSafeMethod("debug")}getSafeMethod(e){var t;if(!this.logger)return()=>{};const r=this.logger[e];if("function"==typeof r){return(null!==(t=r.__rrweb_original__)&&void 0!==t?t:r).bind(this.logger)}return()=>{}}enable(e){this.logger.enable(e)}disable(){this.logger.disable()}}class te extends f{constructor(e,t){var r,s;const n={flushMaxRetries:2,logLevel:l.Warn,loggerProvider:new d,transportProvider:new M};super(Object.assign(Object.assign({transportProvider:n.transportProvider,loggerProvider:new ee(t.loggerProvider||n.loggerProvider)},t),{apiKey:e})),this.flushMaxRetries=void 0!==t.flushMaxRetries&&t.flushMaxRetries<=n.flushMaxRetries?t.flushMaxRetries:n.flushMaxRetries,this.apiKey=e,this.sampleRate=t.sampleRate||0,this.serverZone=t.serverZone||W,this.configServerUrl=t.configServerUrl,this.trackServerUrl=t.trackServerUrl,this.shouldInlineStylesheet=t.shouldInlineStylesheet,this.version=t.version,this.performanceConfig=t.performanceConfig,this.storeType=null!==(r=t.storeType)&&void 0!==r?r:"idb",this.applyBackgroundColorToBlockedElements=null!==(s=t.applyBackgroundColorToBlockedElements)&&void 0!==s&&s,t.privacyConfig&&(this.privacyConfig=t.privacyConfig),t.interactionConfig&&(this.interactionConfig=t.interactionConfig,this.interactionConfig.ugcFilterRules&&(e=>{if(!e.every((e=>"string"==typeof e.selector&&"string"==typeof e.replacement)))throw new Error("ugcFilterRules must be an array of objects with selector and replacement properties");if(!e.every((e=>{return"string"==typeof(t=e.selector)&&""!==t.trim()&&!!/^\/|^https?:\/\/[^\s]+$/.test(t);var t})))throw new Error("ugcFilterRules must be an array of objects with valid globs")})(this.interactionConfig.ugcFilterRules)),t.debugMode&&(this.debugMode=t.debugMode),t.experimental&&(this.experimental=t.experimental)}}class re{constructor(e,t){this.localConfig=t,this.remoteConfigFetch=e}generateJoinedConfig(e){var t,r,n,o;return s(this,void 0,void 0,(function*(){const s=Object.assign({},this.localConfig);let i;s.optOut=this.localConfig.optOut,s.captureEnabled=!0;try{const r=yield this.remoteConfigFetch.getRemoteNamespaceConfig("sessionReplay",e);if(r){const e=r.sr_sampling_config,n=r.sr_privacy_config,o=null===(t=s.interactionConfig)||void 0===t?void 0:t.ugcFilterRules;s.interactionConfig=r.sr_interaction_config,s.interactionConfig&&o&&(s.interactionConfig.ugcFilterRules=o),s.loggingConfig=r.sr_logging_config,(e||n)&&(i={},e&&(i.sr_sampling_config=e),n&&(i.sr_privacy_config=n))}}catch(e){const t=e;this.localConfig.loggerProvider.warn(t.message),s.captureEnabled=!1}if(!i)return{localConfig:this.localConfig,joinedConfig:s,remoteConfig:i};const{sr_sampling_config:a,sr_privacy_config:l}=i;if(a&&Object.keys(a).length>0?(Object.prototype.hasOwnProperty.call(a,"capture_enabled")?s.captureEnabled=a.capture_enabled:s.captureEnabled=!1,Object.prototype.hasOwnProperty.call(a,"sample_rate")&&(s.sampleRate=a.sample_rate)):(s.captureEnabled=!0,this.localConfig.loggerProvider.debug("Remote config successfully fetched, but no values set for project, Session Replay capture enabled.")),l){const e=null!==(r=s.privacyConfig)&&void 0!==r?r:{},t={defaultMaskLevel:null!==(o=null!==(n=l.defaultMaskLevel)&&void 0!==n?n:e.defaultMaskLevel)&&void 0!==o?o:"medium",blockSelector:[],maskSelector:[],unmaskSelector:[]},i=e=>{var t,r,s;const n={};"string"==typeof e.blockSelector&&(e.blockSelector=[e.blockSelector]);for(const r of null!==(t=e.blockSelector)&&void 0!==t?t:[])n[r]="block";for(const t of null!==(r=e.maskSelector)&&void 0!==r?r:[])n[t]="mask";for(const t of null!==(s=e.unmaskSelector)&&void 0!==s?s:[])n[t]="unmask";return n},a=Object.assign(Object.assign({},i(e)),i(l));for(const[e,r]of Object.entries(a))"mask"===r?t.maskSelector.push(e):"block"===r?t.blockSelector.push(e):"unmask"===r&&t.unmaskSelector.push(e);s.privacyConfig=((e,t)=>{const r=document.createDocumentFragment(),s=(e=[])=>{if("string"==typeof e&&(e=[e]),e=e.filter((e=>{try{r.querySelector(e)}catch(r){return t.warn(`[session-replay-browser] omitting selector "${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})(t,this.localConfig.loggerProvider)}return this.localConfig.loggerProvider.debug(JSON.stringify({name:"session replay joined config",config:Q(s)},null,2)),{localConfig:this.localConfig,joinedConfig:s,remoteConfig:i}}))}}const se="Failed to store session replay events in IndexedDB",ne="1.25.3";class oe{constructor({trackServerUrl:e,loggerProvider:t,payloadBatcher:r}){this.storageKey="",this.retryTimeout=1e3,this.scheduled=null,this.queue=[],this.loggerProvider=t,this.payloadBatcher=r||(e=>e),this.trackServerUrl=e}sendEventsList(e){this.addToQueue(Object.assign(Object.assign({},e),{attempts:0,timeout:0}))}addToQueue(...e){e.filter((e=>e.attempts<(e.flushMaxRetries||0)?(e.attempts+=1,!0):(this.completeRequest({context:e,err:"Session replay event batch rejected due to exceeded retry count"}),!1))).forEach((e=>{this.queue=this.queue.concat(e),0!==e.timeout?setTimeout((()=>{e.timeout=0,this.schedule(0)}),e.timeout):this.schedule(0)}))}schedule(e){this.scheduled||(this.scheduled=setTimeout((()=>{this.flush(!0).then((()=>{this.queue.length>0&&this.schedule(e)}))}),e))}flush(e=!1){return s(this,void 0,void 0,(function*(){const t=[],r=[];this.queue.forEach((e=>0===e.timeout?t.push(e):r.push(e))),this.queue=r,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),yield Promise.all(t.map((t=>this.send(t,e))))}))}send(e,t=!0){var r,n;return s(this,void 0,void 0,(function*(){const s=e.apiKey;if(!s)return this.completeRequest({context:e,err:"Session replay event batch not sent due to missing api key"});const o=e.deviceId;if(!o)return this.completeRequest({context:e,err:"Session replay event batch not sent due to missing device ID"});const i=(()=>{const e=c();return(null==e?void 0:e.location)?e.location.href:""})(),a=ne,l=e.sampleRate,u=new URLSearchParams({device_id:o,session_id:`${e.sessionId}`,type:`${e.type}`}),h=`${(null===(r=e.version)||void 0===r?void 0:r.type)||"standalone"}/${(null===(n=e.version)||void 0===n?void 0:n.version)||a}`,d=this.payloadBatcher({version:1,events:e.events});if(0!==d.events.length)try{const r={headers:{"Content-Type":"application/json",Accept:"*/*",Authorization:`Bearer ${s}`,"X-Client-Version":a,"X-Client-Library":h,"X-Client-Url":i.substring(0,1e3),"X-Client-Sample-Rate":`${l}`},body:JSON.stringify(d),method:"POST"},n=`${q(e.serverZone,this.trackServerUrl)}?${u.toString()}`,o=yield fetch(n,r);if(null===o)return void this.completeRequest({context:e,err:"Unexpected error occurred"});if(t)this.handleReponse(o.status,e);else{let t="";try{t=JSON.stringify(o.body,null,2)}catch(e){}this.completeRequest({context:e,success:`${o.status}: ${t}`})}}catch(t){this.completeRequest({context:e,err:t})}else this.completeRequest({context:e})}))}handleReponse(e,t){switch((new A).buildStatus(e)){case o.Success:this.handleSuccessResponse(t);break;case o.Failed:this.handleOtherResponse(t);break;default:this.completeRequest({context:t,err:"Network error occurred, event batch rejected"})}}handleSuccessResponse(e){const t=Math.round(new Blob(e.events).size/1024);this.completeRequest({context:e,success:`Session replay event batch tracked successfully for session id ${e.sessionId}, size of events: ${t} KB`})}handleOtherResponse(e){this.addToQueue(Object.assign(Object.assign({},e),{timeout:e.attempts*this.retryTimeout}))}completeRequest({context:e,err:t,success:r}){e.onComplete(),t?this.loggerProvider.warn(t):r&&this.loggerProvider.log(r)}}const ie=(e,t)=>t.some((t=>e instanceof t));let ae,le;const ce=new WeakMap,ue=new WeakMap,he=new WeakMap;let de={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return ce.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return ge(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function pe(e){de=e(de)}function fe(e){return(le||(le=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(ye(this),t),ge(this.request)}:function(...t){return ge(e.apply(ye(this),t))}}function me(e){return"function"==typeof e?fe(e):(e instanceof IDBTransaction&&function(e){if(ce.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)}));ce.set(e,t)}(e),ie(e,ae||(ae=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,de):e)}function ge(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(ge(e.result)),s()},o=()=>{r(e.error),s()};e.addEventListener("success",n),e.addEventListener("error",o)}));return he.set(t,e),t}(e);if(ue.has(e))return ue.get(e);const t=me(e);return t!==e&&(ue.set(e,t),he.set(t,e)),t}const ye=e=>he.get(e);const ve=["get","getKey","getAll","getAllKeys","count"],we=["put","add","delete","clear"],be=new Map;function Se(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(be.get(t))return be.get(t);const r=t.replace(/FromIndex$/,""),s=t!==r,n=we.includes(r);if(!(r in(s?IDBIndex:IDBObjectStore).prototype)||!n&&!ve.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 be.set(t,o),o}pe((e=>({...e,get:(t,r,s)=>Se(t,r)||e.get(t,r,s),has:(t,r)=>!!Se(t,r)||e.has(t,r)})));const Ce=["continue","continuePrimaryKey","advance"],Ie={},xe=new WeakMap,ke=new WeakMap,Oe={get(e,t){if(!Ce.includes(t))return e[t];let r=Ie[t];return r||(r=Ie[t]=function(...e){xe.set(this,ke.get(this)[t](...e))}),r}};async function*Ee(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const r=new Proxy(t,Oe);for(ke.set(r,t),he.set(r,ye(t));t;)yield r,t=await(xe.get(r)||t.continue()),xe.delete(r)}function Ae(e,t){return t===Symbol.asyncIterator&&ie(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&ie(e,[IDBIndex,IDBObjectStore])}pe((e=>({...e,get:(t,r,s)=>Ae(t,r)?Ee:e.get(t,r,s),has:(t,r)=>Ae(t,r)||e.has(t,r)})));class Me{get timeAtLastSplit(){return this._timeAtLastSplit}constructor(e){var t,r,s;this.minInterval=500,this.maxInterval=1e4,this.maxPersistedEventsSize=1e6,this.interval=this.minInterval,this._timeAtLastSplit=Date.now(),this.shouldSplitEventsList=(e,t)=>{const r=new Blob([t]).size;return new Blob(e).size+r>=this.maxPersistedEventsSize||!!(Date.now()-this.timeAtLastSplit>this.interval&&e.length)&&(this.interval=Math.min(this.maxInterval,this.interval+this.minInterval),this._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}}var Re;!function(e){e.RECORDING="recording",e.SENT="sent"}(Re||(Re={}));const Ne="sessionCurrentSequence",Pe="sequencesToSend",Te=e=>s(void 0,void 0,void 0,(function*(){for(;e.length>0;){const t=10,r=e.splice(0,t);yield Promise.all(r)}})),Le=e=>{let t,r;return e.objectStoreNames.contains(Ne)||(r=e.createObjectStore(Ne,{keyPath:"sessionId"})),e.objectStoreNames.contains(Pe)||(t=e.createObjectStore(Pe,{keyPath:"sequenceId",autoIncrement:!0}),t.createIndex("sessionId","sessionId")),{sequencesStore:t,currentSequenceStore:r}},De=e=>s(void 0,void 0,void 0,(function*(){return yield function(e,t,{blocked:r,upgrade:s,blocking:n,terminated:o}={}){const i=indexedDB.open(e,t),a=ge(i);return s&&i.addEventListener("upgradeneeded",(e=>{s(ge(i.result),e.oldVersion,e.newVersion,ge(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}(e,1,{upgrade:Le})}));class Fe extends Me{constructor(e){super(e),this.getSequencesToSend=()=>s(this,void 0,void 0,(function*(){try{const e=[];let t=yield this.db.transaction("sequencesToSend").store.openCursor();for(;t;){const{sessionId:r,events:s}=t.value;e.push({events:s,sequenceId:t.key,sessionId:r}),t=yield t.continue()}return e}catch(e){this.loggerProvider.warn(`${se}: ${e}`)}})),this.storeCurrentSequence=e=>s(this,void 0,void 0,(function*(){try{const t=yield this.db.get(Ne,e);if(!t)return;const r=yield this.db.put(Pe,{sessionId:e,events:t.events});return yield this.db.put(Ne,{sessionId:e,events:[]}),Object.assign(Object.assign({},t),{sessionId:e,sequenceId:r})}catch(e){this.loggerProvider.warn(`${se}: ${e}`)}})),this.addEventToCurrentSequence=(e,t)=>s(this,void 0,void 0,(function*(){try{const r=this.db.transaction(Ne,"readwrite"),s=yield r.store.get(e);if(!s)return void(yield r.store.put({sessionId:e,events:[t]}));let n;if(this.shouldSplitEventsList(s.events,t))n=s.events,yield r.store.put({sessionId:e,events:[t]});else{const n=s.events.concat(t);yield r.store.put({sessionId:e,events:n})}if(yield r.done,!n)return;const o=yield this.storeSendingEvents(e,n);if(!o)return;return{events:n,sessionId:e,sequenceId:o}}catch(e){this.loggerProvider.warn(`${se}: ${e}`)}})),this.storeSendingEvents=(e,t)=>s(this,void 0,void 0,(function*(){try{return yield this.db.put(Pe,{sessionId:e,events:t})}catch(e){this.loggerProvider.warn(`${se}: ${e}`)}})),this.cleanUpSessionEventsStore=(e,t)=>s(this,void 0,void 0,(function*(){if(t)try{yield this.db.delete(Pe,t)}catch(e){this.loggerProvider.warn(`${se}: ${e}`)}})),this.transitionFromKeyValStore=e=>s(this,void 0,void 0,(function*(){try{const t=yield function(){const e=c();return new Promise(((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{const 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)},s.onerror=function(){r(s.error)}}catch(e){r(e)}}))}();if(!t)return;const r=(e,t)=>s(this,void 0,void 0,(function*(){const r=t.sessionSequences,n=[];Object.keys(r).forEach((o=>{const i=parseInt(o,10),a=r[i];if(i===t.currentSequenceId){const t=a.events.map((t=>s(this,void 0,void 0,(function*(){return this.addEventToCurrentSequence(e,t)}))));n.push(...t)}else a.status!==Re.SENT&&n.push(this.storeSendingEvents(e,a.events))})),yield Te(n)})),n=`${i}_${this.apiKey.substring(0,10)}`;try{const o=t.transaction("keyval").objectStore("keyval").getAll(n),i=new Promise((t=>{o.onsuccess=n=>s(this,void 0,void 0,(function*(){const s=n&&n.target.result,o=s&&s[0];if(o){const t=[];Object.keys(o).forEach((s=>{const n=parseInt(s,10),i=o[n];if(e===n)t.push(r(n,i));else{const e=i.sessionSequences;Object.keys(e).forEach((r=>{const s=parseInt(r,10);e[s].status!==Re.SENT&&t.push(this.storeSendingEvents(n,e[s].events))}))}})),yield Te(t)}t()}))}));yield i;const a=c();a&&a.indexedDB.deleteDatabase("keyval-store")}catch(e){this.loggerProvider.warn(`Failed to transition session replay events from keyval to new store: ${e}`)}}catch(e){this.loggerProvider.warn(`Failed to access keyval store: ${e}. For more information, visit: https://www.docs.developers.amplitude.com/session-replay/sdks/standalone/#indexeddb-best-practices`)}})),this.apiKey=e.apiKey,this.db=e.db}static new(e,t,r){return s(this,void 0,void 0,(function*(){try{const s="replay"===e?"":`_${e}`,n=`${t.apiKey.substring(0,10)}_amp_session_replay_events${s}`,o=yield De(n),i=new Fe(Object.assign(Object.assign({},t),{db:o}));return yield i.transitionFromKeyValStore(r),i}catch(e){t.loggerProvider.warn(`${se}: ${e}`)}}))}getCurrentSequenceEvents(e){return s(this,void 0,void 0,(function*(){if(e){const t=yield this.db.get("sessionCurrentSequence",e);if(!t)return;return[t]}const t=[];for(const e of yield this.db.getAll("sessionCurrentSequence"))t.push(e);return t}))}}class Be extends Me{constructor(){super(...arguments),this.finalizedSequences={},this.sequences={},this.sequenceId=0}resetCurrentSequence(e){this.sequences[e]=[]}addSequence(e){const t=this.sequenceId++,r=[...this.sequences[e]];return this.finalizedSequences[t]={sessionId:e,events:r},this.resetCurrentSequence(e),{sequenceId:t,events:r,sessionId:e}}getSequencesToSend(){return s(this,void 0,void 0,(function*(){return Object.entries(this.finalizedSequences).map((([e,{sessionId:t,events:r}])=>({sequenceId:Number(e),sessionId:t,events:r})))}))}storeCurrentSequence(e){return s(this,void 0,void 0,(function*(){if(this.sequences[e])return this.addSequence(e)}))}addEventToCurrentSequence(e,t){return s(this,void 0,void 0,(function*(){let r;return this.sequences[e]||this.resetCurrentSequence(e),this.shouldSplitEventsList(this.sequences[e],t)&&(r=this.addSequence(e)),this.sequences[e].push(t),r}))}storeSendingEvents(e,t){return s(this,void 0,void 0,(function*(){return this.finalizedSequences[this.sequenceId]={sessionId:e,events:t},this.sequenceId++}))}cleanUpSessionEventsStore(e,t){return s(this,void 0,void 0,(function*(){void 0!==t&&delete this.finalizedSequences[t]}))}}const _e=({config:e,sessionId:t,minInterval:r,maxInterval:n,type:o,payloadBatcher:i,storeType:a})=>s(void 0,void 0,void 0,(function*(){const l=new oe(Object.assign(Object.assign({},e),{loggerProvider:e.loggerProvider,payloadBatcher:i})),c=()=>new Be({loggerProvider:e.loggerProvider,maxInterval:n,minInterval:r}),u="idb"===a?yield s(void 0,void 0,void 0,(function*(){const s=yield Fe.new(o,{loggerProvider:e.loggerProvider,minInterval:r,maxInterval:n,apiKey:e.apiKey},t);return e.loggerProvider.log("Failed to initialize idb store, falling back to memory store."),null!=s?s:c()})):c(),h=({events:t,sessionId:r,deviceId:n,sequenceId:i})=>{e.debugMode&&H().then((({totalStorageSize:t,percentOfQuota:r,usageDetails:s})=>{e.loggerProvider.debug(`Total storage size: ${t} KB, percentage of quota: ${r}%, usage details: ${s}`)})).catch((()=>{})),l.sendEventsList({events:t,sessionId:r,flushMaxRetries:e.flushMaxRetries,apiKey:e.apiKey,deviceId:n,sampleRate:e.sampleRate,serverZone:e.serverZone,version:e.version,type:o,onComplete:()=>s(void 0,void 0,void 0,(function*(){yield u.cleanUpSessionEventsStore(r,i)}))})};return{sendCurrentSequenceEvents:({sessionId:t,deviceId:r})=>{u.storeCurrentSequence(t).then((e=>{e&&h({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:r})})).catch((t=>{e.loggerProvider.warn("Failed to get current sequence of session replay events for session:",t)}))},addEvent:({event:t,sessionId:r,deviceId:s})=>{u.addEventToCurrentSequence(r,t.data).then((e=>e&&h({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:s}))).catch((t=>{e.loggerProvider.warn("Failed to add event to session replay capture:",t)}))},sendStoredEvents:({deviceId:e})=>s(void 0,void 0,void 0,(function*(){const t=yield u.getSequencesToSend();t&&t.forEach((t=>{h({sequenceId:t.sequenceId,events:t.events,sessionId:t.sessionId,deviceId:e})}))})),flush:function(e=!1){return s(this,void 0,void 0,(function*(){return l.flush(e)}))}}}));class je{constructor(...e){const t=new Map;e.forEach((e=>{t.set(e.name,e.manager)})),this.managers=t}sendStoredEvents(e){return s(this,void 0,void 0,(function*(){const t=[];this.managers.forEach((r=>{t.push(r.sendStoredEvents(e))})),yield Promise.all(t)}))}addEvent({sessionId:e,event:t,deviceId:r}){var s;null===(s=this.managers.get(t.type))||void 0===s||s.addEvent({sessionId:e,event:t,deviceId:r})}sendCurrentSequenceEvents({sessionId:e,deviceId:t}){this.managers.forEach((r=>{r.sendCurrentSequenceEvents({sessionId:e,deviceId:t})}))}flush(e){return s(this,void 0,void 0,(function*(){const t=[];this.managers.forEach((r=>{t.push(r.flush(e))})),yield Promise.all(t)}))}}const Ue={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ze={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},We={};function Ve(e){if(We[e])return We[e];const t=globalThis[e],r=t.prototype,s=e in Ue?Ue[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 ze?ze[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 We[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?We[e]=o:r}catch{return r}}const Ge={};function Ze(e,t,r){var s;const n=`${e}.${String(r)}`;if(Ge[n])return Ge[n].call(t);const o=Ve(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(Ge[n]=i,i.call(t)):t[r]}const Ye={};function $e(e,t,r){const s=`${e}.${String(r)}`;if(Ye[s])return Ye[s].bind(t);const n=Ve(e)[r];return"function"!=typeof n?t[r]:(Ye[s]=n,n.bind(t))}const Je={childNodes:function(e){return Ze("Node",e,"childNodes")},parentNode:function(e){return Ze("Node",e,"parentNode")},parentElement:function(e){return Ze("Node",e,"parentElement")},textContent:function(e){return Ze("Node",e,"textContent")},contains:function(e,t){return $e("Node",e,"contains")(t)},getRootNode:function(e){return $e("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Ze("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Ze("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Ze("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Ze("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Ve("MutationObserver").constructor}};function qe(){const e=c();return(null==e?void 0:e.innerHeight)||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight||0}function Ke(){const e=c();return(null==e?void 0:e.innerWidth)||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth||0}let Xe,He,Qe;function et(e,t){if(Qe=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";const r={root:document.body,idName:e=>!0,className:e=>!0,tagName:e=>!0,attr:(e,t)=>!1,seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};Xe=Object.assign(Object.assign({},r),t),He=function(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return e;if(e===t.root)return e.ownerDocument;return e}(Xe.root,r);let s=tt(e,"all",(()=>tt(e,"two",(()=>tt(e,"one",(()=>tt(e,"none")))))));if(s){const t=gt(yt(s,e));return t.length>0&&(s=t[0]),st(s)}throw new Error("Selector was not found.")}function tt(e,t,r){let s=null,n=[],o=e,i=0;for(;o;){const e=(new Date).getTime()-Qe.getTime();if(void 0!==Xe.timeoutMs&&e>Xe.timeoutMs)throw new Error(`Timeout: Can't find a unique selector after ${e}ms`);let a=pt(it(o))||pt(...at(o))||pt(...lt(o))||pt(ct(o))||[{name:"*",penalty:3}];const l=ut(o);if("all"==t)l&&(a=a.concat(a.filter(dt).map((e=>ht(e,l)))));else if("two"==t)a=a.slice(0,1),l&&(a=a.concat(a.filter(dt).map((e=>ht(e,l)))));else if("one"==t){const[e]=a=a.slice(0,1);l&&dt(e)&&(a=[ht(e,l)])}else"none"==t&&(a=[{name:"*",penalty:3}],l&&(a=[ht(a[0],l)]));for(let e of a)e.level=i;if(n.push(a),n.length>=Xe.seedMinLength&&(s=rt(n,r),s))break;o=o.parentElement,i++}return s||(s=rt(n,r)),!s&&r?r():s}function rt(e,t){const r=gt(mt(e));if(r.length>Xe.threshold)return t?t():null;for(let e of r)if(ot(e))return e;return null}function st(e){let t=e[0],r=t.name;for(let s=1;s<e.length;s++){const n=e[s].level||0;r=t.level===n-1?`${e[s].name} > ${r}`:`${e[s].name} ${r}`,t=e[s]}return r}function nt(e){return e.map((e=>e.penalty)).reduce(((e,t)=>e+t),0)}function ot(e){const t=st(e);switch(He.querySelectorAll(t).length){case 0:throw new Error(`Can't select any node with this selector: ${t}`);case 1:return!0;default:return!1}}function it(e){const t=e.getAttribute("id");return t&&Xe.idName(t)?{name:"#"+CSS.escape(t),penalty:0}:null}function at(e){const t=Array.from(e.attributes).filter((e=>Xe.attr(e.name,e.value)));return t.map((e=>({name:`[${CSS.escape(e.name)}="${CSS.escape(e.value)}"]`,penalty:.5})))}function lt(e){return Array.from(e.classList).filter(Xe.className).map((e=>({name:"."+CSS.escape(e),penalty:1})))}function ct(e){const t=e.tagName.toLowerCase();return Xe.tagName(t)?{name:t,penalty:2}:null}function ut(e){const t=e.parentNode;if(!t)return null;let r=t.firstChild;if(!r)return null;let s=0;for(;r&&(r.nodeType===Node.ELEMENT_NODE&&s++,r!==e);)r=r.nextSibling;return s}function ht(e,t){return{name:e.name+`:nth-child(${t})`,penalty:e.penalty+1}}function dt(e){return"html"!==e.name&&!e.name.startsWith("#")}function pt(...e){const t=e.filter(ft);return t.length>0?t:null}function ft(e){return null!=e}function*mt(e,t=[]){if(e.length>0)for(let r of e[0])yield*mt(e.slice(1,e.length),t.concat(r));else yield t}function gt(e){return[...e].sort(((e,t)=>nt(e)-nt(t)))}function*yt(e,t,r={counter:0,visited:new Map}){if(e.length>2&&e.length>Xe.optimizedMinLength)for(let s=1;s<e.length-1;s++){if(r.counter>Xe.maxNumberOfTries)return;r.counter+=1;const n=[...e];n.splice(s,1);const o=st(n);if(r.visited.has(o))return;ot(n)&&vt(n,t)&&(yield n,r.visited.set(o,!0),yield*yt(n,t,r))}}function vt(e,t){return He.querySelector(st(e))===t}const wt=({version:e,events:t})=>{const r=[];return t.forEach((e=>{const t=JSON.parse(e);t.count=1,"click"===t.type&&r.push(t)})),{version:e,events:r}},bt=({version:e,events:t})=>{const r=[];t.forEach((e=>{const t=JSON.parse(e);"click"===t.type&&r.push(t)}));const s=r.reduce(((e,t)=>{const{x:r,y:s,selector:n,timestamp:o}=t,i=o-o%36e5,a=`${r}:${s}:${null!=n?n:""}:${i}`;return e[a]?e[a].count+=1:e[a]=Object.assign(Object.assign({},t),{timestamp:i,count:1}),e}),{});return{version:e,events:Object.values(s)}},St=(e,{eventsManager:t,sessionId:r,deviceIdFn:s,mirror:n,ugcFilterRules:o})=>i=>{if(i.type!==T.Click)return;const a=c();if(!a)return;const{location:l,innerHeight:u,innerWidth:h}=a;if(!l)return;const{x:d,y:p}=i;if(void 0===d||void 0===p)return;const f=n.getNode(i.id);let m;if(f)try{m=et(f)}catch(t){e.debug("error resolving selector from finder")}const{left:g,top:y}=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=Je.parentElement(o.body))||void 0===t?void 0:t.scrollLeft)||(null===(r=null==o?void 0:o.body)||void 0===r?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=Je.parentElement(o.body))||void 0===s?void 0:s.scrollTop)||(null===(n=null==o?void 0:o.body)||void 0===n?void 0:n.scrollTop)||0}}(a),v={x:d+g,y:p+y,selector:m,viewportHeight:u,viewportWidth:h,pageUrl:X(l.href,o),timestamp:Date.now(),type:"click"},w=s();w&&t.addEvent({sessionId:r,event:{type:"interaction",data:JSON.stringify(v)},deviceId:w})};class Ct{constructor(e,t){const r=c();r&&r.navigator&&"function"==typeof r.navigator.sendBeacon?this.sendBeacon=(e,t)=>{try{if(r.navigator.sendBeacon(e,JSON.stringify(t)))return!0}catch(e){}return!1}:this.sendBeacon=()=>!1,this.sendXhr=(e,t)=>{const r=new XMLHttpRequest;return r.open("POST",e,!0),r.setRequestHeader("Accept","*/*"),r.send(JSON.stringify(t)),!0},this.basePageUrl=q(t.serverZone,t.trackServerUrl),this.apiKey=t.apiKey,this.context=e}send(e,t){const{sessionId:r,type:s}=this.context,n=new URLSearchParams({device_id:e,session_id:String(r),type:String(s),api_key:this.apiKey}),o=`${this.basePageUrl}?${n.toString()}`;this.sendBeacon(o,t)||this.sendXhr(o,t)}}class It{static default(e,t){return new It(new Ct(e,t),t)}constructor(e,t){this.timestamp=Date.now(),this.hook=e=>{this.update(e)},this.send=e=>t=>{var r,s;const n=e(),o=c();o&&n&&this.transport.send(n,{version:1,events:[{maxScrollX:this._maxScrollX,maxScrollY:this._maxScrollY,maxScrollWidth:this._maxScrollWidth,maxScrollHeight:this._maxScrollHeight,viewportHeight:qe(),viewportWidth:Ke(),pageUrl:X(o.location.href,null!==(s=null===(r=this.config.interactionConfig)||void 0===r?void 0:r.ugcFilterRules)&&void 0!==s?s:[]),timestamp:this.timestamp,type:"scroll"}]})},this._maxScrollX=0,this._maxScrollY=0,this._maxScrollWidth=Ke(),this._maxScrollHeight=qe(),this.config=t,this.transport=e}get maxScrollX(){return this._maxScrollX}get maxScrollY(){return this._maxScrollY}get maxScrollWidth(){return this._maxScrollWidth}get maxScrollHeight(){return this._maxScrollHeight}update(e){const t=Date.now();if(e.x>this._maxScrollX){const r=Ke();this._maxScrollX=e.x;const s=e.x+r;s>this._maxScrollWidth&&(this._maxScrollWidth=s),this.timestamp=t}if(e.y>this._maxScrollY){const r=qe();this._maxScrollY=e.y;const s=e.y+r;s>this._maxScrollHeight&&(this._maxScrollHeight=s),this.timestamp=t}}}class xt{constructor({sessionId:e,deviceId:t}){this.deviceId=t,this.sessionId=e,e&&t&&(this.sessionReplayId=((e,t)=>`${t}/${e}`)(e,t))}}var kt=Uint8Array,Ot=Uint16Array,Et=Uint32Array,At=new kt([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]),Mt=new kt([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]),Rt=new kt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Nt=function(e,t){for(var r=new Ot(31),s=0;s<31;++s)r[s]=t+=1<<e[s-1];var n=new Et(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]},Pt=Nt(At,2),Tt=Pt[0],Lt=Pt[1];Tt[28]=258,Lt[258]=28;for(var Dt=Nt(Mt,0)[1],Ft=new Ot(32768),Bt=0;Bt<32768;++Bt){var _t=(43690&Bt)>>>1|(21845&Bt)<<1;_t=(61680&(_t=(52428&_t)>>>2|(13107&_t)<<2))>>>4|(3855&_t)<<4,Ft[Bt]=((65280&_t)>>>8|(255&_t)<<8)>>>1}var jt=function(e,t,r){for(var s=e.length,n=0,o=new Ot(t);n<s;++n)++o[e[n]-1];var i,a=new Ot(t);for(n=0;n<t;++n)a[n]=a[n-1]+o[n-1]<<1;if(r){i=new Ot(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,d=h|(1<<u)-1;h<=d;++h)i[Ft[h]>>>l]=c}else for(i=new Ot(s),n=0;n<s;++n)i[n]=Ft[a[e[n]-1]++]>>>15-e[n];return i},Ut=new kt(288);for(Bt=0;Bt<144;++Bt)Ut[Bt]=8;for(Bt=144;Bt<256;++Bt)Ut[Bt]=9;for(Bt=256;Bt<280;++Bt)Ut[Bt]=7;for(Bt=280;Bt<288;++Bt)Ut[Bt]=8;var zt=new kt(32);for(Bt=0;Bt<32;++Bt)zt[Bt]=5;var Wt=jt(Ut,9,0),Vt=jt(zt,5,0),Gt=function(e){return(e/8|0)+(7&e&&1)},Zt=function(e,t,r){(null==r||r>e.length)&&(r=e.length);var s=new(e instanceof Ot?Ot:e instanceof Et?Et:kt)(r-t);return s.set(e.subarray(t,r)),s},Yt=function(e,t,r){r<<=7&t;var s=t/8|0;e[s]|=r,e[s+1]|=r>>>8},$t=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},Jt=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 kt(0),0];if(1==n){var i=new kt(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 d=o[0].s;for(s=1;s<n;++s)o[s].s>d&&(d=o[s].s);var p=new Ot(d+1),f=qt(r[u-1],p,0);if(f>t){s=0;var m=0,g=f-t,y=1<<g;for(o.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));s<n;++s){var v=o[s].s;if(!(p[v]>t))break;m+=y-(1<<f-p[v]),p[v]=t}for(m>>>=g;m>0;){var w=o[s].s;p[w]<t?m-=1<<t-p[w]++-1:++s}for(;s>=0&&m;--s){var b=o[s].s;p[b]==t&&(--p[b],++m)}f=t}return[new kt(p),f]},qt=function(e,t,r){return-1==e.s?Math.max(qt(e.l,t,r+1),qt(e.r,t,r+1)):t[e.s]=r},Kt=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Ot(++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]},Xt=function(e,t){for(var r=0,s=0;s<t.length;++s)r+=e[s]*t[s];return r},Ht=function(e,t,r){var s=r.length,n=Gt(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)},Qt=function(e,t,r,s,n,o,i,a,l,c,u){Yt(t,u++,r),++n[256];for(var h=Jt(n,15),d=h[0],p=h[1],f=Jt(o,15),m=f[0],g=f[1],y=Kt(d),v=y[0],w=y[1],b=Kt(m),S=b[0],C=b[1],I=new Ot(19),x=0;x<v.length;++x)I[31&v[x]]++;for(x=0;x<S.length;++x)I[31&S[x]]++;for(var k=Jt(I,7),O=k[0],E=k[1],A=19;A>4&&!O[Rt[A-1]];--A);var M,R,N,P,T=c+5<<3,L=Xt(n,Ut)+Xt(o,zt)+i,D=Xt(n,d)+Xt(o,m)+i+14+3*A+Xt(I,O)+(2*I[16]+3*I[17]+7*I[18]);if(T<=L&&T<=D)return Ht(t,u,e.subarray(l,l+c));if(Yt(t,u,1+(D<L)),u+=2,D<L){M=jt(d,p,0),R=d,N=jt(m,g,0),P=m;var F=jt(O,E,0);Yt(t,u,w-257),Yt(t,u+5,C-1),Yt(t,u+10,A-4),u+=14;for(x=0;x<A;++x)Yt(t,u+3*x,O[Rt[x]]);u+=3*A;for(var B=[v,S],_=0;_<2;++_){var j=B[_];for(x=0;x<j.length;++x){var U=31&j[x];Yt(t,u,F[U]),u+=O[U],U>15&&(Yt(t,u,j[x]>>>5&127),u+=j[x]>>>12)}}}else M=Wt,R=Ut,N=Vt,P=zt;for(x=0;x<a;++x)if(s[x]>255){U=s[x]>>>18&31;$t(t,u,M[U+257]),u+=R[U+257],U>7&&(Yt(t,u,s[x]>>>23&31),u+=At[U]);var z=31&s[x];$t(t,u,N[z]),u+=P[z],z>3&&($t(t,u,s[x]>>>5&8191),u+=Mt[z])}else $t(t,u,M[s[x]]),u+=R[s[x]];return $t(t,u,M[256]),u+R[256]},er=new Et([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),tr=function(e,t,r,s,n){return function(e,t,r,s,n,o){var i=e.length,a=new kt(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=Ht(l,c,e.subarray(u,h)):(l[u]=o,c=Ht(l,c,e.subarray(u,i)))}else{for(var d=er[t-1],p=d>>>13,f=8191&d,m=(1<<r)-1,g=new Ot(32768),y=new Ot(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 Et(25e3),C=new Ot(288),I=new Ot(32),x=0,k=0,O=(u=0,0),E=0,A=0;u<i;++u){var M=b(u),R=32767&u,N=y[M];if(g[R]=N,y[M]=R,E<=u){var P=i-u;if((x>7e3||O>24576)&&P>423){c=Qt(e,l,0,S,C,I,k,O,A,u-A,c),O=x=k=0,A=u;for(var T=0;T<286;++T)C[T]=0;for(T=0;T<30;++T)I[T]=0}var L=2,D=0,F=f,B=R-N&32767;if(P>2&&M==b(u-B))for(var _=Math.min(p,P)-1,j=Math.min(32767,u),U=Math.min(258,P);B<=j&&--F&&R!=N;){if(e[u+L]==e[u+L-B]){for(var z=0;z<U&&e[u+z]==e[u+z-B];++z);if(z>L){if(L=z,D=B,z>_)break;var W=Math.min(B,z-2),V=0;for(T=0;T<W;++T){var G=u-B+T+32768&32767,Z=G-g[G]+32768&32767;Z>V&&(V=Z,N=G)}}}B+=(R=N)-(N=g[R])+32768&32767}if(D){S[O++]=268435456|Lt[L]<<18|Dt[D];var Y=31&Lt[L],$=31&Dt[D];k+=At[Y]+Mt[$],++C[257+Y],++I[$],E=u+L,++x}else S[O++]=e[u],++C[e[u]]}}c=Qt(e,l,o,S,C,I,k,O,A,u-A,c)}return Zt(a,0,s+Gt(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 rr(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=tr(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 sr=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}(rr(function(e,t){var r=e.length;if(!t&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var s=new kt(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 kt(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 Zt(s,0,n)}(JSON.stringify(t))),!0)};class nr{constructor(e,t,r,s){var n,o,i;this.taskQueue=[],this.isProcessing=!1,this.compressEvent=e=>{const t=sr(e);return JSON.stringify(t)},this.addCompressedEventToManager=(e,t)=>{this.eventsManager&&this.deviceId&&this.eventsManager.addEvent({event:{type:"replay",data:e},sessionId:t,deviceId:this.deviceId})},this.addCompressedEvent=(e,t)=>{if(this.worker)this.worker.postMessage({event:e,sessionId:t});else{const r=this.compressEvent(e);this.addCompressedEventToManager(r,t)}},this.terminate=()=>{var e;null===(e=this.worker)||void 0===e||e.terminate()};const a=c();this.canUseIdleCallback=a&&"requestIdleCallback"in a,this.eventsManager=e,this.config=t,this.deviceId=r,this.timeout=(null===(n=t.performanceConfig)||void 0===n?void 0:n.timeout)||2e3;const l=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]),o=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]),a=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),o=0;o<31;++o)t[o]=n+=1<<r[o-1];var a=new f(t[30]);for(o=1;o<30;++o)for(var i=t[o];i<t[o+1];++i)a[i]=i-t[o]<<5|o;return[t,a]},v=i(t,2),u=v[0],s=v[1];u[28]=258,s[258]=28;for(var l=i(o,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,o=0,a=new e(n);o<t;++o)++a[r[o]-1];var i,v=new e(n);for(o=0;o<n;++o)v[o]=v[o-1]+a[o-1]<<1;if(f){i=new e(1<<n);var u=15-n;for(o=0;o<t;++o)if(r[o])for(var s=o<<4|r[o],l=n-r[o],h=v[r[o]-1]++<<l,g=h|(1<<l)-1;h<=g;++h)i[c[h]>>>u]=s}else for(i=new e(t),o=0;o<t;++o)i[o]=c[v[r[o]-1]++]>>>15-r[o];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,o){(null==o||o>r.length)&&(o=r.length);var a=new(r instanceof e?e:r instanceof f?f:n)(o-t);return a.set(r.subarray(t,o)),a},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=[],o=0;o<r.length;++o)r[o]&&t.push({s:o,f:r[o]});var a=t.length,i=t.slice();if(!a)return[new n(0),0];if(1==a){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!=a-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(o=1;o<a;++o)i[o].s>g&&(g=i[o].s);var w=new e(g+1),d=A(t[c-1],w,0);if(d>f){o=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}));o<a;++o){var b=i[o].s;if(!(w[b]>f))break;m+=y-(1<<d-w[b]),w[b]=f}for(m>>>=M;m>0;){var p=i[o].s;w[p]<f?m-=1<<f-w[p]++-1:++o}for(;o>=0&&m;--o){var C=i[o].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,o=r[0],a=1,i=function(r){f[t++]=r},v=1;v<=n;++v)if(r[v]==o&&v!=n)++a;else{if(!o&&a>2){for(;a>138;a-=138)i(32754);a>2&&(i(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(i(o),--a;a>6;a-=6)i(8304);a>2&&(i(a-3<<5|8208),a=0)}for(;a--;)i(o);a=1,o=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 o=0;o<f;++o)r[t+o+4]=e[o];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[a[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[a[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+=o[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,a,i,v,u){return function(r,a,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(!a||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[a-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],or=31&l[Q];j+=t[tr]+o[or],++N[257+tr],++W[or],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==a.level?6:a.level,null==a.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(r.length)))):12+a.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,o=e.length,a=0;a!=o;){for(var i=Math.min(a+5552,o);a<i;++a)t+=f+=e[a];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,o,a=D(r,n,2,4);return f=a,t=n.level,o=0==t?0:t<6?1:9==t?3:2,f[0]=120,f[1]=o<<6|(o?32-2*o:1),function(r,n,e){for(;e;++n)r[n]=e,e>>>=8}(a,a.length-4,e.d()),a}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)),o=0,a=function(r){t[o++]=r},i=0;i<f;++i){if(o+5>t.length){var v=new n(o+8+(f-i<<1));v.set(t),t=v}var u=r.charCodeAt(i);u<128||e?a(u):u<2048?(a(192|u>>>6),a(128|63&u)):u>55295&&u<57344?(a(240|(u=65536+(1047552&u)|1023&r.charCodeAt(++i))>>>18),a(128|u>>>12&63),a(128|u>>>6&63),a(128|63&u)):(a(224|u>>>12),a(128|u>>>6&63),a(128|63&u))}return p(t,0,o)}(JSON.stringify(e))),!0)};onmessage=r=>{const{event:n,sessionId:e}=r.data,f=JSON.stringify(J(n));postMessage({compressedEvent:f,sessionId:e})};const 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)&&a&&a.Worker&&l){t.loggerProvider.log("[Experimental] Enabling web worker for compression");const e=new Worker(URL.createObjectURL(new Blob([l],{type:"application/javascript"})));e.onerror=e=>{t.loggerProvider.error(e)},e.onmessage=e=>{const{compressedEvent:t,sessionId:r}=e.data;this.addCompressedEventToManager(t,r)},this.worker=e}}scheduleIdleProcessing(){this.isProcessing||(this.isProcessing=!0,requestIdleCallback((e=>{this.processQueue(e)}),{timeout:this.timeout}))}enqueueEvent(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))}processQueue(e){for(;this.taskQueue.length>0&&(e.timeRemaining()>0||e.didTimeout);){const e=this.taskQueue.shift();if(e){const{event:t,sessionId:r}=e;this.addCompressedEvent(t,r)}}this.taskQueue.length>0?requestIdleCallback((e=>{this.processQueue(e)}),{timeout:this.timeout}):this.isProcessing=!1}}var or,ir=Object.defineProperty,ar=(e,t,r)=>((e,t,r)=>t in e?ir(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),lr=Object.defineProperty,cr=(e,t,r)=>((e,t,r)=>t in e?lr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),ur=Object.defineProperty,hr=(e,t,r)=>((e,t,r)=>t in e?ur(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);const dr={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},pr={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},fr={};function mr(e){if(fr[e])return fr[e];const t=globalThis[e],r=t.prototype,s=e in dr?dr[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 pr?pr[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 fr[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?fr[e]=o:r}catch{return r}}const gr={};function yr(e,t,r){var s;const n=`${e}.${String(r)}`;if(gr[n])return gr[n].call(t);const o=mr(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(gr[n]=i,i.call(t)):t[r]}const vr={};function wr(e,t,r){const s=`${e}.${String(r)}`;if(vr[s])return vr[s].bind(t);const n=mr(e)[r];return"function"!=typeof n?t[r]:(vr[s]=n,n.bind(t))}const br={childNodes:function(e){return yr("Node",e,"childNodes")},parentNode:function(e){return yr("Node",e,"parentNode")},parentElement:function(e){return yr("Node",e,"parentElement")},textContent:function(e){return yr("Node",e,"textContent")},contains:function(e,t){return wr("Node",e,"contains")(t)},getRootNode:function(e){return wr("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?yr("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?yr("Element",e,"shadowRoot"):null},querySelector:function(e,t){return yr("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return yr("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return mr("MutationObserver").constructor}};class Sr{constructor(){hr(this,"idNodeMap",new Map),hr(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 Cr(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&Cr(br.parentNode(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&Cr(br.parentNode(e),t,r)}function Ir(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function xr(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 kr={exports:{}},Or=String,Er=function(){return{isColorSupported:!1,reset:Or,bold:Or,dim:Or,italic:Or,underline:Or,inverse:Or,hidden:Or,strikethrough:Or,black:Or,red:Or,green:Or,yellow:Or,blue:Or,magenta:Or,cyan:Or,white:Or,gray:Or,bgBlack:Or,bgRed:Or,bgGreen:Or,bgYellow:Or,bgBlue:Or,bgMagenta:Or,bgCyan:Or,bgWhite:Or}};kr.exports=Er(),kr.exports.createColors=Er;var Ar=kr.exports;const Mr=xr(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Rr=Ar,Nr=Mr,Pr=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=Rr.isColorSupported),Nr&&e&&(t=Nr(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}=Rr.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 Tr=Pr;Pr.default=Pr;var Lr={};Lr.isClean=Symbol("isClean"),Lr.my=Symbol("my");const Dr={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Fr=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 Dr[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=Dr[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 Br=Fr;Fr.default=Fr;let _r=Br;function jr(e,t){new _r(t).stringify(e)}var Ur=jr;jr.default=jr;let{isClean:zr,my:Wr}=Lr,Vr=Tr,Gr=Br,Zr=Ur;function Yr(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=>Yr(e,r))):("object"===o&&null!==n&&(n=Yr(n)),r[s]=n)}return r}let $r=class{constructor(e={}){this.raws={},this[zr]=!1,this[Wr]=!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=Yr(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 Vr(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[zr]){this[zr]=!1;let e=this;for(;e=e.parent;)e[zr]=!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 Gr).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=Zr){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 Jr=$r;$r.default=$r;let qr=Jr,Kr=class extends qr{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 Xr=Kr;Kr.default=Kr;var Hr={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:Qr,SourceMapGenerator:es}=Mr,{existsSync:ts,readFileSync:rs}=Mr,{dirname:ss,join:ns}=Mr;let os=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=ss(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Qr(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=ss(e),ts(e))return this.mapFile=e,rs(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 Qr)return es.fromSourceMap(t).toString();if(t instanceof es)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=ns(ss(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 is=os;os.default=os;let{SourceMapConsumer:as,SourceMapGenerator:ls}=Mr,{fileURLToPath:cs,pathToFileURL:us}=Mr,{isAbsolute:hs,resolve:ds}=Mr,{nanoid:ps}=Hr,fs=Mr,ms=Tr,gs=is,ys=Symbol("fromOffsetCache"),vs=Boolean(as&&ls),ws=Boolean(ds&&hs),bs=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&&(!ws||/^\w+:\/\//.test(t.from)||hs(t.from)?this.file=t.from:this.file=ds(t.from)),ws&&vs){let e=new gs(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 "+ps(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 ms(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 ms(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&&(us&&(n.input.url=us(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[ys])r=this[ys];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[ys]=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:ds(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=hs(a.source)?us(a.source):new URL(a.source,this.map.consumer().sourceRoot||us(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(!cs)throw new Error("file: protocol is not available in this PostCSS build");l.file=cs(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 Ss=bs;bs.default=bs,fs&&fs.registerInput&&fs.registerInput(bs);let{SourceMapConsumer:Cs,SourceMapGenerator:Is}=Mr,{dirname:xs,relative:ks,resolve:Os,sep:Es}=Mr,{pathToFileURL:As}=Mr,Ms=Ss,Rs=Boolean(Cs&&Is),Ns=Boolean(xs&&Os&&ks&&Es);var Ps=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||xs(e.file);!1===this.mapOpts.sourcesContent?(t=new Cs(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(),Ns&&Rs&&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=Is.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Is({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 Is({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?xs(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=xs(Os(r,this.mapOpts.annotation)));let s=ks(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 Ms(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(As){let t=As(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;"\\"===Es&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Ts=Jr,Ls=class extends Ts{constructor(e){super(e),this.type="comment"}};var Ds=Ls;Ls.default=Ls;let Fs,Bs,_s,js,{isClean:Us,my:zs}=Lr,Ws=Xr,Vs=Ds,Gs=Jr;function Zs(e){return e.map((e=>(e.nodes&&(e.nodes=Zs(e.nodes)),delete e.source,e)))}function Ys(e){if(e[Us]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Ys(t)}let $s=class e extends Gs{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=Zs(Fs(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 Ws(t)]}else if(t.selector)t=[new Bs(t)];else if(t.name)t=[new _s(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Vs(t)]}return t.map((t=>(t[zs]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Us]&&Ys(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]}};$s.registerParse=e=>{Fs=e},$s.registerRule=e=>{Bs=e},$s.registerAtRule=e=>{_s=e},$s.registerRoot=e=>{js=e};var Js=$s;$s.default=$s,$s.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,_s.prototype):"rule"===e.type?Object.setPrototypeOf(e,Bs.prototype):"decl"===e.type?Object.setPrototypeOf(e,Ws.prototype):"comment"===e.type?Object.setPrototypeOf(e,Vs.prototype):"root"===e.type&&Object.setPrototypeOf(e,js.prototype),e[zs]=!0,e.nodes&&e.nodes.forEach((e=>{$s.rebuild(e)}))};let qs,Ks,Xs=Js,Hs=class extends Xs{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new qs(new Ks,this,e).stringify()}};Hs.registerLazyResult=e=>{qs=e},Hs.registerProcessor=e=>{Ks=e};var Qs=Hs;Hs.default=Hs;let en={};var tn=function(e){en[e]||(en[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let rn=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 sn=rn;rn.default=rn;let nn=sn,on=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 nn(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var an=on;on.default=on;const ln="'".charCodeAt(0),cn='"'.charCodeAt(0),un="\\".charCodeAt(0),hn="/".charCodeAt(0),dn="\n".charCodeAt(0),pn=" ".charCodeAt(0),fn="\f".charCodeAt(0),mn="\t".charCodeAt(0),gn="\r".charCodeAt(0),yn="[".charCodeAt(0),vn="]".charCodeAt(0),wn="(".charCodeAt(0),bn=")".charCodeAt(0),Sn="{".charCodeAt(0),Cn="}".charCodeAt(0),In=";".charCodeAt(0),xn="*".charCodeAt(0),kn=":".charCodeAt(0),On="@".charCodeAt(0),En=/[\t\n\f\r "#'()/;[\\\]{}]/g,An=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Mn=/.[\r\n"'(/\\]/,Rn=/[\da-f]/i;let Nn=Js,Pn=class extends Nn{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 Tn=Pn;Pn.default=Pn,Nn.registerAtRule(Pn);let Ln,Dn,Fn=Js,Bn=class extends Fn{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 Ln(new Dn,this,e).stringify()}};Bn.registerLazyResult=e=>{Ln=e},Bn.registerProcessor=e=>{Dn=e};var _n=Bn;Bn.default=Bn,Fn.registerRoot(Bn);let jn={comma:e=>jn.split(e,[","],!0),space:e=>jn.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 Un=jn;jn.default=jn;let zn=Js,Wn=Un,Vn=class extends zn{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Wn.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 Gn=Vn;Vn.default=Vn,zn.registerRule(Vn);let Zn=Xr,Yn=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,d=e.css.valueOf(),p=t.ignoreErrors,f=d.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=d.charCodeAt(m),r){case dn:case pn:case mn:case gn:case fn:s=m;do{s+=1,r=d.charCodeAt(s)}while(r===pn||r===dn||r===mn||r===gn||r===fn);h=["space",d.slice(m,s)],m=s-1;break;case yn:case vn:case Sn:case Cn:case kn:case In:case bn:{let e=String.fromCharCode(r);h=[e,e,m];break}case wn:if(c=g.length?g.pop()[1]:"",u=d.charCodeAt(m+1),"url"===c&&u!==ln&&u!==cn&&u!==pn&&u!==dn&&u!==mn&&u!==fn&&u!==gn){s=m;do{if(a=!1,s=d.indexOf(")",s+1),-1===s){if(p||t){s=m;break}v("bracket")}for(l=s;d.charCodeAt(l-1)===un;)l-=1,a=!a}while(a);h=["brackets",d.slice(m,s+1),m,s],m=s}else s=d.indexOf(")",m+1),o=d.slice(m,s+1),-1===s||Mn.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case ln:case cn:n=r===ln?"'":'"',s=m;do{if(a=!1,s=d.indexOf(n,s+1),-1===s){if(p||t){s=m+1;break}v("string")}for(l=s;d.charCodeAt(l-1)===un;)l-=1,a=!a}while(a);h=["string",d.slice(m,s+1),m,s],m=s;break;case On:En.lastIndex=m+1,En.test(d),s=0===En.lastIndex?d.length-1:En.lastIndex-2,h=["at-word",d.slice(m,s+1),m,s],m=s;break;case un:for(s=m,i=!0;d.charCodeAt(s+1)===un;)s+=1,i=!i;if(r=d.charCodeAt(s+1),i&&r!==hn&&r!==pn&&r!==dn&&r!==mn&&r!==gn&&r!==fn&&(s+=1,Rn.test(d.charAt(s)))){for(;Rn.test(d.charAt(s+1));)s+=1;d.charCodeAt(s+1)===pn&&(s+=1)}h=["word",d.slice(m,s+1),m,s],m=s;break;default:r===hn&&d.charCodeAt(m+1)===xn?(s=d.indexOf("*/",m+2)+1,0===s&&(p||t?s=d.length:v("comment")),h=["comment",d.slice(m,s+1),m,s],m=s):(An.lastIndex=m+1,An.test(d),s=0===An.lastIndex?d.length-1:An.lastIndex-2,h=["word",d.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},$n=Ds,Jn=Tn,qn=_n,Kn=Gn;const Xn={empty:!0,space:!0};var Hn=class{constructor(e){this.input=e,this.root=new qn,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 Jn;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 $n;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=Yn(this.input)}decl(e,t){let r=new Zn;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 Kn;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",Xn[a]||Xn[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 Kn;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 Qn=Js,eo=Hn,to=Ss;function ro(e,t){let r=new to(e,t),s=new eo(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 so=ro;ro.default=ro,Qn.registerParse(ro);let{isClean:no,my:oo}=Lr,io=Ps,ao=Ur,lo=Js,co=Qs,uo=tn,ho=an,po=so,fo=_n;const mo={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},go={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},yo={Once:!0,postcssPlugin:!0,prepare:!0};function vo(e){return"object"==typeof e&&"function"==typeof e.then}function wo(e){let t=!1,r=mo[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 bo(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:wo(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function So(e){return e[no]=!1,e.nodes&&e.nodes.forEach((e=>So(e))),e}let Co={},Io=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 ho)n=So(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=po;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[oo]&&lo.rebuild(n)}else n=So(r);this.result=new ho(t,n,s),this.helpers={...Co,postcss:Co,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(!go[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!yo[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(vo(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[no];){e[no]=!0;let t=[bo(e)];for(;t.length>0;){let e=this.visitTick(t);if(vo(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 vo(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=ao;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new io(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(vo(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[no];)e[no]=!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||uo("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(vo(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[no])return s[no]=!0,void e.push(bo(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[no]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[no]=!0;let t=wo(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[no]||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"}};Io.registerPostcss=e=>{Co=e};var xo=Io;Io.default=Io,fo.registerLazyResult(Io),co.registerLazyResult(Io);let ko=Ps,Oo=Ur,Eo=tn,Ao=so;const Mo=an;let Ro=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=Oo;this.result=new Mo(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new ko(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||Eo("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=Ao;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 No=Ro;Ro.default=Ro;let Po=No,To=xo,Lo=Qs,Do=_n,Fo=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 To(this,e,t):new Po(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Bo=Fo;Fo.default=Fo,Do.registerProcessor(Fo),Lo.registerProcessor(Fo);let _o=Xr,jo=is,Uo=Ds,zo=Tn,Wo=Ss,Vo=_n,Go=Gn;function Zo(e,t){if(Array.isArray(e))return e.map((e=>Zo(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Wo.prototype};r.map&&(r.map={...r.map,__proto__:jo.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>Zo(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 Vo(s);if("decl"===s.type)return new _o(s);if("rule"===s.type)return new Go(s);if("comment"===s.type)return new Uo(s);if("atrule"===s.type)return new zo(s);throw new Error("Unknown node type: "+e.type)}var Yo=Zo;Zo.default=Zo;let $o=Tr,Jo=Xr,qo=xo,Ko=Js,Xo=Bo,Ho=Ur,Qo=Yo,ei=Qs,ti=sn,ri=Ds,si=Tn,ni=an,oi=Ss,ii=so,ai=Un,li=Gn,ci=_n,ui=Jr;function hi(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Xo(e)}hi.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 Xo).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return hi([n(r)]).process(e,t)},n},hi.stringify=Ho,hi.parse=ii,hi.fromJSON=Qo,hi.list=ai,hi.comment=e=>new ri(e),hi.atRule=e=>new si(e),hi.decl=e=>new Jo(e),hi.rule=e=>new li(e),hi.root=e=>new ci(e),hi.document=e=>new ei(e),hi.CssSyntaxError=$o,hi.Declaration=Jo,hi.Container=Ko,hi.Processor=Xo,hi.Document=ei,hi.Comment=ri,hi.Warning=ti,hi.AtRule=si,hi.Result=ni,hi.Input=oi,hi.Rule=li,hi.Root=ci,hi.Node=ui,qo.registerPostcss(hi);var di=hi;hi.default=hi;const pi=Ir(di);pi.stringify,pi.fromJSON,pi.plugin,pi.parse,pi.list,pi.document,pi.comment,pi.atRule,pi.rule,pi.decl,pi.root,pi.CssSyntaxError,pi.Declaration,pi.Container,pi.Processor,pi.Document,pi.Comment,pi.Warning,pi.AtRule,pi.Result,pi.Input,pi.Rule,pi.Root,pi.Node;var fi=Object.defineProperty,mi=(e,t,r)=>((e,t,r)=>t in e?fi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function gi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function yi(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 vi={exports:{}},wi=String,bi=function(){return{isColorSupported:!1,reset:wi,bold:wi,dim:wi,italic:wi,underline:wi,inverse:wi,hidden:wi,strikethrough:wi,black:wi,red:wi,green:wi,yellow:wi,blue:wi,magenta:wi,cyan:wi,white:wi,gray:wi,bgBlack:wi,bgRed:wi,bgGreen:wi,bgYellow:wi,bgBlue:wi,bgMagenta:wi,bgCyan:wi,bgWhite:wi}};vi.exports=bi(),vi.exports.createColors=bi;var Si=vi.exports;const Ci=yi(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Ii=Si,xi=Ci,ki=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=Ii.isColorSupported),xi&&e&&(t=xi(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}=Ii.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 Oi=ki;ki.default=ki;var Ei={};Ei.isClean=Symbol("isClean"),Ei.my=Symbol("my");const Ai={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Mi=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 Ai[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=Ai[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 Ri=Mi;Mi.default=Mi;let Ni=Ri;function Pi(e,t){new Ni(t).stringify(e)}var Ti=Pi;Pi.default=Pi;let{isClean:Li,my:Di}=Ei,Fi=Oi,Bi=Ri,_i=Ti;function ji(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=>ji(e,r))):("object"===o&&null!==n&&(n=ji(n)),r[s]=n)}return r}let Ui=class{constructor(e={}){this.raws={},this[Li]=!1,this[Di]=!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=ji(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 Fi(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[Li]){this[Li]=!1;let e=this;for(;e=e.parent;)e[Li]=!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 Bi).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=_i){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 zi=Ui;Ui.default=Ui;let Wi=zi,Vi=class extends Wi{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 Gi=Vi;Vi.default=Vi;var Zi={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:Yi,SourceMapGenerator:$i}=Ci,{existsSync:Ji,readFileSync:qi}=Ci,{dirname:Ki,join:Xi}=Ci;let Hi=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=Ki(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Yi(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=Ki(e),Ji(e))return this.mapFile=e,qi(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 Yi)return $i.fromSourceMap(t).toString();if(t instanceof $i)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=Xi(Ki(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 Qi=Hi;Hi.default=Hi;let{SourceMapConsumer:ea,SourceMapGenerator:ta}=Ci,{fileURLToPath:ra,pathToFileURL:sa}=Ci,{isAbsolute:na,resolve:oa}=Ci,{nanoid:ia}=Zi,aa=Ci,la=Oi,ca=Qi,ua=Symbol("fromOffsetCache"),ha=Boolean(ea&&ta),da=Boolean(oa&&na),pa=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&&(!da||/^\w+:\/\//.test(t.from)||na(t.from)?this.file=t.from:this.file=oa(t.from)),da&&ha){let e=new ca(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 "+ia(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 la(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 la(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&&(sa&&(n.input.url=sa(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[ua])r=this[ua];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[ua]=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:oa(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=na(a.source)?sa(a.source):new URL(a.source,this.map.consumer().sourceRoot||sa(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(!ra)throw new Error("file: protocol is not available in this PostCSS build");l.file=ra(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 fa=pa;pa.default=pa,aa&&aa.registerInput&&aa.registerInput(pa);let{SourceMapConsumer:ma,SourceMapGenerator:ga}=Ci,{dirname:ya,relative:va,resolve:wa,sep:ba}=Ci,{pathToFileURL:Sa}=Ci,Ca=fa,Ia=Boolean(ma&&ga),xa=Boolean(ya&&wa&&va&&ba);var ka=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||ya(e.file);!1===this.mapOpts.sourcesContent?(t=new ma(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(),xa&&Ia&&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=ga.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new ga({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 ga({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?ya(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=ya(wa(r,this.mapOpts.annotation)));let s=va(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 Ca(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(Sa){let t=Sa(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;"\\"===ba&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Oa=zi,Ea=class extends Oa{constructor(e){super(e),this.type="comment"}};var Aa=Ea;Ea.default=Ea;let Ma,Ra,Na,Pa,{isClean:Ta,my:La}=Ei,Da=Gi,Fa=Aa,Ba=zi;function _a(e){return e.map((e=>(e.nodes&&(e.nodes=_a(e.nodes)),delete e.source,e)))}function ja(e){if(e[Ta]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)ja(t)}let Ua=class e extends Ba{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=_a(Ma(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 Da(t)]}else if(t.selector)t=[new Ra(t)];else if(t.name)t=[new Na(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Fa(t)]}return t.map((t=>(t[La]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Ta]&&ja(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]}};Ua.registerParse=e=>{Ma=e},Ua.registerRule=e=>{Ra=e},Ua.registerAtRule=e=>{Na=e},Ua.registerRoot=e=>{Pa=e};var za=Ua;Ua.default=Ua,Ua.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Na.prototype):"rule"===e.type?Object.setPrototypeOf(e,Ra.prototype):"decl"===e.type?Object.setPrototypeOf(e,Da.prototype):"comment"===e.type?Object.setPrototypeOf(e,Fa.prototype):"root"===e.type&&Object.setPrototypeOf(e,Pa.prototype),e[La]=!0,e.nodes&&e.nodes.forEach((e=>{Ua.rebuild(e)}))};let Wa,Va,Ga=za,Za=class extends Ga{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Wa(new Va,this,e).stringify()}};Za.registerLazyResult=e=>{Wa=e},Za.registerProcessor=e=>{Va=e};var Ya=Za;Za.default=Za;let $a={};var Ja=function(e){$a[e]||($a[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let qa=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 Ka=qa;qa.default=qa;let Xa=Ka,Ha=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 Xa(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var Qa=Ha;Ha.default=Ha;const el="'".charCodeAt(0),tl='"'.charCodeAt(0),rl="\\".charCodeAt(0),sl="/".charCodeAt(0),nl="\n".charCodeAt(0),ol=" ".charCodeAt(0),il="\f".charCodeAt(0),al="\t".charCodeAt(0),ll="\r".charCodeAt(0),cl="[".charCodeAt(0),ul="]".charCodeAt(0),hl="(".charCodeAt(0),dl=")".charCodeAt(0),pl="{".charCodeAt(0),fl="}".charCodeAt(0),ml=";".charCodeAt(0),gl="*".charCodeAt(0),yl=":".charCodeAt(0),vl="@".charCodeAt(0),wl=/[\t\n\f\r "#'()/;[\\\]{}]/g,bl=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Sl=/.[\r\n"'(/\\]/,Cl=/[\da-f]/i;let Il=za,xl=class extends Il{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 kl=xl;xl.default=xl,Il.registerAtRule(xl);let Ol,El,Al=za,Ml=class extends Al{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 Ol(new El,this,e).stringify()}};Ml.registerLazyResult=e=>{Ol=e},Ml.registerProcessor=e=>{El=e};var Rl=Ml;Ml.default=Ml,Al.registerRoot(Ml);let Nl={comma:e=>Nl.split(e,[","],!0),space:e=>Nl.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 Pl=Nl;Nl.default=Nl;let Tl=za,Ll=Pl,Dl=class extends Tl{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Ll.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 Fl=Dl;Dl.default=Dl,Tl.registerRule(Dl);let Bl=Gi,_l=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,d=e.css.valueOf(),p=t.ignoreErrors,f=d.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=d.charCodeAt(m),r){case nl:case ol:case al:case ll:case il:s=m;do{s+=1,r=d.charCodeAt(s)}while(r===ol||r===nl||r===al||r===ll||r===il);h=["space",d.slice(m,s)],m=s-1;break;case cl:case ul:case pl:case fl:case yl:case ml:case dl:{let e=String.fromCharCode(r);h=[e,e,m];break}case hl:if(c=g.length?g.pop()[1]:"",u=d.charCodeAt(m+1),"url"===c&&u!==el&&u!==tl&&u!==ol&&u!==nl&&u!==al&&u!==il&&u!==ll){s=m;do{if(a=!1,s=d.indexOf(")",s+1),-1===s){if(p||t){s=m;break}v("bracket")}for(l=s;d.charCodeAt(l-1)===rl;)l-=1,a=!a}while(a);h=["brackets",d.slice(m,s+1),m,s],m=s}else s=d.indexOf(")",m+1),o=d.slice(m,s+1),-1===s||Sl.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case el:case tl:n=r===el?"'":'"',s=m;do{if(a=!1,s=d.indexOf(n,s+1),-1===s){if(p||t){s=m+1;break}v("string")}for(l=s;d.charCodeAt(l-1)===rl;)l-=1,a=!a}while(a);h=["string",d.slice(m,s+1),m,s],m=s;break;case vl:wl.lastIndex=m+1,wl.test(d),s=0===wl.lastIndex?d.length-1:wl.lastIndex-2,h=["at-word",d.slice(m,s+1),m,s],m=s;break;case rl:for(s=m,i=!0;d.charCodeAt(s+1)===rl;)s+=1,i=!i;if(r=d.charCodeAt(s+1),i&&r!==sl&&r!==ol&&r!==nl&&r!==al&&r!==ll&&r!==il&&(s+=1,Cl.test(d.charAt(s)))){for(;Cl.test(d.charAt(s+1));)s+=1;d.charCodeAt(s+1)===ol&&(s+=1)}h=["word",d.slice(m,s+1),m,s],m=s;break;default:r===sl&&d.charCodeAt(m+1)===gl?(s=d.indexOf("*/",m+2)+1,0===s&&(p||t?s=d.length:v("comment")),h=["comment",d.slice(m,s+1),m,s],m=s):(bl.lastIndex=m+1,bl.test(d),s=0===bl.lastIndex?d.length-1:bl.lastIndex-2,h=["word",d.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},jl=Aa,Ul=kl,zl=Rl,Wl=Fl;const Vl={empty:!0,space:!0};var Gl=class{constructor(e){this.input=e,this.root=new zl,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 Ul;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 jl;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=_l(this.input)}decl(e,t){let r=new Bl;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 Wl;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",Vl[a]||Vl[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 Wl;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 Zl=za,Yl=Gl,$l=fa;function Jl(e,t){let r=new $l(e,t),s=new Yl(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 ql=Jl;Jl.default=Jl,Zl.registerParse(Jl);let{isClean:Kl,my:Xl}=Ei,Hl=ka,Ql=Ti,ec=za,tc=Ya,rc=Ja,sc=Qa,nc=ql,oc=Rl;const ic={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ac={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},lc={Once:!0,postcssPlugin:!0,prepare:!0};function cc(e){return"object"==typeof e&&"function"==typeof e.then}function uc(e){let t=!1,r=ic[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 hc(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:uc(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function dc(e){return e[Kl]=!1,e.nodes&&e.nodes.forEach((e=>dc(e))),e}let pc={},fc=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 sc)n=dc(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=nc;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[Xl]&&ec.rebuild(n)}else n=dc(r);this.result=new sc(t,n,s),this.helpers={...pc,postcss:pc,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(!ac[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!lc[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(cc(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Kl];){e[Kl]=!0;let t=[hc(e)];for(;t.length>0;){let e=this.visitTick(t);if(cc(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 cc(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=Ql;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Hl(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(cc(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Kl];)e[Kl]=!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||rc("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(cc(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[Kl])return s[Kl]=!0,void e.push(hc(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[Kl]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Kl]=!0;let t=uc(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[Kl]||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"}};fc.registerPostcss=e=>{pc=e};var mc=fc;fc.default=fc,oc.registerLazyResult(fc),tc.registerLazyResult(fc);let gc=ka,yc=Ti,vc=Ja,wc=ql;const bc=Qa;let Sc=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=yc;this.result=new bc(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new gc(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||vc("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=wc;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 Cc=Sc;Sc.default=Sc;let Ic=Cc,xc=mc,kc=Ya,Oc=Rl,Ec=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 xc(this,e,t):new Ic(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ac=Ec;Ec.default=Ec,Oc.registerProcessor(Ec),kc.registerProcessor(Ec);let Mc=Gi,Rc=Qi,Nc=Aa,Pc=kl,Tc=fa,Lc=Rl,Dc=Fl;function Fc(e,t){if(Array.isArray(e))return e.map((e=>Fc(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Tc.prototype};r.map&&(r.map={...r.map,__proto__:Rc.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>Fc(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 Lc(s);if("decl"===s.type)return new Mc(s);if("rule"===s.type)return new Dc(s);if("comment"===s.type)return new Nc(s);if("atrule"===s.type)return new Pc(s);throw new Error("Unknown node type: "+e.type)}var Bc=Fc;Fc.default=Fc;let _c=Oi,jc=Gi,Uc=mc,zc=za,Wc=Ac,Vc=Ti,Gc=Bc,Zc=Ya,Yc=Ka,$c=Aa,Jc=kl,qc=Qa,Kc=fa,Xc=ql,Hc=Pl,Qc=Fl,eu=Rl,tu=zi;function ru(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Wc(e)}ru.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 Wc).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return ru([n(r)]).process(e,t)},n},ru.stringify=Vc,ru.parse=Xc,ru.fromJSON=Gc,ru.list=Hc,ru.comment=e=>new $c(e),ru.atRule=e=>new Jc(e),ru.decl=e=>new jc(e),ru.rule=e=>new Qc(e),ru.root=e=>new eu(e),ru.document=e=>new Zc(e),ru.CssSyntaxError=_c,ru.Declaration=jc,ru.Container=zc,ru.Processor=Wc,ru.Document=Zc,ru.Comment=$c,ru.Warning=Yc,ru.AtRule=Jc,ru.Result=qc,ru.Input=Kc,ru.Rule=Qc,ru.Root=eu,ru.Node=tu,Uc.registerPostcss(ru);var su=ru;ru.default=ru;const nu=gi(su);nu.stringify,nu.fromJSON,nu.plugin,nu.parse,nu.list,nu.document,nu.comment,nu.atRule,nu.rule,nu.decl,nu.root,nu.CssSyntaxError,nu.Declaration,nu.Container,nu.Processor,nu.Document,nu.Comment,nu.Warning,nu.AtRule,nu.Result,nu.Input,nu.Rule,nu.Root,nu.Node;class ou{constructor(...e){mi(this,"parentElement",null),mi(this,"parentNode",null),mi(this,"ownerDocument"),mi(this,"firstChild",null),mi(this,"lastChild",null),mi(this,"previousSibling",null),mi(this,"nextSibling",null),mi(this,"ELEMENT_NODE",1),mi(this,"TEXT_NODE",3),mi(this,"nodeType"),mi(this,"nodeName"),mi(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 ou))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 iu={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},au={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},lu={};function cu(e){if(lu[e])return lu[e];const t=globalThis[e],r=t.prototype,s=e in iu?iu[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 au?au[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 lu[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?lu[e]=o:r}catch{return r}}const uu={};function hu(e,t,r){var s;const n=`${e}.${String(r)}`;if(uu[n])return uu[n].call(t);const o=cu(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(uu[n]=i,i.call(t)):t[r]}const du={};function pu(e,t,r){const s=`${e}.${String(r)}`;if(du[s])return du[s].bind(t);const n=cu(e)[r];return"function"!=typeof n?t[r]:(du[s]=n,n.bind(t))}const fu={childNodes:function(e){return hu("Node",e,"childNodes")},parentNode:function(e){return hu("Node",e,"parentNode")},parentElement:function(e){return hu("Node",e,"parentElement")},textContent:function(e){return hu("Node",e,"textContent")},contains:function(e,t){return pu("Node",e,"contains")(t)},getRootNode:function(e){return pu("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?hu("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?hu("Element",e,"shadowRoot"):null},querySelector:function(e,t){return hu("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return hu("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return cu("MutationObserver").constructor}};const mu="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 gu={map:{},getId:()=>(console.error(mu),-1),getNode:()=>(console.error(mu),null),removeNodeFromMap(){console.error(mu)},has:()=>(console.error(mu),!1),reset(){console.error(mu)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(gu=new Proxy(gu,{get:(e,t,r)=>("map"===t&&console.error(mu),Reflect.get(e,t,r))}));let yu=Date.now;function vu(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:fu.parentElement(e)}/[1-9][0-9]{12}/.test(Date.now().toString())||(yu=()=>(new Date).getTime());function wu(e){var t;let r=null;return"getRootNode"in e&&(null==(t=fu.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&fu.host(fu.getRootNode(e))&&(r=fu.host(fu.getRootNode(e))),r}function bu(e){let t,r=e;for(;t=wu(r);)r=t;return r}function Su(e){const t=e.ownerDocument;if(!t)return!1;const r=bu(e);return fu.contains(t,r)}const Cu=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){cr(this,"id",1),cr(this,"styleIDMap",new WeakMap),cr(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 gu},closestElementOfNode:vu,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:bu,getShadowHost:wu,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=fu.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=fu.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 ou&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(fu.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&&(fu.contains(t,e)||Su(e))},isAncestorRemoved:function e(t,r){if(function(e){const t=e&&"host"in e&&"mode"in e&&br.host(e)||null;return Boolean(t&&"shadowRoot"in t&&br.shadowRoot(t)===e)}(t))return!1;const s=r.getId(t);if(!r.has(s))return!0;const n=fu.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=vu(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(Cr(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 yu},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:Su,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 Iu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xu="undefined"==typeof Uint8Array?[]:new Uint8Array(256),ku=0;ku<64;ku++)xu[Iu.charCodeAt(ku)]=ku;var Ou,Eu,Au;"undefined"!=typeof window&&window.Blob&&new Blob([(Ou="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Uint8Array.from(atob(Ou),(e=>e.charCodeAt(0))))],{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==(or=e.contentWindow)?void 0:or.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}new Sr,(Au=Eu||(Eu={}))[Au.NotStarted=0]="NotStarted",Au[Au.Running=1]="Running",Au[Au.Stopped=2]="Stopped";class Mu{constructor(e){ar(this,"fileName"),ar(this,"functionName"),ar(this,"lineNumber"),ar(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 Ru=/(^|@)\S+:\d+/,Nu=/^\s*at .*(\S+:\d+|\(native\))/m,Pu=/^(eval@)?(\[native code])?$/,Tu={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Nu)?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(Nu)}),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 Mu({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(Pu)}),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 Mu({functionName:e});{const t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),s=r&&r[1]?r[1]:void 0,n=this.extractLocation(e.replace(t,""));return new Mu({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 Mu({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 Mu({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(Ru)&&!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 Mu({functionName:s,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function Lu(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 Du(e){return"[object Object]"===Object.prototype.toString.call(e)}function Fu(e,t){if(0===t)return!0;const r=Object.keys(e);for(const s of r)if(Du(e[s])&&Fu(e[s],t-1))return!0;return!1}function Bu(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(Du(e)&&Object.keys(e).length>r.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Du(e)&&Fu(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]=Lu(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 _u={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 ju(e,t,r){const s=r?Object.assign({},_u,r):_u,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=Tu.parse(n).map((e=>e.toString())),i=[Bu(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=[Bu(`Uncaught (in promise) ${r.name}: ${r.message}`,s.stringifyOptions)]):(r=new Error,n=[Bu("Uncaught (in promise)",s.stringifyOptions),Bu(t.reason,s.stringifyOptions)]);const o=Tu.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]?Cu.patch(t,r,(t=>(...n)=>{if(t.apply(this,n),!("assert"===r&&n[0]||a)){a=!0;try{const t=Tu.parse(new Error).map((e=>e.toString())).splice(1),o=("assert"===r?n.slice(1):n).map((e=>Bu(e,s.stringifyOptions)));i++,i<s.lengthThreshold?e({level:r,trace:t,payload:o}):i===s.lengthThreshold&&e({level:"warn",trace:[],payload:[Bu("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...n)}finally{a=!1}}})):()=>{}}}const Uu="rrweb/console@1";var zu,Wu=Object.freeze({__proto__:null,PLUGIN_NAME:Uu,getRecordConsolePlugin:e=>({name:Uu,observer:ju,options:e})}),Vu=Object.defineProperty,Gu=(e,t,r)=>((e,t,r)=>t in e?Vu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),Zu=Object.defineProperty,Yu=(e,t,r)=>((e,t,r)=>t in e?Zu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),$u=(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))($u||{});const Ju={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},qu={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ku={};function Xu(e){if(Ku[e])return Ku[e];const t=globalThis[e],r=t.prototype,s=e in Ju?Ju[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 qu?qu[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 Ku[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?Ku[e]=o:r}catch{return r}}const Hu={};function Qu(e,t,r){var s;const n=`${e}.${String(r)}`;if(Hu[n])return Hu[n].call(t);const o=Xu(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(Hu[n]=i,i.call(t)):t[r]}const eh={};function th(e,t,r){const s=`${e}.${String(r)}`;if(eh[s])return eh[s].bind(t);const n=Xu(e)[r];return"function"!=typeof n?t[r]:(eh[s]=n,n.bind(t))}const rh={childNodes:function(e){return Qu("Node",e,"childNodes")},parentNode:function(e){return Qu("Node",e,"parentNode")},parentElement:function(e){return Qu("Node",e,"parentElement")},textContent:function(e){return Qu("Node",e,"textContent")},contains:function(e,t){return th("Node",e,"contains")(t)},getRootNode:function(e){return th("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Qu("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Qu("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Qu("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Qu("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Xu("MutationObserver").constructor}};function sh(e){return e.nodeType===e.ELEMENT_NODE}function nh(e){const t=e&&"host"in e&&"mode"in e&&rh.host(e)||null;return Boolean(t&&"shadowRoot"in t&&rh.shadowRoot(t)===e)}function oh(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function ih(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=>ah(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 ah(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=ih(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?vh(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?vh(r,t):r}}class lh{constructor(){Yu(this,"idNodeMap",new Map),Yu(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 ch({element:e,maskInputOptions:t,tagName:r,type:s,value:n,maskInputFn:o}){let i=n||"";const a=s&&uh(s);return(t[r.toLowerCase()]||a&&t[a])&&(i=o?o(i,e):"*".repeat(i.length)),i}function uh(e){return e.toLowerCase()}const hh="__rrweb_original__";function dh(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?uh(t):null}function ph(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 fh=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,mh=/^(?:[a-z+]+:)?\/\//i,gh=/^www\..*/i,yh=/^(data:)([^,]*),(.*)/i;function vh(e,t){return(e||"").replace(fh,((e,r,s,n,o,i)=>{const a=s||o||i,l=r||n||"";if(!a)return e;if(mh.test(a)||gh.test(a))return`url(${l}${a}${l})`;if(yh.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 wh(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function bh(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=wh(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=wh(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),d=t.split(h),p=-1;if(2===d.length)p=d[0].length;else if(d.length>2&&""===d[0]&&""!==s[a-1].textContent)p=t.indexOf(h,1);else if(1===d.length){if(h=h.substring(0,h.length-1),d=t.split(h),d.length<=1)return n.push(e),n;u=c+1}else u===l.length-1&&(p=t.indexOf(h));if(d.length>=2&&u>c){const e=s[a-1].textContent;if(e&&"string"==typeof e){const r=wh(e).length;p=t.indexOf(h,r)}-1===p&&(p=d[0].length)}if(-1!==p){let a=Math.floor(p/i);for(;a>0&&a<e.length;){if(o+=1,o>50*s.length)return n.push(e),n;const l=wh(e.substring(0,a),r);if(l.length===p){n.push(e.substring(0,a)),e=e.substring(a),t=t.substring(p);break}l.length<p?a+=Math.max(1,Math.floor((p-l.length)/i)):a-=Math.max(1,Math.floor((l.length-p)*i))}break}}}}return n.push(e),n}(e,t).join("/* rr_split */")}const Sh="lightgrey";let Ch=1;const Ih=new RegExp("[^a-z0-9-_:]");function xh(){return Ch++}let kh,Oh;const Eh=/^[^ \t\n\r\u000c]+/,Ah=/^[, \t\n\r\u000c]+/;const Mh=new WeakMap;function Rh(e,t){return t&&""!==t.trim()?Ph(e,t):t}function Nh(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function Ph(e,t){let r=Mh.get(e);if(r||(r=e.createElement("a"),Mh.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function Th(e,t,r,s){return s?"src"===r||"href"===r&&("use"!==t||"#"!==s[0])||"xlink:href"===r&&"#"!==s[0]?Rh(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(Ah),!(r>=t.length);){let o=s(Eh);if(","===o.slice(-1))o=Rh(e,o.substring(0,o.length-1)),n.push(o);else{let s="";o=Rh(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?vh(s,Ph(e)):"object"===t&&"data"===r?Rh(e,s):s:Rh(e,s):s}function Lh(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function Dh(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&Dh(rh.parentNode(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&Dh(rh.parentNode(e),t,r)}function Fh(e,t,r,s){let n;if(sh(e)){if(n=e,!rh.childNodes(n).length)return!1}else{if(null===rh.parentElement(e))return!1;n=rh.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(Dh(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 Bh(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:i,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:c,maskInputFn:u,dataURLOptions:h={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:m=!1,cssCaptured:g=!1,applyBackgroundColorToBlockedElements:y=!1}=t,v=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:$u.Document,childNodes:[],compatMode:e.compatMode}:{type:$u.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:$u.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};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:d=!1,rootId:p,applyBackgroundColorToBlockedElements:f=!1}=t,m=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),g=function(e){if(e instanceof HTMLFormElement)return"form";const t=uh(e.tagName);return Ih.test(t)?"div":t}(e);let y={};const v=e.attributes.length;for(let t=0;t<v;t++){const s=e.attributes[t];Lh(g,s.name,s.value)||(y[s.name]=Th(r,g,uh(s.name),s.value))}if("link"===g&&o){const t=Array.from(r.styleSheets).find((t=>t.href===e.href));let s=null;t&&(s=ih(t)),s&&(delete y.rel,delete y.href,y._cssText=s)}if("style"===g&&e.sheet){let t=ih(e.sheet);t&&(e.childNodes.length>1&&(t=bh(t,e)),y._cssText=t)}if("input"===g||"textarea"===g||"select"===g){const t=e.value,r=e.checked;"radio"!==y.type&&"checkbox"!==y.type&&"submit"!==y.type&&"button"!==y.type&&t?y.value=ch({element:e,type:dh(e),tagName:g,value:t,maskInputOptions:i,maskInputFn:a}):r&&(y.checked=r)}"option"===g&&(e.selected&&!i.select?y.selected=!0:delete y.selected);"dialog"===g&&e.open&&(y.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===g&&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=hh in n?n[hh]: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)||(y.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)&&(y.rr_dataURL=t)}if("img"===g&&c){kh||(kh=r.createElement("canvas"),Oh=kh.getContext("2d"));const t=e,s=t.currentSrc||t.getAttribute("src")||"<unknown-src>",n=t.crossOrigin,o=()=>{t.removeEventListener("load",o);try{kh.width=t.naturalWidth,kh.height=t.naturalHeight,Oh.drawImage(t,0,0),y.rr_dataURL=kh.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?y.crossOrigin=n:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}if("audio"===g||"video"===g){const t=y;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}d||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop));if(m){const{width:t,height:r}=e.getBoundingClientRect();y={class:y.class,rr_width:`${t}px`,rr_height:`${r}px`,...f?{rr_background_color:Sh}:{}}}"iframe"!==g||h(y.src)||(e.contentDocument||(y.rr_src=y.src),delete y.src);let w;try{customElements.get(g)&&(w=!0)}catch(e){}return{type:$u.Element,tagName:g,attributes:y,childNodes:[],isSVG:Nh(e)||void 0,needBlock:m,rootId:p,isCustom:w}}(e,{doc:r,blockClass:n,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:u,dataURLOptions:h,inlineImages:d,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:m,rootId:v,applyBackgroundColorToBlockedElements:y});case e.TEXT_NODE:return function(e,t){const{needsMask:r,maskTextFn:s,rootId:n,cssCaptured:o}=t,i=rh.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=rh.textContent(e),c&&l&&(l=vh(l,Ph(t.doc))));!c&&!u&&l&&r&&(l=s?s(l,rh.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:$u.Text,textContent:l||"",rootId:n}}(e,{doc:r,needsMask:i,maskTextFn:c,rootId:v,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:$u.CDATA,textContent:"",rootId:v};case e.COMMENT_NODE:return{type:$u.Comment,textContent:rh.textContent(e)||"",rootId:v};default:return!1}}function _h(e){return null==e?"":e.toLowerCase()}function jh(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:d,slimDOMOptions:p,dataURLOptions:f={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w=5e3,onStylesheetLoad:b,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:I=!1,cssCaptured:x=!1,applyBackgroundColorToBlockedElements:k=!1}=t;let{needsMask:O}=t,{preserveWhiteSpace:E=!0}=t;if(!O){O=Fh(e,i,a,void 0===O)}const A=Bh(e,{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:O,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,keepIframeSrcFn:C,newlyAddedElement:I,cssCaptured:x,applyBackgroundColorToBlockedElements:k});if(!A)return console.warn(e,"not serialized"),null;let M;M=s.hasNode(e)?s.getId(e):function(e,t){if(t.comment&&e.type===$u.Comment)return!0;if(e.type===$u.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"===ph(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(_h(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===_h(e.attributes.name)||"icon"===_h(e.attributes.rel)||"apple-touch-icon"===_h(e.attributes.rel)||"shortcut icon"===_h(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&_h(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(_h(e.attributes.property).match(/^(og|twitter|fb):/)||_h(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===_h(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===_h(e.attributes.name)||"googlebot"===_h(e.attributes.name)||"bingbot"===_h(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===_h(e.attributes.name)||"generator"===_h(e.attributes.name)||"framework"===_h(e.attributes.name)||"publisher"===_h(e.attributes.name)||"progid"===_h(e.attributes.name)||_h(e.attributes.property).match(/^article:/)||_h(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===_h(e.attributes.name)||"yandex-verification"===_h(e.attributes.name)||"csrf-token"===_h(e.attributes.name)||"p:domain_verify"===_h(e.attributes.name)||"verify-v1"===_h(e.attributes.name)||"verification"===_h(e.attributes.name)||"shopify-checkout-api-token"===_h(e.attributes.name)))return!0}}return!1}(A,p)||!E&&A.type===$u.Text&&!A.textContent.replace(/^\s+|\s+$/gm,"").length?-2:xh();const R=Object.assign(A,{id:M});if(s.add(e,R),-2===M)return null;y&&y(e);let N=!l;if(R.type===$u.Element){N=N&&!R.needBlock,delete R.needBlock;const t=rh.shadowRoot(e);t&&oh(t)&&(R.isShadowHost=!0)}if((R.type===$u.Document||R.type===$u.Element)&&N){p.headWhitespace&&R.type===$u.Element&&"head"===R.tagName&&(E=!1);const t={doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:O,maskTextClass:i,maskTextSelector:a,skipChild:l,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:d,slimDOMOptions:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:E,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C,cssCaptured:!1,applyBackgroundColorToBlockedElements:k};if(R.type===$u.Element&&"textarea"===R.tagName&&void 0!==R.attributes.value);else{R.type===$u.Element&&void 0!==R.attributes._cssText&&"string"==typeof R.attributes._cssText&&(t.cssCaptured=!0);for(const r of Array.from(rh.childNodes(e))){const e=jh(r,t);e&&R.childNodes.push(e)}}let I=null;if(sh(e)&&(I=rh.shadowRoot(e)))for(const e of Array.from(rh.childNodes(I))){const r=jh(e,t);r&&(oh(I)&&(r.isShadow=!0),R.childNodes.push(r))}}const P=rh.parentNode(e);return P&&nh(P)&&oh(P)&&(R.isShadow=!0),R.type===$u.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=jh(t,{doc:t,mirror:s,blockClass:n,blockSelector:o,needsMask:O,maskTextClass:i,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:d,slimDOMOptions:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:E,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C});r&&v(e,r)}}),w),R.type===$u.Element&&"link"===R.tagName&&"string"==typeof R.attributes.rel&&("stylesheet"===R.attributes.rel||"preload"===R.attributes.rel&&"string"==typeof R.attributes.href&&"css"===ph(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=jh(e,{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:O,maskTextClass:i,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:d,slimDOMOptions:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:E,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C});t&&b(e,t)}}),S),R}function Uh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function zh(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 Wh={exports:{}},Vh=String,Gh=function(){return{isColorSupported:!1,reset:Vh,bold:Vh,dim:Vh,italic:Vh,underline:Vh,inverse:Vh,hidden:Vh,strikethrough:Vh,black:Vh,red:Vh,green:Vh,yellow:Vh,blue:Vh,magenta:Vh,cyan:Vh,white:Vh,gray:Vh,bgBlack:Vh,bgRed:Vh,bgGreen:Vh,bgYellow:Vh,bgBlue:Vh,bgMagenta:Vh,bgCyan:Vh,bgWhite:Vh}};Wh.exports=Gh(),Wh.exports.createColors=Gh;var Zh=Wh.exports;const Yh=zh(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let $h=Zh,Jh=Yh,qh=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=$h.isColorSupported),Jh&&e&&(t=Jh(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}=$h.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 Kh=qh;qh.default=qh;var Xh={};Xh.isClean=Symbol("isClean"),Xh.my=Symbol("my");const Hh={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Qh=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 Hh[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=Hh[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 ed=Qh;Qh.default=Qh;let td=ed;function rd(e,t){new td(t).stringify(e)}var sd=rd;rd.default=rd;let{isClean:nd,my:od}=Xh,id=Kh,ad=ed,ld=sd;function cd(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=>cd(e,r))):("object"===o&&null!==n&&(n=cd(n)),r[s]=n)}return r}let ud=class{constructor(e={}){this.raws={},this[nd]=!1,this[od]=!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=cd(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 id(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[nd]){this[nd]=!1;let e=this;for(;e=e.parent;)e[nd]=!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 ad).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=ld){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 hd=ud;ud.default=ud;let dd=hd,pd=class extends dd{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 fd=pd;pd.default=pd;var md={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:gd,SourceMapGenerator:yd}=Yh,{existsSync:vd,readFileSync:wd}=Yh,{dirname:bd,join:Sd}=Yh;let Cd=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=bd(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new gd(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=bd(e),vd(e))return this.mapFile=e,wd(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 gd)return yd.fromSourceMap(t).toString();if(t instanceof yd)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=Sd(bd(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 Id=Cd;Cd.default=Cd;let{SourceMapConsumer:xd,SourceMapGenerator:kd}=Yh,{fileURLToPath:Od,pathToFileURL:Ed}=Yh,{isAbsolute:Ad,resolve:Md}=Yh,{nanoid:Rd}=md,Nd=Yh,Pd=Kh,Td=Id,Ld=Symbol("fromOffsetCache"),Dd=Boolean(xd&&kd),Fd=Boolean(Md&&Ad),Bd=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&&(!Fd||/^\w+:\/\//.test(t.from)||Ad(t.from)?this.file=t.from:this.file=Md(t.from)),Fd&&Dd){let e=new Td(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 "+Rd(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 Pd(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 Pd(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&&(Ed&&(n.input.url=Ed(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Ld])r=this[Ld];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[Ld]=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:Md(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=Ad(a.source)?Ed(a.source):new URL(a.source,this.map.consumer().sourceRoot||Ed(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(!Od)throw new Error("file: protocol is not available in this PostCSS build");l.file=Od(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 _d=Bd;Bd.default=Bd,Nd&&Nd.registerInput&&Nd.registerInput(Bd);let{SourceMapConsumer:jd,SourceMapGenerator:Ud}=Yh,{dirname:zd,relative:Wd,resolve:Vd,sep:Gd}=Yh,{pathToFileURL:Zd}=Yh,Yd=_d,$d=Boolean(jd&&Ud),Jd=Boolean(zd&&Vd&&Wd&&Gd);var qd=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||zd(e.file);!1===this.mapOpts.sourcesContent?(t=new jd(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(),Jd&&$d&&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=Ud.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ud({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 Ud({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?zd(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=zd(Vd(r,this.mapOpts.annotation)));let s=Wd(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 Yd(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(Zd){let t=Zd(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;"\\"===Gd&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Kd=hd,Xd=class extends Kd{constructor(e){super(e),this.type="comment"}};var Hd=Xd;Xd.default=Xd;let Qd,ep,tp,rp,{isClean:sp,my:np}=Xh,op=fd,ip=Hd,ap=hd;function lp(e){return e.map((e=>(e.nodes&&(e.nodes=lp(e.nodes)),delete e.source,e)))}function cp(e){if(e[sp]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)cp(t)}let up=class e extends ap{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=lp(Qd(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 op(t)]}else if(t.selector)t=[new ep(t)];else if(t.name)t=[new tp(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new ip(t)]}return t.map((t=>(t[np]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[sp]&&cp(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]}};up.registerParse=e=>{Qd=e},up.registerRule=e=>{ep=e},up.registerAtRule=e=>{tp=e},up.registerRoot=e=>{rp=e};var hp=up;up.default=up,up.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,tp.prototype):"rule"===e.type?Object.setPrototypeOf(e,ep.prototype):"decl"===e.type?Object.setPrototypeOf(e,op.prototype):"comment"===e.type?Object.setPrototypeOf(e,ip.prototype):"root"===e.type&&Object.setPrototypeOf(e,rp.prototype),e[np]=!0,e.nodes&&e.nodes.forEach((e=>{up.rebuild(e)}))};let dp,pp,fp=hp,mp=class extends fp{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new dp(new pp,this,e).stringify()}};mp.registerLazyResult=e=>{dp=e},mp.registerProcessor=e=>{pp=e};var gp=mp;mp.default=mp;let yp={};var vp=function(e){yp[e]||(yp[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let wp=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 bp=wp;wp.default=wp;let Sp=bp,Cp=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 Sp(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var Ip=Cp;Cp.default=Cp;const xp="'".charCodeAt(0),kp='"'.charCodeAt(0),Op="\\".charCodeAt(0),Ep="/".charCodeAt(0),Ap="\n".charCodeAt(0),Mp=" ".charCodeAt(0),Rp="\f".charCodeAt(0),Np="\t".charCodeAt(0),Pp="\r".charCodeAt(0),Tp="[".charCodeAt(0),Lp="]".charCodeAt(0),Dp="(".charCodeAt(0),Fp=")".charCodeAt(0),Bp="{".charCodeAt(0),_p="}".charCodeAt(0),jp=";".charCodeAt(0),Up="*".charCodeAt(0),zp=":".charCodeAt(0),Wp="@".charCodeAt(0),Vp=/[\t\n\f\r "#'()/;[\\\]{}]/g,Gp=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Zp=/.[\r\n"'(/\\]/,Yp=/[\da-f]/i;let $p=hp,Jp=class extends $p{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 qp=Jp;Jp.default=Jp,$p.registerAtRule(Jp);let Kp,Xp,Hp=hp,Qp=class extends Hp{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 Kp(new Xp,this,e).stringify()}};Qp.registerLazyResult=e=>{Kp=e},Qp.registerProcessor=e=>{Xp=e};var ef=Qp;Qp.default=Qp,Hp.registerRoot(Qp);let tf={comma:e=>tf.split(e,[","],!0),space:e=>tf.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 rf=tf;tf.default=tf;let sf=hp,nf=rf,of=class extends sf{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return nf.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 af=of;of.default=of,sf.registerRule(of);let lf=fd,cf=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,d=e.css.valueOf(),p=t.ignoreErrors,f=d.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=d.charCodeAt(m),r){case Ap:case Mp:case Np:case Pp:case Rp:s=m;do{s+=1,r=d.charCodeAt(s)}while(r===Mp||r===Ap||r===Np||r===Pp||r===Rp);h=["space",d.slice(m,s)],m=s-1;break;case Tp:case Lp:case Bp:case _p:case zp:case jp:case Fp:{let e=String.fromCharCode(r);h=[e,e,m];break}case Dp:if(c=g.length?g.pop()[1]:"",u=d.charCodeAt(m+1),"url"===c&&u!==xp&&u!==kp&&u!==Mp&&u!==Ap&&u!==Np&&u!==Rp&&u!==Pp){s=m;do{if(a=!1,s=d.indexOf(")",s+1),-1===s){if(p||t){s=m;break}v("bracket")}for(l=s;d.charCodeAt(l-1)===Op;)l-=1,a=!a}while(a);h=["brackets",d.slice(m,s+1),m,s],m=s}else s=d.indexOf(")",m+1),o=d.slice(m,s+1),-1===s||Zp.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case xp:case kp:n=r===xp?"'":'"',s=m;do{if(a=!1,s=d.indexOf(n,s+1),-1===s){if(p||t){s=m+1;break}v("string")}for(l=s;d.charCodeAt(l-1)===Op;)l-=1,a=!a}while(a);h=["string",d.slice(m,s+1),m,s],m=s;break;case Wp:Vp.lastIndex=m+1,Vp.test(d),s=0===Vp.lastIndex?d.length-1:Vp.lastIndex-2,h=["at-word",d.slice(m,s+1),m,s],m=s;break;case Op:for(s=m,i=!0;d.charCodeAt(s+1)===Op;)s+=1,i=!i;if(r=d.charCodeAt(s+1),i&&r!==Ep&&r!==Mp&&r!==Ap&&r!==Np&&r!==Pp&&r!==Rp&&(s+=1,Yp.test(d.charAt(s)))){for(;Yp.test(d.charAt(s+1));)s+=1;d.charCodeAt(s+1)===Mp&&(s+=1)}h=["word",d.slice(m,s+1),m,s],m=s;break;default:r===Ep&&d.charCodeAt(m+1)===Up?(s=d.indexOf("*/",m+2)+1,0===s&&(p||t?s=d.length:v("comment")),h=["comment",d.slice(m,s+1),m,s],m=s):(Gp.lastIndex=m+1,Gp.test(d),s=0===Gp.lastIndex?d.length-1:Gp.lastIndex-2,h=["word",d.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},uf=Hd,hf=qp,df=ef,pf=af;const ff={empty:!0,space:!0};var mf=class{constructor(e){this.input=e,this.root=new df,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 hf;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 uf;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=cf(this.input)}decl(e,t){let r=new lf;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 pf;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",ff[a]||ff[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 pf;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 gf=hp,yf=mf,vf=_d;function wf(e,t){let r=new vf(e,t),s=new yf(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 bf=wf;wf.default=wf,gf.registerParse(wf);let{isClean:Sf,my:Cf}=Xh,If=qd,xf=sd,kf=hp,Of=gp,Ef=vp,Af=Ip,Mf=bf,Rf=ef;const Nf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Pf={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},Tf={Once:!0,postcssPlugin:!0,prepare:!0};function Lf(e){return"object"==typeof e&&"function"==typeof e.then}function Df(e){let t=!1,r=Nf[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 Ff(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Df(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Bf(e){return e[Sf]=!1,e.nodes&&e.nodes.forEach((e=>Bf(e))),e}let _f={},jf=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 Af)n=Bf(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=Mf;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[Cf]&&kf.rebuild(n)}else n=Bf(r);this.result=new Af(t,n,s),this.helpers={..._f,postcss:_f,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(!Pf[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Tf[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(Lf(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Sf];){e[Sf]=!0;let t=[Ff(e)];for(;t.length>0;){let e=this.visitTick(t);if(Lf(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 Lf(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=xf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new If(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(Lf(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Sf];)e[Sf]=!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||Ef("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(Lf(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[Sf])return s[Sf]=!0,void e.push(Ff(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[Sf]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Sf]=!0;let t=Df(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[Sf]||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"}};jf.registerPostcss=e=>{_f=e};var Uf=jf;jf.default=jf,Rf.registerLazyResult(jf),Of.registerLazyResult(jf);let zf=qd,Wf=sd,Vf=vp,Gf=bf;const Zf=Ip;let Yf=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=Wf;this.result=new Zf(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new zf(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||Vf("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=Gf;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 $f=Yf;Yf.default=Yf;let Jf=$f,qf=Uf,Kf=gp,Xf=ef,Hf=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 qf(this,e,t):new Jf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Qf=Hf;Hf.default=Hf,Xf.registerProcessor(Hf),Kf.registerProcessor(Hf);let em=fd,tm=Id,rm=Hd,sm=qp,nm=_d,om=ef,im=af;function am(e,t){if(Array.isArray(e))return e.map((e=>am(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:nm.prototype};r.map&&(r.map={...r.map,__proto__:tm.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>am(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 om(s);if("decl"===s.type)return new em(s);if("rule"===s.type)return new im(s);if("comment"===s.type)return new rm(s);if("atrule"===s.type)return new sm(s);throw new Error("Unknown node type: "+e.type)}var lm=am;am.default=am;let cm=Kh,um=fd,hm=Uf,dm=hp,pm=Qf,fm=sd,mm=lm,gm=gp,ym=bp,vm=Hd,wm=qp,bm=Ip,Sm=_d,Cm=bf,Im=rf,xm=af,km=ef,Om=hd;function Em(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new pm(e)}Em.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 pm).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return Em([n(r)]).process(e,t)},n},Em.stringify=fm,Em.parse=Cm,Em.fromJSON=mm,Em.list=Im,Em.comment=e=>new vm(e),Em.atRule=e=>new wm(e),Em.decl=e=>new um(e),Em.rule=e=>new xm(e),Em.root=e=>new km(e),Em.document=e=>new gm(e),Em.CssSyntaxError=cm,Em.Declaration=um,Em.Container=dm,Em.Processor=pm,Em.Document=gm,Em.Comment=vm,Em.Warning=ym,Em.AtRule=wm,Em.Result=bm,Em.Input=Sm,Em.Rule=xm,Em.Root=km,Em.Node=Om,hm.registerPostcss(Em);var Am=Em;Em.default=Em;const Mm=Uh(Am);Mm.stringify,Mm.fromJSON,Mm.plugin,Mm.parse,Mm.list,Mm.document,Mm.comment,Mm.atRule,Mm.rule,Mm.decl,Mm.root,Mm.CssSyntaxError,Mm.Declaration,Mm.Container,Mm.Processor,Mm.Document,Mm.Comment,Mm.Warning,Mm.AtRule,Mm.Result,Mm.Input,Mm.Rule,Mm.Root,Mm.Node;var Rm=Object.defineProperty,Nm=(e,t,r)=>((e,t,r)=>t in e?Rm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function Pm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Tm(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 Lm={exports:{}},Dm=String,Fm=function(){return{isColorSupported:!1,reset:Dm,bold:Dm,dim:Dm,italic:Dm,underline:Dm,inverse:Dm,hidden:Dm,strikethrough:Dm,black:Dm,red:Dm,green:Dm,yellow:Dm,blue:Dm,magenta:Dm,cyan:Dm,white:Dm,gray:Dm,bgBlack:Dm,bgRed:Dm,bgGreen:Dm,bgYellow:Dm,bgBlue:Dm,bgMagenta:Dm,bgCyan:Dm,bgWhite:Dm}};Lm.exports=Fm(),Lm.exports.createColors=Fm;var Bm=Lm.exports;const _m=Tm(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let jm=Bm,Um=_m,zm=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=jm.isColorSupported),Um&&e&&(t=Um(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}=jm.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 Wm=zm;zm.default=zm;var Vm={};Vm.isClean=Symbol("isClean"),Vm.my=Symbol("my");const Gm={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Zm=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 Gm[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=Gm[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 Ym=Zm;Zm.default=Zm;let $m=Ym;function Jm(e,t){new $m(t).stringify(e)}var qm=Jm;Jm.default=Jm;let{isClean:Km,my:Xm}=Vm,Hm=Wm,Qm=Ym,eg=qm;function tg(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=>tg(e,r))):("object"===o&&null!==n&&(n=tg(n)),r[s]=n)}return r}let rg=class{constructor(e={}){this.raws={},this[Km]=!1,this[Xm]=!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=tg(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 Hm(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[Km]){this[Km]=!1;let e=this;for(;e=e.parent;)e[Km]=!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 Qm).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=eg){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 sg=rg;rg.default=rg;let ng=sg,og=class extends ng{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 ig=og;og.default=og;var ag={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:lg,SourceMapGenerator:cg}=_m,{existsSync:ug,readFileSync:hg}=_m,{dirname:dg,join:pg}=_m;let fg=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=dg(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new lg(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=dg(e),ug(e))return this.mapFile=e,hg(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 lg)return cg.fromSourceMap(t).toString();if(t instanceof cg)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=pg(dg(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 mg=fg;fg.default=fg;let{SourceMapConsumer:gg,SourceMapGenerator:yg}=_m,{fileURLToPath:vg,pathToFileURL:wg}=_m,{isAbsolute:bg,resolve:Sg}=_m,{nanoid:Cg}=ag,Ig=_m,xg=Wm,kg=mg,Og=Symbol("fromOffsetCache"),Eg=Boolean(gg&&yg),Ag=Boolean(Sg&&bg),Mg=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&&(!Ag||/^\w+:\/\//.test(t.from)||bg(t.from)?this.file=t.from:this.file=Sg(t.from)),Ag&&Eg){let e=new kg(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 "+Cg(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 xg(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 xg(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&&(wg&&(n.input.url=wg(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Og])r=this[Og];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[Og]=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:Sg(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=bg(a.source)?wg(a.source):new URL(a.source,this.map.consumer().sourceRoot||wg(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(!vg)throw new Error("file: protocol is not available in this PostCSS build");l.file=vg(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 Rg=Mg;Mg.default=Mg,Ig&&Ig.registerInput&&Ig.registerInput(Mg);let{SourceMapConsumer:Ng,SourceMapGenerator:Pg}=_m,{dirname:Tg,relative:Lg,resolve:Dg,sep:Fg}=_m,{pathToFileURL:Bg}=_m,_g=Rg,jg=Boolean(Ng&&Pg),Ug=Boolean(Tg&&Dg&&Lg&&Fg);var zg=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||Tg(e.file);!1===this.mapOpts.sourcesContent?(t=new Ng(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(),Ug&&jg&&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=Pg.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Pg({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 Pg({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?Tg(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Tg(Dg(r,this.mapOpts.annotation)));let s=Lg(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 _g(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(Bg){let t=Bg(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;"\\"===Fg&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Wg=sg,Vg=class extends Wg{constructor(e){super(e),this.type="comment"}};var Gg=Vg;Vg.default=Vg;let Zg,Yg,$g,Jg,{isClean:qg,my:Kg}=Vm,Xg=ig,Hg=Gg,Qg=sg;function ey(e){return e.map((e=>(e.nodes&&(e.nodes=ey(e.nodes)),delete e.source,e)))}function ty(e){if(e[qg]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)ty(t)}let ry=class e extends Qg{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=ey(Zg(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 Xg(t)]}else if(t.selector)t=[new Yg(t)];else if(t.name)t=[new $g(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Hg(t)]}return t.map((t=>(t[Kg]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[qg]&&ty(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]}};ry.registerParse=e=>{Zg=e},ry.registerRule=e=>{Yg=e},ry.registerAtRule=e=>{$g=e},ry.registerRoot=e=>{Jg=e};var sy=ry;ry.default=ry,ry.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,$g.prototype):"rule"===e.type?Object.setPrototypeOf(e,Yg.prototype):"decl"===e.type?Object.setPrototypeOf(e,Xg.prototype):"comment"===e.type?Object.setPrototypeOf(e,Hg.prototype):"root"===e.type&&Object.setPrototypeOf(e,Jg.prototype),e[Kg]=!0,e.nodes&&e.nodes.forEach((e=>{ry.rebuild(e)}))};let ny,oy,iy=sy,ay=class extends iy{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new ny(new oy,this,e).stringify()}};ay.registerLazyResult=e=>{ny=e},ay.registerProcessor=e=>{oy=e};var ly=ay;ay.default=ay;let cy={};var uy=function(e){cy[e]||(cy[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let hy=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 dy=hy;hy.default=hy;let py=dy,fy=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 py(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var my=fy;fy.default=fy;const gy="'".charCodeAt(0),yy='"'.charCodeAt(0),vy="\\".charCodeAt(0),wy="/".charCodeAt(0),by="\n".charCodeAt(0),Sy=" ".charCodeAt(0),Cy="\f".charCodeAt(0),Iy="\t".charCodeAt(0),xy="\r".charCodeAt(0),ky="[".charCodeAt(0),Oy="]".charCodeAt(0),Ey="(".charCodeAt(0),Ay=")".charCodeAt(0),My="{".charCodeAt(0),Ry="}".charCodeAt(0),Ny=";".charCodeAt(0),Py="*".charCodeAt(0),Ty=":".charCodeAt(0),Ly="@".charCodeAt(0),Dy=/[\t\n\f\r "#'()/;[\\\]{}]/g,Fy=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,By=/.[\r\n"'(/\\]/,_y=/[\da-f]/i;let jy=sy,Uy=class extends jy{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 zy=Uy;Uy.default=Uy,jy.registerAtRule(Uy);let Wy,Vy,Gy=sy,Zy=class extends Gy{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 Wy(new Vy,this,e).stringify()}};Zy.registerLazyResult=e=>{Wy=e},Zy.registerProcessor=e=>{Vy=e};var Yy=Zy;Zy.default=Zy,Gy.registerRoot(Zy);let $y={comma:e=>$y.split(e,[","],!0),space:e=>$y.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 Jy=$y;$y.default=$y;let qy=sy,Ky=Jy,Xy=class extends qy{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Ky.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 Hy=Xy;Xy.default=Xy,qy.registerRule(Xy);let Qy=ig,ev=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,d=e.css.valueOf(),p=t.ignoreErrors,f=d.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=d.charCodeAt(m),r){case by:case Sy:case Iy:case xy:case Cy:s=m;do{s+=1,r=d.charCodeAt(s)}while(r===Sy||r===by||r===Iy||r===xy||r===Cy);h=["space",d.slice(m,s)],m=s-1;break;case ky:case Oy:case My:case Ry:case Ty:case Ny:case Ay:{let e=String.fromCharCode(r);h=[e,e,m];break}case Ey:if(c=g.length?g.pop()[1]:"",u=d.charCodeAt(m+1),"url"===c&&u!==gy&&u!==yy&&u!==Sy&&u!==by&&u!==Iy&&u!==Cy&&u!==xy){s=m;do{if(a=!1,s=d.indexOf(")",s+1),-1===s){if(p||t){s=m;break}v("bracket")}for(l=s;d.charCodeAt(l-1)===vy;)l-=1,a=!a}while(a);h=["brackets",d.slice(m,s+1),m,s],m=s}else s=d.indexOf(")",m+1),o=d.slice(m,s+1),-1===s||By.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case gy:case yy:n=r===gy?"'":'"',s=m;do{if(a=!1,s=d.indexOf(n,s+1),-1===s){if(p||t){s=m+1;break}v("string")}for(l=s;d.charCodeAt(l-1)===vy;)l-=1,a=!a}while(a);h=["string",d.slice(m,s+1),m,s],m=s;break;case Ly:Dy.lastIndex=m+1,Dy.test(d),s=0===Dy.lastIndex?d.length-1:Dy.lastIndex-2,h=["at-word",d.slice(m,s+1),m,s],m=s;break;case vy:for(s=m,i=!0;d.charCodeAt(s+1)===vy;)s+=1,i=!i;if(r=d.charCodeAt(s+1),i&&r!==wy&&r!==Sy&&r!==by&&r!==Iy&&r!==xy&&r!==Cy&&(s+=1,_y.test(d.charAt(s)))){for(;_y.test(d.charAt(s+1));)s+=1;d.charCodeAt(s+1)===Sy&&(s+=1)}h=["word",d.slice(m,s+1),m,s],m=s;break;default:r===wy&&d.charCodeAt(m+1)===Py?(s=d.indexOf("*/",m+2)+1,0===s&&(p||t?s=d.length:v("comment")),h=["comment",d.slice(m,s+1),m,s],m=s):(Fy.lastIndex=m+1,Fy.test(d),s=0===Fy.lastIndex?d.length-1:Fy.lastIndex-2,h=["word",d.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},tv=Gg,rv=zy,sv=Yy,nv=Hy;const ov={empty:!0,space:!0};var iv=class{constructor(e){this.input=e,this.root=new sv,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 rv;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 tv;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=ev(this.input)}decl(e,t){let r=new Qy;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 nv;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",ov[a]||ov[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 nv;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 av=sy,lv=iv,cv=Rg;function uv(e,t){let r=new cv(e,t),s=new lv(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 hv=uv;uv.default=uv,av.registerParse(uv);let{isClean:dv,my:pv}=Vm,fv=zg,mv=qm,gv=sy,yv=ly,vv=uy,wv=my,bv=hv,Sv=Yy;const Cv={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Iv={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},xv={Once:!0,postcssPlugin:!0,prepare:!0};function kv(e){return"object"==typeof e&&"function"==typeof e.then}function Ov(e){let t=!1,r=Cv[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 Ev(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Ov(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Av(e){return e[dv]=!1,e.nodes&&e.nodes.forEach((e=>Av(e))),e}let Mv={},Rv=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 wv)n=Av(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=bv;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[pv]&&gv.rebuild(n)}else n=Av(r);this.result=new wv(t,n,s),this.helpers={...Mv,postcss:Mv,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(!Iv[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!xv[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(kv(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[dv];){e[dv]=!0;let t=[Ev(e)];for(;t.length>0;){let e=this.visitTick(t);if(kv(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 kv(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=mv;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new fv(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(kv(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[dv];)e[dv]=!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||vv("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(kv(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[dv])return s[dv]=!0,void e.push(Ev(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[dv]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[dv]=!0;let t=Ov(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[dv]||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"}};Rv.registerPostcss=e=>{Mv=e};var Nv=Rv;Rv.default=Rv,Sv.registerLazyResult(Rv),yv.registerLazyResult(Rv);let Pv=zg,Tv=qm,Lv=uy,Dv=hv;const Fv=my;let Bv=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=Tv;this.result=new Fv(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new Pv(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||Lv("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=Dv;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 _v=Bv;Bv.default=Bv;let jv=_v,Uv=Nv,zv=ly,Wv=Yy,Vv=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 Uv(this,e,t):new jv(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Gv=Vv;Vv.default=Vv,Wv.registerProcessor(Vv),zv.registerProcessor(Vv);let Zv=ig,Yv=mg,$v=Gg,Jv=zy,qv=Rg,Kv=Yy,Xv=Hy;function Hv(e,t){if(Array.isArray(e))return e.map((e=>Hv(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:qv.prototype};r.map&&(r.map={...r.map,__proto__:Yv.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>Hv(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 Kv(s);if("decl"===s.type)return new Zv(s);if("rule"===s.type)return new Xv(s);if("comment"===s.type)return new $v(s);if("atrule"===s.type)return new Jv(s);throw new Error("Unknown node type: "+e.type)}var Qv=Hv;Hv.default=Hv;let ew=Wm,tw=ig,rw=Nv,sw=sy,nw=Gv,ow=qm,iw=Qv,aw=ly,lw=dy,cw=Gg,uw=zy,hw=my,dw=Rg,pw=hv,fw=Jy,mw=Hy,gw=Yy,yw=sg;function vw(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new nw(e)}vw.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 nw).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return vw([n(r)]).process(e,t)},n},vw.stringify=ow,vw.parse=pw,vw.fromJSON=iw,vw.list=fw,vw.comment=e=>new cw(e),vw.atRule=e=>new uw(e),vw.decl=e=>new tw(e),vw.rule=e=>new mw(e),vw.root=e=>new gw(e),vw.document=e=>new aw(e),vw.CssSyntaxError=ew,vw.Declaration=tw,vw.Container=sw,vw.Processor=nw,vw.Document=aw,vw.Comment=cw,vw.Warning=lw,vw.AtRule=uw,vw.Result=hw,vw.Input=dw,vw.Rule=mw,vw.Root=gw,vw.Node=yw,rw.registerPostcss(vw);var ww=vw;vw.default=vw;const bw=Pm(ww);bw.stringify,bw.fromJSON,bw.plugin,bw.parse,bw.list,bw.document,bw.comment,bw.atRule,bw.rule,bw.decl,bw.root,bw.CssSyntaxError,bw.Declaration,bw.Container,bw.Processor,bw.Document,bw.Comment,bw.Warning,bw.AtRule,bw.Result,bw.Input,bw.Rule,bw.Root,bw.Node;class Sw{constructor(...e){Nm(this,"parentElement",null),Nm(this,"parentNode",null),Nm(this,"ownerDocument"),Nm(this,"firstChild",null),Nm(this,"lastChild",null),Nm(this,"previousSibling",null),Nm(this,"nextSibling",null),Nm(this,"ELEMENT_NODE",1),Nm(this,"TEXT_NODE",3),Nm(this,"nodeType"),Nm(this,"nodeName"),Nm(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 Sw))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 Cw={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Iw={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},xw={};function kw(e){if(xw[e])return xw[e];const t=globalThis[e],r=t.prototype,s=e in Cw?Cw[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 Iw?Iw[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 xw[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?xw[e]=o:r}catch{return r}}const Ow={};function Ew(e,t,r){var s;const n=`${e}.${String(r)}`;if(Ow[n])return Ow[n].call(t);const o=kw(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(Ow[n]=i,i.call(t)):t[r]}const Aw={};function Mw(e,t,r){const s=`${e}.${String(r)}`;if(Aw[s])return Aw[s].bind(t);const n=kw(e)[r];return"function"!=typeof n?t[r]:(Aw[s]=n,n.bind(t))}function Rw(){return kw("MutationObserver").constructor}const Nw={childNodes:function(e){return Ew("Node",e,"childNodes")},parentNode:function(e){return Ew("Node",e,"parentNode")},parentElement:function(e){return Ew("Node",e,"parentElement")},textContent:function(e){return Ew("Node",e,"textContent")},contains:function(e,t){return Mw("Node",e,"contains")(t)},getRootNode:function(e){return Mw("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Ew("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Ew("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Ew("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Ew("Element",e,"querySelectorAll")(t)},mutationObserver:Rw};function Pw(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const Tw="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 Lw={map:{},getId:()=>(console.error(Tw),-1),getNode:()=>(console.error(Tw),null),removeNodeFromMap(){console.error(Tw)},has:()=>(console.error(Tw),!1),reset(){console.error(Tw)}};function Dw(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 Fw(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)}}),()=>Fw(e,t,o||{},!0)}function Bw(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&&(Lw=new Proxy(Lw,{get:(e,t,r)=>("map"===t&&console.error(Tw),Reflect.get(e,t,r))}));let _w=Date.now;function jw(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=Nw.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=Nw.parentElement(o.body))?void 0:s.scrollTop)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollTop)||0}}function Uw(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function zw(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ww(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:Nw.parentElement(e)}function Vw(e,t,r,s){if(!e)return!1;const n=Ww(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(Dh(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 Gw(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)}function Zw(e,t){if(nh(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=Nw.parentNode(e);return(!s||s.nodeType!==e.DOCUMENT_NODE)&&(!s||Zw(s,t))}function Yw(e){return Boolean(e.changedTouches)}function $w(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Jw(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function qw(e){return!!e&&(e instanceof Sw&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Nw.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(_w=()=>(new Date).getTime());class Kw{constructor(){Gu(this,"id",1),Gu(this,"styleIDMap",new WeakMap),Gu(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 Xw(e){var t;let r=null;return"getRootNode"in e&&(null==(t=Nw.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Nw.host(Nw.getRootNode(e))&&(r=Nw.host(Nw.getRootNode(e))),r}function Hw(e){const t=e.ownerDocument;if(!t)return!1;const r=function(e){let t,r=e;for(;t=Xw(r);)r=t;return r}(e);return Nw.contains(t,r)}function Qw(e){const t=e.ownerDocument;return!!t&&(Nw.contains(t,e)||Hw(e))}var eb=(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))(eb||{}),tb=(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))(tb||{}),rb=(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))(rb||{}),sb=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(sb||{}),nb=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(nb||{}),ob=(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))(ob||{}),ib=(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))(ib||{});function ab(e){return"__ln"in e}class lb{constructor(){Gu(this,"length",0),Gu(this,"head",null),Gu(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&&ab(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&&ab(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 cb=(e,t)=>`${e}@${t}`;class ub{constructor(){Gu(this,"frozen",!1),Gu(this,"locked",!1),Gu(this,"texts",[]),Gu(this,"attributes",[]),Gu(this,"attributeMap",new WeakMap),Gu(this,"removes",[]),Gu(this,"mapRemoves",[]),Gu(this,"movedMap",{}),Gu(this,"addedSet",new Set),Gu(this,"movedSet",new Set),Gu(this,"droppedSet",new Set),Gu(this,"removesSubTreeCache",new Set),Gu(this,"mutationCb"),Gu(this,"blockClass"),Gu(this,"blockSelector"),Gu(this,"maskTextClass"),Gu(this,"maskTextSelector"),Gu(this,"inlineStylesheet"),Gu(this,"maskInputOptions"),Gu(this,"maskTextFn"),Gu(this,"maskInputFn"),Gu(this,"keepIframeSrcFn"),Gu(this,"recordCanvas"),Gu(this,"inlineImages"),Gu(this,"slimDOMOptions"),Gu(this,"dataURLOptions"),Gu(this,"doc"),Gu(this,"mirror"),Gu(this,"iframeManager"),Gu(this,"stylesheetManager"),Gu(this,"shadowDomManager"),Gu(this,"canvasManager"),Gu(this,"processedNodeManager"),Gu(this,"unattachedDoc"),Gu(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),Gu(this,"emit",(()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new lb,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=Nw.parentNode(n);if(!o||!Qw(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=nh(o)?this.mirror.getId(Xw(n)):this.mirror.getId(o),l=s(n);if(-1===a||-1===l)return r.addNode(n);const c=jh(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=>{$w(e,this.mirror)&&this.iframeManager.addIframe(e),Jw(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),qw(n)&&this.shadowDomManager.addShadowRoot(Nw.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)db(this.removesSubTreeCache,e,this.mirror)&&!this.movedSet.has(Nw.parentNode(e))||n(e);for(const e of this.addedSet)pb(this.droppedSet,e)||db(this.removesSubTreeCache,e,this.mirror)?pb(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(Nw.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(Nw.parentNode(r.value));if(-1===s(r.value))continue;if(-1!==t){e=r;break}{const t=r.value,s=Nw.parentNode(t);if(s&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=Nw.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=Nw.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))})),Gu(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(Nw.childNodes(e),(e=>Nw.textContent(e)||"")).join("");t.attributes.value=ch({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:dh(e),value:r,maskInputFn:this.maskInputFn})})),Gu(this,"processMutation",(e=>{if(!Gw(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=Nw.textContent(e.target);Vw(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:Fh(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Ww(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=dh(t);s=ch({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:s,maskInputFn:this.maskInputFn})}if(Vw(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"),!Lh(t.tagName,r))if(n.attributes[r]=Th(this.doc,uh(t.tagName),uh(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(Vw(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=nh(e.target)?this.mirror.getId(Nw.host(e.target)):this.mirror.getId(e.target);Vw(e.target,this.blockClass,this.blockSelector,!1)||Gw(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(hb(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||Zw(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[cb(r,s)]?hb(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:!(!nh(e.target)||!oh(e.target))||void 0}),function(e,t){const r=[e];for(;r.length;){const e=r.pop();t.has(e)||(t.add(e),Nw.childNodes(e).forEach((e=>r.push(e))))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))}))}})),Gu(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Gw(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[cb(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Vw(e,this.blockClass,this.blockSelector,!1)||(Nw.childNodes(e).forEach((e=>this.genAdds(e))),qw(e)&&Nw.childNodes(Nw.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 hb(e,t){e.delete(t),Nw.childNodes(t).forEach((t=>hb(e,t)))}function db(e,t,r){return 0!==e.size&&function(e,t){const r=Nw.parentNode(t);return!!r&&e.has(r)}(e,t)}function pb(e,t){return 0!==e.size&&fb(e,t)}function fb(e,t){const r=Nw.parentNode(t);return!!r&&(!!e.has(r)||fb(e,r))}let mb;const gb=e=>{if(!mb)return e;return(...t)=>{try{return e(...t)}catch(e){if(mb&&!0===mb(e))return;throw e}}};function yb(e){return(...t)=>{try{return e(...t)}catch(e){try{e._external_=!0}catch{}throw e}}}const vb=[];function wb(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 bb(e,t){const r=new ub;vb.push(r),r.init(e);const s=new(Rw())(gb(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Sb({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(rb).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==i[e])).forEach((o=>{let i=uh(o);const c=(t=>o=>{const i=wb(o);if(Vw(i,s,n,!0))return;let a=null,c=t;if("pointerType"in o){switch(o.pointerType){case"mouse":a=sb.Mouse;break;case"touch":a=sb.Touch;break;case"pen":a=sb.Pen}a===sb.Touch?rb[t]===rb.MouseDown?c="TouchStart":rb[t]===rb.MouseUp&&(c="TouchEnd"):sb.Pen}else Yw(o)&&(a=sb.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===sb.Touch||c.startsWith("Mouse")&&a===sb.Mouse)&&(a=null)):rb[t]===rb.Click&&(a=l,l=null);const u=Yw(o)?o.changedTouches[0]:o;if(!u)return;const h=r.getId(i),{clientX:d,clientY:p}=u;gb(e)({type:rb[c],id:h,x:d,y:p,...null!==a&&{pointerType:a}})})(o);if(window.PointerEvent)switch(rb[o]){case rb.MouseDown:case rb.MouseUp:i=i.replace("mouse","pointer");break;case rb.TouchStart:case rb.TouchEnd:return}a.push(Pw(i,c,t))})),gb((()=>{a.forEach((e=>e()))}))}function Cb({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:o}){const i=gb(Dw(gb((o=>{const i=wb(o);if(!i||Vw(i,s,n,!0))return;const a=r.getId(i);if(i===t&&t.defaultView){const r=jw(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 Pw("scroll",i,t)}const Ib=["INPUT","TEXTAREA","SELECT"],xb=new WeakMap;function kb(e){return function(e,t){if(Mb("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Mb("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Mb("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Mb("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 Ob(e,t,r){let s,n;return e?(e.ownerNode?s=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:s}):{}}function Eb({mirror:e,stylesheetManager:t},r){var s,n,o;let i=null;i="#document"===r.nodeName?e.getId(r):e.getId(Nw.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}}),gb((()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))):()=>{}}function Ab(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:d,selectionCb:p,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),d(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),p(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(s=bb(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=Dw(gb((t=>{const r=Date.now()-i;e(a.map((e=>(e.timeOffset-=r,e))),t),a=[],i=null})),o),c=gb(Dw(gb((e=>{const t=wb(e),{clientX:r,clientY:n}=Yw(e)?e.changedTouches[0]:e;i||(i=_w()),a.push({x:r,y:n,id:s.getId(t),timeOffset:_w()-i}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?tb.Drag:e instanceof MouseEvent?tb.MouseMove:tb.TouchMove)})),n,{trailing:!1})),u=[Pw("mousemove",c,r),Pw("touchmove",c,r),Pw("drag",c,r)];return gb((()=>{u.forEach((e=>e()))}))}(e),o=Sb(e),i=Cb(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,s=-1;return Pw("resize",gb(Dw(gb((()=>{const t=Uw(),n=zw();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=wb(e);const c=e.isTrusted,h=r&&r.tagName;if(r&&"OPTION"===h&&(r=Nw.parentElement(r)),!r||!h||Ib.indexOf(h)<0||Vw(r,s,n,!0))return;if(r.classList.contains(o)||i&&r.matches(i))return;let p=r.value,f=!1;const m=dh(r)||"";"radio"===m||"checkbox"===m?f=r.checked:(a[h.toLowerCase()]||a[m])&&(p=ch({element:r,maskInputOptions:a,tagName:h,type:m,value:p,maskInputFn:l})),d(r,u?{text:p,isChecked:f,userTriggered:c}:{text:p,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;d(e,u?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}}))}function d(t,s){const n=xb.get(t);if(!n||n.text!==s.text||n.isChecked!==s.isChecked){xb.set(t,s);const n=r.getId(t);gb(e)({...s,id:n})}}const p=("last"===c.input?["change"]:["input","change"]).map((e=>Pw(e,gb(h),t))),f=t.defaultView;if(!f)return()=>{p.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&&p.push(...g.map((e=>Fw(e[0],e[1],{set(){gb(h)({target:this,isTrusted:!1})}},!1,f)))),gb((()=>{p.forEach((e=>e()))}))}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:n,doc:o}){const i=gb((o=>Dw(gb((n=>{const i=wb(n);if(!i||Vw(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=[Pw("play",i(ob.Play),o),Pw("pause",i(ob.Pause),o),Pw("seeked",i(ob.Seeked),o),Pw("volumechange",i(ob.VolumeChange),o),Pw("ratechange",i(ob.RateChange),o)];return gb((()=>{a.forEach((e=>e()))}))}(e);let u=()=>{},h=()=>{},d=()=>{},p=()=>{};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:gb(((s,n,o)=>{const[i,a]=o,{id:l,styleId:c}=Ob(n,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:i,index:a}]}),yb((()=>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:gb(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=Ob(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:i}]}),yb((()=>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:gb(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=Ob(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:gb(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=Ob(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:i}),s.apply(n,o)}))}));const l={};Rb("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(Rb("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),Rb("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),Rb("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:gb(((s,n,o)=>{const[i,a]=o,{id:l,styleId:c}=Ob(n.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:i,index:[...kb(n),a||0]}]}),s.apply(n,o)}))}),n.prototype.deleteRule=new Proxy(c[s].deleteRule,{apply:gb(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=Ob(n.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...kb(n),i]}]}),s.apply(n,o)}))})})),gb((()=>{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=Eb(e,e.doc),d=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:gb(((n,i,a)=>{var l;const[c,u,h]=a;if(r.has(c))return o.apply(i,[c,u,h]);const{id:d,styleId:p}=Ob(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:c,value:u,priority:h},index:kb(i.parentRule)}),n.apply(i,a)}))});const i=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:gb(((n,o,a)=>{var l;const[c]=a;if(r.has(c))return i.apply(o,[c]);const{id:u,styleId:h}=Ob(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:kb(o.parentRule)}),n.apply(o,a)}))}),gb((()=>{n.CSSStyleDeclaration.prototype.setProperty=o,n.CSSStyleDeclaration.prototype.removeProperty=i}))}(e,{win:r}),e.collectFonts&&(p=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=Bw(t.fonts,"add",(function(t){return function(r){return setTimeout(gb((()=>{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),gb((()=>{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=gb((()=>{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;Vw(i,s,n,!0)||Vw(c,s,n,!0)||a.push({start:r.getId(i),startOffset:l,end:r.getId(c),endOffset:u})}o({ranges:a})}));return a(),Pw("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){const r=e.defaultView;return r&&r.customElements?Bw(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 gb((()=>{vb.forEach((e=>e.reset())),null==s||s.disconnect(),n(),o(),i(),a(),l(),c(),u(),h(),d(),p(),f(),m(),g.forEach((e=>e()))}))}function Mb(e){return void 0!==window[e]}function Rb(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Nb{constructor(e){Gu(this,"iframeIdToRemoteIdMap",new WeakMap),Gu(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 Pb{constructor(e){Gu(this,"iframes",new WeakMap),Gu(this,"crossOriginIframeMap",new WeakMap),Gu(this,"crossOriginIframeMirror",new Nb(xh)),Gu(this,"crossOriginIframeStyleMirror"),Gu(this,"crossOriginIframeRootIdMap",new WeakMap),Gu(this,"mirror"),Gu(this,"mutationCb"),Gu(this,"wrappedEmit"),Gu(this,"loadListener"),Gu(this,"stylesheetManager"),Gu(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Nb(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 eb.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:eb.IncrementalSnapshot,data:{source:tb.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case eb.Meta:case eb.Load:case eb.DomContentLoaded:return!1;case eb.Plugin:return t;case eb.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case eb.IncrementalSnapshot:switch(t.data.source){case tb.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 tb.Drag:case tb.TouchMove:case tb.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case tb.ViewportResize:return!1;case tb.MediaInteraction:case tb.MouseInteraction:case tb.Scroll:case tb.CanvasMutation:case tb.Input:return this.replaceIds(t.data,e,["id"]),t;case tb.StyleSheetRule:case tb.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case tb.Font:return t;case tb.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case tb.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===ib.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class Tb{constructor(e){Gu(this,"shadowDoms",new WeakSet),Gu(this,"mutationCb"),Gu(this,"scrollCb"),Gu(this,"bypassOptions"),Gu(this,"mirror"),Gu(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(!oh(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=bb({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>r.disconnect())),this.restoreHandlers.push(Cb({...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(Nw.host(e))),this.restoreHandlers.push(Eb({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(Bw(e.prototype,"attachShadow",(function(e){return function(s){const n=e.call(this,s),o=Nw.shadowRoot(this);return o&&Qw(this)&&r.addShadowRoot(o,t),n}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Lb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Db="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Fb=0;Fb<64;Fb++)Db[Lb.charCodeAt(Fb)]=Fb;const Bb=new Map;const _b=(e,t,r)=>{if(!e||!zb(e,t)&&"object"!=typeof e)return;const s=function(e,t){let r=Bb.get(e);return r||(r=new Map,Bb.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 jb(e,t,r){if(e instanceof Array)return e.map((e=>jb(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+=Lb[r[t]>>2],n+=Lb[(3&r[t])<<4|r[t+1]>>4],n+=Lb[(15&r[t+1])<<2|r[t+2]>>6],n+=Lb[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:[jb(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:[jb(e.data,t,r),e.width,e.height]}}if(zb(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:_b(e,t,r)}}return e}const Ub=(e,t,r)=>e.map((e=>jb(e,t,r))),zb=(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 Wb(e,t,r,s){const n=[];try{const o=Bw(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(n,...o){if(!Vw(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 Vb(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=Bw(e,l,(function(e){return function(...i){const a=e.apply(this,i);if(_b(a,o,this),"tagName"in this.canvas&&!Vw(this.canvas,s,n,!0)){const e=Ub(i,o,this),s={type:t,property:l,args:e};r(this.canvas,s)}return a}}));i.push(a)}catch{const s=Fw(e,l,{set(e){r(this.canvas,{type:t,property:l,args:[e],setter:!0})}});i.push(s)}return i}const Gb="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Zb="undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),(e=>e.charCodeAt(0))))(Gb)],{type:"text/javascript;charset=utf-8"});function Yb(e){let t;try{if(t=Zb&&(window.URL||window.webkitURL).createObjectURL(Zb),!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,"+Gb,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class $b{constructor(e){Gu(this,"pendingCanvasMutations",new Map),Gu(this,"rafStamps",{latestId:0,invokeId:null}),Gu(this,"mirror"),Gu(this,"mutationCb"),Gu(this,"resetObservers"),Gu(this,"frozen",!1),Gu(this,"locked",!1),Gu(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=Wb(t,r,s,!0),i=new Map,a=new Yb;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:nb["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=>{Vw(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=Wb(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=Bw(t.CanvasRenderingContext2D.prototype,i,(function(n){return function(...o){return Vw(this.canvas,r,s,!0)||setTimeout((()=>{const r=Ub(o,t,this);e(this.canvas,{type:nb["2D"],property:i,args:r})}),0),n.apply(this,o)}}));n.push(o)}catch{const r=Fw(t.CanvasRenderingContext2D.prototype,i,{set(t){e(this.canvas,{type:nb["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(...Vb(t.WebGLRenderingContext.prototype,nb.WebGL,e,r,s,t)),void 0!==t.WebGL2RenderingContext&&n.push(...Vb(t.WebGL2RenderingContext.prototype,nb.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 Jb{constructor(e){Gu(this,"trackedLinkElements",new WeakSet),Gu(this,"mutationCb"),Gu(this,"adoptedStyleSheetCb"),Gu(this,"styleMirror",new Kw),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:ah(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 qb{constructor(){Gu(this,"nodeMap",new WeakMap),Gu(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 Kb,Xb,Hb,Qb=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(zu=e.contentWindow)?void 0:zu.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const eS=new lh;function tS(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:d,slimDOMOptions:p,maskInputFn:f,maskTextFn:m,hooks:g,packFn:y,sampling:v={},dataURLOptions:w={},mousemoveWait:b,recordDOM:S=!0,recordCanvas:C=!1,recordCrossOriginIframes:I=!1,recordAfter:x=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:k=!1,collectFonts:O=!1,inlineImages:E=!1,plugins:A,keepIframeSrcFn:M=()=>!1,ignoreCSSAttributes:R=new Set([]),errorHandler:N,applyBackgroundColorToBlockedElements:P=!1}=e;mb=N;const T=!I||window.parent===window;let L=!1;if(!T)try{window.parent.document&&(L=!1)}catch(e){L=!0}if(T&&!t)throw new Error("emit function is required");if(!T&&!L)return()=>{};void 0!==b&&void 0===v.mousemove&&(v.mousemove=b),eS.reset();const D=!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!==d?d:{password:!0},F=!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===p,headMetaDescKeywords:"all"===p,headTitleMutations:"all"===p}:p||{};let B;!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)}();let _=0;const j=e=>{for(const t of A||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!L&&(e=y(e)),e};Kb=(e,n)=>{var o;const i=e;if(i.timestamp=_w(),!(null==(o=vb[0])?void 0:o.isFrozen())||i.type===eb.FullSnapshot||i.type===eb.IncrementalSnapshot&&i.data.source===tb.Mutation||vb.forEach((e=>e.unfreeze())),T)null==t||t(j(i),n);else if(L){const e={type:"rrweb",event:j(i),origin:window.location.origin,isCheckout:n};window.parent.postMessage(e,"*")}if(i.type===eb.FullSnapshot)B=i,_=0;else if(i.type===eb.IncrementalSnapshot){if(i.data.source===tb.Mutation&&i.data.isAttachIframe)return;_++;const e=s&&_>=s,t=r&&i.timestamp-B.timestamp>r;(e||t)&&Xb(!0)}};const U=e=>{Kb({type:eb.IncrementalSnapshot,data:{source:tb.Mutation,...e}})},z=e=>Kb({type:eb.IncrementalSnapshot,data:{source:tb.Scroll,...e}}),W=e=>Kb({type:eb.IncrementalSnapshot,data:{source:tb.CanvasMutation,...e}}),V=new Jb({mutationCb:U,adoptedStyleSheetCb:e=>Kb({type:eb.IncrementalSnapshot,data:{source:tb.AdoptedStyleSheet,...e}})}),G=new Pb({mirror:eS,mutationCb:U,stylesheetManager:V,recordCrossOriginIframes:I,wrappedEmit:Kb});for(const e of A||[])e.getMirror&&e.getMirror({nodeMirror:eS,crossOriginIframeMirror:G.crossOriginIframeMirror,crossOriginIframeStyleMirror:G.crossOriginIframeStyleMirror});const Z=new qb;Hb=new $b({recordCanvas:C,mutationCb:W,win:window,blockClass:n,blockSelector:o,mirror:eS,sampling:v.canvas,dataURLOptions:w});const Y=new Tb({mutationCb:U,scrollCb:z,bypassOptions:{blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:D,dataURLOptions:w,maskTextFn:m,maskInputFn:f,recordCanvas:C,inlineImages:E,sampling:v,slimDOMOptions:F,iframeManager:G,stylesheetManager:V,canvasManager:Hb,keepIframeSrcFn:M,processedNodeManager:Z},mirror:eS});Xb=(e=!1)=>{if(!S)return;Kb({type:eb.Meta,data:{href:window.location.href,width:zw(),height:Uw()}},e),V.reset(),Y.init(),vb.forEach((e=>e.lock()));const t=function(e,t){const{mirror:r=new lh,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:d,slimDOM:p=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:b,keepIframeSrcFn:S=()=>!1,applyBackgroundColorToBlockedElements:C=!1}=t||{};return jh(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:d,slimDOMOptions:!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===p,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===p?{}:p,dataURLOptions:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:b,keepIframeSrcFn:S,newlyAddedElement:!1,applyBackgroundColorToBlockedElements:C})}(document,{mirror:eS,blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:D,maskTextFn:m,maskInputFn:f,slimDOM:F,dataURLOptions:w,recordCanvas:C,inlineImages:E,applyBackgroundColorToBlockedElements:P,onSerialize:e=>{$w(e,eS)&&G.addIframe(e),Jw(e,eS)&&V.trackLinkElement(e),qw(e)&&Y.addShadowRoot(Nw.shadowRoot(e),document)},onIframeLoad:(e,t)=>{G.attachIframe(e,t),Y.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{V.attachLinkElement(e,t)},keepIframeSrcFn:M});if(!t)return console.warn("Failed to snapshot the document");Kb({type:eb.FullSnapshot,data:{node:t,initialOffset:jw(window)}},e),vb.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,eS.getId(document))};try{const e=[],t=e=>{var t;return gb(Ab)({mutationCb:U,mousemoveCb:(e,t)=>Kb({type:eb.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Kb({type:eb.IncrementalSnapshot,data:{source:tb.MouseInteraction,...e}}),scrollCb:z,viewportResizeCb:e=>Kb({type:eb.IncrementalSnapshot,data:{source:tb.ViewportResize,...e}}),inputCb:e=>Kb({type:eb.IncrementalSnapshot,data:{source:tb.Input,...e}}),mediaInteractionCb:e=>Kb({type:eb.IncrementalSnapshot,data:{source:tb.MediaInteraction,...e}}),styleSheetRuleCb:e=>Kb({type:eb.IncrementalSnapshot,data:{source:tb.StyleSheetRule,...e}}),styleDeclarationCb:e=>Kb({type:eb.IncrementalSnapshot,data:{source:tb.StyleDeclaration,...e}}),canvasMutationCb:W,fontCb:e=>Kb({type:eb.IncrementalSnapshot,data:{source:tb.Font,...e}}),selectionCb:e=>{Kb({type:eb.IncrementalSnapshot,data:{source:tb.Selection,...e}})},customElementCb:e=>{Kb({type:eb.IncrementalSnapshot,data:{source:tb.CustomElement,...e}})},blockClass:n,ignoreClass:i,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:D,inlineStylesheet:u,sampling:v,recordDOM:S,recordCanvas:C,inlineImages:E,userTriggeredOnInput:k,collectFonts:O,doc:e,maskInputFn:f,maskTextFn:m,keepIframeSrcFn:M,blockSelector:o,slimDOMOptions:F,dataURLOptions:w,mirror:eS,iframeManager:G,stylesheetManager:V,shadowDomManager:Y,processedNodeManager:Z,canvasManager:Hb,ignoreCSSAttributes:R,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=>Kb({type:eb.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},g)};G.addLoadListener((r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}}));const r=()=>{Xb(),e.push(t(document)),Qb=!0};return"interactive"===document.readyState||"complete"===document.readyState?r():(e.push(Pw("DOMContentLoaded",(()=>{Kb({type:eb.DomContentLoaded,data:{}}),"DOMContentLoaded"===x&&r()}))),e.push(Pw("load",(()=>{Kb({type:eb.Load,data:{}}),"load"===x&&r()}),window))),()=>{e.forEach((e=>e())),Z.destroy(),Qb=!1,mb=void 0}}catch(e){console.warn(e)}}var rS;tS.addCustomEvent=(e,t)=>{if(!Qb)throw new Error("please add custom event after start recording");Kb({type:eb.Custom,data:{tag:e,payload:t}})},tS.freezePage=()=>{vb.forEach((e=>e.freeze()))},tS.takeFullSnapshot=e=>{if(!Qb)throw new Error("please take full snapshot after start recording");Xb(e)},tS.mirror=eS,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(rS||(rS={}));var sS=Object.freeze({__proto__:null,record:tS});var nS=Object.freeze({__proto__:null,NetworkObservers:class{constructor(){this.fetchObserver=null}start(e){this.eventCallback=e,this.observeFetch()}stop(){var e;null===(e=this.fetchObserver)||void 0===e||e.call(this),this.fetchObserver=null,this.eventCallback=void 0}notifyEvent(e){var t;null===(t=this.eventCallback)||void 0===t||t.call(this,e)}observeFetch(){const e=c();if(!e)return;const t=e.fetch;t&&(e.fetch=(e,r)=>s(this,void 0,void 0,(function*(){const s=Date.now(),n={timestamp:s,type:"fetch",method:(null==r?void 0:r.method)||"GET",url:e.toString(),requestHeaders:null==r?void 0:r.headers};try{const o=yield t(e,r),i=Date.now();n.status=o.status,n.duration=i-s;const a={};return o.headers.forEach(((e,t)=>{a[t]=e})),n.responseHeaders=a,this.notifyEvent(n),o}catch(e){const t=Date.now();n.duration=t-s;const r=e;throw n.error={name:r.name||"UnknownError",message:r.message||"An unknown error occurred"},this.notifyEvent(n),e}})),this.fetchObserver=()=>{e.fetch=t})}}});return e.SessionReplay=class{constructor(){this.name="@amplitude/session-replay-browser",this.recordCancelCallback=null,this.eventCount=0,this.pageLeaveFns=[],this.recordFunction=null,this.teardownEventListeners=e=>{const t=c();t&&(t.removeEventListener("blur",this.blurListener),t.removeEventListener("focus",this.focusListener),!e&&t.addEventListener("blur",this.blurListener),!e&&t.addEventListener("focus",this.focusListener),t.self&&"onpagehide"in t.self?(t.removeEventListener("pagehide",this.pageLeaveListener),!e&&t.addEventListener("pagehide",this.pageLeaveListener)):(t.removeEventListener("beforeunload",this.pageLeaveListener),!e&&t.addEventListener("beforeunload",this.pageLeaveListener)))},this.blurListener=()=>{this.sendEvents()},this.focusListener=()=>{this.recordEvents(!1)},this.pageLeaveListener=e=>{this.pageLeaveFns.forEach((t=>{t(e)}))},this.addCustomRRWebEvent=(e,t={},r=!0)=>s(this,void 0,void 0,(function*(){try{let s;const n=this.config;if(n&&e!==Z.METADATA&&(s={config:Q(n),version:ne},r)){const e=yield H();s=Object.assign(Object.assign({},e),s)}this.recordCancelCallback&&this.recordFunction?this.recordFunction.addCustomEvent(e,Object.assign(Object.assign({},t),s)):this.loggerProvider.debug(`Not able to add custom replay capture event ${e} due to no ongoing recording.`)}catch(e){this.loggerProvider.debug("Error while adding custom replay capture event: ",e)}})),this.stopRecordingEvents=()=>{var e;try{this.loggerProvider.log("Session Replay capture stopping."),this.recordCancelCallback&&this.recordCancelCallback(),this.recordCancelCallback=null,null===(e=this.networkObservers)||void 0===e||e.stop()}catch(e){const t=e;this.loggerProvider.warn(`Error occurred while stopping replay capture: ${t.toString()}`)}},this.loggerProvider=new ee(new d)}init(e,t){return u(this._init(e,t))}_init(e,t){var r,n,o,i,a,l;return s(this,void 0,void 0,(function*(){this.loggerProvider=new ee(t.loggerProvider||new d),Object.prototype.hasOwnProperty.call(t,"logLevel")&&this.loggerProvider.enable(t.logLevel),this.identifiers=new xt({sessionId:t.sessionId,deviceId:t.deviceId}),this.joinedConfigGenerator=yield((e,t)=>s(void 0,void 0,void 0,(function*(){const r=new te(e,t),s=yield _({localConfig:r,configKeys:["sessionReplay"]});return new re(s,r)})))(e,t);const{joinedConfig:u,localConfig:h,remoteConfig:p}=yield this.joinedConfigGenerator.generateJoinedConfig(this.identifiers.sessionId);if(this.config=u,this.setMetadata(t.sessionId,u,h,p,null===(r=t.version)||void 0===r?void 0:r.version,ne,null===(n=t.version)||void 0===n?void 0:n.type),t.sessionId&&(null===(o=this.config.interactionConfig)||void 0===o?void 0:o.enabled)){const e=It.default({sessionId:t.sessionId,type:"interaction"},this.config);this.pageLeaveFns=[e.send(this.getDeviceId.bind(this)).bind(e)],this.scrollHook=e.hook.bind(e)}const f=[];let{storeType:m}=this.config;"idb"!==m||(null===(i=c())||void 0===i?void 0:i.indexedDB)||(m="memory",this.loggerProvider.warn("Could not use preferred indexedDB storage, reverting to in memory option.")),this.loggerProvider.log(`Using ${m} for event storage.`);try{const e=yield _e({config:this.config,sessionId:this.identifiers.sessionId,type:"replay",storeType:m});f.push({name:"replay",manager:e})}catch(e){const t=e;this.loggerProvider.warn(`Error occurred while creating replay events manager: ${t.toString()}`)}if(null===(a=this.config.interactionConfig)||void 0===a?void 0:a.enabled){const e=this.config.interactionConfig.batch?bt:wt;try{const t=yield _e({config:this.config,sessionId:this.identifiers.sessionId,type:"interaction",minInterval:null!==(l=this.config.interactionConfig.trackEveryNms)&&void 0!==l?l:3e4,maxInterval:6e4,payloadBatcher:e,storeType:m});f.push({name:"interaction",manager:t})}catch(e){const t=e;this.loggerProvider.warn(`Error occurred while creating interaction events manager: ${t.toString()}`)}}this.eventsManager=new je(...f),this.eventCompressor&&this.eventCompressor.terminate(),this.eventCompressor=new nr(this.eventsManager,this.config,this.getDeviceId()),yield this.initializeNetworkObservers(),this.loggerProvider.log("Installing @amplitude/session-replay-browser."),this.teardownEventListeners(!1),this.initialize(!0)}))}setSessionId(e,t){return u(this.asyncSetSessionId(e,t))}asyncSetSessionId(e,t){return s(this,void 0,void 0,(function*(){const r=this.identifiers&&this.identifiers.sessionId;r&&this.sendEvents(r);const s=t||this.getDeviceId();if(this.identifiers=new xt({sessionId:e,deviceId:s}),this.joinedConfigGenerator&&r){const{joinedConfig:e}=yield this.joinedConfigGenerator.generateJoinedConfig(this.identifiers.sessionId);this.config=e}this.recordEvents()}))}getSessionReplayProperties(){const e=this.config,t=this.identifiers;if(!e||!t)return this.loggerProvider.warn("Session replay init has not been called, cannot get session replay properties."),{};const r=this.getShouldRecord();let s={};return r&&(s={[z]:t.sessionReplayId?t.sessionReplayId:null},e.debugMode&&(s[V]=JSON.stringify({appHash:J(e.apiKey).toString()}))),this.addCustomRRWebEvent(Z.GET_SR_PROPS,{shouldRecord:r,eventProperties:s},10===this.eventCount),10===this.eventCount&&(this.eventCount=0),this.eventCount++,s}sendEvents(e){var t;const 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})}initialize(e=!1){var t;return s(this,void 0,void 0,(function*(){if(!(null===(t=this.identifiers)||void 0===t?void 0:t.sessionId))return this.loggerProvider.log("Session is not being recorded due to lack of session id."),Promise.resolve();const r=this.getDeviceId();return 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."),Promise.resolve())}))}shouldOptOut(){var e,t;let r;if(null===(e=this.config)||void 0===e?void 0:e.instanceName){r=(s=this.config.instanceName,void 0===s&&(s="$default_instance"),E.getInstance(s)).identityStore.getIdentity().optOut}var s;return void 0!==r?r:null===(t=this.config)||void 0===t?void 0:t.optOut}getShouldRecord(){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 ${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 ${this.identifiers.sessionId} out of recording due to optOut config.`),!1;const e=function(e,t){const r=J(e.toString());return 31*Math.abs(r)%1e6/1e6<t}(this.identifiers.sessionId,this.config.sampleRate);return e||this.loggerProvider.log(`Opting session ${this.identifiers.sessionId} out of recording due to sample rate.`),e}getBlockSelectors(){var e,t,r;const 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}getMaskTextSelectors(){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"*";const 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}getRecordingPlugins(e){var t;return s(this,void 0,void 0,(function*(){const r=[];if(null===(t=null==e?void 0:e.console)||void 0===t?void 0:t.enabled)try{const{getRecordConsolePlugin:t}=yield Promise.resolve().then((function(){return Wu}));r.push(t({level:e.console.levels}))}catch(e){this.loggerProvider.warn("Failed to load console plugin:",e)}return r.length>0?r:void 0}))}getRecordFunction(){return s(this,void 0,void 0,(function*(){if(this.recordFunction)return this.recordFunction;try{const{record:e}=yield Promise.resolve().then((function(){return sS}));return this.recordFunction=e,e}catch(e){return this.loggerProvider.warn("Failed to load rrweb-record module:",e),null}}))}recordEvents(e=!0){var t,r,n;return s(this,void 0,void 0,(function*(){const s=this.config,o=this.getShouldRecord(),i=null===(t=this.identifiers)||void 0===t?void 0:t.sessionId;if(!o||!i||!s)return;this.stopRecordingEvents();const a=yield this.getRecordFunction();if(!a)return;yield this.initializeNetworkObservers(),null===(r=this.networkObservers)||void 0===r||r.start((e=>{this.addCustomRRWebEvent(Z.FETCH_REQUEST,e)}));const{privacyConfig:l,interactionConfig:c,loggingConfig:u}=s,h=(null==c?void 0:c.enabled)?{mouseInteraction:this.eventsManager&&St(this.loggerProvider,{eventsManager:this.eventsManager,sessionId:i,deviceIdFn:this.getDeviceId.bind(this),mirror:a.mirror,ugcFilterRules:null!==(n=c.ugcFilterRules)&&void 0!==n?n:[]}),scroll:this.scrollHook}:{},d=(null==c?void 0:c.enabled)&&c.ugcFilterRules?c.ugcFilterRules:[];this.loggerProvider.log(`Session Replay capture beginning for ${i}.`);try{this.recordCancelCallback=a({emit:e=>{if(this.shouldOptOut())return this.loggerProvider.log(`Opting session ${i} out of recording due to optOut config.`),this.stopRecordingEvents(),void this.sendEvents();e.type===P.Meta&&(e.data.href=X(e.data.href,d)),this.eventCompressor&&this.eventCompressor.enqueueEvent(e,i)},inlineStylesheet:s.shouldInlineStylesheet,hooks:h,maskAllInputs:!0,maskTextClass:G,blockClass:"amp-block",blockSelector:this.getBlockSelectors(),applyBackgroundColorToBlockedElements:s.applyBackgroundColorToBlockedElements,maskInputFn:$("input",l),maskTextFn:$("text",l),maskTextSelector:this.getMaskTextSelectors(),recordCanvas:!1,errorHandler:e=>{const t=e;if(t.message.includes("insertRule")&&t.message.includes("CSSStyleSheet"))throw t;if(t._external_)throw t;return this.loggerProvider.warn("Error while capturing replay: ",t.toString()),!0},plugins:yield this.getRecordingPlugins(u)}),this.addCustomRRWebEvent(Z.DEBUG_INFO),e&&this.addCustomRRWebEvent(Z.METADATA,this.metadata)}catch(e){this.loggerProvider.warn("Failed to initialize session replay:",e)}}))}getDeviceId(){var e;return null===(e=this.identifiers)||void 0===e?void 0:e.deviceId}getSessionId(){var e;return null===(e=this.identifiers)||void 0===e?void 0:e.sessionId}flush(e=!1){var t;return s(this,void 0,void 0,(function*(){return null===(t=this.eventsManager)||void 0===t?void 0:t.flush(e)}))}shutdown(){this.teardownEventListeners(!0),this.stopRecordingEvents(),this.sendEvents()}mapSDKType(e){return"plugin"===e?"@amplitude/plugin-session-replay-browser":"segment"===e?"@amplitude/segment-session-replay-plugin":null}setMetadata(e,t,r,s,n,o,i){const a=(null==e?void 0:e.toString())?J(e.toString()):void 0;this.metadata={joinedConfig:t,localConfig:r,remoteConfig:s,sessionId:e,hashValue:a,sampleRate:t.sampleRate,replaySDKType:this.mapSDKType(i),replaySDKVersion:n,standaloneSDKType:"@amplitude/session-replay-browser",standaloneSDKVersion:o}}initializeNetworkObservers(){var e,t,r;return s(this,void 0,void 0,(function*(){if((null===(r=null===(t=null===(e=this.config)||void 0===e?void 0:e.loggingConfig)||void 0===t?void 0:t.network)||void 0===r?void 0:r.enabled)&&!this.networkObservers)try{const{NetworkObservers:e}=yield Promise.resolve().then((function(){return nS}));this.networkObservers=new e}catch(e){this.loggerProvider.warn("Failed to import or instantiate NetworkObservers:",e)}}))}},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
|
|
1
|
+
var sessionReplay=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)};var r=function(){return r=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},r.apply(this,arguments)};function s(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 n(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"==typeof SuppressedError&&SuppressedError;var o,i="".concat("AMP","_unsent"),a="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"}(o||(o={}));var l,c=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},u=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"}(l||(l={}));var h="Amplitude Logger ",d=function(){function e(){this.logLevel=l.None}return e.prototype.disable=function(){this.logLevel=l.None},e.prototype.enable=function(e){void 0===e&&(e=l.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<l.Verbose||console.log("".concat(h,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<l.Warn||console.warn("".concat(h,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<l.Error||console.error("".concat(h,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<l.Debug||console.log("".concat(h,"[Debug]: ").concat(e.join(" ")))},e}(),p=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:"$default_instance",logLevel:l.Warn,loggerProvider:new d,offline:!1,optOut:!1,serverUrl:a,serverZone:"US",useBatch:!1}},f=function(){function e(e){var t,r,s,n;this._optOut=!1;var o=p();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=g(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}(),m=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":a},g=function(e,t,r){if(void 0===e&&(e=""),void 0===t&&(t=p().serverZone),void 0===r&&(r=p().useBatch),e)return{serverUrl:e,serverZone:void 0};var s=["US","EU"].includes(t)?t:p().serverZone;return{serverZone:s,serverUrl:m(s,r)}},y=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:v(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),v=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},w=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}(),b=function(){return b=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},b.apply(this,arguments)};function S(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 C(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 I=function(e,t){var r,s,n=typeof e;if(n!==typeof t)return!1;try{for(var o=S(["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(!I(c,u))return!1;var h=!0;return Object.keys(e).forEach((function(r){I(e[r],t[r])||(h=!1)})),h}for(var d=0;d<e.length;d++)if(!I(e[d],t[d]))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 x,k=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=b({},this.identity.userProperties),r=b(b({},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=S(Object.entries(e)),u=c.next();!u.done;u=c.next()){var h=C(u.value,2),d=h[0],p=h[1];switch(d){case"$set":try{for(var f=(n=void 0,S(Object.entries(p))),m=f.next();!m.done;m=f.next()){var g=C(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,S(Object.keys(p))),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 b({},this.identity)},e.prototype.setIdentity=function(e){var t=b({},this.identity);this.identity=b({},e),I(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}(),O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:self,E=function(){function e(){this.identityStore=new k,this.eventBridge=new w,this.applicationContextProvider=new y}return e.getInstance=function(t){return O.analyticsConnectorInstances||(O.analyticsConnectorInstances={}),O.analyticsConnectorInstances[t]||(O.analyticsConnectorInstances[t]=new e),O.analyticsConnectorInstances[t]},e}(),A=function(){function e(){}return e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,r,s,n,i,a,l,c,u,h,d,p,f,m,g,y,v,w,b,S,C,I;if("object"!=typeof e)return null;var x=e.code||0,k=this.buildStatus(x);switch(k){case o.Success:return{status:k,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 o.Invalid:return{status:k,statusCode:x,body:{error:null!==(n=e.error)&&void 0!==n?n:"",missingField:null!==(i=e.missing_field)&&void 0!==i?i:"",eventsWithInvalidFields:null!==(a=e.events_with_invalid_fields)&&void 0!==a?a:{},eventsWithMissingFields:null!==(l=e.events_with_missing_fields)&&void 0!==l?l:{},eventsWithInvalidIdLengths:null!==(c=e.events_with_invalid_id_lengths)&&void 0!==c?c:{},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!==(d=e.silenced_devices)&&void 0!==d?d:[],silencedEvents:null!==(p=e.silenced_events)&&void 0!==p?p:[],throttledDevices:null!==(f=e.throttled_devices)&&void 0!==f?f:{},throttledEvents:null!==(m=e.throttled_events)&&void 0!==m?m:[]}};case o.PayloadTooLarge:return{status:k,statusCode:x,body:{error:null!==(g=e.error)&&void 0!==g?g:""}};case o.RateLimit:return{status:k,statusCode:x,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!==(I=e.throttled_events)&&void 0!==I?I:[]}};case o.Timeout:default:return{status:k,statusCode:x}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?o.Success:429===e?o.RateLimit:413===e?o.PayloadTooLarge:408===e?o.Timeout:e>=400&&e<500?o.Invalid:e>=500?o.Failed:o.Unknown},e}(),M=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return function(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)}(r,e),r.prototype.send=function(e,t){return s(this,void 0,void 0,(function(){var r,s,o;return n(this,(function(n){switch(n.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=n.sent()).text()];case 2:o=n.sent();try{return[2,this.buildResponse(JSON.parse(o))]}catch(e){return[2,this.buildResponse({code:s.status})]}return[2]}}))}))},r}(A);!function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(x||(x={}));var R,N,P=(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))(P||{}),T=(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))(T||{});!function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(R||(R={})),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"}(N||(N={}));var L=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,d,p,f,m,g,y,v,w,b,S,C;if("object"!=typeof e)return null;var I=e.code||0,x=this.buildStatus(I);switch(x){case N.Success:return{status:x,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 N.Invalid:return{status:x,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!==(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!==(d=e.silenced_events)&&void 0!==d?d:[],throttledDevices:null!==(p=e.throttled_devices)&&void 0!==p?p:{},throttledEvents:null!==(f=e.throttled_events)&&void 0!==f?f:[]}};case N.PayloadTooLarge:return{status:x,statusCode:I,body:{error:null!==(m=e.error)&&void 0!==m?m:""}};case N.RateLimit:return{status:x,statusCode:I,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 N.Timeout:default:return{status:x,statusCode:I}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?N.Success:429===e?N.RateLimit:413===e?N.PayloadTooLarge:408===e?N.Timeout:e>=400&&e<500?N.Invalid:e>=500?N.Failed:N.Unknown},e}(),D="Remote config fetch rejected due to timeout after 5 seconds",F="Unexpected error occurred",_=function(){function e(e){var t=e.localConfig,o=e.configKeys,i=this;this.retryTimeout=1e3,this.attempts=0,this.sessionTargetingMatch=!1,this.metrics={},this.getRemoteNamespaceConfig=function(e,t){return s(i,void 0,void 0,(function(){var r,s,o;return n(this,(function(n){switch(n.label){case 0:return r=Date.now(),[4,this.fetchWithTimeout(t)];case 1:return(s=n.sent())&&(o=s.configs&&s.configs[e])?(this.metrics.fetchTimeAPISuccess=Date.now()-r,[2,o]):(this.metrics.fetchTimeAPIFail=Date.now()-r,[2,void 0])}}))}))},this.getRemoteConfig=function(e,t,r){return s(i,void 0,void 0,(function(){var s;return n(this,(function(n){switch(n.label){case 0:return[4,this.getRemoteNamespaceConfig(e,r)];case 1:return[2,null==(s=n.sent())?void 0:s[t]]}}))}))},this.fetchWithTimeout=function(e){return s(i,void 0,void 0,(function(){var t,r,s;return n(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 s(i,void 0,void 0,(function(){var s,o,i,a,l,c,u,h,d,p,f,m;return n(this,(function(n){switch(n.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:D})];t!==this.lastFetchedSessionId&&(this.lastFetchedSessionId=t,this.attempts=0),n.label=1;case 1:n.trys.push([1,3,,4]),s=new URLSearchParams({api_key:this.localConfig.apiKey});try{for(o=function(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.")}(this.configKeys),i=o.next();!i.done;i=o.next())a=i.value,s.append("config_keys",a)}catch(e){p={error:e}}finally{try{i&&!i.done&&(f=o.return)&&f.call(o)}finally{if(p)throw p.error}}return t&&s.set("session_id",String(t)),l={headers:{Accept:"*/*"},method:"GET"},c="".concat(this.getServerUrl(),"?").concat(s.toString()),this.attempts+=1,[4,fetch(c,r(r({},l),{signal:e}))];case 2:if(null===(u=n.sent()))return[2,this.completeRequest({err:F})];switch((new L).buildStatus(u.status)){case N.Success:return this.attempts=0,[2,this.parseAndStoreConfig(u)];case N.Failed:return[2,this.retryFetch(e,t)];default:return[2,this.completeRequest({err:"Network error occurred, remote config fetch failed"})]}case 3:return h=n.sent(),d=h,e.aborted?[2,this.completeRequest({err:D})]:[2,this.completeRequest({err:null!==(m=d.message)&&void 0!==m?m:F})];case 4:return[2]}}))}))},this.retryFetch=function(e,t){return s(i,void 0,void 0,(function(){var r=this;return n(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 s(i,void 0,void 0,(function(){var t;return n(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=o}return e.prototype.getServerUrl=function(){return this.localConfig.configServerUrl?this.localConfig.configServerUrl:this.localConfig.serverZone===R.STAGING?"https://sr-client-cfg.stag2.amplitude.com/config":this.localConfig.serverZone===R.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}(),B=function(e){var t=e.localConfig,r=e.configKeys;return s(void 0,void 0,void 0,(function(){return n(this,(function(e){return[2,new _({localConfig:t,configKeys:r})]}))}))};const j="medium",U="[Amplitude]",z=`${U} Session Replay ID`,W=x.US,V={enabled:!0},G=`${U} Session Replay Debug`,Z="amp-mask";var Y;!function(e){e.GET_SR_PROPS="get-sr-props",e.DEBUG_INFO="debug-info",e.FETCH_REQUEST="fetch-request",e.METADATA="metadata"}(Y||(Y={}));const $=(e,t,r)=>{switch(t){case"light":{if("input"!==e)return!0;const t=r?function(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?t.toLowerCase():null}(r):"";return!!t&&(!!["password","hidden","email","tel"].includes(t)||!!r.autocomplete.startsWith("cc-"))}case"medium":case"conservative":return!0;default:return $(e,j,r)}},J=(e,t)=>(r,s)=>((e,t={defaultMaskLevel:j},r)=>{var s,n,o;if(r){if(r.closest("."+Z))return!0;const e=(null!==(s=t.maskSelector)&&void 0!==s?s:[]).some((e=>r.closest(e)));if(e)return!0;if(r.closest(".amp-unmask"))return!1;const o=(null!==(n=t.unmaskSelector)&&void 0!==n?n:[]).some((e=>r.closest(e)));if(o)return!1}return $(e,null!==(o=t.defaultMaskLevel)&&void 0!==o?o:j,r)})(e,t,s)?r.replace(/[^\s]/g,"*"):r,q=function(e){let t=0;if(0===e.length)return t;for(let r=0;r<e.length;r++){t=(t<<5)-t+e.charCodeAt(r),t|=0}return t},K=(e,t)=>t||(e===x.STAGING?"https://api-sr.stag2.amplitude.com/sessions/v2/track":e===x.EU?"https://api-sr.eu.amplitude.com/sessions/v2/track":"https://api-sr.amplitude.com/sessions/v2/track"),X=e=>{const t=e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".");return new RegExp(`^${t}$`)},H=(e,t)=>{for(const r of t){const t=X(r.selector);if(t.test(e))return e.replace(t,r.replacement)}return e},Q=()=>s(void 0,void 0,void 0,(function*(){try{const e=c();if(e){const{usage:t,quota:r,usageDetails:s}=yield e.navigator.storage.estimate(),n=t?Math.round(t/1024):0;return{totalStorageSize:n,percentOfQuota:t&&r?Math.round(1e3*(t/r+Number.EPSILON))/1e3:0,usageDetails:JSON.stringify(s)}}}catch(e){}return{totalStorageSize:0,percentOfQuota:0,usageDetails:""}})),ee=e=>{const t=Object.assign({},e),{apiKey:r}=t;return t.apiKey=`****${r.substring(r.length-4)}`,t};class te{constructor(e){this.logger=e,this.log=this.getSafeMethod("log"),this.warn=this.getSafeMethod("warn"),this.error=this.getSafeMethod("error"),this.debug=this.getSafeMethod("debug")}getSafeMethod(e){var t;if(!this.logger)return()=>{};const r=this.logger[e];if("function"==typeof r){return(null!==(t=r.__rrweb_original__)&&void 0!==t?t:r).bind(this.logger)}return()=>{}}enable(e){this.logger.enable(e)}disable(){this.logger.disable()}}class re extends f{constructor(e,t){var r,s;const n={flushMaxRetries:2,logLevel:l.Warn,loggerProvider:new d,transportProvider:new M};super(Object.assign(Object.assign({transportProvider:n.transportProvider,loggerProvider:new te(t.loggerProvider||n.loggerProvider)},t),{apiKey:e})),this.flushMaxRetries=void 0!==t.flushMaxRetries&&t.flushMaxRetries<=n.flushMaxRetries?t.flushMaxRetries:n.flushMaxRetries,this.apiKey=e,this.sampleRate=t.sampleRate||0,this.serverZone=t.serverZone||W,this.configServerUrl=t.configServerUrl,this.trackServerUrl=t.trackServerUrl,this.shouldInlineStylesheet=t.shouldInlineStylesheet,this.version=t.version,this.performanceConfig=t.performanceConfig||V,this.storeType=null!==(r=t.storeType)&&void 0!==r?r:"idb",this.applyBackgroundColorToBlockedElements=null!==(s=t.applyBackgroundColorToBlockedElements)&&void 0!==s&&s,t.privacyConfig&&(this.privacyConfig=t.privacyConfig),t.interactionConfig&&(this.interactionConfig=t.interactionConfig,this.interactionConfig.ugcFilterRules&&(e=>{if(!e.every((e=>"string"==typeof e.selector&&"string"==typeof e.replacement)))throw new Error("ugcFilterRules must be an array of objects with selector and replacement properties");if(!e.every((e=>{return"string"==typeof(t=e.selector)&&""!==t.trim()&&!!/^\/|^https?:\/\/[^\s]+$/.test(t);var t})))throw new Error("ugcFilterRules must be an array of objects with valid globs")})(this.interactionConfig.ugcFilterRules)),t.debugMode&&(this.debugMode=t.debugMode),t.experimental&&(this.experimental=t.experimental),t.omitElementTags&&(this.omitElementTags=t.omitElementTags)}}class se{constructor(e,t){this.localConfig=t,this.remoteConfigFetch=e}generateJoinedConfig(e){var t,r,n,o;return s(this,void 0,void 0,(function*(){const s=Object.assign({},this.localConfig);let i;s.optOut=this.localConfig.optOut,s.captureEnabled=!0;try{const r=yield this.remoteConfigFetch.getRemoteNamespaceConfig("sessionReplay",e);if(r){const e=r.sr_sampling_config,n=r.sr_privacy_config,o=null===(t=s.interactionConfig)||void 0===t?void 0:t.ugcFilterRules;s.interactionConfig=r.sr_interaction_config,s.interactionConfig&&o&&(s.interactionConfig.ugcFilterRules=o),s.loggingConfig=r.sr_logging_config,(e||n)&&(i={},e&&(i.sr_sampling_config=e),n&&(i.sr_privacy_config=n))}}catch(e){const t=e;this.localConfig.loggerProvider.warn(t.message),s.captureEnabled=!1}if(!i)return{localConfig:this.localConfig,joinedConfig:s,remoteConfig:i};const{sr_sampling_config:a,sr_privacy_config:l}=i;if(a&&Object.keys(a).length>0?(Object.prototype.hasOwnProperty.call(a,"capture_enabled")?s.captureEnabled=a.capture_enabled:s.captureEnabled=!1,Object.prototype.hasOwnProperty.call(a,"sample_rate")&&(s.sampleRate=a.sample_rate)):(s.captureEnabled=!0,this.localConfig.loggerProvider.debug("Remote config successfully fetched, but no values set for project, Session Replay capture enabled.")),l){const e=null!==(r=s.privacyConfig)&&void 0!==r?r:{},t={defaultMaskLevel:null!==(o=null!==(n=l.defaultMaskLevel)&&void 0!==n?n:e.defaultMaskLevel)&&void 0!==o?o:"medium",blockSelector:[],maskSelector:[],unmaskSelector:[]},i=e=>{var t,r,s;const n={};"string"==typeof e.blockSelector&&(e.blockSelector=[e.blockSelector]);for(const r of null!==(t=e.blockSelector)&&void 0!==t?t:[])n[r]="block";for(const t of null!==(r=e.maskSelector)&&void 0!==r?r:[])n[t]="mask";for(const t of null!==(s=e.unmaskSelector)&&void 0!==s?s:[])n[t]="unmask";return n},a=Object.assign(Object.assign({},i(e)),i(l));for(const[e,r]of Object.entries(a))"mask"===r?t.maskSelector.push(e):"block"===r?t.blockSelector.push(e):"unmask"===r&&t.unmaskSelector.push(e);s.privacyConfig=((e,t)=>{const r=document.createDocumentFragment(),s=(e=[])=>{if("string"==typeof e&&(e=[e]),e=e.filter((e=>{try{r.querySelector(e)}catch(r){return t.warn(`[session-replay-browser] omitting selector "${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})(t,this.localConfig.loggerProvider)}return this.localConfig.loggerProvider.debug(JSON.stringify({name:"session replay joined config",config:ee(s)},null,2)),{localConfig:this.localConfig,joinedConfig:s,remoteConfig:i}}))}}const ne="Failed to store session replay events in IndexedDB",oe="1.26.1";class ie{constructor({trackServerUrl:e,loggerProvider:t,payloadBatcher:r}){this.storageKey="",this.retryTimeout=1e3,this.scheduled=null,this.queue=[],this.loggerProvider=t,this.payloadBatcher=r||(e=>e),this.trackServerUrl=e}sendEventsList(e){this.addToQueue(Object.assign(Object.assign({},e),{attempts:0,timeout:0}))}addToQueue(...e){e.filter((e=>e.attempts<(e.flushMaxRetries||0)?(e.attempts+=1,!0):(this.completeRequest({context:e,err:"Session replay event batch rejected due to exceeded retry count"}),!1))).forEach((e=>{this.queue=this.queue.concat(e),0!==e.timeout?setTimeout((()=>{e.timeout=0,this.schedule(0)}),e.timeout):this.schedule(0)}))}schedule(e){this.scheduled||(this.scheduled=setTimeout((()=>{this.flush(!0).then((()=>{this.queue.length>0&&this.schedule(e)}))}),e))}flush(e=!1){return s(this,void 0,void 0,(function*(){const t=[],r=[];this.queue.forEach((e=>0===e.timeout?t.push(e):r.push(e))),this.queue=r,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),yield Promise.all(t.map((t=>this.send(t,e))))}))}send(e,t=!0){var r,n;return s(this,void 0,void 0,(function*(){const s=e.apiKey;if(!s)return this.completeRequest({context:e,err:"Session replay event batch not sent due to missing api key"});const o=e.deviceId;if(!o)return this.completeRequest({context:e,err:"Session replay event batch not sent due to missing device ID"});const i=(()=>{const e=c();return(null==e?void 0:e.location)?e.location.href:""})(),a=oe,l=e.sampleRate,u=new URLSearchParams({device_id:o,session_id:`${e.sessionId}`,type:`${e.type}`}),h=`${(null===(r=e.version)||void 0===r?void 0:r.type)||"standalone"}/${(null===(n=e.version)||void 0===n?void 0:n.version)||a}`,d=this.payloadBatcher({version:1,events:e.events});if(0!==d.events.length)try{const r={headers:{"Content-Type":"application/json",Accept:"*/*",Authorization:`Bearer ${s}`,"X-Client-Version":a,"X-Client-Library":h,"X-Client-Url":i.substring(0,1e3),"X-Client-Sample-Rate":`${l}`},body:JSON.stringify(d),method:"POST"},n=`${K(e.serverZone,this.trackServerUrl)}?${u.toString()}`,o=yield fetch(n,r);if(null===o)return void this.completeRequest({context:e,err:"Unexpected error occurred"});if(t)this.handleReponse(o.status,e);else{let t="";try{t=JSON.stringify(o.body,null,2)}catch(e){}this.completeRequest({context:e,success:`${o.status}: ${t}`})}}catch(t){this.completeRequest({context:e,err:t})}else this.completeRequest({context:e})}))}handleReponse(e,t){switch((new A).buildStatus(e)){case o.Success:this.handleSuccessResponse(t);break;case o.Failed:this.handleOtherResponse(t);break;default:this.completeRequest({context:t,err:"Network error occurred, event batch rejected"})}}handleSuccessResponse(e){const t=Math.round(new Blob(e.events).size/1024);this.completeRequest({context:e,success:`Session replay event batch tracked successfully for session id ${e.sessionId}, size of events: ${t} KB`})}handleOtherResponse(e){this.addToQueue(Object.assign(Object.assign({},e),{timeout:e.attempts*this.retryTimeout}))}completeRequest({context:e,err:t,success:r}){e.onComplete(),t?this.loggerProvider.warn(t):r&&this.loggerProvider.log(r)}}const ae=(e,t)=>t.some((t=>e instanceof t));let le,ce;const ue=new WeakMap,he=new WeakMap,de=new WeakMap;let pe={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return ue.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return ye(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function fe(e){pe=e(pe)}function me(e){return(ce||(ce=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(ve(this),t),ye(this.request)}:function(...t){return ye(e.apply(ve(this),t))}}function ge(e){return"function"==typeof e?me(e):(e instanceof IDBTransaction&&function(e){if(ue.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)}));ue.set(e,t)}(e),ae(e,le||(le=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,pe):e)}function ye(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(ye(e.result)),s()},o=()=>{r(e.error),s()};e.addEventListener("success",n),e.addEventListener("error",o)}));return de.set(t,e),t}(e);if(he.has(e))return he.get(e);const t=ge(e);return t!==e&&(he.set(e,t),de.set(t,e)),t}const ve=e=>de.get(e);const we=["get","getKey","getAll","getAllKeys","count"],be=["put","add","delete","clear"],Se=new Map;function Ce(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(Se.get(t))return Se.get(t);const r=t.replace(/FromIndex$/,""),s=t!==r,n=be.includes(r);if(!(r in(s?IDBIndex:IDBObjectStore).prototype)||!n&&!we.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 Se.set(t,o),o}fe((e=>({...e,get:(t,r,s)=>Ce(t,r)||e.get(t,r,s),has:(t,r)=>!!Ce(t,r)||e.has(t,r)})));const Ie=["continue","continuePrimaryKey","advance"],xe={},ke=new WeakMap,Oe=new WeakMap,Ee={get(e,t){if(!Ie.includes(t))return e[t];let r=xe[t];return r||(r=xe[t]=function(...e){ke.set(this,Oe.get(this)[t](...e))}),r}};async function*Ae(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const r=new Proxy(t,Ee);for(Oe.set(r,t),de.set(r,ve(t));t;)yield r,t=await(ke.get(r)||t.continue()),ke.delete(r)}function Me(e,t){return t===Symbol.asyncIterator&&ae(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&ae(e,[IDBIndex,IDBObjectStore])}fe((e=>({...e,get:(t,r,s)=>Me(t,r)?Ae:e.get(t,r,s),has:(t,r)=>Me(t,r)||e.has(t,r)})));class Re{get timeAtLastSplit(){return this._timeAtLastSplit}constructor(e){var t,r,s;this.minInterval=500,this.maxInterval=1e4,this.maxPersistedEventsSize=1e6,this.interval=this.minInterval,this._timeAtLastSplit=Date.now(),this.shouldSplitEventsList=(e,t)=>{const r=this.getStringSize(t);return this.getEventsArraySize(e)+r>=this.maxPersistedEventsSize||!!(Date.now()-this.timeAtLastSplit>this.interval&&e.length)&&(this.interval=Math.min(this.maxInterval,this.interval+this.minInterval),this._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}getStringSize(e){return e.length}getEventsArraySize(e){let t=0;for(const r of e)t+=this.getStringSize(r);return t+(2+Math.max(0,e.length-1)+2*e.length)}}var Ne;!function(e){e.RECORDING="recording",e.SENT="sent"}(Ne||(Ne={}));const Pe="sessionCurrentSequence",Te="sequencesToSend",Le=e=>s(void 0,void 0,void 0,(function*(){for(;e.length>0;){const t=10,r=e.splice(0,t);yield Promise.all(r)}})),De=e=>{let t,r;return e.objectStoreNames.contains(Pe)||(r=e.createObjectStore(Pe,{keyPath:"sessionId"})),e.objectStoreNames.contains(Te)||(t=e.createObjectStore(Te,{keyPath:"sequenceId",autoIncrement:!0}),t.createIndex("sessionId","sessionId")),{sequencesStore:t,currentSequenceStore:r}},Fe=e=>s(void 0,void 0,void 0,(function*(){return yield function(e,t,{blocked:r,upgrade:s,blocking:n,terminated:o}={}){const i=indexedDB.open(e,t),a=ye(i);return s&&i.addEventListener("upgradeneeded",(e=>{s(ye(i.result),e.oldVersion,e.newVersion,ye(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}(e,1,{upgrade:De})}));class _e extends Re{constructor(e){super(e),this.getSequencesToSend=()=>s(this,void 0,void 0,(function*(){try{const e=[];let t=yield this.db.transaction("sequencesToSend").store.openCursor();for(;t;){const{sessionId:r,events:s}=t.value;e.push({events:s,sequenceId:t.key,sessionId:r}),t=yield t.continue()}return e}catch(e){this.loggerProvider.warn(`${ne}: ${e}`)}})),this.storeCurrentSequence=e=>s(this,void 0,void 0,(function*(){try{const t=yield this.db.get(Pe,e);if(!t)return;const r=yield this.db.put(Te,{sessionId:e,events:t.events});return yield this.db.put(Pe,{sessionId:e,events:[]}),Object.assign(Object.assign({},t),{sessionId:e,sequenceId:r})}catch(e){this.loggerProvider.warn(`${ne}: ${e}`)}})),this.addEventToCurrentSequence=(e,t)=>s(this,void 0,void 0,(function*(){try{const r=this.db.transaction(Pe,"readwrite"),s=yield r.store.get(e);if(!s)return void(yield r.store.put({sessionId:e,events:[t]}));let n;if(this.shouldSplitEventsList(s.events,t))n=s.events,yield r.store.put({sessionId:e,events:[t]});else{const n=s.events.concat(t);yield r.store.put({sessionId:e,events:n})}if(yield r.done,!n)return;const o=yield this.storeSendingEvents(e,n);if(!o)return;return{events:n,sessionId:e,sequenceId:o}}catch(e){this.loggerProvider.warn(`${ne}: ${e}`)}})),this.storeSendingEvents=(e,t)=>s(this,void 0,void 0,(function*(){try{return yield this.db.put(Te,{sessionId:e,events:t})}catch(e){this.loggerProvider.warn(`${ne}: ${e}`)}})),this.cleanUpSessionEventsStore=(e,t)=>s(this,void 0,void 0,(function*(){if(t)try{yield this.db.delete(Te,t)}catch(e){this.loggerProvider.warn(`${ne}: ${e}`)}})),this.transitionFromKeyValStore=e=>s(this,void 0,void 0,(function*(){try{const t=yield function(){const e=c();return new Promise(((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{const 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)},s.onerror=function(){r(s.error)}}catch(e){r(e)}}))}();if(!t)return;const r=(e,t)=>s(this,void 0,void 0,(function*(){const r=t.sessionSequences,n=[];Object.keys(r).forEach((o=>{const i=parseInt(o,10),a=r[i];if(i===t.currentSequenceId){const t=a.events.map((t=>s(this,void 0,void 0,(function*(){return this.addEventToCurrentSequence(e,t)}))));n.push(...t)}else a.status!==Ne.SENT&&n.push(this.storeSendingEvents(e,a.events))})),yield Le(n)})),n=`${i}_${this.apiKey.substring(0,10)}`;try{const o=t.transaction("keyval").objectStore("keyval").getAll(n),i=new Promise((t=>{o.onsuccess=n=>s(this,void 0,void 0,(function*(){const s=n&&n.target.result,o=s&&s[0];if(o){const t=[];Object.keys(o).forEach((s=>{const n=parseInt(s,10),i=o[n];if(e===n)t.push(r(n,i));else{const e=i.sessionSequences;Object.keys(e).forEach((r=>{const s=parseInt(r,10);e[s].status!==Ne.SENT&&t.push(this.storeSendingEvents(n,e[s].events))}))}})),yield Le(t)}t()}))}));yield i;const a=c();a&&a.indexedDB.deleteDatabase("keyval-store")}catch(e){this.loggerProvider.warn(`Failed to transition session replay events from keyval to new store: ${e}`)}}catch(e){this.loggerProvider.warn(`Failed to access keyval store: ${e}. For more information, visit: https://www.docs.developers.amplitude.com/session-replay/sdks/standalone/#indexeddb-best-practices`)}})),this.apiKey=e.apiKey,this.db=e.db}static new(e,t,r){return s(this,void 0,void 0,(function*(){try{const s="replay"===e?"":`_${e}`,n=`${t.apiKey.substring(0,10)}_amp_session_replay_events${s}`,o=yield Fe(n),i=new _e(Object.assign(Object.assign({},t),{db:o}));return yield i.transitionFromKeyValStore(r),i}catch(e){t.loggerProvider.warn(`${ne}: ${e}`)}}))}getCurrentSequenceEvents(e){return s(this,void 0,void 0,(function*(){if(e){const t=yield this.db.get("sessionCurrentSequence",e);if(!t)return;return[t]}const t=[];for(const e of yield this.db.getAll("sessionCurrentSequence"))t.push(e);return t}))}}class Be extends Re{constructor(){super(...arguments),this.finalizedSequences={},this.sequences={},this.sequenceId=0}resetCurrentSequence(e){this.sequences[e]=[]}addSequence(e){const t=this.sequenceId++,r=[...this.sequences[e]];return this.finalizedSequences[t]={sessionId:e,events:r},this.resetCurrentSequence(e),{sequenceId:t,events:r,sessionId:e}}getSequencesToSend(){return s(this,void 0,void 0,(function*(){return Object.entries(this.finalizedSequences).map((([e,{sessionId:t,events:r}])=>({sequenceId:Number(e),sessionId:t,events:r})))}))}storeCurrentSequence(e){return s(this,void 0,void 0,(function*(){if(this.sequences[e])return this.addSequence(e)}))}addEventToCurrentSequence(e,t){return s(this,void 0,void 0,(function*(){let r;return this.sequences[e]||this.resetCurrentSequence(e),this.shouldSplitEventsList(this.sequences[e],t)&&(r=this.addSequence(e)),this.sequences[e].push(t),r}))}storeSendingEvents(e,t){return s(this,void 0,void 0,(function*(){return this.finalizedSequences[this.sequenceId]={sessionId:e,events:t},this.sequenceId++}))}cleanUpSessionEventsStore(e,t){return s(this,void 0,void 0,(function*(){void 0!==t&&delete this.finalizedSequences[t]}))}}const je=({config:e,sessionId:t,minInterval:r,maxInterval:n,type:o,payloadBatcher:i,storeType:a})=>s(void 0,void 0,void 0,(function*(){const l=new ie(Object.assign(Object.assign({},e),{loggerProvider:e.loggerProvider,payloadBatcher:i})),c=()=>new Be({loggerProvider:e.loggerProvider,maxInterval:n,minInterval:r}),u="idb"===a?yield s(void 0,void 0,void 0,(function*(){const s=yield _e.new(o,{loggerProvider:e.loggerProvider,minInterval:r,maxInterval:n,apiKey:e.apiKey},t);return e.loggerProvider.log("Failed to initialize idb store, falling back to memory store."),null!=s?s:c()})):c(),h=({events:t,sessionId:r,deviceId:n,sequenceId:i})=>{e.debugMode&&Q().then((({totalStorageSize:t,percentOfQuota:r,usageDetails:s})=>{e.loggerProvider.debug(`Total storage size: ${t} KB, percentage of quota: ${r}%, usage details: ${s}`)})).catch((()=>{})),l.sendEventsList({events:t,sessionId:r,flushMaxRetries:e.flushMaxRetries,apiKey:e.apiKey,deviceId:n,sampleRate:e.sampleRate,serverZone:e.serverZone,version:e.version,type:o,onComplete:()=>s(void 0,void 0,void 0,(function*(){yield u.cleanUpSessionEventsStore(r,i)}))})};return{sendCurrentSequenceEvents:({sessionId:t,deviceId:r})=>{u.storeCurrentSequence(t).then((e=>{e&&h({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:r})})).catch((t=>{e.loggerProvider.warn("Failed to get current sequence of session replay events for session:",t)}))},addEvent:({event:t,sessionId:r,deviceId:s})=>{u.addEventToCurrentSequence(r,t.data).then((e=>e&&h({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:s}))).catch((t=>{e.loggerProvider.warn("Failed to add event to session replay capture:",t)}))},sendStoredEvents:({deviceId:e})=>s(void 0,void 0,void 0,(function*(){const t=yield u.getSequencesToSend();t&&t.forEach((t=>{h({sequenceId:t.sequenceId,events:t.events,sessionId:t.sessionId,deviceId:e})}))})),flush:function(e=!1){return s(this,void 0,void 0,(function*(){return l.flush(e)}))}}}));class Ue{constructor(...e){const t=new Map;e.forEach((e=>{t.set(e.name,e.manager)})),this.managers=t}sendStoredEvents(e){return s(this,void 0,void 0,(function*(){const t=[];this.managers.forEach((r=>{t.push(r.sendStoredEvents(e))})),yield Promise.all(t)}))}addEvent({sessionId:e,event:t,deviceId:r}){var s;null===(s=this.managers.get(t.type))||void 0===s||s.addEvent({sessionId:e,event:t,deviceId:r})}sendCurrentSequenceEvents({sessionId:e,deviceId:t}){this.managers.forEach((r=>{r.sendCurrentSequenceEvents({sessionId:e,deviceId:t})}))}flush(e){return s(this,void 0,void 0,(function*(){const t=[];this.managers.forEach((r=>{t.push(r.flush(e))})),yield Promise.all(t)}))}}const ze={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},We={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ve={};function Ge(e){if(Ve[e])return Ve[e];const t=function(e){var t,r;const s=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return s&&globalThis[s]?globalThis[s]:void 0}(e)||globalThis[e],r=t.prototype,s=e in ze?ze[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 We?We[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)return Ve[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?Ve[e]=o:r}catch{return r}}const Ze={};function Ye(e,t,r){var s;const n=`${e}.${String(r)}`;if(Ze[n])return Ze[n].call(t);const o=Ge(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(Ze[n]=i,i.call(t)):t[r]}const $e={};function Je(e,t,r){const s=`${e}.${String(r)}`;if($e[s])return $e[s].bind(t);const n=Ge(e)[r];return"function"!=typeof n?t[r]:($e[s]=n,n.bind(t))}const qe={childNodes:function(e){return Ye("Node",e,"childNodes")},parentNode:function(e){return Ye("Node",e,"parentNode")},parentElement:function(e){return Ye("Node",e,"parentElement")},textContent:function(e){return Ye("Node",e,"textContent")},contains:function(e,t){return Je("Node",e,"contains")(t)},getRootNode:function(e){return Je("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Ye("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Ye("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Ye("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Ye("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Ge("MutationObserver").constructor}};function Ke(){const e=c();return(null==e?void 0:e.innerHeight)||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight||0}function Xe(){const e=c();return(null==e?void 0:e.innerWidth)||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth||0}let He,Qe,et;function tt(e,t){if(et=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";const r={root:document.body,idName:e=>!0,className:e=>!0,tagName:e=>!0,attr:(e,t)=>!1,seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};He=Object.assign(Object.assign({},r),t),Qe=function(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return e;if(e===t.root)return e.ownerDocument;return e}(He.root,r);let s=rt(e,"all",(()=>rt(e,"two",(()=>rt(e,"one",(()=>rt(e,"none")))))));if(s){const t=yt(vt(s,e));return t.length>0&&(s=t[0]),nt(s)}throw new Error("Selector was not found.")}function rt(e,t,r){let s=null,n=[],o=e,i=0;for(;o;){const e=(new Date).getTime()-et.getTime();if(void 0!==He.timeoutMs&&e>He.timeoutMs)throw new Error(`Timeout: Can't find a unique selector after ${e}ms`);let a=ft(at(o))||ft(...lt(o))||ft(...ct(o))||ft(ut(o))||[{name:"*",penalty:3}];const l=ht(o);if("all"==t)l&&(a=a.concat(a.filter(pt).map((e=>dt(e,l)))));else if("two"==t)a=a.slice(0,1),l&&(a=a.concat(a.filter(pt).map((e=>dt(e,l)))));else if("one"==t){const[e]=a=a.slice(0,1);l&&pt(e)&&(a=[dt(e,l)])}else"none"==t&&(a=[{name:"*",penalty:3}],l&&(a=[dt(a[0],l)]));for(let e of a)e.level=i;if(n.push(a),n.length>=He.seedMinLength&&(s=st(n,r),s))break;o=o.parentElement,i++}return s||(s=st(n,r)),!s&&r?r():s}function st(e,t){const r=yt(gt(e));if(r.length>He.threshold)return t?t():null;for(let e of r)if(it(e))return e;return null}function nt(e){let t=e[0],r=t.name;for(let s=1;s<e.length;s++){const n=e[s].level||0;r=t.level===n-1?`${e[s].name} > ${r}`:`${e[s].name} ${r}`,t=e[s]}return r}function ot(e){return e.map((e=>e.penalty)).reduce(((e,t)=>e+t),0)}function it(e){const t=nt(e);switch(Qe.querySelectorAll(t).length){case 0:throw new Error(`Can't select any node with this selector: ${t}`);case 1:return!0;default:return!1}}function at(e){const t=e.getAttribute("id");return t&&He.idName(t)?{name:"#"+CSS.escape(t),penalty:0}:null}function lt(e){const t=Array.from(e.attributes).filter((e=>He.attr(e.name,e.value)));return t.map((e=>({name:`[${CSS.escape(e.name)}="${CSS.escape(e.value)}"]`,penalty:.5})))}function ct(e){return Array.from(e.classList).filter(He.className).map((e=>({name:"."+CSS.escape(e),penalty:1})))}function ut(e){const t=e.tagName.toLowerCase();return He.tagName(t)?{name:t,penalty:2}:null}function ht(e){const t=e.parentNode;if(!t)return null;let r=t.firstChild;if(!r)return null;let s=0;for(;r&&(r.nodeType===Node.ELEMENT_NODE&&s++,r!==e);)r=r.nextSibling;return s}function dt(e,t){return{name:e.name+`:nth-child(${t})`,penalty:e.penalty+1}}function pt(e){return"html"!==e.name&&!e.name.startsWith("#")}function ft(...e){const t=e.filter(mt);return t.length>0?t:null}function mt(e){return null!=e}function*gt(e,t=[]){if(e.length>0)for(let r of e[0])yield*gt(e.slice(1,e.length),t.concat(r));else yield t}function yt(e){return[...e].sort(((e,t)=>ot(e)-ot(t)))}function*vt(e,t,r={counter:0,visited:new Map}){if(e.length>2&&e.length>He.optimizedMinLength)for(let s=1;s<e.length-1;s++){if(r.counter>He.maxNumberOfTries)return;r.counter+=1;const n=[...e];n.splice(s,1);const o=nt(n);if(r.visited.has(o))return;it(n)&&wt(n,t)&&(yield n,r.visited.set(o,!0),yield*vt(n,t,r))}}function wt(e,t){return Qe.querySelector(nt(e))===t}const bt=({version:e,events:t})=>{const r=[];return t.forEach((e=>{const t=JSON.parse(e);t.count=1,"click"===t.type&&r.push(t)})),{version:e,events:r}},St=({version:e,events:t})=>{const r=[];t.forEach((e=>{const t=JSON.parse(e);"click"===t.type&&r.push(t)}));const s=r.reduce(((e,t)=>{const{x:r,y:s,selector:n,timestamp:o}=t,i=o-o%36e5,a=`${r}:${s}:${null!=n?n:""}:${i}`;return e[a]?e[a].count+=1:e[a]=Object.assign(Object.assign({},t),{timestamp:i,count:1}),e}),{});return{version:e,events:Object.values(s)}},Ct=(e,{eventsManager:t,sessionId:r,deviceIdFn:s,mirror:n,ugcFilterRules:o})=>i=>{if(i.type!==T.Click)return;const a=c();if(!a)return;const{location:l,innerHeight:u,innerWidth:h}=a;if(!l)return;const{x:d,y:p}=i;if(void 0===d||void 0===p)return;const f=n.getNode(i.id);let m;if(f)try{m=tt(f)}catch(t){e.debug("error resolving selector from finder")}const{left:g,top:y}=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=qe.parentElement(o.body))||void 0===t?void 0:t.scrollLeft)||(null===(r=null==o?void 0:o.body)||void 0===r?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=qe.parentElement(o.body))||void 0===s?void 0:s.scrollTop)||(null===(n=null==o?void 0:o.body)||void 0===n?void 0:n.scrollTop)||0}}(a),v={x:d+g,y:p+y,selector:m,viewportHeight:u,viewportWidth:h,pageUrl:H(l.href,o),timestamp:Date.now(),type:"click"},w=s();w&&t.addEvent({sessionId:r,event:{type:"interaction",data:JSON.stringify(v)},deviceId:w})};class It{constructor(e,t){const r=c();r&&r.navigator&&"function"==typeof r.navigator.sendBeacon?this.sendBeacon=(e,t)=>{try{if(r.navigator.sendBeacon(e,JSON.stringify(t)))return!0}catch(e){}return!1}:this.sendBeacon=()=>!1,this.sendXhr=(e,t)=>{const r=new XMLHttpRequest;return r.open("POST",e,!0),r.setRequestHeader("Accept","*/*"),r.send(JSON.stringify(t)),!0},this.basePageUrl=K(t.serverZone,t.trackServerUrl),this.apiKey=t.apiKey,this.context=e}send(e,t){const{sessionId:r,type:s}=this.context,n=new URLSearchParams({device_id:e,session_id:String(r),type:String(s),api_key:this.apiKey}),o=`${this.basePageUrl}?${n.toString()}`;this.sendBeacon(o,t)||this.sendXhr(o,t)}}class xt{static default(e,t){return new xt(new It(e,t),t)}constructor(e,t){this.timestamp=Date.now(),this.hook=e=>{this.update(e)},this.send=e=>t=>{var r,s;const n=e(),o=c();o&&n&&this.transport.send(n,{version:1,events:[{maxScrollX:this._maxScrollX,maxScrollY:this._maxScrollY,maxScrollWidth:this._maxScrollWidth,maxScrollHeight:this._maxScrollHeight,viewportHeight:Ke(),viewportWidth:Xe(),pageUrl:H(o.location.href,null!==(s=null===(r=this.config.interactionConfig)||void 0===r?void 0:r.ugcFilterRules)&&void 0!==s?s:[]),timestamp:this.timestamp,type:"scroll"}]})},this._maxScrollX=0,this._maxScrollY=0,this._maxScrollWidth=Xe(),this._maxScrollHeight=Ke(),this.config=t,this.transport=e}get maxScrollX(){return this._maxScrollX}get maxScrollY(){return this._maxScrollY}get maxScrollWidth(){return this._maxScrollWidth}get maxScrollHeight(){return this._maxScrollHeight}update(e){const t=Date.now();if(e.x>this._maxScrollX){const r=Xe();this._maxScrollX=e.x;const s=e.x+r;s>this._maxScrollWidth&&(this._maxScrollWidth=s),this.timestamp=t}if(e.y>this._maxScrollY){const r=Ke();this._maxScrollY=e.y;const s=e.y+r;s>this._maxScrollHeight&&(this._maxScrollHeight=s),this.timestamp=t}}}class kt{constructor({sessionId:e,deviceId:t}){this.deviceId=t,this.sessionId=e,e&&t&&(this.sessionReplayId=((e,t)=>`${t}/${e}`)(e,t))}}var Ot=Uint8Array,Et=Uint16Array,At=Uint32Array,Mt=new Ot([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]),Rt=new Ot([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]),Nt=new Ot([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Pt=function(e,t){for(var r=new Et(31),s=0;s<31;++s)r[s]=t+=1<<e[s-1];var n=new At(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]},Tt=Pt(Mt,2),Lt=Tt[0],Dt=Tt[1];Lt[28]=258,Dt[258]=28;for(var Ft=Pt(Rt,0)[1],_t=new Et(32768),Bt=0;Bt<32768;++Bt){var jt=(43690&Bt)>>>1|(21845&Bt)<<1;jt=(61680&(jt=(52428&jt)>>>2|(13107&jt)<<2))>>>4|(3855&jt)<<4,_t[Bt]=((65280&jt)>>>8|(255&jt)<<8)>>>1}var Ut=function(e,t,r){for(var s=e.length,n=0,o=new Et(t);n<s;++n)++o[e[n]-1];var i,a=new Et(t);for(n=0;n<t;++n)a[n]=a[n-1]+o[n-1]<<1;if(r){i=new Et(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,d=h|(1<<u)-1;h<=d;++h)i[_t[h]>>>l]=c}else for(i=new Et(s),n=0;n<s;++n)i[n]=_t[a[e[n]-1]++]>>>15-e[n];return i},zt=new Ot(288);for(Bt=0;Bt<144;++Bt)zt[Bt]=8;for(Bt=144;Bt<256;++Bt)zt[Bt]=9;for(Bt=256;Bt<280;++Bt)zt[Bt]=7;for(Bt=280;Bt<288;++Bt)zt[Bt]=8;var Wt=new Ot(32);for(Bt=0;Bt<32;++Bt)Wt[Bt]=5;var Vt=Ut(zt,9,0),Gt=Ut(Wt,5,0),Zt=function(e){return(e/8|0)+(7&e&&1)},Yt=function(e,t,r){(null==r||r>e.length)&&(r=e.length);var s=new(e instanceof Et?Et:e instanceof At?At:Ot)(r-t);return s.set(e.subarray(t,r)),s},$t=function(e,t,r){r<<=7&t;var s=t/8|0;e[s]|=r,e[s+1]|=r>>>8},Jt=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},qt=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 Ot(0),0];if(1==n){var i=new Ot(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 d=o[0].s;for(s=1;s<n;++s)o[s].s>d&&(d=o[s].s);var p=new Et(d+1),f=Kt(r[u-1],p,0);if(f>t){s=0;var m=0,g=f-t,y=1<<g;for(o.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));s<n;++s){var v=o[s].s;if(!(p[v]>t))break;m+=y-(1<<f-p[v]),p[v]=t}for(m>>>=g;m>0;){var w=o[s].s;p[w]<t?m-=1<<t-p[w]++-1:++s}for(;s>=0&&m;--s){var b=o[s].s;p[b]==t&&(--p[b],++m)}f=t}return[new Ot(p),f]},Kt=function(e,t,r){return-1==e.s?Math.max(Kt(e.l,t,r+1),Kt(e.r,t,r+1)):t[e.s]=r},Xt=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Et(++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]},Ht=function(e,t){for(var r=0,s=0;s<t.length;++s)r+=e[s]*t[s];return r},Qt=function(e,t,r){var s=r.length,n=Zt(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)},er=function(e,t,r,s,n,o,i,a,l,c,u){$t(t,u++,r),++n[256];for(var h=qt(n,15),d=h[0],p=h[1],f=qt(o,15),m=f[0],g=f[1],y=Xt(d),v=y[0],w=y[1],b=Xt(m),S=b[0],C=b[1],I=new Et(19),x=0;x<v.length;++x)I[31&v[x]]++;for(x=0;x<S.length;++x)I[31&S[x]]++;for(var k=qt(I,7),O=k[0],E=k[1],A=19;A>4&&!O[Nt[A-1]];--A);var M,R,N,P,T=c+5<<3,L=Ht(n,zt)+Ht(o,Wt)+i,D=Ht(n,d)+Ht(o,m)+i+14+3*A+Ht(I,O)+(2*I[16]+3*I[17]+7*I[18]);if(T<=L&&T<=D)return Qt(t,u,e.subarray(l,l+c));if($t(t,u,1+(D<L)),u+=2,D<L){M=Ut(d,p,0),R=d,N=Ut(m,g,0),P=m;var F=Ut(O,E,0);$t(t,u,w-257),$t(t,u+5,C-1),$t(t,u+10,A-4),u+=14;for(x=0;x<A;++x)$t(t,u+3*x,O[Nt[x]]);u+=3*A;for(var _=[v,S],B=0;B<2;++B){var j=_[B];for(x=0;x<j.length;++x){var U=31&j[x];$t(t,u,F[U]),u+=O[U],U>15&&($t(t,u,j[x]>>>5&127),u+=j[x]>>>12)}}}else M=Vt,R=zt,N=Gt,P=Wt;for(x=0;x<a;++x)if(s[x]>255){U=s[x]>>>18&31;Jt(t,u,M[U+257]),u+=R[U+257],U>7&&($t(t,u,s[x]>>>23&31),u+=Mt[U]);var z=31&s[x];Jt(t,u,N[z]),u+=P[z],z>3&&(Jt(t,u,s[x]>>>5&8191),u+=Rt[z])}else Jt(t,u,M[s[x]]),u+=R[s[x]];return Jt(t,u,M[256]),u+R[256]},tr=new At([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),rr=function(e,t,r,s,n){return function(e,t,r,s,n,o){var i=e.length,a=new Ot(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=Qt(l,c,e.subarray(u,h)):(l[u]=o,c=Qt(l,c,e.subarray(u,i)))}else{for(var d=tr[t-1],p=d>>>13,f=8191&d,m=(1<<r)-1,g=new Et(32768),y=new Et(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 At(25e3),C=new Et(288),I=new Et(32),x=0,k=0,O=(u=0,0),E=0,A=0;u<i;++u){var M=b(u),R=32767&u,N=y[M];if(g[R]=N,y[M]=R,E<=u){var P=i-u;if((x>7e3||O>24576)&&P>423){c=er(e,l,0,S,C,I,k,O,A,u-A,c),O=x=k=0,A=u;for(var T=0;T<286;++T)C[T]=0;for(T=0;T<30;++T)I[T]=0}var L=2,D=0,F=f,_=R-N&32767;if(P>2&&M==b(u-_))for(var B=Math.min(p,P)-1,j=Math.min(32767,u),U=Math.min(258,P);_<=j&&--F&&R!=N;){if(e[u+L]==e[u+L-_]){for(var z=0;z<U&&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,N=G)}}}_+=(R=N)-(N=g[R])+32768&32767}if(D){S[O++]=268435456|Dt[L]<<18|Ft[D];var Y=31&Dt[L],$=31&Ft[D];k+=Mt[Y]+Rt[$],++C[257+Y],++I[$],E=u+L,++x}else S[O++]=e[u],++C[e[u]]}}c=er(e,l,o,S,C,I,k,O,A,u-A,c)}return Yt(a,0,s+Zt(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 sr(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=rr(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 nr=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}(sr(function(e,t){var r=e.length;if(!t&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var s=new Ot(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 Ot(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 Yt(s,0,n)}(JSON.stringify(t))),!0)};class or{constructor(e,t,r,s){var n,o,i;this.taskQueue=[],this.isProcessing=!1,this.compressEvent=e=>{const t=nr(e);return JSON.stringify(t)},this.addCompressedEventToManager=(e,t)=>{this.eventsManager&&this.deviceId&&this.eventsManager.addEvent({event:{type:"replay",data:e},sessionId:t,deviceId:this.deviceId})},this.addCompressedEvent=(e,t)=>{if(this.worker)this.worker.postMessage({event:e,sessionId:t});else{const r=this.compressEvent(e);this.addCompressedEventToManager(r,t)}},this.terminate=()=>{var e;null===(e=this.worker)||void 0===e||e.terminate()};const a=c();this.canUseIdleCallback=a&&"requestIdleCallback"in a,this.eventsManager=e,this.config=t,this.deviceId=r,this.timeout=(null===(n=t.performanceConfig)||void 0===n?void 0:n.timeout)||2e3;const l=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]),o=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]),a=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),o=0;o<31;++o)t[o]=n+=1<<r[o-1];var a=new f(t[30]);for(o=1;o<30;++o)for(var i=t[o];i<t[o+1];++i)a[i]=i-t[o]<<5|o;return[t,a]},v=i(t,2),u=v[0],s=v[1];u[28]=258,s[258]=28;for(var l=i(o,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,o=0,a=new e(n);o<t;++o)++a[r[o]-1];var i,v=new e(n);for(o=0;o<n;++o)v[o]=v[o-1]+a[o-1]<<1;if(f){i=new e(1<<n);var u=15-n;for(o=0;o<t;++o)if(r[o])for(var s=o<<4|r[o],l=n-r[o],h=v[r[o]-1]++<<l,g=h|(1<<l)-1;h<=g;++h)i[c[h]>>>u]=s}else for(i=new e(t),o=0;o<t;++o)i[o]=c[v[r[o]-1]++]>>>15-r[o];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,o){(null==o||o>r.length)&&(o=r.length);var a=new(r instanceof e?e:r instanceof f?f:n)(o-t);return a.set(r.subarray(t,o)),a},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=[],o=0;o<r.length;++o)r[o]&&t.push({s:o,f:r[o]});var a=t.length,i=t.slice();if(!a)return[new n(0),0];if(1==a){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!=a-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(o=1;o<a;++o)i[o].s>g&&(g=i[o].s);var w=new e(g+1),d=A(t[c-1],w,0);if(d>f){o=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}));o<a;++o){var b=i[o].s;if(!(w[b]>f))break;m+=y-(1<<d-w[b]),w[b]=f}for(m>>>=M;m>0;){var p=i[o].s;w[p]<f?m-=1<<f-w[p]++-1:++o}for(;o>=0&&m;--o){var C=i[o].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,o=r[0],a=1,i=function(r){f[t++]=r},v=1;v<=n;++v)if(r[v]==o&&v!=n)++a;else{if(!o&&a>2){for(;a>138;a-=138)i(32754);a>2&&(i(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(i(o),--a;a>6;a-=6)i(8304);a>2&&(i(a-3<<5|8208),a=0)}for(;a--;)i(o);a=1,o=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 o=0;o<f;++o)r[t+o+4]=e[o];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[a[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[a[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+=o[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,a,i,v,u){return function(r,a,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(!a||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[a-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],or=31&l[Q];j+=t[tr]+o[or],++N[257+tr],++W[or],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==a.level?6:a.level,null==a.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(r.length)))):12+a.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,o=e.length,a=0;a!=o;){for(var i=Math.min(a+5552,o);a<i;++a)t+=f+=e[a];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,o,a=D(r,n,2,4);return f=a,t=n.level,o=0==t?0:t<6?1:9==t?3:2,f[0]=120,f[1]=o<<6|(o?32-2*o:1),function(r,n,e){for(;e;++n)r[n]=e,e>>>=8}(a,a.length-4,e.d()),a}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)),o=0,a=function(r){t[o++]=r},i=0;i<f;++i){if(o+5>t.length){var v=new n(o+8+(f-i<<1));v.set(t),t=v}var u=r.charCodeAt(i);u<128||e?a(u):u<2048?(a(192|u>>>6),a(128|63&u)):u>55295&&u<57344?(a(240|(u=65536+(1047552&u)|1023&r.charCodeAt(++i))>>>18),a(128|u>>>12&63),a(128|u>>>6&63),a(128|63&u)):(a(224|u>>>12),a(128|u>>>6&63),a(128|63&u))}return p(t,0,o)}(JSON.stringify(e))),!0)};onmessage=r=>{const{event:n,sessionId:e}=r.data,f=JSON.stringify(J(n));postMessage({compressedEvent:f,sessionId:e})};const 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)&&a&&a.Worker&&l){t.loggerProvider.log("[Experimental] Enabling web worker for compression");const e=new Worker(URL.createObjectURL(new Blob([l],{type:"application/javascript"})));e.onerror=e=>{t.loggerProvider.error(e)},e.onmessage=e=>{const{compressedEvent:t,sessionId:r}=e.data;this.addCompressedEventToManager(t,r)},this.worker=e}}scheduleIdleProcessing(){this.isProcessing||(this.isProcessing=!0,requestIdleCallback((e=>{this.processQueue(e)}),{timeout:this.timeout}))}enqueueEvent(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))}processQueue(e){for(;this.taskQueue.length>0&&(e.timeRemaining()>0||e.didTimeout);){const e=this.taskQueue.shift();if(e){const{event:t,sessionId:r}=e;this.addCompressedEvent(t,r)}}this.taskQueue.length>0?requestIdleCallback((e=>{this.processQueue(e)}),{timeout:this.timeout}):this.isProcessing=!1}}var ir,ar=Object.defineProperty,lr=(e,t,r)=>((e,t,r)=>t in e?ar(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),cr=Object.defineProperty,ur=(e,t,r)=>((e,t,r)=>t in e?cr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),hr=Object.defineProperty,dr=(e,t,r)=>((e,t,r)=>t in e?hr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);const pr={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},fr={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},mr={};function gr(e){if(mr[e])return mr[e];const t=function(e){var t,r;const s=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return s&&globalThis[s]?globalThis[s]:void 0}(e)||globalThis[e],r=t.prototype,s=e in pr?pr[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 fr?fr[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)return mr[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?mr[e]=o:r}catch{return r}}const yr={};function vr(e,t,r){var s;const n=`${e}.${String(r)}`;if(yr[n])return yr[n].call(t);const o=gr(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(yr[n]=i,i.call(t)):t[r]}const wr={};function br(e,t,r){const s=`${e}.${String(r)}`;if(wr[s])return wr[s].bind(t);const n=gr(e)[r];return"function"!=typeof n?t[r]:(wr[s]=n,n.bind(t))}const Sr={childNodes:function(e){return vr("Node",e,"childNodes")},parentNode:function(e){return vr("Node",e,"parentNode")},parentElement:function(e){return vr("Node",e,"parentElement")},textContent:function(e){return vr("Node",e,"textContent")},contains:function(e,t){return br("Node",e,"contains")(t)},getRootNode:function(e){return br("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?vr("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?vr("Element",e,"shadowRoot"):null},querySelector:function(e,t){return vr("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return vr("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return gr("MutationObserver").constructor}};class Cr{constructor(){dr(this,"idNodeMap",new Map),dr(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 Ir(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&Ir(Sr.parentNode(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&Ir(Sr.parentNode(e),t,r)}function xr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function kr(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 Or={exports:{}},Er=String,Ar=function(){return{isColorSupported:!1,reset:Er,bold:Er,dim:Er,italic:Er,underline:Er,inverse:Er,hidden:Er,strikethrough:Er,black:Er,red:Er,green:Er,yellow:Er,blue:Er,magenta:Er,cyan:Er,white:Er,gray:Er,bgBlack:Er,bgRed:Er,bgGreen:Er,bgYellow:Er,bgBlue:Er,bgMagenta:Er,bgCyan:Er,bgWhite:Er}};Or.exports=Ar(),Or.exports.createColors=Ar;var Mr=Or.exports;const Rr=kr(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Nr=Mr,Pr=Rr,Tr=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=Nr.isColorSupported),Pr&&e&&(t=Pr(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}=Nr.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 Lr=Tr;Tr.default=Tr;var Dr={};Dr.isClean=Symbol("isClean"),Dr.my=Symbol("my");const Fr={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let _r=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 Fr[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=Fr[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 Br=_r;_r.default=_r;let jr=Br;function Ur(e,t){new jr(t).stringify(e)}var zr=Ur;Ur.default=Ur;let{isClean:Wr,my:Vr}=Dr,Gr=Lr,Zr=Br,Yr=zr;function $r(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=>$r(e,r))):("object"===o&&null!==n&&(n=$r(n)),r[s]=n)}return r}let Jr=class{constructor(e={}){this.raws={},this[Wr]=!1,this[Vr]=!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=$r(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 Gr(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[Wr]){this[Wr]=!1;let e=this;for(;e=e.parent;)e[Wr]=!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 Zr).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=Yr){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 qr=Jr;Jr.default=Jr;let Kr=qr,Xr=class extends Kr{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 Hr=Xr;Xr.default=Xr;var Qr={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:es,SourceMapGenerator:ts}=Rr,{existsSync:rs,readFileSync:ss}=Rr,{dirname:ns,join:os}=Rr;let is=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=ns(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new es(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=ns(e),rs(e))return this.mapFile=e,ss(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 es)return ts.fromSourceMap(t).toString();if(t instanceof ts)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=os(ns(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 as=is;is.default=is;let{SourceMapConsumer:ls,SourceMapGenerator:cs}=Rr,{fileURLToPath:us,pathToFileURL:hs}=Rr,{isAbsolute:ds,resolve:ps}=Rr,{nanoid:fs}=Qr,ms=Rr,gs=Lr,ys=as,vs=Symbol("fromOffsetCache"),ws=Boolean(ls&&cs),bs=Boolean(ps&&ds),Ss=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&&(!bs||/^\w+:\/\//.test(t.from)||ds(t.from)?this.file=t.from:this.file=ps(t.from)),bs&&ws){let e=new ys(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 "+fs(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 gs(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 gs(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&&(hs&&(n.input.url=hs(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[vs])r=this[vs];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[vs]=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:ps(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=ds(a.source)?hs(a.source):new URL(a.source,this.map.consumer().sourceRoot||hs(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(!us)throw new Error("file: protocol is not available in this PostCSS build");l.file=us(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 Cs=Ss;Ss.default=Ss,ms&&ms.registerInput&&ms.registerInput(Ss);let{SourceMapConsumer:Is,SourceMapGenerator:xs}=Rr,{dirname:ks,relative:Os,resolve:Es,sep:As}=Rr,{pathToFileURL:Ms}=Rr,Rs=Cs,Ns=Boolean(Is&&xs),Ps=Boolean(ks&&Es&&Os&&As);var Ts=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||ks(e.file);!1===this.mapOpts.sourcesContent?(t=new Is(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(),Ps&&Ns&&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=xs.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new xs({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 xs({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?ks(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=ks(Es(r,this.mapOpts.annotation)));let s=Os(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 Rs(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(Ms){let t=Ms(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;"\\"===As&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Ls=qr,Ds=class extends Ls{constructor(e){super(e),this.type="comment"}};var Fs=Ds;Ds.default=Ds;let _s,Bs,js,Us,{isClean:zs,my:Ws}=Dr,Vs=Hr,Gs=Fs,Zs=qr;function Ys(e){return e.map((e=>(e.nodes&&(e.nodes=Ys(e.nodes)),delete e.source,e)))}function $s(e){if(e[zs]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)$s(t)}let Js=class e extends Zs{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=Ys(_s(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 Vs(t)]}else if(t.selector)t=[new Bs(t)];else if(t.name)t=[new js(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Gs(t)]}return t.map((t=>(t[Ws]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[zs]&&$s(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=>{_s=e},Js.registerRule=e=>{Bs=e},Js.registerAtRule=e=>{js=e},Js.registerRoot=e=>{Us=e};var qs=Js;Js.default=Js,Js.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,js.prototype):"rule"===e.type?Object.setPrototypeOf(e,Bs.prototype):"decl"===e.type?Object.setPrototypeOf(e,Vs.prototype):"comment"===e.type?Object.setPrototypeOf(e,Gs.prototype):"root"===e.type&&Object.setPrototypeOf(e,Us.prototype),e[Ws]=!0,e.nodes&&e.nodes.forEach((e=>{Js.rebuild(e)}))};let Ks,Xs,Hs=qs,Qs=class extends Hs{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Ks(new Xs,this,e).stringify()}};Qs.registerLazyResult=e=>{Ks=e},Qs.registerProcessor=e=>{Xs=e};var en=Qs;Qs.default=Qs;let tn={};var rn=function(e){tn[e]||(tn[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let sn=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 nn=sn;sn.default=sn;let on=nn,an=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 on(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var ln=an;an.default=an;const cn="'".charCodeAt(0),un='"'.charCodeAt(0),hn="\\".charCodeAt(0),dn="/".charCodeAt(0),pn="\n".charCodeAt(0),fn=" ".charCodeAt(0),mn="\f".charCodeAt(0),gn="\t".charCodeAt(0),yn="\r".charCodeAt(0),vn="[".charCodeAt(0),wn="]".charCodeAt(0),bn="(".charCodeAt(0),Sn=")".charCodeAt(0),Cn="{".charCodeAt(0),In="}".charCodeAt(0),xn=";".charCodeAt(0),kn="*".charCodeAt(0),On=":".charCodeAt(0),En="@".charCodeAt(0),An=/[\t\n\f\r "#'()/;[\\\]{}]/g,Mn=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Rn=/.[\r\n"'(/\\]/,Nn=/[\da-f]/i;let Pn=qs,Tn=class extends Pn{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 Ln=Tn;Tn.default=Tn,Pn.registerAtRule(Tn);let Dn,Fn,_n=qs,Bn=class extends _n{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 Dn(new Fn,this,e).stringify()}};Bn.registerLazyResult=e=>{Dn=e},Bn.registerProcessor=e=>{Fn=e};var jn=Bn;Bn.default=Bn,_n.registerRoot(Bn);let Un={comma:e=>Un.split(e,[","],!0),space:e=>Un.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 zn=Un;Un.default=Un;let Wn=qs,Vn=zn,Gn=class extends Wn{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Vn.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 Zn=Gn;Gn.default=Gn,Wn.registerRule(Gn);let Yn=Hr,$n=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,d=e.css.valueOf(),p=t.ignoreErrors,f=d.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=d.charCodeAt(m),r){case pn:case fn:case gn:case yn:case mn:s=m;do{s+=1,r=d.charCodeAt(s)}while(r===fn||r===pn||r===gn||r===yn||r===mn);h=["space",d.slice(m,s)],m=s-1;break;case vn:case wn:case Cn:case In:case On:case xn:case Sn:{let e=String.fromCharCode(r);h=[e,e,m];break}case bn:if(c=g.length?g.pop()[1]:"",u=d.charCodeAt(m+1),"url"===c&&u!==cn&&u!==un&&u!==fn&&u!==pn&&u!==gn&&u!==mn&&u!==yn){s=m;do{if(a=!1,s=d.indexOf(")",s+1),-1===s){if(p||t){s=m;break}v("bracket")}for(l=s;d.charCodeAt(l-1)===hn;)l-=1,a=!a}while(a);h=["brackets",d.slice(m,s+1),m,s],m=s}else s=d.indexOf(")",m+1),o=d.slice(m,s+1),-1===s||Rn.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case cn:case un:n=r===cn?"'":'"',s=m;do{if(a=!1,s=d.indexOf(n,s+1),-1===s){if(p||t){s=m+1;break}v("string")}for(l=s;d.charCodeAt(l-1)===hn;)l-=1,a=!a}while(a);h=["string",d.slice(m,s+1),m,s],m=s;break;case En:An.lastIndex=m+1,An.test(d),s=0===An.lastIndex?d.length-1:An.lastIndex-2,h=["at-word",d.slice(m,s+1),m,s],m=s;break;case hn:for(s=m,i=!0;d.charCodeAt(s+1)===hn;)s+=1,i=!i;if(r=d.charCodeAt(s+1),i&&r!==dn&&r!==fn&&r!==pn&&r!==gn&&r!==yn&&r!==mn&&(s+=1,Nn.test(d.charAt(s)))){for(;Nn.test(d.charAt(s+1));)s+=1;d.charCodeAt(s+1)===fn&&(s+=1)}h=["word",d.slice(m,s+1),m,s],m=s;break;default:r===dn&&d.charCodeAt(m+1)===kn?(s=d.indexOf("*/",m+2)+1,0===s&&(p||t?s=d.length:v("comment")),h=["comment",d.slice(m,s+1),m,s],m=s):(Mn.lastIndex=m+1,Mn.test(d),s=0===Mn.lastIndex?d.length-1:Mn.lastIndex-2,h=["word",d.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},Jn=Fs,qn=Ln,Kn=jn,Xn=Zn;const Hn={empty:!0,space:!0};var Qn=class{constructor(e){this.input=e,this.root=new Kn,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 qn;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 Jn;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=$n(this.input)}decl(e,t){let r=new Yn;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 Xn;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",Hn[a]||Hn[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 Xn;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 eo=qs,to=Qn,ro=Cs;function so(e,t){let r=new ro(e,t),s=new to(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 no=so;so.default=so,eo.registerParse(so);let{isClean:oo,my:io}=Dr,ao=Ts,lo=zr,co=qs,uo=en,ho=rn,po=ln,fo=no,mo=jn;const go={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},yo={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},vo={Once:!0,postcssPlugin:!0,prepare:!0};function wo(e){return"object"==typeof e&&"function"==typeof e.then}function bo(e){let t=!1,r=go[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 So(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:bo(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Co(e){return e[oo]=!1,e.nodes&&e.nodes.forEach((e=>Co(e))),e}let Io={},xo=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 po)n=Co(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=fo;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[io]&&co.rebuild(n)}else n=Co(r);this.result=new po(t,n,s),this.helpers={...Io,postcss:Io,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(!yo[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!vo[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(wo(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[oo];){e[oo]=!0;let t=[So(e)];for(;t.length>0;){let e=this.visitTick(t);if(wo(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 wo(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=lo;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new ao(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(wo(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[oo];)e[oo]=!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||ho("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(wo(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[oo])return s[oo]=!0,void e.push(So(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[oo]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[oo]=!0;let t=bo(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[oo]||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"}};xo.registerPostcss=e=>{Io=e};var ko=xo;xo.default=xo,mo.registerLazyResult(xo),uo.registerLazyResult(xo);let Oo=Ts,Eo=zr,Ao=rn,Mo=no;const Ro=ln;let No=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=Eo;this.result=new Ro(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new Oo(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||Ao("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=Mo;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 Po=No;No.default=No;let To=Po,Lo=ko,Do=en,Fo=jn,_o=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 Lo(this,e,t):new To(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Bo=_o;_o.default=_o,Fo.registerProcessor(_o),Do.registerProcessor(_o);let jo=Hr,Uo=as,zo=Fs,Wo=Ln,Vo=Cs,Go=jn,Zo=Zn;function Yo(e,t){if(Array.isArray(e))return e.map((e=>Yo(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Vo.prototype};r.map&&(r.map={...r.map,__proto__:Uo.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>Yo(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 Go(s);if("decl"===s.type)return new jo(s);if("rule"===s.type)return new Zo(s);if("comment"===s.type)return new zo(s);if("atrule"===s.type)return new Wo(s);throw new Error("Unknown node type: "+e.type)}var $o=Yo;Yo.default=Yo;let Jo=Lr,qo=Hr,Ko=ko,Xo=qs,Ho=Bo,Qo=zr,ei=$o,ti=en,ri=nn,si=Fs,ni=Ln,oi=ln,ii=Cs,ai=no,li=zn,ci=Zn,ui=jn,hi=qr;function di(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Ho(e)}di.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 Ho).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return di([n(r)]).process(e,t)},n},di.stringify=Qo,di.parse=ai,di.fromJSON=ei,di.list=li,di.comment=e=>new si(e),di.atRule=e=>new ni(e),di.decl=e=>new qo(e),di.rule=e=>new ci(e),di.root=e=>new ui(e),di.document=e=>new ti(e),di.CssSyntaxError=Jo,di.Declaration=qo,di.Container=Xo,di.Processor=Ho,di.Document=ti,di.Comment=si,di.Warning=ri,di.AtRule=ni,di.Result=oi,di.Input=ii,di.Rule=ci,di.Root=ui,di.Node=hi,Ko.registerPostcss(di);var pi=di;di.default=di;const fi=xr(pi);fi.stringify,fi.fromJSON,fi.plugin,fi.parse,fi.list,fi.document,fi.comment,fi.atRule,fi.rule,fi.decl,fi.root,fi.CssSyntaxError,fi.Declaration,fi.Container,fi.Processor,fi.Document,fi.Comment,fi.Warning,fi.AtRule,fi.Result,fi.Input,fi.Rule,fi.Root,fi.Node;var mi=Object.defineProperty,gi=(e,t,r)=>((e,t,r)=>t in e?mi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function yi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function vi(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 wi={exports:{}},bi=String,Si=function(){return{isColorSupported:!1,reset:bi,bold:bi,dim:bi,italic:bi,underline:bi,inverse:bi,hidden:bi,strikethrough:bi,black:bi,red:bi,green:bi,yellow:bi,blue:bi,magenta:bi,cyan:bi,white:bi,gray:bi,bgBlack:bi,bgRed:bi,bgGreen:bi,bgYellow:bi,bgBlue:bi,bgMagenta:bi,bgCyan:bi,bgWhite:bi}};wi.exports=Si(),wi.exports.createColors=Si;var Ci=wi.exports;const Ii=vi(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let xi=Ci,ki=Ii,Oi=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=xi.isColorSupported),ki&&e&&(t=ki(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}=xi.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 Ei=Oi;Oi.default=Oi;var Ai={};Ai.isClean=Symbol("isClean"),Ai.my=Symbol("my");const Mi={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Ri=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 Mi[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=Mi[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 Ni=Ri;Ri.default=Ri;let Pi=Ni;function Ti(e,t){new Pi(t).stringify(e)}var Li=Ti;Ti.default=Ti;let{isClean:Di,my:Fi}=Ai,_i=Ei,Bi=Ni,ji=Li;function Ui(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=>Ui(e,r))):("object"===o&&null!==n&&(n=Ui(n)),r[s]=n)}return r}let zi=class{constructor(e={}){this.raws={},this[Di]=!1,this[Fi]=!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=Ui(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 _i(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[Di]){this[Di]=!1;let e=this;for(;e=e.parent;)e[Di]=!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 Bi).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=ji){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 Wi=zi;zi.default=zi;let Vi=Wi,Gi=class extends Vi{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 Zi=Gi;Gi.default=Gi;var Yi={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:$i,SourceMapGenerator:Ji}=Ii,{existsSync:qi,readFileSync:Ki}=Ii,{dirname:Xi,join:Hi}=Ii;let Qi=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=Xi(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new $i(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=Xi(e),qi(e))return this.mapFile=e,Ki(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 $i)return Ji.fromSourceMap(t).toString();if(t instanceof Ji)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=Hi(Xi(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 ea=Qi;Qi.default=Qi;let{SourceMapConsumer:ta,SourceMapGenerator:ra}=Ii,{fileURLToPath:sa,pathToFileURL:na}=Ii,{isAbsolute:oa,resolve:ia}=Ii,{nanoid:aa}=Yi,la=Ii,ca=Ei,ua=ea,ha=Symbol("fromOffsetCache"),da=Boolean(ta&&ra),pa=Boolean(ia&&oa),fa=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&&(!pa||/^\w+:\/\//.test(t.from)||oa(t.from)?this.file=t.from:this.file=ia(t.from)),pa&&da){let e=new ua(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 "+aa(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 ca(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 ca(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&&(na&&(n.input.url=na(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[ha])r=this[ha];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[ha]=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:ia(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=oa(a.source)?na(a.source):new URL(a.source,this.map.consumer().sourceRoot||na(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(!sa)throw new Error("file: protocol is not available in this PostCSS build");l.file=sa(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 ma=fa;fa.default=fa,la&&la.registerInput&&la.registerInput(fa);let{SourceMapConsumer:ga,SourceMapGenerator:ya}=Ii,{dirname:va,relative:wa,resolve:ba,sep:Sa}=Ii,{pathToFileURL:Ca}=Ii,Ia=ma,xa=Boolean(ga&&ya),ka=Boolean(va&&ba&&wa&&Sa);var Oa=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||va(e.file);!1===this.mapOpts.sourcesContent?(t=new ga(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(),ka&&xa&&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=ya.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new ya({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 ya({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?va(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=va(ba(r,this.mapOpts.annotation)));let s=wa(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 Ia(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(Ca){let t=Ca(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;"\\"===Sa&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Ea=Wi,Aa=class extends Ea{constructor(e){super(e),this.type="comment"}};var Ma=Aa;Aa.default=Aa;let Ra,Na,Pa,Ta,{isClean:La,my:Da}=Ai,Fa=Zi,_a=Ma,Ba=Wi;function ja(e){return e.map((e=>(e.nodes&&(e.nodes=ja(e.nodes)),delete e.source,e)))}function Ua(e){if(e[La]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Ua(t)}let za=class e extends Ba{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=ja(Ra(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 Fa(t)]}else if(t.selector)t=[new Na(t)];else if(t.name)t=[new Pa(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new _a(t)]}return t.map((t=>(t[Da]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[La]&&Ua(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]}};za.registerParse=e=>{Ra=e},za.registerRule=e=>{Na=e},za.registerAtRule=e=>{Pa=e},za.registerRoot=e=>{Ta=e};var Wa=za;za.default=za,za.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Pa.prototype):"rule"===e.type?Object.setPrototypeOf(e,Na.prototype):"decl"===e.type?Object.setPrototypeOf(e,Fa.prototype):"comment"===e.type?Object.setPrototypeOf(e,_a.prototype):"root"===e.type&&Object.setPrototypeOf(e,Ta.prototype),e[Da]=!0,e.nodes&&e.nodes.forEach((e=>{za.rebuild(e)}))};let Va,Ga,Za=Wa,Ya=class extends Za{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Va(new Ga,this,e).stringify()}};Ya.registerLazyResult=e=>{Va=e},Ya.registerProcessor=e=>{Ga=e};var $a=Ya;Ya.default=Ya;let Ja={};var qa=function(e){Ja[e]||(Ja[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let Ka=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 Xa=Ka;Ka.default=Ka;let Ha=Xa,Qa=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 Ha(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var el=Qa;Qa.default=Qa;const tl="'".charCodeAt(0),rl='"'.charCodeAt(0),sl="\\".charCodeAt(0),nl="/".charCodeAt(0),ol="\n".charCodeAt(0),il=" ".charCodeAt(0),al="\f".charCodeAt(0),ll="\t".charCodeAt(0),cl="\r".charCodeAt(0),ul="[".charCodeAt(0),hl="]".charCodeAt(0),dl="(".charCodeAt(0),pl=")".charCodeAt(0),fl="{".charCodeAt(0),ml="}".charCodeAt(0),gl=";".charCodeAt(0),yl="*".charCodeAt(0),vl=":".charCodeAt(0),wl="@".charCodeAt(0),bl=/[\t\n\f\r "#'()/;[\\\]{}]/g,Sl=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Cl=/.[\r\n"'(/\\]/,Il=/[\da-f]/i;let xl=Wa,kl=class extends xl{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 Ol=kl;kl.default=kl,xl.registerAtRule(kl);let El,Al,Ml=Wa,Rl=class extends Ml{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 El(new Al,this,e).stringify()}};Rl.registerLazyResult=e=>{El=e},Rl.registerProcessor=e=>{Al=e};var Nl=Rl;Rl.default=Rl,Ml.registerRoot(Rl);let Pl={comma:e=>Pl.split(e,[","],!0),space:e=>Pl.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 Tl=Pl;Pl.default=Pl;let Ll=Wa,Dl=Tl,Fl=class extends Ll{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Dl.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 _l=Fl;Fl.default=Fl,Ll.registerRule(Fl);let Bl=Zi,jl=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,d=e.css.valueOf(),p=t.ignoreErrors,f=d.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=d.charCodeAt(m),r){case ol:case il:case ll:case cl:case al:s=m;do{s+=1,r=d.charCodeAt(s)}while(r===il||r===ol||r===ll||r===cl||r===al);h=["space",d.slice(m,s)],m=s-1;break;case ul:case hl:case fl:case ml:case vl:case gl:case pl:{let e=String.fromCharCode(r);h=[e,e,m];break}case dl:if(c=g.length?g.pop()[1]:"",u=d.charCodeAt(m+1),"url"===c&&u!==tl&&u!==rl&&u!==il&&u!==ol&&u!==ll&&u!==al&&u!==cl){s=m;do{if(a=!1,s=d.indexOf(")",s+1),-1===s){if(p||t){s=m;break}v("bracket")}for(l=s;d.charCodeAt(l-1)===sl;)l-=1,a=!a}while(a);h=["brackets",d.slice(m,s+1),m,s],m=s}else s=d.indexOf(")",m+1),o=d.slice(m,s+1),-1===s||Cl.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case tl:case rl:n=r===tl?"'":'"',s=m;do{if(a=!1,s=d.indexOf(n,s+1),-1===s){if(p||t){s=m+1;break}v("string")}for(l=s;d.charCodeAt(l-1)===sl;)l-=1,a=!a}while(a);h=["string",d.slice(m,s+1),m,s],m=s;break;case wl:bl.lastIndex=m+1,bl.test(d),s=0===bl.lastIndex?d.length-1:bl.lastIndex-2,h=["at-word",d.slice(m,s+1),m,s],m=s;break;case sl:for(s=m,i=!0;d.charCodeAt(s+1)===sl;)s+=1,i=!i;if(r=d.charCodeAt(s+1),i&&r!==nl&&r!==il&&r!==ol&&r!==ll&&r!==cl&&r!==al&&(s+=1,Il.test(d.charAt(s)))){for(;Il.test(d.charAt(s+1));)s+=1;d.charCodeAt(s+1)===il&&(s+=1)}h=["word",d.slice(m,s+1),m,s],m=s;break;default:r===nl&&d.charCodeAt(m+1)===yl?(s=d.indexOf("*/",m+2)+1,0===s&&(p||t?s=d.length:v("comment")),h=["comment",d.slice(m,s+1),m,s],m=s):(Sl.lastIndex=m+1,Sl.test(d),s=0===Sl.lastIndex?d.length-1:Sl.lastIndex-2,h=["word",d.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},Ul=Ma,zl=Ol,Wl=Nl,Vl=_l;const Gl={empty:!0,space:!0};var Zl=class{constructor(e){this.input=e,this.root=new Wl,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 zl;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 Ul;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=jl(this.input)}decl(e,t){let r=new Bl;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 Vl;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",Gl[a]||Gl[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 Vl;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 Yl=Wa,$l=Zl,Jl=ma;function ql(e,t){let r=new Jl(e,t),s=new $l(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 Kl=ql;ql.default=ql,Yl.registerParse(ql);let{isClean:Xl,my:Hl}=Ai,Ql=Oa,ec=Li,tc=Wa,rc=$a,sc=qa,nc=el,oc=Kl,ic=Nl;const ac={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},lc={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},cc={Once:!0,postcssPlugin:!0,prepare:!0};function uc(e){return"object"==typeof e&&"function"==typeof e.then}function hc(e){let t=!1,r=ac[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 dc(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:hc(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function pc(e){return e[Xl]=!1,e.nodes&&e.nodes.forEach((e=>pc(e))),e}let fc={},mc=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 nc)n=pc(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=oc;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[Hl]&&tc.rebuild(n)}else n=pc(r);this.result=new nc(t,n,s),this.helpers={...fc,postcss:fc,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(!lc[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!cc[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(uc(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Xl];){e[Xl]=!0;let t=[dc(e)];for(;t.length>0;){let e=this.visitTick(t);if(uc(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 uc(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=ec;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Ql(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(uc(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Xl];)e[Xl]=!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||sc("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(uc(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[Xl])return s[Xl]=!0,void e.push(dc(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[Xl]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Xl]=!0;let t=hc(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[Xl]||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"}};mc.registerPostcss=e=>{fc=e};var gc=mc;mc.default=mc,ic.registerLazyResult(mc),rc.registerLazyResult(mc);let yc=Oa,vc=Li,wc=qa,bc=Kl;const Sc=el;let Cc=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=vc;this.result=new Sc(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new yc(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||wc("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=bc;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 Ic=Cc;Cc.default=Cc;let xc=Ic,kc=gc,Oc=$a,Ec=Nl,Ac=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 kc(this,e,t):new xc(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Mc=Ac;Ac.default=Ac,Ec.registerProcessor(Ac),Oc.registerProcessor(Ac);let Rc=Zi,Nc=ea,Pc=Ma,Tc=Ol,Lc=ma,Dc=Nl,Fc=_l;function _c(e,t){if(Array.isArray(e))return e.map((e=>_c(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Lc.prototype};r.map&&(r.map={...r.map,__proto__:Nc.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>_c(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 Dc(s);if("decl"===s.type)return new Rc(s);if("rule"===s.type)return new Fc(s);if("comment"===s.type)return new Pc(s);if("atrule"===s.type)return new Tc(s);throw new Error("Unknown node type: "+e.type)}var Bc=_c;_c.default=_c;let jc=Ei,Uc=Zi,zc=gc,Wc=Wa,Vc=Mc,Gc=Li,Zc=Bc,Yc=$a,$c=Xa,Jc=Ma,qc=Ol,Kc=el,Xc=ma,Hc=Kl,Qc=Tl,eu=_l,tu=Nl,ru=Wi;function su(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Vc(e)}su.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 Vc).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return su([n(r)]).process(e,t)},n},su.stringify=Gc,su.parse=Hc,su.fromJSON=Zc,su.list=Qc,su.comment=e=>new Jc(e),su.atRule=e=>new qc(e),su.decl=e=>new Uc(e),su.rule=e=>new eu(e),su.root=e=>new tu(e),su.document=e=>new Yc(e),su.CssSyntaxError=jc,su.Declaration=Uc,su.Container=Wc,su.Processor=Vc,su.Document=Yc,su.Comment=Jc,su.Warning=$c,su.AtRule=qc,su.Result=Kc,su.Input=Xc,su.Rule=eu,su.Root=tu,su.Node=ru,zc.registerPostcss(su);var nu=su;su.default=su;const ou=yi(nu);ou.stringify,ou.fromJSON,ou.plugin,ou.parse,ou.list,ou.document,ou.comment,ou.atRule,ou.rule,ou.decl,ou.root,ou.CssSyntaxError,ou.Declaration,ou.Container,ou.Processor,ou.Document,ou.Comment,ou.Warning,ou.AtRule,ou.Result,ou.Input,ou.Rule,ou.Root,ou.Node;class iu{constructor(...e){gi(this,"parentElement",null),gi(this,"parentNode",null),gi(this,"ownerDocument"),gi(this,"firstChild",null),gi(this,"lastChild",null),gi(this,"previousSibling",null),gi(this,"nextSibling",null),gi(this,"ELEMENT_NODE",1),gi(this,"TEXT_NODE",3),gi(this,"nodeType"),gi(this,"nodeName"),gi(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 iu))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 au={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},lu={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},cu={};function uu(e){if(cu[e])return cu[e];const t=function(e){var t,r;const s=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return s&&globalThis[s]?globalThis[s]:void 0}(e)||globalThis[e],r=t.prototype,s=e in au?au[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 lu?lu[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)return cu[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?cu[e]=o:r}catch{return r}}const hu={};function du(e,t,r){var s;const n=`${e}.${String(r)}`;if(hu[n])return hu[n].call(t);const o=uu(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(hu[n]=i,i.call(t)):t[r]}const pu={};function fu(e,t,r){const s=`${e}.${String(r)}`;if(pu[s])return pu[s].bind(t);const n=uu(e)[r];return"function"!=typeof n?t[r]:(pu[s]=n,n.bind(t))}const mu={childNodes:function(e){return du("Node",e,"childNodes")},parentNode:function(e){return du("Node",e,"parentNode")},parentElement:function(e){return du("Node",e,"parentElement")},textContent:function(e){return du("Node",e,"textContent")},contains:function(e,t){return fu("Node",e,"contains")(t)},getRootNode:function(e){return fu("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?du("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?du("Element",e,"shadowRoot"):null},querySelector:function(e,t){return du("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return du("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return uu("MutationObserver").constructor}};const gu="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 yu={map:{},getId:()=>(console.error(gu),-1),getNode:()=>(console.error(gu),null),removeNodeFromMap(){console.error(gu)},has:()=>(console.error(gu),!1),reset(){console.error(gu)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(yu=new Proxy(yu,{get:(e,t,r)=>("map"===t&&console.error(gu),Reflect.get(e,t,r))}));let vu=Date.now;function wu(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:mu.parentElement(e)}/[1-9][0-9]{12}/.test(Date.now().toString())||(vu=()=>(new Date).getTime());function bu(e){var t;let r=null;return"getRootNode"in e&&(null==(t=mu.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&mu.host(mu.getRootNode(e))&&(r=mu.host(mu.getRootNode(e))),r}function Su(e){let t,r=e;for(;t=bu(r);)r=t;return r}function Cu(e){const t=e.ownerDocument;if(!t)return!1;const r=Su(e);return mu.contains(t,r)}const Iu=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){ur(this,"id",1),ur(this,"styleIDMap",new WeakMap),ur(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 yu},closestElementOfNode:wu,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:Su,getShadowHost:bu,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=mu.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=mu.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 iu&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(mu.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&&(mu.contains(t,e)||Cu(e))},isAncestorRemoved:function e(t,r){if(function(e){const t=e&&"host"in e&&"mode"in e&&Sr.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Sr.shadowRoot(t)===e)}(t))return!1;const s=r.getId(t);if(!r.has(s))return!0;const n=mu.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=wu(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(Ir(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 vu},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:Cu,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 xu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ku="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ou=0;Ou<64;Ou++)ku[xu.charCodeAt(Ou)]=Ou;var Eu,Au,Mu;"undefined"!=typeof window&&window.Blob&&new Blob([(Eu="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Uint8Array.from(atob(Eu),(e=>e.charCodeAt(0))))],{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==(ir=e.contentWindow)?void 0:ir.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}new Cr,(Mu=Au||(Au={}))[Mu.NotStarted=0]="NotStarted",Mu[Mu.Running=1]="Running",Mu[Mu.Stopped=2]="Stopped";class Ru{constructor(e){lr(this,"fileName"),lr(this,"functionName"),lr(this,"lineNumber"),lr(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 Nu=/(^|@)\S+:\d+/,Pu=/^\s*at .*(\S+:\d+|\(native\))/m,Tu=/^(eval@)?(\[native code])?$/,Lu={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Pu)?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(Pu)}),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 Ru({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(Tu)}),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 Ru({functionName:e});{const t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),s=r&&r[1]?r[1]:void 0,n=this.extractLocation(e.replace(t,""));return new Ru({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 Ru({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 Ru({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(Nu)&&!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 Ru({functionName:s,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function Du(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 Fu(e){return"[object Object]"===Object.prototype.toString.call(e)}function _u(e,t){if(0===t)return!0;const r=Object.keys(e);for(const s of r)if(Fu(e[s])&&_u(e[s],t-1))return!0;return!1}function Bu(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(Fu(e)&&Object.keys(e).length>r.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Fu(e)&&_u(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]=Du(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 ju={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 Uu(e,t,r){const s=r?Object.assign({},ju,r):ju,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=Lu.parse(n).map((e=>e.toString())),i=[Bu(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=[Bu(`Uncaught (in promise) ${r.name}: ${r.message}`,s.stringifyOptions)]):(r=new Error,n=[Bu("Uncaught (in promise)",s.stringifyOptions),Bu(t.reason,s.stringifyOptions)]);const o=Lu.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]?Iu.patch(t,r,(t=>(...n)=>{if(t.apply(this,n),!("assert"===r&&n[0]||a)){a=!0;try{const t=Lu.parse(new Error).map((e=>e.toString())).splice(1),o=("assert"===r?n.slice(1):n).map((e=>Bu(e,s.stringifyOptions)));i++,i<s.lengthThreshold?e({level:r,trace:t,payload:o}):i===s.lengthThreshold&&e({level:"warn",trace:[],payload:[Bu("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...n)}finally{a=!1}}})):()=>{}}}const zu="rrweb/console@1";var Wu,Vu=Object.freeze({__proto__:null,PLUGIN_NAME:zu,getRecordConsolePlugin:e=>({name:zu,observer:Uu,options:e})}),Gu=Object.defineProperty,Zu=(e,t,r)=>((e,t,r)=>t in e?Gu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),Yu=Object.defineProperty,$u=(e,t,r)=>((e,t,r)=>t in e?Yu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),Ju=(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))(Ju||{});const qu={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ku={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Xu={};function Hu(e){if(Xu[e])return Xu[e];const t=function(e){var t,r;const s=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return s&&globalThis[s]?globalThis[s]:void 0}(e)||globalThis[e],r=t.prototype,s=e in qu?qu[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 Ku?Ku[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)return Xu[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?Xu[e]=o:r}catch{return r}}const Qu={};function eh(e,t,r){var s;const n=`${e}.${String(r)}`;if(Qu[n])return Qu[n].call(t);const o=Hu(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(Qu[n]=i,i.call(t)):t[r]}const th={};function rh(e,t,r){const s=`${e}.${String(r)}`;if(th[s])return th[s].bind(t);const n=Hu(e)[r];return"function"!=typeof n?t[r]:(th[s]=n,n.bind(t))}const sh={childNodes:function(e){return eh("Node",e,"childNodes")},parentNode:function(e){return eh("Node",e,"parentNode")},parentElement:function(e){return eh("Node",e,"parentElement")},textContent:function(e){return eh("Node",e,"textContent")},contains:function(e,t){return rh("Node",e,"contains")(t)},getRootNode:function(e){return rh("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?eh("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?eh("Element",e,"shadowRoot"):null},querySelector:function(e,t){return eh("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return eh("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Hu("MutationObserver").constructor}};function nh(e){return e.nodeType===e.ELEMENT_NODE}function oh(e){const t=e&&"host"in e&&"mode"in e&&sh.host(e)||null;return Boolean(t&&"shadowRoot"in t&&sh.shadowRoot(t)===e)}function ih(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function ah(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=>lh(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 lh(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=ah(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?wh(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?wh(r,t):r}}class ch{constructor(){$u(this,"idNodeMap",new Map),$u(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 uh({element:e,maskInputOptions:t,tagName:r,type:s,value:n,maskInputFn:o}){let i=n||"";const a=s&&hh(s);return(t[r.toLowerCase()]||a&&t[a])&&(i=o?o(i,e):"*".repeat(i.length)),i}function hh(e){return e.toLowerCase()}const dh="__rrweb_original__";function ph(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?hh(t):null}function fh(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 mh=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,gh=/^(?:[a-z+]+:)?\/\//i,yh=/^www\..*/i,vh=/^(data:)([^,]*),(.*)/i;function wh(e,t){return(e||"").replace(mh,((e,r,s,n,o,i)=>{const a=s||o||i,l=r||n||"";if(!a)return e;if(gh.test(a)||yh.test(a))return`url(${l}${a}${l})`;if(vh.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 bh(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Sh(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=bh(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=bh(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),d=t.split(h),p=-1;if(2===d.length)p=d[0].length;else if(d.length>2&&""===d[0]&&""!==s[a-1].textContent)p=t.indexOf(h,1);else if(1===d.length){if(h=h.substring(0,h.length-1),d=t.split(h),d.length<=1)return n.push(e),n;u=c+1}else u===l.length-1&&(p=t.indexOf(h));if(d.length>=2&&u>c){const e=s[a-1].textContent;if(e&&"string"==typeof e){const r=bh(e).length;p=t.indexOf(h,r)}-1===p&&(p=d[0].length)}if(-1!==p){let a=Math.floor(p/i);for(;a>0&&a<e.length;){if(o+=1,o>50*s.length)return n.push(e),n;const l=bh(e.substring(0,a),r);if(l.length===p){n.push(e.substring(0,a)),e=e.substring(a),t=t.substring(p);break}l.length<p?a+=Math.max(1,Math.floor((p-l.length)/i)):a-=Math.max(1,Math.floor((l.length-p)*i))}break}}}}return n.push(e),n}(e,t).join("/* rr_split */")}const Ch="lightgrey";let Ih=1;const xh=new RegExp("[^a-z0-9-_:]");function kh(){return Ih++}let Oh,Eh;const Ah=/^[^ \t\n\r\u000c]+/,Mh=/^[, \t\n\r\u000c]+/;const Rh=new WeakMap;function Nh(e,t){return t&&""!==t.trim()?Th(e,t):t}function Ph(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function Th(e,t){let r=Rh.get(e);if(r||(r=e.createElement("a"),Rh.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function Lh(e,t,r,s){return s?"src"===r||"href"===r&&("use"!==t||"#"!==s[0])||"xlink:href"===r&&"#"!==s[0]?Nh(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(Mh),!(r>=t.length);){let o=s(Ah);if(","===o.slice(-1))o=Nh(e,o.substring(0,o.length-1)),n.push(o);else{let s="";o=Nh(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?wh(s,Th(e)):"object"===t&&"data"===r?Nh(e,s):s:Nh(e,s):s}function Dh(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function Fh(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&Fh(sh.parentNode(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&Fh(sh.parentNode(e),t,r)}function _h(e,t,r,s){let n;if(nh(e)){if(n=e,!sh.childNodes(n).length)return!1}else{if(null===sh.parentElement(e))return!1;n=sh.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(Fh(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 Bh(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:i,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:c,maskInputFn:u,dataURLOptions:h={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:m=!1,cssCaptured:g=!1,applyBackgroundColorToBlockedElements:y=!1}=t,v=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:Ju.Document,childNodes:[],compatMode:e.compatMode}:{type:Ju.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Ju.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};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:d=!1,rootId:p,applyBackgroundColorToBlockedElements:f=!1}=t,m=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),g=function(e){if(e instanceof HTMLFormElement)return"form";const t=hh(e.tagName);return xh.test(t)?"div":t}(e);let y={};const v=e.attributes.length;for(let t=0;t<v;t++){const s=e.attributes[t];Dh(g,s.name,s.value)||(y[s.name]=Lh(r,g,hh(s.name),s.value))}if("link"===g&&o){const t=Array.from(r.styleSheets).find((t=>t.href===e.href));let s=null;t&&(s=ah(t)),s&&(delete y.rel,delete y.href,y._cssText=s)}if("style"===g&&e.sheet){let t=ah(e.sheet);t&&(e.childNodes.length>1&&(t=Sh(t,e)),y._cssText=t)}if("input"===g||"textarea"===g||"select"===g){const t=e.value,r=e.checked;"radio"!==y.type&&"checkbox"!==y.type&&"submit"!==y.type&&"button"!==y.type&&t?y.value=uh({element:e,type:ph(e),tagName:g,value:t,maskInputOptions:i,maskInputFn:a}):r&&(y.checked=r)}"option"===g&&(e.selected&&!i.select?y.selected=!0:delete y.selected);"dialog"===g&&e.open&&(y.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===g&&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=dh in n?n[dh]: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)||(y.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)&&(y.rr_dataURL=t)}if("img"===g&&c){Oh||(Oh=r.createElement("canvas"),Eh=Oh.getContext("2d"));const t=e,s=t.currentSrc||t.getAttribute("src")||"<unknown-src>",n=t.crossOrigin,o=()=>{t.removeEventListener("load",o);try{Oh.width=t.naturalWidth,Oh.height=t.naturalHeight,Eh.drawImage(t,0,0),y.rr_dataURL=Oh.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?y.crossOrigin=n:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}if("audio"===g||"video"===g){const t=y;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}d||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop));if(m){const{width:t,height:r}=e.getBoundingClientRect();y={class:y.class,rr_width:`${t}px`,rr_height:`${r}px`,...f?{rr_background_color:Ch}:{}}}"iframe"!==g||h(y.src)||(e.contentDocument||(y.rr_src=y.src),delete y.src);let w;try{customElements.get(g)&&(w=!0)}catch(e){}return{type:Ju.Element,tagName:g,attributes:y,childNodes:[],isSVG:Ph(e)||void 0,needBlock:m,rootId:p,isCustom:w}}(e,{doc:r,blockClass:n,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:u,dataURLOptions:h,inlineImages:d,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:m,rootId:v,applyBackgroundColorToBlockedElements:y});case e.TEXT_NODE:return function(e,t){const{needsMask:r,maskTextFn:s,rootId:n,cssCaptured:o}=t,i=sh.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=sh.textContent(e),c&&l&&(l=wh(l,Th(t.doc))));!c&&!u&&l&&r&&(l=s?s(l,sh.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:Ju.Text,textContent:l||"",rootId:n}}(e,{doc:r,needsMask:i,maskTextFn:c,rootId:v,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:Ju.CDATA,textContent:"",rootId:v};case e.COMMENT_NODE:return{type:Ju.Comment,textContent:sh.textContent(e)||"",rootId:v};default:return!1}}function jh(e){return null==e?"":e.toLowerCase()}function Uh(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:d,slimDOMOptions:p,dataURLOptions:f={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w=5e3,onStylesheetLoad:b,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:I=!1,cssCaptured:x=!1,applyBackgroundColorToBlockedElements:k=!1}=t;let{needsMask:O}=t,{preserveWhiteSpace:E=!0}=t;if(!O){O=_h(e,i,a,void 0===O)}const A=Bh(e,{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:O,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,keepIframeSrcFn:C,newlyAddedElement:I,cssCaptured:x,applyBackgroundColorToBlockedElements:k});if(!A)return console.warn(e,"not serialized"),null;let M;M=s.hasNode(e)?s.getId(e):function(e,t){if(t.comment&&e.type===Ju.Comment)return!0;if(e.type===Ju.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"===fh(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(jh(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===jh(e.attributes.name)||"icon"===jh(e.attributes.rel)||"apple-touch-icon"===jh(e.attributes.rel)||"shortcut icon"===jh(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&jh(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(jh(e.attributes.property).match(/^(og|twitter|fb):/)||jh(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===jh(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===jh(e.attributes.name)||"googlebot"===jh(e.attributes.name)||"bingbot"===jh(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===jh(e.attributes.name)||"generator"===jh(e.attributes.name)||"framework"===jh(e.attributes.name)||"publisher"===jh(e.attributes.name)||"progid"===jh(e.attributes.name)||jh(e.attributes.property).match(/^article:/)||jh(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===jh(e.attributes.name)||"yandex-verification"===jh(e.attributes.name)||"csrf-token"===jh(e.attributes.name)||"p:domain_verify"===jh(e.attributes.name)||"verify-v1"===jh(e.attributes.name)||"verification"===jh(e.attributes.name)||"shopify-checkout-api-token"===jh(e.attributes.name)))return!0}}return!1}(A,p)||!E&&A.type===Ju.Text&&!A.textContent.replace(/^\s+|\s+$/gm,"").length?-2:kh();const R=Object.assign(A,{id:M});if(s.add(e,R),-2===M)return null;y&&y(e);let N=!l;if(R.type===Ju.Element){N=N&&!R.needBlock,delete R.needBlock;const t=sh.shadowRoot(e);t&&ih(t)&&(R.isShadowHost=!0)}if((R.type===Ju.Document||R.type===Ju.Element)&&N){p.headWhitespace&&R.type===Ju.Element&&"head"===R.tagName&&(E=!1);const t={doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:O,maskTextClass:i,maskTextSelector:a,skipChild:l,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:d,slimDOMOptions:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:E,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C,cssCaptured:!1,applyBackgroundColorToBlockedElements:k};if(R.type===Ju.Element&&"textarea"===R.tagName&&void 0!==R.attributes.value);else{R.type===Ju.Element&&void 0!==R.attributes._cssText&&"string"==typeof R.attributes._cssText&&(t.cssCaptured=!0);for(const r of Array.from(sh.childNodes(e))){const e=Uh(r,t);e&&R.childNodes.push(e)}}let I=null;if(nh(e)&&(I=sh.shadowRoot(e)))for(const e of Array.from(sh.childNodes(I))){const r=Uh(e,t);r&&(ih(I)&&(r.isShadow=!0),R.childNodes.push(r))}}const P=sh.parentNode(e);return P&&oh(P)&&ih(P)&&(R.isShadow=!0),R.type===Ju.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=Uh(t,{doc:t,mirror:s,blockClass:n,blockSelector:o,needsMask:O,maskTextClass:i,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:d,slimDOMOptions:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:E,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C});r&&v(e,r)}}),w),R.type===Ju.Element&&"link"===R.tagName&&"string"==typeof R.attributes.rel&&("stylesheet"===R.attributes.rel||"preload"===R.attributes.rel&&"string"==typeof R.attributes.href&&"css"===fh(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=Uh(e,{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:O,maskTextClass:i,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:d,slimDOMOptions:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:E,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C});t&&b(e,t)}}),S),R}function zh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Wh(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 Vh={exports:{}},Gh=String,Zh=function(){return{isColorSupported:!1,reset:Gh,bold:Gh,dim:Gh,italic:Gh,underline:Gh,inverse:Gh,hidden:Gh,strikethrough:Gh,black:Gh,red:Gh,green:Gh,yellow:Gh,blue:Gh,magenta:Gh,cyan:Gh,white:Gh,gray:Gh,bgBlack:Gh,bgRed:Gh,bgGreen:Gh,bgYellow:Gh,bgBlue:Gh,bgMagenta:Gh,bgCyan:Gh,bgWhite:Gh}};Vh.exports=Zh(),Vh.exports.createColors=Zh;var Yh=Vh.exports;const $h=Wh(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Jh=Yh,qh=$h,Kh=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=Jh.isColorSupported),qh&&e&&(t=qh(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}=Jh.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 Xh=Kh;Kh.default=Kh;var Hh={};Hh.isClean=Symbol("isClean"),Hh.my=Symbol("my");const Qh={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let ed=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 Qh[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=Qh[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 td=ed;ed.default=ed;let rd=td;function sd(e,t){new rd(t).stringify(e)}var nd=sd;sd.default=sd;let{isClean:od,my:id}=Hh,ad=Xh,ld=td,cd=nd;function ud(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=>ud(e,r))):("object"===o&&null!==n&&(n=ud(n)),r[s]=n)}return r}let hd=class{constructor(e={}){this.raws={},this[od]=!1,this[id]=!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=ud(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 ad(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[od]){this[od]=!1;let e=this;for(;e=e.parent;)e[od]=!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 ld).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=cd){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 dd=hd;hd.default=hd;let pd=dd,fd=class extends pd{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 md=fd;fd.default=fd;var gd={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:yd,SourceMapGenerator:vd}=$h,{existsSync:wd,readFileSync:bd}=$h,{dirname:Sd,join:Cd}=$h;let Id=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=Sd(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new yd(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=Sd(e),wd(e))return this.mapFile=e,bd(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 yd)return vd.fromSourceMap(t).toString();if(t instanceof vd)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=Cd(Sd(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 xd=Id;Id.default=Id;let{SourceMapConsumer:kd,SourceMapGenerator:Od}=$h,{fileURLToPath:Ed,pathToFileURL:Ad}=$h,{isAbsolute:Md,resolve:Rd}=$h,{nanoid:Nd}=gd,Pd=$h,Td=Xh,Ld=xd,Dd=Symbol("fromOffsetCache"),Fd=Boolean(kd&&Od),_d=Boolean(Rd&&Md),Bd=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&&(!_d||/^\w+:\/\//.test(t.from)||Md(t.from)?this.file=t.from:this.file=Rd(t.from)),_d&&Fd){let e=new Ld(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 "+Nd(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 Td(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 Td(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&&(Ad&&(n.input.url=Ad(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Dd])r=this[Dd];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[Dd]=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:Rd(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=Md(a.source)?Ad(a.source):new URL(a.source,this.map.consumer().sourceRoot||Ad(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(!Ed)throw new Error("file: protocol is not available in this PostCSS build");l.file=Ed(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 jd=Bd;Bd.default=Bd,Pd&&Pd.registerInput&&Pd.registerInput(Bd);let{SourceMapConsumer:Ud,SourceMapGenerator:zd}=$h,{dirname:Wd,relative:Vd,resolve:Gd,sep:Zd}=$h,{pathToFileURL:Yd}=$h,$d=jd,Jd=Boolean(Ud&&zd),qd=Boolean(Wd&&Gd&&Vd&&Zd);var Kd=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||Wd(e.file);!1===this.mapOpts.sourcesContent?(t=new Ud(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(),qd&&Jd&&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=zd.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new zd({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 zd({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?Wd(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Wd(Gd(r,this.mapOpts.annotation)));let s=Vd(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 $d(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(Yd){let t=Yd(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;"\\"===Zd&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Xd=dd,Hd=class extends Xd{constructor(e){super(e),this.type="comment"}};var Qd=Hd;Hd.default=Hd;let ep,tp,rp,sp,{isClean:np,my:op}=Hh,ip=md,ap=Qd,lp=dd;function cp(e){return e.map((e=>(e.nodes&&(e.nodes=cp(e.nodes)),delete e.source,e)))}function up(e){if(e[np]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)up(t)}let hp=class e extends lp{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=cp(ep(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 ip(t)]}else if(t.selector)t=[new tp(t)];else if(t.name)t=[new rp(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new ap(t)]}return t.map((t=>(t[op]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[np]&&up(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]}};hp.registerParse=e=>{ep=e},hp.registerRule=e=>{tp=e},hp.registerAtRule=e=>{rp=e},hp.registerRoot=e=>{sp=e};var dp=hp;hp.default=hp,hp.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,rp.prototype):"rule"===e.type?Object.setPrototypeOf(e,tp.prototype):"decl"===e.type?Object.setPrototypeOf(e,ip.prototype):"comment"===e.type?Object.setPrototypeOf(e,ap.prototype):"root"===e.type&&Object.setPrototypeOf(e,sp.prototype),e[op]=!0,e.nodes&&e.nodes.forEach((e=>{hp.rebuild(e)}))};let pp,fp,mp=dp,gp=class extends mp{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new pp(new fp,this,e).stringify()}};gp.registerLazyResult=e=>{pp=e},gp.registerProcessor=e=>{fp=e};var yp=gp;gp.default=gp;let vp={};var wp=function(e){vp[e]||(vp[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let bp=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 Sp=bp;bp.default=bp;let Cp=Sp,Ip=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 Cp(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var xp=Ip;Ip.default=Ip;const kp="'".charCodeAt(0),Op='"'.charCodeAt(0),Ep="\\".charCodeAt(0),Ap="/".charCodeAt(0),Mp="\n".charCodeAt(0),Rp=" ".charCodeAt(0),Np="\f".charCodeAt(0),Pp="\t".charCodeAt(0),Tp="\r".charCodeAt(0),Lp="[".charCodeAt(0),Dp="]".charCodeAt(0),Fp="(".charCodeAt(0),_p=")".charCodeAt(0),Bp="{".charCodeAt(0),jp="}".charCodeAt(0),Up=";".charCodeAt(0),zp="*".charCodeAt(0),Wp=":".charCodeAt(0),Vp="@".charCodeAt(0),Gp=/[\t\n\f\r "#'()/;[\\\]{}]/g,Zp=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Yp=/.[\r\n"'(/\\]/,$p=/[\da-f]/i;let Jp=dp,qp=class extends Jp{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 Kp=qp;qp.default=qp,Jp.registerAtRule(qp);let Xp,Hp,Qp=dp,ef=class extends Qp{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 Xp(new Hp,this,e).stringify()}};ef.registerLazyResult=e=>{Xp=e},ef.registerProcessor=e=>{Hp=e};var tf=ef;ef.default=ef,Qp.registerRoot(ef);let rf={comma:e=>rf.split(e,[","],!0),space:e=>rf.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 sf=rf;rf.default=rf;let nf=dp,of=sf,af=class extends nf{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return of.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 lf=af;af.default=af,nf.registerRule(af);let cf=md,uf=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,d=e.css.valueOf(),p=t.ignoreErrors,f=d.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=d.charCodeAt(m),r){case Mp:case Rp:case Pp:case Tp:case Np:s=m;do{s+=1,r=d.charCodeAt(s)}while(r===Rp||r===Mp||r===Pp||r===Tp||r===Np);h=["space",d.slice(m,s)],m=s-1;break;case Lp:case Dp:case Bp:case jp:case Wp:case Up:case _p:{let e=String.fromCharCode(r);h=[e,e,m];break}case Fp:if(c=g.length?g.pop()[1]:"",u=d.charCodeAt(m+1),"url"===c&&u!==kp&&u!==Op&&u!==Rp&&u!==Mp&&u!==Pp&&u!==Np&&u!==Tp){s=m;do{if(a=!1,s=d.indexOf(")",s+1),-1===s){if(p||t){s=m;break}v("bracket")}for(l=s;d.charCodeAt(l-1)===Ep;)l-=1,a=!a}while(a);h=["brackets",d.slice(m,s+1),m,s],m=s}else s=d.indexOf(")",m+1),o=d.slice(m,s+1),-1===s||Yp.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case kp:case Op:n=r===kp?"'":'"',s=m;do{if(a=!1,s=d.indexOf(n,s+1),-1===s){if(p||t){s=m+1;break}v("string")}for(l=s;d.charCodeAt(l-1)===Ep;)l-=1,a=!a}while(a);h=["string",d.slice(m,s+1),m,s],m=s;break;case Vp:Gp.lastIndex=m+1,Gp.test(d),s=0===Gp.lastIndex?d.length-1:Gp.lastIndex-2,h=["at-word",d.slice(m,s+1),m,s],m=s;break;case Ep:for(s=m,i=!0;d.charCodeAt(s+1)===Ep;)s+=1,i=!i;if(r=d.charCodeAt(s+1),i&&r!==Ap&&r!==Rp&&r!==Mp&&r!==Pp&&r!==Tp&&r!==Np&&(s+=1,$p.test(d.charAt(s)))){for(;$p.test(d.charAt(s+1));)s+=1;d.charCodeAt(s+1)===Rp&&(s+=1)}h=["word",d.slice(m,s+1),m,s],m=s;break;default:r===Ap&&d.charCodeAt(m+1)===zp?(s=d.indexOf("*/",m+2)+1,0===s&&(p||t?s=d.length:v("comment")),h=["comment",d.slice(m,s+1),m,s],m=s):(Zp.lastIndex=m+1,Zp.test(d),s=0===Zp.lastIndex?d.length-1:Zp.lastIndex-2,h=["word",d.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},hf=Qd,df=Kp,pf=tf,ff=lf;const mf={empty:!0,space:!0};var gf=class{constructor(e){this.input=e,this.root=new pf,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 df;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 hf;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=uf(this.input)}decl(e,t){let r=new cf;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 ff;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",mf[a]||mf[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 ff;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 yf=dp,vf=gf,wf=jd;function bf(e,t){let r=new wf(e,t),s=new vf(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 Sf=bf;bf.default=bf,yf.registerParse(bf);let{isClean:Cf,my:If}=Hh,xf=Kd,kf=nd,Of=dp,Ef=yp,Af=wp,Mf=xp,Rf=Sf,Nf=tf;const Pf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Tf={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},Lf={Once:!0,postcssPlugin:!0,prepare:!0};function Df(e){return"object"==typeof e&&"function"==typeof e.then}function Ff(e){let t=!1,r=Pf[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 _f(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Ff(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Bf(e){return e[Cf]=!1,e.nodes&&e.nodes.forEach((e=>Bf(e))),e}let jf={},Uf=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 Mf)n=Bf(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=Rf;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[If]&&Of.rebuild(n)}else n=Bf(r);this.result=new Mf(t,n,s),this.helpers={...jf,postcss:jf,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(!Tf[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Lf[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(Df(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Cf];){e[Cf]=!0;let t=[_f(e)];for(;t.length>0;){let e=this.visitTick(t);if(Df(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 Df(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=kf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new xf(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(Df(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Cf];)e[Cf]=!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||Af("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(Df(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[Cf])return s[Cf]=!0,void e.push(_f(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[Cf]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Cf]=!0;let t=Ff(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[Cf]||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"}};Uf.registerPostcss=e=>{jf=e};var zf=Uf;Uf.default=Uf,Nf.registerLazyResult(Uf),Ef.registerLazyResult(Uf);let Wf=Kd,Vf=nd,Gf=wp,Zf=Sf;const Yf=xp;let $f=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=Vf;this.result=new Yf(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new Wf(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||Gf("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=Zf;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 Jf=$f;$f.default=$f;let qf=Jf,Kf=zf,Xf=yp,Hf=tf,Qf=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 Kf(this,e,t):new qf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var em=Qf;Qf.default=Qf,Hf.registerProcessor(Qf),Xf.registerProcessor(Qf);let tm=md,rm=xd,sm=Qd,nm=Kp,om=jd,im=tf,am=lf;function lm(e,t){if(Array.isArray(e))return e.map((e=>lm(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:om.prototype};r.map&&(r.map={...r.map,__proto__:rm.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>lm(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 im(s);if("decl"===s.type)return new tm(s);if("rule"===s.type)return new am(s);if("comment"===s.type)return new sm(s);if("atrule"===s.type)return new nm(s);throw new Error("Unknown node type: "+e.type)}var cm=lm;lm.default=lm;let um=Xh,hm=md,dm=zf,pm=dp,fm=em,mm=nd,gm=cm,ym=yp,vm=Sp,wm=Qd,bm=Kp,Sm=xp,Cm=jd,Im=Sf,xm=sf,km=lf,Om=tf,Em=dd;function Am(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new fm(e)}Am.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 fm).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return Am([n(r)]).process(e,t)},n},Am.stringify=mm,Am.parse=Im,Am.fromJSON=gm,Am.list=xm,Am.comment=e=>new wm(e),Am.atRule=e=>new bm(e),Am.decl=e=>new hm(e),Am.rule=e=>new km(e),Am.root=e=>new Om(e),Am.document=e=>new ym(e),Am.CssSyntaxError=um,Am.Declaration=hm,Am.Container=pm,Am.Processor=fm,Am.Document=ym,Am.Comment=wm,Am.Warning=vm,Am.AtRule=bm,Am.Result=Sm,Am.Input=Cm,Am.Rule=km,Am.Root=Om,Am.Node=Em,dm.registerPostcss(Am);var Mm=Am;Am.default=Am;const Rm=zh(Mm);Rm.stringify,Rm.fromJSON,Rm.plugin,Rm.parse,Rm.list,Rm.document,Rm.comment,Rm.atRule,Rm.rule,Rm.decl,Rm.root,Rm.CssSyntaxError,Rm.Declaration,Rm.Container,Rm.Processor,Rm.Document,Rm.Comment,Rm.Warning,Rm.AtRule,Rm.Result,Rm.Input,Rm.Rule,Rm.Root,Rm.Node;var Nm=Object.defineProperty,Pm=(e,t,r)=>((e,t,r)=>t in e?Nm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function Tm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Lm(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 Dm={exports:{}},Fm=String,_m=function(){return{isColorSupported:!1,reset:Fm,bold:Fm,dim:Fm,italic:Fm,underline:Fm,inverse:Fm,hidden:Fm,strikethrough:Fm,black:Fm,red:Fm,green:Fm,yellow:Fm,blue:Fm,magenta:Fm,cyan:Fm,white:Fm,gray:Fm,bgBlack:Fm,bgRed:Fm,bgGreen:Fm,bgYellow:Fm,bgBlue:Fm,bgMagenta:Fm,bgCyan:Fm,bgWhite:Fm}};Dm.exports=_m(),Dm.exports.createColors=_m;var Bm=Dm.exports;const jm=Lm(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Um=Bm,zm=jm,Wm=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=Um.isColorSupported),zm&&e&&(t=zm(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}=Um.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 Vm=Wm;Wm.default=Wm;var Gm={};Gm.isClean=Symbol("isClean"),Gm.my=Symbol("my");const Zm={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Ym=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 Zm[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=Zm[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 $m=Ym;Ym.default=Ym;let Jm=$m;function qm(e,t){new Jm(t).stringify(e)}var Km=qm;qm.default=qm;let{isClean:Xm,my:Hm}=Gm,Qm=Vm,eg=$m,tg=Km;function rg(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=>rg(e,r))):("object"===o&&null!==n&&(n=rg(n)),r[s]=n)}return r}let sg=class{constructor(e={}){this.raws={},this[Xm]=!1,this[Hm]=!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=rg(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 Qm(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[Xm]){this[Xm]=!1;let e=this;for(;e=e.parent;)e[Xm]=!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 eg).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=tg){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 ng=sg;sg.default=sg;let og=ng,ig=class extends og{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 ag=ig;ig.default=ig;var lg={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:cg,SourceMapGenerator:ug}=jm,{existsSync:hg,readFileSync:dg}=jm,{dirname:pg,join:fg}=jm;let mg=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=pg(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new cg(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=pg(e),hg(e))return this.mapFile=e,dg(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 cg)return ug.fromSourceMap(t).toString();if(t instanceof ug)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=fg(pg(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 gg=mg;mg.default=mg;let{SourceMapConsumer:yg,SourceMapGenerator:vg}=jm,{fileURLToPath:wg,pathToFileURL:bg}=jm,{isAbsolute:Sg,resolve:Cg}=jm,{nanoid:Ig}=lg,xg=jm,kg=Vm,Og=gg,Eg=Symbol("fromOffsetCache"),Ag=Boolean(yg&&vg),Mg=Boolean(Cg&&Sg),Rg=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&&(!Mg||/^\w+:\/\//.test(t.from)||Sg(t.from)?this.file=t.from:this.file=Cg(t.from)),Mg&&Ag){let e=new Og(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 "+Ig(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 kg(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 kg(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&&(bg&&(n.input.url=bg(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Eg])r=this[Eg];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[Eg]=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:Cg(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=Sg(a.source)?bg(a.source):new URL(a.source,this.map.consumer().sourceRoot||bg(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(!wg)throw new Error("file: protocol is not available in this PostCSS build");l.file=wg(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 Ng=Rg;Rg.default=Rg,xg&&xg.registerInput&&xg.registerInput(Rg);let{SourceMapConsumer:Pg,SourceMapGenerator:Tg}=jm,{dirname:Lg,relative:Dg,resolve:Fg,sep:_g}=jm,{pathToFileURL:Bg}=jm,jg=Ng,Ug=Boolean(Pg&&Tg),zg=Boolean(Lg&&Fg&&Dg&&_g);var Wg=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||Lg(e.file);!1===this.mapOpts.sourcesContent?(t=new Pg(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(),zg&&Ug&&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=Tg.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Tg({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 Tg({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?Lg(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Lg(Fg(r,this.mapOpts.annotation)));let s=Dg(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 jg(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(Bg){let t=Bg(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;"\\"===_g&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Vg=ng,Gg=class extends Vg{constructor(e){super(e),this.type="comment"}};var Zg=Gg;Gg.default=Gg;let Yg,$g,Jg,qg,{isClean:Kg,my:Xg}=Gm,Hg=ag,Qg=Zg,ey=ng;function ty(e){return e.map((e=>(e.nodes&&(e.nodes=ty(e.nodes)),delete e.source,e)))}function ry(e){if(e[Kg]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)ry(t)}let sy=class e extends ey{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=ty(Yg(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 Hg(t)]}else if(t.selector)t=[new $g(t)];else if(t.name)t=[new Jg(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Qg(t)]}return t.map((t=>(t[Xg]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Kg]&&ry(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]}};sy.registerParse=e=>{Yg=e},sy.registerRule=e=>{$g=e},sy.registerAtRule=e=>{Jg=e},sy.registerRoot=e=>{qg=e};var ny=sy;sy.default=sy,sy.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Jg.prototype):"rule"===e.type?Object.setPrototypeOf(e,$g.prototype):"decl"===e.type?Object.setPrototypeOf(e,Hg.prototype):"comment"===e.type?Object.setPrototypeOf(e,Qg.prototype):"root"===e.type&&Object.setPrototypeOf(e,qg.prototype),e[Xg]=!0,e.nodes&&e.nodes.forEach((e=>{sy.rebuild(e)}))};let oy,iy,ay=ny,ly=class extends ay{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new oy(new iy,this,e).stringify()}};ly.registerLazyResult=e=>{oy=e},ly.registerProcessor=e=>{iy=e};var cy=ly;ly.default=ly;let uy={};var hy=function(e){uy[e]||(uy[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let dy=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 py=dy;dy.default=dy;let fy=py,my=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 fy(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var gy=my;my.default=my;const yy="'".charCodeAt(0),vy='"'.charCodeAt(0),wy="\\".charCodeAt(0),by="/".charCodeAt(0),Sy="\n".charCodeAt(0),Cy=" ".charCodeAt(0),Iy="\f".charCodeAt(0),xy="\t".charCodeAt(0),ky="\r".charCodeAt(0),Oy="[".charCodeAt(0),Ey="]".charCodeAt(0),Ay="(".charCodeAt(0),My=")".charCodeAt(0),Ry="{".charCodeAt(0),Ny="}".charCodeAt(0),Py=";".charCodeAt(0),Ty="*".charCodeAt(0),Ly=":".charCodeAt(0),Dy="@".charCodeAt(0),Fy=/[\t\n\f\r "#'()/;[\\\]{}]/g,_y=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,By=/.[\r\n"'(/\\]/,jy=/[\da-f]/i;let Uy=ny,zy=class extends Uy{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 Wy=zy;zy.default=zy,Uy.registerAtRule(zy);let Vy,Gy,Zy=ny,Yy=class extends Zy{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 Vy(new Gy,this,e).stringify()}};Yy.registerLazyResult=e=>{Vy=e},Yy.registerProcessor=e=>{Gy=e};var $y=Yy;Yy.default=Yy,Zy.registerRoot(Yy);let Jy={comma:e=>Jy.split(e,[","],!0),space:e=>Jy.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 qy=Jy;Jy.default=Jy;let Ky=ny,Xy=qy,Hy=class extends Ky{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Xy.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 Qy=Hy;Hy.default=Hy,Ky.registerRule(Hy);let ev=ag,tv=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,d=e.css.valueOf(),p=t.ignoreErrors,f=d.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=d.charCodeAt(m),r){case Sy:case Cy:case xy:case ky:case Iy:s=m;do{s+=1,r=d.charCodeAt(s)}while(r===Cy||r===Sy||r===xy||r===ky||r===Iy);h=["space",d.slice(m,s)],m=s-1;break;case Oy:case Ey:case Ry:case Ny:case Ly:case Py:case My:{let e=String.fromCharCode(r);h=[e,e,m];break}case Ay:if(c=g.length?g.pop()[1]:"",u=d.charCodeAt(m+1),"url"===c&&u!==yy&&u!==vy&&u!==Cy&&u!==Sy&&u!==xy&&u!==Iy&&u!==ky){s=m;do{if(a=!1,s=d.indexOf(")",s+1),-1===s){if(p||t){s=m;break}v("bracket")}for(l=s;d.charCodeAt(l-1)===wy;)l-=1,a=!a}while(a);h=["brackets",d.slice(m,s+1),m,s],m=s}else s=d.indexOf(")",m+1),o=d.slice(m,s+1),-1===s||By.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case yy:case vy:n=r===yy?"'":'"',s=m;do{if(a=!1,s=d.indexOf(n,s+1),-1===s){if(p||t){s=m+1;break}v("string")}for(l=s;d.charCodeAt(l-1)===wy;)l-=1,a=!a}while(a);h=["string",d.slice(m,s+1),m,s],m=s;break;case Dy:Fy.lastIndex=m+1,Fy.test(d),s=0===Fy.lastIndex?d.length-1:Fy.lastIndex-2,h=["at-word",d.slice(m,s+1),m,s],m=s;break;case wy:for(s=m,i=!0;d.charCodeAt(s+1)===wy;)s+=1,i=!i;if(r=d.charCodeAt(s+1),i&&r!==by&&r!==Cy&&r!==Sy&&r!==xy&&r!==ky&&r!==Iy&&(s+=1,jy.test(d.charAt(s)))){for(;jy.test(d.charAt(s+1));)s+=1;d.charCodeAt(s+1)===Cy&&(s+=1)}h=["word",d.slice(m,s+1),m,s],m=s;break;default:r===by&&d.charCodeAt(m+1)===Ty?(s=d.indexOf("*/",m+2)+1,0===s&&(p||t?s=d.length:v("comment")),h=["comment",d.slice(m,s+1),m,s],m=s):(_y.lastIndex=m+1,_y.test(d),s=0===_y.lastIndex?d.length-1:_y.lastIndex-2,h=["word",d.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},rv=Zg,sv=Wy,nv=$y,ov=Qy;const iv={empty:!0,space:!0};var av=class{constructor(e){this.input=e,this.root=new nv,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 sv;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 rv;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=tv(this.input)}decl(e,t){let r=new ev;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 ov;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",iv[a]||iv[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 ov;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 lv=ny,cv=av,uv=Ng;function hv(e,t){let r=new uv(e,t),s=new cv(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 dv=hv;hv.default=hv,lv.registerParse(hv);let{isClean:pv,my:fv}=Gm,mv=Wg,gv=Km,yv=ny,vv=cy,wv=hy,bv=gy,Sv=dv,Cv=$y;const Iv={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},xv={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},kv={Once:!0,postcssPlugin:!0,prepare:!0};function Ov(e){return"object"==typeof e&&"function"==typeof e.then}function Ev(e){let t=!1,r=Iv[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 Av(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Ev(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Mv(e){return e[pv]=!1,e.nodes&&e.nodes.forEach((e=>Mv(e))),e}let Rv={},Nv=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 bv)n=Mv(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=Sv;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[fv]&&yv.rebuild(n)}else n=Mv(r);this.result=new bv(t,n,s),this.helpers={...Rv,postcss:Rv,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(!xv[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!kv[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(Ov(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[pv];){e[pv]=!0;let t=[Av(e)];for(;t.length>0;){let e=this.visitTick(t);if(Ov(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 Ov(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=gv;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new mv(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(Ov(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[pv];)e[pv]=!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||wv("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(Ov(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[pv])return s[pv]=!0,void e.push(Av(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[pv]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[pv]=!0;let t=Ev(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[pv]||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"}};Nv.registerPostcss=e=>{Rv=e};var Pv=Nv;Nv.default=Nv,Cv.registerLazyResult(Nv),vv.registerLazyResult(Nv);let Tv=Wg,Lv=Km,Dv=hy,Fv=dv;const _v=gy;let Bv=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=Lv;this.result=new _v(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new Tv(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||Dv("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=Fv;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 jv=Bv;Bv.default=Bv;let Uv=jv,zv=Pv,Wv=cy,Vv=$y,Gv=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 zv(this,e,t):new Uv(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Zv=Gv;Gv.default=Gv,Vv.registerProcessor(Gv),Wv.registerProcessor(Gv);let Yv=ag,$v=gg,Jv=Zg,qv=Wy,Kv=Ng,Xv=$y,Hv=Qy;function Qv(e,t){if(Array.isArray(e))return e.map((e=>Qv(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Kv.prototype};r.map&&(r.map={...r.map,__proto__:$v.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>Qv(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 Xv(s);if("decl"===s.type)return new Yv(s);if("rule"===s.type)return new Hv(s);if("comment"===s.type)return new Jv(s);if("atrule"===s.type)return new qv(s);throw new Error("Unknown node type: "+e.type)}var ew=Qv;Qv.default=Qv;let tw=Vm,rw=ag,sw=Pv,nw=ny,ow=Zv,iw=Km,aw=ew,lw=cy,cw=py,uw=Zg,hw=Wy,dw=gy,pw=Ng,fw=dv,mw=qy,gw=Qy,yw=$y,vw=ng;function ww(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new ow(e)}ww.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 ow).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return ww([n(r)]).process(e,t)},n},ww.stringify=iw,ww.parse=fw,ww.fromJSON=aw,ww.list=mw,ww.comment=e=>new uw(e),ww.atRule=e=>new hw(e),ww.decl=e=>new rw(e),ww.rule=e=>new gw(e),ww.root=e=>new yw(e),ww.document=e=>new lw(e),ww.CssSyntaxError=tw,ww.Declaration=rw,ww.Container=nw,ww.Processor=ow,ww.Document=lw,ww.Comment=uw,ww.Warning=cw,ww.AtRule=hw,ww.Result=dw,ww.Input=pw,ww.Rule=gw,ww.Root=yw,ww.Node=vw,sw.registerPostcss(ww);var bw=ww;ww.default=ww;const Sw=Tm(bw);Sw.stringify,Sw.fromJSON,Sw.plugin,Sw.parse,Sw.list,Sw.document,Sw.comment,Sw.atRule,Sw.rule,Sw.decl,Sw.root,Sw.CssSyntaxError,Sw.Declaration,Sw.Container,Sw.Processor,Sw.Document,Sw.Comment,Sw.Warning,Sw.AtRule,Sw.Result,Sw.Input,Sw.Rule,Sw.Root,Sw.Node;class Cw{constructor(...e){Pm(this,"parentElement",null),Pm(this,"parentNode",null),Pm(this,"ownerDocument"),Pm(this,"firstChild",null),Pm(this,"lastChild",null),Pm(this,"previousSibling",null),Pm(this,"nextSibling",null),Pm(this,"ELEMENT_NODE",1),Pm(this,"TEXT_NODE",3),Pm(this,"nodeType"),Pm(this,"nodeName"),Pm(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 Cw))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 Iw={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},xw={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},kw={};function Ow(e){if(kw[e])return kw[e];const t=function(e){var t,r;const s=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return s&&globalThis[s]?globalThis[s]:void 0}(e)||globalThis[e],r=t.prototype,s=e in Iw?Iw[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 xw?xw[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)return kw[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?kw[e]=o:r}catch{return r}}const Ew={};function Aw(e,t,r){var s;const n=`${e}.${String(r)}`;if(Ew[n])return Ew[n].call(t);const o=Ow(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(Ew[n]=i,i.call(t)):t[r]}const Mw={};function Rw(e,t,r){const s=`${e}.${String(r)}`;if(Mw[s])return Mw[s].bind(t);const n=Ow(e)[r];return"function"!=typeof n?t[r]:(Mw[s]=n,n.bind(t))}function Nw(){return Ow("MutationObserver").constructor}const Pw={childNodes:function(e){return Aw("Node",e,"childNodes")},parentNode:function(e){return Aw("Node",e,"parentNode")},parentElement:function(e){return Aw("Node",e,"parentElement")},textContent:function(e){return Aw("Node",e,"textContent")},contains:function(e,t){return Rw("Node",e,"contains")(t)},getRootNode:function(e){return Rw("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Aw("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Aw("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Aw("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Aw("Element",e,"querySelectorAll")(t)},mutationObserver:Nw};function Tw(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const Lw="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 Dw={map:{},getId:()=>(console.error(Lw),-1),getNode:()=>(console.error(Lw),null),removeNodeFromMap(){console.error(Lw)},has:()=>(console.error(Lw),!1),reset(){console.error(Lw)}};function Fw(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 _w(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)}}),()=>_w(e,t,o||{},!0)}function Bw(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&&(Dw=new Proxy(Dw,{get:(e,t,r)=>("map"===t&&console.error(Lw),Reflect.get(e,t,r))}));let jw=Date.now;function Uw(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=Pw.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=Pw.parentElement(o.body))?void 0:s.scrollTop)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollTop)||0}}function zw(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ww(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Vw(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:Pw.parentElement(e)}function Gw(e,t,r,s){if(!e)return!1;const n=Vw(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(Fh(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 Zw(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)}function Yw(e,t){if(oh(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=Pw.parentNode(e);return(!s||s.nodeType!==e.DOCUMENT_NODE)&&(!s||Yw(s,t))}function $w(e){return Boolean(e.changedTouches)}function Jw(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function qw(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Kw(e){return!!e&&(e instanceof Cw&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Pw.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(jw=()=>(new Date).getTime());class Xw{constructor(){Zu(this,"id",1),Zu(this,"styleIDMap",new WeakMap),Zu(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 Hw(e){var t;let r=null;return"getRootNode"in e&&(null==(t=Pw.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Pw.host(Pw.getRootNode(e))&&(r=Pw.host(Pw.getRootNode(e))),r}function Qw(e){const t=e.ownerDocument;if(!t)return!1;const r=function(e){let t,r=e;for(;t=Hw(r);)r=t;return r}(e);return Pw.contains(t,r)}function eb(e){const t=e.ownerDocument;return!!t&&(Pw.contains(t,e)||Qw(e))}var tb=(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))(tb||{}),rb=(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))(rb||{}),sb=(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))(sb||{}),nb=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(nb||{}),ob=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ob||{}),ib=(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))(ib||{}),ab=(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))(ab||{});function lb(e){return"__ln"in e}class cb{constructor(){Zu(this,"length",0),Zu(this,"head",null),Zu(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&&lb(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&&lb(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 ub=(e,t)=>`${e}@${t}`;class hb{constructor(){Zu(this,"frozen",!1),Zu(this,"locked",!1),Zu(this,"texts",[]),Zu(this,"attributes",[]),Zu(this,"attributeMap",new WeakMap),Zu(this,"removes",[]),Zu(this,"mapRemoves",[]),Zu(this,"movedMap",{}),Zu(this,"addedSet",new Set),Zu(this,"movedSet",new Set),Zu(this,"droppedSet",new Set),Zu(this,"removesSubTreeCache",new Set),Zu(this,"mutationCb"),Zu(this,"blockClass"),Zu(this,"blockSelector"),Zu(this,"maskTextClass"),Zu(this,"maskTextSelector"),Zu(this,"inlineStylesheet"),Zu(this,"maskInputOptions"),Zu(this,"maskTextFn"),Zu(this,"maskInputFn"),Zu(this,"keepIframeSrcFn"),Zu(this,"recordCanvas"),Zu(this,"inlineImages"),Zu(this,"slimDOMOptions"),Zu(this,"dataURLOptions"),Zu(this,"doc"),Zu(this,"mirror"),Zu(this,"iframeManager"),Zu(this,"stylesheetManager"),Zu(this,"shadowDomManager"),Zu(this,"canvasManager"),Zu(this,"processedNodeManager"),Zu(this,"unattachedDoc"),Zu(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),Zu(this,"emit",(()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new cb,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=Pw.parentNode(n);if(!o||!eb(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=oh(o)?this.mirror.getId(Hw(n)):this.mirror.getId(o),l=s(n);if(-1===a||-1===l)return r.addNode(n);const c=Uh(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=>{Jw(e,this.mirror)&&this.iframeManager.addIframe(e),qw(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Kw(n)&&this.shadowDomManager.addShadowRoot(Pw.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)pb(this.removesSubTreeCache,e,this.mirror)&&!this.movedSet.has(Pw.parentNode(e))||n(e);for(const e of this.addedSet)fb(this.droppedSet,e)||pb(this.removesSubTreeCache,e,this.mirror)?fb(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(Pw.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(Pw.parentNode(r.value));if(-1===s(r.value))continue;if(-1!==t){e=r;break}{const t=r.value,s=Pw.parentNode(t);if(s&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=Pw.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=Pw.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))})),Zu(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(Pw.childNodes(e),(e=>Pw.textContent(e)||"")).join("");t.attributes.value=uh({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:ph(e),value:r,maskInputFn:this.maskInputFn})})),Zu(this,"processMutation",(e=>{if(!Zw(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=Pw.textContent(e.target);Gw(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:_h(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Vw(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=ph(t);s=uh({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:s,maskInputFn:this.maskInputFn})}if(Gw(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"),!Dh(t.tagName,r))if(n.attributes[r]=Lh(this.doc,hh(t.tagName),hh(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(Gw(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=oh(e.target)?this.mirror.getId(Pw.host(e.target)):this.mirror.getId(e.target);Gw(e.target,this.blockClass,this.blockSelector,!1)||Zw(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(db(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||Yw(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[ub(r,s)]?db(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:!(!oh(e.target)||!ih(e.target))||void 0}),function(e,t){const r=[e];for(;r.length;){const e=r.pop();t.has(e)||(t.add(e),Pw.childNodes(e).forEach((e=>r.push(e))))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))}))}})),Zu(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Zw(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[ub(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Gw(e,this.blockClass,this.blockSelector,!1)||(Pw.childNodes(e).forEach((e=>this.genAdds(e))),Kw(e)&&Pw.childNodes(Pw.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 db(e,t){e.delete(t),Pw.childNodes(t).forEach((t=>db(e,t)))}function pb(e,t,r){return 0!==e.size&&function(e,t){const r=Pw.parentNode(t);return!!r&&e.has(r)}(e,t)}function fb(e,t){return 0!==e.size&&mb(e,t)}function mb(e,t){const r=Pw.parentNode(t);return!!r&&(!!e.has(r)||mb(e,r))}let gb;const yb=e=>{if(!gb)return e;return(...t)=>{try{return e(...t)}catch(e){if(gb&&!0===gb(e))return;throw e}}};function vb(e){return(...t)=>{try{return e(...t)}catch(e){try{e._external_=!0}catch{}throw e}}}const wb=[];function bb(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 Sb(e,t){const r=new hb;wb.push(r),r.init(e);const s=new(Nw())(yb(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Cb({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(sb).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==i[e])).forEach((o=>{let i=hh(o);const c=(t=>o=>{const i=bb(o);if(Gw(i,s,n,!0))return;let a=null,c=t;if("pointerType"in o){switch(o.pointerType){case"mouse":a=nb.Mouse;break;case"touch":a=nb.Touch;break;case"pen":a=nb.Pen}a===nb.Touch?sb[t]===sb.MouseDown?c="TouchStart":sb[t]===sb.MouseUp&&(c="TouchEnd"):nb.Pen}else $w(o)&&(a=nb.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===nb.Touch||c.startsWith("Mouse")&&a===nb.Mouse)&&(a=null)):sb[t]===sb.Click&&(a=l,l=null);const u=$w(o)?o.changedTouches[0]:o;if(!u)return;const h=r.getId(i),{clientX:d,clientY:p}=u;yb(e)({type:sb[c],id:h,x:d,y:p,...null!==a&&{pointerType:a}})})(o);if(window.PointerEvent)switch(sb[o]){case sb.MouseDown:case sb.MouseUp:i=i.replace("mouse","pointer");break;case sb.TouchStart:case sb.TouchEnd:return}a.push(Tw(i,c,t))})),yb((()=>{a.forEach((e=>e()))}))}function Ib({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:o}){const i=yb(Fw(yb((o=>{const i=bb(o);if(!i||Gw(i,s,n,!0))return;const a=r.getId(i);if(i===t&&t.defaultView){const r=Uw(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 Tw("scroll",i,t)}const xb=["INPUT","TEXTAREA","SELECT"],kb=new WeakMap;function Ob(e){return function(e,t){if(Rb("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Rb("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Rb("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Rb("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 Eb(e,t,r){let s,n;return e?(e.ownerNode?s=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:s}):{}}function Ab({mirror:e,stylesheetManager:t},r){var s,n,o;let i=null;i="#document"===r.nodeName?e.getId(r):e.getId(Pw.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}}),yb((()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))):()=>{}}function Mb(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:d,selectionCb:p,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),d(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),p(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(s=Sb(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=Fw(yb((t=>{const r=Date.now()-i;e(a.map((e=>(e.timeOffset-=r,e))),t),a=[],i=null})),o),c=yb(Fw(yb((e=>{const t=bb(e),{clientX:r,clientY:n}=$w(e)?e.changedTouches[0]:e;i||(i=jw()),a.push({x:r,y:n,id:s.getId(t),timeOffset:jw()-i}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?rb.Drag:e instanceof MouseEvent?rb.MouseMove:rb.TouchMove)})),n,{trailing:!1})),u=[Tw("mousemove",c,r),Tw("touchmove",c,r),Tw("drag",c,r)];return yb((()=>{u.forEach((e=>e()))}))}(e),o=Cb(e),i=Ib(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,s=-1;return Tw("resize",yb(Fw(yb((()=>{const t=zw(),n=Ww();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=bb(e);const c=e.isTrusted,h=r&&r.tagName;if(r&&"OPTION"===h&&(r=Pw.parentElement(r)),!r||!h||xb.indexOf(h)<0||Gw(r,s,n,!0))return;if(r.classList.contains(o)||i&&r.matches(i))return;let p=r.value,f=!1;const m=ph(r)||"";"radio"===m||"checkbox"===m?f=r.checked:(a[h.toLowerCase()]||a[m])&&(p=uh({element:r,maskInputOptions:a,tagName:h,type:m,value:p,maskInputFn:l})),d(r,u?{text:p,isChecked:f,userTriggered:c}:{text:p,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;d(e,u?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}}))}function d(t,s){const n=kb.get(t);if(!n||n.text!==s.text||n.isChecked!==s.isChecked){kb.set(t,s);const n=r.getId(t);yb(e)({...s,id:n})}}const p=("last"===c.input?["change"]:["input","change"]).map((e=>Tw(e,yb(h),t))),f=t.defaultView;if(!f)return()=>{p.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&&p.push(...g.map((e=>_w(e[0],e[1],{set(){yb(h)({target:this,isTrusted:!1})}},!1,f)))),yb((()=>{p.forEach((e=>e()))}))}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:n,doc:o}){const i=yb((o=>Fw(yb((n=>{const i=bb(n);if(!i||Gw(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=[Tw("play",i(ib.Play),o),Tw("pause",i(ib.Pause),o),Tw("seeked",i(ib.Seeked),o),Tw("volumechange",i(ib.VolumeChange),o),Tw("ratechange",i(ib.RateChange),o)];return yb((()=>{a.forEach((e=>e()))}))}(e);let u=()=>{},h=()=>{},d=()=>{},p=()=>{};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:yb(((s,n,o)=>{const[i,a]=o,{id:l,styleId:c}=Eb(n,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:i,index:a}]}),vb((()=>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:yb(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=Eb(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:i}]}),vb((()=>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:yb(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=Eb(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:yb(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=Eb(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:i}),s.apply(n,o)}))}));const l={};Nb("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(Nb("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),Nb("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),Nb("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:yb(((s,n,o)=>{const[i,a]=o,{id:l,styleId:c}=Eb(n.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:i,index:[...Ob(n),a||0]}]}),s.apply(n,o)}))}),n.prototype.deleteRule=new Proxy(c[s].deleteRule,{apply:yb(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=Eb(n.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...Ob(n),i]}]}),s.apply(n,o)}))})})),yb((()=>{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=Ab(e,e.doc),d=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:yb(((n,i,a)=>{var l;const[c,u,h]=a;if(r.has(c))return o.apply(i,[c,u,h]);const{id:d,styleId:p}=Eb(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:c,value:u,priority:h},index:Ob(i.parentRule)}),n.apply(i,a)}))});const i=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:yb(((n,o,a)=>{var l;const[c]=a;if(r.has(c))return i.apply(o,[c]);const{id:u,styleId:h}=Eb(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:Ob(o.parentRule)}),n.apply(o,a)}))}),yb((()=>{n.CSSStyleDeclaration.prototype.setProperty=o,n.CSSStyleDeclaration.prototype.removeProperty=i}))}(e,{win:r}),e.collectFonts&&(p=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=Bw(t.fonts,"add",(function(t){return function(r){return setTimeout(yb((()=>{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),yb((()=>{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=yb((()=>{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;Gw(i,s,n,!0)||Gw(c,s,n,!0)||a.push({start:r.getId(i),startOffset:l,end:r.getId(c),endOffset:u})}o({ranges:a})}));return a(),Tw("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){const r=e.defaultView;return r&&r.customElements?Bw(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 yb((()=>{wb.forEach((e=>e.reset())),null==s||s.disconnect(),n(),o(),i(),a(),l(),c(),u(),h(),d(),p(),f(),m(),g.forEach((e=>e()))}))}function Rb(e){return void 0!==window[e]}function Nb(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Pb{constructor(e){Zu(this,"iframeIdToRemoteIdMap",new WeakMap),Zu(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 Tb{constructor(e){Zu(this,"iframes",new WeakMap),Zu(this,"crossOriginIframeMap",new WeakMap),Zu(this,"crossOriginIframeMirror",new Pb(kh)),Zu(this,"crossOriginIframeStyleMirror"),Zu(this,"crossOriginIframeRootIdMap",new WeakMap),Zu(this,"mirror"),Zu(this,"mutationCb"),Zu(this,"wrappedEmit"),Zu(this,"loadListener"),Zu(this,"stylesheetManager"),Zu(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Pb(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 tb.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:tb.IncrementalSnapshot,data:{source:rb.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case tb.Meta:case tb.Load:case tb.DomContentLoaded:return!1;case tb.Plugin:return t;case tb.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case tb.IncrementalSnapshot:switch(t.data.source){case rb.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 rb.Drag:case rb.TouchMove:case rb.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case rb.ViewportResize:return!1;case rb.MediaInteraction:case rb.MouseInteraction:case rb.Scroll:case rb.CanvasMutation:case rb.Input:return this.replaceIds(t.data,e,["id"]),t;case rb.StyleSheetRule:case rb.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case rb.Font:return t;case rb.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case rb.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===ab.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class Lb{constructor(e){Zu(this,"shadowDoms",new WeakSet),Zu(this,"mutationCb"),Zu(this,"scrollCb"),Zu(this,"bypassOptions"),Zu(this,"mirror"),Zu(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(!ih(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Sb({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>r.disconnect())),this.restoreHandlers.push(Ib({...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(Pw.host(e))),this.restoreHandlers.push(Ab({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(Bw(e.prototype,"attachShadow",(function(e){return function(s){const n=e.call(this,s),o=Pw.shadowRoot(this);return o&&eb(this)&&r.addShadowRoot(o,t),n}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Db="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Fb="undefined"==typeof Uint8Array?[]:new Uint8Array(256),_b=0;_b<64;_b++)Fb[Db.charCodeAt(_b)]=_b;const Bb=new Map;const jb=(e,t,r)=>{if(!e||!Wb(e,t)&&"object"!=typeof e)return;const s=function(e,t){let r=Bb.get(e);return r||(r=new Map,Bb.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 Ub(e,t,r){if(e instanceof Array)return e.map((e=>Ub(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+=Db[r[t]>>2],n+=Db[(3&r[t])<<4|r[t+1]>>4],n+=Db[(15&r[t+1])<<2|r[t+2]>>6],n+=Db[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:[Ub(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:[Ub(e.data,t,r),e.width,e.height]}}if(Wb(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:jb(e,t,r)}}return e}const zb=(e,t,r)=>e.map((e=>Ub(e,t,r))),Wb=(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 Vb(e,t,r,s){const n=[];try{const o=Bw(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(n,...o){if(!Gw(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 Gb(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=Bw(e,l,(function(e){return function(...i){const a=e.apply(this,i);if(jb(a,o,this),"tagName"in this.canvas&&!Gw(this.canvas,s,n,!0)){const e=zb(i,o,this),s={type:t,property:l,args:e};r(this.canvas,s)}return a}}));i.push(a)}catch{const s=_w(e,l,{set(e){r(this.canvas,{type:t,property:l,args:[e],setter:!0})}});i.push(s)}return i}const Zb="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Yb="undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),(e=>e.charCodeAt(0))))(Zb)],{type:"text/javascript;charset=utf-8"});function $b(e){let t;try{if(t=Yb&&(window.URL||window.webkitURL).createObjectURL(Yb),!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,"+Zb,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class Jb{constructor(e){Zu(this,"pendingCanvasMutations",new Map),Zu(this,"rafStamps",{latestId:0,invokeId:null}),Zu(this,"mirror"),Zu(this,"mutationCb"),Zu(this,"resetObservers"),Zu(this,"frozen",!1),Zu(this,"locked",!1),Zu(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=Vb(t,r,s,!0),i=new Map,a=new $b;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:ob["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=>{Gw(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=Vb(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=Bw(t.CanvasRenderingContext2D.prototype,i,(function(n){return function(...o){return Gw(this.canvas,r,s,!0)||setTimeout((()=>{const r=zb(o,t,this);e(this.canvas,{type:ob["2D"],property:i,args:r})}),0),n.apply(this,o)}}));n.push(o)}catch{const r=_w(t.CanvasRenderingContext2D.prototype,i,{set(t){e(this.canvas,{type:ob["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(...Gb(t.WebGLRenderingContext.prototype,ob.WebGL,e,r,s,t)),void 0!==t.WebGL2RenderingContext&&n.push(...Gb(t.WebGL2RenderingContext.prototype,ob.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 qb{constructor(e){Zu(this,"trackedLinkElements",new WeakSet),Zu(this,"mutationCb"),Zu(this,"adoptedStyleSheetCb"),Zu(this,"styleMirror",new Xw),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:lh(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 Kb{constructor(){Zu(this,"nodeMap",new WeakMap),Zu(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 Xb,Hb,Qb,eS=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(Wu=e.contentWindow)?void 0:Wu.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const tS=new ch;function rS(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:d,slimDOMOptions:p,maskInputFn:f,maskTextFn:m,hooks:g,packFn:y,sampling:v={},dataURLOptions:w={},mousemoveWait:b,recordDOM:S=!0,recordCanvas:C=!1,recordCrossOriginIframes:I=!1,recordAfter:x=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:k=!1,collectFonts:O=!1,inlineImages:E=!1,plugins:A,keepIframeSrcFn:M=()=>!1,ignoreCSSAttributes:R=new Set([]),errorHandler:N,applyBackgroundColorToBlockedElements:P=!1}=e;gb=N;const T=!I||window.parent===window;let L=!1;if(!T)try{window.parent.document&&(L=!1)}catch(e){L=!0}if(T&&!t)throw new Error("emit function is required");if(!T&&!L)return()=>{};void 0!==b&&void 0===v.mousemove&&(v.mousemove=b),tS.reset();const D=!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!==d?d:{password:!0},F=!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===p,headMetaDescKeywords:"all"===p,headTitleMutations:"all"===p}:p||{};let _;!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)}();let B=0;const j=e=>{for(const t of A||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!L&&(e=y(e)),e};Xb=(e,n)=>{var o;const i=e;if(i.timestamp=jw(),!(null==(o=wb[0])?void 0:o.isFrozen())||i.type===tb.FullSnapshot||i.type===tb.IncrementalSnapshot&&i.data.source===rb.Mutation||wb.forEach((e=>e.unfreeze())),T)null==t||t(j(i),n);else if(L){const e={type:"rrweb",event:j(i),origin:window.location.origin,isCheckout:n};window.parent.postMessage(e,"*")}if(i.type===tb.FullSnapshot)_=i,B=0;else if(i.type===tb.IncrementalSnapshot){if(i.data.source===rb.Mutation&&i.data.isAttachIframe)return;B++;const e=s&&B>=s,t=r&&i.timestamp-_.timestamp>r;(e||t)&&Hb(!0)}};const U=e=>{Xb({type:tb.IncrementalSnapshot,data:{source:rb.Mutation,...e}})},z=e=>Xb({type:tb.IncrementalSnapshot,data:{source:rb.Scroll,...e}}),W=e=>Xb({type:tb.IncrementalSnapshot,data:{source:rb.CanvasMutation,...e}}),V=new qb({mutationCb:U,adoptedStyleSheetCb:e=>Xb({type:tb.IncrementalSnapshot,data:{source:rb.AdoptedStyleSheet,...e}})}),G=new Tb({mirror:tS,mutationCb:U,stylesheetManager:V,recordCrossOriginIframes:I,wrappedEmit:Xb});for(const e of A||[])e.getMirror&&e.getMirror({nodeMirror:tS,crossOriginIframeMirror:G.crossOriginIframeMirror,crossOriginIframeStyleMirror:G.crossOriginIframeStyleMirror});const Z=new Kb;Qb=new Jb({recordCanvas:C,mutationCb:W,win:window,blockClass:n,blockSelector:o,mirror:tS,sampling:v.canvas,dataURLOptions:w});const Y=new Lb({mutationCb:U,scrollCb:z,bypassOptions:{blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:D,dataURLOptions:w,maskTextFn:m,maskInputFn:f,recordCanvas:C,inlineImages:E,sampling:v,slimDOMOptions:F,iframeManager:G,stylesheetManager:V,canvasManager:Qb,keepIframeSrcFn:M,processedNodeManager:Z},mirror:tS});Hb=(e=!1)=>{if(!S)return;Xb({type:tb.Meta,data:{href:window.location.href,width:Ww(),height:zw()}},e),V.reset(),Y.init(),wb.forEach((e=>e.lock()));const t=function(e,t){const{mirror:r=new ch,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:d,slimDOM:p=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:b,keepIframeSrcFn:S=()=>!1,applyBackgroundColorToBlockedElements:C=!1}=t||{};return Uh(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:d,slimDOMOptions:!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===p,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===p?{}:p,dataURLOptions:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:b,keepIframeSrcFn:S,newlyAddedElement:!1,applyBackgroundColorToBlockedElements:C})}(document,{mirror:tS,blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:D,maskTextFn:m,maskInputFn:f,slimDOM:F,dataURLOptions:w,recordCanvas:C,inlineImages:E,applyBackgroundColorToBlockedElements:P,onSerialize:e=>{Jw(e,tS)&&G.addIframe(e),qw(e,tS)&&V.trackLinkElement(e),Kw(e)&&Y.addShadowRoot(Pw.shadowRoot(e),document)},onIframeLoad:(e,t)=>{G.attachIframe(e,t),Y.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{V.attachLinkElement(e,t)},keepIframeSrcFn:M});if(!t)return console.warn("Failed to snapshot the document");Xb({type:tb.FullSnapshot,data:{node:t,initialOffset:Uw(window)}},e),wb.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,tS.getId(document))};try{const e=[],t=e=>{var t;return yb(Mb)({mutationCb:U,mousemoveCb:(e,t)=>Xb({type:tb.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Xb({type:tb.IncrementalSnapshot,data:{source:rb.MouseInteraction,...e}}),scrollCb:z,viewportResizeCb:e=>Xb({type:tb.IncrementalSnapshot,data:{source:rb.ViewportResize,...e}}),inputCb:e=>Xb({type:tb.IncrementalSnapshot,data:{source:rb.Input,...e}}),mediaInteractionCb:e=>Xb({type:tb.IncrementalSnapshot,data:{source:rb.MediaInteraction,...e}}),styleSheetRuleCb:e=>Xb({type:tb.IncrementalSnapshot,data:{source:rb.StyleSheetRule,...e}}),styleDeclarationCb:e=>Xb({type:tb.IncrementalSnapshot,data:{source:rb.StyleDeclaration,...e}}),canvasMutationCb:W,fontCb:e=>Xb({type:tb.IncrementalSnapshot,data:{source:rb.Font,...e}}),selectionCb:e=>{Xb({type:tb.IncrementalSnapshot,data:{source:rb.Selection,...e}})},customElementCb:e=>{Xb({type:tb.IncrementalSnapshot,data:{source:rb.CustomElement,...e}})},blockClass:n,ignoreClass:i,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:D,inlineStylesheet:u,sampling:v,recordDOM:S,recordCanvas:C,inlineImages:E,userTriggeredOnInput:k,collectFonts:O,doc:e,maskInputFn:f,maskTextFn:m,keepIframeSrcFn:M,blockSelector:o,slimDOMOptions:F,dataURLOptions:w,mirror:tS,iframeManager:G,stylesheetManager:V,shadowDomManager:Y,processedNodeManager:Z,canvasManager:Qb,ignoreCSSAttributes:R,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=>Xb({type:tb.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},g)};G.addLoadListener((r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}}));const r=()=>{Hb(),e.push(t(document)),eS=!0};return"interactive"===document.readyState||"complete"===document.readyState?r():(e.push(Tw("DOMContentLoaded",(()=>{Xb({type:tb.DomContentLoaded,data:{}}),"DOMContentLoaded"===x&&r()}))),e.push(Tw("load",(()=>{Xb({type:tb.Load,data:{}}),"load"===x&&r()}),window))),()=>{e.forEach((e=>e())),Z.destroy(),eS=!1,gb=void 0}}catch(e){console.warn(e)}}var sS;rS.addCustomEvent=(e,t)=>{if(!eS)throw new Error("please add custom event after start recording");Xb({type:tb.Custom,data:{tag:e,payload:t}})},rS.freezePage=()=>{wb.forEach((e=>e.freeze()))},rS.takeFullSnapshot=e=>{if(!eS)throw new Error("please take full snapshot after start recording");Hb(e)},rS.mirror=tS,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(sS||(sS={}));var nS=Object.freeze({__proto__:null,record:rS});var oS=Object.freeze({__proto__:null,NetworkObservers:class{constructor(){this.fetchObserver=null}start(e){this.eventCallback=e,this.observeFetch()}stop(){var e;null===(e=this.fetchObserver)||void 0===e||e.call(this),this.fetchObserver=null,this.eventCallback=void 0}notifyEvent(e){var t;null===(t=this.eventCallback)||void 0===t||t.call(this,e)}observeFetch(){const e=c();if(!e)return;const t=e.fetch;t&&(e.fetch=(e,r)=>s(this,void 0,void 0,(function*(){const s=Date.now(),n={timestamp:s,type:"fetch",method:(null==r?void 0:r.method)||"GET",url:e.toString(),requestHeaders:null==r?void 0:r.headers};try{const o=yield t(e,r),i=Date.now();n.status=o.status,n.duration=i-s;const a={};return o.headers.forEach(((e,t)=>{a[t]=e})),n.responseHeaders=a,this.notifyEvent(n),o}catch(e){const t=Date.now();n.duration=t-s;const r=e;throw n.error={name:r.name||"UnknownError",message:r.message||"An unknown error occurred"},this.notifyEvent(n),e}})),this.fetchObserver=()=>{e.fetch=t})}}});return e.SessionReplay=class{constructor(){this.name="@amplitude/session-replay-browser",this.recordCancelCallback=null,this.eventCount=0,this.pageLeaveFns=[],this.recordFunction=null,this.teardownEventListeners=e=>{const t=c();t&&(t.removeEventListener("blur",this.blurListener),t.removeEventListener("focus",this.focusListener),!e&&t.addEventListener("blur",this.blurListener),!e&&t.addEventListener("focus",this.focusListener),t.self&&"onpagehide"in t.self?(t.removeEventListener("pagehide",this.pageLeaveListener),!e&&t.addEventListener("pagehide",this.pageLeaveListener)):(t.removeEventListener("beforeunload",this.pageLeaveListener),!e&&t.addEventListener("beforeunload",this.pageLeaveListener)))},this.blurListener=()=>{this.sendEvents()},this.focusListener=()=>{this.recordEvents(!1)},this.pageLeaveListener=e=>{this.pageLeaveFns.forEach((t=>{t(e)}))},this.addCustomRRWebEvent=(e,t={},r=!0)=>s(this,void 0,void 0,(function*(){try{let s;const n=this.config;if(n&&e!==Y.METADATA&&(s={config:ee(n),version:oe},r)){const e=yield Q();s=Object.assign(Object.assign({},e),s)}this.recordCancelCallback&&this.recordFunction?this.recordFunction.addCustomEvent(e,Object.assign(Object.assign({},t),s)):this.loggerProvider.debug(`Not able to add custom replay capture event ${e} due to no ongoing recording.`)}catch(e){this.loggerProvider.debug("Error while adding custom replay capture event: ",e)}})),this.stopRecordingEvents=()=>{var e;try{this.loggerProvider.log("Session Replay capture stopping."),this.recordCancelCallback&&this.recordCancelCallback(),this.recordCancelCallback=null,null===(e=this.networkObservers)||void 0===e||e.stop()}catch(e){const t=e;this.loggerProvider.warn(`Error occurred while stopping replay capture: ${t.toString()}`)}},this.loggerProvider=new te(new d)}init(e,t){return u(this._init(e,t))}_init(e,t){var r,n,o,i,a,l;return s(this,void 0,void 0,(function*(){this.loggerProvider=new te(t.loggerProvider||new d),Object.prototype.hasOwnProperty.call(t,"logLevel")&&this.loggerProvider.enable(t.logLevel),this.identifiers=new kt({sessionId:t.sessionId,deviceId:t.deviceId}),this.joinedConfigGenerator=yield((e,t)=>s(void 0,void 0,void 0,(function*(){const r=new re(e,t),s=yield B({localConfig:r,configKeys:["sessionReplay"]});return new se(s,r)})))(e,t);const{joinedConfig:u,localConfig:h,remoteConfig:p}=yield this.joinedConfigGenerator.generateJoinedConfig(this.identifiers.sessionId);if(this.config=u,this.setMetadata(t.sessionId,u,h,p,null===(r=t.version)||void 0===r?void 0:r.version,oe,null===(n=t.version)||void 0===n?void 0:n.type),t.sessionId&&(null===(o=this.config.interactionConfig)||void 0===o?void 0:o.enabled)){const e=xt.default({sessionId:t.sessionId,type:"interaction"},this.config);this.pageLeaveFns=[e.send(this.getDeviceId.bind(this)).bind(e)],this.scrollHook=e.hook.bind(e)}const f=[];let{storeType:m}=this.config;"idb"!==m||(null===(i=c())||void 0===i?void 0:i.indexedDB)||(m="memory",this.loggerProvider.warn("Could not use preferred indexedDB storage, reverting to in memory option.")),this.loggerProvider.log(`Using ${m} for event storage.`);try{const e=yield je({config:this.config,sessionId:this.identifiers.sessionId,type:"replay",storeType:m});f.push({name:"replay",manager:e})}catch(e){const t=e;this.loggerProvider.warn(`Error occurred while creating replay events manager: ${t.toString()}`)}if(null===(a=this.config.interactionConfig)||void 0===a?void 0:a.enabled){const e=this.config.interactionConfig.batch?St:bt;try{const t=yield je({config:this.config,sessionId:this.identifiers.sessionId,type:"interaction",minInterval:null!==(l=this.config.interactionConfig.trackEveryNms)&&void 0!==l?l:3e4,maxInterval:6e4,payloadBatcher:e,storeType:m});f.push({name:"interaction",manager:t})}catch(e){const t=e;this.loggerProvider.warn(`Error occurred while creating interaction events manager: ${t.toString()}`)}}this.eventsManager=new Ue(...f),this.eventCompressor&&this.eventCompressor.terminate(),this.eventCompressor=new or(this.eventsManager,this.config,this.getDeviceId()),yield this.initializeNetworkObservers(),this.loggerProvider.log("Installing @amplitude/session-replay-browser."),this.teardownEventListeners(!1),this.initialize(!0)}))}setSessionId(e,t){return u(this.asyncSetSessionId(e,t))}asyncSetSessionId(e,t){return s(this,void 0,void 0,(function*(){const r=this.identifiers&&this.identifiers.sessionId;r&&this.sendEvents(r);const s=t||this.getDeviceId();if(this.identifiers=new kt({sessionId:e,deviceId:s}),this.joinedConfigGenerator&&r){const{joinedConfig:e}=yield this.joinedConfigGenerator.generateJoinedConfig(this.identifiers.sessionId);this.config=e}this.recordEvents()}))}getSessionReplayProperties(){const e=this.config,t=this.identifiers;if(!e||!t)return this.loggerProvider.warn("Session replay init has not been called, cannot get session replay properties."),{};const r=this.getShouldRecord();let s={};return r&&(s={[z]:t.sessionReplayId?t.sessionReplayId:null},e.debugMode&&(s[G]=JSON.stringify({appHash:q(e.apiKey).toString()}))),this.addCustomRRWebEvent(Y.GET_SR_PROPS,{shouldRecord:r,eventProperties:s},10===this.eventCount),10===this.eventCount&&(this.eventCount=0),this.eventCount++,s}sendEvents(e){var t;const 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})}initialize(e=!1){var t;return s(this,void 0,void 0,(function*(){if(!(null===(t=this.identifiers)||void 0===t?void 0:t.sessionId))return this.loggerProvider.log("Session is not being recorded due to lack of session id."),Promise.resolve();const r=this.getDeviceId();return 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."),Promise.resolve())}))}shouldOptOut(){var e,t;let r;if(null===(e=this.config)||void 0===e?void 0:e.instanceName){r=(s=this.config.instanceName,void 0===s&&(s="$default_instance"),E.getInstance(s)).identityStore.getIdentity().optOut}var s;return void 0!==r?r:null===(t=this.config)||void 0===t?void 0:t.optOut}getShouldRecord(){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 ${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 ${this.identifiers.sessionId} out of recording due to optOut config.`),!1;const e=function(e,t){const r=q(e.toString());return 31*Math.abs(r)%1e6/1e6<t}(this.identifiers.sessionId,this.config.sampleRate);return e||this.loggerProvider.log(`Opting session ${this.identifiers.sessionId} out of recording due to sample rate.`),e}getBlockSelectors(){var e,t,r;const 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}getMaskTextSelectors(){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"*";const 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}getRecordingPlugins(e){var t;return s(this,void 0,void 0,(function*(){const r=[];if(null===(t=null==e?void 0:e.console)||void 0===t?void 0:t.enabled)try{const{getRecordConsolePlugin:t}=yield Promise.resolve().then((function(){return Vu}));r.push(t({level:e.console.levels}))}catch(e){this.loggerProvider.warn("Failed to load console plugin:",e)}return r.length>0?r:void 0}))}getRecordFunction(){return s(this,void 0,void 0,(function*(){if(this.recordFunction)return this.recordFunction;try{const{record:e}=yield Promise.resolve().then((function(){return nS}));return this.recordFunction=e,e}catch(e){return this.loggerProvider.warn("Failed to load rrweb-record module:",e),null}}))}recordEvents(e=!0){var t,r,n,o,i;return s(this,void 0,void 0,(function*(){const s=this.config,a=this.getShouldRecord(),l=null===(t=this.identifiers)||void 0===t?void 0:t.sessionId;if(!a||!l||!s)return;this.stopRecordingEvents();const c=yield this.getRecordFunction();if(!c)return;yield this.initializeNetworkObservers(),null===(r=this.networkObservers)||void 0===r||r.start((e=>{this.addCustomRRWebEvent(Y.FETCH_REQUEST,e)}));const{privacyConfig:u,interactionConfig:h,loggingConfig:d}=s,p=(null==h?void 0:h.enabled)?{mouseInteraction:this.eventsManager&&Ct(this.loggerProvider,{eventsManager:this.eventsManager,sessionId:l,deviceIdFn:this.getDeviceId.bind(this),mirror:c.mirror,ugcFilterRules:null!==(n=h.ugcFilterRules)&&void 0!==n?n:[]}),scroll:this.scrollHook}:{},f=(null==h?void 0:h.enabled)&&h.ugcFilterRules?h.ugcFilterRules:[];this.loggerProvider.log(`Session Replay capture beginning for ${l}.`);try{this.recordCancelCallback=c({emit:e=>{if(this.shouldOptOut())return this.loggerProvider.log(`Opting session ${l} out of recording due to optOut config.`),this.stopRecordingEvents(),void this.sendEvents();e.type===P.Meta&&(e.data.href=H(e.data.href,f)),this.eventCompressor&&this.eventCompressor.enqueueEvent(e,l)},inlineStylesheet:s.shouldInlineStylesheet,hooks:p,maskAllInputs:!0,maskTextClass:Z,blockClass:"amp-block",blockSelector:this.getBlockSelectors(),applyBackgroundColorToBlockedElements:s.applyBackgroundColorToBlockedElements,maskInputFn:J("input",u),maskTextFn:J("text",u),maskTextSelector:this.getMaskTextSelectors(),recordCanvas:!1,slimDOMOptions:{script:null===(o=s.omitElementTags)||void 0===o?void 0:o.script,comment:null===(i=s.omitElementTags)||void 0===i?void 0:i.comment},errorHandler:e=>{const t=e;if(t.message.includes("insertRule")&&t.message.includes("CSSStyleSheet"))throw t;if(t._external_)throw t;return this.loggerProvider.warn("Error while capturing replay: ",t.toString()),!0},plugins:yield this.getRecordingPlugins(d)}),this.addCustomRRWebEvent(Y.DEBUG_INFO),e&&this.addCustomRRWebEvent(Y.METADATA,this.metadata)}catch(e){this.loggerProvider.warn("Failed to initialize session replay:",e)}}))}getDeviceId(){var e;return null===(e=this.identifiers)||void 0===e?void 0:e.deviceId}getSessionId(){var e;return null===(e=this.identifiers)||void 0===e?void 0:e.sessionId}flush(e=!1){var t;return s(this,void 0,void 0,(function*(){return null===(t=this.eventsManager)||void 0===t?void 0:t.flush(e)}))}shutdown(){this.teardownEventListeners(!0),this.stopRecordingEvents(),this.sendEvents()}mapSDKType(e){return"plugin"===e?"@amplitude/plugin-session-replay-browser":"segment"===e?"@amplitude/segment-session-replay-plugin":null}setMetadata(e,t,r,s,n,o,i){const a=(null==e?void 0:e.toString())?q(e.toString()):void 0;this.metadata={joinedConfig:t,localConfig:r,remoteConfig:s,sessionId:e,hashValue:a,sampleRate:t.sampleRate,replaySDKType:this.mapSDKType(i),replaySDKVersion:n,standaloneSDKType:"@amplitude/session-replay-browser",standaloneSDKVersion:o}}initializeNetworkObservers(){var e,t,r;return s(this,void 0,void 0,(function*(){if((null===(r=null===(t=null===(e=this.config)||void 0===e?void 0:e.loggingConfig)||void 0===t?void 0:t.network)||void 0===r?void 0:r.enabled)&&!this.networkObservers)try{const{NetworkObservers:e}=yield Promise.resolve().then((function(){return oS}));this.networkObservers=new e}catch(e){this.loggerProvider.warn("Failed to import or instantiate NetworkObservers:",e)}}))}},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
|
|
2
2
|
//# sourceMappingURL=session-replay-browser-min.js.map
|