@opengovsg/confetti 0.1.9 → 0.2.0
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/build/RecordingReplayer-9_E5sMQo.js +73 -0
- package/build/confetti.css +3 -1
- package/build/html2canvas-pro.esm-BSw77ylm.js +10 -0
- package/build/index.d.ts +1 -1
- package/build/index.js +4 -4
- package/build/internals-ZuuqmWaa.js +1 -0
- package/build/internals.d.ts +11 -2
- package/build/internals.js +1 -1
- package/build/record-CQ3hStii.js +53 -0
- package/build/{types-DvzzMSv8.d.ts → types-Co_jcoW0.d.ts} +62 -1
- package/package.json +6 -2
- package/build/routing-ZHrE7mgA.js +0 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import{useEffect as e,useRef as t,useState as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";var a=Object.defineProperty,o=(e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,s=(e,t,n)=>o(e,typeof t==`symbol`?t:t+``,n),c=Object.defineProperty,l=(e,t,n)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,u=(e,t,n)=>l(e,typeof t==`symbol`?t:t+``,n),d=(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))(d||{});function f(e){return e.nodeType===e.ELEMENT_NODE}var p=class{constructor(){u(this,`idNodeMap`,new Map),u(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-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){let 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){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function m(){return new p}function h(e){return e.toLowerCase()}function g(e,t){return!e||!t||e.type!==t.type?!1:e.type===d.Document?e.compatMode===t.compatMode:e.type===d.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===d.Comment||e.type===d.Text||e.type===d.CDATA?e.textContent===t.textContent:e.type===d.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function _(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}return n.pathname.match(/\.([0-9a-z]+)(?:$)/i)?.[1]??null}const v=RegExp(`(max|min)-device-(width|height)`,`g`),y={postcssPlugin:`postcss-custom-selectors`,prepare(){return{postcssPlugin:`postcss-custom-selectors`,AtRule:function(e){e.params.match(v)&&(e.params=e.params.replace(v,`$1-$2`))}}}},ee={postcssPlugin:`postcss-hover-classes`,prepare:function(){let e=[];return{Rule:function(t){e.indexOf(t)===-1&&(e.push(t),t.selectors.forEach(function(e){e.includes(`:hover`)&&(t.selector+=`,
|
|
2
|
+
`+e.replace(/:hover/g,`.\\:hover`))}))}}}};function te(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function ne(e){if(e.__esModule)return e;var t=e.default;if(typeof t==`function`){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,`__esModule`,{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var re={exports:{}},b=String,ie=function(){return{isColorSupported:!1,reset:b,bold:b,dim:b,italic:b,underline:b,inverse:b,hidden:b,strikethrough:b,black:b,red:b,green:b,yellow:b,blue:b,magenta:b,cyan:b,white:b,gray:b,bgBlack:b,bgRed:b,bgGreen:b,bgYellow:b,bgBlue:b,bgMagenta:b,bgCyan:b,bgWhite:b}};re.exports=ie(),re.exports.createColors=ie;var ae=re.exports;const x=ne(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:`Module`})));let oe=ae,se=x,ce=class e extends Error{constructor(t,n,r,i,a,o){super(t),this.name=`CssSyntaxError`,this.reason=t,a&&(this.file=a),i&&(this.source=i),o&&(this.plugin=o),n!==void 0&&r!==void 0&&(typeof n==`number`?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+`: `:``,this.message+=this.file?this.file:`<css input>`,this.line!==void 0&&(this.message+=`:`+this.line+`:`+this.column),this.message+=`: `+this.reason}showSourceCode(e){if(!this.source)return``;let t=this.source;e??=oe.isColorSupported,se&&e&&(t=se(t));let n=t.split(/\r?\n/),r=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length,o,s;if(e){let{bold:e,gray:t,red:n}=oe.createColors(!0);o=t=>e(n(t)),s=e=>t(e)}else o=s=e=>e;return n.slice(r,i).map((e,t)=>{let n=r+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 o(`>`)+s(i)+e+`
|
|
3
|
+
`+t+o(`^`)}return` `+s(i)+e}).join(`
|
|
4
|
+
`)}toString(){let e=this.showSourceCode();return e&&=`
|
|
5
|
+
|
|
6
|
+
`+e+`
|
|
7
|
+
`,this.name+`: `+this.message+e}};var le=ce;ce.default=ce;var ue={};ue.isClean=Symbol(`isClean`),ue.my=Symbol(`my`);const de={after:`
|
|
8
|
+
`,beforeClose:`
|
|
9
|
+
`,beforeComment:`
|
|
10
|
+
`,beforeDecl:`
|
|
11
|
+
`,beforeOpen:` `,beforeRule:`
|
|
12
|
+
`,colon:`: `,commentLeft:` `,commentRight:` `,emptyBody:``,indent:` `,semicolon:!1};function fe(e){return e[0].toUpperCase()+e.slice(1)}let pe=class{constructor(e){this.builder=e}atrule(e,t){let n=`@`+e.name,r=e.params?this.rawValue(e,`params`):``;if(e.raws.afterName===void 0?r&&(n+=` `):n+=e.raws.afterName,e.nodes)this.block(e,n+r);else{let i=(e.raws.between||``)+(t?`;`:``);this.builder(n+r+i,e)}}beforeAfter(e,t){let n;n=e.type===`decl`?this.raw(e,null,`beforeDecl`):e.type===`comment`?this.raw(e,null,`beforeComment`):t===`before`?this.raw(e,null,`beforeRule`):this.raw(e,null,`beforeClose`);let r=e.parent,i=0;for(;r&&r.type!==`root`;)i+=1,r=r.parent;if(n.includes(`
|
|
13
|
+
`)){let t=this.raw(e,null,`indent`);if(t.length)for(let e=0;e<i;e++)n+=t}return n}block(e,t){let n=this.raw(e,`between`,`beforeOpen`);this.builder(t+n+`{`,e,`start`);let r;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&&e.nodes[t].type===`comment`;)--t;let n=this.raw(e,`semicolon`);for(let r=0;r<e.nodes.length;r++){let i=e.nodes[r],a=this.raw(i,`before`);a&&this.builder(a),this.stringify(i,t!==r||n)}}comment(e){let t=this.raw(e,`left`,`commentLeft`),n=this.raw(e,`right`,`commentRight`);this.builder(`/*`+t+e.text+n+`*/`,e)}decl(e,t){let n=this.raw(e,`between`,`colon`),r=e.prop+n+this.rawValue(e,`value`);e.important&&(r+=e.raws.important||` !important`),t&&(r+=`;`),this.builder(r,e)}document(e){this.body(e)}raw(e,t,n){let r;if(n||=t,t&&(r=e.raws[t],r!==void 0))return r;let i=e.parent;if(n===`before`&&(!i||i.type===`root`&&i.first===e||i&&i.type===`document`))return``;if(!i)return de[n];let a=e.root();if(a.rawCache||={},a.rawCache[n]!==void 0)return a.rawCache[n];if(n===`before`||n===`after`)return this.beforeAfter(e,n);{let i=`raw`+fe(n);this[i]?r=this[i](a,e):a.walk(e=>{if(r=e.raws[t],r!==void 0)return!1})}return r===void 0&&(r=de[n]),a.rawCache[n]=r,r}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&e.raws.after!==void 0)return t=e.raws.after,t.includes(`
|
|
14
|
+
`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawBeforeComment(e,t){let n;return e.walkComments(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(`
|
|
15
|
+
`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeDecl`):n&&=n.replace(/\S/g,``),n}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(`
|
|
16
|
+
`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeRule`):n&&=n.replace(/\S/g,``),n}rawBeforeOpen(e){let t;return e.walk(e=>{if(e.type!==`decl`&&(t=e.raws.between,t!==void 0))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&n.raws.before!==void 0)return t=n.raws.before,t.includes(`
|
|
17
|
+
`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawColon(e){let t;return e.walkDecls(e=>{if(e.raws.between!==void 0)return t=e.raws.between.replace(/[^\s:]/g,``),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length===0&&(t=e.raws.after,t!==void 0))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&n.raws.before!==void 0){let e=n.raws.before.split(`
|
|
18
|
+
`);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&&e.last.type===`decl`&&(t=e.raws.semicolon,t!==void 0))return!1}),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}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 Error(`Unknown AST node type `+e.type+`. Maybe you need to change PostCSS stringifier.`);this[e.type](e,t)}};var me=pe;pe.default=pe;let he=me;function ge(e,t){new he(t).stringify(e)}var _e=ge;ge.default=ge;let{isClean:ve,my:ye}=ue,be=le,xe=me,Se=_e;function Ce(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r===`proxyCache`)continue;let i=e[r],a=typeof i;r===`parent`&&a===`object`?t&&(n[r]=t):r===`source`?n[r]=i:Array.isArray(i)?n[r]=i.map(e=>Ce(e,n)):(a===`object`&&i!==null&&(i=Ce(i)),n[r]=i)}return n}let we=class{constructor(e={}){for(let t in this.raws={},this[ve]=!1,this[ye]=!0,e)if(t===`nodes`){this.nodes=[];for(let n of e[t])typeof n.clone==`function`?this.append(n.clone()):this.append(n)}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=Ce(this);for(let n in e)t[n]=e[n];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:n,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)}return new be(e)}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:t===`root`?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n?!0:(e[t]=n,(t===`prop`||t===`value`||t===`name`||t===`params`||t===`important`||t===`text`)&&e.markDirty(),!0)}}}markDirty(){if(this[ve]){this[ve]=!1;let e=this;for(;e=e.parent;)e[ve]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let r=t.indexOf(e.word);r!==-1&&(n=this.positionInside(r,t))}return n}positionInside(e,t){let n=t||this.toString(),r=this.source.start.column,i=this.source.start.line;for(let t=0;t<e;t++)n[t]===`
|
|
19
|
+
`?(r=1,i+=1):r+=1;return{column:r,line:i}}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},n=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 r=this.toString(),i=r.indexOf(e.word);i!==-1&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex==`number`?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new xe().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,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!==`document`;)e=e.parent;return e}toJSON(e,t){let n={},r=t==null;t||=new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||e===`parent`||e===`proxyCache`)continue;let r=this[e];if(Array.isArray(r))n[e]=r.map(e=>typeof e==`object`&&e.toJSON?e.toJSON(null,t):e);else if(typeof r==`object`&&r.toJSON)n[e]=r.toJSON(null,t);else if(e===`source`){let a=t.get(r.input);a??(a=i,t.set(r.input,i),i++),n[e]={end:r.end,inputId:a,start:r.start}}else n[e]=r}return r&&(n.inputs=[...t.keys()].map(e=>e.toJSON())),n}toProxy(){return this.proxyCache||=new Proxy(this,this.getProxyProcessor()),this.proxyCache}toString(e=Se){e.stringify&&(e=e.stringify);let t=``;return e(this,e=>{t+=e}),t}warn(e,t,n){let r={node:this};for(let e in n)r[e]=n[e];return e.warn(t,r)}get proxyOf(){return this}};var Te=we;we.default=we;let Ee=Te,De=class extends Ee{constructor(e){e&&e.value!==void 0&&typeof e.value!=`string`&&(e={...e,value:String(e.value)}),super(e),this.type=`decl`}get variable(){return this.prop.startsWith(`--`)||this.prop[0]===`$`}};var Oe=De;De.default=De;var ke={nanoid:(e=21)=>{let t=``,n=e;for(;n--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[Math.random()*64|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r=``,i=n;for(;i--;)r+=e[Math.random()*e.length|0];return r}};let{SourceMapConsumer:Ae,SourceMapGenerator:je}=x,{existsSync:Me,readFileSync:Ne}=x,{dirname:Pe,join:Fe}=x;function Ie(e){return Buffer?Buffer.from(e,`base64`).toString():window.atob(e)}let Le=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,`data:`);let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Pe(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||=new Ae(this.text),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return Ie(e.substr(RegExp.lastMatch.length));let r=e.match(/data:application\/json;([^,]+),/)[1];throw Error(`Unsupported source map encoding `+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,``).trim()}isMap(e){return typeof e==`object`?typeof e.mappings==`string`||typeof e._mappings==`string`||Array.isArray(e.sections):!1}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf(`*/`,n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=Pe(e),Me(e))return this.mapFile=e,Ne(e,`utf-8`).toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t==`string`)return t;if(typeof t==`function`){let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw Error(`Unable to load previous source map: `+n.toString());return e}}else if(t instanceof Ae)return je.fromSourceMap(t).toString();else if(t instanceof je)return t.toString();else if(this.isMap(t))return JSON.stringify(t);else throw Error(`Unsupported previous source map format: `+t.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let t=this.annotation;return e&&(t=Fe(Pe(e),t)),this.loadFile(t)}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Re=Le;Le.default=Le;let{SourceMapConsumer:ze,SourceMapGenerator:Be}=x,{fileURLToPath:Ve,pathToFileURL:He}=x,{isAbsolute:Ue,resolve:We}=x,{nanoid:Ge}=ke,Ke=x,qe=le,Je=Re,Ye=Symbol(`fromOffsetCache`),Xe=!!(ze&&Be),Ze=!!(We&&Ue),Qe=class{constructor(e,t={}){if(e==null||typeof e==`object`&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]===``||this.css[0]===``?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Ze||/^\w+:\/\//.test(t.from)||Ue(t.from)?this.file=t.from:this.file=We(t.from)),Ze&&Xe){let e=new Je(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 `+Ge(6)+`>`),this.map&&(this.map.file=this.from)}error(e,t,n,r={}){let i,a,o;if(t&&typeof t==`object`){let e=t,r=n;if(typeof e.offset==`number`){let r=this.fromOffset(e.offset);t=r.line,n=r.col}else t=e.line,n=e.column;if(typeof r.offset==`number`){let e=this.fromOffset(r.offset);a=e.line,o=e.col}else a=r.line,o=r.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let s=this.origin(t,n,a,o);return i=s?new qe(e,s.endLine===void 0?s.line:{column:s.column,line:s.line},s.endLine===void 0?s.column:{column:s.endColumn,line:s.endLine},s.source,s.file,r.plugin):new qe(e,a===void 0?t:{column:n,line:t},a===void 0?n:{column:o,line:a},this.css,this.file,r.plugin),i.input={column:n,endColumn:o,endLine:a,line:t,source:this.css},this.file&&(He&&(i.input.url=He(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,n;if(this[Ye])n=this[Ye];else{let e=this.css.split(`
|
|
20
|
+
`);n=Array(e.length);let t=0;for(let r=0,i=e.length;r<i;r++)n[r]=t,t+=e[r].length+1;this[Ye]=n}t=n[n.length-1];let r=0;if(e>=t)r=n.length-1;else{let t=n.length-2,i;for(;r<t;)if(i=r+(t-r>>1),e<n[i])t=i-1;else if(e>=n[i+1])r=i+1;else{r=i;break}}return{col:e-n[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:We(this.map.consumer().sourceRoot||this.map.root||`.`,e)}origin(e,t,n,r){if(!this.map)return!1;let i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;let o;typeof n==`number`&&(o=i.originalPositionFor({column:r,line:n}));let s;s=Ue(a.source)?He(a.source):new URL(a.source,this.map.consumer().sourceRoot||He(this.map.mapFile));let c={column:a.column,endColumn:o&&o.column,endLine:o&&o.line,line:a.line,url:s.toString()};if(s.protocol===`file:`)if(Ve)c.file=Ve(s);else throw Error(`file: protocol is not available in this PostCSS build`);let l=i.sourceContentFor(a.source);return l&&(c.source=l),c}toJSON(){let e={};for(let t of[`hasBOM`,`css`,`file`,`id`])this[t]!=null&&(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 $e=Qe;Qe.default=Qe,Ke&&Ke.registerInput&&Ke.registerInput(Qe);let{SourceMapConsumer:et,SourceMapGenerator:tt}=x,{dirname:nt,relative:rt,resolve:it,sep:at}=x,{pathToFileURL:ot}=x,st=$e,ct=!!(et&&tt),lt=!!(nt&&it&&rt&&at);var ut=class{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,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()):typeof this.mapOpts.annotation==`string`?this.mapOpts.annotation:typeof this.mapOpts.annotation==`function`?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+`.map`;let t=`
|
|
21
|
+
`;this.css.includes(`\r
|
|
22
|
+
`)&&(t=`\r
|
|
23
|
+
`),this.css+=t+`/*# sourceMappingURL=`+e+` */`}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),n=e.root||nt(e.file),r;this.mapOpts.sourcesContent===!1?(r=new et(e.text),r.sourcesContent&&=null):r=e.consumer(),this.map.applySourceMap(r,t,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type===`comment`&&e.text.indexOf(`# sourceMappingURL=`)===0&&this.root.removeChild(t)}else this.css&&=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,``)}generate(){if(this.clearAnnotation(),lt&&ct&&this.isMap())return this.generateMap();{let e=``;return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=tt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new tt({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 tt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,n=`<no source>`,r={generated:{column:0,line:0},original:{column:0,line:0},source:``},i,a;this.stringify(this.root,(o,s,c)=>{if(this.css+=o,s&&c!==`end`&&(r.generated.line=e,r.generated.column=t-1,s.source&&s.source.start?(r.source=this.sourcePath(s),r.original.line=s.source.start.line,r.original.column=s.source.start.column-1,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,this.map.addMapping(r))),i=o.match(/\n/g),i?(e+=i.length,a=o.lastIndexOf(`
|
|
24
|
+
`),t=o.length-a):t+=o.length,s&&c!==`start`){let i=s.parent||{raws:{}};(!(s.type===`decl`||s.type===`atrule`&&!s.nodes)||s!==i.last||i.raws.semicolon)&&(s.source&&s.source.end?(r.source=this.sourcePath(s),r.original.line=s.source.end.line,r.original.column=s.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,r.generated.line=e,r.generated.column=t-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:this.mapOpts.annotation===void 0?this.previous().length?this.previous().some(e=>e.annotation):!0:this.mapOpts.annotation}isInline(){if(this.mapOpts.inline!==void 0)return this.mapOpts.inline;let e=this.mapOpts.annotation;return e!==void 0&&e!==!0?!1:this.previous().length?this.previous().some(e=>e.inline):!0}isMap(){return this.opts.map===void 0?this.previous().length>0:!!this.opts.map}isSourcesContent(){return this.mapOpts.sourcesContent===void 0?this.previous().length?this.previous().some(e=>e.withContent()):!0:this.mapOpts.sourcesContent}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||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?nt(this.opts.to):`.`;typeof this.mapOpts.annotation==`string`&&(n=nt(it(n,this.mapOpts.annotation)));let r=rt(n,e);return this.memoizedPaths.set(e,r),r}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 st(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 n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,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(ot){let t=ot(e).toString();return this.memoizedFileURLs.set(e,t),t}else throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;at===`\\`&&(e=e.replace(/\\/g,`/`));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}};let dt=Te,ft=class extends dt{constructor(e){super(e),this.type=`comment`}};var pt=ft;ft.default=ft;let{isClean:mt,my:ht}=ue,gt=Oe,_t=pt,vt=Te,yt,bt,xt,St;function Ct(e){return e.map(e=>(e.nodes&&=Ct(e.nodes),delete e.source,e))}function wt(e){if(e[mt]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)wt(t)}let S=class e extends vt{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=this.getIterator(),n,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],r=e(this.proxyOf.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||=0,this.indexes||={},this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:e[t]?t===`each`||typeof t==`string`&&t.startsWith(`walk`)?(...n)=>e[t](...n.map(e=>typeof e==`function`?(t,n)=>e(t.toProxy(),n):e)):t===`every`||t===`some`?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):t===`root`?()=>e.root().toProxy():t===`nodes`?e.nodes.map(e=>e.toProxy()):t===`first`||t===`last`?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n?!0:(e[t]=n,(t===`name`||t===`params`||t===`selector`)&&e.markDirty(),!0)}}}index(e){return typeof e==`number`?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of r)this.proxyOf.nodes.splice(n+1,0,e);let i;for(let e in this.indexes)i=this.indexes[e],n<i&&(this.indexes[e]=i+r.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),r=n===0?`prepend`:!1,i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);for(let e of i)this.proxyOf.nodes.splice(n,0,e);let a;for(let e in this.indexes)a=this.indexes[e],n<=a&&(this.indexes[e]=a+i.length);return this.markDirty(),this}normalize(t,n){if(typeof t==`string`)t=Ct(yt(t).nodes);else if(t===void 0)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,`ignore`)}else if(t.type===`root`&&this.type!==`document`){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(t.value===void 0)throw Error(`Value field is missed in node creation`);typeof t.value!=`string`&&(t.value=String(t.value)),t=[new gt(t)]}else if(t.selector)t=[new bt(t)];else if(t.name)t=[new xt(t)];else if(t.text)t=[new _t(t)];else throw Error(`Unknown node type in node creation`);return t.map(t=>(t[ht]||e.rebuild(t),t=t.proxyOf,t.parent&&t.parent.removeChild(t),t[mt]&&wt(t),t.raws.before===void 0&&n&&n.raws.before!==void 0&&(t.raws.before=n.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){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`atrule`&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if(n.type===`atrule`&&n.name===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`atrule`)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if(t.type===`comment`)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`decl`&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if(n.type===`decl`&&n.prop===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`decl`)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`rule`&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if(n.type===`rule`&&n.selector===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`rule`)return t(e,n)}))}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=>{yt=e},S.registerRule=e=>{bt=e},S.registerAtRule=e=>{xt=e},S.registerRoot=e=>{St=e};var C=S;S.default=S,S.rebuild=e=>{e.type===`atrule`?Object.setPrototypeOf(e,xt.prototype):e.type===`rule`?Object.setPrototypeOf(e,bt.prototype):e.type===`decl`?Object.setPrototypeOf(e,gt.prototype):e.type===`comment`?Object.setPrototypeOf(e,_t.prototype):e.type===`root`&&Object.setPrototypeOf(e,St.prototype),e[ht]=!0,e.nodes&&e.nodes.forEach(e=>{S.rebuild(e)})};let Tt=C,Et,Dt,w=class extends Tt{constructor(e){super({type:`document`,...e}),this.nodes||=[]}toResult(e={}){return new Et(new Dt,this,e).stringify()}};w.registerLazyResult=e=>{Et=e},w.registerProcessor=e=>{Dt=e};var Ot=w;w.default=w;let kt=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 At=kt;kt.default=kt;let jt=At,Mt=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,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 n=new jt(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type===`warning`)}get content(){return this.css}};var Nt=Mt;Mt.default=Mt;const Pt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ft=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,It=/.[\r\n"'(/\\]/,Lt=/[\da-f]/i;var Rt=function(e,t={}){let n=e.css.valueOf(),r=t.ignoreErrors,i,a,o,s,c,l,u,d,f,p,m=n.length,h=0,g=[],_=[];function v(){return h}function y(t){throw e.error(`Unclosed `+t,h)}function ee(){return _.length===0&&h>=m}function te(e){if(_.length)return _.pop();if(h>=m)return;let t=e?e.ignoreUnclosed:!1;switch(i=n.charCodeAt(h),i){case 10:case 32:case 9:case 13:case 12:a=h;do a+=1,i=n.charCodeAt(a);while(i===32||i===10||i===9||i===13||i===12);p=[`space`,n.slice(h,a)],h=a-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(i);p=[e,e,h];break}case 40:if(d=g.length?g.pop()[1]:``,f=n.charCodeAt(h+1),d===`url`&&f!==39&&f!==34&&f!==32&&f!==10&&f!==9&&f!==12&&f!==13){a=h;do{if(l=!1,a=n.indexOf(`)`,a+1),a===-1)if(r||t){a=h;break}else y(`bracket`);for(u=a;n.charCodeAt(u-1)===92;)--u,l=!l}while(l);p=[`brackets`,n.slice(h,a+1),h,a],h=a}else a=n.indexOf(`)`,h+1),s=n.slice(h,a+1),a===-1||It.test(s)?p=[`(`,`(`,h]:(p=[`brackets`,s,h,a],h=a);break;case 39:case 34:o=i===39?`'`:`"`,a=h;do{if(l=!1,a=n.indexOf(o,a+1),a===-1)if(r||t){a=h+1;break}else y(`string`);for(u=a;n.charCodeAt(u-1)===92;)--u,l=!l}while(l);p=[`string`,n.slice(h,a+1),h,a],h=a;break;case 64:Pt.lastIndex=h+1,Pt.test(n),a=Pt.lastIndex===0?n.length-1:Pt.lastIndex-2,p=[`at-word`,n.slice(h,a+1),h,a],h=a;break;case 92:for(a=h,c=!0;n.charCodeAt(a+1)===92;)a+=1,c=!c;if(i=n.charCodeAt(a+1),c&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(a+=1,Lt.test(n.charAt(a)))){for(;Lt.test(n.charAt(a+1));)a+=1;n.charCodeAt(a+1)===32&&(a+=1)}p=[`word`,n.slice(h,a+1),h,a],h=a;break;default:i===47&&n.charCodeAt(h+1)===42?(a=n.indexOf(`*/`,h+2)+1,a===0&&(r||t?a=n.length:y(`comment`)),p=[`comment`,n.slice(h,a+1),h,a],h=a):(Ft.lastIndex=h+1,Ft.test(n),a=Ft.lastIndex===0?n.length-1:Ft.lastIndex-2,p=[`word`,n.slice(h,a+1),h,a],g.push(p),h=a);break}return h++,p}function ne(e){_.push(e)}return{back:ne,endOfFile:ee,nextToken:te,position:v}};let zt=C,Bt=class extends zt{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 Vt=Bt;Bt.default=Bt,zt.registerAtRule(Bt);let Ht=C,Ut,Wt,T=class extends Ht{constructor(e){super(e),this.type=`root`,this.nodes||=[]}normalize(e,t,n){let r=super.normalize(e);if(t){if(n===`prepend`)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 r)e.raws.before=t.raws.before}return r}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new Ut(new Wt,this,e).stringify()}};T.registerLazyResult=e=>{Ut=e},T.registerProcessor=e=>{Wt=e};var Gt=T;T.default=T,Ht.registerRoot(T);let Kt={comma(e){return Kt.split(e,[`,`],!0)},space(e){return Kt.split(e,[` `,`
|
|
25
|
+
`,` `])},split(e,t,n){let r=[],i=``,a=!1,o=0,s=!1,c=``,l=!1;for(let n of e)l?l=!1:n===`\\`?l=!0:s?n===c&&(s=!1):n===`"`||n===`'`?(s=!0,c=n):n===`(`?o+=1:n===`)`?o>0&&--o:o===0&&t.includes(n)&&(a=!0),a?(i!==``&&r.push(i.trim()),i=``,a=!1):i+=n;return(n||i!==``)&&r.push(i.trim()),r}};var qt=Kt;Kt.default=Kt;let Jt=C,Yt=qt,Xt=class extends Jt{constructor(e){super(e),this.type=`rule`,this.nodes||=[]}get selectors(){return Yt.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:`,`+this.raw(`between`,`beforeOpen`);this.selector=e.join(n)}};var Zt=Xt;Xt.default=Xt,Jt.registerRule(Xt);let Qt=Oe,$t=Rt,en=pt,tn=Vt,nn=Gt,rn=Zt;const an={empty:!0,space:!0};function on(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}var sn=class{constructor(e){this.input=e,this.root=new nn,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=new tn;t.name=e[1].slice(1),t.name===``&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,r,i,a=!1,o=!1,s=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n===`(`||n===`[`?c.push(n===`(`?`)`:`]`):n===`{`&&c.length>0?c.push(`}`):n===c[c.length-1]&&c.pop(),c.length===0)if(n===`;`){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(n===`{`){o=!0;break}else if(n===`}`){if(s.length>0){for(i=s.length-1,r=s[i];r&&r[0]===`space`;)r=s[--i];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}else s.push(e);else s.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(t.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(t,`params`,s),a&&(e=s[s.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=``)):(t.raws.afterName=``,t.params=``),o&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,r;for(let i=t-1;i>=0&&(r=e[i],!(r[0]!==`space`&&(n+=1,n===2)));i--);throw this.input.error(`Missed semicolon`,r[0]===`word`?r[3]+1:r[2])}colon(e){let t=0,n,r,i;for(let[a,o]of e.entries()){if(n=o,r=n[0],r===`(`&&(t+=1),r===`)`&&--t,t===0&&r===`:`)if(!i)this.doubleColon(n);else if(i[0]===`word`&&i[1]===`progid`)continue;else return a;i=n}return!1}comment(e){let t=new en;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text=``,t.raws.left=n,t.raws.right=``;else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=$t(this.input)}decl(e,t){let n=new Qt;this.init(n,e[0][2]);let r=e[e.length-1];for(r[0]===`;`&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(r[3]||r[2]||on(e)),n.source.end.offset++;e[0][0]!==`word`;)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop=``;e.length;){let t=e[0][0];if(t===`:`||t===`space`||t===`comment`)break;n.prop+=e.shift()[1]}n.raws.between=``;let i;for(;e.length;)if(i=e.shift(),i[0]===`:`){n.raws.between+=i[1];break}else i[0]===`word`&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1];(n.prop[0]===`_`||n.prop[0]===`*`)&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let a=[],o;for(;e.length&&(o=e[0][0],!(o!==`space`&&o!==`comment`));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(i=e[t],i[1].toLowerCase()===`!important`){n.important=!0;let r=this.stringFrom(e,t);r=this.spacesFromEnd(e)+r,r!==` !important`&&(n.raws.important=r);break}else if(i[1].toLowerCase()===`important`){let r=e.slice(0),i=``;for(let e=t;e>0;e--){let t=r[e][0];if(i.trim().indexOf(`!`)===0&&t!==`space`)break;i=r.pop()[1]+i}i.trim().indexOf(`!`)===0&&(n.important=!0,n.raws.important=i,e=r)}if(i[0]!==`space`&&i[0]!==`comment`)break}e.some(e=>e[0]!==`space`&&e[0]!==`comment`)&&(n.raws.between+=a.map(e=>e[1]).join(``),a=[]),this.raw(n,`value`,a.concat(e),t),n.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 rn;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&&e.type===`rule`&&!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=``,e.type!==`comment`&&(this.semicolon=!1)}other(e){let t=!1,n=null,r=!1,i=null,a=[],o=e[1].startsWith(`--`),s=[],c=e;for(;c;){if(n=c[0],s.push(c),n===`(`||n===`[`)i||=c,a.push(n===`(`?`)`:`]`);else if(o&&r&&n===`{`)i||=c,a.push(`}`);else if(a.length===0)if(n===`;`)if(r){this.decl(s,o);return}else break;else if(n===`{`){this.rule(s);return}else if(n===`}`){this.tokenizer.back(s.pop()),t=!0;break}else n===`:`&&(r=!0);else n===a[a.length-1]&&(a.pop(),a.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(i),t&&r){if(!o)for(;s.length&&(c=s[s.length-1][0],!(c!==`space`&&c!==`comment`));)this.tokenizer.back(s.pop());this.decl(s,o)}else this.unknownWord(s)}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);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let i,a,o=n.length,s=``,c=!0,l,u;for(let e=0;e<o;e+=1)i=n[e],a=i[0],a===`space`&&e===o-1&&!r?c=!1:a===`comment`?(u=n[e-1]?n[e-1][0]:`empty`,l=n[e+1]?n[e+1][0]:`empty`,!an[u]&&!an[l]?s.slice(-1)===`,`?c=!1:s+=i[1]:c=!1):s+=i[1];if(!c){let r=n.reduce((e,t)=>e+t[1],``);e.raws[t]={raw:r,value:s}}e[t]=s}rule(e){e.pop();let t=new rn;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,`selector`,e),this.current=t}spacesAndCommentsFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],!(t!==`space`&&t!==`comment`));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n=``;for(;e.length&&(t=e[0][0],!(t!==`space`&&t!==`comment`));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],t===`space`);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n=``;for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}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 cn=C,ln=sn,un=$e;function dn(e,t){let n=new ln(new un(e,t));try{n.parse()}catch(e){throw e}return n.root}var fn=dn;dn.default=dn,cn.registerParse(dn);let{isClean:E,my:pn}=ue,mn=ut,hn=_e,gn=C,_n=Ot,vn=Nt,yn=fn,bn=Gt;const xn={atrule:`AtRule`,comment:`Comment`,decl:`Declaration`,document:`Document`,root:`Root`,rule:`Rule`},Sn={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},Cn={Once:!0,postcssPlugin:!0,prepare:!0};function wn(e){return typeof e==`object`&&typeof e.then==`function`}function Tn(e){let t=!1,n=xn[e.type];return e.type===`decl`?t=e.prop.toLowerCase():e.type===`atrule`&&(t=e.name.toLowerCase()),t&&e.append?[n,n+`-`+t,0,n+`Exit`,n+`Exit-`+t]:t?[n,n+`-`+t,n+`Exit`,n+`Exit-`+t]:e.append?[n,0,n+`Exit`]:[n,n+`Exit`]}function En(e){let t;return t=e.type===`document`?[`Document`,0,`DocumentExit`]:e.type===`root`?[`Root`,0,`RootExit`]:Tn(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Dn(e){return e[E]=!1,e.nodes&&e.nodes.forEach(e=>Dn(e)),e}let On={},D=class e{constructor(t,n,r){this.stringified=!1,this.processed=!1;let i;if(typeof n==`object`&&n&&(n.type===`root`||n.type===`document`))i=Dn(n);else if(n instanceof e||n instanceof vn)i=Dn(n.root),n.map&&(r.map===void 0&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let e=yn;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{i=e(n,r)}catch(e){this.processed=!0,this.error=e}i&&!i[pn]&&gn.rebuild(i)}this.result=new vn(t,i,r),this.helpers={...On,postcss:On,result:this.result},this.plugins=this.processor.plugins.map(e=>typeof e==`object`&&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.runAsync(),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error(`Use process(css).then(cb) to work with async plugins`)}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name===`CssSyntaxError`&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if(typeof t==`object`)for(let n in t){if(!Sn[n]&&/^[A-Z]/.test(n))throw Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Cn[n])if(typeof t[n]==`object`)for(let r in t[n])r===`*`?e(t,n,t[n][r]):e(t,n+`-`+r.toLowerCase(),t[n][r]);else typeof t[n]==`function`&&e(t,n,t[n])}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],n=this.runOnRoot(t);if(wn(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[E];){e[E]=!0;let t=[En(e)];for(;t.length>0;){let e=this.visitTick(t);if(wn(e))try{await e}catch(e){let n=t[t.length-1].node;throw this.handleError(e,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type===`document`){let t=e.nodes.map(e=>n(e,this.helpers));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e==`object`&&e.Once){if(this.result.root.type===`document`){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return wn(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e==`function`)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=hn;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new mn(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[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(wn(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[E];)e[E]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type===`document`)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 this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,r]of e){this.result.lastPlugin=n;let e;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if(t.type!==`root`&&t.type!==`document`&&!t.parent)return!0;if(wn(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:r}=t;if(n.type!==`root`&&n.type!==`document`&&!n.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){let[e,i]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return i(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(t.iterator!==0){let r=t.iterator,i;for(;i=n.nodes[n.indexes[r]];)if(n.indexes[r]+=1,!i[E]){i[E]=!0,e.push(En(i));return}t.iterator=0,delete n.indexes[r]}let i=t.events;for(;t.eventIndex<i.length;){let e=i[t.eventIndex];if(t.eventIndex+=1,e===0){n.nodes&&n.nodes.length&&(n[E]=!0,t.iterator=n.getIterator());return}else if(this.listeners[e]){t.visitors=this.listeners[e];return}}e.pop()}walkSync(e){e[E]=!0;let t=Tn(e);for(let n of t)if(n===0)e.nodes&&e.each(e=>{e[E]||this.walkSync(e)});else{let t=this.listeners[n];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`}};D.registerPostcss=e=>{On=e};var kn=D;D.default=D,bn.registerLazyResult(D),_n.registerLazyResult(D);let An=ut,jn=_e,Mn=fn;const Nn=Nt;let Pn=class{constructor(e,t,n){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let r=jn;this.result=new Nn(this._processor,void 0,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,`root`,{get(){return i.root}});let a=new An(r,void 0,this._opts,t);if(a.isMap()){let[e,t]=a.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else a.clearAnnotation(),this.result.css=a.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 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=Mn;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 Fn=Pn;Pn.default=Pn;let In=Fn,Ln=kn,Rn=Ot,zn=Gt,Bn=class{constructor(e=[]){this.version=`8.4.38`,this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n==`object`&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n==`object`&&n.postcssPlugin)t.push(n);else if(typeof n==`function`)t.push(n);else if(!(typeof n==`object`&&(n.parse||n.stringify)))throw Error(n+` is not a PostCSS plugin`);return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new In(this,e,t):new Ln(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Vn=Bn;Bn.default=Bn,zn.registerProcessor(Bn),Rn.registerProcessor(Bn);let Hn=Oe,Un=Re,Wn=pt,Gn=Vt,Kn=$e,qn=Gt,Jn=Zt;function Yn(e,t){if(Array.isArray(e))return e.map(e=>Yn(e));let{inputs:n,...r}=e;if(n){t=[];for(let e of n){let n={...e,__proto__:Kn.prototype};n.map&&={...n.map,__proto__:Un.prototype},t.push(n)}}if(r.nodes&&=e.nodes.map(e=>Yn(e,t)),r.source){let{inputId:e,...n}=r.source;r.source=n,e!=null&&(r.source.input=t[e])}if(r.type===`root`)return new qn(r);if(r.type===`decl`)return new Hn(r);if(r.type===`rule`)return new Jn(r);if(r.type===`comment`)return new Wn(r);if(r.type===`atrule`)return new Gn(r);throw Error(`Unknown node type: `+e.type)}var Xn=Yn;Yn.default=Yn;let Zn=le,Qn=Oe,$n=kn,er=C,tr=Vn,nr=_e,rr=Xn,ir=Ot,ar=At,or=pt,sr=Vt,cr=Nt,lr=$e,ur=fn,dr=qt,fr=Zt,pr=Gt,mr=Te;function O(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new tr(e)}O.plugin=function(e,t){let n=!1;function r(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
26
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith(`cn`)&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
27
|
+
https://www.w3ctech.com/topic/2226`));let i=t(...r);return i.postcssPlugin=e,i.postcssVersion=new tr().version,i}let i;return Object.defineProperty(r,`postcss`,{get(){return i||=r(),i}}),r.process=function(e,t,n){return O([r(n)]).process(e,t)},r},O.stringify=nr,O.parse=ur,O.fromJSON=rr,O.list=dr,O.comment=e=>new or(e),O.atRule=e=>new sr(e),O.decl=e=>new Qn(e),O.rule=e=>new fr(e),O.root=e=>new pr(e),O.document=e=>new ir(e),O.CssSyntaxError=Zn,O.Declaration=Qn,O.Container=er,O.Processor=tr,O.Document=ir,O.Comment=or,O.Warning=ar,O.AtRule=sr,O.Result=cr,O.Input=lr,O.Rule=fr,O.Root=pr,O.Node=mr,$n.registerPostcss(O);var hr=O;O.default=O;const k=te(hr);k.stringify,k.fromJSON,k.plugin,k.parse,k.list,k.document,k.comment,k.atRule,k.rule,k.decl,k.root,k.CssSyntaxError,k.Declaration,k.Container,k.Processor,k.Document,k.Comment,k.Warning,k.AtRule,k.Result,k.Input,k.Rule,k.Root,k.Node;const gr={script:`noscript`,altglyph:`altGlyph`,altglyphdef:`altGlyphDef`,altglyphitem:`altGlyphItem`,animatecolor:`animateColor`,animatemotion:`animateMotion`,animatetransform:`animateTransform`,clippath:`clipPath`,feblend:`feBlend`,fecolormatrix:`feColorMatrix`,fecomponenttransfer:`feComponentTransfer`,fecomposite:`feComposite`,feconvolvematrix:`feConvolveMatrix`,fediffuselighting:`feDiffuseLighting`,fedisplacementmap:`feDisplacementMap`,fedistantlight:`feDistantLight`,fedropshadow:`feDropShadow`,feflood:`feFlood`,fefunca:`feFuncA`,fefuncb:`feFuncB`,fefuncg:`feFuncG`,fefuncr:`feFuncR`,fegaussianblur:`feGaussianBlur`,feimage:`feImage`,femerge:`feMerge`,femergenode:`feMergeNode`,femorphology:`feMorphology`,feoffset:`feOffset`,fepointlight:`fePointLight`,fespecularlighting:`feSpecularLighting`,fespotlight:`feSpotLight`,fetile:`feTile`,feturbulence:`feTurbulence`,foreignobject:`foreignObject`,glyphref:`glyphRef`,lineargradient:`linearGradient`,radialgradient:`radialGradient`};function _r(e){let t=gr[e.tagName]?gr[e.tagName]:e.tagName;return t===`link`&&e.attributes._cssText&&(t=`style`),t}function vr(e,t){let n=t?.stylesWithHoverClass.get(e);if(n)return n;let r=e;try{r=k([y,ee]).process(e).css}catch(e){console.warn(`Failed to adapt css for replay`,e)}return t?.stylesWithHoverClass.set(e,r),r}function yr(){return{stylesWithHoverClass:new Map}}function br(e,t,n,r){let i=[];for(let t of e.childNodes)t.type===d.Text&&i.push(t);let a=t.split(`/* rr_split */`);for(;a.length>1&&a.length>i.length;)a.splice(-2,2,a.slice(-2).join(``));let o=``;n&&(o=vr(a.join(``),r));let s=0;for(let e=0;e<i.length&&e!==a.length;e++){let t=i[e];if(!n)t.textContent=a[e];else if(e<a.length-1){let n=s,r=a[e+1].length;r=Math.min(r,30);let i=!1;for(;r>2;r--){let t=a[e+1].substring(0,r),c=o.substring(s).indexOf(t);if(i=c!==-1,i){n+=c;break}}i||(n+=a[e].length),t.textContent=o.substring(s,n),s=n}else t.textContent=o.substring(s)}}function xr(e,t,n,r){let{doc:i,hackCss:a,cache:o}=r;e.childNodes.length?br(e,n,a,o):(a&&(n=vr(n,o)),t.appendChild(i.createTextNode(n)))}function Sr(e,t){let{doc:n,hackCss:r,cache:i}=t;switch(e.type){case d.Document:return n.implementation.createDocument(null,``,null);case d.DocumentType:return n.implementation.createDocumentType(e.name||`html`,e.publicId,e.systemId);case d.Element:{let r=_r(e),i;e.isSVG?i=n.createElementNS(`http://www.w3.org/2000/svg`,r):(e.isCustom&&n.defaultView?.customElements&&!n.defaultView.customElements.get(e.tagName)&&n.defaultView.customElements.define(e.tagName,class extends n.defaultView.HTMLElement{}),i=n.createElement(r));let a={};for(let o in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,o))continue;let s=e.attributes[o];if(!(r===`option`&&o===`selected`&&s===!1)&&s!==null){if(s===!0&&(s=``),o.startsWith(`rr_`)){a[o]=s;continue}if(typeof s==`string`){if(r===`style`&&o===`_cssText`){xr(e,i,s,t);continue}else if(r===`textarea`&&o===`value`){i.appendChild(n.createTextNode(s)),e.childNodes=[];continue}}try{if(e.isSVG&&o===`xlink:href`)i.setAttributeNS(`http://www.w3.org/1999/xlink`,o,s.toString());else if(o===`onload`||o===`onclick`||o.substring(0,7)===`onmouse`)i.setAttribute(`_`+o,s.toString());else if(r===`meta`&&e.attributes[`http-equiv`]===`Content-Security-Policy`&&o===`content`){i.setAttribute(`csp-content`,s.toString());continue}else r===`link`&&(e.attributes.rel===`preload`&&e.attributes.as===`script`||e.attributes.rel===`modulepreload`)||r===`link`&&e.attributes.rel===`prefetch`&&typeof e.attributes.href==`string`&&_(e.attributes.href)===`js`||(r===`img`&&e.attributes.srcset&&e.attributes.rr_dataURL?i.setAttribute(`rrweb-original-srcset`,e.attributes.srcset):i.setAttribute(o,s.toString()))}catch{}}}for(let t in a){let o=a[t];if(r===`canvas`&&t===`rr_dataURL`){let e=n.createElement(`img`);e.onload=()=>{let t=i.getContext(`2d`);t&&t.drawImage(e,0,0,e.width,e.height)},e.src=o.toString(),i.RRNodeType&&(i.rr_dataURL=o.toString())}else if(r===`img`&&t===`rr_dataURL`){let t=i;t.currentSrc.startsWith(`data:`)||(t.setAttribute(`rrweb-original-src`,e.attributes.src),t.src=o.toString())}if(t===`rr_width`)i.style.setProperty(`width`,o.toString());else if(t===`rr_height`)i.style.setProperty(`height`,o.toString());else if(t===`rr_mediaCurrentTime`&&typeof o==`number`)i.currentTime=o;else if(t===`rr_mediaState`)switch(o){case`played`:i.play().catch(e=>console.warn(`media playback error`,e));break;case`paused`:i.pause();break}else t===`rr_mediaPlaybackRate`&&typeof o==`number`?i.playbackRate=o:t===`rr_mediaMuted`&&typeof o==`boolean`?i.muted=o:t===`rr_mediaLoop`&&typeof o==`boolean`?i.loop=o:t===`rr_mediaVolume`&&typeof o==`number`?i.volume=o:t===`rr_open_mode`&&i.setAttribute(`rr_open_mode`,o)}if(e.isShadowHost)if(!i.shadowRoot)i.attachShadow({mode:`open`});else for(;i.shadowRoot.firstChild;)i.shadowRoot.removeChild(i.shadowRoot.firstChild);return i}case d.Text:return e.isStyle&&r?n.createTextNode(vr(e.textContent,i)):n.createTextNode(e.textContent);case d.CDATA:return n.createCDATASection(e.textContent);case d.Comment:return n.createComment(e.textContent);default:return null}}function Cr(e,t){let{doc:n,mirror:r,skipChild:i=!1,hackCss:a=!0,afterAppend:o,cache:s}=t;if(r.has(e.id)){let t=r.getNode(e.id);if(g(r.getMeta(t),e))return r.getNode(e.id)}let c=Sr(e,{doc:n,hackCss:a,cache:s});if(!c)return null;if(e.rootId&&r.getNode(e.rootId)!==n&&r.replace(e.rootId,n),e.type===d.Document&&(n.close(),n.open(),e.compatMode===`BackCompat`&&e.childNodes&&e.childNodes[0].type!==d.DocumentType&&(e.childNodes[0].type===d.Element&&`xmlns`in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns===`http://www.w3.org/1999/xhtml`?n.write(`<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">`):n.write(`<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">`)),c=n),r.add(c,e),(e.type===d.Document||e.type===d.Element)&&!i)for(let t of e.childNodes){let i=Cr(t,{doc:n,mirror:r,skipChild:!1,hackCss:a,afterAppend:o,cache:s});if(!i){console.warn(`Failed to rebuild`,t);continue}if(t.isShadow&&f(c)&&c.shadowRoot)c.shadowRoot.appendChild(i);else if(e.type===d.Document&&t.type==d.Element){let e=i,t=null;e.childNodes.forEach(e=>{e.nodeName===`BODY`&&(t=e)}),t?(e.removeChild(t),c.appendChild(i),e.appendChild(t)):c.appendChild(i)}else c.appendChild(i);o&&o(i,t.id)}return c}function wr(e,t){function n(e){t(e)}for(let t of e.getIds())e.has(t)&&n(e.getNode(t))}function Tr(e,t){let n=t.getMeta(e);if(n?.type!==d.Element)return;let r=e;for(let e in n.attributes){if(!(Object.prototype.hasOwnProperty.call(n.attributes,e)&&e.startsWith(`rr_`)))continue;let t=n.attributes[e];e===`rr_scrollLeft`&&(r.scrollLeft=t),e===`rr_scrollTop`&&(r.scrollTop=t)}}function Er(e,t){let{doc:n,onVisit:r,hackCss:i=!0,afterAppend:a,cache:o,mirror:s=new p}=t,c=Cr(e,{doc:n,mirror:s,skipChild:!1,hackCss:i,afterAppend:a,cache:o});return wr(s,e=>{r&&r(e),Tr(e,s)}),c}var Dr=Object.defineProperty,Or=(e,t,n)=>t in e?Dr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A=(e,t,n)=>Or(e,typeof t==`symbol`?t:t+``,n),kr=Object.defineProperty,Ar=(e,t,n)=>t in e?kr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jr=(e,t,n)=>Ar(e,typeof t==`symbol`?t:t+``,n);let Mr=class{constructor(){jr(this,`idNodeMap`,new Map),jr(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-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){let 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){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Nr(){return new Mr}function Pr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function Fr(e){if(e.__esModule)return e;var t=e.default;if(typeof t==`function`){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,`__esModule`,{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var Ir={exports:{}},j=String,Lr=function(){return{isColorSupported:!1,reset:j,bold:j,dim:j,italic:j,underline:j,inverse:j,hidden:j,strikethrough:j,black:j,red:j,green:j,yellow:j,blue:j,magenta:j,cyan:j,white:j,gray:j,bgBlack:j,bgRed:j,bgGreen:j,bgYellow:j,bgBlue:j,bgMagenta:j,bgCyan:j,bgWhite:j}};Ir.exports=Lr(),Ir.exports.createColors=Lr;var Rr=Ir.exports;const M=Fr(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:`Module`})));let zr=Rr,Br=M,Vr=class e extends Error{constructor(t,n,r,i,a,o){super(t),this.name=`CssSyntaxError`,this.reason=t,a&&(this.file=a),i&&(this.source=i),o&&(this.plugin=o),n!==void 0&&r!==void 0&&(typeof n==`number`?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+`: `:``,this.message+=this.file?this.file:`<css input>`,this.line!==void 0&&(this.message+=`:`+this.line+`:`+this.column),this.message+=`: `+this.reason}showSourceCode(e){if(!this.source)return``;let t=this.source;e??=zr.isColorSupported,Br&&e&&(t=Br(t));let n=t.split(/\r?\n/),r=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length,o,s;if(e){let{bold:e,gray:t,red:n}=zr.createColors(!0);o=t=>e(n(t)),s=e=>t(e)}else o=s=e=>e;return n.slice(r,i).map((e,t)=>{let n=r+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 o(`>`)+s(i)+e+`
|
|
28
|
+
`+t+o(`^`)}return` `+s(i)+e}).join(`
|
|
29
|
+
`)}toString(){let e=this.showSourceCode();return e&&=`
|
|
30
|
+
|
|
31
|
+
`+e+`
|
|
32
|
+
`,this.name+`: `+this.message+e}};var Hr=Vr;Vr.default=Vr;var Ur={};Ur.isClean=Symbol(`isClean`),Ur.my=Symbol(`my`);const Wr={after:`
|
|
33
|
+
`,beforeClose:`
|
|
34
|
+
`,beforeComment:`
|
|
35
|
+
`,beforeDecl:`
|
|
36
|
+
`,beforeOpen:` `,beforeRule:`
|
|
37
|
+
`,colon:`: `,commentLeft:` `,commentRight:` `,emptyBody:``,indent:` `,semicolon:!1};function Gr(e){return e[0].toUpperCase()+e.slice(1)}let Kr=class{constructor(e){this.builder=e}atrule(e,t){let n=`@`+e.name,r=e.params?this.rawValue(e,`params`):``;if(e.raws.afterName===void 0?r&&(n+=` `):n+=e.raws.afterName,e.nodes)this.block(e,n+r);else{let i=(e.raws.between||``)+(t?`;`:``);this.builder(n+r+i,e)}}beforeAfter(e,t){let n;n=e.type===`decl`?this.raw(e,null,`beforeDecl`):e.type===`comment`?this.raw(e,null,`beforeComment`):t===`before`?this.raw(e,null,`beforeRule`):this.raw(e,null,`beforeClose`);let r=e.parent,i=0;for(;r&&r.type!==`root`;)i+=1,r=r.parent;if(n.includes(`
|
|
38
|
+
`)){let t=this.raw(e,null,`indent`);if(t.length)for(let e=0;e<i;e++)n+=t}return n}block(e,t){let n=this.raw(e,`between`,`beforeOpen`);this.builder(t+n+`{`,e,`start`);let r;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&&e.nodes[t].type===`comment`;)--t;let n=this.raw(e,`semicolon`);for(let r=0;r<e.nodes.length;r++){let i=e.nodes[r],a=this.raw(i,`before`);a&&this.builder(a),this.stringify(i,t!==r||n)}}comment(e){let t=this.raw(e,`left`,`commentLeft`),n=this.raw(e,`right`,`commentRight`);this.builder(`/*`+t+e.text+n+`*/`,e)}decl(e,t){let n=this.raw(e,`between`,`colon`),r=e.prop+n+this.rawValue(e,`value`);e.important&&(r+=e.raws.important||` !important`),t&&(r+=`;`),this.builder(r,e)}document(e){this.body(e)}raw(e,t,n){let r;if(n||=t,t&&(r=e.raws[t],r!==void 0))return r;let i=e.parent;if(n===`before`&&(!i||i.type===`root`&&i.first===e||i&&i.type===`document`))return``;if(!i)return Wr[n];let a=e.root();if(a.rawCache||={},a.rawCache[n]!==void 0)return a.rawCache[n];if(n===`before`||n===`after`)return this.beforeAfter(e,n);{let i=`raw`+Gr(n);this[i]?r=this[i](a,e):a.walk(e=>{if(r=e.raws[t],r!==void 0)return!1})}return r===void 0&&(r=Wr[n]),a.rawCache[n]=r,r}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&e.raws.after!==void 0)return t=e.raws.after,t.includes(`
|
|
39
|
+
`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawBeforeComment(e,t){let n;return e.walkComments(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(`
|
|
40
|
+
`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeDecl`):n&&=n.replace(/\S/g,``),n}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(`
|
|
41
|
+
`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeRule`):n&&=n.replace(/\S/g,``),n}rawBeforeOpen(e){let t;return e.walk(e=>{if(e.type!==`decl`&&(t=e.raws.between,t!==void 0))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&n.raws.before!==void 0)return t=n.raws.before,t.includes(`
|
|
42
|
+
`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawColon(e){let t;return e.walkDecls(e=>{if(e.raws.between!==void 0)return t=e.raws.between.replace(/[^\s:]/g,``),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length===0&&(t=e.raws.after,t!==void 0))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&n.raws.before!==void 0){let e=n.raws.before.split(`
|
|
43
|
+
`);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&&e.last.type===`decl`&&(t=e.raws.semicolon,t!==void 0))return!1}),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}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 Error(`Unknown AST node type `+e.type+`. Maybe you need to change PostCSS stringifier.`);this[e.type](e,t)}};var qr=Kr;Kr.default=Kr;let Jr=qr;function Yr(e,t){new Jr(t).stringify(e)}var Xr=Yr;Yr.default=Yr;let{isClean:Zr,my:Qr}=Ur,$r=Hr,ei=qr,ti=Xr;function ni(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r===`proxyCache`)continue;let i=e[r],a=typeof i;r===`parent`&&a===`object`?t&&(n[r]=t):r===`source`?n[r]=i:Array.isArray(i)?n[r]=i.map(e=>ni(e,n)):(a===`object`&&i!==null&&(i=ni(i)),n[r]=i)}return n}let ri=class{constructor(e={}){for(let t in this.raws={},this[Zr]=!1,this[Qr]=!0,e)if(t===`nodes`){this.nodes=[];for(let n of e[t])typeof n.clone==`function`?this.append(n.clone()):this.append(n)}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=ni(this);for(let n in e)t[n]=e[n];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:n,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)}return new $r(e)}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:t===`root`?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n?!0:(e[t]=n,(t===`prop`||t===`value`||t===`name`||t===`params`||t===`important`||t===`text`)&&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 n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let r=t.indexOf(e.word);r!==-1&&(n=this.positionInside(r,t))}return n}positionInside(e,t){let n=t||this.toString(),r=this.source.start.column,i=this.source.start.line;for(let t=0;t<e;t++)n[t]===`
|
|
44
|
+
`?(r=1,i+=1):r+=1;return{column:r,line:i}}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},n=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 r=this.toString(),i=r.indexOf(e.word);i!==-1&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex==`number`?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new ei().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,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!==`document`;)e=e.parent;return e}toJSON(e,t){let n={},r=t==null;t||=new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||e===`parent`||e===`proxyCache`)continue;let r=this[e];if(Array.isArray(r))n[e]=r.map(e=>typeof e==`object`&&e.toJSON?e.toJSON(null,t):e);else if(typeof r==`object`&&r.toJSON)n[e]=r.toJSON(null,t);else if(e===`source`){let a=t.get(r.input);a??(a=i,t.set(r.input,i),i++),n[e]={end:r.end,inputId:a,start:r.start}}else n[e]=r}return r&&(n.inputs=[...t.keys()].map(e=>e.toJSON())),n}toProxy(){return this.proxyCache||=new Proxy(this,this.getProxyProcessor()),this.proxyCache}toString(e=ti){e.stringify&&(e=e.stringify);let t=``;return e(this,e=>{t+=e}),t}warn(e,t,n){let r={node:this};for(let e in n)r[e]=n[e];return e.warn(t,r)}get proxyOf(){return this}};var ii=ri;ri.default=ri;let ai=ii,oi=class extends ai{constructor(e){e&&e.value!==void 0&&typeof e.value!=`string`&&(e={...e,value:String(e.value)}),super(e),this.type=`decl`}get variable(){return this.prop.startsWith(`--`)||this.prop[0]===`$`}};var si=oi;oi.default=oi;var ci={nanoid:(e=21)=>{let t=``,n=e;for(;n--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[Math.random()*64|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r=``,i=n;for(;i--;)r+=e[Math.random()*e.length|0];return r}};let{SourceMapConsumer:li,SourceMapGenerator:ui}=M,{existsSync:di,readFileSync:fi}=M,{dirname:pi,join:mi}=M;function hi(e){return Buffer?Buffer.from(e,`base64`).toString():window.atob(e)}let gi=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,`data:`);let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=pi(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||=new li(this.text),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return hi(e.substr(RegExp.lastMatch.length));let r=e.match(/data:application\/json;([^,]+),/)[1];throw Error(`Unsupported source map encoding `+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,``).trim()}isMap(e){return typeof e==`object`?typeof e.mappings==`string`||typeof e._mappings==`string`||Array.isArray(e.sections):!1}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf(`*/`,n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=pi(e),di(e))return this.mapFile=e,fi(e,`utf-8`).toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t==`string`)return t;if(typeof t==`function`){let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw Error(`Unable to load previous source map: `+n.toString());return e}}else if(t instanceof li)return ui.fromSourceMap(t).toString();else if(t instanceof ui)return t.toString();else if(this.isMap(t))return JSON.stringify(t);else throw Error(`Unsupported previous source map format: `+t.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let t=this.annotation;return e&&(t=mi(pi(e),t)),this.loadFile(t)}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var _i=gi;gi.default=gi;let{SourceMapConsumer:vi,SourceMapGenerator:yi}=M,{fileURLToPath:bi,pathToFileURL:xi}=M,{isAbsolute:Si,resolve:Ci}=M,{nanoid:wi}=ci,Ti=M,Ei=Hr,Di=_i,Oi=Symbol(`fromOffsetCache`),ki=!!(vi&&yi),Ai=!!(Ci&&Si),ji=class{constructor(e,t={}){if(e==null||typeof e==`object`&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]===``||this.css[0]===``?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Ai||/^\w+:\/\//.test(t.from)||Si(t.from)?this.file=t.from:this.file=Ci(t.from)),Ai&&ki){let e=new Di(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 `+wi(6)+`>`),this.map&&(this.map.file=this.from)}error(e,t,n,r={}){let i,a,o;if(t&&typeof t==`object`){let e=t,r=n;if(typeof e.offset==`number`){let r=this.fromOffset(e.offset);t=r.line,n=r.col}else t=e.line,n=e.column;if(typeof r.offset==`number`){let e=this.fromOffset(r.offset);a=e.line,o=e.col}else a=r.line,o=r.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let s=this.origin(t,n,a,o);return i=s?new Ei(e,s.endLine===void 0?s.line:{column:s.column,line:s.line},s.endLine===void 0?s.column:{column:s.endColumn,line:s.endLine},s.source,s.file,r.plugin):new Ei(e,a===void 0?t:{column:n,line:t},a===void 0?n:{column:o,line:a},this.css,this.file,r.plugin),i.input={column:n,endColumn:o,endLine:a,line:t,source:this.css},this.file&&(xi&&(i.input.url=xi(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,n;if(this[Oi])n=this[Oi];else{let e=this.css.split(`
|
|
45
|
+
`);n=Array(e.length);let t=0;for(let r=0,i=e.length;r<i;r++)n[r]=t,t+=e[r].length+1;this[Oi]=n}t=n[n.length-1];let r=0;if(e>=t)r=n.length-1;else{let t=n.length-2,i;for(;r<t;)if(i=r+(t-r>>1),e<n[i])t=i-1;else if(e>=n[i+1])r=i+1;else{r=i;break}}return{col:e-n[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Ci(this.map.consumer().sourceRoot||this.map.root||`.`,e)}origin(e,t,n,r){if(!this.map)return!1;let i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;let o;typeof n==`number`&&(o=i.originalPositionFor({column:r,line:n}));let s;s=Si(a.source)?xi(a.source):new URL(a.source,this.map.consumer().sourceRoot||xi(this.map.mapFile));let c={column:a.column,endColumn:o&&o.column,endLine:o&&o.line,line:a.line,url:s.toString()};if(s.protocol===`file:`)if(bi)c.file=bi(s);else throw Error(`file: protocol is not available in this PostCSS build`);let l=i.sourceContentFor(a.source);return l&&(c.source=l),c}toJSON(){let e={};for(let t of[`hasBOM`,`css`,`file`,`id`])this[t]!=null&&(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 Mi=ji;ji.default=ji,Ti&&Ti.registerInput&&Ti.registerInput(ji);let{SourceMapConsumer:Ni,SourceMapGenerator:Pi}=M,{dirname:Fi,relative:Ii,resolve:Li,sep:Ri}=M,{pathToFileURL:zi}=M,Bi=Mi,Vi=!!(Ni&&Pi),Hi=!!(Fi&&Li&&Ii&&Ri);var Ui=class{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,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()):typeof this.mapOpts.annotation==`string`?this.mapOpts.annotation:typeof this.mapOpts.annotation==`function`?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+`.map`;let t=`
|
|
46
|
+
`;this.css.includes(`\r
|
|
47
|
+
`)&&(t=`\r
|
|
48
|
+
`),this.css+=t+`/*# sourceMappingURL=`+e+` */`}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),n=e.root||Fi(e.file),r;this.mapOpts.sourcesContent===!1?(r=new Ni(e.text),r.sourcesContent&&=null):r=e.consumer(),this.map.applySourceMap(r,t,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type===`comment`&&e.text.indexOf(`# sourceMappingURL=`)===0&&this.root.removeChild(t)}else this.css&&=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,``)}generate(){if(this.clearAnnotation(),Hi&&Vi&&this.isMap())return this.generateMap();{let e=``;return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Pi.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Pi({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 Pi({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,n=`<no source>`,r={generated:{column:0,line:0},original:{column:0,line:0},source:``},i,a;this.stringify(this.root,(o,s,c)=>{if(this.css+=o,s&&c!==`end`&&(r.generated.line=e,r.generated.column=t-1,s.source&&s.source.start?(r.source=this.sourcePath(s),r.original.line=s.source.start.line,r.original.column=s.source.start.column-1,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,this.map.addMapping(r))),i=o.match(/\n/g),i?(e+=i.length,a=o.lastIndexOf(`
|
|
49
|
+
`),t=o.length-a):t+=o.length,s&&c!==`start`){let i=s.parent||{raws:{}};(!(s.type===`decl`||s.type===`atrule`&&!s.nodes)||s!==i.last||i.raws.semicolon)&&(s.source&&s.source.end?(r.source=this.sourcePath(s),r.original.line=s.source.end.line,r.original.column=s.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,r.generated.line=e,r.generated.column=t-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:this.mapOpts.annotation===void 0?this.previous().length?this.previous().some(e=>e.annotation):!0:this.mapOpts.annotation}isInline(){if(this.mapOpts.inline!==void 0)return this.mapOpts.inline;let e=this.mapOpts.annotation;return e!==void 0&&e!==!0?!1:this.previous().length?this.previous().some(e=>e.inline):!0}isMap(){return this.opts.map===void 0?this.previous().length>0:!!this.opts.map}isSourcesContent(){return this.mapOpts.sourcesContent===void 0?this.previous().length?this.previous().some(e=>e.withContent()):!0:this.mapOpts.sourcesContent}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||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?Fi(this.opts.to):`.`;typeof this.mapOpts.annotation==`string`&&(n=Fi(Li(n,this.mapOpts.annotation)));let r=Ii(n,e);return this.memoizedPaths.set(e,r),r}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 Bi(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 n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,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(zi){let t=zi(e).toString();return this.memoizedFileURLs.set(e,t),t}else throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Ri===`\\`&&(e=e.replace(/\\/g,`/`));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}};let Wi=ii,Gi=class extends Wi{constructor(e){super(e),this.type=`comment`}};var Ki=Gi;Gi.default=Gi;let{isClean:qi,my:Ji}=Ur,Yi=si,Xi=Ki,Zi=ii,Qi,$i,ea,ta;function na(e){return e.map(e=>(e.nodes&&=na(e.nodes),delete e.source,e))}function ra(e){if(e[qi]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)ra(t)}let N=class e extends Zi{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=this.getIterator(),n,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],r=e(this.proxyOf.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||=0,this.indexes||={},this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:e[t]?t===`each`||typeof t==`string`&&t.startsWith(`walk`)?(...n)=>e[t](...n.map(e=>typeof e==`function`?(t,n)=>e(t.toProxy(),n):e)):t===`every`||t===`some`?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):t===`root`?()=>e.root().toProxy():t===`nodes`?e.nodes.map(e=>e.toProxy()):t===`first`||t===`last`?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n?!0:(e[t]=n,(t===`name`||t===`params`||t===`selector`)&&e.markDirty(),!0)}}}index(e){return typeof e==`number`?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of r)this.proxyOf.nodes.splice(n+1,0,e);let i;for(let e in this.indexes)i=this.indexes[e],n<i&&(this.indexes[e]=i+r.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),r=n===0?`prepend`:!1,i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);for(let e of i)this.proxyOf.nodes.splice(n,0,e);let a;for(let e in this.indexes)a=this.indexes[e],n<=a&&(this.indexes[e]=a+i.length);return this.markDirty(),this}normalize(t,n){if(typeof t==`string`)t=na(Qi(t).nodes);else if(t===void 0)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,`ignore`)}else if(t.type===`root`&&this.type!==`document`){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(t.value===void 0)throw Error(`Value field is missed in node creation`);typeof t.value!=`string`&&(t.value=String(t.value)),t=[new Yi(t)]}else if(t.selector)t=[new $i(t)];else if(t.name)t=[new ea(t)];else if(t.text)t=[new Xi(t)];else throw Error(`Unknown node type in node creation`);return t.map(t=>(t[Ji]||e.rebuild(t),t=t.proxyOf,t.parent&&t.parent.removeChild(t),t[qi]&&ra(t),t.raws.before===void 0&&n&&n.raws.before!==void 0&&(t.raws.before=n.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){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`atrule`&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if(n.type===`atrule`&&n.name===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`atrule`)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if(t.type===`comment`)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`decl`&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if(n.type===`decl`&&n.prop===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`decl`)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`rule`&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if(n.type===`rule`&&n.selector===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`rule`)return t(e,n)}))}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]}};N.registerParse=e=>{Qi=e},N.registerRule=e=>{$i=e},N.registerAtRule=e=>{ea=e},N.registerRoot=e=>{ta=e};var P=N;N.default=N,N.rebuild=e=>{e.type===`atrule`?Object.setPrototypeOf(e,ea.prototype):e.type===`rule`?Object.setPrototypeOf(e,$i.prototype):e.type===`decl`?Object.setPrototypeOf(e,Yi.prototype):e.type===`comment`?Object.setPrototypeOf(e,Xi.prototype):e.type===`root`&&Object.setPrototypeOf(e,ta.prototype),e[Ji]=!0,e.nodes&&e.nodes.forEach(e=>{N.rebuild(e)})};let ia=P,aa,oa,sa=class extends ia{constructor(e){super({type:`document`,...e}),this.nodes||=[]}toResult(e={}){return new aa(new oa,this,e).stringify()}};sa.registerLazyResult=e=>{aa=e},sa.registerProcessor=e=>{oa=e};var ca=sa;sa.default=sa;let la=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 ua=la;la.default=la;let da=ua,fa=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,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 n=new da(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type===`warning`)}get content(){return this.css}};var pa=fa;fa.default=fa;const ma=/[\t\n\f\r "#'()/;[\\\]{}]/g,ha=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ga=/.[\r\n"'(/\\]/,_a=/[\da-f]/i;var va=function(e,t={}){let n=e.css.valueOf(),r=t.ignoreErrors,i,a,o,s,c,l,u,d,f,p,m=n.length,h=0,g=[],_=[];function v(){return h}function y(t){throw e.error(`Unclosed `+t,h)}function ee(){return _.length===0&&h>=m}function te(e){if(_.length)return _.pop();if(h>=m)return;let t=e?e.ignoreUnclosed:!1;switch(i=n.charCodeAt(h),i){case 10:case 32:case 9:case 13:case 12:a=h;do a+=1,i=n.charCodeAt(a);while(i===32||i===10||i===9||i===13||i===12);p=[`space`,n.slice(h,a)],h=a-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(i);p=[e,e,h];break}case 40:if(d=g.length?g.pop()[1]:``,f=n.charCodeAt(h+1),d===`url`&&f!==39&&f!==34&&f!==32&&f!==10&&f!==9&&f!==12&&f!==13){a=h;do{if(l=!1,a=n.indexOf(`)`,a+1),a===-1)if(r||t){a=h;break}else y(`bracket`);for(u=a;n.charCodeAt(u-1)===92;)--u,l=!l}while(l);p=[`brackets`,n.slice(h,a+1),h,a],h=a}else a=n.indexOf(`)`,h+1),s=n.slice(h,a+1),a===-1||ga.test(s)?p=[`(`,`(`,h]:(p=[`brackets`,s,h,a],h=a);break;case 39:case 34:o=i===39?`'`:`"`,a=h;do{if(l=!1,a=n.indexOf(o,a+1),a===-1)if(r||t){a=h+1;break}else y(`string`);for(u=a;n.charCodeAt(u-1)===92;)--u,l=!l}while(l);p=[`string`,n.slice(h,a+1),h,a],h=a;break;case 64:ma.lastIndex=h+1,ma.test(n),a=ma.lastIndex===0?n.length-1:ma.lastIndex-2,p=[`at-word`,n.slice(h,a+1),h,a],h=a;break;case 92:for(a=h,c=!0;n.charCodeAt(a+1)===92;)a+=1,c=!c;if(i=n.charCodeAt(a+1),c&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(a+=1,_a.test(n.charAt(a)))){for(;_a.test(n.charAt(a+1));)a+=1;n.charCodeAt(a+1)===32&&(a+=1)}p=[`word`,n.slice(h,a+1),h,a],h=a;break;default:i===47&&n.charCodeAt(h+1)===42?(a=n.indexOf(`*/`,h+2)+1,a===0&&(r||t?a=n.length:y(`comment`)),p=[`comment`,n.slice(h,a+1),h,a],h=a):(ha.lastIndex=h+1,ha.test(n),a=ha.lastIndex===0?n.length-1:ha.lastIndex-2,p=[`word`,n.slice(h,a+1),h,a],g.push(p),h=a);break}return h++,p}function ne(e){_.push(e)}return{back:ne,endOfFile:ee,nextToken:te,position:v}};let ya=P,ba=class extends ya{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 xa=ba;ba.default=ba,ya.registerAtRule(ba);let Sa=P,Ca,wa,F=class extends Sa{constructor(e){super(e),this.type=`root`,this.nodes||=[]}normalize(e,t,n){let r=super.normalize(e);if(t){if(n===`prepend`)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 r)e.raws.before=t.raws.before}return r}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new Ca(new wa,this,e).stringify()}};F.registerLazyResult=e=>{Ca=e},F.registerProcessor=e=>{wa=e};var Ta=F;F.default=F,Sa.registerRoot(F);let Ea={comma(e){return Ea.split(e,[`,`],!0)},space(e){return Ea.split(e,[` `,`
|
|
50
|
+
`,` `])},split(e,t,n){let r=[],i=``,a=!1,o=0,s=!1,c=``,l=!1;for(let n of e)l?l=!1:n===`\\`?l=!0:s?n===c&&(s=!1):n===`"`||n===`'`?(s=!0,c=n):n===`(`?o+=1:n===`)`?o>0&&--o:o===0&&t.includes(n)&&(a=!0),a?(i!==``&&r.push(i.trim()),i=``,a=!1):i+=n;return(n||i!==``)&&r.push(i.trim()),r}};var Da=Ea;Ea.default=Ea;let Oa=P,ka=Da,Aa=class extends Oa{constructor(e){super(e),this.type=`rule`,this.nodes||=[]}get selectors(){return ka.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:`,`+this.raw(`between`,`beforeOpen`);this.selector=e.join(n)}};var ja=Aa;Aa.default=Aa,Oa.registerRule(Aa);let Ma=si,Na=va,Pa=Ki,Fa=xa,Ia=Ta,La=ja;const Ra={empty:!0,space:!0};function za(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}var Ba=class{constructor(e){this.input=e,this.root=new Ia,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=new Fa;t.name=e[1].slice(1),t.name===``&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,r,i,a=!1,o=!1,s=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n===`(`||n===`[`?c.push(n===`(`?`)`:`]`):n===`{`&&c.length>0?c.push(`}`):n===c[c.length-1]&&c.pop(),c.length===0)if(n===`;`){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(n===`{`){o=!0;break}else if(n===`}`){if(s.length>0){for(i=s.length-1,r=s[i];r&&r[0]===`space`;)r=s[--i];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}else s.push(e);else s.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(t.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(t,`params`,s),a&&(e=s[s.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=``)):(t.raws.afterName=``,t.params=``),o&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,r;for(let i=t-1;i>=0&&(r=e[i],!(r[0]!==`space`&&(n+=1,n===2)));i--);throw this.input.error(`Missed semicolon`,r[0]===`word`?r[3]+1:r[2])}colon(e){let t=0,n,r,i;for(let[a,o]of e.entries()){if(n=o,r=n[0],r===`(`&&(t+=1),r===`)`&&--t,t===0&&r===`:`)if(!i)this.doubleColon(n);else if(i[0]===`word`&&i[1]===`progid`)continue;else return a;i=n}return!1}comment(e){let t=new Pa;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text=``,t.raws.left=n,t.raws.right=``;else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=Na(this.input)}decl(e,t){let n=new Ma;this.init(n,e[0][2]);let r=e[e.length-1];for(r[0]===`;`&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(r[3]||r[2]||za(e)),n.source.end.offset++;e[0][0]!==`word`;)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop=``;e.length;){let t=e[0][0];if(t===`:`||t===`space`||t===`comment`)break;n.prop+=e.shift()[1]}n.raws.between=``;let i;for(;e.length;)if(i=e.shift(),i[0]===`:`){n.raws.between+=i[1];break}else i[0]===`word`&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1];(n.prop[0]===`_`||n.prop[0]===`*`)&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let a=[],o;for(;e.length&&(o=e[0][0],!(o!==`space`&&o!==`comment`));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(i=e[t],i[1].toLowerCase()===`!important`){n.important=!0;let r=this.stringFrom(e,t);r=this.spacesFromEnd(e)+r,r!==` !important`&&(n.raws.important=r);break}else if(i[1].toLowerCase()===`important`){let r=e.slice(0),i=``;for(let e=t;e>0;e--){let t=r[e][0];if(i.trim().indexOf(`!`)===0&&t!==`space`)break;i=r.pop()[1]+i}i.trim().indexOf(`!`)===0&&(n.important=!0,n.raws.important=i,e=r)}if(i[0]!==`space`&&i[0]!==`comment`)break}e.some(e=>e[0]!==`space`&&e[0]!==`comment`)&&(n.raws.between+=a.map(e=>e[1]).join(``),a=[]),this.raw(n,`value`,a.concat(e),t),n.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 La;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&&e.type===`rule`&&!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=``,e.type!==`comment`&&(this.semicolon=!1)}other(e){let t=!1,n=null,r=!1,i=null,a=[],o=e[1].startsWith(`--`),s=[],c=e;for(;c;){if(n=c[0],s.push(c),n===`(`||n===`[`)i||=c,a.push(n===`(`?`)`:`]`);else if(o&&r&&n===`{`)i||=c,a.push(`}`);else if(a.length===0)if(n===`;`)if(r){this.decl(s,o);return}else break;else if(n===`{`){this.rule(s);return}else if(n===`}`){this.tokenizer.back(s.pop()),t=!0;break}else n===`:`&&(r=!0);else n===a[a.length-1]&&(a.pop(),a.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(i),t&&r){if(!o)for(;s.length&&(c=s[s.length-1][0],!(c!==`space`&&c!==`comment`));)this.tokenizer.back(s.pop());this.decl(s,o)}else this.unknownWord(s)}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);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let i,a,o=n.length,s=``,c=!0,l,u;for(let e=0;e<o;e+=1)i=n[e],a=i[0],a===`space`&&e===o-1&&!r?c=!1:a===`comment`?(u=n[e-1]?n[e-1][0]:`empty`,l=n[e+1]?n[e+1][0]:`empty`,!Ra[u]&&!Ra[l]?s.slice(-1)===`,`?c=!1:s+=i[1]:c=!1):s+=i[1];if(!c){let r=n.reduce((e,t)=>e+t[1],``);e.raws[t]={raw:r,value:s}}e[t]=s}rule(e){e.pop();let t=new La;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,`selector`,e),this.current=t}spacesAndCommentsFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],!(t!==`space`&&t!==`comment`));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n=``;for(;e.length&&(t=e[0][0],!(t!==`space`&&t!==`comment`));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],t===`space`);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n=``;for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}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 Va=P,Ha=Ba,Ua=Mi;function Wa(e,t){let n=new Ha(new Ua(e,t));try{n.parse()}catch(e){throw e}return n.root}var Ga=Wa;Wa.default=Wa,Va.registerParse(Wa);let{isClean:I,my:Ka}=Ur,qa=Ui,Ja=Xr,Ya=P,Xa=ca,Za=pa,Qa=Ga,$a=Ta;const eo={atrule:`AtRule`,comment:`Comment`,decl:`Declaration`,document:`Document`,root:`Root`,rule:`Rule`},to={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},no={Once:!0,postcssPlugin:!0,prepare:!0};function ro(e){return typeof e==`object`&&typeof e.then==`function`}function io(e){let t=!1,n=eo[e.type];return e.type===`decl`?t=e.prop.toLowerCase():e.type===`atrule`&&(t=e.name.toLowerCase()),t&&e.append?[n,n+`-`+t,0,n+`Exit`,n+`Exit-`+t]:t?[n,n+`-`+t,n+`Exit`,n+`Exit-`+t]:e.append?[n,0,n+`Exit`]:[n,n+`Exit`]}function ao(e){let t;return t=e.type===`document`?[`Document`,0,`DocumentExit`]:e.type===`root`?[`Root`,0,`RootExit`]:io(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function oo(e){return e[I]=!1,e.nodes&&e.nodes.forEach(e=>oo(e)),e}let so={},L=class e{constructor(t,n,r){this.stringified=!1,this.processed=!1;let i;if(typeof n==`object`&&n&&(n.type===`root`||n.type===`document`))i=oo(n);else if(n instanceof e||n instanceof Za)i=oo(n.root),n.map&&(r.map===void 0&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let e=Qa;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{i=e(n,r)}catch(e){this.processed=!0,this.error=e}i&&!i[Ka]&&Ya.rebuild(i)}this.result=new Za(t,i,r),this.helpers={...so,postcss:so,result:this.result},this.plugins=this.processor.plugins.map(e=>typeof e==`object`&&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.runAsync(),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error(`Use process(css).then(cb) to work with async plugins`)}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name===`CssSyntaxError`&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if(typeof t==`object`)for(let n in t){if(!to[n]&&/^[A-Z]/.test(n))throw Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!no[n])if(typeof t[n]==`object`)for(let r in t[n])r===`*`?e(t,n,t[n][r]):e(t,n+`-`+r.toLowerCase(),t[n][r]);else typeof t[n]==`function`&&e(t,n,t[n])}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],n=this.runOnRoot(t);if(ro(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[I];){e[I]=!0;let t=[ao(e)];for(;t.length>0;){let e=this.visitTick(t);if(ro(e))try{await e}catch(e){let n=t[t.length-1].node;throw this.handleError(e,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type===`document`){let t=e.nodes.map(e=>n(e,this.helpers));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e==`object`&&e.Once){if(this.result.root.type===`document`){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return ro(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e==`function`)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=Ja;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new qa(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[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(ro(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[I];)e[I]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type===`document`)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 this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,r]of e){this.result.lastPlugin=n;let e;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if(t.type!==`root`&&t.type!==`document`&&!t.parent)return!0;if(ro(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:r}=t;if(n.type!==`root`&&n.type!==`document`&&!n.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){let[e,i]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return i(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(t.iterator!==0){let r=t.iterator,i;for(;i=n.nodes[n.indexes[r]];)if(n.indexes[r]+=1,!i[I]){i[I]=!0,e.push(ao(i));return}t.iterator=0,delete n.indexes[r]}let i=t.events;for(;t.eventIndex<i.length;){let e=i[t.eventIndex];if(t.eventIndex+=1,e===0){n.nodes&&n.nodes.length&&(n[I]=!0,t.iterator=n.getIterator());return}else if(this.listeners[e]){t.visitors=this.listeners[e];return}}e.pop()}walkSync(e){e[I]=!0;let t=io(e);for(let n of t)if(n===0)e.nodes&&e.each(e=>{e[I]||this.walkSync(e)});else{let t=this.listeners[n];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`}};L.registerPostcss=e=>{so=e};var co=L;L.default=L,$a.registerLazyResult(L),Xa.registerLazyResult(L);let lo=Ui,uo=Xr,fo=Ga;const po=pa;let mo=class{constructor(e,t,n){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let r=uo;this.result=new po(this._processor,void 0,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,`root`,{get(){return i.root}});let a=new lo(r,void 0,this._opts,t);if(a.isMap()){let[e,t]=a.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else a.clearAnnotation(),this.result.css=a.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 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=fo;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 ho=mo;mo.default=mo;let go=ho,_o=co,vo=ca,yo=Ta,bo=class{constructor(e=[]){this.version=`8.4.38`,this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n==`object`&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n==`object`&&n.postcssPlugin)t.push(n);else if(typeof n==`function`)t.push(n);else if(!(typeof n==`object`&&(n.parse||n.stringify)))throw Error(n+` is not a PostCSS plugin`);return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new go(this,e,t):new _o(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var xo=bo;bo.default=bo,yo.registerProcessor(bo),vo.registerProcessor(bo);let So=si,Co=_i,wo=Ki,To=xa,Eo=Mi,Do=Ta,Oo=ja;function ko(e,t){if(Array.isArray(e))return e.map(e=>ko(e));let{inputs:n,...r}=e;if(n){t=[];for(let e of n){let n={...e,__proto__:Eo.prototype};n.map&&={...n.map,__proto__:Co.prototype},t.push(n)}}if(r.nodes&&=e.nodes.map(e=>ko(e,t)),r.source){let{inputId:e,...n}=r.source;r.source=n,e!=null&&(r.source.input=t[e])}if(r.type===`root`)return new Do(r);if(r.type===`decl`)return new So(r);if(r.type===`rule`)return new Oo(r);if(r.type===`comment`)return new wo(r);if(r.type===`atrule`)return new To(r);throw Error(`Unknown node type: `+e.type)}var Ao=ko;ko.default=ko;let jo=Hr,Mo=si,No=co,Po=P,Fo=xo,Io=Xr,Lo=Ao,Ro=ca,zo=ua,Bo=Ki,Vo=xa,Ho=pa,Uo=Mi,Wo=Ga,Go=Da,Ko=ja,qo=Ta,Jo=ii;function R(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new Fo(e)}R.plugin=function(e,t){let n=!1;function r(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
51
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith(`cn`)&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
52
|
+
https://www.w3ctech.com/topic/2226`));let i=t(...r);return i.postcssPlugin=e,i.postcssVersion=new Fo().version,i}let i;return Object.defineProperty(r,`postcss`,{get(){return i||=r(),i}}),r.process=function(e,t,n){return R([r(n)]).process(e,t)},r},R.stringify=Io,R.parse=Wo,R.fromJSON=Lo,R.list=Go,R.comment=e=>new Bo(e),R.atRule=e=>new Vo(e),R.decl=e=>new Mo(e),R.rule=e=>new Ko(e),R.root=e=>new qo(e),R.document=e=>new Ro(e),R.CssSyntaxError=jo,R.Declaration=Mo,R.Container=Po,R.Processor=Fo,R.Document=Ro,R.Comment=Bo,R.Warning=zo,R.AtRule=Vo,R.Result=Ho,R.Input=Uo,R.Rule=Ko,R.Root=qo,R.Node=Jo,No.registerPostcss(R);var Yo=R;R.default=R;const z=Pr(Yo);z.stringify,z.fromJSON,z.plugin,z.parse,z.list,z.document,z.comment,z.atRule,z.rule,z.decl,z.root,z.CssSyntaxError,z.Declaration,z.Container,z.Processor,z.Document,z.Comment,z.Warning,z.AtRule,z.Result,z.Input,z.Rule,z.Root,z.Node;var B=(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))(B||{});function Xo(e){let t={},n=/;(?![^(]*\))/g,r=/:(.+)/;return e.replace(/\/\*.*?\*\//g,``).split(n).forEach(function(e){if(e){let n=e.split(r);n.length>1&&(t[es(n[0].trim())]=n[1].trim())}}),t}function Zo(e){let t=[];for(let n in e){let r=e[n];if(typeof r!=`string`)continue;let i=ns(n);t.push(`${i}: ${r};`)}return t.join(` `)}const Qo=/-([a-z])/g,$o=/^--[a-zA-Z0-9-]+$/,es=e=>$o.test(e)?e:e.replace(Qo,(e,t)=>t?t.toUpperCase():``),ts=/\B([A-Z])/g,ns=e=>e.replace(ts,`-$1`).toLowerCase();var V=class e{constructor(...e){A(this,`parentElement`,null),A(this,`parentNode`,null),A(this,`ownerDocument`),A(this,`firstChild`,null),A(this,`lastChild`,null),A(this,`previousSibling`,null),A(this,`nextSibling`,null),A(this,`ELEMENT_NODE`,1),A(this,`TEXT_NODE`,3),A(this,`nodeType`),A(this,`nodeName`),A(this,`RRNodeType`)}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(t){if(t instanceof e){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(e){throw Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.`)}insertBefore(e,t){throw Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.`)}removeChild(e){throw Error(`RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.`)}toString(){return`RRNode`}},rs=class e extends V{constructor(...e){super(e),A(this,`nodeType`,9),A(this,`nodeName`,`#document`),A(this,`compatMode`,`CSS1Compat`),A(this,`RRNodeType`,B.Document),A(this,`textContent`,null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===B.Element&&e.tagName===`HTML`)||null}get body(){return this.documentElement?.childNodes.find(e=>e.RRNodeType===B.Element&&e.tagName===`BODY`)||null}get head(){return this.documentElement?.childNodes.find(e=>e.RRNodeType===B.Element&&e.tagName===`HEAD`)||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){let t=e.RRNodeType;if((t===B.Element||t===B.DocumentType)&&this.childNodes.some(e=>e.RRNodeType===t))throw Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===B.Element?`RRElement`:`RRDoctype`} on RRDocument allowed.`);let n=fs(this,e);return n.parentElement=null,n}insertBefore(e,t){let n=e.RRNodeType;if((n===B.Element||n===B.DocumentType)&&this.childNodes.some(e=>e.RRNodeType===n))throw Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${n===B.Element?`RRElement`:`RRDoctype`} on RRDocument allowed.`);let r=ps(this,e,t);return r.parentElement=null,r}removeChild(e){return ms(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e===`<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">`?t=`-//W3C//DTD XHTML 1.0 Transitional//EN`:e===`<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">`&&(t=`-//W3C//DTD HTML 4.0 Transitional//EN`),t){let e=this.createDocumentType(`html`,t,``);this.open(),this.appendChild(e)}}createDocument(t,n,r){return new e}createDocumentType(e,t,n){let r=new is(e,t,n);return r.ownerDocument=this,r}createElement(e){let t=new as(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){let t=new cs(e);return t.ownerDocument=this,t}createComment(e){let t=new ls(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new us(e);return t.ownerDocument=this,t}toString(){return`RRDocument`}},is=class extends V{constructor(e,t,n){super(),A(this,`nodeType`,10),A(this,`RRNodeType`,B.DocumentType),A(this,`name`),A(this,`publicId`),A(this,`systemId`),A(this,`textContent`,null),this.name=e,this.publicId=t,this.systemId=n,this.nodeName=e}toString(){return`RRDocumentType`}},as=class extends V{constructor(e){super(),A(this,`nodeType`,1),A(this,`RRNodeType`,B.Element),A(this,`tagName`),A(this,`attributes`,{}),A(this,`shadowRoot`,null),A(this,`scrollLeft`),A(this,`scrollTop`),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e=``;return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new ds(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||``}get className(){return this.attributes.class||``}get style(){let e=this.attributes.style?Xo(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(n,r,i)=>{if(t.test(n))return;let a=es(n);r?e[a]=r:delete e[a],i===`important`&&(e[a]+=` !important`),this.attributes.style=Zo(e)},e.removeProperty=n=>{if(t.test(n))return``;let r=es(n),i=e[r]||``;return delete e[r],this.attributes.style=Zo(e),i},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,n){this.setAttribute(t,n)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return fs(this,e)}insertBefore(e,t){return ps(this,e,t)}removeChild(e){return ms(this,e)}attachShadow(e){let t=this.ownerDocument.createElement(`SHADOWROOT`);return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e=``;for(let t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}},os=class extends as{constructor(){super(...arguments),A(this,`currentTime`),A(this,`volume`),A(this,`paused`),A(this,`muted`),A(this,`playbackRate`),A(this,`loop`)}attachShadow(e){throw Error(`RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow`)}play(){this.paused=!1}pause(){this.paused=!0}},ss=class extends as{constructor(){super(...arguments),A(this,`tagName`,`DIALOG`),A(this,`nodeName`,`DIALOG`)}get isModal(){return this.getAttribute(`rr_open_mode`)===`modal`}get open(){return this.getAttribute(`open`)!==null}close(){this.removeAttribute(`open`),this.removeAttribute(`rr_open_mode`)}show(){this.setAttribute(`open`,``),this.setAttribute(`rr_open_mode`,`non-modal`)}showModal(){this.setAttribute(`open`,``),this.setAttribute(`rr_open_mode`,`modal`)}},cs=class extends V{constructor(e){super(),A(this,`nodeType`,3),A(this,`nodeName`,`#text`),A(this,`RRNodeType`,B.Text),A(this,`data`),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}},ls=class extends V{constructor(e){super(),A(this,`nodeType`,8),A(this,`nodeName`,`#comment`),A(this,`RRNodeType`,B.Comment),A(this,`data`),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}},us=class extends V{constructor(e){super(),A(this,`nodeName`,`#cdata-section`),A(this,`nodeType`,4),A(this,`RRNodeType`,B.CDATA),A(this,`data`),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}},ds=class{constructor(e,t){if(A(this,`onChange`),A(this,`classes`,[]),A(this,`add`,(...e)=>{for(let t of e){let e=String(t);this.classes.indexOf(e)>=0||this.classes.push(e)}this.onChange&&this.onChange(this.classes.join(` `))}),A(this,`remove`,(...e)=>{this.classes=this.classes.filter(t=>e.indexOf(t)===-1),this.onChange&&this.onChange(this.classes.join(` `))}),e){let t=e.trim().split(/\s+/);this.classes.push(...t)}this.onChange=t}};function fs(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function ps(e,t,n){if(!n)return fs(e,t);if(n.parentNode!==e)throw Error(`Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.`);return t===n?t:(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=n.previousSibling,n.previousSibling=t,t.nextSibling=n,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument,t)}function ms(e,t){if(t.parentNode!==e)throw Error(`Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.`);return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var H=(e=>(e[e.PLACEHOLDER=0]=`PLACEHOLDER`,e[e.ELEMENT_NODE=1]=`ELEMENT_NODE`,e[e.ATTRIBUTE_NODE=2]=`ATTRIBUTE_NODE`,e[e.TEXT_NODE=3]=`TEXT_NODE`,e[e.CDATA_SECTION_NODE=4]=`CDATA_SECTION_NODE`,e[e.ENTITY_REFERENCE_NODE=5]=`ENTITY_REFERENCE_NODE`,e[e.ENTITY_NODE=6]=`ENTITY_NODE`,e[e.PROCESSING_INSTRUCTION_NODE=7]=`PROCESSING_INSTRUCTION_NODE`,e[e.COMMENT_NODE=8]=`COMMENT_NODE`,e[e.DOCUMENT_NODE=9]=`DOCUMENT_NODE`,e[e.DOCUMENT_TYPE_NODE=10]=`DOCUMENT_TYPE_NODE`,e[e.DOCUMENT_FRAGMENT_NODE=11]=`DOCUMENT_FRAGMENT_NODE`,e))(H||{});const hs={svg:`http://www.w3.org/2000/svg`,"xlink:href":`http://www.w3.org/1999/xlink`,xmlns:`http://www.w3.org/2000/xmlns/`},gs={altglyph:`altGlyph`,altglyphdef:`altGlyphDef`,altglyphitem:`altGlyphItem`,animatecolor:`animateColor`,animatemotion:`animateMotion`,animatetransform:`animateTransform`,clippath:`clipPath`,feblend:`feBlend`,fecolormatrix:`feColorMatrix`,fecomponenttransfer:`feComponentTransfer`,fecomposite:`feComposite`,feconvolvematrix:`feConvolveMatrix`,fediffuselighting:`feDiffuseLighting`,fedisplacementmap:`feDisplacementMap`,fedistantlight:`feDistantLight`,fedropshadow:`feDropShadow`,feflood:`feFlood`,fefunca:`feFuncA`,fefuncb:`feFuncB`,fefuncg:`feFuncG`,fefuncr:`feFuncR`,fegaussianblur:`feGaussianBlur`,feimage:`feImage`,femerge:`feMerge`,femergenode:`feMergeNode`,femorphology:`feMorphology`,feoffset:`feOffset`,fepointlight:`fePointLight`,fespecularlighting:`feSpecularLighting`,fespotlight:`feSpotLight`,fetile:`feTile`,feturbulence:`feTurbulence`,foreignobject:`foreignObject`,glyphref:`glyphRef`,lineargradient:`linearGradient`,radialgradient:`radialGradient`};let U=null;function _s(e,t,n,r=t.mirror||t.ownerDocument.mirror){e=vs(e,t,n,r),xs(e,t,n,r),ys(e,t,n)}function vs(e,t,n,r){var i;if(n.afterAppend&&!U&&(U=new WeakSet,setTimeout(()=>{U=null},0)),!Cs(e,t)){let a=Ss(t,n.mirror,r);(i=e.parentNode)==null||i.replaceChild(a,e),e=a}switch(t.RRNodeType){case B.Document:if(!W(e,t,n.mirror,r)){let i=r.getMeta(t);i&&(n.mirror.removeNodeFromMap(e),e.close(),e.open(),n.mirror.add(e,i),U?.add(e))}break;case B.Element:{let i=e,a=t;switch(a.tagName){case`IFRAME`:{let i=e.contentDocument;if(!i)break;_s(i,t.contentDocument,n,r);break}}a.shadowRoot&&(i.shadowRoot||i.attachShadow({mode:`open`}),xs(i.shadowRoot,a.shadowRoot,n,r)),bs(i,a,r);break}}return e}function ys(e,t,n){var r;switch(t.RRNodeType){case B.Document:{let e=t.scrollData;e&&n.applyScroll(e,!0);break}case B.Element:{let r=e,i=t;switch(i.scrollData&&n.applyScroll(i.scrollData,!0),i.inputData&&n.applyInput(i.inputData),i.tagName){case`AUDIO`:case`VIDEO`:{let t=e,n=i;n.paused!==void 0&&(n.paused?t.pause():t.play()),n.muted!==void 0&&(t.muted=n.muted),n.volume!==void 0&&(t.volume=n.volume),n.currentTime!==void 0&&(t.currentTime=n.currentTime),n.playbackRate!==void 0&&(t.playbackRate=n.playbackRate),n.loop!==void 0&&(t.loop=n.loop);break}case`CANVAS`:{let i=t;if(i.rr_dataURL!==null){let e=document.createElement(`img`);e.onload=()=>{let t=r.getContext(`2d`);t&&t.drawImage(e,0,0,e.width,e.height)},e.src=i.rr_dataURL}i.canvasMutations.forEach(t=>n.applyCanvas(t.event,t.mutation,e));break}case`STYLE`:{let e=r.sheet;e&&t.rules.forEach(t=>n.applyStyleSheetMutation(t,e));break}case`DIALOG`:{let e=r,t=i,n=e.open,a=e.matches(`dialog:modal`),o=t.open,s=t.isModal,c=a!==s,l=n!==o;if((c||n&&l)&&e.close(),o&&(l||c))try{s?e.showModal():e.show()}catch(e){console.warn(e)}break}}break}case B.Text:case B.Comment:case B.CDATA:e.textContent!==t.data&&(e.textContent=t.data);break}U?.has(e)&&(U.delete(e),(r=n.afterAppend)==null||r.call(n,e,n.mirror.getId(e)))}function bs(e,t,n){let r=e.attributes,i=t.attributes;for(let r in i){let a=i[r];if(n.getMeta(t)?.isSVG&&hs[r])e.setAttributeNS(hs[r],r,a);else if(t.tagName===`CANVAS`&&r===`rr_dataURL`){let t=document.createElement(`img`);t.src=a,t.onload=()=>{let n=e.getContext(`2d`);n&&n.drawImage(t,0,0,t.width,t.height)}}else if(t.tagName===`IFRAME`&&r===`srcdoc`)continue;else try{e.setAttribute(r,a)}catch(e){console.warn(e)}}for(let{name:t}of Array.from(r))t in i||e.removeAttribute(t);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function xs(e,t,n,r){let i=Array.from(e.childNodes),a=t.childNodes;if(i.length===0&&a.length===0)return;let o=0,s=i.length-1,c=0,l=a.length-1,u=i[o],d=i[s],f=a[c],p=a[l],m,h;for(;o<=s&&c<=l;)if(u===void 0)u=i[++o];else if(d===void 0)d=i[--s];else if(W(u,f,n.mirror,r))u=i[++o],f=a[++c];else if(W(d,p,n.mirror,r))d=i[--s],p=a[--l];else if(W(u,p,n.mirror,r)){try{e.insertBefore(u,d.nextSibling)}catch(e){console.warn(e)}u=i[++o],p=a[--l]}else if(W(d,f,n.mirror,r)){try{e.insertBefore(d,u)}catch(e){console.warn(e)}d=i[--s],f=a[++c]}else{if(!m){m={};for(let e=o;e<=s;e++){let t=i[e];t&&n.mirror.hasNode(t)&&(m[n.mirror.getId(t)]=e)}}h=m[r.getId(f)];let t=i[h];if(h!==void 0&&t&&W(t,f,n.mirror,r)){try{e.insertBefore(t,u)}catch(e){console.warn(e)}i[h]=void 0}else{let t=Ss(f,n.mirror,r);e.nodeName===`#document`&&u&&(t.nodeType===t.DOCUMENT_TYPE_NODE&&u.nodeType===u.DOCUMENT_TYPE_NODE||t.nodeType===t.ELEMENT_NODE&&u.nodeType===u.ELEMENT_NODE)&&(e.removeChild(u),n.mirror.removeNodeFromMap(u),u=i[++o]);try{e.insertBefore(t,u||null)}catch(e){console.warn(e)}}f=a[++c]}if(o>s){let t=a[l+1],i=null;for(t&&(i=n.mirror.getNode(r.getId(t)));c<=l;++c){let t=Ss(a[c],n.mirror,r);try{e.insertBefore(t,i)}catch(e){console.warn(e)}}}else if(c>l)for(;o<=s;o++){let t=i[o];if(!(!t||t.parentNode!==e))try{e.removeChild(t),n.mirror.removeNodeFromMap(t)}catch(e){console.warn(e)}}let g=e.firstChild,_=t.firstChild;for(;g!==null&&_!==null;)_s(g,_,n,r),g=g.nextSibling,_=_.nextSibling}function Ss(e,t,n){let r=n.getId(e),i=n.getMeta(e),a=null;if(r>-1&&(a=t.getNode(r)),a!==null&&Cs(a,e))return a;switch(e.RRNodeType){case B.Document:a=new Document;break;case B.DocumentType:a=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case B.Element:{let t=e.tagName.toLowerCase();t=gs[t]||t,a=i&&`isSVG`in i&&i?.isSVG?document.createElementNS(hs.svg,t):document.createElement(e.tagName);break}case B.Text:a=document.createTextNode(e.data);break;case B.Comment:a=document.createComment(e.data);break;case B.CDATA:a=document.createCDATASection(e.data);break}i&&t.add(a,{...i});try{U?.add(a)}catch{}return a}function Cs(e,t){return e.nodeType===t.nodeType?e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName:!1}function W(e,t,n,r){let i=n.getId(e),a=r.getId(t);return i===-1||i!==a?!1:Cs(e,t)}var ws=class e extends rs{constructor(e){super(),A(this,`UNSERIALIZED_STARTING_ID`,-2),A(this,`_unserializedId`,this.UNSERIALIZED_STARTING_ID),A(this,`mirror`,Rs()),A(this,`scrollData`,null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(t,n,r){return new e}createDocumentType(e,t,n){let r=new Ts(e,t,n);return r.ownerDocument=this,r}createElement(e){let t=e.toUpperCase(),n;switch(t){case`AUDIO`:case`VIDEO`:n=new Ds(t);break;case`IFRAME`:n=new js(t,this.mirror);break;case`CANVAS`:n=new ks(t);break;case`STYLE`:n=new As(t);break;case`DIALOG`:n=new Os(t);break;default:n=new Es(t);break}return n.ownerDocument=this,n}createComment(e){let t=new Ns(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new Ps(e);return t.ownerDocument=this,t}createTextNode(e){let t=new Ms(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}};const Ts=is;var Es=class extends as{constructor(){super(...arguments),A(this,`inputData`,null),A(this,`scrollData`,null)}},Ds=class extends os{},Os=class extends ss{},ks=class extends Es{constructor(){super(...arguments),A(this,`rr_dataURL`,null),A(this,`canvasMutations`,[])}getContext(){return null}},As=class extends Es{constructor(){super(...arguments),A(this,`rules`,[])}},js=class extends Es{constructor(e,t){super(e),A(this,`contentDocument`,new ws),this.contentDocument.mirror=t}};const Ms=cs,Ns=ls,Ps=us;function Fs(e){return e instanceof HTMLFormElement?`FORM`:e.tagName.toUpperCase()}function Is(e,t,n,r){let i;switch(e.nodeType){case H.DOCUMENT_NODE:r&&r.nodeName===`IFRAME`?i=r.contentDocument:(i=t,i.compatMode=e.compatMode);break;case H.DOCUMENT_TYPE_NODE:{let n=e;i=t.createDocumentType(n.name,n.publicId,n.systemId);break}case H.ELEMENT_NODE:{let n=e,r=Fs(n);i=t.createElement(r);let a=i;for(let{name:e,value:t}of Array.from(n.attributes))a.attributes[e]=t;n.scrollLeft&&(a.scrollLeft=n.scrollLeft),n.scrollTop&&(a.scrollTop=n.scrollTop);break}case H.TEXT_NODE:i=t.createTextNode(e.textContent||``);break;case H.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case H.COMMENT_NODE:i=t.createComment(e.textContent||``);break;case H.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:`open`});break;default:return null}let a=n.getMeta(e);return t instanceof ws&&(a||(a=Bs(i,t.unserializedId),n.add(e,a)),t.mirror.add(i,{...a})),i}function Ls(e,t=Nr(),n=new ws){function r(e,i){let a=Is(e,n,t,i);if(a!==null)if(i?.nodeName!==`IFRAME`&&e.nodeType!==H.DOCUMENT_FRAGMENT_NODE&&(i?.appendChild(a),a.parentNode=i,a.parentElement=i),e.nodeName===`IFRAME`){let t=e.contentDocument;t&&r(t,a)}else (e.nodeType===H.DOCUMENT_NODE||e.nodeType===H.ELEMENT_NODE||e.nodeType===H.DOCUMENT_FRAGMENT_NODE)&&(e.nodeType===H.ELEMENT_NODE&&e.shadowRoot&&r(e.shadowRoot,a),e.childNodes.forEach(e=>r(e,a)))}return r(e,null),n}function Rs(){return new zs}var zs=class{constructor(){A(this,`idNodeMap`,new Map),A(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-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){let 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){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Bs(e,t){switch(e.RRNodeType){case B.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case B.DocumentType:{let n=e;return{id:t,type:e.RRNodeType,name:n.name,publicId:n.publicId,systemId:n.systemId}}case B.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case B.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||``};case B.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||``};case B.CDATA:return{id:t,type:e.RRNodeType,textContent:``}}}const Vs={Node:[`childNodes`,`parentNode`,`parentElement`,`textContent`,`ownerDocument`],ShadowRoot:[`host`,`styleSheets`],Element:[`shadowRoot`,`querySelector`,`querySelectorAll`],MutationObserver:[]},Hs={Node:[`contains`,`getRootNode`],ShadowRoot:[`getSelection`],Element:[],MutationObserver:[`constructor`]},Us={},Ws=()=>!!globalThis.Zone;function Gs(e){if(Us[e])return Us[e];let t=globalThis[e],n=t.prototype,r=e in Vs?Vs[e]:void 0,i=!!(r&&r.every(e=>!!(Object.getOwnPropertyDescriptor(n,e)?.get)?.toString().includes(`[native code]`))),a=e in Hs?Hs[e]:void 0,o=!!(a&&a.every(e=>typeof n[e]==`function`&&n[e]?.toString().includes(`[native code]`)));if(i&&o&&!Ws())return Us[e]=t.prototype,t.prototype;try{let r=document.createElement(`iframe`);document.body.appendChild(r);let i=r.contentWindow;if(!i)return t.prototype;let a=i[e].prototype;return document.body.removeChild(r),a?Us[e]=a:n}catch{return n}}const Ks={};function G(e,t,n){let r=`${e}.${String(n)}`;if(Ks[r])return Ks[r].call(t);let i=Gs(e),a=Object.getOwnPropertyDescriptor(i,n)?.get;return a?(Ks[r]=a,a.call(t)):t[n]}const qs={};function Js(e,t,n){let r=`${e}.${String(n)}`;if(qs[r])return qs[r].bind(t);let i=Gs(e)[n];return typeof i==`function`?(qs[r]=i,i.bind(t)):t[n]}function Ys(e){return G(`Node`,e,`ownerDocument`)}function Xs(e){return G(`Node`,e,`childNodes`)}function Zs(e){return G(`Node`,e,`parentNode`)}function Qs(e){return G(`Node`,e,`parentElement`)}function $s(e){return G(`Node`,e,`textContent`)}function ec(e,t){return Js(`Node`,e,`contains`)(t)}function tc(e){return Js(`Node`,e,`getRootNode`)()}function nc(e){return!e||!(`host`in e)?null:G(`ShadowRoot`,e,`host`)}function rc(e){return e.styleSheets}function ic(e){return!e||!(`shadowRoot`in e)?null:G(`Element`,e,`shadowRoot`)}function ac(e,t){return G(`Element`,e,`querySelector`)(t)}function oc(e,t){return G(`Element`,e,`querySelectorAll`)(t)}function sc(){return Gs(`MutationObserver`).constructor}function cc(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}const lc={ownerDocument:Ys,childNodes:Xs,parentNode:Zs,parentElement:Qs,textContent:$s,contains:ec,getRootNode:tc,host:nc,styleSheets:rc,shadowRoot:ic,querySelector:ac,querySelectorAll:oc,mutationObserver:sc,patch:cc},K=`Please stop import mirror directly. Instead of that,\r
|
|
53
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
54
|
+
or you can use record.mirror to access the mirror instance during recording.`;let uc={map:{},getId(){return console.error(K),-1},getNode(){return console.error(K),null},removeNodeFromMap(){console.error(K)},has(){return console.error(K),!1},reset(){console.error(K)}};typeof window<`u`&&window.Proxy&&window.Reflect&&(uc=new Proxy(uc,{get(e,t,n){return t===`map`&&console.error(K),Reflect.get(e,t,n)}})),Date.now().toString();function dc(e=window){`NodeList`in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),`DOMTokenList`in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function fc(e){let t={},n=(e,n)=>{let r={value:e,parent:n,children:[]};return t[e.node.id]=r,r},r=[];for(let i of e){let{nextId:e,parentId:a}=i;if(e&&e in t){let a=t[e];if(a.parent){let e=a.parent.children.indexOf(a);a.parent.children.splice(e,0,n(i,a.parent))}else{let e=r.indexOf(a);r.splice(e,0,n(i,null))}continue}if(a in t){let e=t[a];e.children.push(n(i,e));continue}r.push(n(i,null))}return r}function pc(e,t){t(e.value);for(let n=e.children.length-1;n>=0;n--)pc(e.children[n],t)}function mc(e,t){return!!(e.nodeName===`IFRAME`&&t.getMeta(e))}function hc(e,t){let n=e.ownerDocument?.defaultView?.frameElement;if(!n||n===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};let r=n.getBoundingClientRect(),i=hc(n,t),a=r.height/n.clientHeight;return{x:r.x*i.relativeScale+i.x,y:r.y*i.relativeScale+i.y,relativeScale:a,absoluteScale:i.absoluteScale*a}}function gc(e){return e?e instanceof V&&`shadowRoot`in e?!!e.shadowRoot:!!lc.shadowRoot(e):!1}function _c(e,t){let n=e[t[0]];return t.length===1?n:_c(n.cssRules[t[1]].cssRules,t.slice(2))}function vc(e){let t=[...e];return{positions:t,index:t.pop()}}function yc(e){let t=new Set,n=[];for(let r=e.length;r--;){let i=e[r];t.has(i.id)||(n.push(i),t.add(i.id))}return n}for(var bc=class{constructor(){s(this,`id`,1),s(this,`styleIDMap`,new WeakMap),s(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 n;return n=t===void 0?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},q=(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))(q||{}),J=(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))(J||{}),Y=(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))(Y||{}),xc=(e=>(e[e[`2D`]=0]=`2D`,e[e.WebGL=1]=`WebGL`,e[e.WebGL2=2]=`WebGL2`,e))(xc||{}),Sc=(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))(Sc||{}),X=(e=>(e.Start=`start`,e.Pause=`pause`,e.Resume=`resume`,e.Resize=`resize`,e.Finish=`finish`,e.FullsnapshotRebuilded=`fullsnapshot-rebuilded`,e.LoadStylesheetStart=`load-stylesheet-start`,e.LoadStylesheetEnd=`load-stylesheet-end`,e.SkipStart=`skip-start`,e.SkipEnd=`skip-end`,e.MouseInteraction=`mouse-interaction`,e.EventCast=`event-cast`,e.CustomEvent=`custom-event`,e.Flush=`flush`,e.StateChange=`state-change`,e.PlayBack=`play-back`,e.Destroy=`destroy`,e))(X||{}),Z=(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))(Z||{}),Cc=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,wc=typeof Uint8Array>`u`?[]:new Uint8Array(256),Tc=0;Tc<Cc.length;Tc++)wc[Cc.charCodeAt(Tc)]=Tc;var Ec=function(e){var t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);var l=new ArrayBuffer(t),u=new Uint8Array(l);for(r=0;r<n;r+=4)a=wc[e.charCodeAt(r)],o=wc[e.charCodeAt(r+1)],s=wc[e.charCodeAt(r+2)],c=wc[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l};typeof window<`u`&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),e=>e.charCodeAt(0)))(`KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=`)],{type:`text/javascript;charset=utf-8`});try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement(`iframe`);document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug(`Unable to override Array.from`,e)}m();function Dc(e){return{all:e||=new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(e){e(n)}),(r=e.get(`*`))&&r.slice().map(function(e){e(t,n)})}}}const Oc=Object.freeze(Object.defineProperty({__proto__:null,default:Dc},Symbol.toStringTag,{value:`Module`}));function kc(e=window,t=document){if(`scrollBehavior`in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;let n=e.HTMLElement||e.Element,r={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||s,scrollIntoView:n.prototype.scrollIntoView},i=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function a(e){return new RegExp([`MSIE `,`Trident/`,`Edge/`].join(`|`)).test(e)}let o=a(e.navigator.userAgent)?1:0;function s(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){return .5*(1-Math.cos(Math.PI*e))}function l(e){if(typeof e!=`object`||!e||e.behavior===void 0||e.behavior===`auto`||e.behavior===`instant`)return!0;if(typeof e==`object`&&e.behavior===`smooth`)return!1;throw TypeError(`behavior member of ScrollOptions `+e.behavior+` is not a valid value for enumeration ScrollBehavior.`)}function u(e,t){if(t===`Y`)return e.clientHeight+o<e.scrollHeight;if(t===`X`)return e.clientWidth+o<e.scrollWidth}function d(t,n){let r=e.getComputedStyle(t,null)[`overflow`+n];return r===`auto`||r===`scroll`}function f(e){let t=u(e,`Y`)&&d(e,`Y`),n=u(e,`X`)&&d(e,`X`);return t||n}function p(e){for(;e!==t.body&&f(e)===!1;)e=e.parentNode||e.host;return e}function m(t){let n=i(),r,a,o,s=(n-t.startTime)/468;s=s>1?1:s,r=c(s),a=t.startX+(t.x-t.startX)*r,o=t.startY+(t.y-t.startY)*r,t.method.call(t.scrollable,a,o),(a!==t.x||o!==t.y)&&e.requestAnimationFrame(m.bind(e,t))}function h(n,a,o){let c,l,u,d,f=i();n===t.body?(c=e,l=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=r.scroll):(c=n,l=n.scrollLeft,u=n.scrollTop,d=s),m({scrollable:c,method:d,startTime:f,startX:l,startY:u,x:a,y:o})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(l(arguments[0])===!0){r.scroll.call(e,arguments[0].left===void 0?typeof arguments[0]==`object`?e.scrollX||e.pageXOffset:arguments[0]:arguments[0].left,arguments[0].top===void 0?arguments[1]===void 0?e.scrollY||e.pageYOffset:arguments[1]:arguments[0].top);return}h.call(e,t.body,arguments[0].left===void 0?e.scrollX||e.pageXOffset:~~arguments[0].left,arguments[0].top===void 0?e.scrollY||e.pageYOffset:~~arguments[0].top)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(l(arguments[0])){r.scrollBy.call(e,arguments[0].left===void 0?typeof arguments[0]==`object`?0:arguments[0]:arguments[0].left,arguments[0].top===void 0?arguments[1]===void 0?0:arguments[1]:arguments[0].top);return}h.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},n.prototype.scroll=n.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(l(arguments[0])===!0){if(typeof arguments[0]==`number`&&arguments[1]===void 0)throw SyntaxError(`Value could not be converted`);r.elementScroll.call(this,arguments[0].left===void 0?typeof arguments[0]==`object`?this.scrollLeft:~~arguments[0]:~~arguments[0].left,arguments[0].top===void 0?arguments[1]===void 0?this.scrollTop:~~arguments[1]:~~arguments[0].top);return}let e=arguments[0].left,t=arguments[0].top;h.call(this,this,e===void 0?this.scrollLeft:~~e,t===void 0?this.scrollTop:~~t)},n.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(l(arguments[0])===!0){r.elementScroll.call(this,arguments[0].left===void 0?~~arguments[0]+this.scrollLeft:~~arguments[0].left+this.scrollLeft,arguments[0].top===void 0?~~arguments[1]+this.scrollTop:~~arguments[0].top+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},n.prototype.scrollIntoView=function(){if(l(arguments[0])===!0){r.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}let n=p(this),i=n.getBoundingClientRect(),a=this.getBoundingClientRect();n===t.body?e.scrollBy({left:a.left,top:a.top,behavior:`smooth`}):(h.call(this,n,n.scrollLeft+a.left-i.left,n.scrollTop+a.top-i.top),e.getComputedStyle(n).position!==`fixed`&&e.scrollBy({left:i.left,top:i.top,behavior:`smooth`}))}}var Ac=class{constructor(e=[],t){s(this,`timeOffset`,0),s(this,`speed`),s(this,`actions`),s(this,`raf`,null),s(this,`lastTimestamp`),this.actions=e,this.speed=t.speed}addAction(e){let t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{let t=this.findActionIndex(e);this.actions.splice(t,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){let e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){let e=this.actions[0];if(this.timeOffset>=e.delay)this.actions.shift(),e.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&=(this.raf!==!0&&cancelAnimationFrame(this.raf),null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,n=this.actions.length-1;for(;t<=n;){let r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else if(this.actions[r].delay>e.delay)n=r-1;else return r+1}return t}};function jc(e,t){if(e.type===q.IncrementalSnapshot&&e.data.source===J.MouseMove&&e.data.positions&&e.data.positions.length){let n=e.data.positions[0].timeOffset,r=e.timestamp+n;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.delay}
|
|
55
|
+
/*! *****************************************************************************
|
|
56
|
+
Copyright (c) Microsoft Corporation.
|
|
57
|
+
|
|
58
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
59
|
+
purpose with or without fee is hereby granted.
|
|
60
|
+
|
|
61
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
62
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
63
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
64
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
65
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
66
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
67
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
68
|
+
***************************************************************************** */
|
|
69
|
+
function Mc(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}var Nc;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(Nc||={});var Pc={type:`xstate.init`};function Fc(e){return e===void 0?[]:[].concat(e)}function Q(e){return{type:`xstate.assign`,assignment:e}}function Ic(e,t){return typeof(e=typeof e==`string`&&t&&t[e]?t[e]:e)==`string`?{type:e}:typeof e==`function`?{type:e.name,exec:e}:e}function Lc(e){return function(t){return e===t}}function Rc(e){return typeof e==`string`?{type:e}:e}function zc(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Lc(e)}}function Bc(e,t,n){var r=t,i=!1;return[e.filter(function(e){if(e.type===`xstate.assign`){i=!0;var t=Object.assign({},r);return typeof e.assignment==`function`?t=e.assignment(r,n):Object.keys(e.assignment).forEach(function(i){t[i]=typeof e.assignment[i]==`function`?e.assignment[i](r,n):e.assignment[i]}),r=t,!1}return!0}),r,i]}function Vc(e,t){t===void 0&&(t={});var n=Mc(Bc(Fc(e.states[e.initial].entry).map(function(e){return Ic(e,t.actions)}),e.context,Pc),2),r=n[0],i=n[1],a={config:e,_options:t,initialState:{value:e.initial,actions:r,context:i,matches:Lc(e.initial)},transition:function(t,n){var r,i,o=typeof t==`string`?{value:t,context:e.context}:t,s=o.value,c=o.context,l=Rc(n),u=e.states[s];if(u.on){var d=Fc(u.on[l.type]);try{for(var f=function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}(d),p=f.next();!p.done;p=f.next()){var m=p.value;if(m===void 0)return zc(s,c);var h=typeof m==`string`?{target:m}:m,g=h.target,_=h.actions,v=_===void 0?[]:_,y=h.cond,ee=y===void 0?function(){return!0}:y,te=g===void 0,ne=g??s,re=e.states[ne];if(ee(c,l)){var b=Mc(Bc((te?Fc(v):[].concat(u.exit,v,re.entry).filter(function(e){return e})).map(function(e){return Ic(e,a._options.actions)}),c,l),3),ie=b[0],ae=b[1],x=b[2],oe=g??s;return{value:oe,context:ae,actions:ie,changed:g!==s||ie.length>0||x,matches:Lc(oe)}}}}catch(e){r={error:e}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}return zc(s,c)}};return a}var Hc=function(e,t){return e.actions.forEach(function(n){var r=n.exec;return r&&r(e.context,t)})};function Uc(e){var t=e.initialState,n=Nc.NotStarted,r=new Set,i={_machine:e,send:function(i){n===Nc.Running&&(t=e.transition(t,i),Hc(t,Rc(i)),r.forEach(function(e){return e(t)}))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(r){if(r){var a=typeof r==`object`?r:{context:e.config.context,value:r};t={value:a.value,actions:[],context:a.context,matches:Lc(a.value)}}return n=Nc.Running,Hc(t,Pc),i},stop:function(){return n=Nc.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}function Wc(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.type===q.Meta&&r.timestamp<=t)return e.slice(n)}return e}function Gc(e,{getCastFn:t,applyEventsSynchronously:n,emitter:r}){return Uc(Vc({id:`player`,context:e,initial:`paused`,states:{playing:{on:{PAUSE:{target:`paused`,actions:[`pause`]},CAST_EVENT:{target:`playing`,actions:`castEvent`},END:{target:`paused`,actions:[`resetLastPlayedEvent`,`pause`]},ADD_EVENT:{target:`playing`,actions:[`addEvent`]}}},paused:{on:{PLAY:{target:`playing`,actions:[`recordTimeOffset`,`play`]},CAST_EVENT:{target:`paused`,actions:`castEvent`},TO_LIVE:{target:`live`,actions:[`startLive`]},ADD_EVENT:{target:`paused`,actions:[`addEvent`]}}},live:{on:{ADD_EVENT:{target:`live`,actions:[`addEvent`]},CAST_EVENT:{target:`live`,actions:[`castEvent`]}}}}},{actions:{castEvent:Q({lastPlayedEvent:(e,t)=>t.type===`CAST_EVENT`?t.payload.event:e.lastPlayedEvent}),recordTimeOffset:Q((e,t)=>{let n=e.timeOffset;return`payload`in t&&`timeOffset`in t.payload&&(n=t.payload.timeOffset),{...e,timeOffset:n,baselineTime:e.events[0].timestamp+n}}),play(e){let{timer:i,events:a,baselineTime:o,lastPlayedEvent:s}=e;i.clear();for(let e of a)jc(e,o);let c=Wc(a,o),l=s?.timestamp;s?.type===q.IncrementalSnapshot&&s.data.source===J.MouseMove&&(l=s.timestamp+s.data.positions[0]?.timeOffset),o<(l||0)&&r.emit(X.PlayBack);let u=[];for(let e of c)if(!(l&&l<o&&(e.timestamp<=l||e===s)))if(e.timestamp<o)u.push(e);else{let n=t(e,!1);i.addAction({doAction:()=>{n()},delay:e.delay})}n(u),r.emit(X.Flush),i.start()},pause(e){e.timer.clear()},resetLastPlayedEvent:Q(e=>({...e,lastPlayedEvent:null})),startLive:Q({baselineTime:(e,t)=>(e.timer.start(),t.type===`TO_LIVE`&&t.payload.baselineTime?t.payload.baselineTime:Date.now())}),addEvent:Q((e,n)=>{let{baselineTime:r,timer:i,events:a}=e;if(n.type===`ADD_EVENT`){let{event:e}=n.payload;jc(e,r);let o=a.length-1;if(!a[o]||a[o].timestamp<=e.timestamp)a.push(e);else{let t=-1,n=0;for(;n<=o;){let t=Math.floor((n+o)/2);a[t].timestamp<=e.timestamp?n=t+1:o=t-1}t===-1&&(t=n),a.splice(t,0,e)}let s=e.timestamp<r,c=t(e,s);s?c():i.isActive()&&i.addAction({doAction:()=>{c()},delay:e.delay})}return{...e,events:a}})}}))}function Kc(e){return Uc(Vc({id:`speed`,context:e,initial:`normal`,states:{normal:{on:{FAST_FORWARD:{target:`skipping`,actions:[`recordSpeed`,`setSpeed`]},SET_SPEED:{target:`normal`,actions:[`setSpeed`]}}},skipping:{on:{BACK_TO_NORMAL:{target:`normal`,actions:[`restoreSpeed`]},SET_SPEED:{target:`normal`,actions:[`setSpeed`]}}}}},{actions:{setSpeed:(e,t)=>{`payload`in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:Q({normalSpeed:e=>e.timer.speed}),restoreSpeed:e=>{e.timer.setSpeed(e.normalSpeed)}}}))}const qc=e=>[`.${e} { background: currentColor }`,`noscript { display: none !important; }`],Jc=new Map;function Yc(e,t){let n=Jc.get(e);return n||(n=new Map,Jc.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}function $(e,t,n){return async r=>{if(r&&typeof r==`object`&&`rr_type`in r){if(n&&(n.isUnchanged=!1),r.rr_type===`ImageBitmap`&&`args`in r){let i=await $(e,t,n)(r.args);return await createImageBitmap.apply(null,i)}else if(`index`in r){if(n||t===null)return r;let{rr_type:e,index:i}=r;return Yc(t,e)[i]}else if(`args`in r){let{rr_type:i,args:a}=r,o=window[i];return new o(...await Promise.all(a.map($(e,t,n))))}else if(`base64`in r)return Ec(r.base64);else if(`src`in r){let t=e.get(r.src);if(t)return t;{let t=new Image;return t.src=r.src,e.set(r.src,t),t}}else if(`data`in r&&r.rr_type===`Blob`){let i=await Promise.all(r.data.map($(e,t,n)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map($(e,t,n)));return r}}function Xc(e,t){try{return t===xc.WebGL?e.getContext(`webgl`)||e.getContext(`experimental-webgl`):e.getContext(`webgl2`)}catch{return null}}const Zc=[`WebGLActiveInfo`,`WebGLBuffer`,`WebGLFramebuffer`,`WebGLProgram`,`WebGLRenderbuffer`,`WebGLShader`,`WebGLShaderPrecisionFormat`,`WebGLTexture`,`WebGLUniformLocation`,`WebGLVertexArrayObject`];function Qc(e,t){if(!t?.constructor)return;let{name:n}=t.constructor;if(!Zc.includes(n))return;let r=Yc(e,n);r.includes(t)||r.push(t)}async function $c({mutation:e,target:t,type:n,imageMap:r,errorHandler:i}){try{let i=Xc(t,n);if(!i)return;if(e.setter){i[e.property]=e.args[0];return}let a=i[e.property],o=await Promise.all(e.args.map($(r,i)));Qc(i,a.apply(i,o))}catch(t){i(e,t)}}async function el({event:e,mutations:t,target:n,imageMap:r,errorHandler:i}){let a=n.getContext(`2d`);if(!a){i(t[0],Error(`Canvas context is null`));return}let o=t.map(async e=>Promise.all(e.args.map($(r,a))));(await Promise.all(o)).forEach((n,o)=>{let s=t[o];try{if(s.setter){a[s.property]=s.args[0];return}let t=a[s.property];s.property===`drawImage`&&typeof s.args[0]==`string`?(r.get(e),t.apply(a,s.args)):t.apply(a,n)}catch(e){i(s,e)}})}async function tl({event:e,mutation:t,target:n,imageMap:r,canvasEventMap:i,errorHandler:a}){try{let o=i.get(e)||t,s=`commands`in o?o.commands:[o];if([xc.WebGL,xc.WebGL2].includes(t.type)){for(let e=0;e<s.length;e++){let i=s[e];await $c({mutation:i,type:t.type,target:n,imageMap:r,errorHandler:a})}return}await el({event:e,mutations:s,target:n,imageMap:r,errorHandler:a})}catch(e){a(t,e)}}var nl=class{constructor(e){s(this,`mediaMap`,new Map),s(this,`warn`),s(this,`service`),s(this,`speedService`),s(this,`emitter`),s(this,`getCurrentTime`),s(this,`metadataCallbackMap`,new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(X.Start,this.start.bind(this)),this.emitter.on(X.SkipStart,this.start.bind(this)),this.emitter.on(X.Pause,this.pause.bind(this)),this.emitter.on(X.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,n)=>{this.syncTargetWithState(n),e.pause&&n.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:n}){if(n.isPlaying){let r=(e-n.lastInteractionTimeOffset)/1e3*n.playbackRate,i=`duration`in t&&t.duration;if(Number.isNaN(i)){this.waitForMetadata(t);return}let a=n.currentTimeAtLastInteraction+r;t.loop&&i!==!1&&(a%=i),t.currentTime=a}else t.pause(),t.currentTime=n.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!(`addEventListener`in e))return;let t=()=>{this.metadataCallbackMap.delete(e);let t=this.mediaMap.get(e);t&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t})};this.metadataCallbackMap.set(e,t),e.addEventListener(`loadedmetadata`,t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:n}){let r=this.mediaMap.get(e),{type:i,playbackRate:a,currentTime:o,muted:s,volume:c,loop:l}=n;return{isPlaying:i===Sc.Play||i!==Sc.Pause&&(r?.isPlaying||e.getAttribute(`autoplay`)!==null),currentTimeAtLastInteraction:o??r?.currentTimeAtLastInteraction??0,lastInteractionTimeOffset:t,playbackRate:a??r?.playbackRate??1,volume:c??r?.volume??1,muted:s??r?.muted??e.getAttribute(`muted`)===null,loop:l??r?.loop??e.getAttribute(`loop`)===null}}syncTargetWithState(e){let t=this.mediaMap.get(e);if(!t)return;let{muted:n,loop:r,volume:i,isPlaying:a}=t,o=this.service.state.matches(`paused`),s=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==i&&(e.volume=i),e.muted=n,e.loop=r,e.playbackRate!==s&&(e.playbackRate=s),a&&!o?e.play():e.pause()}catch(e){this.warn(`Failed to replay media interactions: ${e.message||e}`)}}addMediaElements(e,t,n){if(![`AUDIO`,`VIDEO`].includes(e.nodeName))return;let r=e,i=n.getMeta(r);if(!i||!(`attributes`in i))return;let a=this.service.state.matches(`paused`),o=i.attributes,s=!1;s=o.rr_mediaState?o.rr_mediaState===`played`:r.getAttribute(`autoplay`)!==null,s&&a&&r.pause();let c=1;typeof o.rr_mediaPlaybackRate==`number`&&(c=o.rr_mediaPlaybackRate);let l=!1;l=typeof o.rr_mediaMuted==`boolean`?o.rr_mediaMuted:r.getAttribute(`muted`)!==null;let u=!1;u=typeof o.rr_mediaLoop==`boolean`?o.rr_mediaLoop:r.getAttribute(`loop`)!==null;let d=1;typeof o.rr_mediaVolume==`number`&&(d=o.rr_mediaVolume);let f=0;typeof o.rr_mediaCurrentTime==`number`&&(f=o.rr_mediaCurrentTime),this.mediaMap.set(r,{isPlaying:s,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:t,playbackRate:c,volume:d,muted:l,loop:u}),this.syncTargetWithState(r)}mediaMutation({target:e,timeOffset:t,mutation:n}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:n})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return[`AUDIO`,`VIDEO`].includes(e.nodeName)}reset(){this.mediaMap.clear()}};function rl(e,t){if(e.nodeName!==`DIALOG`||e instanceof V)return;let n=e,r=n.open,i=r&&n.matches(`dialog:modal`),a=n.getAttribute(`rr_open_mode`),o=typeof t?.attributes.open==`string`||typeof n.getAttribute(`open`)==`string`,s=a===`modal`;if(!(r&&!(i&&a===`non-modal`||!i&&s))){if(!n.isConnected){console.warn(`dialog is not attached to the dom`,n);return}r&&n.close(),o&&(s?n.showModal():n.show())}}function il(e,t){if(e.nodeName!==`DIALOG`||e instanceof V)return;let n=e;if(!n.isConnected){console.warn(`dialog is not attached to the dom`,n);return}t.attributes.open===null&&(n.removeAttribute(`open`),n.removeAttribute(`rr_open_mode`))}const al=Dc||Oc,ol=`[replayer]`,sl={duration:500,lineCap:`round`,lineWidth:3,strokeStyle:`red`};function cl(e){return e.type==q.IncrementalSnapshot&&(e.data.source==J.TouchMove||e.data.source==J.MouseInteraction&&e.data.type==Y.TouchStart)}var ll=class{constructor(e,t){if(s(this,`wrapper`),s(this,`iframe`),s(this,`service`),s(this,`speedService`),s(this,`config`),s(this,`usingVirtualDom`,!1),s(this,`virtualDom`,new ws),s(this,`mouse`),s(this,`mouseTail`,null),s(this,`tailPositions`,[]),s(this,`emitter`,al()),s(this,`nextUserInteractionEvent`),s(this,`legacy_missingNodeRetryMap`,{}),s(this,`cache`,yr()),s(this,`imageMap`,new Map),s(this,`canvasEventMap`,new Map),s(this,`mirror`,m()),s(this,`styleMirror`,new bc),s(this,`mediaManager`),s(this,`firstFullSnapshot`,null),s(this,`newDocumentQueue`,[]),s(this,`mousePos`,null),s(this,`touchActive`,null),s(this,`lastMouseDownEvent`,null),s(this,`lastHoveredRootNode`),s(this,`lastSelectionData`,null),s(this,`constructedStyleMutations`,[]),s(this,`adoptedStyleSheets`,[]),s(this,`handleResize`,e=>{this.iframe.style.display=`inherit`;for(let t of[this.mouseTail,this.iframe])t&&(t.setAttribute(`width`,String(e.width)),t.setAttribute(`height`,String(e.height)))}),s(this,`applyEventsSynchronously`,e=>{for(let t of e){switch(t.type){case q.DomContentLoaded:case q.Load:case q.Custom:continue;case q.FullSnapshot:case q.Meta:case q.Plugin:case q.IncrementalSnapshot:break}this.getCastFn(t,!0)()}}),s(this,`getCastFn`,(e,t=!1)=>{let n;switch(e.type){case q.DomContentLoaded:case q.Load:break;case q.Custom:n=()=>{this.emitter.emit(X.CustomEvent,e)};break;case q.Meta:n=()=>this.emitter.emit(X.Resize,{width:e.data.width,height:e.data.height});break;case q.FullSnapshot:n=()=>{var n;if(this.firstFullSnapshot){if(this.firstFullSnapshot===e){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(e,t),(n=this.iframe.contentWindow)==null||n.scrollTo(e.data.initialOffset)};break;case q.IncrementalSnapshot:n=()=>{if(this.applyIncremental(e,t),!t&&(e===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(let t of this.service.state.context.events)if(!(t.timestamp<=e.timestamp)&&this.isUserInteraction(t)){t.delay-e.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=t);break}if(this.nextUserInteractionEvent){let t=this.nextUserInteractionEvent.delay-e.delay,n={speed:Math.min(Math.round(t/5e3),this.config.maxSpeed)};this.speedService.send({type:`FAST_FORWARD`,payload:n}),this.emitter.emit(X.SkipStart,n)}}};break}return()=>{n&&n();for(let n of this.config.plugins||[])n.handler&&n.handler(e,t,{replayer:this});this.service.send({type:`CAST_EVENT`,payload:{event:e}});let r=this.service.state.context.events.length-1;if(!this.config.liveMode&&e===this.service.state.context.events[r]){let t=()=>{r<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send(`END`),this.emitter.emit(X.Finish))},n=50;e.type===q.IncrementalSnapshot&&e.data.source===J.MouseMove&&e.data.positions.length&&(n+=Math.max(0,-e.data.positions[0].timeOffset)),setTimeout(t,n)}this.emitter.emit(X.EventCast,e)}}),!t?.liveMode&&e.length<2)throw Error(`Replayer need at least 2 events.`);let n={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:`rr-block`,liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:sl,useVirtualDom:!0,logger:console};this.config=Object.assign({},n,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(X.Resize,this.handleResize),this.setupDom();for(let e of this.config.plugins||[])e.getMirror&&e.getMirror({nodeMirror:this.mirror});this.emitter.on(X.Flush,()=>{if(this.usingVirtualDom){let e={mirror:this.mirror,applyCanvas:(e,t,n)=>{tl({event:e,mutation:t,target:n,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(e,t)=>{e.source===J.StyleSheetRule?this.applyStyleSheetRule(e,t):e.source===J.StyleDeclaration&&this.applyStyleDeclaration(e,t)},afterAppend:(e,t)=>{for(let n of this.config.plugins||[])n.onBuild&&n.onBuild(e,{id:t,replayer:this})}};if(this.iframe.contentDocument)try{_s(this.iframe.contentDocument,this.virtualDom,e,this.virtualDom.mirror)}catch(e){console.warn(e)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(let t in this.legacy_missingNodeRetryMap)try{let n=this.legacy_missingNodeRetryMap[t],r=Ss(n.node,this.mirror,this.virtualDom.mirror);_s(r,n.node,e,this.virtualDom.mirror),n.node=r}catch(e){this.warn(e)}this.constructedStyleMutations.forEach(e=>{this.applyStyleSheetMutation(e)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(e=>{this.applyAdoptedStyleSheet(e)}),this.adoptedStyleSheets=[]}if(this.mousePos&&=(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),null),this.touchActive===!0?this.mouse.classList.add(`touch-active`):this.touchActive===!1&&this.mouse.classList.remove(`touch-active`),this.touchActive=null,this.lastMouseDownEvent){let[e,t]=this.lastMouseDownEvent;e.dispatchEvent(t)}this.lastMouseDownEvent=null,this.lastSelectionData&&=(this.applySelection(this.lastSelectionData),null)}),this.emitter.on(X.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});let r=new Ac([],{speed:this.config.speed});this.service=Gc({events:e.map(e=>t&&t.unpackFn?t.unpackFn(e):e).sort((e,t)=>e.timestamp-t.timestamp),timer:r,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(e=>{this.emitter.emit(X.StateChange,{player:e})}),this.speedService=Kc({normalSpeed:-1,timer:r}),this.speedService.start(),this.speedService.subscribe(e=>{this.emitter.emit(X.StateChange,{speed:e})}),this.mediaManager=new nl({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});let i=this.service.state.context.events.find(e=>e.type===q.Meta),a=this.service.state.context.events.find(e=>e.type===q.FullSnapshot);if(i){let{width:e,height:t}=i.data;setTimeout(()=>{this.emitter.emit(X.Resize,{width:e,height:t})},0)}a&&setTimeout(()=>{var e;this.firstFullSnapshot||(this.firstFullSnapshot=a,this.rebuildFullSnapshot(a),(e=this.iframe.contentWindow)==null||e.scrollTo(a.data.initialOffset))},1),this.service.state.context.events.find(cl)&&this.mouse.classList.add(`touch-device`)}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),e.speed!==void 0&&this.speedService.send({type:`SET_SPEED`,payload:{speed:e.speed}}),e.mouseTail!==void 0&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display=`none`):(this.mouseTail||(this.mouseTail=document.createElement(`canvas`),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add(`replayer-mouse-tail`),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display=`inherit`))}getMetaData(){let e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){let{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t;this.service.state.matches(`paused`)||this.service.send({type:`PAUSE`}),this.service.send({type:`PLAY`,payload:{timeOffset:e}}),(t=this.iframe.contentDocument?.getElementsByTagName(`html`)[0])==null||t.classList.remove(`rrweb-paused`),this.emitter.emit(X.Start)}pause(e){var t;e===void 0&&this.service.state.matches(`playing`)&&this.service.send({type:`PAUSE`}),typeof e==`number`&&(this.play(e),this.service.send({type:`PAUSE`})),(t=this.iframe.contentDocument?.getElementsByTagName(`html`)[0])==null||t.classList.add(`rrweb-paused`),this.emitter.emit(X.Pause)}resume(e=0){this.warn(`The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface.`),this.play(e),this.emitter.emit(X.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(X.Destroy)}startLive(e){this.service.send({type:`TO_LIVE`,payload:{baselineTime:e}})}addEvent(e){let t=this.config.unpackFn?this.config.unpackFn(e):e;cl(t)&&this.mouse.classList.add(`touch-device`),Promise.resolve().then(()=>this.service.send({type:`ADD_EVENT`,payload:{event:t}}))}enableInteract(){this.iframe.setAttribute(`scrolling`,`auto`),this.iframe.style.pointerEvents=`auto`}disableInteract(){this.iframe.setAttribute(`scrolling`,`no`),this.iframe.style.pointerEvents=`none`}resetCache(){this.cache=yr()}setupDom(){this.wrapper=document.createElement(`div`),this.wrapper.classList.add(`replayer-wrapper`),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement(`div`),this.mouse.classList.add(`replayer-mouse`),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement(`canvas`),this.mouseTail.classList.add(`replayer-mouse-tail`),this.mouseTail.style.display=`inherit`,this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement(`iframe`);let e=[`allow-same-origin`];this.config.UNSAFE_replayCanvas&&e.push(`allow-scripts`),this.iframe.style.display=`none`,this.iframe.setAttribute(`sandbox`,e.join(` `)),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(kc(this.iframe.contentWindow,this.iframe.contentDocument),dc(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){if(!this.iframe.contentDocument)return this.warn(`Looks like your replayer has been destroyed.`);Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn(`Found unresolved missing node map`,this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};let n=[],r=new Set,i=(t,i)=>{if(t.nodeName===`DIALOG`&&r.add(t),this.collectIframeAndAttachDocument(n,t),this.mediaManager.isSupportedMediaElement(t)){let{events:n}=this.service.state.context;this.mediaManager.addMediaElements(t,e.timestamp-n[0].timestamp,this.mirror)}for(let e of this.config.plugins||[])e.onBuild&&e.onBuild(t,{id:i,replayer:this})};this.usingVirtualDom&&=(this.virtualDom.destroyTree(),!1),this.mirror.reset(),Er(e.data.node,{doc:this.iframe.contentDocument,afterAppend:i,cache:this.cache,mirror:this.mirror}),i(this.iframe.contentDocument,e.data.node.id);for(let{mutationInQueue:e,builtNode:t}of n)this.attachDocumentToIframe(e,t),this.newDocumentQueue=this.newDocumentQueue.filter(t=>t!==e);let{documentElement:a,head:o}=this.iframe.contentDocument;this.insertStyleRules(a,o),r.forEach(e=>rl(e)),this.service.state.matches(`playing`)||this.iframe.contentDocument.getElementsByTagName(`html`)[0].classList.add(`rrweb-paused`),this.emitter.emit(X.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var n;let r=qc(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&r.push(`html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }`),r.length)if(this.usingVirtualDom){let n=this.virtualDom.createElement(`style`);this.virtualDom.mirror.add(n,Bs(n,this.virtualDom.unserializedId)),e.insertBefore(n,t),n.rules.push({source:J.StyleSheetRule,adds:r.map((e,t)=>({rule:e,index:t}))})}else{let i=document.createElement(`style`);e.insertBefore(i,t);for(let e=0;e<r.length;e++)(n=i.sheet)==null||n.insertRule(r[e],e)}}attachDocumentToIframe(e,t){let n=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,r=[],i=new Set,a=(e,a)=>{e.nodeName===`DIALOG`&&i.add(e),this.collectIframeAndAttachDocument(r,e);let o=n.getMeta(e);if(o?.type===Z.Element&&o?.tagName.toUpperCase()===`HTML`){let{documentElement:e,head:n}=t.contentDocument;this.insertStyleRules(e,n)}if(!this.usingVirtualDom)for(let t of this.config.plugins||[])t.onBuild&&t.onBuild(e,{id:a,replayer:this})};Cr(e.node,{doc:t.contentDocument,mirror:n,hackCss:!0,skipChild:!1,afterAppend:a,cache:this.cache}),a(t.contentDocument,e.node.id);for(let{mutationInQueue:e,builtNode:t}of r)this.attachDocumentToIframe(e,t),this.newDocumentQueue=this.newDocumentQueue.filter(t=>t!==e);i.forEach(e=>rl(e))}collectIframeAndAttachDocument(e,t){if(mc(t,this.mirror)){let n=this.newDocumentQueue.find(e=>e.parentId===this.mirror.getId(t));n&&e.push({mutationInQueue:n,builtNode:t})}}waitForStylesheetLoad(){let e=this.iframe.contentDocument?.head;if(e){let t=new Set,n,r=this.service.state,i=()=>{r=this.service.state};this.emitter.on(X.Start,i),this.emitter.on(X.Pause,i);let a=()=>{this.emitter.off(X.Start,i),this.emitter.off(X.Pause,i)};e.querySelectorAll(`link[rel="stylesheet"]`).forEach(e=>{e.sheet||(t.add(e),e.addEventListener(`load`,()=>{t.delete(e),t.size===0&&n!==-1&&(r.matches(`playing`)&&this.play(this.getCurrentTime()),this.emitter.emit(X.LoadStylesheetEnd),n&&clearTimeout(n),a())}))}),t.size>0&&(this.service.send({type:`PAUSE`}),this.emitter.emit(X.LoadStylesheetStart),n=setTimeout(()=>{r.matches(`playing`)&&this.play(this.getCurrentTime()),n=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){let e=[];for(let t of this.service.state.context.events)t.type===q.IncrementalSnapshot&&t.data.source===J.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),(`commands`in t.data?t.data.commands:[t.data]).forEach(e=>{this.preloadImages(e,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property===`drawImage`&&typeof e.args[0]==`string`&&!this.imageMap.has(t)){let e=document.createElement(`canvas`),t=e.getContext(`2d`),n=t?.createImageData(e.width,e.height);t?.putImageData(n,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){let n={isUnchanged:!0};if(`commands`in e){let r=await Promise.all(e.commands.map(async e=>{let t=await Promise.all(e.args.map($(this.imageMap,null,n)));return{...e,args:t}}));n.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,commands:r})}else{let r=await Promise.all(e.args.map($(this.imageMap,null,n)));n.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,args:r})}}}applyIncremental(e,t){var n,r;let{data:i}=e;switch(i.source){case J.Mutation:try{this.applyMutation(i,t)}catch(e){this.warn(`Exception in mutation ${e.message||e}`,i)}break;case J.Drag:case J.TouchMove:case J.MouseMove:if(t){let e=i.positions[i.positions.length-1];this.mousePos={x:e.x,y:e.y,id:e.id,debugData:i}}else i.positions.forEach(n=>{let r={doAction:()=>{this.moveAndHover(n.x,n.y,n.id,t,i)},delay:n.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(r)}),this.timer.addAction({doAction(){},delay:e.delay-i.positions[0]?.timeOffset});break;case J.MouseInteraction:{if(i.id===-1)break;let e=new Event(h(Y[i.type])),n=this.mirror.getNode(i.id);if(!n)return this.debugNodeNotFound(i,i.id);this.emitter.emit(X.MouseInteraction,{type:i.type,target:n});let{triggerFocus:r}=this.config;switch(i.type){case Y.Blur:`blur`in n&&n.blur();break;case Y.Focus:r&&n.focus&&n.focus({preventScroll:!0});break;case Y.Click:case Y.TouchStart:case Y.TouchEnd:case Y.MouseDown:case Y.MouseUp:t?(i.type===Y.TouchStart?this.touchActive=!0:i.type===Y.TouchEnd&&(this.touchActive=!1),i.type===Y.MouseDown?this.lastMouseDownEvent=[n,e]:i.type===Y.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:i.x||0,y:i.y||0,id:i.id,debugData:i}):(i.type===Y.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(i.x||0,i.y||0,i.id,t,i),i.type===Y.Click?(this.mouse.classList.remove(`active`),this.mouse.offsetWidth,this.mouse.classList.add(`active`)):i.type===Y.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add(`touch-active`)):i.type===Y.TouchEnd?this.mouse.classList.remove(`touch-active`):n.dispatchEvent(e));break;case Y.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove(`touch-active`);break;default:n.dispatchEvent(e)}break}case J.Scroll:if(i.id===-1)break;if(this.usingVirtualDom){let e=this.virtualDom.mirror.getNode(i.id);if(!e)return this.debugNodeNotFound(i,i.id);e.scrollData=i;break}this.applyScroll(i,t);break;case J.ViewportResize:this.emitter.emit(X.Resize,{width:i.width,height:i.height});break;case J.Input:if(i.id===-1)break;if(this.usingVirtualDom){let e=this.virtualDom.mirror.getNode(i.id);if(!e)return this.debugNodeNotFound(i,i.id);e.inputData=i;break}this.applyInput(i);break;case J.MediaInteraction:{let t=this.usingVirtualDom?this.virtualDom.mirror.getNode(i.id):this.mirror.getNode(i.id);if(!t)return this.debugNodeNotFound(i,i.id);let n=t,{events:r}=this.service.state.context;this.mediaManager.mediaMutation({target:n,timeOffset:e.timestamp-r[0].timestamp,mutation:i});break}case J.StyleSheetRule:case J.StyleDeclaration:this.usingVirtualDom?i.styleId?this.constructedStyleMutations.push(i):i.id&&((n=this.virtualDom.mirror.getNode(i.id))==null||n.rules.push(i)):this.applyStyleSheetMutation(i);break;case J.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let t=this.virtualDom.mirror.getNode(i.id);if(!t)return this.debugNodeNotFound(i,i.id);t.canvasMutations.push({event:e,mutation:i})}else{let t=this.mirror.getNode(i.id);if(!t)return this.debugNodeNotFound(i,i.id);tl({event:e,mutation:i,target:t,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case J.Font:try{let e=new FontFace(i.family,i.buffer?new Uint8Array(JSON.parse(i.fontSource)):i.fontSource,i.descriptors);(r=this.iframe.contentDocument)==null||r.fonts.add(e)}catch(e){this.warn(e)}break;case J.Selection:if(t){this.lastSelectionData=i;break}this.applySelection(i);break;case J.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(i):this.applyAdoptedStyleSheet(i);break}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,Ls(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(let e in this.legacy_missingNodeRetryMap)try{let t=this.legacy_missingNodeRetryMap[e],n=Is(t.node,this.virtualDom,this.mirror);n&&(t.node=n)}catch(e){this.warn(e)}let n=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(t=>n.getNode(t.id)?!0:(this.warnNodeNotFound(e,t.id),!1)),e.removes.forEach(t=>{let r=n.getNode(t.id);if(!r)return;let i=n.getNode(t.parentId);if(!i)return this.warnNodeNotFound(e,t.parentId);if(t.isShadow&&gc(i)&&(i=i.shadowRoot),n.removeNodeFromMap(r),i)try{i.removeChild(r),this.usingVirtualDom&&r.nodeName===`#text`&&i.nodeName===`STYLE`&&i.rules?.length>0&&(i.rules=[])}catch(t){if(t instanceof DOMException)this.warn(`parent could not remove child in mutation`,i,r,e);else throw t}});let r={...this.legacy_missingNodeRetryMap},i=[],a=e=>{let t=null;return e.nextId&&(t=n.getNode(e.nextId)),e.nextId!==null&&e.nextId!==void 0&&e.nextId!==-1&&!t},o=e=>{if(!this.iframe.contentDocument)return this.warn(`Looks like your replayer has been destroyed.`);let t=n.getNode(e.parentId);if(!t)return e.node.type===Z.Document?this.newDocumentQueue.push(e):i.push(e);e.node.isShadow&&(gc(t)||t.attachShadow({mode:`open`}),t=t.shadowRoot);let o=null,s=null;if(e.previousId&&(o=n.getNode(e.previousId)),e.nextId&&(s=n.getNode(e.nextId)),a(e))return i.push(e);if(e.node.rootId&&!n.getNode(e.node.rootId))return;let c=e.node.rootId?n.getNode(e.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(mc(t,n)){this.attachDocumentToIframe(e,t);return}let l=(e,t)=>{if(!this.usingVirtualDom){rl(e);for(let n of this.config.plugins||[])n.onBuild&&n.onBuild(e,{id:t,replayer:this})}},u=Cr(e.node,{doc:c,mirror:n,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:l});if(e.previousId===-1||e.nextId===-1){r[e.node.id]={node:u,mutation:e};return}let d=n.getMeta(t);if(d&&d.type===Z.Element&&e.node.type===Z.Text){let e=Array.isArray(t.childNodes)?t.childNodes:Array.from(t.childNodes);if(d.tagName===`textarea`)for(let n of e)n.nodeType===t.TEXT_NODE&&t.removeChild(n);else if(d.tagName===`style`&&e.length===1)for(let r of e)r.nodeType===t.TEXT_NODE&&!n.hasNode(r)&&(u.textContent=r.textContent,t.removeChild(r))}else if(d?.type===Z.Document){let n=t;e.node.type===Z.DocumentType&&n.childNodes[0]?.nodeType===Node.DOCUMENT_TYPE_NODE&&n.removeChild(n.childNodes[0]),u.nodeName===`HTML`&&n.documentElement&&n.removeChild(n.documentElement)}if(o&&o.nextSibling&&o.nextSibling.parentNode?t.insertBefore(u,o.nextSibling):s&&s.parentNode?t.contains(s)?t.insertBefore(u,s):t.insertBefore(u,null):t.appendChild(u),l(u,e.node.id),this.usingVirtualDom&&u.nodeName===`#text`&&t.nodeName===`STYLE`&&t.rules?.length>0&&(t.rules=[]),mc(u,this.mirror)){let e=this.mirror.getId(u),t=this.newDocumentQueue.find(t=>t.parentId===e);t&&(this.attachDocumentToIframe(t,u),this.newDocumentQueue=this.newDocumentQueue.filter(e=>e!==t))}(e.previousId||e.nextId)&&this.legacy_resolveMissingNode(r,t,u,e)};e.adds.forEach(e=>{o(e)});let s=Date.now();for(;i.length;){let e=fc(i);if(i.length=0,Date.now()-s>500){this.warn(`Timeout in the loop, please check the resolve tree data:`,e);break}for(let t of e)n.getNode(t.value.parentId)?pc(t,e=>{o(e)}):this.debug(`Drop resolve tree since there is no parent for the root node.`,t)}Object.keys(r).length&&Object.assign(this.legacy_missingNodeRetryMap,r),yc(e.texts).forEach(t=>{let r=n.getNode(t.id);if(!r)return e.removes.find(e=>e.id===t.id)?void 0:this.warnNodeNotFound(e,t.id);let i=r.parentElement;if(t.value&&i&&i.tagName===`STYLE`?r.textContent=vr(t.value,this.cache):r.textContent=t.value,this.usingVirtualDom){let e=r.parentNode;e?.rules?.length>0&&(e.rules=[])}}),e.attributes.forEach(t=>{let r=n.getNode(t.id);if(!r)return e.removes.find(e=>e.id===t.id)?void 0:this.warnNodeNotFound(e,t.id);for(let e in t.attributes)if(typeof e==`string`){let i=t.attributes[e];if(i===null)r.removeAttribute(e),e===`open`&&il(r,t);else if(typeof i==`string`)try{if(e===`_cssText`&&(r.nodeName===`LINK`||r.nodeName===`STYLE`))try{let e=n.getMeta(r),i=Cr({...e,attributes:{...e.attributes,...t.attributes}},{doc:r.ownerDocument,mirror:n,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(e.attributes,t.attributes);let a=r.nextSibling,o=r.parentNode;if(i&&o){o.removeChild(r),o.insertBefore(i,a),n.replace(t.id,i);break}}catch{}if(e===`value`&&r.nodeName===`TEXTAREA`){let e=r;e.childNodes.forEach(t=>e.removeChild(t));let t=r.ownerDocument?.createTextNode(i);t&&e.appendChild(t)}else r.setAttribute(e,i);e===`rr_open_mode`&&r.nodeName===`DIALOG`&&rl(r,t)}catch(e){this.warn(`An error occurred may due to the checkout feature.`,e)}else if(e===`style`){let e=i,t=r;for(let n in e)if(e[n]===!1)t.style.removeProperty(n);else if(e[n]instanceof Array){let r=e[n];t.style.setProperty(n,r[0],r[1])}else{let r=e[n];t.style.setProperty(n,r)}}}})}applyScroll(e,t){var n,r;let i=this.mirror.getNode(e.id);if(!i)return this.debugNodeNotFound(e,e.id);let a=this.mirror.getMeta(i);if(i===this.iframe.contentDocument)(n=this.iframe.contentWindow)==null||n.scrollTo({top:e.y,left:e.x,behavior:t?`auto`:`smooth`});else if(a?.type===Z.Document)(r=i.defaultView)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?`auto`:`smooth`});else try{i.scrollTo({top:e.y,left:e.x,behavior:t?`auto`:`smooth`})}catch{}}applyInput(e){let t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch{}}applySelection(e){try{let t=new Set,n=e.ranges.map(({start:e,startOffset:n,end:r,endOffset:i})=>{let a=this.mirror.getNode(e),o=this.mirror.getNode(r);if(!a||!o)return;let s=new Range;s.setStart(a,n),s.setEnd(o,i);let c=a.ownerDocument?.getSelection();return c&&t.add(c),{range:s,selection:c}});t.forEach(e=>e.removeAllRanges()),n.forEach(e=>e&&e.selection?.addRange(e.range))}catch{}}applyStyleSheetMutation(e){let t=null;e.styleId?t=this.styleMirror.getStyle(e.styleId):e.id&&(t=this.mirror.getNode(e.id)?.sheet||null),t&&(e.source===J.StyleSheetRule?this.applyStyleSheetRule(e,t):e.source===J.StyleDeclaration&&this.applyStyleDeclaration(e,t))}applyStyleSheetRule(e,t){var n,r,i,a;if((n=e.adds)==null||n.forEach(({rule:e,index:n})=>{try{if(Array.isArray(n)){let{positions:r,index:i}=vc(n);_c(t.cssRules,r).insertRule(e,i)}else{let r=n===void 0?void 0:Math.min(n,t.cssRules.length);t?.insertRule(e,r)}}catch{}}),(r=e.removes)==null||r.forEach(({index:e})=>{try{if(Array.isArray(e)){let{positions:n,index:r}=vc(e);_c(t.cssRules,n).deleteRule(r||0)}else t?.deleteRule(e)}catch{}}),e.replace)try{(i=t.replace)==null||i.call(t,e.replace)}catch{}if(e.replaceSync)try{(a=t.replaceSync)==null||a.call(t,e.replaceSync)}catch{}}applyStyleDeclaration(e,t){e.set&&_c(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&_c(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;let n=this.mirror.getNode(e.id);if(!n)return;(t=e.styles)==null||t.forEach(e=>{let t=null,r=null;if(gc(n)?r=n.ownerDocument?.defaultView||null:n.nodeName===`#document`&&(r=n.defaultView),r)try{t=new r.CSSStyleSheet,this.styleMirror.add(t,e.styleId),this.applyStyleSheetRule({source:J.StyleSheetRule,adds:e.rules},t)}catch{}});let r=0,i=(e,t)=>{let n=t.map(e=>this.styleMirror.getStyle(e)).filter(e=>e!==null);gc(e)?e.shadowRoot.adoptedStyleSheets=n:e.nodeName===`#document`&&(e.adoptedStyleSheets=n),n.length!==t.length&&r<10&&(setTimeout(()=>i(e,t),0+100*r),r++)};i(n,e.styleIds)}legacy_resolveMissingNode(e,t,n,r){let{previousId:i,nextId:a}=r,o=i&&e[i],s=a&&e[a];if(o){let{node:r,mutation:i}=o;t.insertBefore(r,n),delete e[i.node.id],delete this.legacy_missingNodeRetryMap[i.node.id],(i.previousId||i.nextId)&&this.legacy_resolveMissingNode(e,t,r,i)}if(s){let{node:r,mutation:i}=s;t.insertBefore(r,n.nextSibling),delete e[i.node.id],delete this.legacy_missingNodeRetryMap[i.node.id],(i.previousId||i.nextId)&&this.legacy_resolveMissingNode(e,t,r,i)}}moveAndHover(e,t,n,r,i){let a=this.mirror.getNode(n);if(!a)return this.debugNodeNotFound(i,n);let o=hc(a,this.iframe),s=e*o.absoluteScale+o.x,c=t*o.absoluteScale+o.y;this.mouse.style.left=`${s}px`,this.mouse.style.top=`${c}px`,r||this.drawMouseTail({x:s,y:c}),this.hoverElements(a)}drawMouseTail(e){if(!this.mouseTail)return;let{lineCap:t,lineWidth:n,strokeStyle:r,duration:i}=this.config.mouseTail===!0?sl:Object.assign({},sl,this.config.mouseTail),a=()=>{if(!this.mouseTail)return;let e=this.mouseTail.getContext(`2d`);!e||!this.tailPositions.length||(e.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),e.beginPath(),e.lineWidth=n,e.lineCap=t,e.strokeStyle=r,e.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(t=>e.lineTo(t.x,t.y)),e.stroke())};this.tailPositions.push(e),a(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(t=>t!==e),a()},i/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(`.\\:hover`).forEach(e=>{e.classList.remove(`:hover`)}),this.lastHoveredRootNode=e.getRootNode();let n=e;for(;n;)n.classList&&n.classList.add(`:hover`),n=n.parentElement}isUserInteraction(e){return e.type===q.IncrementalSnapshot?e.data.source>J.Mutation&&e.data.source<=J.Input:!1}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches(`normal`)&&(this.speedService.send({type:`BACK_TO_NORMAL`}),this.emitter.emit(X.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn(`Has error on canvas update`,t,`canvas mutation:`,e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(ol,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(ol,...e)}},ul=(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))(ul||{});function dl({events:a}){let o=t(null),s=t(null),c=t(null),[l,u]=n(0),[d,f]=n(0);return e(()=>{if(!o.current||a.length===0)return;let e=o.current,t=e.offsetWidth,n=e.offsetHeight,r=a.find(e=>e.type===ul.Meta);if(!r)return;let{width:i,height:l}=r.data;if(s.current){try{s.current.destroy()}catch{}s.current=null}e.innerHTML=``;let d=new ll(a,{root:e,skipInactive:!0,showWarning:!1,showDebug:!1,triggerFocus:!1,mouseTail:{duration:500,lineCap:`round`,lineWidth:2}}),{totalTime:p}=d.getMetaData();f(p);let m=()=>{c.current&&clearInterval(c.current),c.current=setInterval(()=>{let e=d.getCurrentTime();u(p>0?e/p*100:0)},100)},h=t/i,g=n/l,_=Math.max(h,g);d.wrapper.style.width=`${i}px`,d.wrapper.style.height=`${l}px`,d.wrapper.style.position=`absolute`,d.wrapper.style.left=`50%`,d.wrapper.style.top=`50%`,d.wrapper.style.transform=`translate(-50%, -50%) scale(${_})`,d.wrapper.style.transformOrigin=`center center`;let v=document.createElement(`style`);return v.textContent=`
|
|
70
|
+
.replayer-mouse-tail {
|
|
71
|
+
position: absolute;
|
|
72
|
+
}
|
|
73
|
+
`,d.wrapper.appendChild(v),s.current=d,d.play(),m(),d.on(`finish`,()=>{u(0),d.play(0)}),()=>{if(c.current&&=(clearInterval(c.current),null),s.current){try{s.current.destroy()}catch{}s.current=null}}},[a]),i(`div`,{className:`cf-bug-report-player-container`,children:[r(`div`,{ref:o,className:`cf-bug-report-player`}),r(`div`,{className:`cf-bug-report-progress-bar`,style:{width:`${l}%`,transitionDuration:l===0?`0s`:`100ms`,transitionTimingFunction:`linear`}}),i(`div`,{className:`cf-bug-report-time`,children:[Math.floor(d/1e3),`s`]})]})}export{dl as default};
|
package/build/confetti.css
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
:root{--confetti-font-scale: 16px;--confetti-box-padding: 24px;--confetti-max-width: 300px;--confetti-z-index: 2147483647;--confetti-border-color: #e4e4e7;--confetti-border-bottom: 1.5px solid var(--confetti-border-color);--confetti-border-radius: 12px;--confetti-background-color: #ffffff;--confetti-hover-background-color: #f5f5f5;--confetti-box-shadow:
|
|
2
|
-
0 4px 6px -4px rgba(16, 24, 40, 0.1), 0 10px 15px -3px rgba(0, 0, 0, 0.1);--confetti-focus-shadow: 0 0 0 2px rgba(9, 9, 11, 0.3);--confetti-submit-button-color: #18181b;--confetti-submit-button-text-color: #fafafa;--confetti-rating-bg-color: white;--confetti-rating-text-color: #09090b;--confetti-rating-active-bg-color: #09090b;--confetti-rating-active-text-color: white;--confetti-indicator-active-bg-color: var(--confetti-rating-text-color);--confetti-indicator-active-dot-color: white;--confetti-text-primary-color: #09090b;--confetti-text-subtle-color: #71717a;--confetti-widget-color: #e0a045;--confetti-widget-text-color: white;--confetti-scrollbar-thumb-color: var(--confetti-border-color);--confetti-scrollbar-track-color: var(--confetti-background-color);--confetti-outline-color: rgba(9, 9, 11, 0.8);--confetti-input-background: white;--confetti-input-text-color: #020617;--confetti-disabled-button-opacity: 0.6;}.confetti-dialog{width:var(--confetti-max-width);max-height:95dvh;overflow:auto;max-width:100%;background:transparent;position:relative;box-shadow:var(--confetti-box-shadow);border:1px solid var(--confetti-border-color);border-radius:var(--confetti-border-radius);background:var(--confetti-background-color);padding:var(--confetti-box-padding)}.confetti-dialog .confetti-dialog-close{position:absolute;top:8px;right:8px;background:transparent;border:none;cursor:pointer;padding:8px;border-radius:8px;transition:background 200ms}:is(.confetti-dialog .confetti-dialog-close) svg{width:16px;height:16px;color:var(--confetti-text-subtle-color)}:is(.confetti-dialog .confetti-dialog-close):hover{background:rgba(0, 0, 0, 0.05)}:is(.confetti-dialog .confetti-dialog-close):focus-visible{outline:2px solid var(--confetti-outline-color);outline-offset:2px}:is(.confetti-dialog .cf-header) .cf-title{padding-right:20px}.confetti-modal-overlay{position:fixed;inset:0;z-index:var(--confetti-z-index);background:rgba(0, 0, 0, 0.4);display:flex;justify-content:center;overflow-y:auto;overscroll-behavior:none;padding:10vh 0}.confetti-modal{margin:auto}.confetti-modal .confetti-modal-dialog{width:var(--confetti-max-width);max-width:100%;position:relative;box-shadow:var(--confetti-box-shadow);border:1px solid var(--confetti-border-color);border-radius:var(--confetti-border-radius);background:var(--confetti-background-color);padding:var(--confetti-box-padding)}:is(.confetti-modal .confetti-modal-dialog):focus-visible{outline:none}:is(.confetti-modal .confetti-modal-dialog) .confetti-modal-dialog-close{position:absolute;top:8px;right:8px;background:transparent;border:none;cursor:pointer;padding:8px;border-radius:8px;transition:background 200ms}:is(:is(.confetti-modal .confetti-modal-dialog) .confetti-modal-dialog-close) svg{width:16px;height:16px;color:var(--confetti-text-subtle-color)}:is(:is(.confetti-modal .confetti-modal-dialog) .confetti-modal-dialog-close):hover{background:rgba(0, 0, 0, 0.05)}:is(:is(.confetti-modal .confetti-modal-dialog) .confetti-modal-dialog-close):focus-visible{outline:2px solid var(--confetti-outline-color);outline-offset:2px}:is(:is(.confetti-modal .confetti-modal-dialog) .cf-header) .cf-title{padding-right:20px}.confetti{font-family:var(--confetti-font-family);display:flex;flex-direction:column;gap:16px;color:var(--confetti-text-primary-color);font-size:var(--confetti-font-scale);width:100%}.confetti .cf-submit-button{align-self:end;color:var(--confetti-submit-button-text-color);background:var(--confetti-submit-button-color);padding:8px 16px;border-radius:8px;cursor:pointer;transition:transform 200ms;font-size:0.875em;font-weight:500;line-height:20px;transition:background 200ms ease-out}:is(.confetti .cf-submit-button):focus-visible{outline:2px solid var(--confetti-outline-color);outline-offset:2px}[data-disabled]:is(.confetti .cf-submit-button){opacity:var(--confetti-disabled-button-opacity);cursor:not-allowed;transform:none}:is(.confetti .cf-submit-button):hover{background:color-mix( in srgb, white 10%, var(--confetti-submit-button-color) )}:is(.confetti .cf-submit-button):active{background:color-mix( in srgb, white 5%, var(--confetti-submit-button-color) )}.confetti .sr-only{clip:rect(0, 0, 0, 0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.confetti .cf-response-choices{display:flex;flex-direction:column;gap:12px}.confetti .cf-choice{font-size:1em;cursor:pointer;padding:8px 10px;border-radius:6px;border:1px solid var(--confetti-border-color);transition:background 200ms ease-out}:is(.confetti .cf-choice):hover{background:var(--confetti-hover-background-color)}:is(.confetti .cf-choice) .cf-choice-label{gap:8px;display:inline-flex;align-items:center}:is(.confetti .cf-choice) .cf-choice-description{font-size:0.875em;margin-left:26px;color:var(--confetti-text-subtle-color)}.confetti .cf-response-choices-tag{flex-direction:row;flex-wrap:wrap;gap:8px}.confetti .cf-tag-input{display:none}[data-visible='true']:is(.confetti .cf-tag-input){display:inline}.confetti .cf-tag{border-radius:8px;padding:6px 12px;font-weight:500;font-size:0.875em;transition:background 200ms ease-out, border-color 200ms ease-out}[data-selected='true']:is(.confetti .cf-tag){background:var(--confetti-indicator-active-bg-color);border-color:var(--confetti-indicator-active-bg-color);color:var(--confetti-indicator-active-dot-color)}[data-focus-visible='true']:is(.confetti .cf-tag){outline:2px solid var(--confetti-outline-color);outline-offset:2px}:is(.confetti .cf-tag):active{scale:0.96}.confetti .cf-radio,.confetti .cf-checkbox{cursor:pointer;display:flex;flex-direction:column;position:relative;align-items:start;color:var(--confetti-text-primary-color);forced-color-adjust:none}.confetti .cf-checkbox{--checkmark-color: var(--confetti-indicator-active-dot-color);}:is(.confetti .cf-checkbox) .cf-checkbox-indicator{background:white;border:1px solid var(--confetti-border-color);width:18px;height:18px;box-sizing:border-box;border-radius:4px;transition:color 200ms ease-out;display:flex;align-items:center;justify-content:center;flex-shrink:0}:is(.confetti .cf-checkbox) svg{width:calc(100% - 8px);height:calc(100% - 8px);fill:none;stroke:var(--checkmark-color);stroke-width:3px;stroke-dasharray:22px;stroke-dashoffset:66;stroke-linecap:round;stroke-linejoin:round;transition:all 200ms}[data-focus-visible='true']:is(.confetti .cf-checkbox) .cf-checkbox-indicator{outline:2px solid var(--confetti-outline-color);outline-offset:2px}:is([data-selected]:is(.confetti .cf-checkbox),[data-indeterminate]:is(.confetti .cf-checkbox)) .cf-checkbox-indicator{background:var(--confetti-indicator-active-bg-color);border:none}:is([data-selected]:is(.confetti .cf-checkbox),[data-indeterminate]:is(.confetti .cf-checkbox)) svg{stroke-dashoffset:44}[data-indeterminate]:is(.confetti .cf-checkbox) svg{stroke:none;fill:var(--checkmark-color)}.confetti .cf-radio{-webkit-tap-highlight-color:transparent;--dot-color: var(--confetti-indicator-active-dot-color);}:is(.confetti .cf-radio) .cf-radio-indicator{position:relative;width:18px;height:18px;flex-shrink:0;box-sizing:border-box;border-radius:50%;transition:color 200ms ease-out;border:1px solid var(--confetti-border-color);background:white}:is(:is(.confetti .cf-radio) .cf-radio-indicator)::after{content:'';position:absolute;inset:1px;border-radius:inherit;background:transparent;transition:scale 200ms;scale:0}[data-selected]:is(.confetti .cf-radio) .cf-radio-indicator{background:var(--confetti-indicator-active-bg-color);border-color:var(--confetti-indicator-active-bg-color)}:is([data-selected]:is(.confetti .cf-radio) .cf-radio-indicator)::after{background:var(--dot-color);scale:0.4}[data-disabled]:is(.confetti .cf-radio){color:var(--text-color-disabled);--dot-color: var(--text-color-disabled);}[data-focus-visible='true']:is(.confetti .cf-radio) .cf-radio-indicator{outline:2px solid var(--confetti-outline-color);outline-offset:2px}.confetti .cf-input,.confetti .cf-textarea{background:var(--confetti-input-background);border:1px solid var(--confetti-border-color);border-radius:8px;color:var(--confetti-input-text-color);padding:10px;transition:border-color 0.2s ease-out, box-shadow 0.2s ease-out, transform 0.15s ease-out}:is(.confetti .cf-input,.confetti .cf-textarea):focus{border-color:var(--confetti-outline-color);box-shadow:var(--confetti-focus-shadow);outline:none}.confetti .cf-question{display:flex;flex-direction:column;gap:16px}:is(.confetti .cf-question) .cf-error{display:none}:is(.confetti .cf-question) .cf-header{display:flex;flex-direction:column;gap:2px}:is(:is(.confetti .cf-question) .cf-header) .cf-title{line-height:24px;font-weight:500}:is(:is(.confetti .cf-question) .cf-header) .cf-label-optional{font-weight:400;color:var(--confetti-text-subtle-color)}:is(:is(.confetti .cf-question) .cf-header) .cf-description{font-size:0.875em;line-height:20px;font-weight:400;color:var(--confetti-text-subtle-color)}:is(.confetti .cf-question) .cf-others-choice{display:flex;flex-direction:column;gap:8px}.confetti .cf-rating-section{display:flex;flex-direction:column;gap:4px}.confetti .cf-rating-emoji{opacity:0.5}.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji{display:grid;grid-template-columns:repeat(auto-fit, 40px);justify-content:space-between;gap:8px}:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-emoji,:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-star{font-size:1em;background-color:transparent;border:none;padding:0;transition:transform 0.15s ease-out;color:var(--confetti-rating-active-bg-color)}[data-focus-visible='true']:is(:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-emoji,:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-star){outline:2px solid var(--confetti-outline-color);outline-offset:2px}:is(:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-emoji,:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-star):hover{cursor:pointer;transform:scale(1.15);opacity:1!important}[data-filled='true']:is(:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-emoji,:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-star){opacity:1}[data-selected='true']:is(:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-emoji,:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-star){opacity:1}:is(:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-emoji,:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-star) svg{transition:fill 0.15s ease-out}.confetti .cf-rating-text{display:flex;justify-content:space-between;font-size:0.75em;color:var(--confetti-text-subtle-color);font-weight:500;line-height:1}:is(.confetti .cf-rating-text) .cf-rating-text-lower{flex:1;text-align:start}:is(.confetti .cf-rating-text) .cf-rating-text-upper{flex:1;text-align:end}:is(.confetti .cf-rating-display-star) .cf-rating-star[data-selected='true'] ~ .cf-rating-star{opacity:0.5}.confetti .cf-rating-display-number{display:grid;grid-auto-columns:1fr;grid-auto-flow:column;border:1px solid var(--confetti-border-color);border-radius:8px;overflow:hidden}:is(.confetti .cf-rating-display-number) .cf-rating-number{border-right:1px solid var(--confetti-border-color);text-align:center;cursor:pointer;color:var(--confetti-rating-text-color);border-left:none;border-top:none;border-bottom:none;font-weight:700;padding:8px 0;margin-top:-1px;margin-bottom:-1px}:is(:is(.confetti .cf-rating-display-number) .cf-rating-number):first-of-type{border-top-left-radius:8px;border-bottom-left-radius:8px}:is(:is(.confetti .cf-rating-display-number) .cf-rating-number):last-of-type{border-top-right-radius:8px;border-bottom-right-radius:8px;border-right:0}[data-focus-visible='true']:is(:is(.confetti .cf-rating-display-number) .cf-rating-number){box-shadow:inset 0 0 0 1px var(--confetti-outline-color)}[data-selected='true']:is(:is(.confetti .cf-rating-display-number) .cf-rating-number){background:var(--confetti-rating-active-bg-color);color:var(--confetti-rating-active-text-color)}
|
|
2
|
+
0 4px 6px -4px rgba(16, 24, 40, 0.1), 0 10px 15px -3px rgba(0, 0, 0, 0.1);--confetti-focus-shadow: 0 0 0 2px rgba(9, 9, 11, 0.3);--confetti-submit-button-color: #18181b;--confetti-submit-button-text-color: #fafafa;--confetti-rating-bg-color: white;--confetti-rating-text-color: #09090b;--confetti-rating-active-bg-color: #09090b;--confetti-rating-active-text-color: white;--confetti-indicator-active-bg-color: var(--confetti-rating-text-color);--confetti-indicator-active-dot-color: white;--confetti-bug-report-button-color: #18181b;--confetti-bug-report-record-button-color: #ff2c2c;--confetti-bug-report-record-button-active-color: #dc2626;--confetti-bug-report-button-text-color: white;--confetti-bug-report-overlay-color: rgba(9, 9, 11, 0.4);--confetti-text-primary-color: #09090b;--confetti-text-subtle-color: #71717a;--confetti-widget-color: #e0a045;--confetti-widget-text-color: white;--confetti-scrollbar-thumb-color: var(--confetti-border-color);--confetti-scrollbar-track-color: var(--confetti-background-color);--confetti-outline-color: rgba(9, 9, 11, 0.8);--confetti-input-background: white;--confetti-input-text-color: #020617;--confetti-disabled-button-opacity: 0.6;}@keyframes confetti-record-pulse{0%, 100%{background-color:var(--pulse-color-start)}50%{background-color:color-mix( in srgb, var(--pulse-color-start), rgb(70, 70, 70) 20% )}}@keyframes confetti-spinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.confetti-dialog{width:var(--confetti-max-width);max-height:95dvh;overflow:auto;max-width:100%;background:transparent;position:relative;box-shadow:var(--confetti-box-shadow);border:1px solid var(--confetti-border-color);border-radius:var(--confetti-border-radius);background:var(--confetti-background-color);padding:var(--confetti-box-padding)}.confetti-dialog .confetti-dialog-close{position:absolute;top:8px;right:8px;background:transparent;border:none;cursor:pointer;padding:8px;border-radius:8px;transition:background 200ms}:is(.confetti-dialog .confetti-dialog-close) svg{width:16px;height:16px;color:var(--confetti-text-subtle-color)}:is(.confetti-dialog .confetti-dialog-close):hover{background:rgba(0, 0, 0, 0.05)}:is(.confetti-dialog .confetti-dialog-close):focus-visible{outline:2px solid var(--confetti-outline-color);outline-offset:2px}:is(.confetti-dialog .cf-header) .cf-title{padding-right:20px}.confetti-modal-overlay{position:fixed;inset:0;z-index:var(--confetti-z-index);background:rgba(0, 0, 0, 0.4);display:flex;justify-content:center;overflow-y:auto;overscroll-behavior:none;padding:10vh 0}.confetti-modal{margin:auto}.confetti-modal .confetti-modal-dialog{width:var(--confetti-max-width);max-width:100%;position:relative;box-shadow:var(--confetti-box-shadow);border:1px solid var(--confetti-border-color);border-radius:var(--confetti-border-radius);background:var(--confetti-background-color);padding:var(--confetti-box-padding)}:is(.confetti-modal .confetti-modal-dialog):focus-visible{outline:none}:is(.confetti-modal .confetti-modal-dialog) .confetti-modal-dialog-close{position:absolute;top:8px;right:8px;background:transparent;border:none;cursor:pointer;padding:8px;border-radius:8px;transition:background 200ms}:is(:is(.confetti-modal .confetti-modal-dialog) .confetti-modal-dialog-close) svg{width:16px;height:16px;color:var(--confetti-text-subtle-color)}:is(:is(.confetti-modal .confetti-modal-dialog) .confetti-modal-dialog-close):hover{background:rgba(0, 0, 0, 0.05)}:is(:is(.confetti-modal .confetti-modal-dialog) .confetti-modal-dialog-close):focus-visible{outline:2px solid var(--confetti-outline-color);outline-offset:2px}:is(:is(.confetti-modal .confetti-modal-dialog) .cf-header) .cf-title{padding-right:20px}.confetti{font-family:var(--confetti-font-family);display:flex;flex-direction:column;gap:16px;color:var(--confetti-text-primary-color);font-size:var(--confetti-font-scale);width:100%}.confetti .cf-submit-button{align-self:end;color:var(--confetti-submit-button-text-color);background:var(--confetti-submit-button-color);padding:8px 16px;border-radius:8px;cursor:pointer;transition:transform 200ms;font-size:0.875em;font-weight:500;line-height:20px;transition:background 200ms ease-out}:is(.confetti .cf-submit-button):focus-visible{outline:2px solid var(--confetti-outline-color);outline-offset:2px}[data-disabled]:is(.confetti .cf-submit-button){opacity:var(--confetti-disabled-button-opacity);cursor:not-allowed;transform:none}:is(.confetti .cf-submit-button):hover{background:color-mix( in srgb, white 10%, var(--confetti-submit-button-color) )}:is(.confetti .cf-submit-button):active{background:color-mix( in srgb, white 5%, var(--confetti-submit-button-color) )}.confetti .sr-only{clip:rect(0, 0, 0, 0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.confetti .cf-response-choices{display:flex;flex-direction:column;gap:12px}.confetti .cf-choice{font-size:1em;cursor:pointer;padding:8px 10px;border-radius:6px;border:1px solid var(--confetti-border-color);transition:background 200ms ease-out}:is(.confetti .cf-choice):hover{background:var(--confetti-hover-background-color)}:is(.confetti .cf-choice) .cf-choice-label{gap:8px;display:inline-flex;align-items:center}:is(.confetti .cf-choice) .cf-choice-description{font-size:0.875em;margin-left:26px;color:var(--confetti-text-subtle-color)}.confetti .cf-response-choices-tag{flex-direction:row;flex-wrap:wrap;gap:8px}.confetti .cf-tag-input{display:none}[data-visible='true']:is(.confetti .cf-tag-input){display:inline}.confetti .cf-tag{border-radius:8px;padding:6px 12px;font-weight:500;font-size:0.875em;transition:background 200ms ease-out, border-color 200ms ease-out}[data-selected='true']:is(.confetti .cf-tag){background:var(--confetti-indicator-active-bg-color);border-color:var(--confetti-indicator-active-bg-color);color:var(--confetti-indicator-active-dot-color)}[data-focus-visible='true']:is(.confetti .cf-tag){outline:2px solid var(--confetti-outline-color);outline-offset:2px}:is(.confetti .cf-tag):active{scale:0.96}.confetti .cf-radio,.confetti .cf-checkbox{cursor:pointer;display:flex;flex-direction:column;position:relative;align-items:start;color:var(--confetti-text-primary-color);forced-color-adjust:none}.confetti .cf-checkbox{--checkmark-color: var(--confetti-indicator-active-dot-color);}:is(.confetti .cf-checkbox) .cf-checkbox-indicator{background:white;border:1px solid var(--confetti-border-color);width:18px;height:18px;box-sizing:border-box;border-radius:4px;transition:color 200ms ease-out;display:flex;align-items:center;justify-content:center;flex-shrink:0}:is(.confetti .cf-checkbox) svg{width:calc(100% - 8px);height:calc(100% - 8px);fill:none;stroke:var(--checkmark-color);stroke-width:3px;stroke-dasharray:22px;stroke-dashoffset:66;stroke-linecap:round;stroke-linejoin:round;transition:all 200ms}[data-focus-visible='true']:is(.confetti .cf-checkbox) .cf-checkbox-indicator{outline:2px solid var(--confetti-outline-color);outline-offset:2px}:is([data-selected]:is(.confetti .cf-checkbox),[data-indeterminate]:is(.confetti .cf-checkbox)) .cf-checkbox-indicator{background:var(--confetti-indicator-active-bg-color);border:none}:is([data-selected]:is(.confetti .cf-checkbox),[data-indeterminate]:is(.confetti .cf-checkbox)) svg{stroke-dashoffset:44}[data-indeterminate]:is(.confetti .cf-checkbox) svg{stroke:none;fill:var(--checkmark-color)}.confetti .cf-radio{-webkit-tap-highlight-color:transparent;--dot-color: var(--confetti-indicator-active-dot-color);}:is(.confetti .cf-radio) .cf-radio-indicator{position:relative;width:18px;height:18px;flex-shrink:0;box-sizing:border-box;border-radius:50%;transition:color 200ms ease-out;border:1px solid var(--confetti-border-color);background:white}:is(:is(.confetti .cf-radio) .cf-radio-indicator)::after{content:'';position:absolute;inset:1px;border-radius:inherit;background:transparent;transition:scale 200ms;scale:0}[data-selected]:is(.confetti .cf-radio) .cf-radio-indicator{background:var(--confetti-indicator-active-bg-color);border-color:var(--confetti-indicator-active-bg-color)}:is([data-selected]:is(.confetti .cf-radio) .cf-radio-indicator)::after{background:var(--dot-color);scale:0.4}[data-disabled]:is(.confetti .cf-radio){color:var(--text-color-disabled);--dot-color: var(--text-color-disabled);}[data-focus-visible='true']:is(.confetti .cf-radio) .cf-radio-indicator{outline:2px solid var(--confetti-outline-color);outline-offset:2px}.confetti .cf-input,.confetti .cf-textarea{background:var(--confetti-input-background);border:1px solid var(--confetti-border-color);border-radius:8px;color:var(--confetti-input-text-color);padding:10px;transition:border-color 0.2s ease-out, box-shadow 0.2s ease-out, transform 0.15s ease-out}:is(.confetti .cf-input,.confetti .cf-textarea):focus{border-color:var(--confetti-outline-color);box-shadow:var(--confetti-focus-shadow);outline:none}.confetti .cf-question{display:flex;flex-direction:column;gap:16px}:is(.confetti .cf-question) .cf-error{display:none}:is(.confetti .cf-question) .cf-header{display:flex;flex-direction:column;gap:2px}:is(.confetti .cf-question) .cf-title{line-height:24px;font-weight:500}:is(.confetti .cf-question) .cf-label-optional{font-weight:400;color:var(--confetti-text-subtle-color)}:is(.confetti .cf-question) .cf-description{font-size:0.875em;line-height:20px;font-weight:400;color:var(--confetti-text-subtle-color)}:is(.confetti .cf-question) .cf-others-choice{display:flex;flex-direction:column;gap:8px}.confetti .cf-bug-report{display:flex;flex-direction:column;gap:16px}:is(.confetti .cf-bug-report) .cf-bug-report-screenshot-section,:is(.confetti .cf-bug-report) .cf-bug-report-recording-section{display:flex;flex-direction:column;gap:8px}:is(.confetti .cf-bug-report) .cf-bug-report-actions{display:flex;flex-direction:column;gap:12px}:is(.confetti .cf-bug-report) .cf-bug-report-button-action{padding:8px 8px}:is(.confetti .cf-bug-report) .cf-bug-report-media-preview{position:relative;width:100%;aspect-ratio:16 / 9;border:1px solid var(--confetti-border-color);border-radius:8px;overflow:hidden;display:flex;align-items:center;justify-content:center}:is(:is(.confetti .cf-bug-report) .cf-bug-report-media-preview) .cf-bug-report-player-loading{width:1.5em;height:1.5em;border:2px solid var(--confetti-submit-button-color);border-bottom-color:transparent;border-radius:50%;display:inline-block;box-sizing:border-box;animation:confetti-spinner 1s linear infinite}:is(:is(.confetti .cf-bug-report) .cf-bug-report-media-preview) .cf-bug-report-player-container{height:100%;width:100%;position:relative}:is(:is(:is(.confetti .cf-bug-report) .cf-bug-report-media-preview) .cf-bug-report-player-container) .cf-bug-report-player{height:100%;width:auto;overflow:hidden}:is(:is(:is(.confetti .cf-bug-report) .cf-bug-report-media-preview) .cf-bug-report-player-container) .cf-bug-report-progress-bar{position:absolute;bottom:0;left:0;height:2px;background:var(--confetti-text-primary-color);opacity:50%;transition-property:width;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;width:0%}:is(:is(:is(.confetti .cf-bug-report) .cf-bug-report-media-preview) .cf-bug-report-player-container) .cf-bug-report-time{position:absolute;right:4px;bottom:4px;font-size:0.75em;color:color-mix( in oklab, var(--confetti-text-primary-color) 50%, transparent )}:is(:is(.confetti .cf-bug-report) .cf-bug-report-media-preview) .cf-bug-report-media-actions{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:var(--confetti-bug-report-overlay-color);opacity:0;transition:opacity 200ms ease-out}:is(:is(:is(.confetti .cf-bug-report) .cf-bug-report-media-preview) .cf-bug-report-media-actions):hover{opacity:1}:is(:is(.confetti .cf-bug-report) .cf-bug-report-media-preview) .cf-bug-report-screenshot-img{width:100%;height:100%;object-fit:cover}.confetti .cf-bug-report-button{color:var(--confetti-bug-report-button-text-color);background:var(--confetti-bug-report-button-color);padding:8px 16px;border-radius:8px;cursor:pointer;transition:transform 200ms;font-size:0.875em;font-weight:500;line-height:20px;transition:background 200ms ease-out}:is(.confetti .cf-bug-report-button):focus-visible{outline:2px solid var(--confetti-outline-color);outline-offset:2px}[data-disabled]:is(.confetti .cf-bug-report-button){opacity:var(--confetti-disabled-button-opacity);cursor:not-allowed;transform:none}:is(.confetti .cf-bug-report-button):hover{background:color-mix( in srgb, white 10%, var(--confetti-submit-button-color) )}:is(.confetti .cf-bug-report-button):active{background:color-mix( in srgb, white 5%, var(--confetti-submit-button-color) )}.cf-bug-report-record-button:is(.confetti .cf-bug-report-button){display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 8px;--pulse-color-start: var(--confetti-bug-report-record-button-color);background-color:var(--pulse-color-start);animation:confetti-record-pulse 2s ease-in-out infinite}.cf-bug-report-record-button:is(.confetti .cf-bug-report-button):hover{--pulse-color-start: var(
|
|
3
|
+
--confetti-bug-report-record-button-active-color
|
|
4
|
+
);}.confetti .cf-rating-section{display:flex;flex-direction:column;gap:4px}.confetti .cf-rating-emoji{opacity:0.5}.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji{display:grid;grid-template-columns:repeat(auto-fit, 40px);justify-content:space-between;gap:8px}:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-emoji,:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-star{font-size:1em;background-color:transparent;border:none;padding:0;transition:transform 0.15s ease-out;color:var(--confetti-rating-active-bg-color)}[data-focus-visible='true']:is(:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-emoji,:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-star){outline:2px solid var(--confetti-outline-color);outline-offset:2px}:is(:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-emoji,:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-star):hover{cursor:pointer;transform:scale(1.15);opacity:1!important}[data-filled='true']:is(:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-emoji,:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-star){opacity:1}[data-selected='true']:is(:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-emoji,:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-star){opacity:1}:is(:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-emoji,:is(.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji) .cf-rating-star) svg{transition:fill 0.15s ease-out}.confetti .cf-rating-text{display:flex;justify-content:space-between;font-size:0.75em;color:var(--confetti-text-subtle-color);font-weight:500;line-height:1}:is(.confetti .cf-rating-text) .cf-rating-text-lower{flex:1;text-align:start}:is(.confetti .cf-rating-text) .cf-rating-text-upper{flex:1;text-align:end}:is(.confetti .cf-rating-display-star) .cf-rating-star[data-selected='true'] ~ .cf-rating-star{opacity:0.5}.confetti .cf-rating-display-number{display:grid;grid-auto-columns:1fr;grid-auto-flow:column;border:1px solid var(--confetti-border-color);border-radius:8px;overflow:hidden}:is(.confetti .cf-rating-display-number) .cf-rating-number{border-right:1px solid var(--confetti-border-color);text-align:center;cursor:pointer;color:var(--confetti-rating-text-color);border-left:none;border-top:none;border-bottom:none;font-weight:700;padding:8px 0;margin-top:-1px;margin-bottom:-1px}:is(:is(.confetti .cf-rating-display-number) .cf-rating-number):first-of-type{border-top-left-radius:8px;border-bottom-left-radius:8px}:is(:is(.confetti .cf-rating-display-number) .cf-rating-number):last-of-type{border-top-right-radius:8px;border-bottom-right-radius:8px;border-right:0}[data-focus-visible='true']:is(:is(.confetti .cf-rating-display-number) .cf-rating-number){box-shadow:inset 0 0 0 1px var(--confetti-outline-color)}[data-selected='true']:is(:is(.confetti .cf-rating-display-number) .cf-rating-number){background:var(--confetti-rating-active-bg-color);color:var(--confetti-rating-active-text-color)}
|