@checksum-ai/runtime 1.0.68 → 1.0.70
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/checksumlib.js +3 -3
- package/package.json +3 -2
- package/test-run-monitor.js +14 -14
- package/.DS_Store +0 -0
package/checksumlib.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! For license information please see main.
|
|
2
|
-
!function(){var e={603:function(e,t,n){"use strict";n.d(t,{v:function(){return i}});var r={queryParams:void 0},i=function(){return r.queryParams||(r.queryParams=Object.fromEntries(new URLSearchParams(window.location.search).entries())),r.queryParams}},8901:function(e,t,n){"use strict";n.d(t,{M:function(){return o}});var r=n(5671),i=n(3144),o=new(function(){function e(){(0,r.Z)(this,e),this.weightsSum=0,this.config={attributes:{qualification:{globalUniquenessThreshold:.99,tagUniquenessThreshold:.99},decisionWeight:this.makeWeight(.4)},classes:{qualification:{globalUniquenessThreshold:.99,tagUniquenessThreshold:.99},decisionWeight:this.makeWeight(.4)},tagName:{decisionWeight:this.makeWeight(.6)},style:{inlineWeight:.6,computedWeight:.4,decisionWeight:this.makeWeight(.4)},innerText:{decisionWeight:this.makeWeight(.6),qualification:{exactMatchMax:20,containsMatchMax:10,maxLength:256,minLength:1},ignoreSimilarityScoreBelow:.6},innerFeatures:{decisionWeight:this.makeWeight(.8)},visualVicinity:{decisionWeight:this.makeWeight(.2)},structuralVicinity:{decisionWeight:this.makeWeight(.2)}}}return(0,i.Z)(e,[{key:"makeWeight",value:function(e){return this.weightsSum+=e,e}},{key:"get",value:function(){return this.config}},{key:"weight",value:function(e){return e/this.weightsSum}}]),e}())},3536:function(e,t,n){"use strict";n.d(t,{k:function(){return c}});var r=n(2982),i=n(5671),o=n(3144),a=n(573),s=n(199),u=n(8901),c=function(){function e(t){var n=this;(0,i.Z)(this,e),this.targetElementESRAMetadata=void 0,this.qualifiedAttributes=[],this.qualifiedAttributesMap={},this.qualifiedClasses=[],this.unqualifiedClasses=[],this.qualifiedInnerText=void 0,this.visualVicinityComparable=[],this.structuralVicinityComparable=[],this.innerFeaturesComparable=[],this.rank=function(e){if(n.isDealBreaker(e))return{score:0,scores:{}};var t=n.tagSimilarity(e),r=n.attributesSimilarity(e),i=n.classSimilarity(e),o=n.styleSimilarity(e),a=n.innerTextSimilarity(e),s=n.innerFeaturesSimilarity(e),c=n.visualVicinitySimilarity(e),l=n.structuralVicinitySimilarity(e),d={tagScore:t,attributesScore:r,classesScore:i,styleScore:o,innerTextScore:a,innerFeaturesScore:s,visualVicinityScore:c,structuralVicinityScore:l,svgsScore:n.svgsSimilarity(e)},f={tagScore:u.M.weight(u.M.get().tagName.decisionWeight)*t,attributesScore:u.M.weight(u.M.get().attributes.decisionWeight)*r,classesScore:u.M.weight(u.M.get().classes.decisionWeight)*i,innerTextScore:u.M.weight(u.M.get().innerText.decisionWeight)*a,innerFeaturesScore:u.M.weight(u.M.get().innerFeatures.decisionWeight)*s,styleScore:u.M.weight(u.M.get().style.decisionWeight)*o,visualVicinityScore:u.M.weight(u.M.get().visualVicinity.decisionWeight)*c,structuralVicinityScore:u.M.weight(u.M.get().structuralVicinity.decisionWeight)*l};return{score:Object.values(f).reduce((function(e,t){return e+t}),0),scores:d}},this.targetElementESRAMetadata=t,this.setQualifiedAttributes(),this.setQualifiedClasses(),this.setQualifiedInnerText(),this.setVisualVicinityComparable(),this.setStructuralVicinityComparable(),this.setInnerFeaturesComparable()}return(0,o.Z)(e,[{key:"getQualifiedAttributes",value:function(){return this.qualifiedAttributes}},{key:"getQualifiedClasses",value:function(){return this.qualifiedClasses}},{key:"getQualifiedInnerText",value:function(){return this.qualifiedInnerText}},{key:"setQualifiedAttributes",value:function(){var e=this.targetElementESRAMetadata.attributes,t=this.makeQualifiedAttributes(e),n=t.qualifiedAttributes,r=t.qualifiedAttributesMap;this.qualifiedAttributes=n,this.qualifiedAttributesMap=r}},{key:"makeQualifiedAttributes",value:function(e,t){var n=Object.keys(e).filter((function(n){if("input"===t)if("value"===n)return!1;var r=e[n];for(var i in r)i.endsWith("Uniqenuess")&&(r[i.replace("Uniqenuess","Uniqueness")]=r[i]);return r.globalUniqueness>u.M.get().attributes.qualification.globalUniquenessThreshold||r.tagUniqueness>u.M.get().attributes.qualification.tagUniquenessThreshold})),r=n.reduce((function(t,n){return t[n]=e[n].value,t}),{});return{qualifiedAttributes:n,qualifiedAttributesMap:r}}},{key:"setQualifiedClasses",value:function(){var e=this;this.qualifiedClasses=this.makeQualifiedClasses(this.targetElementESRAMetadata.classes),this.unqualifiedClasses=Object.keys(this.targetElementESRAMetadata.classes).filter((function(t){return!e.qualifiedClasses.includes(t)}))}},{key:"isValidClass",value:function(e){return/^[A-Za-z_-][0-9A-Za-z_-]*$/.test(e)}},{key:"makeQualifiedClasses",value:function(e){var t=this;return Object.keys(e).filter((function(n){var r=e[n];return!!t.isValidClass(n)&&(!n.startsWith("jss")&&!n.startsWith("css-")&&":hover"!==n&&(r.globalUniqueness>u.M.get().classes.qualification.globalUniquenessThreshold||r.tagUniqueness>u.M.get().classes.qualification.tagUniquenessThreshold))}))}},{key:"setQualifiedInnerText",value:function(){this.qualifiedInnerText=this.makeQualifiedInnerText(this.targetElementESRAMetadata.innerText)}},{key:"makeQualifiedInnerText",value:function(e){return e&&(e.containsMatches<=u.M.get().innerText.qualification.containsMatchMax||e.exactMatches<=u.M.get().innerText.qualification.exactMatchMax)&&e.content.length<=u.M.get().innerText.qualification.maxLength&&e.content.length>=u.M.get().innerText.qualification.minLength?e:null}},{key:"makeBasicElementPropertiesComparable",value:function(e){var t=this;return e.reduce((function(e,n){var i=n.position?"".concat(n.tag,".").concat(n.position.slice(0,2).join(",")):n.tag,o="".concat(i,"+").concat(n.relativePosition),a=t.makeQualifiedClasses(n.classes).map((function(e){return"".concat(i,".").concat(e)})),u=[];t.makeQualifiedAttributes(n.attributes).qualifiedAttributes.forEach((function(e){u.push("".concat(i,"[").concat(e,"]")),u.push("".concat(i,"[").concat(e,"]=").concat(n.attributes[e].value))}));var c=n.feature?t.makeInnerFeaturesComparable([n.feature],{customTag:i,includeTag:!1,featureTypeWhiteList:[s.EI.SVG]}):[],l=[].concat((0,r.Z)(e),[i,o],(0,r.Z)(a),u,(0,r.Z)(c));return n.text&&(l.push("".concat(i,"<>")),l.push("".concat(i,"<").concat(n.text,">"))),n.distance&&(l.push("".concat(i,"->").concat(n.distance)),l.push("".concat(i,"->[]").concat(t.getDistanceRange(n.distance)))),l}),[])}},{key:"getDistanceRange",value:function(e){for(var t=[10,20,30,40,50,60,70,80,90,100],n=0,r=t;n<r.length;n++){var i=r[n];if(e<i)return i}return t[t.length-1]}},{key:"setVisualVicinityComparable",value:function(){this.visualVicinityComparable=this.makeVisualVicinityComparable(this.targetElementESRAMetadata.visualVicinity)}},{key:"makeVisualVicinityComparable",value:function(e){return this.makeBasicElementPropertiesComparable(e)}},{key:"setStructuralVicinityComparable",value:function(){this.structuralVicinityComparable=this.makeStructuralVicinityComparable(this.targetElementESRAMetadata.structuralVicinity)}},{key:"makeStructuralVicinityComparable",value:function(e){return this.makeBasicElementPropertiesComparable(e)}},{key:"makeInnerFeaturesComparable",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.customTag,i=void 0===n?void 0:n,o=t.includeTag,a=void 0===o||o,u=t.featureTypeWhiteList,c=void 0===u?void 0:u;return e.reduce((function(e,t){if(c&&!c.includes(t.type)||t.isHidden)return e;var n=null!==i&&void 0!==i?i:t.tag,o=a?[].concat((0,r.Z)(e),[n]):e;switch(t.type){case s.EI.Button:o.push("".concat(n,"[type=").concat(t.buttonType,"]"));break;case s.EI.Input:t.inputType&&o.push("".concat(n,"[type=").concat(t.inputType,"]")),t.placeholder&&o.push("".concat(n,"[placeholder=").concat(t.placeholder,"]"));break;case s.EI.SVG:t.components.forEach((function(e){var t=[];for(var r in e.attributes)t.push("[".concat(r,"=").concat(e.attributes[r],"]"));o.push("".concat(n).concat(t.join("")))}))}return"text"in t&&t.text&&(o.push("".concat(n,"<>")),o.push("".concat(n,"<").concat(t.text,">"))),o}),[])}},{key:"setInnerFeaturesComparable",value:function(){this.innerFeaturesComparable=this.makeInnerFeaturesComparable(this.targetElementESRAMetadata.innerFeatures)}},{key:"isDealBreaker",value:function(e){if("input"===this.targetElementESRAMetadata.tag&&"input"===e.tag){var t=function(e){return e.type?e.type.value:"text"};if(t(this.targetElementESRAMetadata.attributes)!==t(e.attributes))return!0}return!1}},{key:"tagSimilarity",value:function(e){return e.tag===this.targetElementESRAMetadata.tag?1:0}},{key:"attributesSimilarity",value:function(e){var t=this,n=function(e){return[].concat((0,r.Z)(t.keyValueObjectToArray(e)),(0,r.Z)(Object.keys(e)))},i=this.makeQualifiedAttributes(e.attributes).qualifiedAttributesMap;return this.jaccard(n(this.qualifiedAttributesMap),n(i))}},{key:"indicativeAttributesSimilarity",value:function(e){return this.qualifiedAttributesMap.placehoder&&e.attributes.placehoder&&this.qualifiedAttributesMap.placehoder===e.attributes.placehoder.value?1:0}},{key:"classSimilarity",value:function(e){return this.jaccard(this.qualifiedClasses,this.makeQualifiedClasses(e.classes))}},{key:"innerTextSimilarity",value:function(e){if(!this.targetElementESRAMetadata.innerText&&!e.innerText)return 1;var t=this.makeQualifiedInnerText(e.innerText);return this.qualifiedInnerText&&t&&this.qualifiedInnerText.content===t.content?1:0}},{key:"innerFeaturesSimilarity",value:function(e){return this.jaccard(this.innerFeaturesComparable,this.makeInnerFeaturesComparable(e.innerFeatures))}},{key:"visualVicinitySimilarity",value:function(e){return this.jaccard(this.visualVicinityComparable,this.makeVisualVicinityComparable(e.visualVicinity))}},{key:"structuralVicinitySimilarity",value:function(e){return this.jaccard(this.structuralVicinityComparable,this.makeStructuralVicinityComparable(e.structuralVicinity))}},{key:"styleSimilarity",value:function(e){var t,n,i,o,a=this,s=function(e){return[].concat((0,r.Z)(a.keyValueObjectToArray(e)),(0,r.Z)(Object.keys(e)))},c=this.jaccard(s(null!==(t=this.targetElementESRAMetadata.style.inline)&&void 0!==t?t:{}),s(null!==(n=e.style.inline)&&void 0!==n?n:{})),l=this.jaccard(s(null!==(i=this.targetElementESRAMetadata.style.computed)&&void 0!==i?i:{}),s(null!==(o=e.style.computed)&&void 0!==o?o:{}));return c*u.M.get().style.inlineWeight+l*u.M.get().style.computedWeight}},{key:"svgsSimilarity",value:function(e){return this.targetElementESRAMetadata.svgs||e.svgs?this.targetElementESRAMetadata.svgs&&e.svgs&&JSON.stringify(this.targetElementESRAMetadata.svgs)===JSON.stringify(e.svgs)?1:0:1}},{key:"keyValueObjectToArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"=",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return Object.keys(e).map((function(r){return"".concat(r).concat(t).concat(function(t){return n?n(e,t):e[t]}(r))}))}},{key:"jaccard",value:function(e,t){return Array.isArray(e)&&Array.isArray(t)&&!e.length&&!t.length?1:(0,a.$m)(e,t)}}]),e}()},199:function(e,t,n){"use strict";var r,i,o;n.d(t,{BM:function(){return o},EI:function(){return r},i7:function(){return i}}),function(e){e[e.Media=0]="Media",e[e.NoData=1]="NoData",e[e.Anchor=2]="Anchor",e[e.Button=3]="Button",e[e.Input=4]="Input",e[e.Text=5]="Text",e[e.SVG=6]="SVG"}(r||(r={})),function(e){e.Element="element",e.Parent="parent",e.Child="child",e.LeftSibling="left-sibling",e.RightSibling="right-sibling"}(i||(i={})),function(e){e.Center="center",e.Top="top",e.Bottom="bottom",e.Left="left",e.Right="right",e.TopRight="top-right",e.TopLeft="top-left",e.BottomRight="bottom-right",e.BottomLeft="bottom-left"}(o||(o={}))},6842:function(e,t,n){"use strict";var r,i;n.d(t,{$:function(){return r}}),function(e){e.Click="click",e.Input="input",e.ClickAndType="click_and_type",e.ClearAndType="clear_and_type",e.Check="check",e.UnCheck="uncheck",e.Hover="hover",e.Navigation="navigation",e.Keystroke="keystroke",e.SelectOption="selectoption"}(r||(r={})),function(e){e.UrlChange="url-change",e.NetworkRequest="network-request"}(i||(i={}))},9478:function(e,t,n){"use strict";var r,i;n.d(t,{De:function(){return o},hj:function(){return i},pR:function(){return r}}),function(e){e.Script="script",e.App="app"}(r||(r={})),function(e){e.TodoListApp="todo",e.ReplayerApp="replayer",e.SessionGraphApp="sessiongraph"}(i||(i={}));var o={appType:"script",testAppName:"todo"}},8739:function(e,t,n){"use strict";n.d(t,{E:function(){return o}});var r=n(5671),i=n(3144),o=function(){function e(){(0,r.Z)(this,e)}return(0,i.Z)(e,[{key:"skipEvents",value:function(e){}},{key:"preCastEvent",value:function(e){}},{key:"preEvent",value:function(e){}},{key:"postEvent",value:function(e,t){return t}},{key:"handleMeta",value:function(e,t){}},{key:"handleViewportResize",value:function(e){}},{key:"handleMutation",value:function(e,t){}},{key:"handleInput",value:function(e,t){}},{key:"handleClick",value:function(e,t){}},{key:"handleMouseDown",value:function(e,t){}},{key:"handleMouseUp",value:function(e,t){}},{key:"handleMouseMove",value:function(e,t){}},{key:"handleFocus",value:function(e,t){}}]),e}()},7666:function(e,t,n){"use strict";n.d(t,{u:function(){return c}});var r=n(2982),i=n(4165),o=n(5861),a=n(5671),s=n(3144),u=n(1414),c=function(){function e(t){var n=this,s=t.eventHandlers;(0,a.Z)(this,e),this.handlers=void 0,this.events=[],this.getEvents=function(){return n.events},this.preCastEvent=function(){var e=(0,o.Z)((0,i.Z)().mark((function e(t){return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.handlers.preCastEvent(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.processEvent=function(){var e=(0,o.Z)((0,i.Z)().mark((function e(t){var r,o;return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.events.push(t),n.handlers.preEvent(t),e.next=4,n.handleEvent(t);case 4:return r=e.sent,e.next=7,n.handlers.postEvent(t,r);case 7:return o=e.sent,e.abrupt("return",n.handlers.controlledReturn?n.handlers.getReturnValue():o);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.skipEvents=function(){var e=(0,o.Z)((0,i.Z)().mark((function e(t){var o;return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(o=n.events).push.apply(o,(0,r.Z)(t)),e.abrupt("return",n.handlers.skipEvents(t));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.handlers=s}return(0,s.Z)(e,[{key:"setHandlers",value:function(e){this.handlers=e}},{key:"handleEvent",value:function(){var e=(0,o.Z)((0,i.Z)().mark((function e(t){return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.type,e.next=e.t0===u.tw.Meta?3:e.t0===u.tw.IncrementalSnapshot?4:14;break;case 3:return e.abrupt("return",this.handlers.handleMeta(t.data,t));case 4:e.t1=t.data.source,e.next=e.t1===u.yh.ViewportResize?7:e.t1===u.yh.Mutation?8:e.t1===u.yh.Input?9:e.t1===u.yh.MouseInteraction?10:e.t1===u.yh.MouseMove?11:12;break;case 7:return e.abrupt("return",this.handlers.handleViewportResize(t.data,t));case 8:return e.abrupt("return",this.handlers.handleMutation(t.data,t));case 9:return e.abrupt("return",this.handlers.handleInput(t.data,t));case 10:return e.abrupt("return",this.handleMouseInteraction(t.data,t));case 11:return e.abrupt("return",this.handlers.handleMouseMove(t.data,t));case 12:return e.abrupt("break",13);case 13:case 14:return e.abrupt("break",15);case 15:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleMouseInteraction",value:function(){var e=(0,o.Z)((0,i.Z)().mark((function e(t,n){return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.type,e.next=e.t0===u.Y2.Click?3:e.t0===u.Y2.MouseDown?4:e.t0===u.Y2.MouseUp?5:e.t0===u.Y2.Focus?6:7;break;case 3:return e.abrupt("return",this.handlers.handleClick(t,n));case 4:return e.abrupt("return",this.handlers.handleMouseDown(t,n));case 5:return e.abrupt("return",this.handlers.handleMouseUp(t,n));case 6:return e.abrupt("return",this.handlers.handleFocus(t,n));case 7:return e.abrupt("break",8);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}()},5473:function(e,t,n){"use strict";n.d(t,{L:function(){return fe}});var r=n(7762),i=n(3144),o=n(5671),a=n(5512),s=n(885),u=n(2982),c=n(1737),l=n(1414);function d(e){return"__ln"in e}var f=function(){function e(){(0,o.Z)(this,e),this.length=0,this.head=null}return(0,i.Z)(e,[{key:"get",value:function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null===t||void 0===t?void 0:t.next)||null;return t}},{key:"addNode",value:function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&d(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&d(e.nextSibling)&&e.nextSibling.__ln.previous){var r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++}},{key:"removeNode",value:function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}}]),e}(),h=function(e,t){return"".concat(e,"@").concat(t)},p=function(){function e(){var t=this;(0,o.Z)(this,e),this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(e){e.forEach(t.processMutation),t.emit()},this.emit=function(){if(!t.frozen&&!t.locked){for(var e=[],n=new f,r=function(e){for(var n=e,r=a.zi;r===a.zi;)r=(n=n&&n.nextSibling)&&t.mirror.getId(n);return r},i=function(i){if(i.parentNode&&(0,c._f)(i)){var o=(0,a.Zq)(i.parentNode)?t.mirror.getId((0,c.jB)(i)):t.mirror.getId(i.parentNode),s=r(i);if(-1===o||-1===s)return n.addNode(i);var u=(0,a.eD)(i,{doc:t.doc,mirror:t.mirror,blockClass:t.blockClass,blockSelector:t.blockSelector,maskTextClass:t.maskTextClass,maskTextSelector:t.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:t.inlineStylesheet,maskInputOptions:t.maskInputOptions,maskTextFn:t.maskTextFn,maskInputFn:t.maskInputFn,slimDOMOptions:t.slimDOMOptions,dataURLOptions:t.dataURLOptions,recordCanvas:t.recordCanvas,inlineImages:t.inlineImages,onSerialize:function(e){(0,c.Cj)(e,t.mirror)&&t.iframeManager.addIframe(e),(0,c.qs)(e,t.mirror)&&t.stylesheetManager.trackLinkElement(e),(0,c.He)(i)&&t.shadowDomManager.addShadowRoot(i.shadowRoot,t.doc)},onIframeLoad:function(e,n){t.iframeManager.attachIframe(e,n),t.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:function(e,n){t.stylesheetManager.attachLinkElement(e,n)}});u&&e.push({parentId:o,nextId:s,node:u})}};t.mapRemoves.length;)t.mirror.removeNodeFromMap(t.mapRemoves.shift());for(var o=0,s=Array.from(t.movedSet.values());o<s.length;o++){var u=s[o];m(t.removes,u,t.mirror)&&!t.movedSet.has(u.parentNode)||i(u)}for(var l=0,d=Array.from(t.addedSet.values());l<d.length;l++){var h=d[l];y(t.droppedSet,h)||m(t.removes,h,t.mirror)?y(t.movedSet,h)?i(h):t.droppedSet.add(h):i(h)}for(var p=null;n.length;){var v=null;if(p){var g=t.mirror.getId(p.value.parentNode),b=r(p.value);-1!==g&&-1!==b&&(v=p)}if(!v)for(var w=n.length-1;w>=0;w--){var S=n.get(w);if(S){var I=t.mirror.getId(S.value.parentNode);if(-1===r(S.value))continue;if(-1!==I){v=S;break}var C=S.value;if(C.parentNode&&C.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var k=C.parentNode.host;if(-1!==t.mirror.getId(k)){v=S;break}}}}if(!v){for(;n.head;)n.removeNode(n.head.value);break}p=v.previous,n.removeNode(v.value),i(v.value)}var E={texts:t.texts.map((function(e){return{id:t.mirror.getId(e.node),value:e.value}})).filter((function(e){return t.mirror.has(e.id)})),attributes:t.attributes.map((function(e){return{id:t.mirror.getId(e.node),attributes:e.attributes}})).filter((function(e){return t.mirror.has(e.id)})),removes:t.removes,adds:e};(E.texts.length||E.attributes.length||E.removes.length||E.adds.length)&&(t.texts=[],t.attributes=[],t.removes=[],t.addedSet=new Set,t.movedSet=new Set,t.droppedSet=new Set,t.movedMap={},t.mutationCb(E))}},this.processMutation=function(e){if(!(0,c.WU)(e.target,t.mirror))switch(e.type){case"characterData":var n=e.target.textContent;(0,c.IT)(e.target,t.blockClass,t.blockSelector,!1)||n===e.oldValue||t.texts.push({value:(0,a.IG)(e.target,t.maskTextClass,t.maskTextSelector)&&n?t.maskTextFn?t.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:e.target});break;case"attributes":var r=e.target,i=e.target.getAttribute(e.attributeName);if("value"===e.attributeName&&(i=(0,a.wR)({maskInputOptions:t.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:i,maskInputFn:t.maskInputFn})),(0,c.IT)(e.target,t.blockClass,t.blockSelector,!1)||i===e.oldValue)return;var o=t.attributes.find((function(t){return t.node===e.target}));if("IFRAME"===r.tagName&&"src"===e.attributeName&&!t.keepIframeSrcFn(i)){if(r.contentDocument)return;e.attributeName="rr_src"}if(o||(o={node:e.target,attributes:{}},t.attributes.push(o)),"style"===e.attributeName){var s=t.doc.createElement("span");e.oldValue&&s.setAttribute("style",e.oldValue),void 0!==o.attributes.style&&null!==o.attributes.style||(o.attributes.style={});for(var u=o.attributes.style,l=0,d=Array.from(r.style);l<d.length;l++){var f=d[l],p=r.style.getPropertyValue(f),m=r.style.getPropertyPriority(f);p===s.style.getPropertyValue(f)&&m===s.style.getPropertyPriority(f)||(u[f]=""===m?p:[p,m])}for(var g=0,y=Array.from(s.style);g<y.length;g++){var b=y[g];""===r.style.getPropertyValue(b)&&(u[b]=!1)}}else o.attributes[e.attributeName]=(0,a.We)(t.doc,r.tagName,e.attributeName,i);break;case"childList":if((0,c.IT)(e.target,t.blockClass,t.blockSelector,!0))return;e.addedNodes.forEach((function(n){return t.genAdds(n,e.target)})),e.removedNodes.forEach((function(n){var r=t.mirror.getId(n),i=(0,a.Zq)(e.target)?t.mirror.getId(e.target.host):t.mirror.getId(e.target);(0,c.IT)(e.target,t.blockClass,t.blockSelector,!1)||(0,c.WU)(n,t.mirror)||!(0,c.nF)(n,t.mirror)||(t.addedSet.has(n)?(v(t.addedSet,n),t.droppedSet.add(n)):t.addedSet.has(e.target)&&-1===r||(0,c.y5)(e.target,t.mirror)||(t.movedSet.has(n)&&t.movedMap[h(r,i)]?v(t.movedSet,n):t.removes.push({parentId:i,id:r,isShadow:!(!(0,a.Zq)(e.target)||!(0,a.DS)(e.target))||void 0})),t.mapRemoves.push(n))}))}},this.genAdds=function(e,n){if(!t.processedNodeManager.inOtherBuffer(e,t)){if(t.mirror.hasNode(e)){if((0,c.WU)(e,t.mirror))return;t.movedSet.add(e);var r=null;n&&t.mirror.hasNode(n)&&(r=t.mirror.getId(n)),r&&-1!==r&&(t.movedMap[h(t.mirror.getId(e),r)]=!0)}else t.addedSet.add(e),t.droppedSet.delete(e);(0,c.IT)(e,t.blockClass,t.blockSelector,!1)||(e.childNodes.forEach((function(e){return t.genAdds(e)})),(0,c.He)(e)&&e.shadowRoot.childNodes.forEach((function(n){t.processedNodeManager.add(n,t),t.genAdds(n,e)})))}}}return(0,i.Z)(e,[{key:"init",value:function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((function(n){t[n]=e[n]}))}},{key:"freeze",value:function(){this.frozen=!0,this.canvasManager.freeze()}},{key:"unfreeze",value:function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}},{key:"isFrozen",value:function(){return this.frozen}},{key:"lock",value:function(){this.locked=!0,this.canvasManager.lock()}},{key:"unlock",value:function(){this.locked=!1,this.canvasManager.unlock(),this.emit()}},{key:"reset",value:function(){this.shadowDomManager.reset(),this.canvasManager.reset()}}]),e}();function v(e,t){e.delete(t),t.childNodes.forEach((function(t){return v(e,t)}))}function m(e,t,n){return 0!==e.length&&g(e,t,n)}function g(e,t,n){var r=t.parentNode;if(!r)return!1;var i=n.getId(r);return!!e.some((function(e){return e.id===i}))||g(e,r,n)}function y(e,t){return 0!==e.size&&b(e,t)}function b(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||b(e,n))}var w=[],S=new(function(){function e(){(0,o.Z)(this,e),this.nodeMap=new WeakMap,this.periodicallyClear()}return(0,i.Z)(e,[{key:"periodicallyClear",value:function(){var e=this;requestAnimationFrame((function(){e.clear(),e.periodicallyClear()}))}},{key:"inOtherBuffer",value:function(e,t){var n=this.nodeMap.get(e);return n&&Array.from(n).some((function(e){return e!==t}))}},{key:"add",value:function(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}},{key:"clear",value:function(){this.nodeMap=new WeakMap}}]),e}());function I(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(n){return e.target}}function C(e,t){var n,r,i=new p;w.push(i),i.init(e);var o=window.MutationObserver||window.__rrMutationObserver,a=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");a&&window[a]&&(o=window[a]);var s=new o(i.processMutations.bind(i));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function k(e){var t=e.mouseInteractionCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.sampling;if(!1===a.mouseInteraction)return function(){};var s=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[];return Object.keys(l.Y2).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]})).forEach((function(e){var a=e.toLowerCase(),s=function(e){return function(n){var a=I(n);if(!(0,c.IT)(a,i,o,!0)){var s=(0,c.z6)(n)?n.changedTouches[0]:n;if(s){var u=r.getId(a),d=s.clientX,f=s.clientY;t({type:l.Y2[e],id:u,x:d,y:f})}}}}(e);u.push((0,c.on)(a,s,n))})),function(){u.forEach((function(e){return e()}))}}function E(e){var t=e.scrollCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.sampling,s=(0,c.P2)((function(e){var a=I(e);if(a&&!(0,c.IT)(a,i,o,!0)){var s=r.getId(a);if(a===n&&n.defaultView){var u=(0,c.$1)(n.defaultView);t({id:s,x:u.left,y:u.top})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}}),a.scroll||100);return(0,c.on)("scroll",s,n)}function x(e,t){var n=Object.assign({},e);return t||delete n.userTriggered,n}var A=["INPUT","TEXTAREA","SELECT"],M=new WeakMap;function T(e){return function(e,t){if(D("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||D("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||D("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||D("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){var r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function N(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function R(e,t){var n,r,i,o=e.mirror,a=e.stylesheetManager,s=null;s="#document"===t.nodeName?o.getId(t):o.getId(t.host);var u="#document"===t.nodeName?null===(n=t.defaultView)||void 0===n?void 0:n.Document:null===(i=null===(r=t.ownerDocument)||void 0===r?void 0:r.defaultView)||void 0===i?void 0:i.ShadowRoot,c=Object.getOwnPropertyDescriptor(null===u||void 0===u?void 0:u.prototype,"adoptedStyleSheets");return null!==s&&-1!==s&&u&&c?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:function(){var e;return null===(e=c.get)||void 0===e?void 0:e.call(this)},set:function(e){var t,n=null===(t=c.set)||void 0===t?void 0:t.call(this,e);if(null!==s&&-1!==s)try{a.adoptStyleSheets(e,s)}catch(r){}return n}}),function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}):function(){}}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.doc.defaultView;if(!n)return function(){};!function(e,t){var n=e.mutationCb,r=e.mousemoveCb,i=e.mouseInteractionCb,o=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb,u=e.mediaInteractionCb,c=e.styleSheetRuleCb,l=e.styleDeclarationCb,d=e.canvasMutationCb,f=e.fontCb,h=e.selectionCb;e.mutationCb=function(){t.mutation&&t.mutation.apply(t,arguments),n.apply(void 0,arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove.apply(t,arguments),r.apply(void 0,arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction.apply(t,arguments),i.apply(void 0,arguments)},e.scrollCb=function(){t.scroll&&t.scroll.apply(t,arguments),o.apply(void 0,arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize.apply(t,arguments),a.apply(void 0,arguments)},e.inputCb=function(){t.input&&t.input.apply(t,arguments),s.apply(void 0,arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction.apply(t,arguments),u.apply(void 0,arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule.apply(t,arguments),c.apply(void 0,arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration.apply(t,arguments),l.apply(void 0,arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation.apply(t,arguments),d.apply(void 0,arguments)},e.fontCb=function(){t.font&&t.font.apply(t,arguments),f.apply(void 0,arguments)},e.selectionCb=function(){t.selection&&t.selection.apply(t,arguments),h.apply(void 0,arguments)}}(e,t);var i,o=C(e,e.doc),d=function(e){var t=e.mousemoveCb,n=e.sampling,r=e.doc,i=e.mirror;if(!1===n.mousemove)return function(){};var o,a="number"===typeof n.mousemove?n.mousemove:50,s="number"===typeof n.mousemoveCallback?n.mousemoveCallback:500,u=[],d=(0,c.P2)((function(e){var n=Date.now()-o;t(u.map((function(e){return e.timeOffset-=n,e})),e),u=[],o=null}),s),f=(0,c.P2)((function(e){var t=I(e),n=(0,c.z6)(e)?e.changedTouches[0]:e,r=n.clientX,a=n.clientY;o||(o=Date.now()),u.push({x:r,y:a,id:i.getId(t),timeOffset:Date.now()-o}),d("undefined"!==typeof DragEvent&&e instanceof DragEvent?l.yh.Drag:e instanceof MouseEvent?l.yh.MouseMove:l.yh.TouchMove)}),a,{trailing:!1}),h=[(0,c.on)("mousemove",f,r),(0,c.on)("touchmove",f,r),(0,c.on)("drag",f,r)];return function(){h.forEach((function(e){return e()}))}}(e),f=k(e),h=E(e),p=function(e){var t=e.viewportResizeCb,n=-1,r=-1,i=(0,c.P2)((function(){var e=(0,c.gp)(),i=(0,c.fM)();n===e&&r===i||(t({width:Number(i),height:Number(e)}),n=e,r=i)}),200);return(0,c.on)("resize",i,window)}(e),v=function(e){var t=e.inputCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,s=e.ignoreClass,l=e.maskInputOptions,d=e.maskInputFn,f=e.sampling,h=e.userTriggeredOnInput;function p(e){var t=I(e),r=e.isTrusted;if(t&&"OPTION"===t.tagName&&(t=t.parentElement),t&&t.tagName&&!(A.indexOf(t.tagName)<0)&&!(0,c.IT)(t,i,o,!0)){var u=t.type;if(!t.classList.contains(s)){var f=t.value,p=!1;"radio"===u||"checkbox"===u?p=t.checked:(l[t.tagName.toLowerCase()]||l[u])&&(f=(0,a.wR)({maskInputOptions:l,tagName:t.tagName,type:u,value:f,maskInputFn:d})),v(t,x({text:f,isChecked:p,userTriggered:r},h));var m=t.name;"radio"===u&&m&&p&&n.querySelectorAll('input[type="radio"][name="'.concat(m,'"]')).forEach((function(e){e!==t&&v(e,x({text:e.value,isChecked:!p,userTriggered:!1},h))}))}}}function v(e,n){var i=M.get(e);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){M.set(e,n);var o=r.getId(e);t(Object.assign(Object.assign({},n),{id:o}))}}var m=("last"===f.input?["change"]:["input","change"]).map((function(e){return(0,c.on)(e,p,n)})),g=n.defaultView;if(!g)return function(){m.forEach((function(e){return e()}))};var y=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),b=[[g.HTMLInputElement.prototype,"value"],[g.HTMLInputElement.prototype,"checked"],[g.HTMLSelectElement.prototype,"value"],[g.HTMLTextAreaElement.prototype,"value"],[g.HTMLSelectElement.prototype,"selectedIndex"],[g.HTMLOptionElement.prototype,"selected"]];return y&&y.set&&m.push.apply(m,(0,u.Z)(b.map((function(e){return(0,c.yU)(e[0],e[1],{set:function(){p({target:this})}},!1,g)})))),function(){m.forEach((function(e){return e()}))}}(e),m=function(e){var t=e.mediaInteractionCb,n=e.blockClass,r=e.blockSelector,i=e.mirror,o=e.sampling,a=function(e){return(0,c.P2)((function(o){var a=I(o);if(a&&!(0,c.IT)(a,n,r,!0)){var s=a.currentTime,u=a.volume,l=a.muted,d=a.playbackRate;t({type:e,id:i.getId(a),currentTime:s,volume:u,muted:l,playbackRate:d})}}),o.media||500)},s=[(0,c.on)("play",a(0)),(0,c.on)("pause",a(1)),(0,c.on)("seeked",a(2)),(0,c.on)("volumechange",a(3)),(0,c.on)("ratechange",a(4))];return function(){s.forEach((function(e){return e()}))}}(e),g=function(e,t){var n=e.styleSheetRuleCb,r=e.mirror,i=e.stylesheetManager,o=t.win;if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return function(){};var a=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=function(e,t){var o=N(this,r,i.styleMirror),s=o.id,u=o.styleId;return(s&&-1!==s||u&&-1!==u)&&n({id:s,styleId:u,adds:[{rule:e,index:t}]}),a.apply(this,[e,t])};var c,l,d=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=function(e){var t=N(this,r,i.styleMirror),o=t.id,a=t.styleId;return(o&&-1!==o||a&&-1!==a)&&n({id:o,styleId:a,removes:[{index:e}]}),d.apply(this,[e])},o.CSSStyleSheet.prototype.replace&&(c=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=function(e){var t=N(this,r,i.styleMirror),o=t.id,a=t.styleId;return(o&&-1!==o||a&&-1!==a)&&n({id:o,styleId:a,replace:e}),c.apply(this,[e])}),o.CSSStyleSheet.prototype.replaceSync&&(l=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=function(e){var t=N(this,r,i.styleMirror),o=t.id,a=t.styleId;return(o&&-1!==o||a&&-1!==a)&&n({id:o,styleId:a,replaceSync:e}),l.apply(this,[e])});var f={};O("CSSGroupingRule")?f.CSSGroupingRule=o.CSSGroupingRule:(O("CSSMediaRule")&&(f.CSSMediaRule=o.CSSMediaRule),O("CSSConditionRule")&&(f.CSSConditionRule=o.CSSConditionRule),O("CSSSupportsRule")&&(f.CSSSupportsRule=o.CSSSupportsRule));var h={};return Object.entries(f).forEach((function(e){var t=(0,s.Z)(e,2),o=t[0],a=t[1];h[o]={insertRule:a.prototype.insertRule,deleteRule:a.prototype.deleteRule},a.prototype.insertRule=function(e,t){var a=N(this.parentStyleSheet,r,i.styleMirror),s=a.id,c=a.styleId;return(s&&-1!==s||c&&-1!==c)&&n({id:s,styleId:c,adds:[{rule:e,index:[].concat((0,u.Z)(T(this)),[t||0])}]}),h[o].insertRule.apply(this,[e,t])},a.prototype.deleteRule=function(e){var t=N(this.parentStyleSheet,r,i.styleMirror),a=t.id,s=t.styleId;return(a&&-1!==a||s&&-1!==s)&&n({id:a,styleId:s,removes:[{index:[].concat((0,u.Z)(T(this)),[e])}]}),h[o].deleteRule.apply(this,[e])}})),function(){o.CSSStyleSheet.prototype.insertRule=a,o.CSSStyleSheet.prototype.deleteRule=d,c&&(o.CSSStyleSheet.prototype.replace=c),l&&(o.CSSStyleSheet.prototype.replaceSync=l),Object.entries(f).forEach((function(e){var t=(0,s.Z)(e,2),n=t[0],r=t[1];r.prototype.insertRule=h[n].insertRule,r.prototype.deleteRule=h[n].deleteRule}))}}(e,{win:n}),y=R(e,e.doc),b=function(e,t){var n=e.styleDeclarationCb,r=e.mirror,i=e.ignoreCSSAttributes,o=e.stylesheetManager,a=t.win,s=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=function(e,t,a){var u;if(i.has(e))return s.apply(this,[e,t,a]);var c=N(null===(u=this.parentRule)||void 0===u?void 0:u.parentStyleSheet,r,o.styleMirror),l=c.id,d=c.styleId;return(l&&-1!==l||d&&-1!==d)&&n({id:l,styleId:d,set:{property:e,value:t,priority:a},index:T(this.parentRule)}),s.apply(this,[e,t,a])};var u=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=function(e){var t;if(i.has(e))return u.apply(this,[e]);var a=N(null===(t=this.parentRule)||void 0===t?void 0:t.parentStyleSheet,r,o.styleMirror),s=a.id,c=a.styleId;return(s&&-1!==s||c&&-1!==c)&&n({id:s,styleId:c,remove:{property:e},index:T(this.parentRule)}),u.apply(this,[e])},function(){a.CSSStyleDeclaration.prototype.setProperty=s,a.CSSStyleDeclaration.prototype.removeProperty=u}}(e,{win:n}),S=e.collectFonts?function(e){var t=e.fontCb,n=e.doc,r=n.defaultView;if(!r)return function(){};var i=[],o=new WeakMap,a=r.FontFace;r.FontFace=function(e,t,n){var r=new a(e,t,n);return o.set(r,{family:e,buffer:"string"!==typeof t,descriptors:n,fontSource:"string"===typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var s=(0,c.r$)(n.fonts,"add",(function(e){return function(n){return setTimeout((function(){var e=o.get(n);e&&(t(e),o.delete(n))}),0),e.apply(this,[n])}}));return i.push((function(){r.FontFace=a})),i.push(s),function(){i.forEach((function(e){return e()}))}}(e):function(){},_=function(e){var t=e.doc,n=e.mirror,r=e.blockClass,i=e.blockSelector,o=e.selectionCb,a=!0,s=function(){var e=t.getSelection();if(!(!e||a&&(null===e||void 0===e?void 0:e.isCollapsed))){a=e.isCollapsed||!1;for(var s=[],u=e.rangeCount||0,l=0;l<u;l++){var d=e.getRangeAt(l),f=d.startContainer,h=d.startOffset,p=d.endContainer,v=d.endOffset;(0,c.IT)(f,r,i,!0)||(0,c.IT)(p,r,i,!0)||s.push({start:n.getId(f),startOffset:h,end:n.getId(p),endOffset:v})}o({ranges:s})}};return s(),(0,c.on)("selectionchange",s)}(e),D=[],Z=(0,r.Z)(e.plugins);try{for(Z.s();!(i=Z.n()).done;){var L=i.value;D.push(L.observer(L.callback,n,L.options))}}catch(F){Z.e(F)}finally{Z.f()}return function(){w.forEach((function(e){return e.reset()})),o.disconnect(),d(),f(),h(),p(),v(),m(),g(),y(),b(),S(),_(),D.forEach((function(e){return e()}))}}function D(e){return"undefined"!==typeof window[e]}function O(e){return Boolean("undefined"!==typeof window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var Z=function(){function e(t){(0,o.Z)(this,e),this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}return(0,i.Z)(e,[{key:"getId",value:function(e,t,n,r){var i=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e),a=i.get(t);return a||(a=this.generateIdFn(),i.set(t,a),o.set(a,t)),a}},{key:"getIds",value:function(e,t){var n=this,r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getId(e,t,r,i)}))}},{key:"getRemoteId",value:function(e,t,n){var r=n||this.getRemoteIdToIdMap(e);if("number"!==typeof t)return t;var i=r.get(t);return i||-1}},{key:"getRemoteIds",value:function(e,t){var n=this,r=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getRemoteId(e,t,r)}))}},{key:"reset",value:function(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}},{key:"getIdToRemoteIdMap",value:function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}},{key:"getRemoteIdToIdMap",value:function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}]),e}(),L=function(){function e(t){(0,o.Z)(this,e),this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Z(a.Bu),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Z(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}return(0,i.Z)(e,[{key:"addIframe",value:function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}},{key:"addLoadListener",value:function(e){this.loadListener=e}},{key:"attachIframe",value:function(e,t){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}},{key:"handleMessage",value:function(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var n=this.crossOriginIframeMap.get(e.source);if(n){var r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}}}},{key:"transformCrossOriginEvent",value:function(e,t){var n,r=this;switch(t.type){case l.tw.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:l.tw.IncrementalSnapshot,data:{source:l.yh.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case l.tw.Meta:case l.tw.Load:case l.tw.DomContentLoaded:return!1;case l.tw.Plugin:return t;case l.tw.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case l.tw.IncrementalSnapshot:switch(t.data.source){case l.yh.Mutation:return t.data.adds.forEach((function(t){r.replaceIds(t,e,["parentId","nextId","previousId"]),r.replaceIdOnNode(t.node,e);var n=r.crossOriginIframeRootIdMap.get(e);n&&r.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((function(t){r.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((function(t){r.replaceIds(t,e,["id"])})),t.data.texts.forEach((function(t){r.replaceIds(t,e,["id"])})),t;case l.yh.Drag:case l.yh.TouchMove:case l.yh.MouseMove:return t.data.positions.forEach((function(t){r.replaceIds(t,e,["id"])})),t;case l.yh.ViewportResize:return!1;case l.yh.MediaInteraction:case l.yh.MouseInteraction:case l.yh.Scroll:case l.yh.CanvasMutation:case l.yh.Input:return this.replaceIds(t.data,e,["id"]),t;case l.yh.StyleSheetRule:case l.yh.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case l.yh.Font:return t;case l.yh.Selection:return t.data.ranges.forEach((function(t){r.replaceIds(t,e,["start","end"])})),t;case l.yh.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null===(n=t.data.styles)||void 0===n||n.forEach((function(t){r.replaceStyleIds(t,e,["styleId"])})),t}}}},{key:"replace",value:function(e,t,n,i){var o,a=(0,r.Z)(i);try{for(a.s();!(o=a.n()).done;){var s=o.value;(Array.isArray(t[s])||"number"===typeof t[s])&&(Array.isArray(t[s])?t[s]=e.getIds(n,t[s]):t[s]=e.getId(n,t[s]))}}catch(u){a.e(u)}finally{a.f()}return t}},{key:"replaceIds",value:function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}},{key:"replaceStyleIds",value:function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}},{key:"replaceIdOnNode",value:function(e,t){var n=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((function(e){n.replaceIdOnNode(e,t)}))}},{key:"patchRootIdOnNode",value:function(e,t){var n=this;e.type===a.Jq.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((function(e){n.patchRootIdOnNode(e,t)}))}}]),e}(),F=function(){function e(t){(0,o.Z)(this,e),this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}return(0,i.Z)(e,[{key:"init",value:function(){this.reset(),this.patchAttachShadow(Element,document)}},{key:"addShadowRoot",value:function(e,t){var n=this;if((0,a.DS)(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=C(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((function(){return r.disconnect()})),this.restoreHandlers.push(E(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout((function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&n.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,n.mirror.getId(e.host)),n.restoreHandlers.push(R({mirror:n.mirror,stylesheetManager:n.bypassOptions.stylesheetManager},e))}),0)}}},{key:"observeAttachShadow",value:function(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}},{key:"patchAttachShadow",value:function(e,t){var n=this;this.restoreHandlers.push((0,c.r$)(e.prototype,"attachShadow",(function(e){return function(r){var i=e.call(this,r);return this.shadowRoot&&(0,c._f)(this)&&n.addShadowRoot(this.shadowRoot,t),i}})))}},{key:"reset",value:function(){this.restoreHandlers.forEach((function(e){try{e()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}]),e}(),V=n(4165),B=n(3246),P=n(3464),j=new Map;var W=function(e,t,n){if(e&&(G(e,t)||"object"===typeof e)){var r=function(e,t){var n=j.get(e);return n||(n=new Map,j.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),i=r.indexOf(e);return-1===i&&(i=r.length,r.push(e)),i}};function U(e,t,n){if(e instanceof Array)return e.map((function(e){return U(e,t,n)}));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:(0,P.c)(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[U(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement)return{rr_type:e.constructor.name,src:e.src};if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[U(e.data,t,n),e.width,e.height]}:G(e,t)||"object"===typeof e?{rr_type:e.constructor.name,index:W(e,t,n)}:e}var H=function(e,t,n){return(0,u.Z)(e).map((function(e){return U(e,t,n)}))},G=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((function(e){return"function"===typeof t[e]}));return Boolean(n.find((function(n){return e instanceof t[n]})))};function z(e,t,n){var r=[];try{var i=(0,c.r$)(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(r){(0,c.IT)(this,t,n,!0)||"__context"in this||(this.__context=r);for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return e.apply(this,[r].concat(o))}}));r.push(i)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){r.forEach((function(e){return e()}))}}function q(e,t,n,i,o,a,s){var u,l=[],d=Object.getOwnPropertyNames(e),f=(0,r.Z)(d);try{var h=function(){var r=u.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(r))return"continue";try{if("function"!==typeof e[r])return"continue";var a=(0,c.r$)(e,r,(function(e){return function(){for(var a=arguments.length,u=new Array(a),l=0;l<a;l++)u[l]=arguments[l];var d=e.apply(this,u);if(W(d,s,this),!(0,c.IT)(this.canvas,i,o,!0)){var f=H([].concat(u),s,this),h={type:t,property:r,args:f};n(this.canvas,h)}return d}}));l.push(a)}catch(f){var d=(0,c.yU)(e,r,{set:function(e){n(this.canvas,{type:t,property:r,args:[e],setter:!0})}});l.push(d)}};for(f.s();!(u=f.n()).done;)h()}catch(p){f.e(p)}finally{f.f()}return l}var Y=null;try{var Q="undefined"!==typeof module&&"function"===typeof module.require&&module.require("worker_threads")||"function"===typeof require&&require("worker_threads")||"function"===typeof require&&require("worker_threads");Y=Q.Worker}catch(he){}function K(e,t,n){var r=void 0===t?null:t,i=function(e,t){return Buffer.from(e,"base64").toString(t?"utf16":"utf8")}(e,void 0!==n&&n),o=i.indexOf("\n",10)+1,a=i.substring(o)+(r?"//# sourceMappingURL="+r:"");return function(e){return new Y(a,Object.assign({},e,{eval:!0}))}}function X(e,t,n){var r=void 0===t?null:t,i=function(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),i=0,o=n.length;i<o;++i)r[i]=n.charCodeAt(i);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}(e,void 0!==n&&n),o=i.indexOf("\n",10)+1,a=i.substring(o)+(r?"//# sourceMappingURL="+r:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}var J="[object process]"===Object.prototype.toString.call("undefined"!==typeof process?process:0);var $,ee,te,ne,re,ie,oe=($="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",ee=null,te=!1,J?K($,ee,te):function(e,t,n){var r;return function(i){return r=r||X(e,t,n),new Worker(r,i)}}($,ee,te)),ae=function(){function e(t){var n=this;(0,o.Z)(this,e),this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(e,t){!(n.rafStamps.invokeId&&n.rafStamps.latestId!==n.rafStamps.invokeId)&&n.rafStamps.invokeId||(n.rafStamps.invokeId=n.rafStamps.latestId),n.pendingCanvasMutations.has(e)||n.pendingCanvasMutations.set(e,[]),n.pendingCanvasMutations.get(e).push(t)};var r=t.sampling,i=void 0===r?"all":r,a=t.win,s=t.blockClass,u=t.blockSelector,c=t.recordCanvas,l=t.dataURLOptions;this.mutationCb=t.mutationCb,this.mirror=t.mirror,c&&"all"===i&&this.initCanvasMutationObserver(a,s,u),c&&"number"===typeof i&&this.initCanvasFPSObserver(i,a,s,u,{dataURLOptions:l})}return(0,i.Z)(e,[{key:"reset",value:function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}},{key:"freeze",value:function(){this.frozen=!0}},{key:"unfreeze",value:function(){this.frozen=!1}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"initCanvasFPSObserver",value:function(e,t,n,r,i){var o=this,a=z(t,n,r),s=new Map,u=new oe;u.onmessage=function(e){var t=e.data.id;if(s.set(t,!1),"base64"in e.data){var n=e.data,r=n.base64,i=n.type,a=n.width,u=n.height;o.mutationCb({id:t,type:l.FX["2D"],commands:[{property:"clearRect",args:[0,0,a,u]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}]})}};var d,f=1e3/e,h=0;d=requestAnimationFrame((function e(a){h&&a-h<f||(h=a,function(){var e=[];return t.document.querySelectorAll("canvas").forEach((function(t){(0,c.IT)(t,n,r,!0)||e.push(t)})),e}().forEach((function(e){return(0,B.m)(o,void 0,void 0,(0,V.Z)().mark((function t(){var n,r,o,a;return(0,V.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.mirror.getId(e),!s.get(r)){t.next=3;break}return t.abrupt("return");case 3:return s.set(r,!0),["webgl","webgl2"].includes(e.__context)&&(o=e.getContext(e.__context),!1===(null===(n=null===o||void 0===o?void 0:o.getContextAttributes())||void 0===n?void 0:n.preserveDrawingBuffer)&&(null===o||void 0===o||o.clear(o.COLOR_BUFFER_BIT))),t.next=7,createImageBitmap(e);case 7:a=t.sent,u.postMessage({id:r,bitmap:a,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[a]);case 9:case"end":return t.stop()}}),t,this)})))}))),d=requestAnimationFrame(e)})),this.resetObservers=function(){a(),cancelAnimationFrame(d)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var i=z(e,t,n),o=function(e,t,n,i){var o,a=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),u=(0,r.Z)(s);try{var d=function(){var r=o.value;try{if("function"!==typeof t.CanvasRenderingContext2D.prototype[r])return"continue";var s=(0,c.r$)(t.CanvasRenderingContext2D.prototype,r,(function(o){return function(){for(var a=this,s=arguments.length,u=new Array(s),d=0;d<s;d++)u[d]=arguments[d];return(0,c.IT)(this.canvas,n,i,!0)||setTimeout((function(){var n=H([].concat(u),t,a);e(a.canvas,{type:l.FX["2D"],property:r,args:n})}),0),o.apply(this,u)}}));a.push(s)}catch(d){var u=(0,c.yU)(t.CanvasRenderingContext2D.prototype,r,{set:function(t){e(this.canvas,{type:l.FX["2D"],property:r,args:[t],setter:!0})}});a.push(u)}};for(u.s();!(o=u.n()).done;)d()}catch(f){u.e(f)}finally{u.f()}return function(){a.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n),a=function(e,t,n,r,i){var o=[];return o.push.apply(o,(0,u.Z)(q(t.WebGLRenderingContext.prototype,l.FX.WebGL,e,n,r,0,t))),"undefined"!==typeof t.WebGL2RenderingContext&&o.push.apply(o,(0,u.Z)(q(t.WebGL2RenderingContext.prototype,l.FX.WebGL2,e,n,r,0,t))),function(){o.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n,this.mirror);this.resetObservers=function(){i(),o(),a()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"startRAFTimestamping",value:function(){var e=this;requestAnimationFrame((function t(n){e.rafStamps.latestId=n,requestAnimationFrame(t)}))}},{key:"flushPendingCanvasMutations",value:function(){var e=this;this.pendingCanvasMutations.forEach((function(t,n){var r=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,r)})),requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"flushPendingCanvasMutationFor",value:function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var r=n.map((function(e){return(0,B._)(e,["type"])})),i=n[0].type;this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}}}}]),e}(),se=function(){function e(t){(0,o.Z)(this,e),this.trackedLinkElements=new WeakSet,this.styleMirror=new c.ug,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}return(0,i.Z)(e,[{key:"attachLinkElement",value:function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}},{key:"trackLinkElement",value:function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}},{key:"adoptStyleSheets",value:function(e,t){if(0!==e.length){var n,i={id:t,styleIds:[]},o=[],s=(0,r.Z)(e);try{for(s.s();!(n=s.n()).done;){var u=n.value,c=void 0;if(this.styleMirror.has(u))c=this.styleMirror.getId(u);else{c=this.styleMirror.add(u);var l=Array.from(u.rules||CSSRule);o.push({styleId:c,rules:l.map((function(e,t){return{rule:(0,a.LS)(e),index:t}}))})}i.styleIds.push(c)}}catch(d){s.e(d)}finally{s.f()}o.length>0&&(i.styles=o),this.adoptedStyleSheetCb(i)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),e}();function ue(e){return Object.assign(Object.assign({},e),{timestamp:Date.now()})}var ce=!1,le=(0,a.bZ)();function de(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.emit,n=e.checkoutEveryNms,i=e.checkoutEveryNth,o=e.blockClass,s=void 0===o?"rr-block":o,u=e.blockSelector,d=void 0===u?null:u,f=e.ignoreClass,h=void 0===f?"rr-ignore":f,p=e.maskTextClass,v=void 0===p?"rr-mask":p,m=e.maskTextSelector,g=void 0===m?null:m,y=e.inlineStylesheet,b=void 0===y||y,I=e.maskAllInputs,C=e.maskInputOptions,k=e.slimDOMOptions,E=e.maskInputFn,x=e.maskTextFn,A=e.hooks,M=e.packFn,T=e.sampling,N=void 0===T?{}:T,R=e.dataURLOptions,D=void 0===R?{}:R,O=e.mousemoveWait,Z=e.recordCanvas,V=void 0!==Z&&Z,B=e.recordCrossOriginIframes,P=void 0!==B&&B,j=e.recordAfter,W=void 0===j?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":j,U=e.userTriggeredOnInput,H=void 0!==U&&U,G=e.collectFonts,z=void 0!==G&&G,q=e.inlineImages,Y=void 0!==q&&q,Q=e.plugins,K=e.keepIframeSrcFn,X=void 0===K?function(){return!1}:K,J=e.ignoreCSSAttributes,$=void 0===J?new Set([]):J,ee=!P||window.parent===window,te=!1;if(!ee)try{window.parent.document,te=!1}catch(he){te=!0}if(ee&&!t)throw new Error("emit function is required");void 0!==O&&void 0===N.mousemove&&(N.mousemove=O),le.reset();var oe,de=!0===I?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==C?C:{password:!0},fe=!0===k||"all"===k?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===k,headMetaDescKeywords:"all"===k}:k||{};(0,c.OK)();var pe=0,ve=function(e){var t,n=(0,r.Z)(Q||[]);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.eventProcessor&&(e=i.eventProcessor(e))}}catch(o){n.e(o)}finally{n.f()}return M&&!te&&(e=M(e)),e};ne=function(e,r){var o;if(!(null===(o=w[0])||void 0===o?void 0:o.isFrozen())||e.type===l.tw.FullSnapshot||e.type===l.tw.IncrementalSnapshot&&e.data.source===l.yh.Mutation||w.forEach((function(e){return e.unfreeze()})),ee)null===t||void 0===t||t(ve(e),r);else if(te){var a={type:"rrweb",event:ve(e),origin:window.location.origin,isCheckout:r};window.parent.postMessage(a,"*")}if(e.type===l.tw.FullSnapshot)oe=e,pe=0;else if(e.type===l.tw.IncrementalSnapshot){if(e.data.source===l.yh.Mutation&&e.data.isAttachIframe)return;pe++;var s=i&&pe>=i,u=n&&e.timestamp-oe.timestamp>n;(s||u)&&re(!0)}};var me,ge=function(e){ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Mutation},e)}))},ye=function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Scroll},e)}))},be=function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.CanvasMutation},e)}))},we=new se({mutationCb:ge,adoptedStyleSheetCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.AdoptedStyleSheet},e)}))}}),Se=new L({mirror:le,mutationCb:ge,stylesheetManager:we,recordCrossOriginIframes:P,wrappedEmit:ne}),Ie=(0,r.Z)(Q||[]);try{for(Ie.s();!(me=Ie.n()).done;){var Ce=me.value;Ce.getMirror&&Ce.getMirror({nodeMirror:le,crossOriginIframeMirror:Se.crossOriginIframeMirror,crossOriginIframeStyleMirror:Se.crossOriginIframeStyleMirror})}}catch(Me){Ie.e(Me)}finally{Ie.f()}ie=new ae({recordCanvas:V,mutationCb:be,win:window,blockClass:s,blockSelector:d,mirror:le,sampling:N.canvas,dataURLOptions:D});var ke=new F({mutationCb:ge,scrollCb:ye,bypassOptions:{blockClass:s,blockSelector:d,maskTextClass:v,maskTextSelector:g,inlineStylesheet:b,maskInputOptions:de,dataURLOptions:D,maskTextFn:x,maskInputFn:E,recordCanvas:V,inlineImages:Y,sampling:N,slimDOMOptions:fe,iframeManager:Se,stylesheetManager:we,canvasManager:ie,keepIframeSrcFn:X,processedNodeManager:S},mirror:le});re=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];ne(ue({type:l.tw.Meta,data:{href:window.location.href,width:(0,c.fM)(),height:(0,c.gp)()}}),e),we.reset(),ke.init(),w.forEach((function(e){return e.lock()}));var t=(0,a.CO)(document,{mirror:le,blockClass:s,blockSelector:d,maskTextClass:v,maskTextSelector:g,inlineStylesheet:b,maskAllInputs:de,maskTextFn:x,slimDOM:fe,dataURLOptions:D,recordCanvas:V,inlineImages:Y,onSerialize:function(e){(0,c.Cj)(e,le)&&Se.addIframe(e),(0,c.qs)(e,le)&&we.trackLinkElement(e),(0,c.He)(e)&&ke.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){Se.attachIframe(e,t),ke.observeAttachShadow(e)},onStylesheetLoad:function(e,t){we.attachLinkElement(e,t)},keepIframeSrcFn:X});if(!t)return console.warn("Failed to snapshot the document");ne(ue({type:l.tw.FullSnapshot,data:{node:t,initialOffset:(0,c.$1)(window)}})),w.forEach((function(e){return e.unlock()})),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&we.adoptStyleSheets(document.adoptedStyleSheets,le.getId(document))};try{var Ee=[],xe=function(e){var t;return _({mutationCb:ge,mousemoveCb:function(e,t){return ne(ue({type:l.tw.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.MouseInteraction},e)}))},scrollCb:ye,viewportResizeCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.ViewportResize},e)}))},inputCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Input},e)}))},mediaInteractionCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.StyleDeclaration},e)}))},canvasMutationCb:be,fontCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Font},e)}))},selectionCb:function(e){ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Selection},e)}))},blockClass:s,ignoreClass:h,maskTextClass:v,maskTextSelector:g,maskInputOptions:de,inlineStylesheet:b,sampling:N,recordCanvas:V,inlineImages:Y,userTriggeredOnInput:H,collectFonts:z,doc:e,maskInputFn:E,maskTextFn:x,keepIframeSrcFn:X,blockSelector:d,slimDOMOptions:fe,dataURLOptions:D,mirror:le,iframeManager:Se,stylesheetManager:we,shadowDomManager:ke,processedNodeManager:S,canvasManager:ie,ignoreCSSAttributes:$,plugins:(null===(t=null===Q||void 0===Q?void 0:Q.filter((function(e){return e.observer})))||void 0===t?void 0:t.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return ne(ue({type:l.tw.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[]},A)};Se.addLoadListener((function(e){try{Ee.push(xe(e.contentDocument))}catch(t){console.warn(t)}}));var Ae=function(){re(),Ee.push(xe(document)),ce=!0};return"interactive"===document.readyState||"complete"===document.readyState?Ae():(Ee.push((0,c.on)("DOMContentLoaded",(function(){ne(ue({type:l.tw.DomContentLoaded,data:{}})),"DOMContentLoaded"===W&&Ae()}))),Ee.push((0,c.on)("load",(function(){ne(ue({type:l.tw.Load,data:{}})),"load"===W&&Ae()}),window))),function(){Ee.forEach((function(e){return e()})),ce=!1}}catch(Te){console.warn(Te)}}de.addCustomEvent=function(e,t){if(!ce)throw new Error("please add custom event after start recording");ne(ue({type:l.tw.Custom,data:{tag:e,payload:t}}))},de.freezePage=function(){w.forEach((function(e){return e.freeze()}))},de.takeFullSnapshot=function(e){if(!ce)throw new Error("please take full snapshot after start recording");re(e)},de.mirror=le;var fe=(0,i.Z)((function e(t){var n=this;(0,o.Z)(this,e),this.logNativeMutationObserver=!1,this.stopRRWebRecording=function(){},this.eventHandler=void 0,this.currentURL=void 0,this.start=function(){n.stopRRWebRecording=de({emit:n.eventHandler,sampling:{mousemove:!1},userTriggeredOnInput:!0}),n.logNativeMutationObserver&&n.selfObserve(),n.startURLObserver()},this.stop=function(){n.stopRRWebRecording()},this.startURLObserver=function(){window.addEventListener("popstate",(function(e){n.onURLChange()})),window.addEventListener("locationchange",(function(e){n.onURLChange()})),window.addEventListener("hashchange",(function(e){n.onURLChange()}));var e=n,t=window.history.pushState;window.history.pushState=function(){return e.onURLChange(),t.apply(window.history,arguments)};var r=window.history.replaceState;window.history.replaceState=function(){return e.onURLChange(),r.apply(window.history,arguments)}},this.onURLChange=function(){setTimeout((function(){var e=window.location.href;if(e!==n.currentURL){n.currentURL=e;try{de.addCustomEvent("url-change",{url:e})}catch(he){}}}))},this.selfObserve=function(){var e=document.getElementsByTagName("body");new MutationObserver((function(e,t){var n,i=(0,r.Z)(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;"childList"===o.type?console.log("A child node has been added or removed.",o):"attributes"===o.type&&console.log("The ".concat(o.attributeName," attribute was modified."),o)}}catch(a){i.e(a)}finally{i.f()}})).observe(e[0],{attributes:!0,childList:!0,subtree:!0})},this.getNodeById=function(e){return de.mirror.getNode(e)},this.getMeta=function(e){return de.mirror.getMeta(e)},this.eventHandler=t,this.currentURL=window.location.href}))},6301:function(e){e.exports=function(e){return new Promise((function(t){return setTimeout(t,e)}))}},763:function(e,t,n){var r;e=n.nmd(e),function(){var i,o=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",u="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",l=500,d="__lodash_placeholder__",f=1,h=2,p=4,v=1,m=2,g=1,y=2,b=4,w=8,S=16,I=32,C=64,k=128,E=256,x=512,A=30,M="...",T=800,N=16,R=1,_=2,D=1/0,O=9007199254740991,Z=17976931348623157e292,L=NaN,F=4294967295,V=F-1,B=F>>>1,P=[["ary",k],["bind",g],["bindKey",y],["curry",w],["curryRight",S],["flip",x],["partial",I],["partialRight",C],["rearg",E]],j="[object Arguments]",W="[object Array]",U="[object AsyncFunction]",H="[object Boolean]",G="[object Date]",z="[object DOMException]",q="[object Error]",Y="[object Function]",Q="[object GeneratorFunction]",K="[object Map]",X="[object Number]",J="[object Null]",$="[object Object]",ee="[object Promise]",te="[object Proxy]",ne="[object RegExp]",re="[object Set]",ie="[object String]",oe="[object Symbol]",ae="[object Undefined]",se="[object WeakMap]",ue="[object WeakSet]",ce="[object ArrayBuffer]",le="[object DataView]",de="[object Float32Array]",fe="[object Float64Array]",he="[object Int8Array]",pe="[object Int16Array]",ve="[object Int32Array]",me="[object Uint8Array]",ge="[object Uint8ClampedArray]",ye="[object Uint16Array]",be="[object Uint32Array]",we=/\b__p \+= '';/g,Se=/\b(__p \+=) '' \+/g,Ie=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ce=/&(?:amp|lt|gt|quot|#39);/g,ke=/[&<>"']/g,Ee=RegExp(Ce.source),xe=RegExp(ke.source),Ae=/<%-([\s\S]+?)%>/g,Me=/<%([\s\S]+?)%>/g,Te=/<%=([\s\S]+?)%>/g,Ne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Re=/^\w*$/,_e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,De=/[\\^$.*+?()[\]{}|]/g,Oe=RegExp(De.source),Ze=/^\s+/,Le=/\s/,Fe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ve=/\{\n\/\* \[wrapped with (.+)\] \*/,Be=/,? & /,Pe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,je=/[()=,{}\[\]\/\s]/,We=/\\(\\)?/g,Ue=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,He=/\w*$/,Ge=/^[-+]0x[0-9a-f]+$/i,ze=/^0b[01]+$/i,qe=/^\[object .+?Constructor\]$/,Ye=/^0o[0-7]+$/i,Qe=/^(?:0|[1-9]\d*)$/,Ke=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xe=/($^)/,Je=/['\n\r\u2028\u2029\\]/g,$e="\\ud800-\\udfff",et="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",tt="\\u2700-\\u27bf",nt="a-z\\xdf-\\xf6\\xf8-\\xff",rt="A-Z\\xc0-\\xd6\\xd8-\\xde",it="\\ufe0e\\ufe0f",ot="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",at="['\u2019]",st="["+$e+"]",ut="["+ot+"]",ct="["+et+"]",lt="\\d+",dt="["+tt+"]",ft="["+nt+"]",ht="[^"+$e+ot+lt+tt+nt+rt+"]",pt="\\ud83c[\\udffb-\\udfff]",vt="[^"+$e+"]",mt="(?:\\ud83c[\\udde6-\\uddff]){2}",gt="[\\ud800-\\udbff][\\udc00-\\udfff]",yt="["+rt+"]",bt="\\u200d",wt="(?:"+ft+"|"+ht+")",St="(?:"+yt+"|"+ht+")",It="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ct="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",kt="(?:"+ct+"|"+pt+")"+"?",Et="["+it+"]?",xt=Et+kt+("(?:"+bt+"(?:"+[vt,mt,gt].join("|")+")"+Et+kt+")*"),At="(?:"+[dt,mt,gt].join("|")+")"+xt,Mt="(?:"+[vt+ct+"?",ct,mt,gt,st].join("|")+")",Tt=RegExp(at,"g"),Nt=RegExp(ct,"g"),Rt=RegExp(pt+"(?="+pt+")|"+Mt+xt,"g"),_t=RegExp([yt+"?"+ft+"+"+It+"(?="+[ut,yt,"$"].join("|")+")",St+"+"+Ct+"(?="+[ut,yt+wt,"$"].join("|")+")",yt+"?"+wt+"+"+It,yt+"+"+Ct,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",lt,At].join("|"),"g"),Dt=RegExp("["+bt+$e+et+it+"]"),Ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Zt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Lt=-1,Ft={};Ft[de]=Ft[fe]=Ft[he]=Ft[pe]=Ft[ve]=Ft[me]=Ft[ge]=Ft[ye]=Ft[be]=!0,Ft[j]=Ft[W]=Ft[ce]=Ft[H]=Ft[le]=Ft[G]=Ft[q]=Ft[Y]=Ft[K]=Ft[X]=Ft[$]=Ft[ne]=Ft[re]=Ft[ie]=Ft[se]=!1;var Vt={};Vt[j]=Vt[W]=Vt[ce]=Vt[le]=Vt[H]=Vt[G]=Vt[de]=Vt[fe]=Vt[he]=Vt[pe]=Vt[ve]=Vt[K]=Vt[X]=Vt[$]=Vt[ne]=Vt[re]=Vt[ie]=Vt[oe]=Vt[me]=Vt[ge]=Vt[ye]=Vt[be]=!0,Vt[q]=Vt[Y]=Vt[se]=!1;var Bt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pt=parseFloat,jt=parseInt,Wt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Ut="object"==typeof self&&self&&self.Object===Object&&self,Ht=Wt||Ut||Function("return this")(),Gt=t&&!t.nodeType&&t,zt=Gt&&e&&!e.nodeType&&e,qt=zt&&zt.exports===Gt,Yt=qt&&Wt.process,Qt=function(){try{var e=zt&&zt.require&&zt.require("util").types;return e||Yt&&Yt.binding&&Yt.binding("util")}catch(t){}}(),Kt=Qt&&Qt.isArrayBuffer,Xt=Qt&&Qt.isDate,Jt=Qt&&Qt.isMap,$t=Qt&&Qt.isRegExp,en=Qt&&Qt.isSet,tn=Qt&&Qt.isTypedArray;function nn(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function rn(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function on(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function an(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function sn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function un(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function cn(e,t){return!!(null==e?0:e.length)&&bn(e,t,0)>-1}function ln(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function dn(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function fn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function hn(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function pn(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function vn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var mn=Cn("length");function gn(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function yn(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function bn(e,t,n){return t===t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):yn(e,Sn,n)}function wn(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Sn(e){return e!==e}function In(e,t){var n=null==e?0:e.length;return n?xn(e,t)/n:L}function Cn(e){return function(t){return null==t?i:t[e]}}function kn(e){return function(t){return null==e?i:e[t]}}function En(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function xn(e,t){for(var n,r=-1,o=e.length;++r<o;){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function An(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Mn(e){return e?e.slice(0,Gn(e)+1).replace(Ze,""):e}function Tn(e){return function(t){return e(t)}}function Nn(e,t){return dn(t,(function(t){return e[t]}))}function Rn(e,t){return e.has(t)}function _n(e,t){for(var n=-1,r=e.length;++n<r&&bn(t,e[n],0)>-1;);return n}function Dn(e,t){for(var n=e.length;n--&&bn(t,e[n],0)>-1;);return n}var On=kn({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),Zn=kn({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ln(e){return"\\"+Bt[e]}function Fn(e){return Dt.test(e)}function Vn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Bn(e,t){return function(n){return e(t(n))}}function Pn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==d||(e[n]=d,o[i++]=n)}return o}function jn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function Wn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function Un(e){return Fn(e)?function(e){var t=Rt.lastIndex=0;for(;Rt.test(e);)++t;return t}(e):mn(e)}function Hn(e){return Fn(e)?function(e){return e.match(Rt)||[]}(e):function(e){return e.split("")}(e)}function Gn(e){for(var t=e.length;t--&&Le.test(e.charAt(t)););return t}var zn=kn({"&":"&","<":"<",">":">",""":'"',"'":"'"});var qn=function e(t){var n=(t=null==t?Ht:qn.defaults(Ht.Object(),t,qn.pick(Ht,Zt))).Array,r=t.Date,Le=t.Error,$e=t.Function,et=t.Math,tt=t.Object,nt=t.RegExp,rt=t.String,it=t.TypeError,ot=n.prototype,at=$e.prototype,st=tt.prototype,ut=t["__core-js_shared__"],ct=at.toString,lt=st.hasOwnProperty,dt=0,ft=function(){var e=/[^.]+$/.exec(ut&&ut.keys&&ut.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ht=st.toString,pt=ct.call(tt),vt=Ht._,mt=nt("^"+ct.call(lt).replace(De,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),gt=qt?t.Buffer:i,yt=t.Symbol,bt=t.Uint8Array,wt=gt?gt.allocUnsafe:i,St=Bn(tt.getPrototypeOf,tt),It=tt.create,Ct=st.propertyIsEnumerable,kt=ot.splice,Et=yt?yt.isConcatSpreadable:i,xt=yt?yt.iterator:i,At=yt?yt.toStringTag:i,Mt=function(){try{var e=jo(tt,"defineProperty");return e({},"",{}),e}catch(t){}}(),Rt=t.clearTimeout!==Ht.clearTimeout&&t.clearTimeout,Dt=r&&r.now!==Ht.Date.now&&r.now,Bt=t.setTimeout!==Ht.setTimeout&&t.setTimeout,Wt=et.ceil,Ut=et.floor,Gt=tt.getOwnPropertySymbols,zt=gt?gt.isBuffer:i,Yt=t.isFinite,Qt=ot.join,mn=Bn(tt.keys,tt),kn=et.max,Yn=et.min,Qn=r.now,Kn=t.parseInt,Xn=et.random,Jn=ot.reverse,$n=jo(t,"DataView"),er=jo(t,"Map"),tr=jo(t,"Promise"),nr=jo(t,"Set"),rr=jo(t,"WeakMap"),ir=jo(tt,"create"),or=rr&&new rr,ar={},sr=ha($n),ur=ha(er),cr=ha(tr),lr=ha(nr),dr=ha(rr),fr=yt?yt.prototype:i,hr=fr?fr.valueOf:i,pr=fr?fr.toString:i;function vr(e){if(Ns(e)&&!bs(e)&&!(e instanceof br)){if(e instanceof yr)return e;if(lt.call(e,"__wrapped__"))return pa(e)}return new yr(e)}var mr=function(){function e(){}return function(t){if(!Ts(t))return{};if(It)return It(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function gr(){}function yr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function br(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=F,this.__views__=[]}function wr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Sr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ir(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Cr(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ir;++t<n;)this.add(e[t])}function kr(e){var t=this.__data__=new Sr(e);this.size=t.size}function Er(e,t){var n=bs(e),r=!n&&ys(e),i=!n&&!r&&Cs(e),o=!n&&!r&&!i&&Vs(e),a=n||r||i||o,s=a?An(e.length,rt):[],u=s.length;for(var c in e)!t&&!lt.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Yo(c,u))||s.push(c);return s}function xr(e){var t=e.length;return t?e[Ci(0,t-1)]:i}function Ar(e,t){return la(io(e),Lr(t,0,e.length))}function Mr(e){return la(io(e))}function Tr(e,t,n){(n!==i&&!vs(e[t],n)||n===i&&!(t in e))&&Or(e,t,n)}function Nr(e,t,n){var r=e[t];lt.call(e,t)&&vs(r,n)&&(n!==i||t in e)||Or(e,t,n)}function Rr(e,t){for(var n=e.length;n--;)if(vs(e[n][0],t))return n;return-1}function _r(e,t,n,r){return jr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function Dr(e,t){return e&&oo(t,au(t),e)}function Or(e,t,n){"__proto__"==t&&Mt?Mt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Zr(e,t){for(var r=-1,o=t.length,a=n(o),s=null==e;++r<o;)a[r]=s?i:tu(e,t[r]);return a}function Lr(e,t,n){return e===e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function Fr(e,t,n,r,o,a){var s,u=t&f,c=t&h,l=t&p;if(n&&(s=o?n(e,r,o,a):n(e)),s!==i)return s;if(!Ts(e))return e;var d=bs(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&<.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return io(e,s)}else{var v=Ho(e),m=v==Y||v==Q;if(Cs(e))return Ji(e,u);if(v==$||v==j||m&&!o){if(s=c||m?{}:zo(e),!u)return c?function(e,t){return oo(e,Uo(e),t)}(e,function(e,t){return e&&oo(t,su(t),e)}(s,e)):function(e,t){return oo(e,Wo(e),t)}(e,Dr(s,e))}else{if(!Vt[v])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case ce:return $i(e);case H:case G:return new r(+e);case le:return function(e,t){var n=t?$i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case de:case fe:case he:case pe:case ve:case me:case ge:case ye:case be:return eo(e,n);case K:return new r;case X:case ie:return new r(e);case ne:return function(e){var t=new e.constructor(e.source,He.exec(e));return t.lastIndex=e.lastIndex,t}(e);case re:return new r;case oe:return i=e,hr?tt(hr.call(i)):{}}var i}(e,v,u)}}a||(a=new kr);var g=a.get(e);if(g)return g;a.set(e,s),Zs(e)?e.forEach((function(r){s.add(Fr(r,t,n,r,e,a))})):Rs(e)&&e.forEach((function(r,i){s.set(i,Fr(r,t,n,i,e,a))}));var y=d?i:(l?c?Oo:Do:c?su:au)(e);return on(y||e,(function(r,i){y&&(r=e[i=r]),Nr(s,i,Fr(r,t,n,i,e,a))})),s}function Vr(e,t,n){var r=n.length;if(null==e)return!r;for(e=tt(e);r--;){var o=n[r],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function Br(e,t,n){if("function"!=typeof e)throw new it(s);return aa((function(){e.apply(i,n)}),t)}function Pr(e,t,n,r){var i=-1,a=cn,s=!0,u=e.length,c=[],l=t.length;if(!u)return c;n&&(t=dn(t,Tn(n))),r?(a=ln,s=!1):t.length>=o&&(a=Rn,s=!1,t=new Cr(t));e:for(;++i<u;){var d=e[i],f=null==n?d:n(d);if(d=r||0!==d?d:0,s&&f===f){for(var h=l;h--;)if(t[h]===f)continue e;c.push(d)}else a(t,f,r)||c.push(d)}return c}vr.templateSettings={escape:Ae,evaluate:Me,interpolate:Te,variable:"",imports:{_:vr}},vr.prototype=gr.prototype,vr.prototype.constructor=vr,yr.prototype=mr(gr.prototype),yr.prototype.constructor=yr,br.prototype=mr(gr.prototype),br.prototype.constructor=br,wr.prototype.clear=function(){this.__data__=ir?ir(null):{},this.size=0},wr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},wr.prototype.get=function(e){var t=this.__data__;if(ir){var n=t[e];return n===c?i:n}return lt.call(t,e)?t[e]:i},wr.prototype.has=function(e){var t=this.__data__;return ir?t[e]!==i:lt.call(t,e)},wr.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ir&&t===i?c:t,this},Sr.prototype.clear=function(){this.__data__=[],this.size=0},Sr.prototype.delete=function(e){var t=this.__data__,n=Rr(t,e);return!(n<0)&&(n==t.length-1?t.pop():kt.call(t,n,1),--this.size,!0)},Sr.prototype.get=function(e){var t=this.__data__,n=Rr(t,e);return n<0?i:t[n][1]},Sr.prototype.has=function(e){return Rr(this.__data__,e)>-1},Sr.prototype.set=function(e,t){var n=this.__data__,r=Rr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Ir.prototype.clear=function(){this.size=0,this.__data__={hash:new wr,map:new(er||Sr),string:new wr}},Ir.prototype.delete=function(e){var t=Bo(this,e).delete(e);return this.size-=t?1:0,t},Ir.prototype.get=function(e){return Bo(this,e).get(e)},Ir.prototype.has=function(e){return Bo(this,e).has(e)},Ir.prototype.set=function(e,t){var n=Bo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Cr.prototype.add=Cr.prototype.push=function(e){return this.__data__.set(e,c),this},Cr.prototype.has=function(e){return this.__data__.has(e)},kr.prototype.clear=function(){this.__data__=new Sr,this.size=0},kr.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},kr.prototype.get=function(e){return this.__data__.get(e)},kr.prototype.has=function(e){return this.__data__.has(e)},kr.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Sr){var r=n.__data__;if(!er||r.length<o-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ir(r)}return n.set(e,t),this.size=n.size,this};var jr=uo(Qr),Wr=uo(Kr,!0);function Ur(e,t){var n=!0;return jr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function Hr(e,t,n){for(var r=-1,o=e.length;++r<o;){var a=e[r],s=t(a);if(null!=s&&(u===i?s===s&&!Fs(s):n(s,u)))var u=s,c=a}return c}function Gr(e,t){var n=[];return jr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function zr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=qo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?zr(s,t-1,n,r,i):fn(i,s):r||(i[i.length]=s)}return i}var qr=co(),Yr=co(!0);function Qr(e,t){return e&&qr(e,t,au)}function Kr(e,t){return e&&Yr(e,t,au)}function Xr(e,t){return un(t,(function(t){return xs(e[t])}))}function Jr(e,t){for(var n=0,r=(t=Yi(t,e)).length;null!=e&&n<r;)e=e[fa(t[n++])];return n&&n==r?e:i}function $r(e,t,n){var r=t(e);return bs(e)?r:fn(r,n(e))}function ei(e){return null==e?e===i?ae:J:At&&At in tt(e)?function(e){var t=lt.call(e,At),n=e[At];try{e[At]=i;var r=!0}catch(a){}var o=ht.call(e);r&&(t?e[At]=n:delete e[At]);return o}(e):function(e){return ht.call(e)}(e)}function ti(e,t){return e>t}function ni(e,t){return null!=e&<.call(e,t)}function ri(e,t){return null!=e&&t in tt(e)}function ii(e,t,r){for(var o=r?ln:cn,a=e[0].length,s=e.length,u=s,c=n(s),l=1/0,d=[];u--;){var f=e[u];u&&t&&(f=dn(f,Tn(t))),l=Yn(f.length,l),c[u]=!r&&(t||a>=120&&f.length>=120)?new Cr(u&&f):i}f=e[0];var h=-1,p=c[0];e:for(;++h<a&&d.length<l;){var v=f[h],m=t?t(v):v;if(v=r||0!==v?v:0,!(p?Rn(p,m):o(d,m,r))){for(u=s;--u;){var g=c[u];if(!(g?Rn(g,m):o(e[u],m,r)))continue e}p&&p.push(m),d.push(v)}}return d}function oi(e,t,n){var r=null==(e=ra(e,t=Yi(t,e)))?e:e[fa(Ea(t))];return null==r?i:nn(r,e,n)}function ai(e){return Ns(e)&&ei(e)==j}function si(e,t,n,r,o){return e===t||(null==e||null==t||!Ns(e)&&!Ns(t)?e!==e&&t!==t:function(e,t,n,r,o,a){var s=bs(e),u=bs(t),c=s?W:Ho(e),l=u?W:Ho(t),d=(c=c==j?$:c)==$,f=(l=l==j?$:l)==$,h=c==l;if(h&&Cs(e)){if(!Cs(t))return!1;s=!0,d=!1}if(h&&!d)return a||(a=new kr),s||Vs(e)?Ro(e,t,n,r,o,a):function(e,t,n,r,i,o,a){switch(n){case le:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ce:return!(e.byteLength!=t.byteLength||!o(new bt(e),new bt(t)));case H:case G:case X:return vs(+e,+t);case q:return e.name==t.name&&e.message==t.message;case ne:case ie:return e==t+"";case K:var s=Vn;case re:var u=r&v;if(s||(s=jn),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=m,a.set(e,t);var l=Ro(s(e),s(t),r,i,o,a);return a.delete(e),l;case oe:if(hr)return hr.call(e)==hr.call(t)}return!1}(e,t,c,n,r,o,a);if(!(n&v)){var p=d&<.call(e,"__wrapped__"),g=f&<.call(t,"__wrapped__");if(p||g){var y=p?e.value():e,b=g?t.value():t;return a||(a=new kr),o(y,b,n,r,a)}}if(!h)return!1;return a||(a=new kr),function(e,t,n,r,o,a){var s=n&v,u=Do(e),c=u.length,l=Do(t),d=l.length;if(c!=d&&!s)return!1;var f=c;for(;f--;){var h=u[f];if(!(s?h in t:lt.call(t,h)))return!1}var p=a.get(e),m=a.get(t);if(p&&m)return p==t&&m==e;var g=!0;a.set(e,t),a.set(t,e);var y=s;for(;++f<c;){var b=e[h=u[f]],w=t[h];if(r)var S=s?r(w,b,h,t,e,a):r(b,w,h,e,t,a);if(!(S===i?b===w||o(b,w,n,r,a):S)){g=!1;break}y||(y="constructor"==h)}if(g&&!y){var I=e.constructor,C=t.constructor;I==C||!("constructor"in e)||!("constructor"in t)||"function"==typeof I&&I instanceof I&&"function"==typeof C&&C instanceof C||(g=!1)}return a.delete(e),a.delete(t),g}(e,t,n,r,o,a)}(e,t,n,r,si,o))}function ui(e,t,n,r){var o=n.length,a=o,s=!r;if(null==e)return!a;for(e=tt(e);o--;){var u=n[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var c=(u=n[o])[0],l=e[c],d=u[1];if(s&&u[2]){if(l===i&&!(c in e))return!1}else{var f=new kr;if(r)var h=r(l,d,c,e,t,f);if(!(h===i?si(d,l,v|m,r,f):h))return!1}}return!0}function ci(e){return!(!Ts(e)||(t=e,ft&&ft in t))&&(xs(e)?mt:qe).test(ha(e));var t}function li(e){return"function"==typeof e?e:null==e?_u:"object"==typeof e?bs(e)?mi(e[0],e[1]):vi(e):ju(e)}function di(e){if(!$o(e))return mn(e);var t=[];for(var n in tt(e))lt.call(e,n)&&"constructor"!=n&&t.push(n);return t}function fi(e){if(!Ts(e))return function(e){var t=[];if(null!=e)for(var n in tt(e))t.push(n);return t}(e);var t=$o(e),n=[];for(var r in e)("constructor"!=r||!t&<.call(e,r))&&n.push(r);return n}function hi(e,t){return e<t}function pi(e,t){var r=-1,i=Ss(e)?n(e.length):[];return jr(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function vi(e){var t=Po(e);return 1==t.length&&t[0][2]?ta(t[0][0],t[0][1]):function(n){return n===e||ui(n,e,t)}}function mi(e,t){return Ko(e)&&ea(t)?ta(fa(e),t):function(n){var r=tu(n,e);return r===i&&r===t?nu(n,e):si(t,r,v|m)}}function gi(e,t,n,r,o){e!==t&&qr(t,(function(a,s){if(o||(o=new kr),Ts(a))!function(e,t,n,r,o,a,s){var u=ia(e,n),c=ia(t,n),l=s.get(c);if(l)return void Tr(e,n,l);var d=a?a(u,c,n+"",e,t,s):i,f=d===i;if(f){var h=bs(c),p=!h&&Cs(c),v=!h&&!p&&Vs(c);d=c,h||p||v?bs(u)?d=u:Is(u)?d=io(u):p?(f=!1,d=Ji(c,!0)):v?(f=!1,d=eo(c,!0)):d=[]:Ds(c)||ys(c)?(d=u,ys(u)?d=zs(u):Ts(u)&&!xs(u)||(d=zo(c))):f=!1}f&&(s.set(c,d),o(d,c,r,a,s),s.delete(c));Tr(e,n,d)}(e,t,s,n,gi,r,o);else{var u=r?r(ia(e,s),a,s+"",e,t,o):i;u===i&&(u=a),Tr(e,s,u)}}),su)}function yi(e,t){var n=e.length;if(n)return Yo(t+=t<0?n:0,n)?e[t]:i}function bi(e,t,n){t=t.length?dn(t,(function(e){return bs(e)?function(t){return Jr(t,1===e.length?e[0]:e)}:e})):[_u];var r=-1;t=dn(t,Tn(Vo()));var i=pi(e,(function(e,n,i){var o=dn(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;for(;++r<a;){var u=to(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function wi(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Jr(e,a);n(s,a)&&Mi(o,Yi(a,e),s)}return o}function Si(e,t,n,r){var i=r?wn:bn,o=-1,a=t.length,s=e;for(e===t&&(t=io(t)),n&&(s=dn(e,Tn(n)));++o<a;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==e&&kt.call(s,u,1),kt.call(e,u,1);return e}function Ii(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;Yo(i)?kt.call(e,i,1):Pi(e,i)}}return e}function Ci(e,t){return e+Ut(Xn()*(t-e+1))}function ki(e,t){var n="";if(!e||t<1||t>O)return n;do{t%2&&(n+=e),(t=Ut(t/2))&&(e+=e)}while(t);return n}function Ei(e,t){return sa(na(e,t,_u),e+"")}function xi(e){return xr(vu(e))}function Ai(e,t){var n=vu(e);return la(n,Lr(t,0,n.length))}function Mi(e,t,n,r){if(!Ts(e))return e;for(var o=-1,a=(t=Yi(t,e)).length,s=a-1,u=e;null!=u&&++o<a;){var c=fa(t[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var d=u[c];(l=r?r(d,c,u):i)===i&&(l=Ts(d)?d:Yo(t[o+1])?[]:{})}Nr(u,c,l),u=u[c]}return e}var Ti=or?function(e,t){return or.set(e,t),e}:_u,Ni=Mt?function(e,t){return Mt(e,"toString",{configurable:!0,enumerable:!1,value:Tu(t),writable:!0})}:_u;function Ri(e){return la(vu(e))}function _i(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=n(o);++i<o;)a[i]=e[i+t];return a}function Di(e,t){var n;return jr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function Oi(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t===t&&i<=B){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!Fs(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return Zi(e,t,_u,n)}function Zi(e,t,n,r){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!==t,u=null===t,c=Fs(t),l=t===i;o<a;){var d=Ut((o+a)/2),f=n(e[d]),h=f!==i,p=null===f,v=f===f,m=Fs(f);if(s)var g=r||v;else g=l?v&&(r||h):u?v&&h&&(r||!p):c?v&&h&&!p&&(r||!m):!p&&!m&&(r?f<=t:f<t);g?o=d+1:a=d}return Yn(a,V)}function Li(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!vs(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function Fi(e){return"number"==typeof e?e:Fs(e)?L:+e}function Vi(e){if("string"==typeof e)return e;if(bs(e))return dn(e,Vi)+"";if(Fs(e))return pr?pr.call(e):"";var t=e+"";return"0"==t&&1/e==-D?"-0":t}function Bi(e,t,n){var r=-1,i=cn,a=e.length,s=!0,u=[],c=u;if(n)s=!1,i=ln;else if(a>=o){var l=t?null:Eo(e);if(l)return jn(l);s=!1,i=Rn,c=new Cr}else c=t?[]:u;e:for(;++r<a;){var d=e[r],f=t?t(d):d;if(d=n||0!==d?d:0,s&&f===f){for(var h=c.length;h--;)if(c[h]===f)continue e;t&&c.push(f),u.push(d)}else i(c,f,n)||(c!==u&&c.push(f),u.push(d))}return u}function Pi(e,t){return null==(e=ra(e,t=Yi(t,e)))||delete e[fa(Ea(t))]}function ji(e,t,n,r){return Mi(e,t,n(Jr(e,t)),r)}function Wi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?_i(e,r?0:o,r?o+1:i):_i(e,r?o+1:0,r?i:o)}function Ui(e,t){var n=e;return n instanceof br&&(n=n.value()),hn(t,(function(e,t){return t.func.apply(t.thisArg,fn([e],t.args))}),n)}function Hi(e,t,r){var i=e.length;if(i<2)return i?Bi(e[0]):[];for(var o=-1,a=n(i);++o<i;)for(var s=e[o],u=-1;++u<i;)u!=o&&(a[o]=Pr(a[o]||s,e[u],t,r));return Bi(zr(a,1),t,r)}function Gi(e,t,n){for(var r=-1,o=e.length,a=t.length,s={};++r<o;){var u=r<a?t[r]:i;n(s,e[r],u)}return s}function zi(e){return Is(e)?e:[]}function qi(e){return"function"==typeof e?e:_u}function Yi(e,t){return bs(e)?e:Ko(e,t)?[e]:da(qs(e))}var Qi=Ei;function Ki(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:_i(e,t,n)}var Xi=Rt||function(e){return Ht.clearTimeout(e)};function Ji(e,t){if(t)return e.slice();var n=e.length,r=wt?wt(n):new e.constructor(n);return e.copy(r),r}function $i(e){var t=new e.constructor(e.byteLength);return new bt(t).set(new bt(e)),t}function eo(e,t){var n=t?$i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function to(e,t){if(e!==t){var n=e!==i,r=null===e,o=e===e,a=Fs(e),s=t!==i,u=null===t,c=t===t,l=Fs(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!l&&e<t||l&&n&&o&&!r&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}function no(e,t,r,i){for(var o=-1,a=e.length,s=r.length,u=-1,c=t.length,l=kn(a-s,0),d=n(c+l),f=!i;++u<c;)d[u]=t[u];for(;++o<s;)(f||o<a)&&(d[r[o]]=e[o]);for(;l--;)d[u++]=e[o++];return d}function ro(e,t,r,i){for(var o=-1,a=e.length,s=-1,u=r.length,c=-1,l=t.length,d=kn(a-u,0),f=n(d+l),h=!i;++o<d;)f[o]=e[o];for(var p=o;++c<l;)f[p+c]=t[c];for(;++s<u;)(h||o<a)&&(f[p+r[s]]=e[o++]);return f}function io(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function oo(e,t,n,r){var o=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=r?r(n[u],e[u],u,n,e):i;c===i&&(c=e[u]),o?Or(n,u,c):Nr(n,u,c)}return n}function ao(e,t){return function(n,r){var i=bs(n)?rn:_r,o=t?t():{};return i(n,e,Vo(r,2),o)}}function so(e){return Ei((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&Qo(n[0],n[1],s)&&(a=o<3?i:a,o=1),t=tt(t);++r<o;){var u=n[r];u&&e(t,u,r,a)}return t}))}function uo(e,t){return function(n,r){if(null==n)return n;if(!Ss(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=tt(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function co(e){return function(t,n,r){for(var i=-1,o=tt(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}function lo(e){return function(t){var n=Fn(t=qs(t))?Hn(t):i,r=n?n[0]:t.charAt(0),o=n?Ki(n,1).join(""):t.slice(1);return r[e]()+o}}function fo(e){return function(t){return hn(xu(yu(t).replace(Tt,"")),e,"")}}function ho(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=mr(e.prototype),r=e.apply(n,t);return Ts(r)?r:n}}function po(e){return function(t,n,r){var o=tt(t);if(!Ss(t)){var a=Vo(n,3);t=au(t),n=function(e){return a(o[e],e,o)}}var s=e(t,n,r);return s>-1?o[a?t[s]:s]:i}}function vo(e){return _o((function(t){var n=t.length,r=n,o=yr.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new it(s);if(o&&!u&&"wrapper"==Lo(a))var u=new yr([],!0)}for(r=u?r:n;++r<n;){var c=Lo(a=t[r]),l="wrapper"==c?Zo(a):i;u=l&&Xo(l[0])&&l[1]==(k|w|I|E)&&!l[4].length&&1==l[9]?u[Lo(l[0])].apply(u,l[3]):1==a.length&&Xo(a)?u[c]():u.thru(a)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&bs(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function mo(e,t,r,o,a,s,u,c,l,d){var f=t&k,h=t&g,p=t&y,v=t&(w|S),m=t&x,b=p?i:ho(e);return function g(){for(var y=arguments.length,w=n(y),S=y;S--;)w[S]=arguments[S];if(v)var I=Fo(g),C=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(w,I);if(o&&(w=no(w,o,a,v)),s&&(w=ro(w,s,u,v)),y-=C,v&&y<d){var k=Pn(w,I);return Co(e,t,mo,g.placeholder,r,w,k,c,l,d-y)}var E=h?r:this,x=p?E[e]:e;return y=w.length,c?w=function(e,t){var n=e.length,r=Yn(t.length,n),o=io(e);for(;r--;){var a=t[r];e[r]=Yo(a,n)?o[a]:i}return e}(w,c):m&&y>1&&w.reverse(),f&&l<y&&(w.length=l),this&&this!==Ht&&this instanceof g&&(x=b||ho(x)),x.apply(E,w)}}function go(e,t){return function(n,r){return function(e,t,n,r){return Qr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function yo(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=Vi(n),r=Vi(r)):(n=Fi(n),r=Fi(r)),o=e(n,r)}return o}}function bo(e){return _o((function(t){return t=dn(t,Tn(Vo())),Ei((function(n){var r=this;return e(t,(function(e){return nn(e,r,n)}))}))}))}function wo(e,t){var n=(t=t===i?" ":Vi(t)).length;if(n<2)return n?ki(t,e):t;var r=ki(t,Wt(e/Un(t)));return Fn(t)?Ki(Hn(r),0,e).join(""):r.slice(0,e)}function So(e){return function(t,r,o){return o&&"number"!=typeof o&&Qo(t,r,o)&&(r=o=i),t=Ws(t),r===i?(r=t,t=0):r=Ws(r),function(e,t,r,i){for(var o=-1,a=kn(Wt((t-e)/(r||1)),0),s=n(a);a--;)s[i?a:++o]=e,e+=r;return s}(t,r,o=o===i?t<r?1:-1:Ws(o),e)}}function Io(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Gs(t),n=Gs(n)),e(t,n)}}function Co(e,t,n,r,o,a,s,u,c,l){var d=t&w;t|=d?I:C,(t&=~(d?C:I))&b||(t&=~(g|y));var f=[e,t,o,d?a:i,d?s:i,d?i:a,d?i:s,u,c,l],h=n.apply(i,f);return Xo(e)&&oa(h,f),h.placeholder=r,ua(h,e,t)}function ko(e){var t=et[e];return function(e,n){if(e=Gs(e),(n=null==n?0:Yn(Us(n),292))&&Yt(e)){var r=(qs(e)+"e").split("e");return+((r=(qs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Eo=nr&&1/jn(new nr([,-0]))[1]==D?function(e){return new nr(e)}:Fu;function xo(e){return function(t){var n=Ho(t);return n==K?Vn(t):n==re?Wn(t):function(e,t){return dn(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ao(e,t,r,o,a,u,c,l){var f=t&y;if(!f&&"function"!=typeof e)throw new it(s);var h=o?o.length:0;if(h||(t&=~(I|C),o=a=i),c=c===i?c:kn(Us(c),0),l=l===i?l:Us(l),h-=a?a.length:0,t&C){var p=o,v=a;o=a=i}var m=f?i:Zo(e),x=[e,t,r,o,a,p,v,u,c,l];if(m&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<(g|y|k),a=r==k&&n==w||r==k&&n==E&&e[7].length<=t[8]||r==(k|E)&&t[7].length<=t[8]&&n==w;if(!o&&!a)return e;r&g&&(e[2]=t[2],i|=n&g?0:b);var s=t[3];if(s){var u=e[3];e[3]=u?no(u,s,t[4]):s,e[4]=u?Pn(e[3],d):t[4]}(s=t[5])&&(u=e[5],e[5]=u?ro(u,s,t[6]):s,e[6]=u?Pn(e[5],d):t[6]);(s=t[7])&&(e[7]=s);r&k&&(e[8]=null==e[8]?t[8]:Yn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(x,m),e=x[0],t=x[1],r=x[2],o=x[3],a=x[4],!(l=x[9]=x[9]===i?f?0:e.length:kn(x[9]-h,0))&&t&(w|S)&&(t&=~(w|S)),t&&t!=g)A=t==w||t==S?function(e,t,r){var o=ho(e);return function a(){for(var s=arguments.length,u=n(s),c=s,l=Fo(a);c--;)u[c]=arguments[c];var d=s<3&&u[0]!==l&&u[s-1]!==l?[]:Pn(u,l);return(s-=d.length)<r?Co(e,t,mo,a.placeholder,i,u,d,i,i,r-s):nn(this&&this!==Ht&&this instanceof a?o:e,this,u)}}(e,t,l):t!=I&&t!=(g|I)||a.length?mo.apply(i,x):function(e,t,r,i){var o=t&g,a=ho(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=i.length,d=n(l+u),f=this&&this!==Ht&&this instanceof t?a:e;++c<l;)d[c]=i[c];for(;u--;)d[c++]=arguments[++s];return nn(f,o?r:this,d)}}(e,t,r,o);else var A=function(e,t,n){var r=t&g,i=ho(e);return function t(){return(this&&this!==Ht&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,r);return ua((m?Ti:oa)(A,x),e,t)}function Mo(e,t,n,r){return e===i||vs(e,st[n])&&!lt.call(r,n)?t:e}function To(e,t,n,r,o,a){return Ts(e)&&Ts(t)&&(a.set(t,e),gi(e,t,i,To,a),a.delete(t)),e}function No(e){return Ds(e)?i:e}function Ro(e,t,n,r,o,a){var s=n&v,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),d=a.get(t);if(l&&d)return l==t&&d==e;var f=-1,h=!0,p=n&m?new Cr:i;for(a.set(e,t),a.set(t,e);++f<u;){var g=e[f],y=t[f];if(r)var b=s?r(y,g,f,t,e,a):r(g,y,f,e,t,a);if(b!==i){if(b)continue;h=!1;break}if(p){if(!vn(t,(function(e,t){if(!Rn(p,t)&&(g===e||o(g,e,n,r,a)))return p.push(t)}))){h=!1;break}}else if(g!==y&&!o(g,y,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function _o(e){return sa(na(e,i,wa),e+"")}function Do(e){return $r(e,au,Wo)}function Oo(e){return $r(e,su,Uo)}var Zo=or?function(e){return or.get(e)}:Fu;function Lo(e){for(var t=e.name+"",n=ar[t],r=lt.call(ar,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function Fo(e){return(lt.call(vr,"placeholder")?vr:e).placeholder}function Vo(){var e=vr.iteratee||Du;return e=e===Du?li:e,arguments.length?e(arguments[0],arguments[1]):e}function Bo(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function Po(e){for(var t=au(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,ea(i)]}return t}function jo(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return ci(n)?n:i}var Wo=Gt?function(e){return null==e?[]:(e=tt(e),un(Gt(e),(function(t){return Ct.call(e,t)})))}:Hu,Uo=Gt?function(e){for(var t=[];e;)fn(t,Wo(e)),e=St(e);return t}:Hu,Ho=ei;function Go(e,t,n){for(var r=-1,i=(t=Yi(t,e)).length,o=!1;++r<i;){var a=fa(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Ms(i)&&Yo(a,i)&&(bs(e)||ys(e))}function zo(e){return"function"!=typeof e.constructor||$o(e)?{}:mr(St(e))}function qo(e){return bs(e)||ys(e)||!!(Et&&e&&e[Et])}function Yo(e,t){var n=typeof e;return!!(t=null==t?O:t)&&("number"==n||"symbol"!=n&&Qe.test(e))&&e>-1&&e%1==0&&e<t}function Qo(e,t,n){if(!Ts(n))return!1;var r=typeof t;return!!("number"==r?Ss(n)&&Yo(t,n.length):"string"==r&&t in n)&&vs(n[t],e)}function Ko(e,t){if(bs(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Fs(e))||(Re.test(e)||!Ne.test(e)||null!=t&&e in tt(t))}function Xo(e){var t=Lo(e),n=vr[t];if("function"!=typeof n||!(t in br.prototype))return!1;if(e===n)return!0;var r=Zo(n);return!!r&&e===r[0]}($n&&Ho(new $n(new ArrayBuffer(1)))!=le||er&&Ho(new er)!=K||tr&&Ho(tr.resolve())!=ee||nr&&Ho(new nr)!=re||rr&&Ho(new rr)!=se)&&(Ho=function(e){var t=ei(e),n=t==$?e.constructor:i,r=n?ha(n):"";if(r)switch(r){case sr:return le;case ur:return K;case cr:return ee;case lr:return re;case dr:return se}return t});var Jo=ut?xs:Gu;function $o(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||st)}function ea(e){return e===e&&!Ts(e)}function ta(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==i||e in tt(n)))}}function na(e,t,r){return t=kn(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=kn(i.length-t,0),s=n(a);++o<a;)s[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(s),nn(e,this,u)}}function ra(e,t){return t.length<2?e:Jr(e,_i(t,0,-1))}function ia(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}var oa=ca(Ti),aa=Bt||function(e,t){return Ht.setTimeout(e,t)},sa=ca(Ni);function ua(e,t,n){var r=t+"";return sa(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Fe,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return on(P,(function(n){var r="_."+n[0];t&n[1]&&!cn(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(Ve);return t?t[1].split(Be):[]}(r),n)))}function ca(e){var t=0,n=0;return function(){var r=Qn(),o=N-(r-n);if(n=r,o>0){if(++t>=T)return arguments[0]}else t=0;return e.apply(i,arguments)}}function la(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var a=Ci(n,o),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var da=function(e){var t=cs(e,(function(e){return n.size===l&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(_e,(function(e,n,r,i){t.push(r?i.replace(We,"$1"):n||e)})),t}));function fa(e){if("string"==typeof e||Fs(e))return e;var t=e+"";return"0"==t&&1/e==-D?"-0":t}function ha(e){if(null!=e){try{return ct.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function pa(e){if(e instanceof br)return e.clone();var t=new yr(e.__wrapped__,e.__chain__);return t.__actions__=io(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var va=Ei((function(e,t){return Is(e)?Pr(e,zr(t,1,Is,!0)):[]})),ma=Ei((function(e,t){var n=Ea(t);return Is(n)&&(n=i),Is(e)?Pr(e,zr(t,1,Is,!0),Vo(n,2)):[]})),ga=Ei((function(e,t){var n=Ea(t);return Is(n)&&(n=i),Is(e)?Pr(e,zr(t,1,Is,!0),i,n):[]}));function ya(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Us(n);return i<0&&(i=kn(r+i,0)),yn(e,Vo(t,3),i)}function ba(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=Us(n),o=n<0?kn(r+o,0):Yn(o,r-1)),yn(e,Vo(t,3),o,!0)}function wa(e){return(null==e?0:e.length)?zr(e,1):[]}function Sa(e){return e&&e.length?e[0]:i}var Ia=Ei((function(e){var t=dn(e,zi);return t.length&&t[0]===e[0]?ii(t):[]})),Ca=Ei((function(e){var t=Ea(e),n=dn(e,zi);return t===Ea(n)?t=i:n.pop(),n.length&&n[0]===e[0]?ii(n,Vo(t,2)):[]})),ka=Ei((function(e){var t=Ea(e),n=dn(e,zi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?ii(n,i,t):[]}));function Ea(e){var t=null==e?0:e.length;return t?e[t-1]:i}var xa=Ei(Aa);function Aa(e,t){return e&&e.length&&t&&t.length?Si(e,t):e}var Ma=_o((function(e,t){var n=null==e?0:e.length,r=Zr(e,t);return Ii(e,dn(t,(function(e){return Yo(e,n)?+e:e})).sort(to)),r}));function Ta(e){return null==e?e:Jn.call(e)}var Na=Ei((function(e){return Bi(zr(e,1,Is,!0))})),Ra=Ei((function(e){var t=Ea(e);return Is(t)&&(t=i),Bi(zr(e,1,Is,!0),Vo(t,2))})),_a=Ei((function(e){var t=Ea(e);return t="function"==typeof t?t:i,Bi(zr(e,1,Is,!0),i,t)}));function Da(e){if(!e||!e.length)return[];var t=0;return e=un(e,(function(e){if(Is(e))return t=kn(e.length,t),!0})),An(t,(function(t){return dn(e,Cn(t))}))}function Oa(e,t){if(!e||!e.length)return[];var n=Da(e);return null==t?n:dn(n,(function(e){return nn(t,i,e)}))}var Za=Ei((function(e,t){return Is(e)?Pr(e,t):[]})),La=Ei((function(e){return Hi(un(e,Is))})),Fa=Ei((function(e){var t=Ea(e);return Is(t)&&(t=i),Hi(un(e,Is),Vo(t,2))})),Va=Ei((function(e){var t=Ea(e);return t="function"==typeof t?t:i,Hi(un(e,Is),i,t)})),Ba=Ei(Da);var Pa=Ei((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,Oa(e,n)}));function ja(e){var t=vr(e);return t.__chain__=!0,t}function Wa(e,t){return t(e)}var Ua=_o((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return Zr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof br&&Yo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:Wa,args:[o],thisArg:i}),new yr(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)}));var Ha=ao((function(e,t,n){lt.call(e,n)?++e[n]:Or(e,n,1)}));var Ga=po(ya),za=po(ba);function qa(e,t){return(bs(e)?on:jr)(e,Vo(t,3))}function Ya(e,t){return(bs(e)?an:Wr)(e,Vo(t,3))}var Qa=ao((function(e,t,n){lt.call(e,n)?e[n].push(t):Or(e,n,[t])}));var Ka=Ei((function(e,t,r){var i=-1,o="function"==typeof t,a=Ss(e)?n(e.length):[];return jr(e,(function(e){a[++i]=o?nn(t,e,r):oi(e,t,r)})),a})),Xa=ao((function(e,t,n){Or(e,n,t)}));function Ja(e,t){return(bs(e)?dn:pi)(e,Vo(t,3))}var $a=ao((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var es=Ei((function(e,t){if(null==e)return[];var n=t.length;return n>1&&Qo(e,t[0],t[1])?t=[]:n>2&&Qo(t[0],t[1],t[2])&&(t=[t[0]]),bi(e,zr(t,1),[])})),ts=Dt||function(){return Ht.Date.now()};function ns(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Ao(e,k,i,i,i,i,t)}function rs(e,t){var n;if("function"!=typeof t)throw new it(s);return e=Us(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var is=Ei((function(e,t,n){var r=g;if(n.length){var i=Pn(n,Fo(is));r|=I}return Ao(e,r,t,n,i)})),os=Ei((function(e,t,n){var r=g|y;if(n.length){var i=Pn(n,Fo(os));r|=I}return Ao(t,r,e,n,i)}));function as(e,t,n){var r,o,a,u,c,l,d=0,f=!1,h=!1,p=!0;if("function"!=typeof e)throw new it(s);function v(t){var n=r,a=o;return r=o=i,d=t,u=e.apply(a,n)}function m(e){var n=e-l;return l===i||n>=t||n<0||h&&e-d>=a}function g(){var e=ts();if(m(e))return y(e);c=aa(g,function(e){var n=t-(e-l);return h?Yn(n,a-(e-d)):n}(e))}function y(e){return c=i,p&&r?v(e):(r=o=i,u)}function b(){var e=ts(),n=m(e);if(r=arguments,o=this,l=e,n){if(c===i)return function(e){return d=e,c=aa(g,t),f?v(e):u}(l);if(h)return Xi(c),c=aa(g,t),v(l)}return c===i&&(c=aa(g,t)),u}return t=Gs(t)||0,Ts(n)&&(f=!!n.leading,a=(h="maxWait"in n)?kn(Gs(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),b.cancel=function(){c!==i&&Xi(c),d=0,r=l=o=c=i},b.flush=function(){return c===i?u:y(ts())},b}var ss=Ei((function(e,t){return Br(e,1,t)})),us=Ei((function(e,t,n){return Br(e,Gs(t)||0,n)}));function cs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new it(s);var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(cs.Cache||Ir),n}function ls(e){if("function"!=typeof e)throw new it(s);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}cs.Cache=Ir;var ds=Qi((function(e,t){var n=(t=1==t.length&&bs(t[0])?dn(t[0],Tn(Vo())):dn(zr(t,1),Tn(Vo()))).length;return Ei((function(r){for(var i=-1,o=Yn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return nn(e,this,r)}))})),fs=Ei((function(e,t){var n=Pn(t,Fo(fs));return Ao(e,I,i,t,n)})),hs=Ei((function(e,t){var n=Pn(t,Fo(hs));return Ao(e,C,i,t,n)})),ps=_o((function(e,t){return Ao(e,E,i,i,i,t)}));function vs(e,t){return e===t||e!==e&&t!==t}var ms=Io(ti),gs=Io((function(e,t){return e>=t})),ys=ai(function(){return arguments}())?ai:function(e){return Ns(e)&<.call(e,"callee")&&!Ct.call(e,"callee")},bs=n.isArray,ws=Kt?Tn(Kt):function(e){return Ns(e)&&ei(e)==ce};function Ss(e){return null!=e&&Ms(e.length)&&!xs(e)}function Is(e){return Ns(e)&&Ss(e)}var Cs=zt||Gu,ks=Xt?Tn(Xt):function(e){return Ns(e)&&ei(e)==G};function Es(e){if(!Ns(e))return!1;var t=ei(e);return t==q||t==z||"string"==typeof e.message&&"string"==typeof e.name&&!Ds(e)}function xs(e){if(!Ts(e))return!1;var t=ei(e);return t==Y||t==Q||t==U||t==te}function As(e){return"number"==typeof e&&e==Us(e)}function Ms(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=O}function Ts(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ns(e){return null!=e&&"object"==typeof e}var Rs=Jt?Tn(Jt):function(e){return Ns(e)&&Ho(e)==K};function _s(e){return"number"==typeof e||Ns(e)&&ei(e)==X}function Ds(e){if(!Ns(e)||ei(e)!=$)return!1;var t=St(e);if(null===t)return!0;var n=lt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ct.call(n)==pt}var Os=$t?Tn($t):function(e){return Ns(e)&&ei(e)==ne};var Zs=en?Tn(en):function(e){return Ns(e)&&Ho(e)==re};function Ls(e){return"string"==typeof e||!bs(e)&&Ns(e)&&ei(e)==ie}function Fs(e){return"symbol"==typeof e||Ns(e)&&ei(e)==oe}var Vs=tn?Tn(tn):function(e){return Ns(e)&&Ms(e.length)&&!!Ft[ei(e)]};var Bs=Io(hi),Ps=Io((function(e,t){return e<=t}));function js(e){if(!e)return[];if(Ss(e))return Ls(e)?Hn(e):io(e);if(xt&&e[xt])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[xt]());var t=Ho(e);return(t==K?Vn:t==re?jn:vu)(e)}function Ws(e){return e?(e=Gs(e))===D||e===-D?(e<0?-1:1)*Z:e===e?e:0:0===e?e:0}function Us(e){var t=Ws(e),n=t%1;return t===t?n?t-n:t:0}function Hs(e){return e?Lr(Us(e),0,F):0}function Gs(e){if("number"==typeof e)return e;if(Fs(e))return L;if(Ts(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ts(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Mn(e);var n=ze.test(e);return n||Ye.test(e)?jt(e.slice(2),n?2:8):Ge.test(e)?L:+e}function zs(e){return oo(e,su(e))}function qs(e){return null==e?"":Vi(e)}var Ys=so((function(e,t){if($o(t)||Ss(t))oo(t,au(t),e);else for(var n in t)lt.call(t,n)&&Nr(e,n,t[n])})),Qs=so((function(e,t){oo(t,su(t),e)})),Ks=so((function(e,t,n,r){oo(t,su(t),e,r)})),Xs=so((function(e,t,n,r){oo(t,au(t),e,r)})),Js=_o(Zr);var $s=Ei((function(e,t){e=tt(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&Qo(t[0],t[1],o)&&(r=1);++n<r;)for(var a=t[n],s=su(a),u=-1,c=s.length;++u<c;){var l=s[u],d=e[l];(d===i||vs(d,st[l])&&!lt.call(e,l))&&(e[l]=a[l])}return e})),eu=Ei((function(e){return e.push(i,To),nn(cu,i,e)}));function tu(e,t,n){var r=null==e?i:Jr(e,t);return r===i?n:r}function nu(e,t){return null!=e&&Go(e,t,ri)}var ru=go((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=ht.call(t)),e[t]=n}),Tu(_u)),iu=go((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=ht.call(t)),lt.call(e,t)?e[t].push(n):e[t]=[n]}),Vo),ou=Ei(oi);function au(e){return Ss(e)?Er(e):di(e)}function su(e){return Ss(e)?Er(e,!0):fi(e)}var uu=so((function(e,t,n){gi(e,t,n)})),cu=so((function(e,t,n,r){gi(e,t,n,r)})),lu=_o((function(e,t){var n={};if(null==e)return n;var r=!1;t=dn(t,(function(t){return t=Yi(t,e),r||(r=t.length>1),t})),oo(e,Oo(e),n),r&&(n=Fr(n,f|h|p,No));for(var i=t.length;i--;)Pi(n,t[i]);return n}));var du=_o((function(e,t){return null==e?{}:function(e,t){return wi(e,t,(function(t,n){return nu(e,n)}))}(e,t)}));function fu(e,t){if(null==e)return{};var n=dn(Oo(e),(function(e){return[e]}));return t=Vo(t),wi(e,n,(function(e,n){return t(e,n[0])}))}var hu=xo(au),pu=xo(su);function vu(e){return null==e?[]:Nn(e,au(e))}var mu=fo((function(e,t,n){return t=t.toLowerCase(),e+(n?gu(t):t)}));function gu(e){return Eu(qs(e).toLowerCase())}function yu(e){return(e=qs(e))&&e.replace(Ke,On).replace(Nt,"")}var bu=fo((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),wu=fo((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Su=lo("toLowerCase");var Iu=fo((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Cu=fo((function(e,t,n){return e+(n?" ":"")+Eu(t)}));var ku=fo((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Eu=lo("toUpperCase");function xu(e,t,n){return e=qs(e),(t=n?i:t)===i?function(e){return Ot.test(e)}(e)?function(e){return e.match(_t)||[]}(e):function(e){return e.match(Pe)||[]}(e):e.match(t)||[]}var Au=Ei((function(e,t){try{return nn(e,i,t)}catch(n){return Es(n)?n:new Le(n)}})),Mu=_o((function(e,t){return on(t,(function(t){t=fa(t),Or(e,t,is(e[t],e))})),e}));function Tu(e){return function(){return e}}var Nu=vo(),Ru=vo(!0);function _u(e){return e}function Du(e){return li("function"==typeof e?e:Fr(e,f))}var Ou=Ei((function(e,t){return function(n){return oi(n,e,t)}})),Zu=Ei((function(e,t){return function(n){return oi(e,n,t)}}));function Lu(e,t,n){var r=au(t),i=Xr(t,r);null!=n||Ts(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Xr(t,au(t)));var o=!(Ts(n)&&"chain"in n)||!!n.chain,a=xs(e);return on(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=io(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,fn([this.value()],arguments))})})),e}function Fu(){}var Vu=bo(dn),Bu=bo(sn),Pu=bo(vn);function ju(e){return Ko(e)?Cn(fa(e)):function(e){return function(t){return Jr(t,e)}}(e)}var Wu=So(),Uu=So(!0);function Hu(){return[]}function Gu(){return!1}var zu=yo((function(e,t){return e+t}),0),qu=ko("ceil"),Yu=yo((function(e,t){return e/t}),1),Qu=ko("floor");var Ku=yo((function(e,t){return e*t}),1),Xu=ko("round"),Ju=yo((function(e,t){return e-t}),0);return vr.after=function(e,t){if("function"!=typeof t)throw new it(s);return e=Us(e),function(){if(--e<1)return t.apply(this,arguments)}},vr.ary=ns,vr.assign=Ys,vr.assignIn=Qs,vr.assignInWith=Ks,vr.assignWith=Xs,vr.at=Js,vr.before=rs,vr.bind=is,vr.bindAll=Mu,vr.bindKey=os,vr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return bs(e)?e:[e]},vr.chain=ja,vr.chunk=function(e,t,r){t=(r?Qo(e,t,r):t===i)?1:kn(Us(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,u=n(Wt(o/t));a<o;)u[s++]=_i(e,a,a+=t);return u},vr.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},vr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return fn(bs(r)?io(r):[r],zr(t,1))},vr.cond=function(e){var t=null==e?0:e.length,n=Vo();return e=t?dn(e,(function(e){if("function"!=typeof e[1])throw new it(s);return[n(e[0]),e[1]]})):[],Ei((function(n){for(var r=-1;++r<t;){var i=e[r];if(nn(i[0],this,n))return nn(i[1],this,n)}}))},vr.conforms=function(e){return function(e){var t=au(e);return function(n){return Vr(n,e,t)}}(Fr(e,f))},vr.constant=Tu,vr.countBy=Ha,vr.create=function(e,t){var n=mr(e);return null==t?n:Dr(n,t)},vr.curry=function e(t,n,r){var o=Ao(t,w,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},vr.curryRight=function e(t,n,r){var o=Ao(t,S,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},vr.debounce=as,vr.defaults=$s,vr.defaultsDeep=eu,vr.defer=ss,vr.delay=us,vr.difference=va,vr.differenceBy=ma,vr.differenceWith=ga,vr.drop=function(e,t,n){var r=null==e?0:e.length;return r?_i(e,(t=n||t===i?1:Us(t))<0?0:t,r):[]},vr.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?_i(e,0,(t=r-(t=n||t===i?1:Us(t)))<0?0:t):[]},vr.dropRightWhile=function(e,t){return e&&e.length?Wi(e,Vo(t,3),!0,!0):[]},vr.dropWhile=function(e,t){return e&&e.length?Wi(e,Vo(t,3),!0):[]},vr.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&Qo(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=Us(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:Us(r))<0&&(r+=o),r=n>r?0:Hs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},vr.filter=function(e,t){return(bs(e)?un:Gr)(e,Vo(t,3))},vr.flatMap=function(e,t){return zr(Ja(e,t),1)},vr.flatMapDeep=function(e,t){return zr(Ja(e,t),D)},vr.flatMapDepth=function(e,t,n){return n=n===i?1:Us(n),zr(Ja(e,t),n)},vr.flatten=wa,vr.flattenDeep=function(e){return(null==e?0:e.length)?zr(e,D):[]},vr.flattenDepth=function(e,t){return(null==e?0:e.length)?zr(e,t=t===i?1:Us(t)):[]},vr.flip=function(e){return Ao(e,x)},vr.flow=Nu,vr.flowRight=Ru,vr.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},vr.functions=function(e){return null==e?[]:Xr(e,au(e))},vr.functionsIn=function(e){return null==e?[]:Xr(e,su(e))},vr.groupBy=Qa,vr.initial=function(e){return(null==e?0:e.length)?_i(e,0,-1):[]},vr.intersection=Ia,vr.intersectionBy=Ca,vr.intersectionWith=ka,vr.invert=ru,vr.invertBy=iu,vr.invokeMap=Ka,vr.iteratee=Du,vr.keyBy=Xa,vr.keys=au,vr.keysIn=su,vr.map=Ja,vr.mapKeys=function(e,t){var n={};return t=Vo(t,3),Qr(e,(function(e,r,i){Or(n,t(e,r,i),e)})),n},vr.mapValues=function(e,t){var n={};return t=Vo(t,3),Qr(e,(function(e,r,i){Or(n,r,t(e,r,i))})),n},vr.matches=function(e){return vi(Fr(e,f))},vr.matchesProperty=function(e,t){return mi(e,Fr(t,f))},vr.memoize=cs,vr.merge=uu,vr.mergeWith=cu,vr.method=Ou,vr.methodOf=Zu,vr.mixin=Lu,vr.negate=ls,vr.nthArg=function(e){return e=Us(e),Ei((function(t){return yi(t,e)}))},vr.omit=lu,vr.omitBy=function(e,t){return fu(e,ls(Vo(t)))},vr.once=function(e){return rs(2,e)},vr.orderBy=function(e,t,n,r){return null==e?[]:(bs(t)||(t=null==t?[]:[t]),bs(n=r?i:n)||(n=null==n?[]:[n]),bi(e,t,n))},vr.over=Vu,vr.overArgs=ds,vr.overEvery=Bu,vr.overSome=Pu,vr.partial=fs,vr.partialRight=hs,vr.partition=$a,vr.pick=du,vr.pickBy=fu,vr.property=ju,vr.propertyOf=function(e){return function(t){return null==e?i:Jr(e,t)}},vr.pull=xa,vr.pullAll=Aa,vr.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Si(e,t,Vo(n,2)):e},vr.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Si(e,t,i,n):e},vr.pullAt=Ma,vr.range=Wu,vr.rangeRight=Uu,vr.rearg=ps,vr.reject=function(e,t){return(bs(e)?un:Gr)(e,ls(Vo(t,3)))},vr.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=Vo(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Ii(e,i),n},vr.rest=function(e,t){if("function"!=typeof e)throw new it(s);return Ei(e,t=t===i?t:Us(t))},vr.reverse=Ta,vr.sampleSize=function(e,t,n){return t=(n?Qo(e,t,n):t===i)?1:Us(t),(bs(e)?Ar:Ai)(e,t)},vr.set=function(e,t,n){return null==e?e:Mi(e,t,n)},vr.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Mi(e,t,n,r)},vr.shuffle=function(e){return(bs(e)?Mr:Ri)(e)},vr.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&Qo(e,t,n)?(t=0,n=r):(t=null==t?0:Us(t),n=n===i?r:Us(n)),_i(e,t,n)):[]},vr.sortBy=es,vr.sortedUniq=function(e){return e&&e.length?Li(e):[]},vr.sortedUniqBy=function(e,t){return e&&e.length?Li(e,Vo(t,2)):[]},vr.split=function(e,t,n){return n&&"number"!=typeof n&&Qo(e,t,n)&&(t=n=i),(n=n===i?F:n>>>0)?(e=qs(e))&&("string"==typeof t||null!=t&&!Os(t))&&!(t=Vi(t))&&Fn(e)?Ki(Hn(e),0,n):e.split(t,n):[]},vr.spread=function(e,t){if("function"!=typeof e)throw new it(s);return t=null==t?0:kn(Us(t),0),Ei((function(n){var r=n[t],i=Ki(n,0,t);return r&&fn(i,r),nn(e,this,i)}))},vr.tail=function(e){var t=null==e?0:e.length;return t?_i(e,1,t):[]},vr.take=function(e,t,n){return e&&e.length?_i(e,0,(t=n||t===i?1:Us(t))<0?0:t):[]},vr.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?_i(e,(t=r-(t=n||t===i?1:Us(t)))<0?0:t,r):[]},vr.takeRightWhile=function(e,t){return e&&e.length?Wi(e,Vo(t,3),!1,!0):[]},vr.takeWhile=function(e,t){return e&&e.length?Wi(e,Vo(t,3)):[]},vr.tap=function(e,t){return t(e),e},vr.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new it(s);return Ts(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),as(e,t,{leading:r,maxWait:t,trailing:i})},vr.thru=Wa,vr.toArray=js,vr.toPairs=hu,vr.toPairsIn=pu,vr.toPath=function(e){return bs(e)?dn(e,fa):Fs(e)?[e]:io(da(qs(e)))},vr.toPlainObject=zs,vr.transform=function(e,t,n){var r=bs(e),i=r||Cs(e)||Vs(e);if(t=Vo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Ts(e)&&xs(o)?mr(St(e)):{}}return(i?on:Qr)(e,(function(e,r,i){return t(n,e,r,i)})),n},vr.unary=function(e){return ns(e,1)},vr.union=Na,vr.unionBy=Ra,vr.unionWith=_a,vr.uniq=function(e){return e&&e.length?Bi(e):[]},vr.uniqBy=function(e,t){return e&&e.length?Bi(e,Vo(t,2)):[]},vr.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?Bi(e,i,t):[]},vr.unset=function(e,t){return null==e||Pi(e,t)},vr.unzip=Da,vr.unzipWith=Oa,vr.update=function(e,t,n){return null==e?e:ji(e,t,qi(n))},vr.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:ji(e,t,qi(n),r)},vr.values=vu,vr.valuesIn=function(e){return null==e?[]:Nn(e,su(e))},vr.without=Za,vr.words=xu,vr.wrap=function(e,t){return fs(qi(t),e)},vr.xor=La,vr.xorBy=Fa,vr.xorWith=Va,vr.zip=Ba,vr.zipObject=function(e,t){return Gi(e||[],t||[],Nr)},vr.zipObjectDeep=function(e,t){return Gi(e||[],t||[],Mi)},vr.zipWith=Pa,vr.entries=hu,vr.entriesIn=pu,vr.extend=Qs,vr.extendWith=Ks,Lu(vr,vr),vr.add=zu,vr.attempt=Au,vr.camelCase=mu,vr.capitalize=gu,vr.ceil=qu,vr.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=Gs(n))===n?n:0),t!==i&&(t=(t=Gs(t))===t?t:0),Lr(Gs(e),t,n)},vr.clone=function(e){return Fr(e,p)},vr.cloneDeep=function(e){return Fr(e,f|p)},vr.cloneDeepWith=function(e,t){return Fr(e,f|p,t="function"==typeof t?t:i)},vr.cloneWith=function(e,t){return Fr(e,p,t="function"==typeof t?t:i)},vr.conformsTo=function(e,t){return null==t||Vr(e,t,au(t))},vr.deburr=yu,vr.defaultTo=function(e,t){return null==e||e!==e?t:e},vr.divide=Yu,vr.endsWith=function(e,t,n){e=qs(e),t=Vi(t);var r=e.length,o=n=n===i?r:Lr(Us(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},vr.eq=vs,vr.escape=function(e){return(e=qs(e))&&xe.test(e)?e.replace(ke,Zn):e},vr.escapeRegExp=function(e){return(e=qs(e))&&Oe.test(e)?e.replace(De,"\\$&"):e},vr.every=function(e,t,n){var r=bs(e)?sn:Ur;return n&&Qo(e,t,n)&&(t=i),r(e,Vo(t,3))},vr.find=Ga,vr.findIndex=ya,vr.findKey=function(e,t){return gn(e,Vo(t,3),Qr)},vr.findLast=za,vr.findLastIndex=ba,vr.findLastKey=function(e,t){return gn(e,Vo(t,3),Kr)},vr.floor=Qu,vr.forEach=qa,vr.forEachRight=Ya,vr.forIn=function(e,t){return null==e?e:qr(e,Vo(t,3),su)},vr.forInRight=function(e,t){return null==e?e:Yr(e,Vo(t,3),su)},vr.forOwn=function(e,t){return e&&Qr(e,Vo(t,3))},vr.forOwnRight=function(e,t){return e&&Kr(e,Vo(t,3))},vr.get=tu,vr.gt=ms,vr.gte=gs,vr.has=function(e,t){return null!=e&&Go(e,t,ni)},vr.hasIn=nu,vr.head=Sa,vr.identity=_u,vr.includes=function(e,t,n,r){e=Ss(e)?e:vu(e),n=n&&!r?Us(n):0;var i=e.length;return n<0&&(n=kn(i+n,0)),Ls(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&bn(e,t,n)>-1},vr.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Us(n);return i<0&&(i=kn(r+i,0)),bn(e,t,i)},vr.inRange=function(e,t,n){return t=Ws(t),n===i?(n=t,t=0):n=Ws(n),function(e,t,n){return e>=Yn(t,n)&&e<kn(t,n)}(e=Gs(e),t,n)},vr.invoke=ou,vr.isArguments=ys,vr.isArray=bs,vr.isArrayBuffer=ws,vr.isArrayLike=Ss,vr.isArrayLikeObject=Is,vr.isBoolean=function(e){return!0===e||!1===e||Ns(e)&&ei(e)==H},vr.isBuffer=Cs,vr.isDate=ks,vr.isElement=function(e){return Ns(e)&&1===e.nodeType&&!Ds(e)},vr.isEmpty=function(e){if(null==e)return!0;if(Ss(e)&&(bs(e)||"string"==typeof e||"function"==typeof e.splice||Cs(e)||Vs(e)||ys(e)))return!e.length;var t=Ho(e);if(t==K||t==re)return!e.size;if($o(e))return!di(e).length;for(var n in e)if(lt.call(e,n))return!1;return!0},vr.isEqual=function(e,t){return si(e,t)},vr.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?si(e,t,i,n):!!r},vr.isError=Es,vr.isFinite=function(e){return"number"==typeof e&&Yt(e)},vr.isFunction=xs,vr.isInteger=As,vr.isLength=Ms,vr.isMap=Rs,vr.isMatch=function(e,t){return e===t||ui(e,t,Po(t))},vr.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,ui(e,t,Po(t),n)},vr.isNaN=function(e){return _s(e)&&e!=+e},vr.isNative=function(e){if(Jo(e))throw new Le(a);return ci(e)},vr.isNil=function(e){return null==e},vr.isNull=function(e){return null===e},vr.isNumber=_s,vr.isObject=Ts,vr.isObjectLike=Ns,vr.isPlainObject=Ds,vr.isRegExp=Os,vr.isSafeInteger=function(e){return As(e)&&e>=-O&&e<=O},vr.isSet=Zs,vr.isString=Ls,vr.isSymbol=Fs,vr.isTypedArray=Vs,vr.isUndefined=function(e){return e===i},vr.isWeakMap=function(e){return Ns(e)&&Ho(e)==se},vr.isWeakSet=function(e){return Ns(e)&&ei(e)==ue},vr.join=function(e,t){return null==e?"":Qt.call(e,t)},vr.kebabCase=bu,vr.last=Ea,vr.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=Us(n))<0?kn(r+o,0):Yn(o,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):yn(e,Sn,o,!0)},vr.lowerCase=wu,vr.lowerFirst=Su,vr.lt=Bs,vr.lte=Ps,vr.max=function(e){return e&&e.length?Hr(e,_u,ti):i},vr.maxBy=function(e,t){return e&&e.length?Hr(e,Vo(t,2),ti):i},vr.mean=function(e){return In(e,_u)},vr.meanBy=function(e,t){return In(e,Vo(t,2))},vr.min=function(e){return e&&e.length?Hr(e,_u,hi):i},vr.minBy=function(e,t){return e&&e.length?Hr(e,Vo(t,2),hi):i},vr.stubArray=Hu,vr.stubFalse=Gu,vr.stubObject=function(){return{}},vr.stubString=function(){return""},vr.stubTrue=function(){return!0},vr.multiply=Ku,vr.nth=function(e,t){return e&&e.length?yi(e,Us(t)):i},vr.noConflict=function(){return Ht._===this&&(Ht._=vt),this},vr.noop=Fu,vr.now=ts,vr.pad=function(e,t,n){e=qs(e);var r=(t=Us(t))?Un(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return wo(Ut(i),n)+e+wo(Wt(i),n)},vr.padEnd=function(e,t,n){e=qs(e);var r=(t=Us(t))?Un(e):0;return t&&r<t?e+wo(t-r,n):e},vr.padStart=function(e,t,n){e=qs(e);var r=(t=Us(t))?Un(e):0;return t&&r<t?wo(t-r,n)+e:e},vr.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),Kn(qs(e).replace(Ze,""),t||0)},vr.random=function(e,t,n){if(n&&"boolean"!=typeof n&&Qo(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=Ws(e),t===i?(t=e,e=0):t=Ws(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=Xn();return Yn(e+o*(t-e+Pt("1e-"+((o+"").length-1))),t)}return Ci(e,t)},vr.reduce=function(e,t,n){var r=bs(e)?hn:En,i=arguments.length<3;return r(e,Vo(t,4),n,i,jr)},vr.reduceRight=function(e,t,n){var r=bs(e)?pn:En,i=arguments.length<3;return r(e,Vo(t,4),n,i,Wr)},vr.repeat=function(e,t,n){return t=(n?Qo(e,t,n):t===i)?1:Us(t),ki(qs(e),t)},vr.replace=function(){var e=arguments,t=qs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},vr.result=function(e,t,n){var r=-1,o=(t=Yi(t,e)).length;for(o||(o=1,e=i);++r<o;){var a=null==e?i:e[fa(t[r])];a===i&&(r=o,a=n),e=xs(a)?a.call(e):a}return e},vr.round=Xu,vr.runInContext=e,vr.sample=function(e){return(bs(e)?xr:xi)(e)},vr.size=function(e){if(null==e)return 0;if(Ss(e))return Ls(e)?Un(e):e.length;var t=Ho(e);return t==K||t==re?e.size:di(e).length},vr.snakeCase=Iu,vr.some=function(e,t,n){var r=bs(e)?vn:Di;return n&&Qo(e,t,n)&&(t=i),r(e,Vo(t,3))},vr.sortedIndex=function(e,t){return Oi(e,t)},vr.sortedIndexBy=function(e,t,n){return Zi(e,t,Vo(n,2))},vr.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Oi(e,t);if(r<n&&vs(e[r],t))return r}return-1},vr.sortedLastIndex=function(e,t){return Oi(e,t,!0)},vr.sortedLastIndexBy=function(e,t,n){return Zi(e,t,Vo(n,2),!0)},vr.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=Oi(e,t,!0)-1;if(vs(e[n],t))return n}return-1},vr.startCase=Cu,vr.startsWith=function(e,t,n){return e=qs(e),n=null==n?0:Lr(Us(n),0,e.length),t=Vi(t),e.slice(n,n+t.length)==t},vr.subtract=Ju,vr.sum=function(e){return e&&e.length?xn(e,_u):0},vr.sumBy=function(e,t){return e&&e.length?xn(e,Vo(t,2)):0},vr.template=function(e,t,n){var r=vr.templateSettings;n&&Qo(e,t,n)&&(t=i),e=qs(e),t=Ks({},t,r,Mo);var o,a,s=Ks({},t.imports,r.imports,Mo),c=au(s),l=Nn(s,c),d=0,f=t.interpolate||Xe,h="__p += '",p=nt((t.escape||Xe).source+"|"+f.source+"|"+(f===Te?Ue:Xe).source+"|"+(t.evaluate||Xe).source+"|$","g"),v="//# sourceURL="+(lt.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Lt+"]")+"\n";e.replace(p,(function(t,n,r,i,s,u){return r||(r=i),h+=e.slice(d,u).replace(Je,Ln),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),d=u+t.length,t})),h+="';\n";var m=lt.call(t,"variable")&&t.variable;if(m){if(je.test(m))throw new Le(u)}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(we,""):h).replace(Se,"$1").replace(Ie,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=Au((function(){return $e(c,v+"return "+h).apply(i,l)}));if(g.source=h,Es(g))throw g;return g},vr.times=function(e,t){if((e=Us(e))<1||e>O)return[];var n=F,r=Yn(e,F);t=Vo(t),e-=F;for(var i=An(r,t);++n<e;)t(n);return i},vr.toFinite=Ws,vr.toInteger=Us,vr.toLength=Hs,vr.toLower=function(e){return qs(e).toLowerCase()},vr.toNumber=Gs,vr.toSafeInteger=function(e){return e?Lr(Us(e),-O,O):0===e?e:0},vr.toString=qs,vr.toUpper=function(e){return qs(e).toUpperCase()},vr.trim=function(e,t,n){if((e=qs(e))&&(n||t===i))return Mn(e);if(!e||!(t=Vi(t)))return e;var r=Hn(e),o=Hn(t);return Ki(r,_n(r,o),Dn(r,o)+1).join("")},vr.trimEnd=function(e,t,n){if((e=qs(e))&&(n||t===i))return e.slice(0,Gn(e)+1);if(!e||!(t=Vi(t)))return e;var r=Hn(e);return Ki(r,0,Dn(r,Hn(t))+1).join("")},vr.trimStart=function(e,t,n){if((e=qs(e))&&(n||t===i))return e.replace(Ze,"");if(!e||!(t=Vi(t)))return e;var r=Hn(e);return Ki(r,_n(r,Hn(t))).join("")},vr.truncate=function(e,t){var n=A,r=M;if(Ts(t)){var o="separator"in t?t.separator:o;n="length"in t?Us(t.length):n,r="omission"in t?Vi(t.omission):r}var a=(e=qs(e)).length;if(Fn(e)){var s=Hn(e);a=s.length}if(n>=a)return e;var u=n-Un(r);if(u<1)return r;var c=s?Ki(s,0,u).join(""):e.slice(0,u);if(o===i)return c+r;if(s&&(u+=c.length-u),Os(o)){if(e.slice(u).search(o)){var l,d=c;for(o.global||(o=nt(o.source,qs(He.exec(o))+"g")),o.lastIndex=0;l=o.exec(d);)var f=l.index;c=c.slice(0,f===i?u:f)}}else if(e.indexOf(Vi(o),u)!=u){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+r},vr.unescape=function(e){return(e=qs(e))&&Ee.test(e)?e.replace(Ce,zn):e},vr.uniqueId=function(e){var t=++dt;return qs(e)+t},vr.upperCase=ku,vr.upperFirst=Eu,vr.each=qa,vr.eachRight=Ya,vr.first=Sa,Lu(vr,function(){var e={};return Qr(vr,(function(t,n){lt.call(vr.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),vr.VERSION="4.17.21",on(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){vr[e].placeholder=vr})),on(["drop","take"],(function(e,t){br.prototype[e]=function(n){n=n===i?1:kn(Us(n),0);var r=this.__filtered__&&!t?new br(this):this.clone();return r.__filtered__?r.__takeCount__=Yn(n,r.__takeCount__):r.__views__.push({size:Yn(n,F),type:e+(r.__dir__<0?"Right":"")}),r},br.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),on(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=n==R||3==n;br.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Vo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),on(["head","last"],(function(e,t){var n="take"+(t?"Right":"");br.prototype[e]=function(){return this[n](1).value()[0]}})),on(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");br.prototype[e]=function(){return this.__filtered__?new br(this):this[n](1)}})),br.prototype.compact=function(){return this.filter(_u)},br.prototype.find=function(e){return this.filter(e).head()},br.prototype.findLast=function(e){return this.reverse().find(e)},br.prototype.invokeMap=Ei((function(e,t){return"function"==typeof e?new br(this):this.map((function(n){return oi(n,e,t)}))})),br.prototype.reject=function(e){return this.filter(ls(Vo(e)))},br.prototype.slice=function(e,t){e=Us(e);var n=this;return n.__filtered__&&(e>0||t<0)?new br(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=Us(t))<0?n.dropRight(-t):n.take(t-e)),n)},br.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},br.prototype.toArray=function(){return this.take(F)},Qr(br.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=vr[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(vr.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof br,c=s[0],l=u||bs(t),d=function(e){var t=o.apply(vr,fn([e],s));return r&&f?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var f=this.__chain__,h=!!this.__actions__.length,p=a&&!f,v=u&&!h;if(!a&&l){t=v?t:new br(this);var m=e.apply(t,s);return m.__actions__.push({func:Wa,args:[d],thisArg:i}),new yr(m,f)}return p&&v?e.apply(this,s):(m=this.thru(d),p?r?m.value()[0]:m.value():m)})})),on(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ot[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);vr.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(bs(i)?i:[],e)}return this[n]((function(n){return t.apply(bs(n)?n:[],e)}))}})),Qr(br.prototype,(function(e,t){var n=vr[t];if(n){var r=n.name+"";lt.call(ar,r)||(ar[r]=[]),ar[r].push({name:t,func:n})}})),ar[mo(i,y).name]=[{name:"wrapper",func:i}],br.prototype.clone=function(){var e=new br(this.__wrapped__);return e.__actions__=io(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=io(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=io(this.__views__),e},br.prototype.reverse=function(){if(this.__filtered__){var e=new br(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},br.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=bs(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=Yn(t,e+a);break;case"takeRight":e=kn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,d=l.length,f=0,h=Yn(u,this.__takeCount__);if(!n||!r&&i==u&&h==u)return Ui(e,this.__actions__);var p=[];e:for(;u--&&f<h;){for(var v=-1,m=e[c+=t];++v<d;){var g=l[v],y=g.iteratee,b=g.type,w=y(m);if(b==_)m=w;else if(!w){if(b==R)continue e;break e}}p[f++]=m}return p},vr.prototype.at=Ua,vr.prototype.chain=function(){return ja(this)},vr.prototype.commit=function(){return new yr(this.value(),this.__chain__)},vr.prototype.next=function(){this.__values__===i&&(this.__values__=js(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},vr.prototype.plant=function(e){for(var t,n=this;n instanceof gr;){var r=pa(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},vr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof br){var t=e;return this.__actions__.length&&(t=new br(this)),(t=t.reverse()).__actions__.push({func:Wa,args:[Ta],thisArg:i}),new yr(t,this.__chain__)}return this.thru(Ta)},vr.prototype.toJSON=vr.prototype.valueOf=vr.prototype.value=function(){return Ui(this.__wrapped__,this.__actions__)},vr.prototype.first=vr.prototype.head,xt&&(vr.prototype[xt]=function(){return this}),vr}();Ht._=qn,(r=function(){return qn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},2352:function(e){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"d",(function(){return k})),n.d(t,"b",(function(){return E})),n.d(t,"c",(function(){return x}));var r=n(1),i=n.n(r),o=n(14),a=n.n(o),s=n(2),u=n.n(s),c=n(15),l=n.n(c);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var f=Array.isArray,h=Object.keys;function p(e){return"function"==typeof e}function v(e){return e instanceof HTMLElement||e instanceof Text}function m(e){return"object"===u()(e)&&!f(e)}function g(e){if(!e||"string"==typeof e)return e;var t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);return delete t.children,t}function y(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!(!f(e)||!f(t))&&(n?e.length===t.length&&!e.find((function(e){return!t.includes(e)})):e.some((function(e){return t.includes(e)})))}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[];if(!h(e).length)return!0;if(null===t||!h(t).length)return!1;if(n)return l()(e,t);var i=h(e).filter((function(e){return h(t).includes(e)}));return i.forEach((function(n){m(e[n])&&m(t[n])&&(r=r.concat(b(e[n],t[n]))),(e[n]===t[n]||y(e[n],t[n]))&&r.push(t)})),r.length>0&&r.filter((function(e){return e})).length===i.length}function w(e){var t,n={children:[]};if(!e)return n;n.name=p(t=e.type)?t.displayName||t.name:t,n.props=g(e.memoizedProps),n.state=function(e){if(e)return e.baseState||e}(e.memoizedState);var r=e.child;if(r)for(n.children.push(r);r.sibling;)n.children.push(r.sibling),r=r.sibling;return n.children=n.children.map((function(e){return w(e)})),p(e.type)&&function(e){return e.children.length>1}(n)?(n.node=function(e){return e.children.map((function(e){return e.node})).filter((function(e){return!!e}))}(n),n.isFragment=!0):n.node=function(e){return v(e.stateNode)?e.stateNode:e.child&&v(e.child.stateNode)?e.child.stateNode:null}(e),n}function S(e){for(;e.length;){var t=e.shift();if(t.node)return t.node;t.children&&Array.isArray(t.children)&&e.push.apply(e,i()(t.children))}}function I(e,t){for(var n=[];e.length;){var r=e.shift().children;r&&Array.isArray(r)&&r.forEach((function(r){t(r)&&(!r.node&&Array.isArray(r.children)&&(r.node=S(r.children.concat([]))),n.push(r)),e.push(r)}))}return n}function C(e,t){var n=function(e){if(e){var t=e.split("(");return 1===t.length?e:t.find((function(e){return e.includes(")")})).replace(/\)*/g,"")}}(t);return new RegExp("^"+e.split("*").map((function(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")})).join(".+")+"$").test(n)}function k(e,t){var n=arguments.length>3?arguments[3]:void 0;return e.reduce((function(e,t){return e.concat(I(e,n&&"function"==typeof n?n:function(e){return"string"==typeof e.name?C(t,e.name):null!==e.name&&"object"===u()(e.name)&&C(t,e.name.displayName)}))}),[t])}function E(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return p(n)?(console.warn("Functions are not supported as filter matchers"),[]):e.filter((function(e){return m(n)&&b(n,e[t],r)||f(n)&&y(n,e[t],r)||e[t]===n}))}function x(e){if(e.hasOwnProperty("_reactRootContainer"))return e._reactRootContainer._internalRoot.current;var t=Object.keys(e).find((function(e){return e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber")||e.startsWith("__reactContainer")}));return t?e[t]:void 0}},function(e,t,n){var r=n(17),i=n(18),o=n(19),a=n(20);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(6);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(3),i=n(6),o=n(22),a=n(23);function s(t){var n="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.default=e.exports,e.exports.__esModule=!0,s(t)}e.exports=s,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i}));var r=n(0);function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,n=arguments.length>1?arguments[1]:void 0;if(e.isReactLoaded)return Promise.resolve("React already loaded");var i=function(){var e=document.createTreeWalker(document);if(n)return document.querySelector(n);for(;e.nextNode();)if(e.currentNode.hasOwnProperty("_reactRootContainer"))return e.currentNode};return new Promise((function(n,o){var a=!1,s=null;!function t(){var o=i();if(o&&(e.isReactLoaded=!0,e.rootReactElement=Object(r.c)(o),e.rootReactElement))return clearTimeout(s),n();a||setTimeout(t,200)}(),s=setTimeout((function(){a=!0,o("Timed out")}),t)}))}}).call(this,n(9))},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n(1),i=n.n(r),o=n(4),a=n.n(o),s=n(5),u=n.n(s),c=n(7),l=n.n(c),d=n(13),f=n.n(d),h=n(3),p=n.n(h),v=n(8),m=n.n(v),g=n(0);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}var b=function(e){l()(n,e);var t=y(n);function n(e){return a()(this,n),e||(e=[]),t.call.apply(t,[this].concat(i()(e)))}return u()(n,[{key:"byProps",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this,"props",e,t))}},{key:"byState",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this,"state",e,t))}}]),n}(m()(Array)),w=function(e){l()(n,e);var t=y(n);function n(e,r){var i;for(var o in a()(this,n),(i=t.call(this,e))._nodes=r,e)i[o]=e[o];return i}return u()(n,[{key:"byProps",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this._nodes,"props",e,t)[0],this._nodes)}},{key:"byState",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this._nodes,"state",e,t)[0],this._nodes)}}]),n}(m()(Object)),S=function(){function e(t,n){a()(this,e),this.selectors=t.split(" ").filter((function(e){return!!e})).map((function(e){return e.trim()})),this.rootComponent=n,this.tree=Object(g.a)(this.rootComponent)}return u()(e,[{key:"find",value:function(){return this.nodes=new b(Object(g.d)(this.selectors,this.tree,!0)),new w(this.nodes[0],this.nodes)}},{key:"findAll",value:function(){return new b(Object(g.d)(this.selectors,this.tree))}}]),e}()},function(e,t,n){var r=n(2).default,i=n(21);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=Array.isArray,i=Object.keys,o=Object.prototype.hasOwnProperty;e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var a,s,u,c=r(t),l=r(n);if(c&&l){if((s=t.length)!=n.length)return!1;for(a=s;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if(c!=l)return!1;var d=t instanceof Date,f=n instanceof Date;if(d!=f)return!1;if(d&&f)return t.getTime()==n.getTime();var h=t instanceof RegExp,p=n instanceof RegExp;if(h!=p)return!1;if(h&&p)return t.toString()==n.toString();var v=i(t);if((s=v.length)!==i(n).length)return!1;for(a=s;0!=a--;)if(!o.call(n,v[a]))return!1;for(a=s;0!=a--;)if(!e(t[u=v[a]],n[u]))return!1;return!0}return t!=t&&n!=n}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"resq$",(function(){return s})),n.d(t,"resq$$",(function(){return u}));var r=n(12),i=n(11);n.d(t,"waitToLoadReact",(function(){return i.a}));var o=n(0);function a(t,n,i){if(!i&&!e.isReactLoaded)throw new Error("Could not find the root element of your application");var a=e.rootReactElement;if(i instanceof HTMLElement&&(a=Object(o.c)(i)),!a)throw new Error("Could not find instance of React in given element");return new r.a(t,a)[n]()}function s(e,t){return a(e,"find",t)}function u(e,t){return a(e,"findAll",t)}}.call(this,n(9))},function(e,t,n){var r=n(10);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(10);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(6),i=n(24);function o(t,n,a){return i()?(e.exports=o=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},e.exports.default=e.exports,e.exports.__esModule=!0),o.apply(null,arguments)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.default=e.exports,e.exports.__esModule=!0}])},573:function(e,t,n){var r=n(763);function i(e){return e.reduce((function(e,t,n,r){return e+t}))}function o(e){if(r.isArray(e))return e;if("string"===typeof e)return e.split("");throw Error("Parameter must be a string or array.")}t.$m=function(e,t){return e=o(e),t=o(t),r.intersection(e,t).length/r.union(e,t).length}},907:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:function(){return r}})},7326:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},5861:function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,u,"next",e)}function u(e){r(a,i,o,s,u,"throw",e)}s(void 0)}))}}n.d(t,{Z:function(){return i}})},5671:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return r}})},5647:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9611),i=n(8814);function o(e,t,n){return o=(0,i.Z)()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&(0,r.Z)(o,n.prototype),o},o.apply(null,arguments)}},3144:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9142);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(0,r.Z)(i.key),i)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},7762:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(181);function i(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(0,r.Z)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}},7277:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(1120),i=n(8814),o=n(1002),a=n(7326);function s(e){var t=(0,i.Z)();return function(){var n,i=(0,r.Z)(e);if(t){var s=(0,r.Z)(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===(0,o.Z)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,a.Z)(e)}(this,n)}}},4942:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9142);function i(e,t,n){return(t=(0,r.Z)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},1752:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1120);function i(){return i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=(0,r.Z)(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},i.apply(this,arguments)}},1120:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:function(){return r}})},136:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9611);function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.Z)(e,t)}},8814:function(e,t,n){"use strict";function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}n.d(t,{Z:function(){return r}})},1413:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(4942);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},4165:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1002);function i(){i=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(N){l=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var i=t&&t.prototype instanceof p?t:p,a=Object.create(i.prototype),s=new A(r||[]);return o(a,"_invoke",{value:C(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(N){return{type:"throw",arg:N}}}e.wrap=d;var h={};function p(){}function v(){}function m(){}var g={};l(g,s,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(M([])));b&&b!==t&&n.call(b,s)&&(g=b);var w=m.prototype=p.prototype=Object.create(g);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function I(e,t){function i(o,a,s,u){var c=f(e[o],e,a);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==(0,r.Z)(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,s,u)}),(function(e){i("throw",e,s,u)})):t.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return i("throw",e,s,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return a=a?a.then(r,r):r()}})}function C(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return T()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function k(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=f(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,h;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function M(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return v.prototype=m,o(w,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:v,configurable:!0}),v.displayName=l(m,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,l(e,c,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},S(I.prototype),l(I.prototype,u,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new I(d(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(w),l(w,c,"Generator"),l(w,s,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=M,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:M(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}},9611:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:function(){return r}})},885:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(181);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(l){c=!0,i=l}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||(0,r.Z)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},2982:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(907);var i=n(181);function o(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,i.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},9142:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1002);function i(e){var t=function(e,t){if("object"!==(0,r.Z)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==(0,r.Z)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===(0,r.Z)(t)?t:String(t)}},1002:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:function(){return r}})},181:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(907);function i(e,t){if(e){if("string"===typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}},3464:function(e,t,n){"use strict";n.d(t,{J:function(){return s},c:function(){return a}});for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="undefined"===typeof Uint8Array?[]:new Uint8Array(256),o=0;o<r.length;o++)i[r.charCodeAt(o)]=o;var a=function(e){var t,n=new Uint8Array(e),i=n.length,o="";for(t=0;t<i;t+=3)o+=r[n[t]>>2],o+=r[(3&n[t])<<4|n[t+1]>>4],o+=r[(15&n[t+1])<<2|n[t+2]>>6],o+=r[63&n[t+2]];return i%3===2?o=o.substring(0,o.length-1)+"=":i%3===1&&(o=o.substring(0,o.length-2)+"=="),o},s=function(e){var t,n,r,o,a,s=.75*e.length,u=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var l=new ArrayBuffer(s),d=new Uint8Array(l);for(t=0;t<u;t+=4)n=i[e.charCodeAt(t)],r=i[e.charCodeAt(t+1)],o=i[e.charCodeAt(t+2)],a=i[e.charCodeAt(t+3)],d[c++]=n<<2|r>>4,d[c++]=(15&r)<<4|o>>2,d[c++]=(3&o)<<6|63&a;return l}},3246:function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function i(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}n.d(t,{_:function(){return r},m:function(){return i}})},5512:function(e,t,n){"use strict";var r;function i(e){return e.nodeType===e.ELEMENT_NODE}function o(e){var t=null===e||void 0===e?void 0:e.host;return Boolean((null===t||void 0===t?void 0:t.shadowRoot)===e)}function a(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function s(e){try{var t=e.rules||e.cssRules;return t?((n=Array.from(t).map(u).join("")).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),n):null}catch(r){return null}var n}function u(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=s(e.styleSheet)||t}catch(n){}return t}n.d(t,{Bu:function(){return y},CO:function(){return O},DS:function(){return a},Df:function(){return U},GQ:function(){return G},IG:function(){return N},Jq:function(){return r},LS:function(){return u},VU:function(){return z},We:function(){return M},Zq:function(){return o},bZ:function(){return l},eD:function(){return D},pe:function(){return T},wR:function(){return d},zi:function(){return g}}),function(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"}(r||(r={}));var c=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function l(){return new c}function d(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,i=e.value,o=e.maskInputFn,a=i||"";return(t[n.toLowerCase()]||t[r])&&(a=o?o(a):"*".repeat(a.length)),a}var f="__rrweb_original__";var h,p,v=1,m=new RegExp("[^a-z0-9-_:]"),g=-2;function y(){return v++}var b=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,w=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,S=/^(data:)([^,]*),(.*)/i;function I(e,t){return(e||"").replace(b,(function(e,n,r,i,o,a){var s,u=r||o||a,c=n||i||"";if(!u)return e;if(!w.test(u))return"url(".concat(c).concat(u).concat(c,")");if(S.test(u))return"url(".concat(c).concat(u).concat(c,")");if("/"===u[0])return"url(".concat(c).concat((s=t,(s.indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+u)).concat(c,")");var l=t.split("/"),d=u.split("/");l.pop();for(var f=0,h=d;f<h.length;f++){var p=h[f];"."!==p&&(".."===p?l.pop():l.push(p))}return"url(".concat(c).concat(l.join("/")).concat(c,")")}))}var C=/^[^ \t\n\r\u000c]+/,k=/^[, \t\n\r\u000c]+/;function E(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function x(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function A(){var e=document.createElement("a");return e.href="",e.href}function M(e,t,n,r){return"src"===n||"href"===n&&r&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&r&&"#"!==r[0]?E(e,r):"background"!==n||!r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n&&r?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}for(var i=[];r(k),!(n>=t.length);){var o=r(C);if(","===o.slice(-1))o=E(e,o.substring(0,o.length-1)),i.push(o);else{var a="";o=E(e,o);for(var s=!1;;){var u=t.charAt(n);if(""===u){i.push((o+a).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,i.push((o+a).trim());break}"("===u&&(s=!0)}a+=u,n+=1}}}return i.join(", ")}(e,r):"style"===n&&r?I(r,A()):"object"===t&&"data"===n&&r?E(e,r):r:E(e,r)}function T(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&T(e.parentNode,t,n);for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&T(e.parentNode,t,n)}function N(e,t,n){var r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===r)return!1;if("string"===typeof t){if(r.classList.contains(t))return!0;if(r.closest(".".concat(t)))return!0}else if(T(r,t,!0))return!0;if(n){if(r.matches(n))return!0;if(r.closest(n))return!0}return!1}function R(e,t){var n=t.doc,i=t.mirror,o=t.blockClass,a=t.blockSelector,u=t.maskTextClass,c=t.maskTextSelector,l=t.inlineStylesheet,v=t.maskInputOptions,g=void 0===v?{}:v,y=t.maskTextFn,b=t.maskInputFn,w=t.dataURLOptions,S=void 0===w?{}:w,C=t.inlineImages,k=t.recordCanvas,E=t.keepIframeSrcFn,T=t.newlyAddedElement,R=void 0!==T&&T,_=function(e,t){if(!t.hasNode(e))return;var n=t.getId(e);return 1===n?void 0:n}(n,i);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:r.Document,childNodes:[],compatMode:e.compatMode}:{type:r.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:r.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:_};case e.ELEMENT_NODE:return function(e,t){for(var n=t.doc,i=t.blockClass,o=t.blockSelector,a=t.inlineStylesheet,u=t.maskInputOptions,c=void 0===u?{}:u,l=t.maskInputFn,v=t.dataURLOptions,g=void 0===v?{}:v,y=t.inlineImages,b=t.recordCanvas,w=t.keepIframeSrcFn,S=t.newlyAddedElement,C=void 0!==S&&S,k=t.rootId,E=function(e,t,n){if("string"===typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&e.matches(n)}(e,i,o),T=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return m.test(t)?"div":t}(e),N={},R=e.attributes.length,_=0;_<R;_++){var D=e.attributes[_];N[D.name]=M(n,T,D.name,D.value)}if("link"===T&&a){var O=Array.from(n.styleSheets).find((function(t){return t.href===e.href})),Z=null;O&&(Z=s(O)),Z&&(delete N.rel,delete N.href,N._cssText=I(Z,O.href))}if("style"===T&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){(Z=s(e.sheet))&&(N._cssText=I(Z,A()))}if("input"===T||"textarea"===T||"select"===T){var L=e.value,F=e.checked;"radio"!==N.type&&"checkbox"!==N.type&&"submit"!==N.type&&"button"!==N.type&&L?N.value=d({type:N.type,tagName:T,value:L,maskInputOptions:c,maskInputFn:l}):F&&(N.checked=F)}"option"===T&&(e.selected&&!c.select?N.selected=!0:delete N.selected);if("canvas"===T&&b)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var i=t.getImageData,o=f in i?i[f]:i;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(e)||(N.rr_dataURL=e.toDataURL(g.type,g.quality));else if(!("__context"in e)){var V=e.toDataURL(g.type,g.quality),B=document.createElement("canvas");B.width=e.width,B.height=e.height,V!==B.toDataURL(g.type,g.quality)&&(N.rr_dataURL=V)}if("img"===T&&y){h||(h=n.createElement("canvas"),p=h.getContext("2d"));var P=e,j=P.crossOrigin;P.crossOrigin="anonymous";var W=function(){try{h.width=P.naturalWidth,h.height=P.naturalHeight,p.drawImage(P,0,0),N.rr_dataURL=h.toDataURL(g.type,g.quality)}catch(e){console.warn("Cannot inline img src=".concat(P.currentSrc,"! Error: ").concat(e))}j?N.crossOrigin=j:P.removeAttribute("crossorigin")};P.complete&&0!==P.naturalWidth?W():P.onload=W}"audio"!==T&&"video"!==T||(N.rr_mediaState=e.paused?"paused":"played",N.rr_mediaCurrentTime=e.currentTime);C||(e.scrollLeft&&(N.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(N.rr_scrollTop=e.scrollTop));if(E){var U=e.getBoundingClientRect(),H=U.width,G=U.height;N={class:N.class,rr_width:"".concat(H,"px"),rr_height:"".concat(G,"px")}}"iframe"!==T||w(N.src)||(e.contentDocument||(N.rr_src=N.src),delete N.src);return{type:r.Element,tagName:T,attributes:N,childNodes:[],isSVG:x(e)||void 0,needBlock:E,rootId:k}}(e,{doc:n,blockClass:o,blockSelector:a,inlineStylesheet:l,maskInputOptions:g,maskInputFn:b,dataURLOptions:S,inlineImages:C,recordCanvas:k,keepIframeSrcFn:E,newlyAddedElement:R,rootId:_});case e.TEXT_NODE:return function(e,t){var n,i=t.maskTextClass,o=t.maskTextSelector,a=t.maskTextFn,s=t.rootId,u=e.parentNode&&e.parentNode.tagName,c=e.textContent,l="STYLE"===u||void 0,d="SCRIPT"===u||void 0;if(l&&c){try{e.nextSibling||e.previousSibling||(null===(n=e.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(c=(f=e.parentNode.sheet).cssRules?Array.from(f.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(h){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(h),e)}c=I(c,A())}var f;d&&(c="SCRIPT_PLACEHOLDER");!l&&!d&&c&&N(e,i,o)&&(c=a?a(c):c.replace(/[\S]/g,"*"));return{type:r.Text,textContent:c||"",isStyle:l,rootId:s}}(e,{maskTextClass:u,maskTextSelector:c,maskTextFn:y,rootId:_});case e.CDATA_SECTION_NODE:return{type:r.CDATA,textContent:"",rootId:_};case e.COMMENT_NODE:return{type:r.Comment,textContent:e.textContent||"",rootId:_};default:return!1}}function _(e){return void 0===e?"":e.toLowerCase()}function D(e,t){var n,s=t.doc,u=t.mirror,c=t.blockClass,l=t.blockSelector,d=t.maskTextClass,f=t.maskTextSelector,h=t.skipChild,p=void 0!==h&&h,v=t.inlineStylesheet,m=void 0===v||v,b=t.maskInputOptions,w=void 0===b?{}:b,S=t.maskTextFn,I=t.maskInputFn,C=t.slimDOMOptions,k=t.dataURLOptions,E=void 0===k?{}:k,x=t.inlineImages,A=void 0!==x&&x,M=t.recordCanvas,T=void 0!==M&&M,N=t.onSerialize,O=t.onIframeLoad,Z=t.iframeLoadTimeout,L=void 0===Z?5e3:Z,F=t.onStylesheetLoad,V=t.stylesheetLoadTimeout,B=void 0===V?5e3:V,P=t.keepIframeSrcFn,j=void 0===P?function(){return!1}:P,W=t.newlyAddedElement,U=void 0!==W&&W,H=t.preserveWhiteSpace,G=void 0===H||H,z=R(e,{doc:s,mirror:u,blockClass:c,blockSelector:l,maskTextClass:d,maskTextSelector:f,inlineStylesheet:m,maskInputOptions:w,maskTextFn:S,maskInputFn:I,dataURLOptions:E,inlineImages:A,recordCanvas:T,keepIframeSrcFn:j,newlyAddedElement:U});if(!z)return console.warn(e,"not serialized"),null;n=u.hasNode(e)?u.getId(e):!function(e,t){if(t.comment&&e.type===r.Comment)return!0;if(e.type===r.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"===typeof e.attributes.href&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(_(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===_(e.attributes.name)||"icon"===_(e.attributes.rel)||"apple-touch-icon"===_(e.attributes.rel)||"shortcut icon"===_(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&_(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(_(e.attributes.property).match(/^(og|twitter|fb):/)||_(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===_(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===_(e.attributes.name)||"googlebot"===_(e.attributes.name)||"bingbot"===_(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===_(e.attributes.name)||"generator"===_(e.attributes.name)||"framework"===_(e.attributes.name)||"publisher"===_(e.attributes.name)||"progid"===_(e.attributes.name)||_(e.attributes.property).match(/^article:/)||_(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===_(e.attributes.name)||"yandex-verification"===_(e.attributes.name)||"csrf-token"===_(e.attributes.name)||"p:domain_verify"===_(e.attributes.name)||"verify-v1"===_(e.attributes.name)||"verification"===_(e.attributes.name)||"shopify-checkout-api-token"===_(e.attributes.name)))return!0}}return!1}(z,C)&&(G||z.type!==r.Text||z.isStyle||z.textContent.replace(/^\s+|\s+$/gm,"").length)?y():g;var q=Object.assign(z,{id:n});if(u.add(e,q),n===g)return null;N&&N(e);var Y=!p;if(q.type===r.Element){Y=Y&&!q.needBlock,delete q.needBlock;var Q=e.shadowRoot;Q&&a(Q)&&(q.isShadowHost=!0)}if((q.type===r.Document||q.type===r.Element)&&Y){C.headWhitespace&&q.type===r.Element&&"head"===q.tagName&&(G=!1);for(var K={doc:s,mirror:u,blockClass:c,blockSelector:l,maskTextClass:d,maskTextSelector:f,skipChild:p,inlineStylesheet:m,maskInputOptions:w,maskTextFn:S,maskInputFn:I,slimDOMOptions:C,dataURLOptions:E,inlineImages:A,recordCanvas:T,preserveWhiteSpace:G,onSerialize:N,onIframeLoad:O,iframeLoadTimeout:L,onStylesheetLoad:F,stylesheetLoadTimeout:B,keepIframeSrcFn:j},X=0,J=Array.from(e.childNodes);X<J.length;X++){(te=D(J[X],K))&&q.childNodes.push(te)}if(i(e)&&e.shadowRoot)for(var $=0,ee=Array.from(e.shadowRoot.childNodes);$<ee.length;$++){var te;(te=D(ee[$],K))&&(a(e.shadowRoot)&&(te.isShadow=!0),q.childNodes.push(te))}}return e.parentNode&&o(e.parentNode)&&a(e.parentNode)&&(q.isShadow=!0),q.type===r.Element&&"iframe"===q.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(u){return}if("complete"===i){var a="about:blank";if(r.location.href!==a||e.src===a||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((function(){o||(t(),o=!0)}),n);e.addEventListener("load",(function(){clearTimeout(s),o=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&O){var n=D(t,{doc:t,mirror:u,blockClass:c,blockSelector:l,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:m,maskInputOptions:w,maskTextFn:S,maskInputFn:I,slimDOMOptions:C,dataURLOptions:E,inlineImages:A,recordCanvas:T,preserveWhiteSpace:G,onSerialize:N,onIframeLoad:O,iframeLoadTimeout:L,onStylesheetLoad:F,stylesheetLoadTimeout:B,keepIframeSrcFn:j});n&&O(e,n)}}),L),q.type===r.Element&&"link"===q.tagName&&"stylesheet"===q.attributes.rel&&function(e,t,n){var r,i=!1;try{r=e.sheet}catch(a){return}if(!r){var o=setTimeout((function(){i||(t(),i=!0)}),n);e.addEventListener("load",(function(){clearTimeout(o),i=!0,t()}))}}(e,(function(){if(F){var t=D(e,{doc:s,mirror:u,blockClass:c,blockSelector:l,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:m,maskInputOptions:w,maskTextFn:S,maskInputFn:I,slimDOMOptions:C,dataURLOptions:E,inlineImages:A,recordCanvas:T,preserveWhiteSpace:G,onSerialize:N,onIframeLoad:O,iframeLoadTimeout:L,onStylesheetLoad:F,stylesheetLoadTimeout:B,keepIframeSrcFn:j});t&&F(e,t)}}),B),q}function O(e,t){var n=t||{},r=n.mirror,i=void 0===r?new c:r,o=n.blockClass,a=void 0===o?"rr-block":o,s=n.blockSelector,u=void 0===s?null:s,l=n.maskTextClass,d=void 0===l?"rr-mask":l,f=n.maskTextSelector,h=void 0===f?null:f,p=n.inlineStylesheet,v=void 0===p||p,m=n.inlineImages,g=void 0!==m&&m,y=n.recordCanvas,b=void 0!==y&&y,w=n.maskAllInputs,S=void 0!==w&&w,I=n.maskTextFn,C=n.maskInputFn,k=n.slimDOM,E=void 0!==k&&k,x=n.dataURLOptions,A=n.preserveWhiteSpace,M=n.onSerialize,T=n.onIframeLoad,N=n.iframeLoadTimeout,R=n.onStylesheetLoad,_=n.stylesheetLoadTimeout,O=n.keepIframeSrcFn;return D(e,{doc:e,mirror:i,blockClass:a,blockSelector:u,maskTextClass:d,maskTextSelector:h,skipChild:!1,inlineStylesheet:v,maskInputOptions:!0===S?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===S?{password:!0}:S,maskTextFn:I,maskInputFn:C,slimDOMOptions:!0===E||"all"===E?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===E,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===E?{}:E,dataURLOptions:x,inlineImages:g,recordCanvas:b,preserveWhiteSpace:A,onSerialize:M,onIframeLoad:T,iframeLoadTimeout:N,onStylesheetLoad:R,stylesheetLoadTimeout:_,keepIframeSrcFn:void 0===O?function(){return!1}:O,newlyAddedElement:!1})}var Z=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function L(e,t){void 0===t&&(t={});var n=1,r=1;function i(e){var t=e.match(/\n/g);t&&(n+=t.length);var i=e.lastIndexOf("\n");r=-1===i?r+e.length:e.length-i}function o(){var e={line:n,column:r};return function(t){return t.position=new a(e),h(),t}}var a=function(e){this.start=e,this.end={line:n,column:r},this.source=t.source};a.prototype.content=e;var s=[];function u(i){var o=new Error("".concat(t.source||"",":").concat(n,":").concat(r,": ").concat(i));if(o.reason=i,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o;s.push(o)}function c(){return f(/^{\s*/)}function l(){return f(/^}/)}function d(){var t,n=[];for(h(),p(n);e.length&&"}"!==e.charAt(0)&&(t=k()||E());)!1!==t&&(n.push(t),p(n));return n}function f(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function h(){f(/^\s*/)}function p(e){var t;for(void 0===e&&(e=[]);t=v();)!1!==t&&e.push(t),t=v();return e}function v(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return u("End of comment missing");var a=e.slice(2,n-2);return r+=2,i(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function m(){var e=f(/^([^{]+)/);if(e)return F(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"\u200c")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function g(){var e=o(),t=f(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=F(t[0]);if(!f(/^:\s*/))return u("property missing ':'");var r=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:n.replace(Z,""),value:r?F(r[0]).replace(Z,""):""});return f(/^[;\s]*/),i}}function y(){var e,t=[];if(!c())return u("missing '{'");for(p(t);e=g();)!1!==e&&(t.push(e),p(t)),e=g();return l()?t:u("missing '}'")}function b(){for(var e,t=[],n=o();e=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),f(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:y()})}var w=C("import"),S=C("charset"),I=C("namespace");function C(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=o(),r=f(t);if(r){var i={type:e};return i[e]=r[1].trim(),n(i)}}}function k(){if("@"===e[0])return function(){var e=o(),t=f(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=f(/^([-\w]+)\s*/)))return u("@keyframes missing name");var r,i=t[1];if(!c())return u("@keyframes missing '{'");for(var a=p();r=b();)a.push(r),a=a.concat(p());return l()?e({type:"keyframes",name:i,vendor:n,keyframes:a}):u("@keyframes missing '}'")}}()||function(){var e=o(),t=f(/^@media *([^{]+)/);if(t){var n=F(t[1]);if(!c())return u("@media missing '{'");var r=p().concat(d());return l()?e({type:"media",media:n,rules:r}):u("@media missing '}'")}}()||function(){var e=o(),t=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:F(t[1]),media:F(t[2])})}()||function(){var e=o(),t=f(/^@supports *([^{]+)/);if(t){var n=F(t[1]);if(!c())return u("@supports missing '{'");var r=p().concat(d());return l()?e({type:"supports",supports:n,rules:r}):u("@supports missing '}'")}}()||w()||S()||I()||function(){var e=o(),t=f(/^@([-\w]+)?document *([^{]+)/);if(t){var n=F(t[1]),r=F(t[2]);if(!c())return u("@document missing '{'");var i=p().concat(d());return l()?e({type:"document",document:r,vendor:n,rules:i}):u("@document missing '}'")}}()||function(){var e=o();if(f(/^@page */)){var t=m()||[];if(!c())return u("@page missing '{'");for(var n,r=p();n=g();)r.push(n),r=r.concat(p());return l()?e({type:"page",selectors:t,declarations:r}):u("@page missing '}'")}}()||function(){var e=o();if(f(/^@host\s*/)){if(!c())return u("@host missing '{'");var t=p().concat(d());return l()?e({type:"host",rules:t}):u("@host missing '}'")}}()||function(){var e=o();if(f(/^@font-face\s*/)){if(!c())return u("@font-face missing '{'");for(var t,n=p();t=g();)n.push(t),n=n.concat(p());return l()?e({type:"font-face",declarations:n}):u("@font-face missing '}'")}}()}function E(){var e=o(),t=m();return t?(p(),e({type:"rule",selectors:t,declarations:y()})):u("selector missing")}return V(function(){var e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:s}}}())}function F(e){return e?e.replace(/^\s+|\s+$/g,""):""}function V(e,t){for(var n=e&&"string"===typeof e.type,r=n?e:t,i=0,o=Object.keys(e);i<o.length;i++){var a=e[o[i]];Array.isArray(a)?a.forEach((function(e){V(e,r)})):a&&"object"===typeof a&&V(a,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var B={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"};var P=/([^\\]):hover/,j=new RegExp(P.source,"g");function W(e,t){var n=null===t||void 0===t?void 0:t.stylesWithHoverClass.get(e);if(n)return n;var r=L(e,{silent:!0});if(!r.stylesheet)return e;var i=[];if(r.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){P.test(e)&&i.push(e)}))})),0===i.length)return e;var o=new RegExp(i.filter((function(e,t){return i.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g"),a=e.replace(o,(function(e){var t=e.replace(j,"$1.\\:hover");return"".concat(e,", ").concat(t)}));return null===t||void 0===t||t.stylesWithHoverClass.set(e,a),a}function U(){return{stylesWithHoverClass:new Map}}function H(e,t){var n=t.doc,i=t.hackCss,o=t.cache;switch(e.type){case r.Document:return n.implementation.createDocument(null,"",null);case r.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case r.Element:var a,s=function(e){var t=B[e.tagName]?B[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);a=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",s):n.createElement(s);var u={};for(var c in e.attributes)if(Object.prototype.hasOwnProperty.call(e.attributes,c)){var l=e.attributes[c];if("option"!==s||"selected"!==c||!1!==l)if(!0===l&&(l=""),c.startsWith("rr_"))u[c]=l;else{var d="textarea"===s&&"value"===c,f="style"===s&&"_cssText"===c;if(f&&i&&"string"===typeof l&&(l=W(l,o)),!d&&!f||"string"!==typeof l)try{if(e.isSVG&&"xlink:href"===c)a.setAttributeNS("http://www.w3.org/1999/xlink",c,l.toString());else if("onload"===c||"onclick"===c||"onmouse"===c.substring(0,7))a.setAttribute("_"+c,l.toString());else{if("meta"===s&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"===c){a.setAttribute("csp-content",l.toString());continue}("link"!==s||"preload"!==e.attributes.rel&&"modulepreload"!==e.attributes.rel||"script"!==e.attributes.as)&&("link"===s&&"prefetch"===e.attributes.rel&&"string"===typeof e.attributes.href&&e.attributes.href.endsWith(".js")||("img"===s&&e.attributes.srcset&&e.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",e.attributes.srcset):a.setAttribute(c,l.toString())))}}catch(b){}else{for(var h=n.createTextNode(l),p=0,v=Array.from(a.childNodes);p<v.length;p++){var m=v[p];m.nodeType===a.TEXT_NODE&&a.removeChild(m)}a.appendChild(h)}}}var g=function(t){var n=u[t];if("canvas"===s&&"rr_dataURL"===t){var r=document.createElement("img");r.onload=function(){var e=a.getContext("2d");e&&e.drawImage(r,0,0,r.width,r.height)},r.src=n.toString(),a.RRNodeType&&(a.rr_dataURL=n.toString())}else if("img"===s&&"rr_dataURL"===t){var i=a;i.currentSrc.startsWith("data:")||(i.setAttribute("rrweb-original-src",e.attributes.src),i.src=n.toString())}if("rr_width"===t)a.style.width=n.toString();else if("rr_height"===t)a.style.height=n.toString();else if("rr_mediaCurrentTime"===t&&"number"===typeof n)a.currentTime=n;else if("rr_mediaState"===t)switch(n){case"played":a.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":a.pause()}};for(var y in u)g(y);if(e.isShadowHost)if(a.shadowRoot)for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);else a.attachShadow({mode:"open"});return a;case r.Text:return n.createTextNode(e.isStyle&&i?W(e.textContent,o):e.textContent);case r.CDATA:return n.createCDATASection(e.textContent);case r.Comment:return n.createComment(e.textContent);default:return null}}function G(e,t){var n,o,a=t.doc,s=t.mirror,u=t.skipChild,c=void 0!==u&&u,l=t.hackCss,d=void 0===l||l,f=t.afterAppend,h=t.cache;if(s.has(e.id)){var p=s.getNode(e.id),v=s.getMeta(p);if(o=e,(n=v)&&o&&n.type===o.type&&(n.type===r.Document?n.compatMode===o.compatMode:n.type===r.DocumentType?n.name===o.name&&n.publicId===o.publicId&&n.systemId===o.systemId:n.type===r.Comment||n.type===r.Text||n.type===r.CDATA?n.textContent===o.textContent:n.type===r.Element&&n.tagName===o.tagName&&JSON.stringify(n.attributes)===JSON.stringify(o.attributes)&&n.isSVG===o.isSVG&&n.needBlock===o.needBlock))return s.getNode(e.id)}var m=H(e,{doc:a,hackCss:d,cache:h});if(!m)return null;if(e.rootId&&s.getNode(e.rootId)!==a&&s.replace(e.rootId,a),e.type===r.Document&&(a.close(),a.open(),"BackCompat"===e.compatMode&&e.childNodes&&e.childNodes[0].type!==r.DocumentType&&(e.childNodes[0].type===r.Element&&"xmlns"in e.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===e.childNodes[0].attributes.xmlns?a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),m=a),s.add(m,e),(e.type===r.Document||e.type===r.Element)&&!c)for(var g=0,y=e.childNodes;g<y.length;g++){var b=y[g],w=G(b,{doc:a,mirror:s,skipChild:!1,hackCss:d,afterAppend:f,cache:h});w?(b.isShadow&&i(m)&&m.shadowRoot?m.shadowRoot.appendChild(w):m.appendChild(w),f&&f(w,b.id)):console.warn("Failed to rebuild",b)}return m}function z(e,t){var n=t.doc,i=t.onVisit,o=t.hackCss,a=void 0===o||o,s=t.afterAppend,u=t.cache,l=t.mirror,d=void 0===l?new c:l,f=G(e,{doc:n,mirror:d,skipChild:!1,hackCss:a,afterAppend:s,cache:u});return function(e,t){for(var n=0,r=e.getIds();n<r.length;n++){var i=r[n];e.has(i)&&t(e.getNode(i))}}(d,(function(e){i&&i(e),function(e,t){var n=t.getMeta(e);if((null===n||void 0===n?void 0:n.type)===r.Element){var i=e;for(var o in n.attributes)if(Object.prototype.hasOwnProperty.call(n.attributes,o)&&o.startsWith("rr_")){var a=n.attributes[o];"rr_scrollLeft"===o&&(i.scrollLeft=a),"rr_scrollTop"===o&&(i.scrollTop=a)}}}(e,d)})),f}},1737:function(e,t,n){"use strict";n.d(t,{$1:function(){return p},Cj:function(){return E},E2:function(){return R},Fn:function(){return k},He:function(){return M},IT:function(){return g},OK:function(){return I},P2:function(){return d},WU:function(){return b},_X:function(){return N},_f:function(){return Z},fM:function(){return m},gp:function(){return v},jB:function(){return D},md:function(){return T},nF:function(){return y},on:function(){return u},qs:function(){return x},r$:function(){return h},s6:function(){return C},ug:function(){return _},vD:function(){return A},y5:function(){return w},yU:function(){return f},z6:function(){return S}});var r=n(5671),i=n(3144),o=n(2982),a=n(7762),s=n(5512);function u(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var c="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",l={map:{},getId:function(){return console.error(c),-1},getNode:function(){return console.error(c),null},removeNodeFromMap:function(){console.error(c)},has:function(){return console.error(c),!1},reset:function(){console.error(c)}};function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,i=0;return function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];var u=Date.now();i||!1!==n.leading||(i=u);var c=t-(u-i),l=this;c<=0||c>t?(r&&(clearTimeout(r),r=null),i=u,e.apply(l,a)):r||!1===n.trailing||(r=setTimeout((function(){i=!1===n.leading?0:Date.now(),r=null,e.apply(l,a)}),c))}}function f(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),o&&o.set&&o.set.call(this,e)}}),function(){return f(e,t,o||{},!0)}}function h(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return"function"===typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch(o){return function(){}}}function p(e){var t,n,r,i,o,a,s=e.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:(null===s||void 0===s?void 0:s.documentElement.scrollLeft)||(null===(n=null===(t=null===s||void 0===s?void 0:s.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===(r=null===s||void 0===s?void 0:s.body)||void 0===r?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null===s||void 0===s?void 0:s.documentElement.scrollTop)||(null===(o=null===(i=null===s||void 0===s?void 0:s.body)||void 0===i?void 0:i.parentElement)||void 0===o?void 0:o.scrollTop)||(null===(a=null===s||void 0===s?void 0:s.body)||void 0===a?void 0:a.scrollTop)||0}}function v(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function m(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function g(e,t,n,r){if(!e)return!1;var i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!i)return!1;if("string"===typeof t){if(i.classList.contains(t))return!0;if(r&&null!==i.closest("."+t))return!0}else if((0,s.pe)(i,t,r))return!0;if(n){if(i.matches(n))return!0;if(r&&null!==i.closest(n))return!0}return!1}function y(e,t){return-1!==t.getId(e)}function b(e,t){return t.getId(e)===s.zi}function w(e,t){if((0,s.Zq)(e))return!1;var n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||w(e.parentNode,t))}function S(e){return Boolean(e.changedTouches)}function I(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(!(0 in n))throw new TypeError("1 argument is required");do{if(e===i)return!0}while(i=i&&i.parentNode);return!1})}function C(e){var t,n={},r=function(e,t){var r={value:e,parent:t,children:[]};return n[e.node.id]=r,r},i=[],o=(0,a.Z)(e);try{for(o.s();!(t=o.n()).done;){var s=t.value,u=s.nextId,c=s.parentId;if(u&&u in n){var l=n[u];if(l.parent){var d=l.parent.children.indexOf(l);l.parent.children.splice(d,0,r(s,l.parent))}else{var f=i.indexOf(l);i.splice(f,0,r(s,null))}}else if(c in n){var h=n[c];h.children.push(r(s,h))}else i.push(r(s,null))}}catch(p){o.e(p)}finally{o.f()}return i}function k(e,t){t(e.value);for(var n=e.children.length-1;n>=0;n--)k(e.children[n],t)}function E(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function x(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function A(e,t){var n,r,i=null===(r=null===(n=e.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===r?void 0:r.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};var o=i.getBoundingClientRect(),a=A(i,t),s=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:s,absoluteScale:a.absoluteScale*s}}function M(e){return Boolean(null===e||void 0===e?void 0:e.shadowRoot)}function T(e,t){var n=e[t[0]];return 1===t.length?n:T(n.cssRules[t[1]].cssRules,t.slice(2))}function N(e){var t=(0,o.Z)(e),n=t.pop();return{positions:t,index:n}}function R(e){for(var t=new Set,n=[],r=e.length;r--;){var i=e[r];t.has(i.id)||(n.push(i),t.add(i.id))}return n}"undefined"!==typeof window&&window.Proxy&&window.Reflect&&(l=new Proxy(l,{get:function(e,t,n){return"map"===t&&console.error(c),Reflect.get(e,t,n)}}));var _=function(){function e(){(0,r.Z)(this,e),this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}return(0,i.Z)(e,[{key:"getId",value:function(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]),e}();function D(e){var t,n,r=null;return(null===(n=null===(t=e.getRootNode)||void 0===t?void 0:t.call(e))||void 0===n?void 0:n.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(r=e.getRootNode().host),r}function O(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=D(n);)n=t;return n}(e);return t.contains(n)}function Z(e){var t=e.ownerDocument;return!!t&&(t.contains(e)||O(e))}},1414:function(e,t,n){"use strict";n.d(t,{FX:function(){return a},SA:function(){return s},Y2:function(){return o},tw:function(){return r},yh:function(){return i}});var r=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(r||{}),i=function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e}(i||{}),o=function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e}(o||{}),a=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(a||{}),s=function(e){return 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}(s||{})}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.m=e,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))},n.u=function(e){return"static/js/"+e+"."+{372:"23355af7",725:"3488a106"}[e]+".chunk.js"},n.miniCssF=function(e){return"static/css/"+e+".a0edc4b4.chunk.css"},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={};n.l=function(t,r,i,o){if(e[t])e[t].push(r);else{var a,s;if(void 0!==i)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var l=u[c];if(l.getAttribute("src")==t||l.getAttribute("data-webpack")=="fe:"+i){a=l;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,n.nc&&a.setAttribute("nonce",n.nc),a.setAttribute("data-webpack","fe:"+i),a.src=t),e[t]=[r];var d=function(n,r){a.onerror=a.onload=null,clearTimeout(f);var i=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((function(e){return e(r)})),n)return n(r)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),s&&document.head.appendChild(a)}}}(),n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},n.p="/",function(){if("undefined"!==typeof document){var e=function(e){return new Promise((function(t,r){var i=n.miniCssF(e),o=n.p+i;if(function(e,t){for(var n=document.getElementsByTagName("link"),r=0;r<n.length;r++){var i=(a=n[r]).getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(i===e||i===t))return a}var o=document.getElementsByTagName("style");for(r=0;r<o.length;r++){var a;if((i=(a=o[r]).getAttribute("data-href"))===e||i===t)return a}}(i,o))return t();!function(e,t,n,r,i){var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",o.onerror=o.onload=function(n){if(o.onerror=o.onload=null,"load"===n.type)r();else{var a=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.href||t,u=new Error("Loading CSS chunk "+e+" failed.\n("+s+")");u.code="CSS_CHUNK_LOAD_FAILED",u.type=a,u.request=s,o.parentNode.removeChild(o),i(u)}},o.href=t,n?n.parentNode.insertBefore(o,n.nextSibling):document.head.appendChild(o)}(e,o,null,t,r)}))},t={179:0};n.f.miniCss=function(n,r){t[n]?r.push(t[n]):0!==t[n]&&{372:1}[n]&&r.push(t[n]=e(n).then((function(){t[n]=0}),(function(e){throw delete t[n],e})))}}}(),function(){var e={179:0};n.f.j=function(t,r){var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var o=new Promise((function(n,r){i=e[t]=[n,r]}));r.push(i[2]=o);var a=n.p+n.u(t),s=new Error;n.l(a,(function(r){if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,i[1](s)}}),"chunk-"+t,t)}};var t=function(t,r){var i,o,a=r[0],s=r[1],u=r[2],c=0;if(a.some((function(t){return 0!==e[t]}))){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(u)u(n)}for(t&&t(r);c<a.length;c++)o=a[c],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=self.webpackChunkfe=self.webpackChunkfe||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),function(){"use strict";var e={};n.r(e),n.d(e,{default:function(){return Tt}});var t=n(4165),r=n(5861),i=n(603),o=n(9478),a=n(5671),s=n(3144),u=function(){function e(t){if((0,a.Z)(this,e),this.structuralVicinity=void 0,this.visualVicinity=void 0,this.serializedElement=void 0,this.attributes={},this.classes={},this.innerText=void 0,this.tag=void 0,this.style=void 0,this.innerFeatures=void 0,this.staticCandidates=void 0,this.positioning=void 0,this.svgs=void 0,"object"===typeof t)for(var n in t)this[n]=t[n];else if("string"===typeof t){var r=JSON.parse(t);for(var i in r)this[i]=r[i]}}return(0,s.Z)(e,[{key:"serialize",value:function(){return JSON.stringify(this)}}]),e}(),c={attributesToExtract:["class","src","placeholder","href","checked","disabled","contenteditable","draggable","hidden","inputmode","role","title","name","type","readonly","size","required","multiple","min","max","step","maxlength","alt","loop","controls","poster"],structuralVicinity:{type:"fixed",value:6,useDecayingLimit:!0},visualVicinity:{radius:50,scanStep:10},vicinityFeatureElementsOnly:!0,react:{}},l=n(1413),d=n(199),f=n(4942),h=function(){function e(t){var n=this;(0,a.Z)(this,e),this.document=t,this.attributesByTagName={rect:["width","height"],circle:["cx","cy","r"],ellipse:["cx","cy","rx","ry"],line:["x1","y1","x2","y2"],polygon:["points"],polyline:["points"],path:["d"],text:["x","y"]},this.limit=5,this.extractSVG=function(e){return Array.from(e.children).map((function(e){var t=n.attributesByTagName[e.tagName.toLowerCase()];if(!t)return null;var r=t.reduce((function(t,n){var r=e.getAttribute(n);return(0,l.Z)((0,l.Z)({},t),{},(0,f.Z)({},n,r))}),{});return{tagName:e.tagName.toLowerCase(),attributes:r}})).filter((function(e){return!!e}))}}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.matches("svg")?[e]:e.querySelectorAll("svg");if(t.length&&!(t.length>this.limit))return Array.from(t).map(this.extractSVG)}}]),e}(),p=n(7762),v=n(885),m=n(2982),g=function(){function e(t){(0,a.Z)(this,e),this.element=void 0,this.elRect=void 0,this.initialScrollPositions=void 0,this.element=t,this.elRect=this.element.getBoundingClientRect()}return(0,s.Z)(e,[{key:"scrollIntoView",value:function(){if(this.getScrollableParentsPositions(),!this.initialScrollPositions.length)return this;if(this.element.scrollIntoView({block:"center",inline:"center"}),!D(this.element)){var e,t=(0,p.Z)(this.initialScrollPositions);try{for(t.s();!(e=t.n()).done;){var n=e.value,r=n.element.getBoundingClientRect();if(this.elRect.top<r.top||this.elRect.bottom>r.bottom){var i=this.elRect.top-r.top+n.element.scrollTop;n.element.scrollTop=i}}}catch(o){t.e(o)}finally{t.f()}}return this}},{key:"restore",value:function(){this.initialScrollPositions.forEach((function(e){var t=e.element,n=e.top,r=e.left;try{t.scroll(r,n)}catch(Zt){console.warn("[ScrollHelper/restore] couldn't restore initial scroll for",{element:t,top:n,left:r},Zt)}}))}},{key:"getScrollableParentsPositions",value:function(){this.initialScrollPositions=[];for(var e=_(this.element);null!=e;){getComputedStyle(e);(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)&&this.initialScrollPositions.push({element:e,top:e.scrollTop,left:e.scrollLeft}),e=_(e)}}}]),e}(),y=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.target,i=void 0===r?document:r,o=n.disabled,s=void 0!==o&&o,u=n.log,c=void 0===u||u,l=n.name,d=n.monitorInput,f=void 0!==d&&d;(0,a.Z)(this,e),this.target=void 0,this.name=void 0,this.disabled=void 0,this.logActivity=void 0,this.monitorInput=void 0,this.cache=void 0,this.observer=void 0,this.ignoreMutationsWithAttributes=["checksum-data-visible","checksum-data-transparently-visible","checksum-data-visible-under-transparent-element","checksum-data-click-offset","checksum-target-node","checksumid"],this.ignoreMutationsWithAttributeRegexPatterns=["checksum-radial-traverse-.+"],this.ignoreElementsWithClasses=["checksum-dom-cache-ignore"],this.inputEnabledSelectors=["input","textarea","select","[contenteditable=true]"].join(","),this.shouldIgnoreMutationRecord=function(e){try{if("attributes"===e.type&&t.ignoreMutationsWithAttributes.includes(e.attributeName))return!0;if("attributes"===e.type&&t.ignoreMutationsWithAttributeRegexPatterns.some((function(t){return new RegExp("^"+t+"$").test(e.attributeName)})))return!0;if("attributes"===e.type&&"class"===e.attributeName){var n=function(e){return e.split(" ").filter((function(e){return![":hover","rrweb-paused"].includes(e)})).sort().join(" ")};return n(e.oldValue)===n(e.target.className)}var r=function(e){return t.ignoreElementsWithClasses.some((function(t){return e.classList.contains(t)}))};if("childList"===e.type&&Array.from(e.addedNodes).every((function(e){return r(e)}))&&Array.from(e.removedNodes).every((function(e){return r(e)})))return!0}catch(Zt){}return!1},this.monitoredTextElements=[],this.monitorInputEnabledElement=function(e){e.addEventListener("input",(function(e){t.invalidate()}))},this.target=i,this.name=l,this.disabled=s,this.logActivity=c,this.monitorInput=f,this.startObserver()}return(0,s.Z)(e,[{key:"startObserver",value:function(){var e=this;this.observer=new MutationObserver((function(t){t.every(e.shouldIgnoreMutationRecord)||(e.invalidate(),e.monitorInput&&t.forEach((function(t){t.addedNodes.forEach((function(t){if(t.nodeType===Node.ELEMENT_NODE){var n=t;(n.matches(e.inputEnabledSelectors)||n.isContentEditable)&&e.monitorInputEnabledElement(n)}}))})))})),this.observer.observe(this.target,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),this.monitorInput&&this.startInputMonitoring()}},{key:"startInputMonitoring",value:function(){this.monitoredTextElements=T(this.inputEnabledSelectors),this.monitoredTextElements.forEach(this.monitorInputEnabledElement)}},{key:"get",value:function(){return this.log("get","has cache:",!!this.cache),this.cache}},{key:"set",value:function(e){this.disabled||(this.cache=e)}},{key:"hasCache",value:function(){return this.log("hasCache",!!this.cache),!!this.cache}},{key:"invalidate",value:function(){this.set(void 0)}},{key:"log",value:function(){var e;if(this.logActivity){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).log.apply(e,["[DOMMutationDependentCache] ".concat(this.name?"[".concat(this.name,"]"):"",":")].concat(n))}}}],[{key:"getInstance",value:function(t,n){var r,i=this.makeNameForCache(t,null===n||void 0===n?void 0:n.flags);e.instances[i]||(e.instances[i]=new e((0,l.Z)((0,l.Z)({},n),{},{name:null!==(r=null===n||void 0===n?void 0:n.name)&&void 0!==r?r:t})),null!==n&&void 0!==n&&n.initialValue&&e.instances[i].set(null===n||void 0===n?void 0:n.initialValue));var o=e.instances[i];return null!==n&&void 0!==n&&n.invalidate&&o.invalidate(),o}},{key:"invalidateAll",value:function(){Object.values(e.instances).forEach((function(e){return e.invalidate()}))}},{key:"makeNameForCache",value:function(e,t){return"".concat(e).concat(t?JSON.stringify(t):"")}}]),e}();y.instances={},window.DOMMutationDependentCache=y;var b=function(e){},w=function(e){},S=["button","select","input","textarea","option","a","[role=button]","[role=checkbox]","[role=radio]","[role=link]","[type=button]","[aria-disabled=false]",'[id^="react-select"]'],I=["pointer","text","vertical-text","zoom-in","zoom-out","help"],C=["onClick","onMouseDown","onKeyDown","onKeyPress","onInput","onSelect","onDoubleClick","onDragStart","onDrag","onDragEnd","onDragOver","onDrop","onToggle"],k=["onclick","onmousedown","onkeydown","onkeypress","oninput","onselect","ondblclick","ondragstart","ondrag","ondragend","ondragover","ondrop","ontoggle"],E=function(e){if(window.getEventListeners){var t=window.getEventListeners(e);if(k.some((function(e){return t[e.slice(2)]})))return!0}var n=Object.keys(e).find((function(e){return e.startsWith("__reactFiber")})),r=n?e[n]:void 0;return!(!r||!r.memoizedProps)&&C.some((function(e){return r.memoizedProps[e]}))},x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.allowDisabled,i=void 0!==r&&r,o=n.useDataVisibleAttributes,a=void 0===o||o,s=n.excludeCrossOriginIframes,u=void 0===s||s,c=y.getInstance("getAllInteractableHTMLElements",{target:e}),l=Date.now(),d=function(e){var t=e.reduce((function(e,t){return!i&&t.state.disabled?e:[].concat((0,m.Z)(e),[t.element])}),[]);return console.log("[getAllInteractableHTMLElements] done, took",Date.now()-l,"ms"),t};if(c.hasCache())return d(c.get());var f=T("*",e,{excludeCrossOriginIframes:u});b("[getAllInteractableHTMLElements] items");var h=f.reduce((function(e,n){var r,i="disabled"in n&&n.disabled,o=n.matches(S.concat(t.appSpecificInteractableElementsSelectors||[]).filter((function(e){return!!e})).join(","))||I.includes(window.getComputedStyle(n).cursor)||n.isContentEditable&&!(null!==(r=n.parentElement)&&void 0!==r&&r.isContentEditable)||t.useEventListenersToDetermineInteractability&&(k.some((function(e){return n[e]}))||E(n));return o?[].concat((0,m.Z)(e),[{element:n,disabled:i}]):e}),[]);w("[getAllInteractableHTMLElements] items"),b("[getAllInteractableHTMLElements] getCompoundInteractableRootElement");var p=h.reduce((function(e,n){var r=A(n.element,t.appSpecificInteractableElementsSelectors||[]),i=e.find((function(e){return e.element===r}));return i?!n.disabled&&i.state.disabled&&(i.state.disabled=!1):e.push({element:r,state:{disabled:n.disabled}}),e}),[]);w("[getAllInteractableHTMLElements] getCompoundInteractableRootElement"),b("[getAllInteractableHTMLElements] isElementHidden");var v=p.filter((function(e){var t=e.element;if(a){if(!t)return!1;var n=t.getAttribute("checksum-data-visible");if(n){var r="true"===n,i="true"===t.getAttribute("checksum-data-visible-under-transparent-element"),o="true"===t.getAttribute("checksum-data-transparently-visible");return r&&!i||o}}return!L(t,{markTransparentElementsAsHidden:!1}).isHidden}));return w("[getAllInteractableHTMLElements] isElementHidden"),c.set(v),d(v)},A=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e)return e;try{if("isContentEditable"in e&&e.isContentEditable)return e;if("closest"in e){var n=M(e,S.concat(t).filter((function(e){return!!e})).join(","));if(n)return n}var r=window.getComputedStyle(e).cursor;if(["auto","default","context-menu","help","progress","wait"].includes(r))return e;for(var i=e;i;){var o=i.parentElement;if(!o||(o.nodeType!==Node.ELEMENT_NODE||window.getComputedStyle(o).cursor)!==r)return i;i=i.parentNode}return e}catch(Zt){return console.error("getCompoundInteractableRootElement",e,Zt),e}};var M=function e(t,n){if(t.matches(n))return t;var r=t.slot;if(r){for(var i=t.parentElement;i;){if(i.shadowRoot){var o=i.shadowRoot.querySelector('slot[name="'.concat(r,'"]'));if(o)return e(o,n)}i=i.parentElement}return null}var a=t.closest(n);if(a)return a;var s=t.getRootNode();return s.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e(s.host,n):null},T=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.excludeCrossOriginIframes,i=void 0!==r&&r,o=n.includeHTML,a=void 0!==o&&o,s=[];return function t(n){!function(t){t.querySelectorAll(e).forEach((function(e){return s.push(e)}))}(n);var r=[];!function e(t){t.shadowRoot&&r.push(t.shadowRoot),t.childNodes.forEach((function(t){return e(t)}))}(n),r.forEach((function(e){return t(e)})),n.querySelectorAll("iframe").forEach((function(e){if(!i||!function(e){return!e.src||window.location.origin!==new URL(e.src).origin}(e))try{var n=e.contentDocument;n&&t(n)}catch(Zt){return}}))}(t),a&&t.documentElement.matches(e)&&s.push(t.documentElement),s};function N(e){var t=e.getRootNode();return t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?function(e,t){var n=e.querySelectorAll("slot");if(!n.length)return e.innerText;var r=e.cloneNode(!0),i=r.querySelectorAll("slot");return n.forEach((function(e,t){var n=e.assignedNodes();i[t].innerText=n.map((function(e){switch(e.nodeType){case Node.TEXT_NODE:return e.textContent;case Node.ELEMENT_NODE:return e.innerText}})).filter((function(e){return!!e})).join("\n")})),r.innerText.trim()}(e):e.innerText}var R=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).flattenShadowRootChildren,n=void 0!==t&&t,r=Array.from(e.childNodes);if(e.nodeType===Node.ELEMENT_NODE){var i,o=e;if(o.shadowRoot&&(r=r.filter((function(e){return!e.assignedSlot})),n?r=r.concat(Array.from(o.shadowRoot.childNodes)):r.push(o.shadowRoot)),"slot"===o.tagName.toLowerCase())(i=r).push.apply(i,(0,m.Z)(o.assignedNodes()))}return r},_=function(e){var t=e.parentElement;if(t)return t;switch(e.nodeType){case Node.ELEMENT_NODE:var n=e;if(n.assignedSlot)return n.assignedSlot;break;case Node.DOCUMENT_FRAGMENT_NODE:return e.host}var r=e.parentNode;return r&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r.host:null};function D(e){if(!e)return!1;var t=e.getBoundingClientRect();return t.top<=window.innerHeight&&t.left<=window.innerWidth&&t.bottom>=0&&t.right>=0}function O(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=window.getComputedStyle(e),r="0"===n.opacity;return{visible:"hidden"!==n.visibility&&"none"!==n.display&&(!t||!r),isTransparent:r}}function Z(e,t){var n,r;return null!==(n=null!==t&&void 0!==t?t:null===e||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView)&&void 0!==n?n:window}function L(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.markTransparentElementsAsHidden,i=void 0===r||r,o=n.markElementsHiddenByTransparentElementAsVisible,a=void 0!==o&&o,s=n.scrollIntoView,u=void 0===s||s,c={isHidden:!0},d=function(e){return(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&t&&t.restore(),(0,l.Z)((0,l.Z)({},c),e)};if(!e)return d({isHidden:!0});var f=O(e="OPTION"===e.tagName&&(e.closest("select")||e.closest("datalist"))||e,i),h=f.visible,m=f.isTransparent;if(c.isTransparent=m,!h)return d({isHidden:!0});if(function(e){var t=e.parentElement,n=window.getComputedStyle(e);if("absolute"===n.position||"fixed"===n.position)return!1;var r=new g(e).scrollIntoView(),i=function(e){return r.restore(),e};for(;t;){if(!(t instanceof Z(e).Element))return i(!1);var o=window.getComputedStyle(t);if("absolute"===o.position||"fixed"===o.position)return i(!1);if(("hidden"===o.overflowX||"hidden"===o.overflowY)&&!F(t,e))return i(!0);t=t.parentElement}return i(!1)}(e))return d({isHidden:!0});try{var y;u&&(t=new g(e).scrollIntoView());var b=function(e){var t=e.getBoundingClientRect(),n={top:0,left:0,right:window.innerWidth||document.documentElement.clientWidth,bottom:window.innerHeight||document.documentElement.clientHeight},r={top:Math.max(t.top,n.top),left:Math.max(t.left,n.left),right:Math.min(t.right,n.right),bottom:Math.min(t.bottom,n.bottom)};return r.width=r.right-r.left,r.height=r.bottom-r.top,r.width>0&&r.height>0?r:null}(e);if(!b)return d({isHidden:!0});var w,S=[[b.width/2,b.height/2,!0],[Math.max(.01*b.width,1),Math.max(.01*b.height,1)],[Math.min(.99*b.width,b.width-1),Math.max(.01*b.height,1)],[Math.max(.01*b.width,1),Math.min(.99*b.height,b.height-1)],[Math.min(.99*b.width,b.width-1),Math.min(.99*b.height,b.height-1)]],I=null!==(y=function(e){for(var t=e;t;){if(11===t.nodeType)return console.log(t),t;t=t.parentNode}}(e))&&void 0!==y?y:e.ownerDocument;if(e instanceof Z(e).HTMLInputElement&&e.id&&e.type&&["checkbox","radio"].includes(e.type)){var C=T('label[for="'.concat(e.id,'"]'),I);C.length&&(w=C[0])}for(var k=0,E=S;k<E.length;k++){var x=(0,v.Z)(E[k],3),A=x[0],M=x[1],N=x[2],R=b.left+A>=0&&b.left+A<=window.innerWidth?b.left+A:A,D=b.top+M>=0&&b.top+M<=window.innerHeight?b.top+M:M,V=I.elementFromPoint(R,D);if(V===e)return d({isHidden:!1,clickOffset:N?void 0:{x:A,y:M}});if(V){if(!0===N&&V.shadowRoot)return d(L(V));for(var B=V;B;){if(B===e||w&&w===B)return d({isHidden:!1,clickOffset:N?void 0:{x:A,y:M}});B=_(B)}if(a)try{var P,j=I.elementsFromPoint(R,D),W=(0,p.Z)(j);try{for(W.s();!(P=W.n()).done;){var U=P.value;if(U===e)return d({isHidden:!1,clickOffset:N?void 0:{x:A,y:M},isBehindTransparentElement:!0});var H=I.defaultView.getComputedStyle(U),G=U.getBoundingClientRect();if("0"!==H.opacity&&"hidden"!==H.visibility&&!/rgba\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*0\s*\)/.test(H.backgroundColor)||G.width>1.2*b.width||G.height>1.2*b.height)break}}catch(z){W.e(z)}finally{W.f()}}catch(Zt){console.error("Error while checking transparent elements over interactable",Zt)}}}return t&&(t.restore(),t=void 0),w?L(w):d({isHidden:!0})}catch(Zt){throw Zt}}function F(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.left<r.right&&n.right>r.left&&n.top<r.bottom&&n.bottom>r.top}function V(e,t){try{var n=e.ownerDocument.defaultView;return e instanceof n[t]||e instanceof n.top[t]}catch(Zt){}return!1}!function(){for(var e=[],t=1;t<=20;t++){var n=t/20;e.push(n)}e.push(0)}();function B(e){try{return"fixed"===getComputedStyle(e).position||!(!e.parentElement||e.parentElement===document.body)&&B(e.parentElement)}catch(Zt){return console.error("isAncestorOrSelfFixed",Zt),!1}}function P(e){var t=e.getBoundingClientRect().top;return t<0?-t:0}function j(e){var t=e.getBoundingClientRect().bottom,n=window.innerHeight;return t>n?t-n:0}var W,U=function(e,t){var n=e.tagName.toLowerCase();switch(n){case"img":case"video":case"audio":return{type:d.EI.Media,tag:n,src:e.getAttribute("src"),size:{width:e.clientWidth,height:e.clientHeight},screenSize:{width:window.innerWidth,height:window.innerHeight},isRoot:t,isHidden:L(e).isHidden};case"svg":return{type:d.EI.SVG,tag:n,components:new h(document).extract(e)[0],isRoot:t,isHidden:L(e).isHidden};case"a":return{type:d.EI.Anchor,tag:n,href:e.getAttribute("href"),text:e.innerText,isRoot:t,isHidden:L(e).isHidden};case"button":return{type:d.EI.Button,tag:n,text:e.innerText,buttonType:e.getAttribute("type")||"button",isRoot:t,isHidden:L(e).isHidden};case"input":return{type:d.EI.Input,tag:n,inputType:e.getAttribute("type"),placeholder:e.getAttribute("placeholder"),isRoot:t,isHidden:L(e).isHidden};case"table":case"form":case"textarea":case"iframe":case"select":return{type:d.EI.NoData,tag:n,isRoot:t,isHidden:L(e).isHidden}}if(e.innerHTML.trim()===e.innerText&&e.innerHTML.length)return{type:d.EI.Text,tag:n,text:H(e.innerHTML),isRoot:t,isHidden:L(e).isHidden}},H=function(e){return e.length>256?e.substring(0,256)+"...":e},G=function(e){return Object.keys(e||{}).reduce((function(t,n){var r=e[n];return r&&(t[n]=r),t}),{})},z=function(e){var t=G(e);return!(!t||!Object.keys(t).length)},q=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.contains,i=void 0!==r&&r,o=n.matchWholeWord,a=void 0!==o&&o;return t=t.replaceAll("\n","\\A ").replaceAll('"','\\"'),i?a?"[".concat(e,'="').concat(t,'"],[').concat(e,'*="').concat(t,' "],[').concat(e,'*=" ').concat(t,' "],[').concat(e,'*=" ').concat(t,'"]'):"[".concat(e,'*="').concat(t,'"]'):"[".concat(e,'="').concat(t,'"]')},Y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.contains,i=void 0!==r&&r,o=n.matchWholeWord;return i?void 0!==o&&o?e===t||e.startsWith(t)||e.includes(" ".concat(t," "))||e.endsWith(t):e.includes(t):e===t},Q=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.elementsByQueryCache={}}return(0,s.Z)(e,[{key:"getElementsByQuery",value:function(e){return this.elementsByQueryCache[e]||(this.elementsByQueryCache[e]=T(e,this.document)),this.elementsByQueryCache[e]}},{key:"extract",value:function(e){for(var t=this,n=e.element,r=e.setClass,i=e.setAttribute,o=e.getElementsInStructuralVicinity,a=e.getElementsInVisualVicinity,s=function(){var e=n.attributes[u],s=e.name,l=e.value;return c.attributesToExtract.includes(s)?"string"!==typeof l?"continue":"class"===s?(l.split(" ").forEach((function(e){e.length&&r(e,t.processAttribute({element:n,getElementsInStructuralVicinity:o,getElementsInVisualVicinity:a},s,e,{contains:!0,matchWholeWord:!0}))})),"continue"):void i(s,t.processAttribute({element:n,getElementsInStructuralVicinity:o,getElementsInVisualVicinity:a},s,l)):"continue"},u=0;u<n.attributes.length;++u)s()}},{key:"processAttribute",value:function(e,t,n){var r=e.element,i=e.getElementsInStructuralVicinity,o=e.getElementsInVisualVicinity,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=this.getElementsByQuery("*"),u=q(t,n,a),c=this.getElementsByQuery(u),l=this.getElementsByQuery("".concat(r.tagName.toLowerCase())),d=c.filter((function(e){return e.tagName===r.tagName})),f=i?i():[],h=f.filter((function(e){return e.element.attributes[t]&&Y(e.element.attributes[t].value,n,a)})),p=o?o():[],v=p.filter((function(e){return e.element.attributes[t]&&Y(e.element.attributes[t].value,n,a)}));return{value:n,globalUniqueness:1-c.length/s.length,tagUniqueness:1-d.length/l.length,structuralVicinityUniqueness:i?1-h.length/f.length:void 0,visualVicinityUniqueness:o?1-v.length/p.length:void 0}}}]),e}(),K=function(){function e(t){var n=this;(0,a.Z)(this,e),this.el=null,this.structuralVicinityData=void 0,this.visualVicinityData=void 0,this.serializedElement="",this.attributes={},this.classes={},this.innerText=void 0,this.tag=void 0,this.style=void 0,this.react=void 0,this.innerFeatures=void 0,this.positioning=void 0,this.svgs=void 0,this.attributesExtractor=void 0,this.getElementsInStructuralVicinity=function(){return n.structuralVicinityData.elementsInStructuralVicinity},this.setElementStructuralVicinityData=function(e){n.structuralVicinityData=e},this.setElementVisualVicinityData=function(e){n.visualVicinityData=e},this.getElementsInVisualVicinity=function(){return n.visualVicinityData},this.setSerializedElement=function(e){n.serializedElement=e},this.setAttribute=function(e,t){n.attributes[e]=t},this.setClass=function(e,t){n.classes[e]=t},this.setInnerText=function(e){n.innerText=e},this.setStyle=function(e){n.style=e},this.setTag=function(e){n.tag=e},this.setReact=function(e){n.react=e},this.setInnerFeatures=function(e){n.innerFeatures=e},this.setPositioning=function(e){n.positioning=e},this.setSVGs=function(e){n.svgs=e},this.el=t,this.attributesExtractor=new Q(this.el.ownerDocument)}return(0,s.Z)(e,[{key:"serialize",value:function(){}},{key:"getSerializedElement",value:function(){return this.serializedElement}},{key:"element",get:function(){return this.el}},{key:"getAttributes",value:function(){return this.attributes}},{key:"getClasses",value:function(){return this.classes}},{key:"getStyle",value:function(){return this.style}},{key:"getInlineStyle",value:function(){return this.style.inline}},{key:"getComputedStyle",value:function(){return this.style.computed}},{key:"getTag",value:function(){return this.tag}},{key:"getInnerFeatures",value:function(){return this.innerFeatures}},{key:"getInnerText",value:function(){return this.innerText}},{key:"getSVGs",value:function(){return this.svgs}},{key:"toMetadata",value:function(){return{structuralVicinity:this.makeStructuralVicinityMetadata(),visualVicinity:this.makeVisualVicinityMetadata(),serializedElement:this.getSerializedElement(),attributes:this.getAttributes(),classes:this.getClasses(),innerText:this.getInnerText(),tag:this.getTag(),style:this.getStyle(),innerFeatures:this.getInnerFeatures(),staticCandidates:this.extractStaticCandidates(),positioning:this.positioning,svgs:this.getSVGs()}}},{key:"extractStaticCandidates",value:function(){return G({text:this.extractStaticTextCandidate(),labeled:this.extractLabeled(),labeling:this.extractLabeling(),svgTitle:this.extractSVGTitle()})}},{key:"makeVicinityMetadata",value:function(e,t){var n=this;return e.reduce((function(e,r){var i=n.isVicinityQualifiedElement(r.element),o=i.qualified,a=i.feature;if(!o)return e;var s={},u={};n.attributesExtractor.extract({element:r.element,setClass:function(e,t){return s[e]=t},setAttribute:function(e,t){return u[e]=t}});var c=(0,l.Z)({tag:r.element.tagName.toLowerCase(),classes:s,attributes:u,text:n.extractTextForMetadata(r.element),feature:a,relativePosition:n.element.compareDocumentPosition(r.element)},t(r));return e.push(c),e}),[])}},{key:"makeStructuralVicinityMetadata",value:function(){return this.makeVicinityMetadata(this.getElementsInStructuralVicinity(),(function(e){return{position:e.position}}))}},{key:"makeVisualVicinityMetadata",value:function(){return this.makeVicinityMetadata(this.getElementsInVisualVicinity(),(function(e){return{position:[e.position],distance:e.distance}}))}},{key:"isVicinityQualifiedElement",value:function(e){if(e===this.element)return{qualified:!1};if(!c.vicinityFeatureElementsOnly)return{qualified:!0};var t=U(e);return{qualified:!!t,feature:t}}},{key:"extractTextForMetadata",value:function(e){if(e.innerHTML===e.innerText){var t=e.innerHTML;return t.length>256?t.substring(0,256)+"...":t}}},{key:"extractStaticTextCandidate",value:function(){var e,t,n;switch(this.tag){case"input":case"textarea":return null===(e=this.attributes)||void 0===e||null===(t=e.placeholder)||void 0===t?void 0:t.value;default:return null===(n=this.innerText)||void 0===n?void 0:n.content}}},{key:"extractLabeling",value:function(){if("label"===this.element.tagName.toLowerCase())return N(this.element);var e=M(this.element,"label");if(e&&this.attributeExists(e.getAttribute("for")))return N(e);try{if(this.element.id&&this.element.id.length)if(T('[aria-labelledby="'.concat(this.element.id,'"]')).length)return N(this.element)}catch(Zt){console.error("extractLabeling error",Zt)}}},{key:"extractLabeled",value:function(){var e=this.element.getAttribute("aria-label");if(this.attributeExists(e))return e;var t=M(this.element,"label");if(t&&!this.attributeExists(t.getAttribute("for")))return N(t);if(this.element.id&&this.element.id.length)try{var n=T("label[for=".concat(this.element.id,"]"));if(n.length)return N(n[0])}catch(Zt){return}var r=this.element.getAttribute("aria-labelledby");if(this.attributeExists(r)){var i=T(r.split(" ").map((function(e){return"#".concat(e)})).join(","));if(i.length)return N(i[0])}}},{key:"extractSVGTitle",value:function(){try{if("svg"!==this.element.tagName.toLowerCase())return;var e=this.element.querySelector("title");if(!e)return;return N(e)}catch(Zt){console.error("extractSVGTitle error",Zt)}}},{key:"attributeExists",value:function(e){return e&&e.length>0}}]),e}(),X=function(){function e(t,n){(0,a.Z)(this,e),this.element=void 0,this.config=void 0,this.structuralVicinityData={elementsInStructuralVicinity:[],html:""},this.element=t,this.config=n}return(0,s.Z)(e,[{key:"getInitialLimit",value:function(){switch(this.config.type){case"ratio":return document.querySelectorAll("*").length*this.config.value;case"fixed":return this.config.value}}},{key:"calculate",value:function(){var e=Date.now().toString();return this.structuralVicinityData.html=this.populateStructuralVicinity(this.element,[d.i7.Element],{runId:e,step:0,limit:this.getInitialLimit()}),this.structuralVicinityData.elementsInStructuralVicinity.forEach((function(t){return t.element.attributes.removeNamedItem("checksum-radial-traverse-".concat(e))})),this.structuralVicinityData}},{key:"populateStructuralVicinity",value:function(e,t,n){var r=this,i=n.runId,o=n.step,a=n.limit;if(!e||o>a)return"";if(void 0!==e.attributes["checksum-radial-traverse-".concat(i)])return"";this.structuralVicinityData.elementsInStructuralVicinity.push({element:e,position:t}),e.setAttribute("checksum-radial-traverse-".concat(i),o.toString());var s={runId:i,step:o+1,limit:this.config.useDecayingLimit?a-1:a},u=this.populateStructuralVicinity(_(e),[].concat((0,m.Z)(t),[d.i7.Parent]),s),c=this.populateStructuralVicinity(e.previousElementSibling,[].concat((0,m.Z)(t),[d.i7.LeftSibling]),s),l=this.populateStructuralVicinity(e.nextElementSibling,[].concat((0,m.Z)(t),[d.i7.RightSibling]),s),f=[];(function(e){var t,n,r=Array.from(e.children);return e.shadowRoot&&(t=r=r.filter((function(e){return!e.assignedSlot}))).push.apply(t,(0,m.Z)(Array.from(e.shadowRoot.children))),"slot"===e.tagName.toLowerCase()&&(n=r).push.apply(n,(0,m.Z)(e.assignedElements())),r})(e).map((function(e,n){return f.push(r.populateStructuralVicinity(e,[].concat((0,m.Z)(t),[d.i7.Child]),s))}));var h=c+e.outerHTML.replace(e.innerHTML,f.join(""))+l;return u&&!u.includes(e.outerHTML)?u.replace("></",">".concat(h,"</")):u?u.replace(e.outerHTML,h):h}}]),e}();!function(e){e[e.New=0]="New",e[e.Covered=1]="Covered",e[e.ElementTooBig=2]="ElementTooBig",e[e.Self=3]="Self"}(W||(W={}));var J=function(){function e(t,n){var r;(0,a.Z)(this,e),this.document=t,this.config=n,this.debug=!1,this.sampleBoxColors=(r={},(0,f.Z)(r,W.New,"green"),(0,f.Z)(r,W.Covered,"orange"),(0,f.Z)(r,W.ElementTooBig,"red"),(0,f.Z)(r,W.Self,"blue"),r)}return(0,s.Z)(e,[{key:"calculate",value:function(e){for(var t=this,n=[],r=this.config.radius,i=this.config.scanStep,o=e.getBoundingClientRect(),a=o.left-r;a<o.left+o.width+r;a+=i)for(var s=function(){var e=a+i/2,s=u+i/2;if(t.doesRectContain(o,{left:a,top:u,right:a+i,bottom:u+i}))return t.addTrace(e,s,i,W.Self),"continue";var c=t.document.elementFromPoint(e,s);if(!c)return"continue";var l=c.getBoundingClientRect();if(l.width>2*r&&l.height>2*r||t.doesRectContain(l,o))return t.addTrace(e,s,i,W.ElementTooBig),"continue";if(!!n.find((function(e){return e.element===c})))return t.addTrace(e,s,i,W.Covered),"continue";var d=t.getPosition(o,l),f=d.position,h=d.distance;n.push({element:c,position:f,distance:h}),t.addTrace(e,s,i,W.New)},u=o.top-r;u<o.top+o.height+r;u+=i)s();return n}},{key:"getPosition",value:function(e,t){var n=this.getCenter(t),r=n.x,i=n.y,o=this.getCenter(e),a=o.x,s=o.y;return{distance:Number(Math.sqrt(Math.pow(a-r,2)+Math.pow(s-i,2)).toFixed(2)),position:function(){var e=r-a,t=i-s;return e<0&&t<0?d.BM.TopLeft:e>0&&t<0?d.BM.TopRight:e<0&&t>0?d.BM.BottomLeft:e>0&&t>0?d.BM.BottomRight:0===e&&t<0?d.BM.Top:0===e&&t>0?d.BM.Bottom:e<0&&0===t?d.BM.Left:e>0&&0===t?d.BM.Right:d.BM.Center}()}}},{key:"getCenter",value:function(e){return{x:e.width/2+e.left,y:e.height/2+e.top}}},{key:"addTrace",value:function(e,t,n,r){if(this.debug){var i=this.document.createElement("xdiv");i.setAttribute("style","position: absolute; width: ".concat(n,"px; height: ").concat(n,"px; top: ").concat(t,"px; left: ").concat(e,"px; background: ").concat(this.sampleBoxColors[r],"; z-index: 999999999999;opacity:0.4")),this.document.getElementsByTagName("body")[0].prepend(i)}}},{key:"doesRectContain",value:function(e,t){return t.left>=e.left&&t.right<=e.right&&t.top>=e.top&&t.bottom<=e.bottom}},{key:"doRectsOverlap",value:function(e,t){var n=e.right<t.left,r=e.left>t.right,i=e.top>t.bottom,o=e.top<t.top;return!(n||r||i||o)}}]),e}();window.vve=new J({radius:50,scanStep:10});var $=n(2352);window.resq$=$.resq$,window.resq$$=$.resq$$;var ee=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=this.findParentComponent(e,{ignoreBaseElement:!0});return{component:t,parentComponent:this.findParentComponent(t.node)}}},{key:"findParentComponent",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.ignoreBaseElement,i=void 0!==r&&r,o=n.baseElement,a=void 0===o?void 0:o,s=(0,$.resq$$)("*",e.parentElement).find((function(t){return 1===t.children.length&&t.children[0].node===e}));return a=null!==(t=a)&&void 0!==t?t:e,s&&(i||s.node!==a)?this.parseRESQresult(s):this.findParentComponent(e.parentElement,{baseElement:a,ignoreBaseElement:i})}},{key:"parseRESQresult",value:function(e){if(e){return{name:e.name,node:e.node,isFragment:e.isFragment,stateTokens:function e(t){switch(typeof t){case"string":return[t];case"object":return Array.isArray(t)?t.map(e):Object.keys(t)}}(e.state),propsNames:Object.keys(e.props),hasChildren:!!e.children.length}}}}]),e}(),te=new ee,ne=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"extract",value:function(e){return{component:void 0,parentComponent:void 0}}}]),e}(),re=(new ne,function(){function e(t,n){(0,a.Z)(this,e),this.element=void 0,this.config=void 0,this.provider=te,this.element=t,this.config=n}return(0,s.Z)(e,[{key:"extract",value:function(){return this.provider.extract(this.element)}}]),e}()),ie=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.tagBaseComputedStyle={}}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.element,n=e.setStyle,r=t.tagName.toLowerCase();if(!this.tagBaseComputedStyle[r]){var i=this.document.createElement(r);this.document.getElementsByTagName("body")[0].prepend(i),this.tagBaseComputedStyle[r]=this.sanitzieStyle(window.getComputedStyle(i)),i.remove()}n({inline:this.sanitzieStyle(t.style,{acceptEmptyValue:!1}),computed:this.diffComputedStyle(this.tagBaseComputedStyle[r],this.sanitzieStyle(window.getComputedStyle(t)))})}},{key:"diffComputedStyle",value:function(e,t){var n,r;return n=e,r=t,Object.keys(r).reduce((function(e,t){return n[t]===r[t]?e:(0,l.Z)((0,l.Z)({},e),{},(0,f.Z)({},t,r[t]))}),{})}},{key:"sanitzieStyle",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).acceptEmptyValue,n=void 0===t||t;return Object.keys(e).reduce((function(t,r){if(!isNaN(r))return t;var i=e[r];return n||i?(t[r]=i,t):t}),{})}}]),e}(),oe=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.makeFeatureNode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=e.nodeType===Node.ELEMENT_NODE;return{type:e.nodeType,tag:n?e.tagName.toLowerCase():void 0,feature:n?U(e,t):void 0,children:[],isRoot:t}},this.includeRootElements=!0,this.rootElementsTypeExceptions=[d.EI.Text]}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=[],n=this.makeFeatureNode(e,!0);return this.walk(e,n,t),t}},{key:"walk",value:function(e,t,n){var r=this,i=!1;R(e).forEach((function(e){var o=r.makeFeatureNode(e),a=r.walk(e,o,n);a&&t.children.push(o),i||(i=a)}));var o=!!t.feature;return!o||t.isRoot&&!this.shouldIncludeRootNode(t)||n.push(t.feature),o||i}},{key:"shouldIncludeRootNode",value:function(e){return!!this.includeRootElements&&!this.rootElementsTypeExceptions.includes(e.type)}}]),e}();window.inner_features_extractor=new oe;var ae=n(8901),se=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.exact,r=void 0!==n&&n,i=t.tag;return T(void 0===i?"*":i).filter((function(t){return r?t.textContent.trim()===e.trim():t.textContent.includes(e)}))},ue=function(){function e(t){(0,a.Z)(this,e),this.document=t}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=N(e);if(t){var n=ae.M.get().innerText.qualification.maxLength;if(t.length>n)return{content:t,exactMatches:1,containsMatches:1,indexInOrderedSearch:1};var r=se(t,{exact:!0}),i=se(t);return{content:t,exactMatches:r.length,containsMatches:i.length,indexInOrderedSearch:r.indexOf(e)}}}}]),e}(),ce=function(){function e(t){(0,a.Z)(this,e),this.document=t}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.getBoundingClientRect(),n=t.top,r=t.bottom,i=t.left,o=t.right,a=document.documentElement.scrollHeight,s=document.documentElement.scrollWidth;return{viewport:{size:{height:window.innerHeight,width:window.innerWidth},element:{top:this.normalize(n,window.innerHeight),bottom:this.normalize(r,window.innerHeight),left:this.normalize(i,window.innerWidth),right:this.normalize(o,window.innerWidth)}},document:{size:{height:a,width:s},element:{top:this.normalize(n+window.scrollY,a),bottom:this.normalize(r+window.scrollY,a),left:this.normalize(i+window.scrollX,s),right:this.normalize(o+window.scrollX,s)}}}}},{key:"normalize",value:function(e,t){return e/t}}]),e}(),le=function(){function e(t,n){(0,a.Z)(this,e),this.xmlSerializer=void 0,this.document=void 0,this.config=void 0,this.visualVicinityExtractor=void 0,this.styleExtractor=void 0,this.innerFeaturesExtractor=void 0,this.innerTextExtractor=void 0,this.positioningExtractor=void 0,this.xmlSerializer=new XMLSerializer,this.document=t,this.config=null!==n&&void 0!==n?n:c,this.visualVicinityExtractor=new J(this.document,this.config.visualVicinity),this.styleExtractor=new ie(this.document),this.innerFeaturesExtractor=new oe(this.document),this.innerTextExtractor=new ue(this.document),this.positioningExtractor=new ce(this.document)}return(0,s.Z)(e,[{key:"isSameDocument",value:function(e){return this.document===e}},{key:"extract",value:function(e){var t=new g(e).scrollIntoView(),n=new K(e);return this.serializeElement(n),this.populateElementsInStructuralVicinity(n),this.populateElementsInVisualVicinity(n),this.extractAttributes(n),this.extractInnerText(n),this.extractStyle(n),this.extractTag(n),this.extractInnerFeatures(n),this.extractPositioning(n),this.extractSVGComponents(n),t.restore(),n}},{key:"extractReact",value:function(e){var t=e.element;(0,e.setReact)(new re(t,this.config.react).extract())}},{key:"extractTag",value:function(e){var t=e.element;(0,e.setTag)(t.tagName.toLowerCase())}},{key:"extractPositioning",value:function(e){var t=e.element;(0,e.setPositioning)(this.positioningExtractor.extract(t))}},{key:"extractSVGComponents",value:function(e){var t=e.element;(0,e.setSVGs)(new h(this.document).extract(t))}},{key:"serializeElement",value:function(e){e.element,e.setSerializedElement}},{key:"extractAttributes",value:function(e){var t=e.element,n=e.setClass,r=e.setAttribute,i=e.getElementsInStructuralVicinity,o=e.getElementsInVisualVicinity;return new Q(this.document).extract({element:t,setClass:n,setAttribute:r,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o})}},{key:"populateElementsInStructuralVicinity",value:function(e){var t=e.element;(0,e.setElementStructuralVicinityData)(new X(t,this.config.structuralVicinity).calculate())}},{key:"populateElementsInVisualVicinity",value:function(e){var t=e.element;(0,e.setElementVisualVicinityData)(this.visualVicinityExtractor.calculate(t))}},{key:"extractInnerText",value:function(e){var t=e.element;(0,e.setInnerText)(this.innerTextExtractor.extract(t))}},{key:"extractStyle",value:function(e){var t=e.element,n=e.setStyle;return this.styleExtractor.extract({element:t,setStyle:n})}},{key:"extractInnerFeatures",value:function(e){var t=e.element;(0,e.setInnerFeatures)(this.innerFeaturesExtractor.extract(t))}}]),e}(),de=n(3536),fe=function(){function e(t,n){(0,a.Z)(this,e),this.targetElementESRAMetadata=void 0,this.targetElementStaticData={},this.esraMetadataExtractor=void 0,this.qualifiedAttributes=[],this.qualifiedAttributesMap={},this.qualifiedClasses=[],this.qualifiedInnerFeatures=void 0,this.qualifiedInnerText=void 0,this.candidateQueries=[],this.candidates=[],this.uniqueCandidates=[],this.rankedCandidates=[],this.filteredAndSortedRankedCandidates=[],this.finalCandidates=[],this.removedCandidates=void 0,this.similarity=void 0,this.weightsSum=0,this.config={innerText:{dropIfMoreThanNCandidates:5},innerFeatures:{mandatoryPercentage:.6,mandatoryMax:6},results:{scorePercentile:.75,epsilon:.01}},this.targetElementESRAMetadata=t,this.targetElementStaticData=n,this.similarity=new de.k(this.targetElementESRAMetadata),this.esraMetadataExtractor=new le(document)}return(0,s.Z)(e,[{key:"makeWeight",value:function(e){return this.weightsSum+=e,e}},{key:"getWeight",value:function(e){return e/this.weightsSum}},{key:"extractMetadata",value:function(e){return new u(this.esraMetadataExtractor.extract(e).toMetadata())}},{key:"getLastSelectionLogs",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;if(null===(e=this.candidates)||void 0===e||!e.length)return{};var n=new XMLSerializer,r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return e.slice(0,t).map((function(e){return{score:e.score,metadata:e.metadata,element:n.serializeToString(e.candidate).substring(0,200)}}))},i=this.rankedCandidates[Math.min(this.rankedCandidates.length-1,t)].score,o=function(e){return r(e,t).filter((function(e){return e.score>=i}))};return{candidatesQuery:this.candidateQueries.filter((function(e){return!!e.length})).join(","),totalUniqueCandidates:this.uniqueCandidates.length,topRankingCandidates:r(this.rankedCandidates,t),topRemovedCandidates:{hidden:o(this.removedCandidates.hidden),staticData:o(this.removedCandidates.static)}}}},{key:"select",value:function(){var t,n,r=this;if("html"===this.targetElementESRAMetadata.tag){var i=document.querySelector("html");return[{candidate:i,score:1,esraMetadata:this.extractMetadata(i)}]}this.setQualifiedAttributesQueries(),this.setQualifiedClassesQueries(),this.setInnerFeaturesQueries(),this.candidates=[];var o,a=this.candidateQueries.filter((function(e){return!!e.length})).join(",");(a.length&&(this.candidates=T(a)),(t=this.candidates).push.apply(t,(0,m.Z)(this.getInnerTextCandidates())),this.candidates.length)||(o=this.candidates).push.apply(o,(0,m.Z)(this.getTagCandidates()));this.uniqueCandidates=this.candidates.filter((function(e,t,n){return n.indexOf(e)===t}));var s=e.limitChildren;null!==(n=s)&&void 0!==n&&n.length&&(s=s.map((function(e){return(0,l.Z)((0,l.Z)({},e),{},{parent:document.querySelector(e.selector)})})),this.uniqueCandidates=this.uniqueCandidates.filter((function(e){var t,n=(0,p.Z)(s);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i.parent&&r.isDescendant(i.parent,e)&&i.limit--<=0)return!1}}catch(o){n.e(o)}finally{n.f()}return!0}))),this.rankedCandidates=this.uniqueCandidates.filter((function(e){return e instanceof Z(e).HTMLElement})).map((function(e){var t=r.extractMetadata(e),n=r.similarity.rank(t);return{score:n.score,candidate:e,scores:n.scores,esraMetadata:t}})).sort((function(e,t){return t.score-e.score})),this.removedCandidates={hidden:[],static:[]},this.filteredAndSortedRankedCandidates=this.rankedCandidates.filter((function(e){var t=r.isHidden(e.candidate),n=t.isHidden,i=t.clickOffset;return!0===n?(r.removedCandidates.hidden.push(e),!1):(i&&(e.clickOffset=i),!(z(r.targetElementStaticData)&&!function(e,t){var n=G(e),r=G(t),i=function(e){return!e||0===Object.keys(e).length};if(i(n)&&i(r))return!0;if(i(n)||i(r))return!1;var o=Object.keys(n).sort(),a=Object.keys(r).sort();if(o.length!==a.length)return!1;if(!o.every((function(e,t){return e===a[t]})))return!1;for(var s in n)if(n[s]!==r[s])return!1;return!0}(r.formatStaticCandidates(e.esraMetadata.staticCandidates),r.targetElementStaticData))||(e.metadata=JSON.stringify(e.esraMetadata.staticCandidates),r.removedCandidates.static.push(e),!1))})),this.removedCandidates.hidden.slice().reverse().forEach((function(e,t,n){"INPUT"===e.candidate.tagName&&r.filteredAndSortedRankedCandidates.find((function(t){return t.score>.1&&t.candidate.contains(e.candidate)}))&&(r.removedCandidates.hidden.splice(n.length-1-t,1),r.filteredAndSortedRankedCandidates.push(e))})),this.filteredAndSortedRankedCandidates=this.filteredAndSortedRankedCandidates.sort((function(e,t){return t.score-e.score}));var u=this.filteredAndSortedRankedCandidates.length*(1-this.config.results.scorePercentile);this.finalCandidates=[];for(var c=null,d=0;d<this.filteredAndSortedRankedCandidates.length;++d){var f=this.filteredAndSortedRankedCandidates[d];if(d>=u&&(!c||c.score-f.score>this.config.results.epsilon))break;c=f,this.finalCandidates.push(f)}return this.finalCandidates}},{key:"selectOne",value:function(){var e=this.select();return e.length?e[0]:{candidate:void 0,score:0,esraMetadata:void 0}}},{key:"getFinalCandidates",value:function(){return this.finalCandidates}},{key:"setQualifiedAttributesQueries",value:function(){var e=this;this.candidateQueries.push(this.similarity.getQualifiedAttributes().map((function(t){return"[".concat(t,'="').concat(e.targetElementESRAMetadata.attributes[t].value,'"]')})).join(","))}},{key:"setQualifiedClassesQueries",value:function(){this.candidateQueries.push(this.similarity.getQualifiedClasses().map((function(e){return".".concat(e)})).join(","))}},{key:"setInnerFeaturesQueries",value:function(){var e=this,t=this.targetElementESRAMetadata.innerFeatures;t.length>10&&(t=Object.values(t.reduce((function(e,t){if(t.isRoot)return e;var n="".concat(t.type,"_").concat(t.tag);return e[n]?e:(0,l.Z)((0,l.Z)({},e),{},(0,f.Z)({},n,t))}),{})));var n,r=Math.min(Math.ceil(t.length*this.config.innerFeatures.mandatoryPercentage),this.config.innerFeatures.mandatoryMax),i=(n=t,n.reduce((function(e,t){var n=e.map((function(e){return[].concat((0,m.Z)(e),[t])})).filter((function(e){return e.length<=r}));return e.concat(n)}),[[]])).filter((function(e){return e.length===r}));i.forEach((function(t){var n=[];t.forEach((function(t){return n.push(e.getFeatureSelector(t))})),e.cartesian(n).forEach((function(t){return e.candidateQueries.push("*"+t.map((function(e){return":has(".concat(e,")")})).join(""))}))}))}},{key:"cartesian",value:function(e){if(!e.length)return[];var t=[],n=e.length-1;return function r(i,o){for(var a=0,s=e[o].length;a<s;a++){var u=i.slice(0);u.push(e[o][a]),o==n?t.push(u):r(u,o+1)}}([],0),t}},{key:"getFeatureSelector",value:function(e){var t=[e.tag];switch(e.type){case d.EI.Media:e.src&&t.push("".concat(e.tag,'[src="').concat(e.src,'"]'));break;case d.EI.Anchor:t.push("".concat(e.tag,'[href="').concat(e.href,'"]'));break;case d.EI.Button:break;case d.EI.Input:t.push("".concat(e.tag,'[type="').concat(e.inputType,'"]')),e.placeholder&&t.push("".concat(e.tag,'[placeholder="').concat(e.placeholder,'"]'))}return t}},{key:"getInnerTextCandidates",value:function(){var e=this.similarity.getQualifiedInnerText();if(!e)return[];var t=se(e.content,{exact:!0});return t.length>this.config.innerText.dropIfMoreThanNCandidates?[]:t}},{key:"getTagCandidates",value:function(){return T(this.targetElementESRAMetadata.tag)}},{key:"isDescendant",value:function(e,t){return e.contains(t)}},{key:"formatStaticCandidates",value:function(e){var t={};return Object.keys(e).forEach((function(n){t[n]=e[n]})),t}},{key:"isHidden",value:function(e){return L(e)}}]),e}();fe.limitChildren=void 0;var he=n(1752),pe=n(1120),ve=n(136),me=n(7277),ge=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"injectSelectorsAndLocators",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,d,f,h,p,v=this,m=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=(r=m.length>1&&void 0!==m[1]?m[1]:{}).testIdSelector,o=r.searchParentFrames,a=void 0===o||o,s=n.map((function(e){return{container:e,removedAttributes:v.stripNodeAttributes(e.element)}})),u=0;case 3:if(!(u<s.length)){e.next=15;break}return c=s[u],e.next=7,this.getSelectorAndLocator(c.container.element,{testIdSelector:i,searchParentFrames:a,stripAttributes:!1});case 7:d=e.sent,f=d.selector,h=d.locator,p=d.parentFramesSelectors,s[u]=(0,l.Z)((0,l.Z)({},c),{},{selector:f,locator:h,parentFramesSelectors:p});case 12:u++,e.next=3;break;case 15:return s.forEach((function(e){(e.removedAttributes.id||e.removedAttributes.originalClasses)&&v.restoreNodeAttributes(e.container.element,e.removedAttributes)})),e.abrupt("return",s.map((function(e){var t=e.container,n=e.selector,r=e.locator,i=e.parentFramesSelectors;return(0,l.Z)((0,l.Z)({},t),{},{selector:n,locator:r,parentFramesSelectors:i})})));case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"stripNodeAttributes",value:function(e){var t,n,r=e;r.id&&(t=r.id,r.removeAttribute("id"));try{if((n=r.getAttribute("class"))&&"string"===typeof n){var i=n.split(" ").filter((function(e){return!e.startsWith("css-")&&!e.startsWith("jss-")})).join(" ");r.setAttribute("class",i)}else n=void 0}catch(Zt){return console.warn("[playwright selector generator] error with class filtering",Zt),{}}return{id:t,originalClasses:n}}},{key:"restoreNodeAttributes",value:function(e,t){var n=e,r=t.id,i=t.originalClasses;r&&n.setAttribute("id",r),i&&n.setAttribute("class",i)}},{key:"getSelectorAndLocator",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h,p,v,m,g,y,b,w,S=this,I=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=I.length>1&&void 0!==I[1]?I[1]:{}).testIdSelector,o=r.searchParentFrames,a=void 0===o||o,s=r.stripAttributes,u=void 0===s||s,n){e.next=3;break}return e.abrupt("return",null);case 3:if(c=this.getIframes(),!a){e.next=10;break}return e.next=7,this.getParentFramesSelectors(n,c);case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0=[];case 11:if(l=e.t0,d=n,!(f=this.getTestAttributeSelector(d,i))){e.next=16;break}return e.abrupt("return",{selector:f,locator:'locator("'.concat(f,'")'),parentFramesSelectors:l});case 16:return u&&(v=this.stripNodeAttributes(n),h=v.id,p=v.originalClasses),m="",g="",e.prev=18,e.next=21,window.playwright.generateSelectorAndLocator(n);case 21:y=e.sent,m=y.selector,g=y.locator,e.next=42;break;case 26:if(e.prev=26,e.t1=e.catch(18),(b=n.ownerDocument.defaultView)===window){e.next=42;break}return b.playwright||(b.playwright=window.playwright),e.prev=31,e.next=34,b.playwright.generateSelectorAndLocator(n);case 34:w=e.sent,m=w.selector,g=w.locator,e.next=42;break;case 39:e.prev=39,e.t2=e.catch(31),console.log("get selector and locator error",n.nodeType,n,"\n",e.t1,"\n",e.t2);case 42:return e.prev=42,u&&this.restoreNodeAttributes(n,{id:h,originalClasses:p}),e.finish(42);case 45:return g&&l&&l.length>0&&(g=l.map((function(e){return"frameLocator('".concat(S.escapeSingleQuotes(S.escapeBackslash(e)),"')")})).join(".")+".".concat(g)),e.abrupt("return",{selector:m,locator:g,parentFramesSelectors:l});case 47:case"end":return e.stop()}}),e,this,[[18,26,42,45],[31,39]])})));return function(t){return e.apply(this,arguments)}}()},{key:"selector",value:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u,c,l;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a=window.top,!(r&&r.length>0)){e.next=22;break}s=(0,p.Z)(r),e.prev=4,s.s();case 6:if((u=s.n()).done){e.next=14;break}return c=u.value,e.next=10,a.playwright.$(c);case 10:l=e.sent,a=l.contentWindow;case 12:e.next=6;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(4),s.e(e.t0);case 19:return e.prev=19,s.f(),e.finish(19);case 22:return e.next=24,a.playwright.$(n);case 24:o=e.sent,e.next=29;break;case 27:e.prev=27,e.t1=e.catch(0);case 29:return e.abrupt("return",null!==(i=o)&&void 0!==i?i:this.selectOnIframe(n));case 30:case"end":return e.stop()}}),e,this,[[0,27],[4,16,19,22]])})));return function(t,n){return e.apply(this,arguments)}}())},{key:"getParentFramesSelectors",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.length){e.next=2;break}return e.abrupt("return",[]);case 2:if((i=n.ownerDocument)!==document){e.next=5;break}return e.abrupt("return",[]);case 5:if(o=r.find((function(e){return e.contentDocument===i}))){e.next=8;break}return e.abrupt("return",[]);case 8:return e.next=10,this.getSelectorAndLocator(o,{searchParentFrames:!1});case 10:return a=e.sent,e.t0=[],e.t1=m.Z,e.next=15,this.getParentFramesSelectors(o,r);case 15:return e.t2=e.sent,e.t3=(0,e.t1)(e.t2),e.t4=[a.selector],e.abrupt("return",e.t0.concat.call(e.t0,e.t3,e.t4));case 19:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getIframes",value:function(){var e=y.getInstance("playwrightElementSelectorGeneratorIframes");if(e.hasCache())return e.get();var t=T("iframe");return e.set(t),t}},{key:"selectOnIframe",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=document.querySelector("iframe")){e.next=3;break}return e.abrupt("return",void 0);case 3:return(i=r.contentWindow).playwright||(i.playwright=window.playwright),e.prev=5,e.next=8,i.playwright.$(n);case 8:return e.abrupt("return",e.sent);case 11:e.prev=11,e.t0=e.catch(5),console.log("selector error",n);case 14:case"end":return e.stop()}}),e,null,[[5,11]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getTestAttributeSelector",value:function(e,t){if(t&&e.getAttribute(t))return"[".concat(t,'="').concat(e.getAttribute(t),'"]')}},{key:"escapeSingleQuotes",value:function(e){return n="'",r="\\'",(t=e)?t.replace(new RegExp(n,"g"),r):t;var t,n,r}},{key:"escapeBackslash",value:function(e){return e.replace(/\\/g,"\\\\")}}]),e}(),ye=n(763);function be(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var n=e,r={},i=0;i<n.attributes.length;i++){var o=n.attributes[i];r[o.name]=o.value}var a,s=[],u=(0,p.Z)(n.childNodes);try{for(u.s();!(a=u.n()).done;){var c=be(a.value,t);c&&s.push(c)}}catch(m){u.e(m)}finally{u.f()}var l=s.reduce((function(e,t){return Math.max(e,t.depth)}),0)+1,d="".concat(n.tagName.toLowerCase(),"#").concat(Object.keys(r).sort(),"#").concat(s.map((function(e){return e.templateHash})).join("|")),f=Object.values(r).concat(s.flatMap((function(e){return e.templateValues}))),h={type:"ELEMENT",tagName:n.tagName.toLowerCase(),attributes:r,children:s,templateHash:d,templateValues:f,depth:l,node:e};if(t[d]){if(t[d].depth!==l)throw new Error("Template depth mismatch for template ".concat(d));t[d].nodes.push(h)}else t[d]={hash:d,nodes:[h],depth:l};return h}if(e.nodeType===Node.TEXT_NODE){var v=e.textContent;if(v&&v.trim())return{type:"TEXT",content:v,templateHash:"TEXT",templateValues:[v],depth:0,node:e}}return null}var we=function(e){var t=(0,ye.range)(e.nodes[0].templateValues.length).filter((function(t){var n=e.nodes.map((function(e){return e.templateValues[t]}));return n.every((function(e){return e===n[0]}))}));return(0,l.Z)((0,l.Z)({},e),{},{valuesToInline:new Set(t)})};function Se(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.repetitionThreshold,r=void 0===n?3:n,i=t.depth,o=void 0===i?3:i,a=t.forceSameParent,s={},u={};if(void 0!==a&&a){for(var c=Object.values(e),d=0;d<c.length-1;d++){for(var f=c[d],h=[],v=f.nodes[0].node.parentNode,g=f.nodes.length-1;g>0;g--)f.nodes[g].node.parentNode!==v&&(h=[].concat((0,m.Z)(h),(0,m.Z)(f.nodes.splice(g,1))));0!==h.length&&c.push((0,l.Z)((0,l.Z)({},f),{},{nodes:h}))}for(var y={},b=0,w=c;b<w.length;b++){var S=w[b];if(y[S.hash]){for(var I=0;"".concat(S.hash).concat(I)in y;)I++;y["".concat(S.hash).concat(I)]=S}else y[S.hash]=S}e=y}var C,k=(0,p.Z)(Object.values(e).sort((function(e){return-e.depth})));try{var E=function(){var e,t=C.value;if(t.nodes.length-(null!==(e=u[t.hash])&&void 0!==e?e:0)<r||t.depth<o)return"continue";t.label="T".concat(Object.keys(s).length+1);var n=Ce(t.nodes[0],s,t);t.template=n.template,s[t.hash]=t,n.consumedTemplates.forEach((function(e){var n;u[e]=(null!==(n=u[e])&&void 0!==n?n:0)+t.nodes.length}))};for(k.s();!(C=k.n()).done;)E()}catch(x){k.e(x)}finally{k.f()}return s}function Ie(e,t){var n=t+1-Array.from(e.valuesToInline).filter((function(e){return e<t})).length;return"$".concat(n)}function Ce(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("TEXT"===e.type)return n.valuesToInline.has(r)?{template:e.content,valueIndex:r+1,consumedTemplates:[e.templateHash]}:{template:Ie(n,r),valueIndex:r+1,consumedTemplates:[e.templateHash]};var i=r,o=[e.templateHash],a=Object.entries(e.attributes).map((function(e,t){var r=(0,v.Z)(e,2),o=r[0],a=r[1];return n.valuesToInline.has(i+t)?" ".concat(o,'="').concat(a,'"'):" ".concat(o,"=").concat(Ie(n,i+t))})).join("");i+=Object.keys(e.attributes).length;var s,u=[],c=(0,p.Z)(e.children);try{for(c.s();!(s=c.n()).done;){var l=Ce(s.value,t,n,i);u.push(l.template),i=l.valueIndex,o.push.apply(o,(0,m.Z)(l.consumedTemplates))}}catch(f){c.e(f)}finally{c.f()}var d=0===e.children.length;return{template:"<".concat(e.tagName.toLowerCase()).concat(a).concat(d?"/>":">".concat(u.join(""),"</").concat(e.tagName.toLowerCase(),">")),valueIndex:i,consumedTemplates:o}}function ke(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,r={};if(!be(e,r))return{};for(var i=Object.values(r).reduce((function(e,t){var n=we(t);return(0,l.Z)((0,l.Z)({},e),{},(0,f.Z)({},n.hash,n))}),{}),o={},a=function(){var e=Se(i,{repetitionThreshold:t,depth:s,forceSameParent:!0}),n=Object.keys(e).reduce((function(t,n){return function(e){for(var t=0,n=Object.values(o);t<n.length;t++)for(var r=n[t],i=0,a=Object.keys(r);i<a.length;i++)if(a[i]===e)return!0;return!1}(n)?t:(0,l.Z)((0,l.Z)({},t),{},(0,f.Z)({},n,e[n]))}),{}),r=Object.keys(n).reduce((function(e,t){return function(e){for(var t=0,n=Object.values(o);t<n.length;t++)for(var r=n[t],i=0,a=Object.values(r);i<a.length;i++)if(a[i].nodes.map((function(e){return e.node})).filter((function(t){return t.contains(e)})).length>0)return!0;return!1}(n[t].nodes[0].node)?e:(0,l.Z)((0,l.Z)({},e),{},(0,f.Z)({},t,n[t]))}),{});Object.keys(r).length>0&&(o[s]=r)},s=n;s>0;s--)a();return Object.keys(o).reduce((function(e,t){return(0,l.Z)((0,l.Z)({},e),{},(0,f.Z)({},t,Object.values(o[t]).map((function(e){return e.nodes.map((function(e){return e.node}))}))))}),{})}var Ee=[{selector:'path[d="M17.5 13V15.6667C17.5 16.0203 17.3361 16.3594 17.0444 16.6095C16.7527 16.8595 16.357 17 15.9444 17H5.05556C4.643 17 4.24733 16.8595 3.95561 16.6095C3.66389 16.3594 3.5 16.0203 3.5 15.6667V13"] + path[d="M14.6673 6.92057L10.5007 2.75391L6.33398 6.92057"] + path[d="M10.5 2.75391V12.7539"]',description:"export button"},{selector:'path[d="M16.0893 13.1868C16.6838 12.7754 17.1321 12.1858 17.3697 11.503C17.6072 10.8202 17.6216 10.0796 17.4107 9.38816C17.1999 8.69667 16.7748 8.09007 16.1968 7.65594C15.6187 7.2218 14.9177 6.9826 14.1948 6.97285H12.8308C12.6017 6.20011 12.1996 5.48973 11.6549 4.89565C11.1102 4.30157 10.4374 3.83943 9.68735 3.54431C8.93734 3.24918 8.12995 3.12885 7.32648 3.19244C6.52301 3.25603 5.7446 3.50187 5.05036 3.9113C4.35612 4.32072 3.7643 4.88297 3.31985 5.55533C2.8754 6.22769 2.59001 6.99248 2.48535 7.79164C2.38068 8.59079 2.4595 9.40329 2.71582 10.1674C2.97214 10.9316 3.39921 11.6272 3.96461 12.2016"] + path[d="M10.0273 10.0039V16.8241"] + path[d="M13.0585 13.0351L10.0273 10.0039L6.99609 13.0351"]',description:"import button"},{selector:'path[d="M20.4696 21.5303C20.7625 21.8232 21.2373 21.8232 21.5302 21.5303C21.8231 21.2374 21.8231 20.7626 21.5302 20.4697L20.4696 21.5303ZM17.1802 16.1197C16.8873 15.8268 16.4125 15.8268 16.1196 16.1197C15.8267 16.4126 15.8267 16.8874 16.1196 17.1803L17.1802 16.1197ZM18.25 11C18.25 15.0041 15.0041 18.25 11 18.25V19.75C15.8325 19.75 19.75 15.8325 19.75 11H18.25ZM11 18.25C6.99594 18.25 3.75 15.0041 3.75 11H2.25C2.25 15.8325 6.16751 19.75 11 19.75V18.25ZM3.75 11C3.75 6.99594 6.99594 3.75 11 3.75V2.25C6.16751 2.25 2.25 6.16751 2.25 11H3.75ZM11 3.75C15.0041 3.75 18.25 6.99594 18.25 11H19.75C19.75 6.16751 15.8325 2.25 11 2.25V3.75ZM21.5302 20.4697L17.1802 16.1197L16.1196 17.1803L20.4696 21.5303L21.5302 20.4697Z"]',description:"search"},{selector:'path[d="M3.75 10H16.875"] + path[d="M8.125 5L3.125 10L8.125 15"]',description:"back"},{selector:'path[d="M3.33301 8H12.6663"] + path[d="M8 3.33331L12.6667 7.99998L8 12.6666"]',description:"forward"},{selector:'path[d="M10 4.16667V15.8333"] + path[d="M4.16699 10H15.8337"]',description:"new or Add button"},{selector:'path[d="M10 10.75C10.4142 10.75 10.75 10.4142 10.75 10C10.75 9.58579 10.4142 9.25 10 9.25C9.58579 9.25 9.25 9.58579 9.25 10C9.25 10.4142 9.58579 10.75 10 10.75Z"] + path[d="M15.833 10.75C16.2472 10.75 16.583 10.4142 16.583 10C16.583 9.58579 16.2472 9.25 15.833 9.25C15.4188 9.25 15.083 9.58579 15.083 10C15.083 10.4142 15.4188 10.75 15.833 10.75Z"] + path[d="M4.16699 10.75C4.58121 10.75 4.91699 10.4142 4.91699 10C4.91699 9.58579 4.58121 9.25 4.16699 9.25C3.75278 9.25 3.41699 9.58579 3.41699 10C3.41699 10.4142 3.75278 10.75 4.16699 10.75Z"]',description:"open menu"},{selector:'path[d="M10 4.16667V15.8333"] + path[d="M4.16699 10H15.8337"]',description:"add filter"},{selector:'path[d="M15 5L5 15"] + path[d="M5 5L15 15"]',description:"close or remove"},{selector:'path[d="M4 6L8 10L12 6"]',description:"open or close dropdown"},{selector:'path[d="M10 17.5C14.1421 17.5 17.5 14.1421 17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5Z"] + path[d="M12.5 7.5L7.5 12.5"] + path[d="M7.5 7.5L12.5 12.5"]',description:"clear input"},{selector:'path[d="M3.33301 5.49054H4.81449H16.6663"] + path[d="M7.14286 5.49999V3.99999C7.14286 3.60216 7.29337 3.22063 7.56128 2.93932C7.82919 2.65802 8.19255 2.49998 8.57143 2.49998H11.4286C11.8075 2.49998 12.1708 2.65802 12.4387 2.93932C12.7066 3.22063 12.8571 3.60216 12.8571 3.99999V5.49999M15 5.49999V16C15 16.3978 14.8495 16.7793 14.5816 17.0607C14.3137 17.342 13.9503 17.5 13.5714 17.5H6.42857C6.04969 17.5 5.68633 17.342 5.41842 17.0607C5.15051 16.7793 5 16.3978 5 16V5.49999H15Z"] + path[d="M8.33203 9.23726V13.4039"] + path[d="M11.666 9.23726V13.4039"]',description:"delete"},{selector:'path[d="M13.3334 4L6.00008 11.3333L2.66675 8"]',description:"checked"},{selector:'path[d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"]',description:"downward-pointing arrow"},{selector:'path[d="M18.0893 3.08926C18.4147 2.76382 18.4147 2.23618 18.0893 1.91074C17.7638 1.58531 17.2362 1.58531 16.9107 1.91074L18.0893 3.08926ZM9.41074 9.41074L8.82149 10L10 11.1785L10.5893 10.5893L9.41074 9.41074ZM16.9107 1.91074L9.41074 9.41074L10.5893 10.5893L18.0893 3.08926L16.9107 1.91074Z"] + path[d="M17.5 2.5L12.25 17.5L9.25 10.75L2.5 7.75L17.5 2.5Z"]',description:"send"}],xe=1e4;function Ae(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xe,t=[],n=new MutationObserver((function(e){e.forEach((function(e){e.addedNodes.length>0&&e.addedNodes.forEach((function(e){e instanceof HTMLElement&&function(e){if(e.getElementsByTagName("*").length>50)return!1;if(e.outerHTML.length>5e3)return!1;return!0}(e)&&setTimeout((function(){t.push(function(e){var t,n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),r=[];for(;t=n.nextNode();)L(t.parentNode).isHidden||r.push(t);return r}(e))}),1e3)}))}))}));return n.observe(document.body,{childList:!0,subtree:!0}),setTimeout((function(){n.disconnect()}),e),function(){var e=t.map((function(e){return e.filter((function(e){return!e.isConnected||L(e.parentElement).isHidden}))})).filter((function(e){return e.length})).map((function(e){return"<span>".concat(e.map((function(e){return e.textContent})).join("</span><span>"),"</span>")}));return t=[],e}}var Me,Te;!function(e){e.ARIA_LABEL="aria-label",e.TEXT="text"}(Me||(Me={})),function(e){e.SVG="svg"}(Te||(Te={}));var Ne,Re=function(){function e(){(0,a.Z)(this,e),this.interactableElements=void 0,this.interactableElementsFromSimplifiedDom=void 0,this.selectors=void 0,this.flashingElements=void 0}return(0,s.Z)(e,[{key:"preprocessDocument",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;b("[preprocessDocument] querySelectorAllExtended");var t=T("*",e,{includeHTML:!0});w("[preprocessDocument] querySelectorAllExtended"),b("[preprocessDocument] isElementHidden");var n,r=(0,p.Z)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=L(i,{markTransparentElementsAsHidden:!1,markElementsHiddenByTransparentElementAsVisible:!0});i.setAttribute("checksum-data-visible",o.isHidden||o.isTransparent?"false":"true"),!o.isHidden&&o.isTransparent&&i.setAttribute("checksum-data-transparently-visible","true"),o.isBehindTransparentElement&&i.setAttribute("checksum-data-visible-under-transparent-element","true"),o.clickOffset&&i.setAttribute("checksum-data-click-offset","".concat(o.clickOffset.x,";").concat(o.clickOffset.y))}}catch(a){r.e(a)}finally{r.f()}w("[preprocessDocument] isElementHidden")}},{key:"markInteractableElements",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.persistChecksumIds,o=void 0===i||i,a=r.checksumIdCounter,s=void 0===a?0:a,u=r.forceIncludeAttribute;b("[markInteractableElements]"),this.interactableElements=[],console.log("Getting all interactable elements...");var c=x(n,e,{allowDisabled:!0,excludeCrossOriginIframes:!1});console.log("Got ".concat(c.length," interactable elements"));var l=function(e){if(o)return e._checksumid||(e._checksumid=s.toString(),s++),e.setAttribute("checksumid",e._checksumid),e._checksumid;var t=s.toString();return e.setAttribute("checksumid",t),s++,t},d=function(e){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=null===(n=e.getAttribute("checksum-data-click-offset"))||void 0===n?void 0:n.split(";"),o=i&&{x:parseInt(i[0]),y:parseInt(i[1])},a=l(e);t.interactableElements.push({checksumId:a,element:e,forced:r,clickOffset:o})};return c.forEach((function(e){return d(e)})),u&&T("[".concat(u,"]"),n,{includeHTML:!0}).forEach((function(e){return d(e,!0)})),w("[markInteractableElements]"),s}},{key:"truthyFilter",value:function(e){return Boolean(e)}},{key:"generateSimplifiedDom",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.checkElementInstanceType,o=void 0===i||i,a=r.forceIncludeAttribute,s=void 0===a?void 0:a,u=r.forceIncludeElements,c=void 0===u?[]:u,l=r.svgIntegration,d=void 0===l?Me.ARIA_LABEL:l,f=r.onForceIncludeElement,h=void 0===f?void 0:f,v=r.contentWindow,m=void 0===v?window:v;if(!e)return null;var g,y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return e._originalNode=t,e},b=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return y(document.createTextNode(t),n)},w=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return y(document.createElement(t),n)};if(e.nodeType===Node.ELEMENT_NODE&&"head"===e.tagName.toLowerCase())return null;if(e.nodeType===Node.TEXT_NODE)return e.parentElement&&("false"!==e.parentElement.getAttribute("checksum-data-visible")||e.parentElement.hasAttribute("checksumid"))?"body"===e.parentElement.tagName.toLowerCase()?null:null!==(g=e.textContent)&&void 0!==g&&g.trim()?b(e.textContent+" "):null:null;if(e.nodeType!==Node.ELEMENT_NODE)return null;if(o&&!V(e,"HTMLElement")&&!V(e,"SVGElement"))return null;var S=e,I="iframe"===S.tagName.toLowerCase()&&S.contentDocument,C=R(I?S.contentDocument.documentElement:S,{flattenShadowRootChildren:!0}).map((function(e){return t.generateSimplifiedDom(e,n,{checkElementInstanceType:o,forceIncludeAttribute:s,forceIncludeElements:c,svgIntegration:d,onForceIncludeElement:h,contentWindow:I?S.contentWindow:m})})).filter(this.truthyFilter),k="false"!==S.getAttribute("checksum-data-visible"),E=S.hasAttribute("checksumid"),x=S.hasAttribute("role"),A=this.getElementCustomDescription(S,{enableSVGCustomDescription:!!d}),M=A.customDescription,T=A.customDescriptionTarget,N=!!M,_=S.hasAttribute("aria-label")||S.hasAttribute("name"),D=c.includes(S)||!!s&&S.hasAttribute(s),O=E||k&&(x||_||N||S.matches(["form","button","input","textarea","a","table","th","tr","td","section","nav","header","footer","main","article","aside","li","ul","select","option","datalist"].join(",")));if(!(O||D)){if(!C.length)return null;if(1===C.length)return C[0]}!O&&D&&(null===h||void 0===h||h(S));var Z=function(){if(N&&T===Te.SVG)switch(d){case Me.ARIA_LABEL:var e=w("svg");return e.setAttribute("aria-label",M),{simplifiedNode:e,appendChildren:!1};case Me.TEXT:if(S.hasAttribute("checksumid")){var t=w("div");return t.innerText=M,{simplifiedNode:t,appendChildren:!1}}return{simplifiedNode:b(" [".concat(M,"] ")),appendChildren:!1}}var n="body"===S.tagName.toLowerCase()&&S.ownerDocument!==document?"div":S.tagName;return{simplifiedNode:w(n)}}(),L=Z.simplifiedNode,F=Z.appendChildren,B=void 0===F||F;if(!V(L,"Element"))return L;var P,j=L,W=["aria-.+","data-name","name","type","placeholder","content","value","role","icon","title","checksumid","checked","disabled","selected","label","required","inputmode","min","max","step","minlength","maxlength","alt","hidden","draggable","contenteditable","href","(data-)?test(-)?id"].concat(n),U=S.attributes,H=(0,p.Z)(U);try{for(H.s();!(P=H.n()).done;){var G,z=P.value,q=(0,p.Z)(W);try{for(q.s();!(G=q.n()).done;){var Y,Q=G.value;if(new RegExp("^"+Q+"$").test(z.name))j.setAttribute(z.name,null===(Y=z.value)||void 0===Y||Y)}}catch(X){q.e(X)}finally{q.f()}}}catch(X){H.e(X)}finally{H.f()}if(S.isContentEditable?j.setAttribute("contenteditable","true"):["TEXTAREA","INPUT","SELECT"].includes(S.tagName)||"text"!==window.getComputedStyle(S).cursor||j.setAttribute("contenteditable","cursor-text"),V(S,"HTMLInputElement")||V(S,"HTMLSelectElement"))j.setAttribute("value",S.value);else if(V(S,"HTMLTextAreaElement")&&!S.childNodes.length&&S.value){var K=b(S.value);j.appendChild(K)}return B&&C.forEach((function(e){return j.appendChild(e)})),j}},{key:"getElementCustomDescription",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).enableSVGCustomDescription,n=void 0===t||t;return(V(e,"SVGElement")||"svg"===e.tagName.toLowerCase())&&n?{customDescriptionTarget:Te.SVG,customDescription:this.getSVGDescriptionForElement(e)}:{}}},{key:"getSVGDescriptionForElement",value:function(e){var t=this.findSvgElementDescriptionFromBank(e);if(t)return t;var n=e.querySelector("title");return n?n.textContent:void 0}},{key:"findSvgElementDescriptionFromBank",value:function(e){var t;return null===(t=this.getSvgBank().find((function(t){return e.matches("svg:has(".concat(t.selector,")"))})))||void 0===t?void 0:t.description}},{key:"getSvgBank",value:function(){return Ee}},{key:"restoreDom",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;T("*",e).forEach((function(e){e.removeAttribute("checksum-data-visible"),e.removeAttribute("checksum-data-transparently-visible"),e.removeAttribute("checksum-data-visible-under-transparent-element"),e.removeAttribute("checksumid"),e.removeAttribute("checksum-data-click-offset")}))}},{key:"mapAndStoreSelectors",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u,c,l,d,f;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},r=new ge,e.t0=p.Z,e.next=5,r.injectSelectorsAndLocators(this.interactableElementsFromSimplifiedDom);case 5:e.t1=e.sent,i=(0,e.t0)(e.t1),e.prev=7,i.s();case 9:if((o=i.n()).done){e.next=17;break}if(a=o.value,s=a.checksumId,u=a.element,c=a.clickOffset,l=a.selector,d=a.locator,f=a.parentFramesSelectors,l){e.next=14;break}return console.warn("Unable to get selector for element",u),e.abrupt("continue",15);case 14:n[s]={element:u,selector:l,locator:d,clickOffset:c,parentFramesSelectors:f};case 15:e.next=9;break;case 17:e.next=22;break;case 19:e.prev=19,e.t2=e.catch(7),i.e(e.t2);case 22:return e.prev=22,i.f(),e.finish(22);case 25:return e.abrupt("return",n);case 26:case"end":return e.stop()}}),e,this,[[7,19,22,25]])})));return function(){return e.apply(this,arguments)}}()},{key:"shouldFurtherReduce",value:function(e){return e.outerHTML.length>16e3}},{key:"getRepeatingElementsToExclude",value:function(e,t,n){if(e.length<=t)return[];var r=t,i=e.reduce((function(e,t){var n=t._originalNode;return D(V(n,"Element")?n:null===n||void 0===n?void 0:n.parentElement)?e.inViewportElements.push(t):e.outOfViewportElements.push(t),e}),{inViewportElements:[],outOfViewportElements:[]}),o=i.inViewportElements,a=i.outOfViewportElements,s=[],u=function(e){var t,i,o=(0,p.Z)(e);try{for(o.s();!(t=o.n()).done;){var a=t.value;if(i=a,n&&(i.hasAttribute(n)||Array.from(i.querySelectorAll("[".concat(n,"]"))).length>0)||s.push(a),s.length===r)return!0}}catch(u){o.e(u)}finally{o.f()}};return u(a)||u(o),s}},{key:"refactorSimplifiedDOM",value:function(e,t){var n=this,r=t.limitNodeRepetitions,i=void 0===r?50:r,o=t.forceIncludeAttribute,a=t.maxDepth,s=void 0===a?5:a;try{for(var u=e.outerHTML.length,c=function(){var t=ke(e,i,s);if(0===Object.keys(t).reduce((function(e,n){return e+t[n].length}),0)||!Object.values(t).find((function(e){return e.find((function(e){return e.length>i}))})))return i-=i>10?5:1,"continue";var r=Object.keys(t).reduce((function(e,n){return"".concat(e).concat(n,": ").concat(t[n].map((function(e){return"[".concat(e.length," (").concat(null===e||void 0===e?void 0:e[0].tagName,")]")}))," ")}),"");console.log("Template nodes found (<depth>: <[node batches]>): ".concat(r));var a,u=Object.keys(t).reduce((function(e,n){return[].concat((0,m.Z)(e),(0,m.Z)(t[n]))}),[]),c=(0,p.Z)(u);try{for(c.s();!(a=c.n()).done;){var l=a.value;if(l.length>i)n.getRepeatingElementsToExclude(Array.from(l),Math.min(l.length-i,Math.ceil(.1*l.length)),o).forEach((function(e){return e.remove()}))}}catch(d){c.e(d)}finally{c.f()}};i>20&&this.shouldFurtherReduce(e);)c();e.outerHTML.length<u&&console.log("Reduced HTML from ".concat(u," to ").concat(e.outerHTML.length))}catch(l){console.warn("Failed refactoring reduced HTML",l)}}},{key:"reduceHTML",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h,p,v,m,g,b,w,S,I,C,k,E,x,A,M,T,N,R=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=R.length>1&&void 0!==R[1]?R[1]:{}).checkElementInstanceType,o=void 0===i||i,a=r.extraAllowedAttributes,s=void 0===a?[]:a,u=r.maintainSelectorsMapping,c=void 0===u||u,l=r.initialChecksumIdIndex,d=void 0===l?0:l,f=r.forceIncludeAttribute,h=r.persistChecksumIds,p=void 0===h||h,v=r.invalidateCache,m=void 0!==v&&v,g=r.svgIntegration,b=void 0===g?Me.ARIA_LABEL:g,w=r.includeFlashingElements,S=void 0===w||w,I=r.onForceIncludeElement,C=r.limitNodeRepetitions,k=void 0===C?50:C,E=R.length>2&&void 0!==R[2]?R[2]:document,!(x=y.getInstance("reduce",{target:E,monitorInput:!0,invalidate:m})).hasCache()){e.next=5;break}return e.abrupt("return",x.get());case 5:if(console.log("Preprocessing document..."),this.preprocessDocument(E),console.log("Done preprocessing document."),console.log("Marking interactable elements..."),A=this.markInteractableElements(n,E,{persistChecksumIds:p,checksumIdCounter:d,forceIncludeAttribute:f}),console.log("Done marking interactable elements."),console.log("Generating simplified DOM..."),M=this.generateSimplifiedDom(E.documentElement,s,{checkElementInstanceType:o,forceIncludeAttribute:f,svgIntegration:b,onForceIncludeElement:I})){e.next=15;break}throw new Error("Unable to get simplified DOM");case 15:if(console.log("Done generating simplified DOM"),console.log("Refactoring simplified DOM..."),this.refactorSimplifiedDOM(M,{limitNodeRepetitions:k,forceIncludeAttribute:f,maxDepth:5}),T=new Set(Array.from(M.querySelectorAll("[checksumid]")).map((function(e){return e.getAttribute("checksumid")}))),this.interactableElementsFromSimplifiedDom=this.interactableElements.filter((function(e){return T.has(e.checksumId)})),console.log("Done refactoring simplified DOM"),console.log("Found ".concat(this.interactableElementsFromSimplifiedDom.length," interactable elements in simplified DOM vs ").concat(this.interactableElements.length," in original DOM")),console.log("Restoring DOM..."),this.restoreDom(E),console.log("Done restoring DOM"),!c){e.next=31;break}return console.log("Mapping selectors..."),e.next=29,this.mapAndStoreSelectors();case 29:this.selectors=e.sent,console.log("Done mapping selectors");case 31:return N={reducedDOM:M,reducedHTML:M.outerHTML,currentChecksumIdIndex:A,selectors:this.selectors},S&&(console.log("Adding flashing HTML..."),N.flashingHTML=this.flashingElements?this.flashingElements():[],this.flashingElements=Ae(),console.log("Done adding flashing HTML")),x.set(N),e.abrupt("return",N);case 35:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getSelectorForChecksumId",value:function(e){var t;return null!==(t=this.selectors[e])&&void 0!==t?t:{selector:e,element:null}}},{key:"getInteractableElements",value:function(){return this.interactableElements}},{key:"getInteractableElementsInReducedHTML",value:function(){return this.interactableElementsFromSimplifiedDom}}]),e}(),_e=function(){function e(){(0,a.Z)(this,e),this.esraExtractors=[],this.appSpecificRules=void 0,this.playwrightSelector=new ge,this.defaultExtractReducedHtmlAndSelector=!1,this.defaultInspectInteractableElements=!1,this.previousTargetNodeForReducedHTML=void 0,this.currentReducedHTMLChecksumIdAllocationCount=0,this.htmlReducer=new Re}return(0,s.Z)(e,[{key:"getSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h,p,v,m=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=m.length>1&&void 0!==m[1]?m[1]:{}).extractPlaywrightSelector,o=void 0===i||i,a=r.extractEsraMetadata,s=void 0===a||a,u=r.extractReducedHtmlAndSelector,c=void 0===u?this.defaultExtractReducedHtmlAndSelector:u,l=r.inspectInteractableElements,d=void 0===l?this.defaultInspectInteractableElements:l,n){e.next=3;break}return e.abrupt("return",null);case 3:if(console.log("[SessionDigesterSelector] generating for node",n),f={},s&&(console.log("extracting ESRA metadata..."),h=this.getESRAExtractor(n).extract(n),f.esraMetadata=h.toMetadata(),console.log("ESRA metadata extraction complete")),!o){e.next=14;break}return console.log("extracting playwright selector..."),e.next=10,this.playwrightSelector.getSelectorAndLocator(n);case 10:p=e.sent,v=p.selector,f.playwrightSelector=v,console.log("Playwright selector extraction complete");case 14:if(!c){e.next=20;break}return console.log("extracting reduced HTML..."),e.next=18,this.getReducedHTMLAndTargetNodeSelector(n);case 18:f.reducedHTML=e.sent,console.log("Reduced HTML extraction complete");case 20:if(!d){e.next=26;break}return console.log("extracting element inspection..."),e.next=24,this.isElementInteractable(n);case 24:f.interactionFoundOnInspection=e.sent,console.log("Element inspection extraction complete");case 26:return console.log("[SessionDigesterSelector] complete",f),e.abrupt("return",f);case 28:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"selector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.playwrightSelector.selector(n));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setAppRules",value:function(e){this.appSpecificRules=e}},{key:"setOptions",value:function(e){var t=e.defaultExtractReducedHtmlAndSelector,n=e.defaultInspectInteractableElements;this.defaultExtractReducedHtmlAndSelector=t,this.defaultInspectInteractableElements=n}},{key:"getReducedHTMLAndTargetNodeSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="checksum-target-node",n.setAttribute(r,"true"),i=this.previousTargetNodeForReducedHTML&&this.previousTargetNodeForReducedHTML!==n,this.previousTargetNodeForReducedHTML=n,o=!1,a=function(e){e.hasAttribute(r)&&(o=!0)},e.next=8,this.htmlReducer.reduceHTML(this.appSpecificRules,{initialChecksumIdIndex:this.currentReducedHTMLChecksumIdAllocationCount,extraAllowedAttributes:[r],checkElementInstanceType:!1,maintainSelectorsMapping:!1,forceIncludeAttribute:r,invalidateCache:i,onForceIncludeElement:a},n.ownerDocument);case 8:return s=e.sent,u=s.reducedDOM,c=s.reducedHTML,l=s.currentChecksumIdIndex,n.removeAttribute(r),this.currentReducedHTMLChecksumIdAllocationCount=l,d=u.matches("[".concat(r,"=true]"))?u:u.querySelector("[".concat(r,"=true]")),f=d?d.getAttribute("checksumid"):void 0,e.abrupt("return",{html:c,selector:f,targetForceIncluded:o});case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getESRAExtractor",value:function(e){var t=this.esraExtractors.find((function(t){return t.isSameDocument(e.ownerDocument)}));if(t)return t;var n=new le(e.ownerDocument);return this.esraExtractors.push(n),n}},{key:"isElementInteractable",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.htmlReducer.getInteractableElements())||!r.length){e.next=3;break}return e.abrupt("return",r.some((function(e){return e.element===n&&!e.forced})));case 3:return e.next=5,x(n.ownerDocument,this.appSpecificRules);case 5:return i=e.sent,e.abrupt("return",i.includes(n));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}(),De=n(1414),Oe=n(8739),Ze=n(6842),Le=n(6301),Fe=n.n(Le),Ve=function(e){(0,ve.Z)(i,e);var n=(0,me.Z)(i);function i(e){var t,r=e.sessionMirror,o=e.elementSelector;return(0,a.Z)(this,i),(t=n.call(this)).sessionMirror=void 0,t.elementSelector=void 0,t.numberOfRetries=3,t.currentHref=void 0,t.previousMouseDownData=void 0,t.previousMousePositions=void 0,t.previousMousePositionsNodeSelectors={},t.hasUndefinedFocusNode=!1,t.lastMouseUpTime=0,t.lastMouseDownExtract=void 0,t.allInteractableElementsMetadata={mouseMove:void 0,mouseDown:void 0},t.events=void 0,t.currentEventIndex=-1,t.enableRecordingAvailableInteractableElements=!0,t.useTextInputFastForward=!0,t.textInputFastForwardInitialSelector=void 0,t.appSpecificRules=void 0,t.getBoundingBox=function(e){var n=A(t.sessionMirror.getNodeById(e),t.appSpecificRules.appSpecificInteractableElementsSelectors);if(n)return null===n||void 0===n?void 0:n.getBoundingClientRect()},t.isPointWithinBoundingBox=function(e,t,n){return e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom},t.isPointWithinNodeBoundingBox=function(e,n,r){var i=t.getBoundingBox(e);return!!i&&(n>=i.left&&n<=i.right&&r>=i.top&&r<=i.bottom)},t.elementSelector=o,t.sessionMirror=r,t}return(0,s.Z)(i,[{key:"setEvents",value:function(e){this.events=e}},{key:"setConfiguration",value:function(e){var t=e.enableRecordingAvailableInteractableElements,n=e.useTextInputFastForward,r=void 0===n||n;this.enableRecordingAvailableInteractableElements=t,this.useTextInputFastForward=r}},{key:"setAppRules",value:function(e){this.appSpecificRules=e}},{key:"skipEvents",value:function(e){this.currentEventIndex+=e.length}},{key:"preEvent",value:function(e){++this.currentEventIndex}},{key:"postEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return",r);case 2:if(r.availableInteractableElementsAtStart||!this.enableRecordingAvailableInteractableElements||n.type!==De.tw.IncrementalSnapshot||n.data.source!==De.yh.MouseInteraction&&n.data.source!==De.yh.Input&&n.data.source!==De.yh.MediaInteraction){e.next=6;break}return e.next=5,this.getInteractableElementsMetadata();case 5:r.availableInteractableElementsAtStart=e.sent;case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleMeta",value:function(e){if(e.href!==this.currentHref)return this.currentHref=e.href,{eventCode:Ze.$.Navigation,url:e.href}}},{key:"getNextUserTriggeredInputEvent",value:function(e){for(var t=this.currentEventIndex+1;t<this.events.length;++t){var n=this.events[t];if(n.type===De.tw.IncrementalSnapshot&&n.data.source===De.yh.Input&&n.data.userTriggered)return n;if(n.timestamp>e)return}}},{key:"handleInput",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i){var o,a,s,u,c,d=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.userTriggered){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.getNodeById(n.id);case 4:if(o=e.sent,(a=this.getInputEventCode(o,n))!==Ze.$.Input||!this.useTextInputFastForward){e.next=18;break}if(this.textInputFastForwardInitialSelector){e.next=11;break}return e.next=10,this.elementSelector.getSelector(o);case 10:this.textInputFastForwardInitialSelector=e.sent;case 11:return s=(0,l.Z)({eventCode:a},this.textInputFastForwardInitialSelector),u=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=d.getNextUserTriggeredInputEvent(i.timestamp+2e3))){e.next=9;break}return r=n.data,e.next=5,d.getNodeById(r.id);case 5:if((a=e.sent)===o){e.next=8;break}return e.abrupt("return",!1);case 8:return e.abrupt("return",d.getInputEventCode(a,r)===Ze.$.Input);case 9:return e.abrupt("return",!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=15,u();case 15:if(e.sent){e.next=17;break}this.textInputFastForwardInitialSelector=void 0;case 17:return e.abrupt("return",s);case 18:return e.next=20,this.elementSelector.getSelector(o);case 20:return c=e.sent,e.abrupt("return",(0,l.Z)({eventCode:a},c));case 22:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleMouseMove",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.previousMousePositions=n.positions,this.previousMousePositionsNodeSelectors={},!this.isLastMouseMoveEventBeforeMouseDownOrUndefinedFocus()){e.next=39;break}this.previousMousePositionsNodeSelectors={},r={},i=(0,p.Z)(this.previousMousePositions),e.prev=6,i.s();case 8:if((o=i.n()).done){e.next=28;break}if(a=o.value,s=a.id,!r[s]){e.next=13;break}return e.abrupt("continue",26);case 13:return r[s]=!0,e.next=16,this.getNodeById(s);case 16:return u=e.sent,e.prev=17,e.next=20,this.elementSelector.getSelector(u);case 20:this.previousMousePositionsNodeSelectors[s]=e.sent,e.next=26;break;case 23:e.prev=23,e.t0=e.catch(17),console.warn("error with extracting selector for node during previousMousePositionsNodeSelectors mapping",u,e.t0);case 26:e.next=8;break;case 28:e.next=33;break;case 30:e.prev=30,e.t1=e.catch(6),i.e(e.t1);case 33:return e.prev=33,i.f(),e.finish(33);case 36:return e.next=38,this.getInteractableElementsMetadata();case 38:this.allInteractableElementsMetadata.mouseMove=e.sent;case 39:case"end":return e.stop()}}),e,this,[[6,30,33,36],[17,23]])})));return function(t){return e.apply(this,arguments)}}()},{key:"isLastMouseMoveEventBeforeMouseDownOrUndefinedFocus",value:function(){for(var e=this.currentEventIndex+1;e<this.events.length;++e){var t=this.events[e];if(t.type===De.tw.IncrementalSnapshot)switch(t.data.source){case De.yh.MouseMove:return!1;case De.yh.MouseInteraction:switch(t.data.type){case De.Y2.Click:case De.Y2.MouseDown:return!0;case De.Y2.Focus:return-1===t.data.id}}}return!1}},{key:"handleMouseDown",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNodeById(n.id);case 2:return r=e.sent,e.prev=3,e.t0=r,e.next=7,this.elementSelector.getSelector(r);case 7:return e.t1=e.sent,this.lastMouseDownExtract={node:e.t0,selector:e.t1},e.next=11,this.getInteractableElementsMetadata();case 11:this.allInteractableElementsMetadata.mouseDown=e.sent,e.next=17;break;case 14:e.prev=14,e.t2=e.catch(3),console.warn("error with extracting selector for node during handleMouseDown",r,e.t2);case 17:this.previousMouseDownData=n;case 18:case"end":return e.stop()}}),e,this,[[3,14]])})));return function(t){return e.apply(this,arguments)}}()},{key:"handleMouseUp",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.lastMouseUpTime=r.timestamp;case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isLastMouseDownValidForClick",value:function(e){return!!this.lastMouseDownExtract&&e-this.lastMouseUpTime<10}},{key:"invalidateLastMouseDown",value:function(){this.lastMouseUpTime=0,this.lastMouseDownExtract=void 0,this.allInteractableElementsMetadata.mouseDown=void 0}},{key:"handleFocus",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.hasUndefinedFocusNode=-1===n.id;case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleClick",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i){var o,a,s,u=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==n.x&&void 0!==n.y){e.next=2;break}return e.abrupt("return");case 2:return o=this.isLastMouseDownValidForClick(i.timestamp),function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var r,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.getNodeIdForClick(n,i),e.next=3,u.getNodeById(r);case 3:a=e.sent,console.log("click",a),console.log("isMouseDownValidForClick",o),r!==u.previousMouseDownData.id&&o&&console.warn("not same");case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),a=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var r,a,s,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=19;break}return e.t0=l.Z,e.t1=(0,l.Z)({},u.lastMouseDownExtract.selector),e.t2={},e.next=6,u.elementSelector.getSelector(u.lastMouseDownExtract.node,{extractEsraMetadata:!1});case 6:if(e.t4=r=e.sent,e.t3=null===e.t4,e.t3){e.next=10;break}e.t3=void 0===r;case 10:if(!e.t3){e.next=14;break}e.t5=void 0,e.next=15;break;case 14:e.t5=r.playwrightSelector;case 15:return e.t6=e.t5,e.t7=u.allInteractableElementsMetadata.mouseDown,e.t8={playwrightSelectorForSnapshot:e.t6,availableInteractableElementsAtStart:e.t7},e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t8));case 19:return a=u.getNodeIdForClick(n,i),e.next=22,u.getNodeById(a);case 22:if(s=e.sent,!u.previousMousePositionsNodeSelectors[a]){e.next=42;break}return e.t9=l.Z,e.t10=(0,l.Z)({},u.previousMousePositionsNodeSelectors[a]),e.t11={},e.next=29,u.elementSelector.getSelector(s,{extractEsraMetadata:!1});case 29:if(e.t13=c=e.sent,e.t12=null===e.t13,e.t12){e.next=33;break}e.t12=void 0===c;case 33:if(!e.t12){e.next=37;break}e.t14=void 0,e.next=38;break;case 37:e.t14=c.playwrightSelector;case 38:return e.t15=e.t14,e.t16=u.allInteractableElementsMetadata.mouseMove,e.t17={playwrightSelectorForSnapshot:e.t15,availableInteractableElementsAtStart:e.t16},e.abrupt("return",(0,e.t9)(e.t10,e.t11,e.t17));case 42:return e.abrupt("return",u.elementSelector.getSelector(s));case 43:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=7,a();case 7:return s=e.sent,this.invalidateLastMouseDown(),e.abrupt("return",(0,l.Z)({eventCode:Ze.$.Click},s));case 10:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getNextMouseMoveEvent",value:function(){for(var e=this.currentEventIndex+1;e<this.events.length;++e){var t=this.events[e];if(t.type===De.tw.IncrementalSnapshot&&t.data.source===De.yh.MouseMove)return t}}},{key:"getNodeIdForClick",value:function(e,t){var n=this;if(this.hasUndefinedFocusNode&&this.previousMouseDownData&&this.previousMouseDownData.id!==e.id){var r={next:function(){var e=n.getNextMouseMoveEvent();if(e){var r=e.data,i=(0,m.Z)(r.positions).reverse().find((function(n){return e.timestamp+n.timeOffset<t.timestamp}));if(i)return i.id}}(),previous:function(){if(n.previousMousePositions){var e=(0,m.Z)(n.previousMousePositions).reverse().find((function(e){return!0}));if(e)return e.id}}(),point:function(){try{var t=n.sessionMirror.getNodeById(e.id),r=Array.from(R(t)).filter((function(e){return"none"===window.getComputedStyle(e).pointerEvents})),i=[];if(r.length){r.forEach((function(e){var t=e,n=t.getAttribute("style");i.push(n),t.setAttribute("style",n+";pointer-events:auto !important")}));var o=document.querySelector("iframe").contentDocument.elementFromPoint(e.x,e.y);if(r.forEach((function(e,t){e.setAttribute("style",i[t])})),o){var a=n.sessionMirror.getMeta(o);if(a)return a.id}}}catch(Zt){console.warn("element from point calc error",Zt)}}(),original:e.id},i=r.next||r.previous||e.id;return r.point&&function(){if(i===r.point)return!1;var t=n.sessionMirror.getNodeById(i);return n.isPointWithinBoundingBox(e.x,e.y,t.getBoundingClientRect())}()?r.point:i}return e.id}},{key:"getNodeById",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=c.length>1&&void 0!==c[1]?c[1]:{}).retriesLeft,o=void 0===i?this.numberOfRetries:i,a=r.useCompoundInteractableDetection,s=void 0===a||a,o){e.next=4;break}return console.error("no node"),e.abrupt("return",null);case 4:if(u=this.sessionMirror.getNodeById(n)){e.next=9;break}return e.next=8,Fe()(100*(this.numberOfRetries-o+1));case 8:return e.abrupt("return",this.getNodeById(n,{retriesLeft:o-1,useCompoundInteractableDetection:s}));case 9:return e.abrupt("return",s?A(u,this.appSpecificRules.appSpecificInteractableElementsSelectors):u);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getInputEventCode",value:function(e,t){switch(e.getAttribute("type")){case"checkbox":case"radio":return t.isChecked?Ze.$.Check:Ze.$.UnCheck;default:return Ze.$.Input}}},{key:"getInteractableElementsMetadata",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,i,o,a,s;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.enableRecordingAvailableInteractableElements){e.next=2;break}return e.abrupt("return",[]);case 2:return n=document.querySelector("iframe").contentWindow,i=n.document,console.log("Getting all interactable elements..."),o=x(i,this.appSpecificRules),console.log("Got ".concat(o.length," interactable elements")),console.log("Extracting ESRA metadata for all interactable elements..."),a=new le(i),e.next=11,Promise.all(o.map(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.extract(n).toMetadata(),e.abrupt("return",{esraMetadata:r});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 11:return s=e.sent,console.log("Done processing all interactable elements..."),e.abrupt("return",s);case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),i}(Oe.E),Be=n(7666),Pe=n(3246),je=n(5512),We=n(7326);!function(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"}(Ne||(Ne={}));var Ue=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function He(e){var t=[];for(var n in e){var r=e[n];if("string"===typeof r){var i=Qe(n);t.push("".concat(i,": ").concat(r,";"))}}return t.join(" ")}var Ge=/-([a-z])/g,ze=/^--[a-zA-Z0-9-]+$/,qe=function(e){return ze.test(e)?e:e.replace(Ge,(function(e,t){return t?t.toUpperCase():""}))},Ye=/\B([A-Z])/g,Qe=function(e){return e.replace(Ye,"-$1").toLowerCase()},Ke=function(){function e(){(0,a.Z)(this,e),this.parentElement=null,this.parentNode=null,this.firstChild=null,this.lastChild=null,this.previousSibling=null,this.nextSibling=null,this.ELEMENT_NODE=nt.ELEMENT_NODE,this.TEXT_NODE=nt.TEXT_NODE}return(0,s.Z)(e,[{key:"childNodes",get:function(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}},{key:"contains",value:function(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}},{key:"appendChild",value:function(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"insertBefore",value:function(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}},{key:"removeChild",value:function(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"toString",value:function(){return"RRNode"}}]),e}();function Xe(e){return function(e){(0,ve.Z)(n,e);var t=(0,me.Z)(n);function n(e,r,i){var o;return(0,a.Z)(this,n),(o=t.call(this)).nodeType=nt.DOCUMENT_TYPE_NODE,o.RRNodeType=Ne.DocumentType,o.name=e,o.publicId=r,o.systemId=i,o.nodeName=e,o.textContent=null,o}return(0,s.Z)(n,[{key:"toString",value:function(){return"RRDocumentType"}}]),n}(e)}function Je(e){return function(e){(0,ve.Z)(n,e);var t=(0,me.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=nt.ELEMENT_NODE,r.RRNodeType=Ne.Element,r.attributes={},r.shadowRoot=null,r.tagName=e.toUpperCase(),r.nodeName=e.toUpperCase(),r}return(0,s.Z)(n,[{key:"textContent",get:function(){var e="";return this.childNodes.forEach((function(t){return e+=t.textContent})),e},set:function(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}},{key:"classList",get:function(){var e=this;return new rt(this.attributes.class,(function(t){e.attributes.class=t}))}},{key:"id",get:function(){return this.attributes.id||""}},{key:"className",get:function(){return this.attributes.class||""}},{key:"style",get:function(){var e=this,t=this.attributes.style?function(e){var t={},n=/:(.+)/;return e.replace(/\/\*.*?\*\//g,"").split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[qe(r[0].trim())]=r[1].trim())}})),t}(this.attributes.style):{},n=/\B([A-Z])/g;return t.setProperty=function(r,i,o){if(!n.test(r)){var a=qe(r);i?t[a]=i:delete t[a],"important"===o&&(t[a]+=" !important"),e.attributes.style=He(t)}},t.removeProperty=function(r){if(n.test(r))return"";var i=qe(r),o=t[i]||"";return delete t[i],e.attributes.style=He(t),o},t}},{key:"getAttribute",value:function(e){return this.attributes[e]||null}},{key:"setAttribute",value:function(e,t){this.attributes[e]=t}},{key:"setAttributeNS",value:function(e,t,n){this.setAttribute(t,n)}},{key:"removeAttribute",value:function(e){delete this.attributes[e]}},{key:"appendChild",value:function(e){return it(this,e)}},{key:"insertBefore",value:function(e,t){return ot(this,e,t)}},{key:"removeChild",value:function(e){return at(this,e)}},{key:"attachShadow",value:function(e){var t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}},{key:"dispatchEvent",value:function(e){return!0}},{key:"toString",value:function(){var e="";for(var t in this.attributes)e+="".concat(t,'="').concat(this.attributes[t],'" ');return"".concat(this.tagName," ").concat(e)}}]),n}(e)}function $e(e){return function(e){(0,ve.Z)(n,e);var t=(0,me.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=nt.TEXT_NODE,r.nodeName="#text",r.RRNodeType=Ne.Text,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRText text=".concat(JSON.stringify(this.data))}}]),n}(e)}function et(e){return function(e){(0,ve.Z)(n,e);var t=(0,me.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=nt.COMMENT_NODE,r.nodeName="#comment",r.RRNodeType=Ne.Comment,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRComment text=".concat(JSON.stringify(this.data))}}]),n}(e)}function tt(e){return function(e){(0,ve.Z)(n,e);var t=(0,me.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeName="#cdata-section",r.nodeType=nt.CDATA_SECTION_NODE,r.RRNodeType=Ne.CDATA,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRCDATASection data=".concat(JSON.stringify(this.data))}}]),n}(e)}var nt,rt=(0,s.Z)((function e(t,n){var r=this;if((0,a.Z)(this,e),this.classes=[],this.add=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,o=t;i<o.length;i++){var a=o[i],s=String(a);r.classes.indexOf(s)>=0||r.classes.push(s)}r.onChange&&r.onChange(r.classes.join(" "))},this.remove=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.classes=r.classes.filter((function(e){return-1===t.indexOf(e)})),r.onChange&&r.onChange(r.classes.join(" "))},t){var i,o=t.trim().split(/\s+/);(i=this.classes).push.apply(i,(0,m.Z)(o))}this.onChange=n}));function it(e,t){return 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 ot(e,t,n){if(!n)return it(e,t);if(n.parentNode!==e)throw new 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.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 at(e,t){if(t.parentNode!==e)throw new 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}!function(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"}(nt||(nt={}));var st={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},ut={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"},ct=null;function lt(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.mirror||t.ownerDocument.mirror;e=function(e,t,n,r){var i;n.afterAppend&&!ct&&(ct=new WeakSet,setTimeout((function(){ct=null}),0));if(!ht(e,t)){var o=ft(t,n.mirror,r);null===(i=e.parentNode)||void 0===i||i.replaceChild(o,e),e=o}switch(t.RRNodeType){case Ne.Document:if(!pt(e,t,n.mirror,r)){var a=r.getMeta(t);a&&(n.mirror.removeNodeFromMap(e),e.close(),e.open(),n.mirror.add(e,a),null===ct||void 0===ct||ct.add(e))}break;case Ne.Element:var s=e,u=t;switch(u.tagName){case"IFRAME":var c=e.contentDocument;if(!c)break;lt(c,t.contentDocument,n,r)}if(u.shadowRoot){s.shadowRoot||s.attachShadow({mode:"open"});var l=s.shadowRoot.childNodes,d=u.shadowRoot.childNodes;(l.length>0||d.length>0)&&dt(Array.from(l),d,s.shadowRoot,n,r)}}return e}(e,t,n,r);var i=e.childNodes,o=t.childNodes;(i.length>0||o.length>0)&&dt(Array.from(i),o,e,n,r),function(e,t,n,r){var i;switch(t.RRNodeType){case Ne.Document:var o=t.scrollData;o&&n.applyScroll(o,!0);break;case Ne.Element:var a=e,s=t;switch(function(e,t,n){var r=e.attributes,i=t.attributes,o=function(){var r=i[a],o=n.getMeta(t);if((null===o||void 0===o?void 0:o.isSVG)&&st[a])e.setAttributeNS(st[a],a,r);else if("CANVAS"===t.tagName&&"rr_dataURL"===a){var s=document.createElement("img");s.src=r,s.onload=function(){var t=e.getContext("2d");t&&t.drawImage(s,0,0,s.width,s.height)}}else e.setAttribute(a,r)};for(var a in i)o();for(var s=0,u=Array.from(r);s<u.length;s++){var c=u[s].name;c in i||e.removeAttribute(c)}t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}(a,s,r),s.scrollData&&n.applyScroll(s.scrollData,!0),s.inputData&&n.applyInput(s.inputData),s.tagName){case"AUDIO":case"VIDEO":var u=e,c=s;void 0!==c.paused&&(c.paused?u.pause():u.play()),void 0!==c.muted&&(u.muted=c.muted),void 0!==c.volume&&(u.volume=c.volume),void 0!==c.currentTime&&(u.currentTime=c.currentTime),void 0!==c.playbackRate&&(u.playbackRate=c.playbackRate);break;case"CANVAS":var l=t;if(null!==l.rr_dataURL){var d=document.createElement("img");d.onload=function(){var e=a.getContext("2d");e&&e.drawImage(d,0,0,d.width,d.height)},d.src=l.rr_dataURL}l.canvasMutations.forEach((function(t){return n.applyCanvas(t.event,t.mutation,e)}));break;case"STYLE":var f=a.sheet;f&&t.rules.forEach((function(e){return n.applyStyleSheetMutation(e,f)}))}break;case Ne.Text:case Ne.Comment:case Ne.CDATA:e.textContent!==t.data&&(e.textContent=t.data)}(null===ct||void 0===ct?void 0:ct.has(e))&&(ct.delete(e),null===(i=n.afterAppend)||void 0===i||i.call(n,e,n.mirror.getId(e)))}(e,t,n,r)}function dt(e,t,n,r,i){for(var o=0,a=e.length-1,s=0,u=t.length-1,c=e[o],l=e[a],d=t[s],f=t[u],h=void 0,p=void 0;o<=a&&s<=u;)if(void 0===c)c=e[++o];else if(void 0===l)l=e[--a];else if(pt(c,d,r.mirror,i))lt(c,d,r,i),c=e[++o],d=t[++s];else if(pt(l,f,r.mirror,i))lt(l,f,r,i),l=e[--a],f=t[--u];else if(pt(c,f,r.mirror,i)){try{n.insertBefore(c,l.nextSibling)}catch(Zt){console.warn(Zt)}lt(c,f,r,i),c=e[++o],f=t[--u]}else if(pt(l,d,r.mirror,i)){try{n.insertBefore(l,c)}catch(Zt){console.warn(Zt)}lt(l,d,r,i),l=e[--a],d=t[++s]}else{if(!h){h={};for(var v=o;v<=a;v++){var m=e[v];m&&r.mirror.hasNode(m)&&(h[r.mirror.getId(m)]=v)}}var g=e[p=h[i.getId(d)]];if(void 0!==p&&g&&pt(g,d,r.mirror,i)){try{n.insertBefore(g,c)}catch(Zt){console.warn(Zt)}lt(g,d,r,i),e[p]=void 0}else{var y=ft(d,r.mirror,i);"#document"===n.nodeName&&c&&(y.nodeType===y.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||y.nodeType===y.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(n.removeChild(c),r.mirror.removeNodeFromMap(c),c=e[++o]);try{n.insertBefore(y,c||null),lt(y,d,r,i)}catch(Zt){console.warn(Zt)}}d=t[++s]}if(o>a){var b=t[u+1],w=null;for(b&&(w=r.mirror.getNode(i.getId(b)));s<=u;++s){var S=ft(t[s],r.mirror,i);try{n.insertBefore(S,w),lt(S,t[s],r,i)}catch(Zt){console.warn(Zt)}}}else if(s>u)for(;o<=a;o++){var I=e[o];if(I&&n.contains(I))try{n.removeChild(I),r.mirror.removeNodeFromMap(I)}catch(Zt){console.warn(Zt)}}}function ft(e,t,n){var r=n.getId(e),i=n.getMeta(e),o=null;if(r>-1&&(o=t.getNode(r)),null!==o&&ht(o,e))return o;switch(e.RRNodeType){case Ne.Document:o=new Document;break;case Ne.DocumentType:o=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case Ne.Element:var a=e.tagName.toLowerCase();a=ut[a]||a,o=i&&"isSVG"in i&&(null===i||void 0===i?void 0:i.isSVG)?document.createElementNS(st.svg,a):document.createElement(e.tagName);break;case Ne.Text:o=document.createTextNode(e.data);break;case Ne.Comment:o=document.createComment(e.data);break;case Ne.CDATA:o=document.createCDATASection(e.data)}i&&t.add(o,Object.assign({},i));try{null===ct||void 0===ct||ct.add(o)}catch(Zt){}return o}function ht(e,t){return e.nodeType===t.nodeType&&(e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName)}function pt(e,t,n,r){var i=n.getId(e),o=r.getId(t);return-1!==i&&i===o&&ht(e,t)}var vt=function(e){(0,ve.Z)(n,e);var t=(0,me.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).UNSERIALIZED_STARTING_ID=-2,r._unserializedId=r.UNSERIALIZED_STARTING_ID,r.mirror=new At,r.scrollData=null,e&&(r.mirror=e),r}return(0,s.Z)(n,[{key:"unserializedId",get:function(){return this._unserializedId--}},{key:"createDocument",value:function(e,t,r){return new n}},{key:"createDocumentType",value:function(e,t,n){var r=new mt(e,t,n);return r.ownerDocument=this,r}},{key:"createElement",value:function(e){var t,n=e.toUpperCase();switch(n){case"AUDIO":case"VIDEO":t=new yt(n);break;case"IFRAME":t=new St(n,this.mirror);break;case"CANVAS":t=new bt(n);break;case"STYLE":t=new wt(n);break;default:t=new gt(n)}return t.ownerDocument=this,t}},{key:"createComment",value:function(e){var t=new Ct(e);return t.ownerDocument=this,t}},{key:"createCDATASection",value:function(e){var t=new kt(e);return t.ownerDocument=this,t}},{key:"createTextNode",value:function(e){var t=new It(e);return t.ownerDocument=this,t}},{key:"destroyTree",value:function(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}},{key:"open",value:function(){(0,he.Z)((0,pe.Z)(n.prototype),"open",this).call(this),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}]),n}(function(e){(0,ve.Z)(n,e);var t=(0,me.Z)(n);function n(){var e;(0,a.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call(this,i)).nodeType=nt.DOCUMENT_NODE,e.nodeName="#document",e.compatMode="CSS1Compat",e.RRNodeType=Ne.Document,e.textContent=null,e.ownerDocument=(0,We.Z)(e),e}return(0,s.Z)(n,[{key:"documentElement",get:function(){return this.childNodes.find((function(e){return e.RRNodeType===Ne.Element&&"HTML"===e.tagName}))||null}},{key:"body",get:function(){var e;return(null===(e=this.documentElement)||void 0===e?void 0:e.childNodes.find((function(e){return e.RRNodeType===Ne.Element&&"BODY"===e.tagName})))||null}},{key:"head",get:function(){var e;return(null===(e=this.documentElement)||void 0===e?void 0:e.childNodes.find((function(e){return e.RRNodeType===Ne.Element&&"HEAD"===e.tagName})))||null}},{key:"implementation",get:function(){return this}},{key:"firstElementChild",get:function(){return this.documentElement}},{key:"appendChild",value:function(e){var t=e.RRNodeType;if((t===Ne.Element||t===Ne.DocumentType)&&this.childNodes.some((function(e){return e.RRNodeType===t})))throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ".concat(t===Ne.Element?"RRElement":"RRDoctype"," on RRDocument allowed."));var n=it(this,e);return n.parentElement=null,n}},{key:"insertBefore",value:function(e,t){var n=e.RRNodeType;if((n===Ne.Element||n===Ne.DocumentType)&&this.childNodes.some((function(e){return e.RRNodeType===n})))throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ".concat(n===Ne.Element?"RRElement":"RRDoctype"," on RRDocument allowed."));var r=ot(this,e,t);return r.parentElement=null,r}},{key:"removeChild",value:function(e){return at(this,e)}},{key:"open",value:function(){this.firstChild=null,this.lastChild=null}},{key:"close",value:function(){}},{key:"write",value:function(e){var t;if('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'===e?t="-//W3C//DTD XHTML 1.0 Transitional//EN":'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'===e&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){var n=this.createDocumentType("html",t,"");this.open(),this.appendChild(n)}}},{key:"createDocument",value:function(e,t,r){return new n}},{key:"createDocumentType",value:function(e,t,n){var r=new(Xe(Ke))(e,t,n);return r.ownerDocument=this,r}},{key:"createElement",value:function(e){var t=new(Je(Ke))(e);return t.ownerDocument=this,t}},{key:"createElementNS",value:function(e,t){return this.createElement(t)}},{key:"createTextNode",value:function(e){var t=new($e(Ke))(e);return t.ownerDocument=this,t}},{key:"createComment",value:function(e){var t=new(et(Ke))(e);return t.ownerDocument=this,t}},{key:"createCDATASection",value:function(e){var t=new(tt(Ke))(e);return t.ownerDocument=this,t}},{key:"toString",value:function(){return"RRDocument"}}]),n}(Ke)),mt=Xe(Ke),gt=function(e){(0,ve.Z)(n,e);var t=(0,me.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).inputData=null,e.scrollData=null,e}return(0,s.Z)(n)}(Je(Ke)),yt=function(e){(0,ve.Z)(n,e);var t=(0,me.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n)}(function(e){(0,ve.Z)(n,e);var t=(0,me.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"attachShadow",value:function(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}},{key:"play",value:function(){this.paused=!1}},{key:"pause",value:function(){this.paused=!0}}]),n}(gt)),bt=function(e){(0,ve.Z)(n,e);var t=(0,me.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).rr_dataURL=null,e.canvasMutations=[],e}return(0,s.Z)(n,[{key:"getContext",value:function(){return null}}]),n}(gt),wt=function(e){(0,ve.Z)(n,e);var t=(0,me.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).rules=[],e}return(0,s.Z)(n)}(gt),St=function(e){(0,ve.Z)(n,e);var t=(0,me.Z)(n);function n(e,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e)).contentDocument=new vt,i.contentDocument.mirror=r,i}return(0,s.Z)(n)}(gt),It=$e(Ke),Ct=et(Ke),kt=tt(Ke);function Et(e,t,n,r){var i,o;switch(e.nodeType){case nt.DOCUMENT_NODE:r&&"IFRAME"===r.nodeName?i=r.contentDocument:(i=t).compatMode=e.compatMode;break;case nt.DOCUMENT_TYPE_NODE:var a=e;i=t.createDocumentType(a.name,a.publicId,a.systemId);break;case nt.ELEMENT_NODE:for(var s=e,u=(o=s)instanceof HTMLFormElement?"FORM":o.tagName.toUpperCase(),c=i=t.createElement(u),l=0,d=Array.from(s.attributes);l<d.length;l++){var f=d[l],h=f.name,p=f.value;c.attributes[h]=p}s.scrollLeft&&(c.scrollLeft=s.scrollLeft),s.scrollTop&&(c.scrollTop=s.scrollTop);break;case nt.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case nt.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case nt.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case nt.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}var v=n.getMeta(e);return t instanceof vt&&(v||(v=Mt(i,t.unserializedId),n.add(e,v)),t.mirror.add(i,Object.assign({},v))),i}function xt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ue,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new vt;return function e(r,i){var o=Et(r,n,t,i);if(null!==o)if("IFRAME"!==(null===i||void 0===i?void 0:i.nodeName)&&r.nodeType!==nt.DOCUMENT_FRAGMENT_NODE&&(null===i||void 0===i||i.appendChild(o),o.parentNode=i,o.parentElement=i),"IFRAME"===r.nodeName){var a=r.contentDocument;a&&e(a,o)}else r.nodeType!==nt.DOCUMENT_NODE&&r.nodeType!==nt.ELEMENT_NODE&&r.nodeType!==nt.DOCUMENT_FRAGMENT_NODE||(r.nodeType===nt.ELEMENT_NODE&&r.shadowRoot&&e(r.shadowRoot,o),r.childNodes.forEach((function(t){return e(t,o)})))}(e,null),n}var At=function(){function e(){(0,a.Z)(this,e),this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return(0,s.Z)(e,[{key:"getId",value:function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]),e}();function Mt(e,t){switch(e.RRNodeType){case Ne.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case Ne.DocumentType:var n=e;return{id:t,type:e.RRNodeType,name:n.name,publicId:n.publicId,systemId:n.systemId};case Ne.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case Ne.Text:case Ne.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case Ne.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}function Tt(e){return{all:e=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)}))}}}function Nt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,r=e.HTMLElement||e.Element,i=468,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||u,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?p.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):o.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(c(arguments[0])?o.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):p.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==c(arguments[0])){var e=arguments[0].left,t=arguments[0].top;p.call(this,this,"undefined"===typeof e?this.scrollLeft:~~e,"undefined"===typeof t?this.scrollTop:~~t)}else{if("number"===typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!==typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var n=function(e){for(;e!==t.body&&!1===f(e);)e=e.parentNode||e.host;return e}(this),r=n.getBoundingClientRect(),i=this.getBoundingClientRect();n!==t.body?(p.call(this,n,n.scrollLeft+i.left-r.left,n.scrollTop+i.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function u(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){if(null===e||"object"!==typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"===typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function l(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function f(e){var t=l(e,"Y")&&d(e,"Y"),n=l(e,"X")&&d(e,"X");return t||n}function h(t){var n,r,o,s,u=(a()-t.startTime)/i;s=u=u>1?1:u,n=.5*(1-Math.cos(Math.PI*s)),r=t.startX+(t.x-t.startX)*n,o=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,o),r===t.x&&o===t.y||e.requestAnimationFrame(h.bind(e,t))}function p(n,r,i){var s,c,l,d,f=a();n===t.body?(s=e,c=e.scrollX||e.pageXOffset,l=e.scrollY||e.pageYOffset,d=o.scroll):(s=n,c=n.scrollLeft,l=n.scrollTop,d=u),h({scrollable:s,method:d,startTime:f,startX:c,startY:l,x:r,y:i})}}var Rt,_t=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;(0,a.Z)(this,e),this.timeOffset=0,this.raf=null,this.actions=t,this.speed=n.speed}return(0,s.Z)(e,[{key:"addAction",value:function(e){var t=!0===this.raf;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{var n=this.findActionIndex(e);this.actions.splice(n,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}},{key:"start",value:function(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}},{key:"rafCheck",value:function(){var e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){var t=this.actions[0];if(!(this.timeOffset>=t.delay))break;this.actions.shift(),t.doAction()}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}},{key:"clear",value:function(){this.raf&&(!0!==this.raf&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}},{key:"setSpeed",value:function(e){this.speed=e}},{key:"isActive",value:function(){return null!==this.raf}},{key:"findActionIndex",value:function(e){for(var t=0,n=this.actions.length-1;t<=n;){var r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else{if(!(this.actions[r].delay>e.delay))return r+1;n=r-1}}return t}}]),e}();function Dt(e,t){if(e.type===De.tw.IncrementalSnapshot&&e.data.source===De.yh.MouseMove&&e.data.positions&&e.data.positions.length){var 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}function Ot(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Rt||(Rt={}));var Zt={type:"xstate.init"};function Lt(e){return void 0===e?[]:[].concat(e)}function Ft(e){return{type:"xstate.assign",assignment:e}}function Vt(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function Bt(e){return function(t){return e===t}}function Pt(e){return"string"==typeof e?{type:e}:e}function jt(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Bt(e)}}function Wt(e,t,n){var r=t,i=!1;return[e.filter((function(e){if("xstate.assign"===e.type){i=!0;var t=Object.assign({},r);return"function"==typeof e.assignment?t=e.assignment(r,n):Object.keys(e.assignment).forEach((function(i){t[i]="function"==typeof e.assignment[i]?e.assignment[i](r,n):e.assignment[i]})),r=t,!1}return!0})),r,i]}function Ut(e,t){void 0===t&&(t={});var n=Ot(Wt(Lt(e.states[e.initial].entry).map((function(e){return Vt(e,t.actions)})),e.context,Zt),2),r=n[0],i=n[1],o={config:e,_options:t,initialState:{value:e.initial,actions:r,context:i,matches:Bt(e.initial)},transition:function(t,n){var r,i,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,u=a.context,c=Pt(n),l=e.states[s];if(l.on){var d=Lt(l.on[c.type]);try{for(var f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(d),h=f.next();!h.done;h=f.next()){var p=h.value;if(void 0===p)return jt(s,u);var v="string"==typeof p?{target:p}:p,m=v.target,g=v.actions,y=void 0===g?[]:g,b=v.cond,w=void 0===b?function(){return!0}:b,S=void 0===m,I=null!=m?m:s,C=e.states[I];if(w(u,c)){var k=Ot(Wt((S?Lt(y):[].concat(l.exit,y,C.entry).filter((function(e){return e}))).map((function(e){return Vt(e,o._options.actions)})),u,c),3),E=k[0],x=k[1],A=k[2],M=null!=m?m:s;return{value:M,context:x,actions:E,changed:m!==s||E.length>0||A,matches:Bt(M)}}}}catch(Ot){r={error:Ot}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}return jt(s,u)}};return o}var Ht=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function Gt(e){var t=e.initialState,n=Rt.NotStarted,r=new Set,i={_machine:e,send:function(i){n===Rt.Running&&(t=e.transition(t,i),Ht(t,Pt(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 o="object"==typeof r?r:{context:e.config.context,value:r};t={value:o.value,actions:[],context:o.context,matches:Bt(o.value)}}return n=Rt.Running,Ht(t,Zt),i},stop:function(){return n=Rt.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}function zt(e,t){var n=t.getCastFn,r=t.applyEventsSynchronously,i=t.emitter,o=Ut({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:Ft({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:Ft((function(e,t){var n=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(n=t.payload.timeOffset),Object.assign(Object.assign({},e),{timeOffset:n,baselineTime:e.events[0].timestamp+n})})),play:function(e){var t,o=e.timer,a=e.events,s=e.baselineTime,u=e.lastPlayedEvent;o.clear();var c,l=(0,p.Z)(a);try{for(l.s();!(c=l.n()).done;){Dt(c.value,s)}}catch(y){l.e(y)}finally{l.f()}var d=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.type===De.tw.Meta&&r.timestamp<=t)return e.slice(n)}return e}(a,s),f=null===u||void 0===u?void 0:u.timestamp;(null===u||void 0===u?void 0:u.type)===De.tw.IncrementalSnapshot&&u.data.source===De.yh.MouseMove&&(f=u.timestamp+(null===(t=u.data.positions[0])||void 0===t?void 0:t.timeOffset)),s<(f||0)&&i.emit(De.SA.PlayBack);var h,v=new Array,m=(0,p.Z)(d);try{var g=function(){var e=h.value;if(f&&f<s&&(e.timestamp<=f||e===u))return"continue";if(e.timestamp<s)v.push(e);else{var t=n(e,!1);o.addAction({doAction:function(){t()},delay:e.delay})}};for(m.s();!(h=m.n()).done;)g()}catch(y){m.e(y)}finally{m.f()}r(v),i.emit(De.SA.Flush),o.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:Ft((function(e){return Object.assign(Object.assign({},e),{lastPlayedEvent:null})})),startLive:Ft({baselineTime:function(e,t){return e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:Ft((function(e,t){var r=e.baselineTime,i=e.timer,o=e.events;if("ADD_EVENT"===t.type){var a=t.payload.event;Dt(a,r);var s=o.length-1;if(!o[s]||o[s].timestamp<=a.timestamp)o.push(a);else{for(var u=-1,c=0;c<=s;){var l=Math.floor((c+s)/2);o[l].timestamp<=a.timestamp?c=l+1:s=l-1}-1===u&&(u=c),o.splice(u,0,a)}var d=a.timestamp<r,f=n(a,d);d?f():i.isActive()&&i.addAction({doAction:function(){f()},delay:a.delay})}return Object.assign(Object.assign({},e),{events:o})}))}});return Gt(o)}var qt=n(1737),Yt=n(5647),Qt=n(3464),Kt=new Map;function Xt(e,t){var n=Kt.get(e);return n||(n=new Map,Kt.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}function Jt(e,n,r){var i=this;return function(o){return(0,Pe.m)(i,void 0,void 0,(0,t.Z)().mark((function i(){var a,s,u,c,l,d,f,h,p,v,g;return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o||"object"!==typeof o||!("rr_type"in o)){t.next=55;break}if(r&&(r.isUnchanged=!1),"ImageBitmap"!==o.rr_type||!("args"in o)){t.next=11;break}return t.next=5,Jt(e,n,r)(o.args);case 5:return a=t.sent,t.next=8,createImageBitmap.apply(null,a);case 8:return t.abrupt("return",t.sent);case 11:if(!("index"in o)){t.next=18;break}if(!r&&null!==n){t.next=14;break}return t.abrupt("return",o);case 14:return s=o.rr_type,u=o.index,t.abrupt("return",Xt(n,s)[u]);case 18:if(!("args"in o)){t.next=31;break}return c=o.rr_type,l=o.args,d=window[c],t.t0=Yt.Z,t.t1=d,t.t2=m.Z,t.next=26,Promise.all(l.map(Jt(e,n,r)));case 26:return t.t3=t.sent,t.t4=(0,t.t2)(t.t3),t.abrupt("return",(0,t.t0)(t.t1,t.t4));case 31:if(!("base64"in o)){t.next=35;break}return t.abrupt("return",(0,Qt.J)(o.base64));case 35:if(!("src"in o)){t.next=47;break}if(!(f=e.get(o.src))){t.next=41;break}return t.abrupt("return",f);case 41:return(h=new Image).src=o.src,e.set(o.src,h),t.abrupt("return",h);case 45:t.next=53;break;case 47:if(!("data"in o)||"Blob"!==o.rr_type){t.next=53;break}return t.next=50,Promise.all(o.data.map(Jt(e,n,r)));case 50:return p=t.sent,v=new Blob(p,{type:o.type}),t.abrupt("return",v);case 53:t.next=60;break;case 55:if(!Array.isArray(o)){t.next=60;break}return t.next=58,Promise.all(o.map(Jt(e,n,r)));case 58:return g=t.sent,t.abrupt("return",g);case 60:return t.abrupt("return",o);case 61:case"end":return t.stop()}}),i)})))}}function $t(e,t){try{return t===De.FX.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(Zt){return null}}var en=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function tn(e,t){if(null===t||void 0===t?void 0:t.constructor){var n=t.constructor.name;if(en.includes(n)){var r=Xt(e,n);r.includes(t)||r.push(t)}}}function nn(e){var n=e.mutation,r=e.target,i=e.type,o=e.imageMap,a=e.errorHandler;return(0,Pe.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var s,u,c,l;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,s=$t(r,i)){e.next=4;break}return e.abrupt("return");case 4:if(!n.setter){e.next=7;break}return s[n.property]=n.args[0],e.abrupt("return");case 7:return u=s[n.property],e.next=10,Promise.all(n.args.map(Jt(o,s)));case 10:c=e.sent,l=u.apply(s,c),tn(s,l),!1,e.next=20;break;case 17:e.prev=17,e.t0=e.catch(0),a(n,e.t0);case 20:case"end":return e.stop()}}),e,null,[[0,17]])})))}function rn(e){var n=e.event,r=e.mutation,i=e.target,o=e.imageMap,a=e.errorHandler;return(0,Pe.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var s,u,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,s=i.getContext("2d"),!r.setter){e.next=5;break}return s[r.property]=r.args[0],e.abrupt("return");case 5:if(u=s[r.property],"drawImage"!==r.property||"string"!==typeof r.args[0]){e.next=11;break}o.get(n),u.apply(s,r.args),e.next=15;break;case 11:return e.next=13,Promise.all(r.args.map(Jt(o,s)));case 13:c=e.sent,u.apply(s,c);case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(0),a(r,e.t0);case 20:case"end":return e.stop()}}),e,null,[[0,17]])})))}function on(e){var n=e.event,r=e.mutation,i=e.target,o=e.imageMap,a=e.canvasEventMap,s=e.errorHandler;return(0,Pe.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var u,c,l,d,f,h;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,u=a.get(n)||r,c="commands"in u?u.commands:[u],![De.FX.WebGL,De.FX.WebGL2].includes(r.type)){e.next=13;break}l=0;case 5:if(!(l<c.length)){e.next=12;break}return d=c[l],e.next=9,nn({mutation:d,type:r.type,target:i,imageMap:o,errorHandler:s});case 9:l++,e.next=5;break;case 12:return e.abrupt("return");case 13:f=0;case 14:if(!(f<c.length)){e.next=21;break}return h=c[f],e.next=18,rn({event:n,mutation:h,target:i,imageMap:o,errorHandler:s});case 18:f++,e.next=14;break;case 21:e.next=26;break;case 23:e.prev=23,e.t0=e.catch(0),s(r,e.t0);case 26:case"end":return e.stop()}}),e,null,[[0,23]])})))}var an=1e4,sn=5e3,un=Tt||e,cn="[replayer]",ln={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function dn(e){return e.type==De.tw.IncrementalSnapshot&&(e.data.source==De.yh.TouchMove||e.data.source==De.yh.MouseInteraction&&e.data.type==De.Y2.TouchStart)}var fn,hn,pn,vn=function(){function e(t,n){var r=this;if((0,a.Z)(this,e),this.usingVirtualDom=!1,this.virtualDom=new vt,this.mouseTail=null,this.tailPositions=[],this.emitter=un(),this.legacy_missingNodeRetryMap={},this.cache=(0,je.Df)(),this.imageMap=new Map,this.canvasEventMap=new Map,this.mirror=(0,je.bZ)(),this.styleMirror=new qt.ug,this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[],this.handleResize=function(e){r.iframe.style.display="inherit";for(var t=0,n=[r.mouseTail,r.iframe];t<n.length;t++){var i=n[t];i&&(i.setAttribute("width",String(e.width)),i.setAttribute("height",String(e.height)))}},this.applyEventsSynchronously=function(e){var t,n=(0,p.Z)(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;switch(i.type){case De.tw.DomContentLoaded:case De.tw.Load:case De.tw.Custom:continue;case De.tw.FullSnapshot:case De.tw.Meta:case De.tw.Plugin:case De.tw.IncrementalSnapshot:}r.getCastFn(i,!0)()}}catch(o){n.e(o)}finally{n.f()}!0===r.touchActive?r.mouse.classList.add("touch-active"):!1===r.touchActive&&r.mouse.classList.remove("touch-active"),r.touchActive=null},this.getCastFn=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(e.type){case De.tw.DomContentLoaded:case De.tw.Load:break;case De.tw.Custom:t=function(){r.emitter.emit(De.SA.CustomEvent,e)};break;case De.tw.Meta:t=function(){return r.emitter.emit(De.SA.Resize,{width:e.data.width,height:e.data.height})};break;case De.tw.FullSnapshot:t=function(){var t;if(r.firstFullSnapshot){if(r.firstFullSnapshot===e)return void(r.firstFullSnapshot=!0)}else r.firstFullSnapshot=!0;r.rebuildFullSnapshot(e,n),null===(t=r.iframe.contentWindow)||void 0===t||t.scrollTo(e.data.initialOffset),r.styleMirror.reset()};break;case De.tw.IncrementalSnapshot:t=function(){if(r.applyIncremental(e,n),!n&&(e===r.nextUserInteractionEvent&&(r.nextUserInteractionEvent=null,r.backToNormal()),r.config.skipInactive&&!r.nextUserInteractionEvent)){var t,i=(0,p.Z)(r.service.state.context.events);try{for(i.s();!(t=i.n()).done;){var o=t.value;if(!(o.timestamp<=e.timestamp)&&r.isUserInteraction(o)){o.delay-e.delay>an*r.speedService.state.context.timer.speed&&(r.nextUserInteractionEvent=o);break}}}catch(u){i.e(u)}finally{i.f()}if(r.nextUserInteractionEvent){var a=r.nextUserInteractionEvent.delay-e.delay,s={speed:Math.min(Math.round(a/sn),r.config.maxSpeed)};r.speedService.send({type:"FAST_FORWARD",payload:s}),r.emitter.emit(De.SA.SkipStart,s)}}}}return function(){t&&t();var i,o=(0,p.Z)(r.config.plugins||[]);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.handler&&a.handler(e,n,{replayer:r})}}catch(c){o.e(c)}finally{o.f()}r.service.send({type:"CAST_EVENT",payload:{event:e}});var s=r.service.state.context.events.length-1;if(!r.config.liveMode&&e===r.service.state.context.events[s]){var u=50;e.type===De.tw.IncrementalSnapshot&&e.data.source===De.yh.MouseMove&&e.data.positions.length&&(u+=Math.max(0,-e.data.positions[0].timeOffset)),setTimeout((function(){s<r.service.state.context.events.length-1||(r.backToNormal(),r.service.send("END"),r.emitter.emit(De.SA.Finish))}),u)}r.emitter.emit(De.SA.EventCast,e)}},!(null===n||void 0===n?void 0:n.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");var i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:ln,useVirtualDom:!0,logger:console};this.config=Object.assign({},i,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(De.SA.Resize,this.handleResize),this.setupDom();var o,s=(0,p.Z)(this.config.plugins||[]);try{for(s.s();!(o=s.n()).done;){var u=o.value;u.getMirror&&u.getMirror({nodeMirror:this.mirror})}}catch(m){s.e(m)}finally{s.f()}this.emitter.on(De.SA.Flush,(function(){if(r.usingVirtualDom){var e={mirror:r.mirror,applyCanvas:function(e,t,n){on({event:e,mutation:t,target:n,imageMap:r.imageMap,canvasEventMap:r.canvasEventMap,errorHandler:r.warnCanvasMutationFailed.bind(r)})},applyInput:r.applyInput.bind(r),applyScroll:r.applyScroll.bind(r),applyStyleSheetMutation:function(e,t){e.source===De.yh.StyleSheetRule?r.applyStyleSheetRule(e,t):e.source===De.yh.StyleDeclaration&&r.applyStyleDeclaration(e,t)},afterAppend:function(e,t){var n,i=(0,p.Z)(r.config.plugins||[]);try{for(i.s();!(n=i.n()).done;){var o=n.value;o.onBuild&&o.onBuild(e,{id:t,replayer:r})}}catch(m){i.e(m)}finally{i.f()}}};if(r.iframe.contentDocument)try{lt(r.iframe.contentDocument,r.virtualDom,e,r.virtualDom.mirror)}catch(Zt){console.warn(Zt)}if(r.virtualDom.destroyTree(),r.usingVirtualDom=!1,Object.keys(r.legacy_missingNodeRetryMap).length)for(var t in r.legacy_missingNodeRetryMap)try{var n=r.legacy_missingNodeRetryMap[t],i=ft(n.node,r.mirror,r.virtualDom.mirror);lt(i,n.node,e,r.virtualDom.mirror),n.node=i}catch(o){r.warn(o)}r.constructedStyleMutations.forEach((function(e){r.applyStyleSheetMutation(e)})),r.constructedStyleMutations=[],r.adoptedStyleSheets.forEach((function(e){r.applyAdoptedStyleSheet(e)})),r.adoptedStyleSheets=[]}r.mousePos&&(r.moveAndHover(r.mousePos.x,r.mousePos.y,r.mousePos.id,!0,r.mousePos.debugData),r.mousePos=null),r.lastSelectionData&&(r.applySelection(r.lastSelectionData),r.lastSelectionData=null)})),this.emitter.on(De.SA.PlayBack,(function(){r.firstFullSnapshot=null,r.mirror.reset(),r.styleMirror.reset()}));var c=new _t([],{speed:this.config.speed});this.service=zt({events:t.map((function(e){return n&&n.unpackFn?n.unpackFn(e):e})).sort((function(e,t){return e.timestamp-t.timestamp})),timer:c,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){r.emitter.emit(De.SA.StateChange,{player:e})})),this.speedService=Gt(Ut({id:"speed",context:{normalSpeed:-1,timer:c},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:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:Ft({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(e){r.emitter.emit(De.SA.StateChange,{speed:e})}));var l=this.service.state.context.events.find((function(e){return e.type===De.tw.Meta})),d=this.service.state.context.events.find((function(e){return e.type===De.tw.FullSnapshot}));if(l){var f=l.data,h=f.width,v=f.height;setTimeout((function(){r.emitter.emit(De.SA.Resize,{width:h,height:v})}),0)}d&&setTimeout((function(){var e;r.firstFullSnapshot||(r.firstFullSnapshot=d,r.rebuildFullSnapshot(d),null===(e=r.iframe.contentWindow)||void 0===e||e.scrollTo(d.data.initialOffset))}),1),this.service.state.context.events.find(dn)&&this.mouse.classList.add("touch-device")}return(0,s.Z)(e,[{key:"timer",get:function(){return this.service.state.context.timer}},{key:"on",value:function(e,t){return this.emitter.on(e,t),this}},{key:"off",value:function(e,t){return this.emitter.off(e,t),this}},{key:"setConfig",value:function(e){var t=this;Object.keys(e).forEach((function(n){e[n],t.config[n]=e[n]})),this.config.skipInactive||this.backToNormal(),"undefined"!==typeof e.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),"undefined"!==typeof e.mouseTail&&(!1===e.mouseTail?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"))}},{key:"getMetaData",value:function(){var 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}}},{key:"getCurrentTime",value:function(){return this.timer.timeOffset+this.getTimeOffset()}},{key:"getTimeOffset",value:function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp}},{key:"getMirror",value:function(){return this.mirror}},{key:"play",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:n}}),null===(t=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.getElementsByTagName("html")[0])||void 0===t||t.classList.remove("rrweb-paused"),this.emitter.emit(De.SA.Start)}},{key:"pause",value:function(e){var t,n;void 0===e&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"===typeof e&&(this.play(e),this.service.send({type:"PAUSE"})),null===(n=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.getElementsByTagName("html")[0])||void 0===n||n.classList.add("rrweb-paused"),this.emitter.emit(De.SA.Pause)}},{key:"resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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(De.SA.Resume)}},{key:"destroy",value:function(){this.pause(),this.config.root.removeChild(this.wrapper),this.emitter.emit(De.SA.Destroy)}},{key:"startLive",value:function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}},{key:"addEvent",value:function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;dn(n)&&this.mouse.classList.add("touch-device"),Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))}},{key:"enableInteract",value:function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}},{key:"disableInteract",value:function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}},{key:"resetCache",value:function(){this.cache=(0,je.Df)()}},{key:"setupDom",value:function(){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),!1!==this.config.mouseTail&&(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");var 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&&(Nt(this.iframe.contentWindow,this.iframe.contentDocument),(0,qt.OK)(this.iframe.contentWindow))}},{key:"rebuildFullSnapshot",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[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={};var r=[],i=function(e,n){t.collectIframeAndAttachDocument(r,e);var i,o=(0,p.Z)(t.config.plugins||[]);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.onBuild&&a.onBuild(e,{id:n,replayer:t})}}catch(s){o.e(s)}finally{o.f()}};this.mirror.reset(),(0,je.VU)(e.data.node,{doc:this.iframe.contentDocument,afterAppend:i,cache:this.cache,mirror:this.mirror}),i(this.iframe.contentDocument,e.data.node.id);for(var o=function(){var e=s[a],n=e.mutationInQueue,r=e.builtNode;t.attachDocumentToIframe(n,r),t.newDocumentQueue=t.newDocumentQueue.filter((function(e){return e!==n}))},a=0,s=r;a<s.length;a++)o();var u=this.iframe.contentDocument,c=u.documentElement,l=u.head;this.insertStyleRules(c,l),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(De.SA.FullsnapshotRebuilded,e),n||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}},{key:"insertStyleRules",value:function(e,t){var n,r,i=(r=this.config.blockClass,[".".concat(r," { background: currentColor }"),"noscript { display: none !important; }"]).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){var o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,Mt(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:De.yh.StyleSheetRule,adds:i.map((function(e,t){return{rule:e,index:t}}))})}else{var a=document.createElement("style");e.insertBefore(a,t);for(var s=0;s<i.length;s++)null===(n=a.sheet)||void 0===n||n.insertRule(i[s],s)}}},{key:"attachDocumentToIframe",value:function(e,t){var n=this,r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=function(e,o){n.collectIframeAndAttachDocument(i,e);var a=r.getMeta(e);if((null===a||void 0===a?void 0:a.type)===je.Jq.Element&&"HTML"===(null===a||void 0===a?void 0:a.tagName.toUpperCase())){var s=t.contentDocument,u=s.documentElement,c=s.head;n.insertStyleRules(u,c)}if(!n.usingVirtualDom){var l,d=(0,p.Z)(n.config.plugins||[]);try{for(d.s();!(l=d.n()).done;){var f=l.value;f.onBuild&&f.onBuild(e,{id:o,replayer:n})}}catch(h){d.e(h)}finally{d.f()}}};(0,je.GQ)(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(t.contentDocument,e.node.id);for(var a=function(){var e=u[s],t=e.mutationInQueue,r=e.builtNode;n.attachDocumentToIframe(t,r),n.newDocumentQueue=n.newDocumentQueue.filter((function(e){return e!==t}))},s=0,u=i;s<u.length;s++)a()}},{key:"collectIframeAndAttachDocument",value:function(e,t){var n=this;if((0,qt.Cj)(t,this.mirror)){var r=this.newDocumentQueue.find((function(e){return e.parentId===n.mirror.getId(t)}));r&&e.push({mutationInQueue:r,builtNode:t})}}},{key:"waitForStylesheetLoad",value:function(){var e,t=this,n=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(n){var r,i=new Set,o=this.service.state,a=function(){o=t.service.state};this.emitter.on(De.SA.Start,a),this.emitter.on(De.SA.Pause,a);var s=function(){t.emitter.off(De.SA.Start,a),t.emitter.off(De.SA.Pause,a)};n.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(i.add(e),e.addEventListener("load",(function(){i.delete(e),0===i.size&&-1!==r&&(o.matches("playing")&&t.play(t.getCurrentTime()),t.emitter.emit(De.SA.LoadStylesheetEnd),r&&clearTimeout(r),s())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(De.SA.LoadStylesheetStart),r=setTimeout((function(){o.matches("playing")&&t.play(t.getCurrentTime()),r=-1,s()}),this.config.loadTimeout))}}},{key:"preloadAllImages",value:function(){return(0,Pe.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var n,r,i,o,a,s=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.service.state,n=function(){s.service.state},this.emitter.on(De.SA.Start,n),this.emitter.on(De.SA.Pause,n),r=[],i=(0,p.Z)(this.service.state.context.events),e.prev=6,a=(0,t.Z)().mark((function e(){var n;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=o.value).type===De.tw.IncrementalSnapshot&&n.data.source===De.yh.CanvasMutation&&(r.push(s.deserializeAndPreloadCanvasEvents(n.data,n)),("commands"in n.data?n.data.commands:[n.data]).forEach((function(e){s.preloadImages(e,n)})));case 2:case"end":return e.stop()}}),e)})),i.s();case 9:if((o=i.n()).done){e.next=13;break}return e.delegateYield(a(),"t0",11);case 11:e.next=9;break;case 13:e.next=18;break;case 15:e.prev=15,e.t1=e.catch(6),i.e(e.t1);case 18:return e.prev=18,i.f(),e.finish(18);case 21:return e.abrupt("return",Promise.all(r));case 22:case"end":return e.stop()}}),e,this,[[6,15,18,21]])})))}},{key:"preloadImages",value:function(e,t){if("drawImage"===e.property&&"string"===typeof e.args[0]&&!this.imageMap.has(t)){var n=document.createElement("canvas"),r=n.getContext("2d"),i=null===r||void 0===r?void 0:r.createImageData(n.width,n.height);null===i||void 0===i||i.data,JSON.parse(e.args[0]),null===r||void 0===r||r.putImageData(i,0,0)}}},{key:"deserializeAndPreloadCanvasEvents",value:function(e,n){return(0,Pe.m)(this,void 0,void 0,(0,t.Z)().mark((function r(){var i,o,a,s=this;return(0,t.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.canvasEventMap.has(n)){r.next=13;break}if(i={isUnchanged:!0},!("commands"in e)){r.next=9;break}return r.next=5,Promise.all(e.commands.map((function(e){return(0,Pe.m)(s,void 0,void 0,(0,t.Z)().mark((function n(){var r;return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all(e.args.map(Jt(this.imageMap,null,i)));case 2:return r=t.sent,t.abrupt("return",Object.assign(Object.assign({},e),{args:r}));case 4:case"end":return t.stop()}}),n,this)})))})));case 5:o=r.sent,!1===i.isUnchanged&&this.canvasEventMap.set(n,Object.assign(Object.assign({},e),{commands:o})),r.next=13;break;case 9:return r.next=11,Promise.all(e.args.map(Jt(this.imageMap,null,i)));case 11:a=r.sent,!1===i.isUnchanged&&this.canvasEventMap.set(n,Object.assign(Object.assign({},e),{args:a}));case 13:case"end":return r.stop()}}),r,this)})))}},{key:"applyIncremental",value:function(e,t){var n,r,i,o=this,a=e.data;switch(a.source){case De.yh.Mutation:try{this.applyMutation(a,t)}catch(y){this.warn("Exception in mutation ".concat(y.message||y),a)}break;case De.yh.Drag:case De.yh.TouchMove:case De.yh.MouseMove:if(t){var s=a.positions[a.positions.length-1];this.mousePos={x:s.x,y:s.y,id:s.id,debugData:a}}else a.positions.forEach((function(n){var r={doAction:function(){o.moveAndHover(n.x,n.y,n.id,t,a)},delay:n.timeOffset+e.timestamp-o.service.state.context.baselineTime};o.timer.addAction(r)})),this.timer.addAction({doAction:function(){},delay:e.delay-(null===(n=a.positions[0])||void 0===n?void 0:n.timeOffset)});break;case De.yh.MouseInteraction:if(-1===a.id||t)break;var u=new Event(De.Y2[a.type].toLowerCase()),c=this.mirror.getNode(a.id);if(!c)return this.debugNodeNotFound(a,a.id);this.emitter.emit(De.SA.MouseInteraction,{type:a.type,target:c});var l=this.config.triggerFocus;switch(a.type){case De.Y2.Blur:"blur"in c&&c.blur();break;case De.Y2.Focus:l&&c.focus&&c.focus({preventScroll:!0});break;case De.Y2.Click:case De.Y2.TouchStart:case De.Y2.TouchEnd:t?(a.type===De.Y2.TouchStart?this.touchActive=!0:a.type===De.Y2.TouchEnd&&(this.touchActive=!1),this.mousePos={x:a.x,y:a.y,id:a.id,debugData:a}):(a.type===De.Y2.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x,a.y,a.id,t,a),a.type===De.Y2.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===De.Y2.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===De.Y2.TouchEnd&&this.mouse.classList.remove("touch-active"));break;case De.Y2.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:c.dispatchEvent(u)}break;case De.yh.Scroll:if(-1===a.id)break;if(this.usingVirtualDom){var d=this.virtualDom.mirror.getNode(a.id);if(!d)return this.debugNodeNotFound(a,a.id);d.scrollData=a;break}this.applyScroll(a,t);break;case De.yh.ViewportResize:this.emitter.emit(De.SA.Resize,{width:a.width,height:a.height});break;case De.yh.Input:if(-1===a.id)break;if(this.usingVirtualDom){var f=this.virtualDom.mirror.getNode(a.id);if(!f)return this.debugNodeNotFound(a,a.id);f.inputData=a;break}this.applyInput(a);break;case De.yh.MediaInteraction:var h=this.usingVirtualDom?this.virtualDom.mirror.getNode(a.id):this.mirror.getNode(a.id);if(!h)return this.debugNodeNotFound(a,a.id);var p=h;try{void 0!==a.currentTime&&(p.currentTime=a.currentTime),void 0!==a.volume&&(p.volume=a.volume),void 0!==a.muted&&(p.muted=a.muted),1===a.type&&p.pause(),0===a.type&&p.play(),4===a.type&&(p.playbackRate=a.playbackRate)}catch(y){this.warn("Failed to replay media interactions: ".concat(y.message||y))}break;case De.yh.StyleSheetRule:case De.yh.StyleDeclaration:this.usingVirtualDom?a.styleId?this.constructedStyleMutations.push(a):a.id&&(null===(r=this.virtualDom.mirror.getNode(a.id))||void 0===r||r.rules.push(a)):this.applyStyleSheetMutation(a);break;case De.yh.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){var v=this.virtualDom.mirror.getNode(a.id);if(!v)return this.debugNodeNotFound(a,a.id);v.canvasMutations.push({event:e,mutation:a})}else{var m=this.mirror.getNode(a.id);if(!m)return this.debugNodeNotFound(a,a.id);on({event:e,mutation:a,target:m,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case De.yh.Font:try{var g=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);null===(i=this.iframe.contentDocument)||void 0===i||i.fonts.add(g)}catch(y){this.warn(y)}break;case De.yh.Selection:if(t){this.lastSelectionData=a;break}this.applySelection(a);break;case De.yh.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(a):this.applyAdoptedStyleSheet(a)}}},{key:"applyMutation",value:function(e,t){var n=this;if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,xt(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(var r in this.legacy_missingNodeRetryMap)try{var i=this.legacy_missingNodeRetryMap[r],o=Et(i.node,this.virtualDom,this.mirror);o&&(i.node=o)}catch(m){this.warn(m)}var a=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes.forEach((function(t){var r,i=a.getNode(t.id);if(!i){if(e.removes.find((function(e){return e.id===t.parentId})))return;return n.warnNodeNotFound(e,t.id)}var o=a.getNode(t.parentId);if(!o)return n.warnNodeNotFound(e,t.parentId);if(t.isShadow&&(0,qt.He)(o)&&(o=o.shadowRoot),a.removeNodeFromMap(i),o)try{o.removeChild(i),n.usingVirtualDom&&"#text"===i.nodeName&&"STYLE"===o.nodeName&&(null===(r=o.rules)||void 0===r?void 0:r.length)>0&&(o.rules=[])}catch(m){if(!(m instanceof DOMException))throw m;n.warn("parent could not remove child in mutation",o,i,e)}}));var s=Object.assign({},this.legacy_missingNodeRetryMap),u=[],c=function(e){var t,r;if(!n.iframe.contentDocument)return n.warn("Looks like your replayer has been destroyed.");var i=a.getNode(e.parentId);if(!i)return e.node.type===je.Jq.Document?n.newDocumentQueue.push(e):u.push(e);e.node.isShadow&&((0,qt.He)(i)||i.attachShadow({mode:"open"}),i=i.shadowRoot);var o=null,c=null;if(e.previousId&&(o=a.getNode(e.previousId)),e.nextId&&(c=a.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=a.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return u.push(e);if(!e.node.rootId||a.getNode(e.node.rootId)){var l=e.node.rootId?a.getNode(e.node.rootId):n.usingVirtualDom?n.virtualDom:n.iframe.contentDocument;if((0,qt.Cj)(i,a))n.attachDocumentToIframe(e,i);else{var d=function(e,t){if(!n.usingVirtualDom){var r,i=(0,p.Z)(n.config.plugins||[]);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.onBuild&&o.onBuild(e,{id:t,replayer:n})}}catch(a){i.e(a)}finally{i.f()}}},f=(0,je.GQ)(e.node,{doc:l,mirror:a,skipChild:!0,hackCss:!0,cache:n.cache,afterAppend:d});if(-1!==e.previousId&&-1!==e.nextId){var h=a.getMeta(i);if(h&&h.type===je.Jq.Element&&"textarea"===h.tagName&&e.node.type===je.Jq.Text){var v,m=Array.isArray(i.childNodes)?i.childNodes:Array.from(i.childNodes),g=(0,p.Z)(m);try{for(g.s();!(v=g.n()).done;){var y=v.value;y.nodeType===i.TEXT_NODE&&i.removeChild(y)}}catch(I){g.e(I)}finally{g.f()}}else if((null===h||void 0===h?void 0:h.type)===je.Jq.Document){var b=i;e.node.type===je.Jq.DocumentType&&(null===(t=b.childNodes[0])||void 0===t?void 0:t.nodeType)===Node.DOCUMENT_TYPE_NODE&&b.removeChild(b.childNodes[0]),"HTML"===f.nodeName&&b.documentElement&&b.removeChild(b.documentElement)}if(o&&o.nextSibling&&o.nextSibling.parentNode?i.insertBefore(f,o.nextSibling):c&&c.parentNode?i.contains(c)?i.insertBefore(f,c):i.insertBefore(f,null):i.appendChild(f),d(f,e.node.id),n.usingVirtualDom&&"#text"===f.nodeName&&"STYLE"===i.nodeName&&(null===(r=i.rules)||void 0===r?void 0:r.length)>0&&(i.rules=[]),(0,qt.Cj)(f,n.mirror)){var w=n.mirror.getId(f),S=n.newDocumentQueue.find((function(e){return e.parentId===w}));S&&(n.attachDocumentToIframe(S,f),n.newDocumentQueue=n.newDocumentQueue.filter((function(e){return e!==S})))}(e.previousId||e.nextId)&&n.legacy_resolveMissingNode(s,i,f,e)}else s[e.node.id]={node:f,mutation:e}}}};e.adds.forEach((function(e){c(e)}));for(var l=Date.now();u.length;){var d=(0,qt.s6)(u);if(u.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",d);break}var f,h=(0,p.Z)(d);try{for(h.s();!(f=h.n()).done;){var v=f.value;a.getNode(v.value.parentId)?(0,qt.Fn)(v,(function(e){c(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",v)}}catch(g){h.e(g)}finally{h.f()}}Object.keys(s).length&&Object.assign(this.legacy_missingNodeRetryMap,s),(0,qt.E2)(e.texts).forEach((function(t){var r,i=a.getNode(t.id);if(!i){if(e.removes.find((function(e){return e.id===t.id})))return;return n.warnNodeNotFound(e,t.id)}if(i.textContent=t.value,n.usingVirtualDom){var o=i.parentNode;(null===(r=null===o||void 0===o?void 0:o.rules)||void 0===r?void 0:r.length)>0&&(o.rules=[])}})),e.attributes.forEach((function(t){var r=a.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.id})))return;return n.warnNodeNotFound(e,t.id)}for(var i in t.attributes)if("string"===typeof i){var o=t.attributes[i];if(null===o)r.removeAttribute(i);else if("string"===typeof o)try{if("_cssText"===i&&("LINK"===r.nodeName||"STYLE"===r.nodeName))try{var s=a.getMeta(r);Object.assign(s.attributes,t.attributes);var u=(0,je.GQ)(s,{doc:r.ownerDocument,mirror:a,skipChild:!0,hackCss:!0,cache:n.cache}),c=r.nextSibling,l=r.parentNode;if(u&&l){l.removeChild(r),l.insertBefore(u,c),a.replace(t.id,u);break}}catch(Zt){}r.setAttribute(i,o)}catch(m){n.warn("An error occurred may due to the checkout feature.",m)}else if("style"===i){var d=o,f=r;for(var h in d)if(!1===d[h])f.style.removeProperty(h);else if(d[h]instanceof Array){var p=d[h];f.style.setProperty(h,p[0],p[1])}else{var v=d[h];f.style.setProperty(h,v)}}}}))}},{key:"applyScroll",value:function(e,t){var n,r,i=this.mirror.getNode(e.id);if(!i)return this.debugNodeNotFound(e,e.id);var o=this.mirror.getMeta(i);if(i===this.iframe.contentDocument)null===(n=this.iframe.contentWindow)||void 0===n||n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((null===o||void 0===o?void 0:o.type)===je.Jq.Document)null===(r=i.defaultView)||void 0===r||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(a){}}},{key:"applyInput",value:function(e){var t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(n){}}},{key:"applySelection",value:function(e){var t=this;try{var n=new Set,r=e.ranges.map((function(e){var r=e.start,i=e.startOffset,o=e.end,a=e.endOffset,s=t.mirror.getNode(r),u=t.mirror.getNode(o);if(s&&u){var c=new Range;c.setStart(s,i),c.setEnd(u,a);var l=s.ownerDocument,d=null===l||void 0===l?void 0:l.getSelection();return d&&n.add(d),{range:c,selection:d}}}));n.forEach((function(e){return e.removeAllRanges()})),r.forEach((function(e){var t;return e&&(null===(t=e.selection)||void 0===t?void 0:t.addRange(e.range))}))}catch(i){}}},{key:"applyStyleSheetMutation",value:function(e){var t,n=null;e.styleId?n=this.styleMirror.getStyle(e.styleId):e.id&&(n=(null===(t=this.mirror.getNode(e.id))||void 0===t?void 0:t.sheet)||null),n&&(e.source===De.yh.StyleSheetRule?this.applyStyleSheetRule(e,n):e.source===De.yh.StyleDeclaration&&this.applyStyleDeclaration(e,n))}},{key:"applyStyleSheetRule",value:function(e,t){var n,r,i,o;if(null===(n=e.adds)||void 0===n||n.forEach((function(e){var n=e.rule,r=e.index;try{if(Array.isArray(r)){var i=(0,qt._X)(r),o=i.positions,a=i.index;(0,qt.md)(t.cssRules,o).insertRule(n,a)}else{var s=void 0===r?void 0:Math.min(r,t.cssRules.length);null===t||void 0===t||t.insertRule(n,s)}}catch(Zt){}})),null===(r=e.removes)||void 0===r||r.forEach((function(e){var n=e.index;try{if(Array.isArray(n)){var r=(0,qt._X)(n),i=r.positions,o=r.index;(0,qt.md)(t.cssRules,i).deleteRule(o||0)}else null===t||void 0===t||t.deleteRule(n)}catch(Zt){}})),e.replace)try{null===(i=t.replace)||void 0===i||i.call(t,e.replace)}catch(Zt){}if(e.replaceSync)try{null===(o=t.replaceSync)||void 0===o||o.call(t,e.replaceSync)}catch(Zt){}}},{key:"applyStyleDeclaration",value:function(e,t){e.set&&(0,qt.md)(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority);e.remove&&(0,qt.md)(t.rules,e.index).style.removeProperty(e.remove.property)}},{key:"applyAdoptedStyleSheet",value:function(e){var t,n=this,r=this.mirror.getNode(e.id);if(r){null===(t=e.styles)||void 0===t||t.forEach((function(e){var t,i=null,o=null;if((0,qt.He)(r)?o=(null===(t=r.ownerDocument)||void 0===t?void 0:t.defaultView)||null:"#document"===r.nodeName&&(o=r.defaultView),o)try{i=new o.CSSStyleSheet,n.styleMirror.add(i,e.styleId),n.applyStyleSheetRule({source:De.yh.StyleSheetRule,adds:e.rules},i)}catch(Zt){}}));var i=0;!function e(t,r){var o=r.map((function(e){return n.styleMirror.getStyle(e)})).filter((function(e){return null!==e}));(0,qt.He)(t)?t.shadowRoot.adoptedStyleSheets=o:"#document"===t.nodeName&&(t.adoptedStyleSheets=o),o.length!==r.length&&i<10&&(setTimeout((function(){return e(t,r)}),0+100*i),i++)}(r,e.styleIds)}}},{key:"legacy_resolveMissingNode",value:function(e,t,n,r){var i=r.previousId,o=r.nextId,a=i&&e[i],s=o&&e[o];if(a){var u=a.node,c=a.mutation;t.insertBefore(u,n),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(s){var l=s.node,d=s.mutation;t.insertBefore(l,n.nextSibling),delete e[d.node.id],delete this.legacy_missingNodeRetryMap[d.node.id],(d.previousId||d.nextId)&&this.legacy_resolveMissingNode(e,t,l,d)}}},{key:"moveAndHover",value:function(e,t,n,r,i){var o=this.mirror.getNode(n);if(!o)return this.debugNodeNotFound(i,n);var a=(0,qt.vD)(o,this.iframe),s=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left="".concat(s,"px"),this.mouse.style.top="".concat(u,"px"),r||this.drawMouseTail({x:s,y:u}),this.hoverElements(o)}},{key:"drawMouseTail",value:function(e){var t=this;if(this.mouseTail){var n=!0===this.config.mouseTail?ln:Object.assign({},ln,this.config.mouseTail),r=n.lineCap,i=n.lineWidth,o=n.strokeStyle,a=n.duration,s=function(){if(t.mouseTail){var e=t.mouseTail.getContext("2d");e&&t.tailPositions.length&&(e.clearRect(0,0,t.mouseTail.width,t.mouseTail.height),e.beginPath(),e.lineWidth=i,e.lineCap=r,e.strokeStyle=o,e.moveTo(t.tailPositions[0].x,t.tailPositions[0].y),t.tailPositions.forEach((function(t){return e.lineTo(t.x,t.y)})),e.stroke())}};this.tailPositions.push(e),s(),setTimeout((function(){t.tailPositions=t.tailPositions.filter((function(t){return t!==e})),s()}),a/this.speedService.state.context.timer.speed)}}},{key:"hoverElements",value:function(e){var t;null===(t=this.lastHoveredRootNode||this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")})),this.lastHoveredRootNode=e.getRootNode();for(var n=e;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement}},{key:"isUserInteraction",value:function(e){return e.type===De.tw.IncrementalSnapshot&&(e.data.source>De.yh.Mutation&&e.data.source<=De.yh.Input)}},{key:"backToNormal",value:function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(De.SA.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}},{key:"warnNodeNotFound",value:function(e,t){this.warn("Node with id '".concat(t,"' not found. "),e)}},{key:"warnCanvasMutationFailed",value:function(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}},{key:"debugNodeNotFound",value:function(e,t){this.debug("Node with id '".concat(t,"' not found. "),e)}},{key:"warn",value:function(){var e;if(this.config.showWarning){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=this.config.logger).warn.apply(e,[cn].concat(n))}}},{key:"debug",value:function(){var e;if(this.config.showDebug){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=this.config.logger).log.apply(e,[cn].concat(n))}}}]),e}(),mn=function(){function e(){var n=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.Z)(this,e),this.events=[],this.castedEvents=[],this.replayer=void 0,this.onEventCast=void 0,this.config={enableInteract:!1},this.useTimestampCompression=!0,this.addEvents=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){var i,o,a,s,u,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=r.sort((function(e,t){return e.timestamp-t.timestamp})),n.useTimestampCompression&&(o=Date.now(),i=i.map((function(e,t){return(0,l.Z)((0,l.Z)({},e),{},{timestamp:o+t})}))),n.events=[].concat((0,m.Z)(n.events),(0,m.Z)(i)),a=new Promise((function(e){n.onEventCast=function(t){n.castedEvents.push(t),n.castedEvents.length===n.events.length&&(n.onEventCast=void 0,e(t))}})),s=(0,p.Z)(i);try{for(s.s();!(u=s.n()).done;)c=u.value,n.replayer.addEvent(c)}catch(t){s.e(t)}finally{s.f()}return e.abrupt("return",a);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.stop=function(){n.replayer.destroy()},this.getNodeById=function(e){return n.replayer.getMirror().getNode(e)},this.getMeta=function(e){return n.replayer.getMirror().getMeta(e)},this.config=(0,l.Z)((0,l.Z)({},this.config),i)}return(0,s.Z)(e,[{key:"start",value:function(e){var t=this,n=e.firstEventTimestamp,r=e.speed,i=void 0===r?8:r,o=e.useTimestampCompression,a=void 0===o||o;this.replayer=new vn([],{mouseTail:!1,pauseAnimation:!1,speed:i,triggerFocus:!0,UNSAFE_replayCanvas:!0,liveMode:!0,showDebug:!1,skipInactive:!0}),this.config.enableInteract?this.replayer.enableInteract():this.replayer.disableInteract(),this.useTimestampCompression=a,this.replayer.startLive(this.useTimestampCompression?Date.now():n),this.replayer.on("event-cast",(function(e){t.onEventCast&&t.onEventCast(e)}))}}]),e}(),gn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.Z)(this,e),this.eventProcessor=void 0,this.sessionReplayer=void 0,this.eventHandlers=void 0,this.sessionReplayer=new mn(t),this.eventProcessor=new Be.u({eventHandlers:new Oe.E})}return(0,s.Z)(e,[{key:"setEventHandlers",value:function(e){this.eventHandlers=e,this.eventProcessor.setHandlers(this.eventHandlers)}},{key:"start",value:function(e){this.sessionReplayer.start(e)}},{key:"handleEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.eventProcessor.preCastEvent(n);case 2:return e.next=4,this.sessionReplayer.addEvents([n]);case 4:return e.next=6,this.eventProcessor.processEvent(n);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"skipEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.eventProcessor.skipEvents(n);case 2:return e.next=4,this.sessionReplayer.addEvents(n);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"stop",value:function(){this.sessionReplayer.stop()}}]),e}(),yn=function(e){(0,ve.Z)(i,e);var n=(0,me.Z)(i);function i(){var e;return(0,a.Z)(this,i),(e=n.call(this,{enableInteract:!0})).pageIdentifiers=void 0,e.elementSelector=new _e,e.appSpecificRules=void 0,e.setEventHandlers(new Ve({sessionMirror:e.sessionReplayer,elementSelector:e.elementSelector})),e}return(0,s.Z)(i,[{key:"setConfiguration",value:function(e){var t=e.enableRecordingAvailableInteractableElements,n=e.useTextInputFastForward;this.eventHandlers.setConfiguration({enableRecordingAvailableInteractableElements:t,useTextInputFastForward:n})}},{key:"setEvents",value:function(e){this.eventHandlers.setEvents(e)}},{key:"setOptions",value:function(e){this.elementSelector.setOptions({defaultExtractReducedHtmlAndSelector:e.extractReducedHTML,defaultInspectInteractableElements:e.inspectInteractables})}},{key:"setAppRules",value:function(e){this.appSpecificRules=e,this.elementSelector.setAppRules(e),this.eventHandlers.setAppRules(e)}},{key:"handleEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,he.Z)((0,pe.Z)(i.prototype),"handleEvent",this).call(this,n);case 2:if(!(r=e.sent)){e.next=7;break}return e.next=6,this.resolvePageId();case 6:r.pageIdFromCustomIdentifiers=e.sent;case 7:return e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"resolvePageId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(n=this.appSpecificRules)&&void 0!==n&&n.customPageIdentifiers){e.next=2;break}return e.abrupt("return",void 0);case 2:e.t0=(0,t.Z)().keys(null===(i=this.appSpecificRules)||void 0===i?void 0:i.customPageIdentifiers);case 3:if((e.t1=e.t0()).done){e.next=30;break}r=e.t1.value,a=null===(o=this.appSpecificRules)||void 0===o?void 0:o.customPageIdentifiers[r],s=(0,p.Z)(a),e.prev=7,s.s();case 9:if((u=s.n()).done){e.next=20;break}if(c=u.value){e.next=13;break}return e.abrupt("continue",18);case 13:return e.next=15,this.elementSelector.selector(c);case 15:if(!e.sent){e.next=18;break}return e.abrupt("return",r);case 18:e.next=9;break;case 20:e.next=25;break;case 22:e.prev=22,e.t2=e.catch(7),s.e(e.t2);case 25:return e.prev=25,s.f(),e.finish(25);case 28:e.next=3;break;case 30:return e.abrupt("return",void 0);case 31:case"end":return e.stop()}}),e,this,[[7,22,25,28]])})));return function(){return e.apply(this,arguments)}}()}]),i}(gn);!function(e){e[e.Element=0]="Element",e[e.VisibleElement=1]="VisibleElement",e[e.AtPointElement=2]="AtPointElement"}(fn||(fn={})),function(e){e.TextElementAppear="text_element_appear",e.TextElementDisappear="text_element_disappear",e.PageUrlChange="page_url_change"}(hn||(hn={})),function(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"}(pn||(pn={}));!function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}e.prototype.getId=function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}();var bn=/([^\\]):hover/;new RegExp(bn.source,"g");var wn=function(){function e(t){(0,a.Z)(this,e),this.urlChangeEventCallback=void 0,this.currentURL=void 0,this.originalPushState=void 0,this.originalReplaceState=void 0,this.urlChangeEventCallback=t,this.currentURL=window.location.href}return(0,s.Z)(e,[{key:"onURLChange",value:function(){var e=this;try{var t=Date.now();setTimeout((function(){var n=window.location.href;if(n!==e.currentURL){e.currentURL=n;var r={url:n,timestamp:t};e.urlChangeEventCallback(r)}}))}catch(Zt){}}},{key:"startMonitoring",value:function(){this.toggleWindowEventListeners(!0),this.overrideHistoryStateChanges()}},{key:"stopMonitoring",value:function(){this.toggleWindowEventListeners(!1),this.restoreHistoryStateChanges()}},{key:"toggleWindowEventListeners",value:function(t){var n=this,r=t?"addEventListener":"removeEventListener";e.WINDOW_EVENTS.forEach((function(e){window[r](e,n.onURLChange.bind(n))}))}},{key:"overrideHistoryStateChanges",value:function(){this.originalPushState=window.history.pushState,this.originalReplaceState=window.history.replaceState,this.originalPushState&&(window.history.pushState=function(){return this.onURLChange(),this.originalPushState.apply(window.history,arguments)}.bind(this)),this.originalReplaceState&&(window.history.replaceState=function(){return this.onURLChange(),this.originalReplaceState.apply(window.history,arguments)}.bind(this))}},{key:"restoreHistoryStateChanges",value:function(){this.originalPushState&&(window.history.pushState=this.originalPushState),this.originalReplaceState&&(window.history.replaceState=this.originalReplaceState)}}]),e}();wn.WINDOW_EVENTS=["popstate","locationchange","hashchange"];var Sn=function(e){(0,ve.Z)(i,e);var n=(0,me.Z)(i);function i(e){var t,r=e.sessionMirror,o=e.elementSelectorGenerator,s=e.assertionGeneratorOptions;return(0,a.Z)(this,i),(t=n.call(this)).sessionMirror=void 0,t.elementSelectorGenerator=void 0,t.urlObserver=void 0,t.assertionGeneratorOptions=void 0,t.isMonitoring=void 0,t.assertions=[],t.nodeByRRWebId=new Map,t.nodeIdsByParentId=new Map,t.parentIdByNodeId=new Map,t.pageUrlAtMonitoringStart=null,t.urlChangeCount=0,t.visibilityByNodeId=null,t.elementSelectorGenerator=o,t.sessionMirror=r,t.isMonitoring=!1,t.assertionGeneratorOptions=s,t.urlObserver=new wn(t.handleUrlChange.bind((0,We.Z)(t))),t}return(0,s.Z)(i,[{key:"startMonitoring",value:function(){this.isMonitoring=!0,this.pageUrlAtMonitoringStart=window.location.href,this.urlChangeCount=0,this.recordElementVisibilityForAllElements(),this.monitorElements(document,!0),this.urlObserver.startMonitoring()}},{key:"monitorElements",value:function(e){var t,n,r=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if([Node.ELEMENT_NODE,Node.DOCUMENT_NODE].includes(e.nodeType)&&!i.IGNORED_TAGS.includes(null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase())){var s=null===(n=this.sessionMirror.getMeta(e))||void 0===n?void 0:n.id;s?(this.nodeByRRWebId[s]=e,this.nodeIdsByParentId[a]=this.nodeIdsByParentId[a]||[],this.nodeIdsByParentId[a].includes(s)||this.nodeIdsByParentId[a].push(s),this.parentIdByNodeId[s]=a,o&&Array.from(e.childNodes).forEach((function(e){r.monitorElements(e,!0,s)}))):console.log("no meta for node",e)}}},{key:"generateAssertions",value:function(){var e=this;return this.log("possible assertions count before filtering",this.countPossibleAssertions()),this.filterAssertionsWithSameText(),this.filterUrlChangeAssertionsBeforeLast(),this.log("possible assertions count after filtering",this.countPossibleAssertions()),this.getAssertionsDomSlicing().map((function(t,n){return e.assertions[n].slice(0,t)})).flat()}},{key:"getAssertionsDomSlicing",value:function(){var e=this,t=function(e){return e.reduce((function(e,t){return e+t}),0)},n=this.assertions.map((function(t){return Math.min(t.length,e.assertionGeneratorOptions.maxAssertionsPerDomTree)}));if(t(n)<=this.assertionGeneratorOptions.maxAssertions)return n;for(var r=this.assertions.map((function(){return 1})),i=0;i<this.assertions.length&&t(r)<this.assertionGeneratorOptions.maxAssertions;i++)r[i]<n[i]&&r[i]++,i===this.assertions.length-1&&(i=0);return r}},{key:"filterAssertionsWithSameText",value:function(){for(var e=new Set,t=this.assertions.length-1;t>=0;t--)for(var n=this.assertions[t],r=n.length-1;r>=0;r--){var i=n[r];if(i.type!==hn.PageUrlChange){var o=i.text;e.has(o)?this.assertions[t].splice(r,1):e.add(o)}}this.assertions=this.assertions.filter((function(e){return 0!==e.length}))}},{key:"filterUrlChangeAssertionsBeforeLast",value:function(){var e=this.assertions.map((function(e,t){return{assertionTree:e,index:t}})).filter((function(e){var t;return(null===(t=e.assertionTree[0])||void 0===t?void 0:t.type)===hn.PageUrlChange})).map((function(e){return e.index}));e.length<=1||(e.pop(),this.assertions=this.assertions.filter((function(t,n){return!e.includes(n)})))}},{key:"countPossibleAssertions",value:function(){return this.assertions.reduce((function(e,t){return e+t.length}),0)}},{key:"stopMonitoringAndGenerateAssertions",value:function(){var e=this.generateAssertions();return this.stopMonitoring(),e}},{key:"stopMonitoring",value:function(){this.isMonitoring=!1,this.urlObserver.stopMonitoring(),this.assertions=[],this.pageUrlAtMonitoringStart=null,this.urlChangeCount=0}},{key:"handleMutation",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isMonitoring){e.next=2;break}return e.abrupt("return");case 2:if(!(n.adds.length>0)){e.next=5;break}return e.next=5,this.handleAdditionMutation(n.adds,r.timestamp);case 5:if(!(n.removes.length>0)){e.next=8;break}return e.next=8,this.handleRemovalMutation(n.removes,r.timestamp);case 8:if(!(n.attributes.length>0)){e.next=11;break}return e.next=11,this.handleAttributeMutation(n.attributes,r.timestamp);case 11:if(!(n.texts.length>0)){e.next=14;break}return e.next=14,this.handleTextMutation(n.texts,r.timestamp);case 14:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleUrlChange",value:function(e){if(this.isMonitoring){this.urlChangeCount++;var t={type:hn.PageUrlChange,url:e.url,urlChangeCount:this.urlChangeCount};this.log("new url change assertion",t),this.assertions.push([t])}}},{key:"handleAdditionMutation",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,o){var a,s,u,c,l,d=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.log("handleAdditionMutation",n),a=n.filter((function(e){return e.node.type===pn.Element})),s=a.map((function(e){return e.node.id})),u=a.filter((function(e){var t=e.parentId;return!t||!s.includes(t)})),this.log("handleAdditionMutation roots",u),u.forEach(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=d.sessionMirror.getNodeById(n.node.id),d.monitorElements(r,!0,n.parentId);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),c=a.map((function(e){return e.node.id})),l=c.filter((function(e){return i.isElementVisible(d.nodeByRRWebId[e])})),this.filterChildIds(l).forEach(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",d.updateElementAndDescendantsVisibility(n,o));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleRemovalMutation",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i){var o,a,s=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.log("handleRemovalMutation",n),o=n.map((function(e){return e.id})),a=o.filter((function(e){return s.nodeChangedVisibility(e)})),this.filterChildIds(a).forEach(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",s.updateElementAndDescendantsVisibility(n,i));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),o.forEach((function(e){return s.unmonitorElements(e,!0)}));case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleAttributeMutation",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i){var o,a=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.log("handleAttributeMutation",n),o=n.filter((function(e){var t=e.attributes,n=e.id;return t.style&&a.nodeByRRWebId[n]instanceof Element&&a.nodeChangedVisibility(n)})).map((function(e){return e.id})),this.filterChildIds(o).forEach(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a.updateElementAndDescendantsVisibility(n,i);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"nodeChangedVisibility",value:function(e){var t=this.visibilityByNodeId.get(e)||!1,n=this.nodeByRRWebId[e];return t!==(!!n&&i.isElementVisible(n))}},{key:"handleTextMutation",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var o,a,s,u=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.log("handleTextMutation",n),o=function(e){var t=u.parentIdByNodeId[e.id];return 1===u.getLeavesWithSameText(t).length},a=function(e){var t=u.parentIdByNodeId[e.id];return i.isElementVisible(u.nodeByRRWebId[t])},0!==(s=n.filter(a).filter(o).map((function(e){var t=e.id,n=u.parentIdByNodeId[t],i=u.parentIdByNodeId[n],o=n,a=u.nodeByRRWebId[o],s=u.getDOMNodeText(u.nodeByRRWebId[n]);return{type:hn.TextElementAppear,parentId:i,nodeId:n,childNodeId:o,childTag:a.tagName.toLowerCase(),childDomNode:a,text:s,timestamp:r}}))).length){e.next=6;break}return e.abrupt("return");case 6:this.log("new assertions",s),this.assertions.push(s);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getNodeAncestorIds",value:function(e){for(var t=[],n=this.parentIdByNodeId[e];-1!==n;){if(void 0===n){var r=t.length?t[t.length-1]:e;this.log("parent id is undefined for node id ".concat(e," - possible bug in dom tracking. check tracking of node ").concat(r),this.nodeByRRWebId[r]);break}t.push(n),n=this.parentIdByNodeId[n]}return t}},{key:"filterChildIds",value:function(e){var t=this;return e.filter((function(n){return t.getNodeAncestorIds(n).every((function(t){return!e.includes(t)}))}))}},{key:"getDescendantsIds",value:function(e){var t=this,n=this.nodeIdsByParentId[e]||[];return[].concat((0,m.Z)(n),(0,m.Z)(n.flatMap((function(e){return t.getDescendantsIds(e)}))))}},{key:"unmonitorElements",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.parentIdByNodeId[e];(delete this.nodeByRRWebId[e],this.nodeIdsByParentId[r]=(this.nodeIdsByParentId[r]||[]).filter((function(t){return t!==e})),0===this.nodeIdsByParentId[r].length&&delete this.nodeIdsByParentId[r],delete this.parentIdByNodeId[e],n)&&(this.nodeIdsByParentId[e]||[]).forEach((function(e){t.unmonitorElements(e,!0)}))}},{key:"updateElementAndDescendantsVisibility",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i){var o=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.updateElementVisibility(n,!0,i);case 2:this.getDescendantsIds(n).forEach(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.updateElementVisibility(n,!1,i);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"updateElementVisibility",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r,o){var a,s,u;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((a=this.nodeByRRWebId[n])instanceof Element){e.next=3;break}return e.abrupt("return");case 3:if(s=i.isElementVisible(a),!r||!this.nodeChangedVisibility(n)){e.next=9;break}return e.next=7,this.createTextElementAssertions(n,s,o);case 7:0!==(u=e.sent).length&&(this.log("new assertions",u),this.assertions.push(u));case 9:this.visibilityByNodeId.set(n,s);case 10:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"createTextElementAssertions",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r,i){var o,a=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.parentIdByNodeId[n],e.abrupt("return",this.getDescendantsNodeIdsForAssertions(n).map((function(e){return a.createTextElementAssertion(n,o,e,r,i)})));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"createTextElementAssertion",value:function(e,t,n,r,i){var o=this.nodeByRRWebId[n];return{type:r?hn.TextElementAppear:hn.TextElementDisappear,text:this.getDOMNodeText(o),parentId:t,nodeId:e,childNodeId:n,childTag:o.tagName.toLowerCase(),childDomNode:o,timestamp:i}}},{key:"recordElementVisibilityForAllElements",value:function(){this.visibilityByNodeId=new Map;for(var e=document.getElementsByTagName("*"),t=0;t<e.length;t++)try{var n=e[t];this.visibilityByNodeId.set(this.sessionMirror.getMeta(n).id,i.isElementVisible(n))}catch(Zt){}}},{key:"getDescendantsNodeIdsForAssertions",value:function(e){var t=this,n=this.nodeByRRWebId[e];if(n.nodeType===Node.TEXT_NODE)return n;var r=i.isElementVisible(n),o=this.getAvailableTagsInTree(e).filter((function(e){return i.TAG_PRECEDENCE_ORDERING.includes(e)})).sort(i.sortTags),a=this.getDescendantsLeavesIds(e);return o.flatMap((function(e){var n=a.filter((function(n){var r,i;return(null===(r=t.nodeByRRWebId[n])||void 0===r||null===(i=r.tagName)||void 0===i?void 0:i.toLowerCase())===e}));return n=(n=n.filter((function(e){return t.nodeChangedVisibility(e)}))).filter((function(e){return 1===t.getLeavesWithSameText(e).length})),r?n.sort((function(e,n){return t.nodeByRRWebId[e].getBoundingClientRect().top-t.nodeByRRWebId[n].getBoundingClientRect().top})):n}))}},{key:"getLeavesWithSameText",value:function(e){var t=this,n=this.getDOMNodeText(this.nodeByRRWebId[e]),r=this.nodeIdsByParentId[-1];return r?this.getDescendantsLeavesIds(r).map((function(e){return t.nodeByRRWebId[e]})).filter((function(e){return t.getDOMNodeText(e)===n})):[]}},{key:"getDOMNodeText",value:function(e){return e.nodeType!==Node.ELEMENT_NODE||function(e){var t;return i.IGNORED_TAGS.includes(null===e||void 0===e||null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase())}(e)?"":Array.from(e.childNodes).filter((function(e){return e.nodeType===Node.TEXT_NODE})).map((function(e){return e.textContent})).join("").trim()}},{key:"getDescendantsLeavesIds",value:function(e){var t=this.nodeByRRWebId[e];return t&&(t.tagName||t instanceof Document)?[e].concat((0,m.Z)(this.getDescendantsIds(e))).filter(this.isElementTextLeaf.bind(this)):[]}},{key:"isElementTextLeaf",value:function(e){var t=this,n=this.nodeIdsByParentId[e]||[],r=this.nodeByRRWebId[e];return!!Array.from(r.childNodes).some((function(e){return e.nodeType===Node.TEXT_NODE&&""!==e.textContent.trim()}))||r&&""!==this.getDOMNodeText(r)&&n.every((function(e){var n=t.nodeByRRWebId[e];return n&&""===t.getDOMNodeText(n)}))}},{key:"getAvailableTagsInTree",value:function(e){var t=this,n=this.nodeByRRWebId[e];if(!n||!n.tagName)return[];var r=this.nodeIdsByParentId[e];return r&&0!==r.size?(0,m.Z)(new Set([n.tagName.toLowerCase()].concat((0,m.Z)((0,m.Z)(r).flatMap((function(e){return t.getAvailableTagsInTree(e)})))))):[n.tagName.toLowerCase()]}},{key:"log",value:function(){var e;i.LOG_TO_CONSOLE&&(e=console).log.apply(e,arguments)}}],[{key:"isAssertionsEqual",value:function(e,t){return e.type===t.type&&(e.type===hn.PageUrlChange?e.url===t.url:e.text===t.text)}},{key:"isElementVisible",value:function(e){return!!e&&(!!e.tagName&&("body"===e.tagName.toLowerCase()||!!e.parentElement&&!L(e).isHidden))}},{key:"sortTags",value:function(e,t){return i.TAG_PRECEDENCE_ORDERING.indexOf(e)-i.TAG_PRECEDENCE_ORDERING.indexOf(t)}}]),i}(Oe.E);Sn.LOG_TO_CONSOLE=!1,Sn.TAG_PRECEDENCE_ORDERING=["h1","h2","h3","h4","h5","h6","a","span","div"],Sn.IGNORED_TAGS=["script","style","head","meta","svg"];var In=n(5473);function Cn(e){var t,n;return null!==(t=e._debugSource)&&void 0!==t&&t.fileName?null===(n=e._debugSource)||void 0===n?void 0:n.fileName:""}function kn(e,t){if("Unknown"===e)return!1;if("string"!==typeof e)return!1;if(e[0]!==e[0].toUpperCase())return!1;if(t.type.$$typeof===Symbol.for("react.context")||t.type.$$typeof===Symbol.for("react.forward_ref")||t.type.$$typeof===Symbol.for("react.memo")||t.type.$$typeof===Symbol.for("react.profiler")||t.type.$$typeof===Symbol.for("react.suspense"))return!1;var n=Cn(t);return!/.*\/node_modules\//.test(n)&&e!==n&&!/^(?!.*src).*$/.test(n)}function En(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return["",{}];var n=e.type,r=n?n.name||n:"Unknown",i="";if(kn(r,e)){i+="<".concat(r,">");var o=Cn(e);t[r]=o}if(e.child){var a=En(e.child,t),s=(0,v.Z)(a,2),u=s[0],c=s[1];i+=u,t=(0,l.Z)((0,l.Z)({},t),c)}if(kn(r,e)&&(i+="</".concat(r,">")),e.sibling){var d=En(e.sibling,t),f=(0,v.Z)(d,2),h=f[0],p=f[1];i+=h,t=(0,l.Z)((0,l.Z)({},t),p)}return[i,t]}function xn(e){var t,n=null===(t=e._reactRootContainer)||void 0===t?void 0:t._internalRoot.current;return n||console.log("No react tree in element",e),En(n)}var An=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,null,[{key:"setPrefix",value:function(t){["log","warn","error"].forEach((function(n){e.original[n]||(e.original[n]=console[n]),console[n]=function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];i.unshift(t),e.original[n].apply(console,i)}}))}}]),e}();An.original={};var Mn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e.map((function(e){return e.target}))},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0};(0,a.Z)(this,e),this.filterElements=t,this.observeOptions=n,this.elements=void 0,this.observer=void 0}return(0,s.Z)(e,[{key:"startListening",value:function(){var e=this;this.elements=[],this.observer=new MutationObserver((function(t){e.elements=[].concat((0,m.Z)(e.elements),(0,m.Z)(e.filterElements(t)))})),this.observer.observe(document.body,this.observeOptions)}},{key:"stopListening",value:function(){return this.observer.disconnect(),this.elements}}]),e}();function Tn(e){var t=e.filter((function(e){return e.addedNodes.length>0})).reduce((function(e,t){return[].concat((0,m.Z)(e),(0,m.Z)(t.addedNodes))}),[]),n=e.filter((function(e){return"attributes"===e.type&&"style"===e.attributeName&&e.target instanceof HTMLElement&&/display\s*:\s*none/.test(e.oldValue)&&O(e.target).visible})).map((function(e){return e.target}));return[].concat((0,m.Z)(t),(0,m.Z)(n))}var Nn="$checksum",Rn=function(e){(0,ve.Z)(i,e);var n=(0,me.Z)(i);function i(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)(this,i),An.setPrefix(Nn),(e=n.call(this)).options={highlightElement:!0},e.elementSelector=void 0,e.testIdCounter=0,e.currentESRASelector=void 0,e.lastHighlights=[],e.assertionGenerator=void 0,e.initialized=!1,e.htmlReducer=void 0,e.appSpecificRules=void 0,e.rrwebEvents=[],e.mutationDetector=void 0,e.elementSelector=new ge,e.options=(0,l.Z)((0,l.Z)({},e.options),t),e.htmlReducer=new Re,e}return(0,s.Z)(i,[{key:"init",value:function(e){var t,n,r,i=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{assertionGenerator:!0},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{maxAssertionsPerDomTree:2,maxAssertions:10};if(this.appSpecificRules=e,!this.initialized){this.initialized=!0;var s=new In.L((function(e){return i.rrwebEvents.push(e),i.eventProcessor.processEvent(e)}));o.assertionGenerator&&(this.assertionGenerator=new Sn({sessionMirror:s,elementSelectorGenerator:this.elementSelector,assertionGeneratorOptions:a})),s.start(),o.assertionGenerator&&this.setEventHandlers(this.assertionGenerator),fe.limitChildren=null!==(t=null===(n=this.appSpecificRules)||void 0===n||null===(r=n.esraSelectionRules)||void 0===r?void 0:r.limitChildren)&&void 0!==t?t:[]}}},{key:"getElementSelector",value:function(){return this.elementSelector}},{key:"setLogPrefix",value:function(e){An.setPrefix(e)}},{key:"getLastSelectionLogs",value:function(){return this.currentESRASelector?this.currentESRASelector.getLastSelectionLogs():{}}},{key:"getBestMatchingElementSimilarityScore",value:function(e){return this.currentESRASelector=new fe(e),this.currentESRASelector.selectOne().score}},{key:"extractESRAMetadata",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new le(document).extract(n).toMetadata());case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"select",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.elementSelector.selector(n,r);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getSelectionDataForSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.elementSelector.selector(n,r);case 3:if(a=e.sent){e.next=7;break}return console.warn("could not find element for selector: "+n),e.abrupt("return",null);case 7:return e.next=9,this.elementSelector.getSelectorAndLocator(a,{testIdSelector:null===(i=this.appSpecificRules)||void 0===i||null===(o=i.esraSelectionRules)||void 0===o?void 0:o.testIdSelector});case 9:return s=e.sent,u=s.locator,e.next=13,this.extractESRAMetadata(a);case 13:return c=e.sent,e.abrupt("return",{generatedLocator:u,esraMetadata:c,selector:n,parentFramesSelectors:r});case 17:return e.prev=17,e.t0=e.catch(0),console.log("getMetadataForSelector exception",e.t0),e.abrupt("return");case 21:case"end":return e.stop()}}),e,this,[[0,17]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getMatchingElementSelectionData",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=h.length>1&&void 0!==h[1]?h[1]:{minSelectionScore:.3}).minSelectionScore,o=r.cachedSelector,a=r.staticMetadata,s=h.length>2&&void 0!==h[2]&&h[2],e.prev=2,!o){e.next=8;break}return console.log("Trying to locate using cached selector",o),e.next=7,this.elementSelector.selector(o);case 7:u=e.sent;case 8:if(u||(console.log("Trying to locate using ESRA",n),z(a)&&console.log("and static data",a),this.currentESRASelector=new fe(n,a),(d=this.currentESRASelector.selectOne()).score>=i?(u=d.candidate,c=d.score,l=d.clickOffset):console.log("Best matching element was below threshold",d)),console.log(u?["Located with score ".concat(c),u]:"Element not located"),u){e.next=12;break}return e.abrupt("return");case 12:return s&&new g(u).scrollIntoView(),this.highlightElement(u),e.next=16,this.makeMatchingElementSelectionData(u,c);case 16:return f=e.sent,l&&(f.clickOffset=l),e.abrupt("return",f);case 21:return e.prev=21,e.t0=e.catch(2),console.log("getMatchingElementSelectionData exception",e.t0),e.abrupt("return");case 26:case"end":return e.stop()}}),e,this,[[2,21]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getAllInteractableElementsForLastSelectQuery",value:function(){var e=this,n=this.currentESRASelector.getFinalCandidates();return Promise.all(n.map(function(){var n=(0,r.Z)((0,t.Z)().mark((function n(r){return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=r.esraMetadata,t.next=3,e.makeMatchingElementSelectionData(r.candidate,r.score);case 3:return t.t1=t.sent,t.abrupt("return",{esraMetadata:t.t0,selectionData:t.t1});case 5:case"end":return t.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()))}},{key:"getInteractableElementsRaw",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",x());case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"getInteractableElements",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,i,o=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=x(),i=new le(document),e.abrupt("return",Promise.all(n.map(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.extract(n).toMetadata(),e.next=3,o.makeMatchingElementSelectionData(n);case 3:return a=e.sent,e.abrupt("return",{esraMetadata:r,selectionData:a});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"getCurrentESRASelector",value:function(){return this.currentESRASelector}},{key:"startMonitoringForAssertions",value:function(){return this.assertionGenerator.startMonitoring()}},{key:"generateAssertions",value:function(){return this.assertionGenerator.generateAssertions()}},{key:"stopMonitoringAndGenerateAssertions",value:function(){return this.assertionGenerator?this.assertionGenerator.stopMonitoringAndGenerateAssertions():(console.warn("Assertion generator not initialized, returning empty assertions"),[])}},{key:"stopMonitoring",value:function(){this.assertionGenerator.stopMonitoring()}},{key:"postRRwebEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",fetch(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(this.rrwebEvents)}));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"reduceHTML",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.length>0&&void 0!==s[0]?s[0]:{},r=s.length>1&&void 0!==s[1]?s[1]:{},i=s.length>2&&void 0!==s[2]?s[2]:document,e.next=5,this.htmlReducer.reduceHTML((0,l.Z)((0,l.Z)({},this.appSpecificRules),n),r,i);case 5:return o=e.sent,r.extractESRAForInterpretationRequiredElements&&(console.log("Extracting ESRA for interpretation required elements..."),a=this.htmlReducer.getInteractableElementsInReducedHTML(),o.elementsForNodeInterpretation=a.reduce((function(e,t){var n,r=t.checksumId,i=t.element;if(!(i instanceof HTMLElement))return e;if(null!==(n=i.innerText)&&void 0!==n&&n.trim().length)return e;var o=new le(document).extract(i).toMetadata();return[].concat((0,m.Z)(e),[{checksumId:r,esraMetadata:o}])}),[]),console.log("Done with ESRA extraction for interpretation required elements")),e.abrupt("return",o);case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"displayInterpretationForElements",value:function(e){var t=this;this.clearHighlights(),this.htmlReducer.getInteractableElements().forEach((function(n){var r=n.checksumId,i=n.element,o=e[r];o&&(i.isConnected?t.highlightElement(i,{text:o,textType:"hover",clear:!1,textStyle:{width:"120px"}}):console.log("Element ".concat(r," is not connected to the DOM, skipping display")))}))}},{key:"overlayInteractableElementsWithChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u,c,d,f,h=this,p=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(n=p.length>0&&void 0!==p[0]?p[0]:{}).reduceBeforeRender,i=void 0!==r&&r,o=n.mode,a=void 0===o?"full":o,s=n.textPosition,u=void 0===s?"tag"===a?"above":void 0:s,c=n.shouldFlipHighlightTextOutsideViewport,d=void 0===c||c,this.clearHighlights(),!i){e.next=5;break}return e.next=5,this.reduceHTML();case 5:f=function(e,t,n){if(t.isConnected){var r=t.getBoundingClientRect(),i=r.width,o=r.height;if(!(i<=0||o<=0)){var s=function(e){var t=["red","gold","green","steelBlue","orange","hotPink","darkViolet","brown"];return e?t[e%t.length]:"red"}(n);h.highlightElement(t,(0,l.Z)((0,l.Z)({text:e,clear:!1,highlightStyle:{outline:"tag"===a?"3px dashed ".concat(s):"none"}},u?{textPosition:u}:{}),{},{textStyle:function(e){switch(a){case"tag":return{background:e,width:"initial",left:"-2px",border:"3px dashed ".concat(e),"font-weight":"bold"};case"full":return{background:"black",height:"100%"}}}(s),shouldFlipHighlightTextOutsideViewport:d}))}}else console.log("Element ".concat(e," is not connected to the DOM, skipping display"))},this.htmlReducer.getInteractableElementsInReducedHTML().filter((function(e){return!L(e.element,{scrollIntoView:!1}).isHidden})).forEach((function(e,t){var n=e.checksumId,r=e.element;f(n,r,t)}));case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getSelectorForChecksumId",value:function(e){return this.htmlReducer.getSelectorForChecksumId(e)}},{key:"getSelectorByPosition",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=document.elementFromPoint(n,r),e.next=3,this.elementSelector.getSelectorAndLocator(i);case 3:return o=e.sent,a=o.selector,s=o.locator,u=o.parentFramesSelectors,e.abrupt("return",{selector:a,locator:s,parentFramesSelectors:u});case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isInput",value:function(e){var t=T(e);if(t.length)return["input","textarea"].includes(t[0].tagName.toLowerCase())}},{key:"getReactTree",value:function(e){return xn(e)}},{key:"isHidden",value:function(e){return L(e)}},{key:"showGrid",value:function(){this.removeGrid();var e=document.createElement("style");e.id="checksum_grid_style",e.innerHTML='\n .checksum_grid {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAJ1JREFUaEPtksEJgDAUxX73H1oRxAECkSrppacXaNI1M8f84Kz7Idf95XP0kM3yVWSzIFORikgG+lqSWIytCFYnDSsiicXYimB10rAikliMrQhWJw0rIonF2IpgddKwIpJYjK0IVicNKyKJxdiKYHXSsCKSWIytCFYnDSsiicXYimB10rAikliMrQhWJw0rIonF2IpgddLwKSLx38Oej8ZiASoSUGMAAAAASUVORK5CYII=");\n background-repeat: repeat;\n background-size: 20px;\n background-position: 0px 0px;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n z-index: 1000;\n }\n',document.body.prepend(e);var t=document.createElement("div");t.classList.add("checksum_grid"),document.body.prepend(t)}},{key:"removeGrid",value:function(){var e=document.querySelector("#checksum_grid_style");e&&e.remove();var t=document.querySelector(".checksum_grid");t&&t.remove()}},{key:"clearHighlights",value:function(){console.log("clearing highlights"),this.lastHighlights.length&&(this.lastHighlights.forEach((function(e){return e.remove()})),this.lastHighlights=[])}},{key:"highlightElement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.highlightStyle,r=void 0===n?{}:n,i=t.textStyle,o=void 0===i?{}:i,a=t.mousePosition,s=t.text,u=t.textType,c=void 0===u?"static":u,l=t.textPosition,d=void 0===l?"overlap":l,f=t.clear,h=void 0===f||f,p=t.shouldFlipHighlightTextOutsideViewport,v=void 0===p||p;if(this.options.highlightElement&&(h&&this.clearHighlights(),e)){var m=B(e),g=e.getBoundingClientRect(),y=document.createElement("div");if(y.style.outline="2px dashed rgba(255,0,0,.75)",y.style.position=m?"fixed":"absolute",y.style.left=g.left+"px",y.style.top=g.top+"px",y.style.width=g.right-g.left+"px",y.style.height=g.bottom-g.top+"px",y.style.pointerEvents="none",y.style.zIndex="2147483647",y.className="checksum-dom-cache-ignore",this.mergeStyle(y,r),a){var b=document.createElement("div");if(b.style.position="absolute",b.style.left=+a.x-16+"px",b.style.top=+a.y-16+"px",b.style.color="#004DFF",b.className="checksum-dom-cache-ignore mouse-cross",b.style.zIndex="2147483648",!document.head.querySelector("style[role=mouse-location]")){var w=document.head.appendChild(document.createElement("style"));w.setAttribute("role","mouse-location"),w.innerHTML=".mouse-cross:before, .mouse-cross:after {position: absolute;left: 15px;content: ' ';height: 33px;width: 3px;background-color: #004DFF;}.mouse-cross:before {transform: rotate(0deg);}.mouse-cross:after {transform: rotate(-90deg);}"}document.body.appendChild(b),this.lastHighlights.push(b)}var S=document.createElement("div");s&&(S.className="checksum-dom-cache-ignore",S.innerText=s,S.style.fontSize="12px",S.style.width="".concat(g.width,"px"),S.style.background="#000000a1",S.style.color="white",S.style.padding="5px",S.style.position="absolute",S.style.pointerEvents="none",S.style.userSelect="none","above"===d?S.style.bottom="".concat(g.height,"px"):"below"===d&&(S.style.top="".concat(g.height,"px")),this.mergeStyle(S,o),y.appendChild(S),y.style.pointerEvents="auto","hover"===c&&(S.style.display="none",y.addEventListener("mouseover",(function(){S.style.display="block"})),y.addEventListener("mouseout",(function(){S.style.display="none"})))),document.body.appendChild(y),"above"===d&&P(S)>0?(S.style.bottom="initial",S.style.top="".concat(g.height,"px")):"below"===d&&j(S)>0&&(S.style.top="initial",S.style.bottom="".concat(g.height,"px")),this.lastHighlights.push(y),v&&this.flipHighlightTextPositionOutsideViewport(S,d,g.height)}}},{key:"flipHighlightTextPositionOutsideViewport",value:function(e,t,n){"above"===t&&P(e)>0?(e.style.bottom="initial",e.style.top="".concat(n,"px")):"below"===t&&j(e)>0&&(e.style.top="initial",e.style.bottom="".concat(n,"px"))}},{key:"getNodeSelector",value:function(e){return(new _e).getSelector(e)}},{key:"startListeningForHTMLChanges",value:function(){this.mutationDetector&&this.mutationDetector.stopListening(),this.mutationDetector=new Mn(Tn),this.mutationDetector.startListening()}},{key:"stopListeningForHTMLChanges",value:function(e){return this.mutationDetector.stopListening().map((function(e){var t,n;return null===(t=null!==(n=e.innerText)&&void 0!==n?n:e.textContent)||void 0===t?void 0:t.trim()}))}},{key:"recordScrollPosition",value:function(e){var t=this.getSelectorForChecksumId(e).element;if(t){var n=new g(t);n.getScrollableParentsPositions(),t._checksumScrollHelper=n}}},{key:"restoreScrollPosition",value:function(e){var t=this.getSelectorForChecksumId(e).element;t&&t._checksumScrollHelper&&(t._checksumScrollHelper.restore(),delete t._checksumScrollHelper)}},{key:"mergeStyle",value:function(e,t){for(var n in t)e.style[n]=t[n]}},{key:"makeMatchingElementSelectionData",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i,o){var a,s,u,c,l,d,f,h,p,v,m,g,y,b,w,S,I,C,k,E,x,A;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,f=this.setAndGetTestId(n),h=this.getVisibleParent(n),p=this.setAndGetTestId(h),v=this.getElementAtCenterOfElement(n),m=this.setAndGetTestId(v),g={element:f,visibleElement:p===f?void 0:p,atPointElement:m===f||m===p?void 0:m},e.next=9,this.elementSelector.getSelectorAndLocator(n,{testIdSelector:null===(a=this.appSpecificRules)||void 0===a||null===(s=a.esraSelectionRules)||void 0===s?void 0:s.testIdSelector});case 9:return y=e.sent,e.next=12,this.elementSelector.getSelectorAndLocator(v,{testIdSelector:null===(u=this.appSpecificRules)||void 0===u||null===(c=u.esraSelectionRules)||void 0===c?void 0:c.testIdSelector});case 12:return b=e.sent,e.next=15,this.elementSelector.getSelectorAndLocator(h,{testIdSelector:null===(l=this.appSpecificRules)||void 0===l||null===(d=l.esraSelectionRules)||void 0===d?void 0:d.testIdSelector});case 15:return w=e.sent,S={element:null===y||void 0===y?void 0:y.selector,visibleElement:null===w||void 0===w?void 0:w.selector,atPointElement:null===b||void 0===b?void 0:b.selector},I={element:null===y||void 0===y?void 0:y.parentFramesSelectors,visibleElement:null===w||void 0===w?void 0:w.parentFramesSelectors,atPointElement:null===b||void 0===b?void 0:b.parentFramesSelectors},k={element:(C=function(e){return{tag:e.tagName.toLowerCase()}})(n),visibleElement:g.visibleElement?C(h):void 0,atPointElement:g.atPointElement?C(v):void 0},E=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){var i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r!==n||!o){e.next=2;break}return e.abrupt("return",o);case 2:return i=new le(document),e.abrupt("return",i.extract(r).toMetadata());case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.next=23,E(n);case 23:if(e.t0=e.sent,!g.visibleElement){e.next=30;break}return e.next=27,E(h);case 27:e.t1=e.sent,e.next=31;break;case 30:e.t1=void 0;case 31:if(e.t2=e.t1,!g.atPointElement){e.next=38;break}return e.next=35,E(v);case 35:e.t3=e.sent,e.next=39;break;case 38:e.t3=void 0;case 39:return e.t4=e.t3,x={element:e.t0,visibleElement:e.t2,atPointElement:e.t4},A=null===y||void 0===y?void 0:y.locator,e.abrupt("return",{testIds:g,selectors:S,parentFramesSelectors:I,elementData:k,score:i,esraMetadata:x,generatedLocator:A});case 45:return e.prev=45,e.t5=e.catch(0),console.log("[makeMatchingElementSelectionData] exception",e.t5),e.abrupt("return",{testIds:{element:void 0},selectors:{element:void 0},parentFramesSelectors:{element:void 0},elementData:{element:void 0},esraMetadata:{element:void 0},generatedLocator:void 0});case 49:case"end":return e.stop()}}),e,this,[[0,45]])})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"getElementAtCenterOfElement",value:function(e){var t=e.getBoundingClientRect(),n=t.x,r=t.y,i=e.ownerDocument.elementFromPoint(n,r);return i instanceof HTMLElement?i:void 0}},{key:"setAndGetTestId",value:function(e){if(e){var t=e.getAttribute("data-checksum-testid");if(t)return t;var n=(this.testIdCounter++).toString();return e.setAttribute("data-checksum-testid",n),n}}},{key:"getVisibleParent",value:function(e){return e instanceof HTMLElement?null!==e.offsetParent?e:this.getVisibleParent(_(e)):e}}]),i}(gn),_n=function(){function e(){(0,a.Z)(this,e),this.goals=void 0,this.goals={}}return(0,s.Z)(e,[{key:"init",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"recordGoalFinished",value:function(e){var t;console.log("Goal reached: ".concat(e)),this.goals[e]||(this.goals[e]=0),this.goals[e]+=1,null===(t=window.checksumai)||void 0===t||t.capture("goal_reached",{goalName:e})}},{key:"getGoals",value:function(){return this.goals}}]),e}();window.checksum||(window.checksum={testGenerator:new Rn,testRunner:new Rn({highlightElement:!1}),sessionDigester:new yn,goalTracker:new _n});var Dn=!!(0,i.v)().app,On=(0,i.v)().type||Dn?o.pR.App:void 0;function Zn(){return(Zn=(0,r.Z)((0,t.Z)().mark((function e(){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=On||o.De.appType,e.next=e.t0===o.pR.App?3:e.t0===o.pR.Script?9:10;break;case 3:return e.next=5,Promise.all([n.e(725),n.e(372)]).then(n.bind(n,8426));case 5:return r=e.sent,(0,r.bootstrapApp)(),e.abrupt("break",10);case 9:return e.abrupt("break",10);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}"true"===(0,i.v)().injectESRA&&(window.esraExtractor=new le(document),window.esraSelector=function(e){return new fe(e)},window.esraMetadata=u),function(){Zn.apply(this,arguments)}()}()}();
|
|
3
|
-
//# sourceMappingURL=main.
|
|
1
|
+
/*! For license information please see main.3e83459f.js.LICENSE.txt */
|
|
2
|
+
!function(){var e={603:function(e,t,n){"use strict";n.d(t,{v:function(){return i}});var r={queryParams:void 0},i=function(){return r.queryParams||(r.queryParams=Object.fromEntries(new URLSearchParams(window.location.search).entries())),r.queryParams}},8901:function(e,t,n){"use strict";n.d(t,{M:function(){return o}});var r=n(5671),i=n(3144),o=new(function(){function e(){(0,r.Z)(this,e),this.weightsSum=0,this.config={attributes:{qualification:{globalUniquenessThreshold:.99,tagUniquenessThreshold:.99},decisionWeight:this.makeWeight(.4)},classes:{qualification:{globalUniquenessThreshold:.99,tagUniquenessThreshold:.99},decisionWeight:this.makeWeight(.4)},tagName:{decisionWeight:this.makeWeight(.6)},style:{inlineWeight:.6,computedWeight:.4,decisionWeight:this.makeWeight(.4)},innerText:{decisionWeight:this.makeWeight(.6),qualification:{exactMatchMax:20,containsMatchMax:10,maxLength:256,minLength:1},ignoreSimilarityScoreBelow:.6},innerFeatures:{decisionWeight:this.makeWeight(.8)},visualVicinity:{decisionWeight:this.makeWeight(.2)},structuralVicinity:{decisionWeight:this.makeWeight(.2)}}}return(0,i.Z)(e,[{key:"makeWeight",value:function(e){return this.weightsSum+=e,e}},{key:"get",value:function(){return this.config}},{key:"weight",value:function(e){return e/this.weightsSum}}]),e}())},3536:function(e,t,n){"use strict";n.d(t,{k:function(){return c}});var r=n(2982),i=n(5671),o=n(3144),a=n(573),s=n(199),u=n(8901),c=function(){function e(t){var n=this;(0,i.Z)(this,e),this.targetElementESRAMetadata=void 0,this.qualifiedAttributes=[],this.qualifiedAttributesMap={},this.qualifiedClasses=[],this.unqualifiedClasses=[],this.qualifiedInnerText=void 0,this.visualVicinityComparable=[],this.structuralVicinityComparable=[],this.innerFeaturesComparable=[],this.rank=function(e){if(n.isDealBreaker(e))return{score:0,scores:{}};var t=n.tagSimilarity(e),r=n.attributesSimilarity(e),i=n.classSimilarity(e),o=n.styleSimilarity(e),a=n.innerTextSimilarity(e),s=n.innerFeaturesSimilarity(e),c=n.visualVicinitySimilarity(e),l=n.structuralVicinitySimilarity(e),d={tagScore:t,attributesScore:r,classesScore:i,styleScore:o,innerTextScore:a,innerFeaturesScore:s,visualVicinityScore:c,structuralVicinityScore:l,svgsScore:n.svgsSimilarity(e)},f={tagScore:u.M.weight(u.M.get().tagName.decisionWeight)*t,attributesScore:u.M.weight(u.M.get().attributes.decisionWeight)*r,classesScore:u.M.weight(u.M.get().classes.decisionWeight)*i,innerTextScore:u.M.weight(u.M.get().innerText.decisionWeight)*a,innerFeaturesScore:u.M.weight(u.M.get().innerFeatures.decisionWeight)*s,styleScore:u.M.weight(u.M.get().style.decisionWeight)*o,visualVicinityScore:u.M.weight(u.M.get().visualVicinity.decisionWeight)*c,structuralVicinityScore:u.M.weight(u.M.get().structuralVicinity.decisionWeight)*l};return{score:Object.values(f).reduce((function(e,t){return e+t}),0),scores:d}},this.targetElementESRAMetadata=t,this.setQualifiedAttributes(),this.setQualifiedClasses(),this.setQualifiedInnerText(),this.setVisualVicinityComparable(),this.setStructuralVicinityComparable(),this.setInnerFeaturesComparable()}return(0,o.Z)(e,[{key:"getQualifiedAttributes",value:function(){return this.qualifiedAttributes}},{key:"getQualifiedClasses",value:function(){return this.qualifiedClasses}},{key:"getQualifiedInnerText",value:function(){return this.qualifiedInnerText}},{key:"setQualifiedAttributes",value:function(){var e=this.targetElementESRAMetadata.attributes,t=this.makeQualifiedAttributes(e),n=t.qualifiedAttributes,r=t.qualifiedAttributesMap;this.qualifiedAttributes=n,this.qualifiedAttributesMap=r}},{key:"makeQualifiedAttributes",value:function(e,t){var n=Object.keys(e).filter((function(n){if("input"===t)if("value"===n)return!1;var r=e[n];for(var i in r)i.endsWith("Uniqenuess")&&(r[i.replace("Uniqenuess","Uniqueness")]=r[i]);return r.globalUniqueness>u.M.get().attributes.qualification.globalUniquenessThreshold||r.tagUniqueness>u.M.get().attributes.qualification.tagUniquenessThreshold})),r=n.reduce((function(t,n){return t[n]=e[n].value,t}),{});return{qualifiedAttributes:n,qualifiedAttributesMap:r}}},{key:"setQualifiedClasses",value:function(){var e=this;this.qualifiedClasses=this.makeQualifiedClasses(this.targetElementESRAMetadata.classes),this.unqualifiedClasses=Object.keys(this.targetElementESRAMetadata.classes).filter((function(t){return!e.qualifiedClasses.includes(t)}))}},{key:"isValidClass",value:function(e){return/^[A-Za-z_-][0-9A-Za-z_-]*$/.test(e)}},{key:"makeQualifiedClasses",value:function(e){var t=this;return Object.keys(e).filter((function(n){var r=e[n];return!!t.isValidClass(n)&&(!n.startsWith("jss")&&!n.startsWith("css-")&&":hover"!==n&&(r.globalUniqueness>u.M.get().classes.qualification.globalUniquenessThreshold||r.tagUniqueness>u.M.get().classes.qualification.tagUniquenessThreshold))}))}},{key:"setQualifiedInnerText",value:function(){this.qualifiedInnerText=this.makeQualifiedInnerText(this.targetElementESRAMetadata.innerText)}},{key:"makeQualifiedInnerText",value:function(e){return e&&(e.containsMatches<=u.M.get().innerText.qualification.containsMatchMax||e.exactMatches<=u.M.get().innerText.qualification.exactMatchMax)&&e.content.length<=u.M.get().innerText.qualification.maxLength&&e.content.length>=u.M.get().innerText.qualification.minLength?e:null}},{key:"makeBasicElementPropertiesComparable",value:function(e){var t=this;return e.reduce((function(e,n){var i=n.position?"".concat(n.tag,".").concat(n.position.slice(0,2).join(",")):n.tag,o="".concat(i,"+").concat(n.relativePosition),a=t.makeQualifiedClasses(n.classes).map((function(e){return"".concat(i,".").concat(e)})),u=[];t.makeQualifiedAttributes(n.attributes).qualifiedAttributes.forEach((function(e){u.push("".concat(i,"[").concat(e,"]")),u.push("".concat(i,"[").concat(e,"]=").concat(n.attributes[e].value))}));var c=n.feature?t.makeInnerFeaturesComparable([n.feature],{customTag:i,includeTag:!1,featureTypeWhiteList:[s.EI.SVG]}):[],l=[].concat((0,r.Z)(e),[i,o],(0,r.Z)(a),u,(0,r.Z)(c));return n.text&&(l.push("".concat(i,"<>")),l.push("".concat(i,"<").concat(n.text,">"))),n.distance&&(l.push("".concat(i,"->").concat(n.distance)),l.push("".concat(i,"->[]").concat(t.getDistanceRange(n.distance)))),l}),[])}},{key:"getDistanceRange",value:function(e){for(var t=[10,20,30,40,50,60,70,80,90,100],n=0,r=t;n<r.length;n++){var i=r[n];if(e<i)return i}return t[t.length-1]}},{key:"setVisualVicinityComparable",value:function(){this.visualVicinityComparable=this.makeVisualVicinityComparable(this.targetElementESRAMetadata.visualVicinity)}},{key:"makeVisualVicinityComparable",value:function(e){return this.makeBasicElementPropertiesComparable(e)}},{key:"setStructuralVicinityComparable",value:function(){this.structuralVicinityComparable=this.makeStructuralVicinityComparable(this.targetElementESRAMetadata.structuralVicinity)}},{key:"makeStructuralVicinityComparable",value:function(e){return this.makeBasicElementPropertiesComparable(e)}},{key:"makeInnerFeaturesComparable",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.customTag,i=void 0===n?void 0:n,o=t.includeTag,a=void 0===o||o,u=t.featureTypeWhiteList,c=void 0===u?void 0:u;return e.reduce((function(e,t){if(c&&!c.includes(t.type)||t.isHidden)return e;var n=null!==i&&void 0!==i?i:t.tag,o=a?[].concat((0,r.Z)(e),[n]):e;switch(t.type){case s.EI.Button:o.push("".concat(n,"[type=").concat(t.buttonType,"]"));break;case s.EI.Input:t.inputType&&o.push("".concat(n,"[type=").concat(t.inputType,"]")),t.placeholder&&o.push("".concat(n,"[placeholder=").concat(t.placeholder,"]"));break;case s.EI.SVG:t.components.forEach((function(e){var t=[];for(var r in e.attributes)t.push("[".concat(r,"=").concat(e.attributes[r],"]"));o.push("".concat(n).concat(t.join("")))}))}return"text"in t&&t.text&&(o.push("".concat(n,"<>")),o.push("".concat(n,"<").concat(t.text,">"))),o}),[])}},{key:"setInnerFeaturesComparable",value:function(){this.innerFeaturesComparable=this.makeInnerFeaturesComparable(this.targetElementESRAMetadata.innerFeatures)}},{key:"isDealBreaker",value:function(e){if("input"===this.targetElementESRAMetadata.tag&&"input"===e.tag){var t=function(e){return e.type?e.type.value:"text"};if(t(this.targetElementESRAMetadata.attributes)!==t(e.attributes))return!0}return!1}},{key:"tagSimilarity",value:function(e){return e.tag===this.targetElementESRAMetadata.tag?1:0}},{key:"attributesSimilarity",value:function(e){var t=this,n=function(e){return[].concat((0,r.Z)(t.keyValueObjectToArray(e)),(0,r.Z)(Object.keys(e)))},i=this.makeQualifiedAttributes(e.attributes).qualifiedAttributesMap;return this.jaccard(n(this.qualifiedAttributesMap),n(i))}},{key:"indicativeAttributesSimilarity",value:function(e){return this.qualifiedAttributesMap.placehoder&&e.attributes.placehoder&&this.qualifiedAttributesMap.placehoder===e.attributes.placehoder.value?1:0}},{key:"classSimilarity",value:function(e){return this.jaccard(this.qualifiedClasses,this.makeQualifiedClasses(e.classes))}},{key:"innerTextSimilarity",value:function(e){if(!this.targetElementESRAMetadata.innerText&&!e.innerText)return 1;var t=this.makeQualifiedInnerText(e.innerText);return this.qualifiedInnerText&&t&&this.qualifiedInnerText.content===t.content?1:0}},{key:"innerFeaturesSimilarity",value:function(e){return this.jaccard(this.innerFeaturesComparable,this.makeInnerFeaturesComparable(e.innerFeatures))}},{key:"visualVicinitySimilarity",value:function(e){return this.jaccard(this.visualVicinityComparable,this.makeVisualVicinityComparable(e.visualVicinity))}},{key:"structuralVicinitySimilarity",value:function(e){return this.jaccard(this.structuralVicinityComparable,this.makeStructuralVicinityComparable(e.structuralVicinity))}},{key:"styleSimilarity",value:function(e){var t,n,i,o,a=this,s=function(e){return[].concat((0,r.Z)(a.keyValueObjectToArray(e)),(0,r.Z)(Object.keys(e)))},c=this.jaccard(s(null!==(t=this.targetElementESRAMetadata.style.inline)&&void 0!==t?t:{}),s(null!==(n=e.style.inline)&&void 0!==n?n:{})),l=this.jaccard(s(null!==(i=this.targetElementESRAMetadata.style.computed)&&void 0!==i?i:{}),s(null!==(o=e.style.computed)&&void 0!==o?o:{}));return c*u.M.get().style.inlineWeight+l*u.M.get().style.computedWeight}},{key:"svgsSimilarity",value:function(e){return this.targetElementESRAMetadata.svgs||e.svgs?this.targetElementESRAMetadata.svgs&&e.svgs&&JSON.stringify(this.targetElementESRAMetadata.svgs)===JSON.stringify(e.svgs)?1:0:1}},{key:"keyValueObjectToArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"=",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return Object.keys(e).map((function(r){return"".concat(r).concat(t).concat(function(t){return n?n(e,t):e[t]}(r))}))}},{key:"jaccard",value:function(e,t){return Array.isArray(e)&&Array.isArray(t)&&!e.length&&!t.length?1:(0,a.$m)(e,t)}}]),e}()},199:function(e,t,n){"use strict";n.d(t,{BM:function(){return o},EI:function(){return r},i7:function(){return i}});var r=function(e){return e[e.Media=0]="Media",e[e.NoData=1]="NoData",e[e.Anchor=2]="Anchor",e[e.Button=3]="Button",e[e.Input=4]="Input",e[e.Text=5]="Text",e[e.SVG=6]="SVG",e}({}),i=function(e){return e.Element="element",e.Parent="parent",e.Child="child",e.LeftSibling="left-sibling",e.RightSibling="right-sibling",e}({}),o=function(e){return e.Center="center",e.Top="top",e.Bottom="bottom",e.Left="left",e.Right="right",e.TopRight="top-right",e.TopLeft="top-left",e.BottomRight="bottom-right",e.BottomLeft="bottom-left",e}({})},6842:function(e,t,n){"use strict";n.d(t,{$:function(){return r}});var r=function(e){return e.Click="click",e.Input="input",e.ClickAndType="click_and_type",e.ClearAndType="clear_and_type",e.Check="check",e.UnCheck="uncheck",e.Hover="hover",e.Navigation="navigation",e.Keystroke="keystroke",e.SelectOption="selectoption",e}({})},9478:function(e,t,n){"use strict";n.d(t,{De:function(){return o},hj:function(){return i},pR:function(){return r}});var r=function(e){return e.Script="script",e.App="app",e}({}),i=function(e){return e.TodoListApp="todo",e.ReplayerApp="replayer",e.SessionGraphApp="sessiongraph",e}({}),o={appType:"script",testAppName:"sessiongraph"}},8739:function(e,t,n){"use strict";n.d(t,{E:function(){return o}});var r=n(5671),i=n(3144),o=function(){function e(){(0,r.Z)(this,e)}return(0,i.Z)(e,[{key:"skipEvents",value:function(e){}},{key:"preCastEvent",value:function(e){}},{key:"preEvent",value:function(e){}},{key:"postEvent",value:function(e,t){return t}},{key:"handleMeta",value:function(e,t){}},{key:"handleViewportResize",value:function(e){}},{key:"handleMutation",value:function(e,t){}},{key:"handleInput",value:function(e,t){}},{key:"handleClick",value:function(e,t){}},{key:"handleMouseDown",value:function(e,t){}},{key:"handleMouseUp",value:function(e,t){}},{key:"handleMouseMove",value:function(e,t){}},{key:"handleFocus",value:function(e,t){}}]),e}()},7666:function(e,t,n){"use strict";n.d(t,{u:function(){return c}});var r=n(2982),i=n(4165),o=n(5861),a=n(5671),s=n(3144),u=n(1414),c=function(){function e(t){var n=this,s=t.eventHandlers;(0,a.Z)(this,e),this.handlers=void 0,this.events=[],this.getEvents=function(){return n.events},this.preCastEvent=function(){var e=(0,o.Z)((0,i.Z)().mark((function e(t){return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.handlers.preCastEvent(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.processEvent=function(){var e=(0,o.Z)((0,i.Z)().mark((function e(t){var r,o;return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.events.push(t),n.handlers.preEvent(t),e.next=4,n.handleEvent(t);case 4:return r=e.sent,e.next=7,n.handlers.postEvent(t,r);case 7:return o=e.sent,e.abrupt("return",n.handlers.controlledReturn?n.handlers.getReturnValue():o);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.skipEvents=function(){var e=(0,o.Z)((0,i.Z)().mark((function e(t){var o;return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(o=n.events).push.apply(o,(0,r.Z)(t)),e.abrupt("return",n.handlers.skipEvents(t));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.handlers=s}return(0,s.Z)(e,[{key:"setHandlers",value:function(e){this.handlers=e}},{key:"handleEvent",value:function(){var e=(0,o.Z)((0,i.Z)().mark((function e(t){return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.type,e.next=e.t0===u.tw.Meta?3:e.t0===u.tw.IncrementalSnapshot?4:14;break;case 3:return e.abrupt("return",this.handlers.handleMeta(t.data,t));case 4:e.t1=t.data.source,e.next=e.t1===u.yh.ViewportResize?7:e.t1===u.yh.Mutation?8:e.t1===u.yh.Input?9:e.t1===u.yh.MouseInteraction?10:e.t1===u.yh.MouseMove?11:12;break;case 7:return e.abrupt("return",this.handlers.handleViewportResize(t.data,t));case 8:return e.abrupt("return",this.handlers.handleMutation(t.data,t));case 9:return e.abrupt("return",this.handlers.handleInput(t.data,t));case 10:return e.abrupt("return",this.handleMouseInteraction(t.data,t));case 11:return e.abrupt("return",this.handlers.handleMouseMove(t.data,t));case 12:return e.abrupt("break",13);case 13:case 14:return e.abrupt("break",15);case 15:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleMouseInteraction",value:function(){var e=(0,o.Z)((0,i.Z)().mark((function e(t,n){return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.type,e.next=e.t0===u.Y2.Click?3:e.t0===u.Y2.MouseDown?4:e.t0===u.Y2.MouseUp?5:e.t0===u.Y2.Focus?6:7;break;case 3:return e.abrupt("return",this.handlers.handleClick(t,n));case 4:return e.abrupt("return",this.handlers.handleMouseDown(t,n));case 5:return e.abrupt("return",this.handlers.handleMouseUp(t,n));case 6:return e.abrupt("return",this.handlers.handleFocus(t,n));case 7:return e.abrupt("break",8);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}()},5473:function(e,t,n){"use strict";n.d(t,{L:function(){return fe}});var r=n(7762),i=n(3144),o=n(5671),a=n(5512),s=n(885),u=n(2982),c=n(1737),l=n(1414);function d(e){return"__ln"in e}var f=function(){function e(){(0,o.Z)(this,e),this.length=0,this.head=null}return(0,i.Z)(e,[{key:"get",value:function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null===t||void 0===t?void 0:t.next)||null;return t}},{key:"addNode",value:function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&d(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&d(e.nextSibling)&&e.nextSibling.__ln.previous){var r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++}},{key:"removeNode",value:function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}}]),e}(),h=function(e,t){return"".concat(e,"@").concat(t)},p=function(){function e(){var t=this;(0,o.Z)(this,e),this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(e){e.forEach(t.processMutation),t.emit()},this.emit=function(){if(!t.frozen&&!t.locked){for(var e=[],n=new f,r=function(e){for(var n=e,r=a.zi;r===a.zi;)r=(n=n&&n.nextSibling)&&t.mirror.getId(n);return r},i=function(i){if(i.parentNode&&(0,c._f)(i)){var o=(0,a.Zq)(i.parentNode)?t.mirror.getId((0,c.jB)(i)):t.mirror.getId(i.parentNode),s=r(i);if(-1===o||-1===s)return n.addNode(i);var u=(0,a.eD)(i,{doc:t.doc,mirror:t.mirror,blockClass:t.blockClass,blockSelector:t.blockSelector,maskTextClass:t.maskTextClass,maskTextSelector:t.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:t.inlineStylesheet,maskInputOptions:t.maskInputOptions,maskTextFn:t.maskTextFn,maskInputFn:t.maskInputFn,slimDOMOptions:t.slimDOMOptions,dataURLOptions:t.dataURLOptions,recordCanvas:t.recordCanvas,inlineImages:t.inlineImages,onSerialize:function(e){(0,c.Cj)(e,t.mirror)&&t.iframeManager.addIframe(e),(0,c.qs)(e,t.mirror)&&t.stylesheetManager.trackLinkElement(e),(0,c.He)(i)&&t.shadowDomManager.addShadowRoot(i.shadowRoot,t.doc)},onIframeLoad:function(e,n){t.iframeManager.attachIframe(e,n),t.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:function(e,n){t.stylesheetManager.attachLinkElement(e,n)}});u&&e.push({parentId:o,nextId:s,node:u})}};t.mapRemoves.length;)t.mirror.removeNodeFromMap(t.mapRemoves.shift());for(var o=0,s=Array.from(t.movedSet.values());o<s.length;o++){var u=s[o];m(t.removes,u,t.mirror)&&!t.movedSet.has(u.parentNode)||i(u)}for(var l=0,d=Array.from(t.addedSet.values());l<d.length;l++){var h=d[l];y(t.droppedSet,h)||m(t.removes,h,t.mirror)?y(t.movedSet,h)?i(h):t.droppedSet.add(h):i(h)}for(var p=null;n.length;){var v=null;if(p){var g=t.mirror.getId(p.value.parentNode),b=r(p.value);-1!==g&&-1!==b&&(v=p)}if(!v)for(var w=n.length-1;w>=0;w--){var S=n.get(w);if(S){var I=t.mirror.getId(S.value.parentNode);if(-1===r(S.value))continue;if(-1!==I){v=S;break}var C=S.value;if(C.parentNode&&C.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var k=C.parentNode.host;if(-1!==t.mirror.getId(k)){v=S;break}}}}if(!v){for(;n.head;)n.removeNode(n.head.value);break}p=v.previous,n.removeNode(v.value),i(v.value)}var E={texts:t.texts.map((function(e){return{id:t.mirror.getId(e.node),value:e.value}})).filter((function(e){return t.mirror.has(e.id)})),attributes:t.attributes.map((function(e){return{id:t.mirror.getId(e.node),attributes:e.attributes}})).filter((function(e){return t.mirror.has(e.id)})),removes:t.removes,adds:e};(E.texts.length||E.attributes.length||E.removes.length||E.adds.length)&&(t.texts=[],t.attributes=[],t.removes=[],t.addedSet=new Set,t.movedSet=new Set,t.droppedSet=new Set,t.movedMap={},t.mutationCb(E))}},this.processMutation=function(e){if(!(0,c.WU)(e.target,t.mirror))switch(e.type){case"characterData":var n=e.target.textContent;(0,c.IT)(e.target,t.blockClass,t.blockSelector,!1)||n===e.oldValue||t.texts.push({value:(0,a.IG)(e.target,t.maskTextClass,t.maskTextSelector)&&n?t.maskTextFn?t.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:e.target});break;case"attributes":var r=e.target,i=e.target.getAttribute(e.attributeName);if("value"===e.attributeName&&(i=(0,a.wR)({maskInputOptions:t.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:i,maskInputFn:t.maskInputFn})),(0,c.IT)(e.target,t.blockClass,t.blockSelector,!1)||i===e.oldValue)return;var o=t.attributes.find((function(t){return t.node===e.target}));if("IFRAME"===r.tagName&&"src"===e.attributeName&&!t.keepIframeSrcFn(i)){if(r.contentDocument)return;e.attributeName="rr_src"}if(o||(o={node:e.target,attributes:{}},t.attributes.push(o)),"style"===e.attributeName){var s=t.doc.createElement("span");e.oldValue&&s.setAttribute("style",e.oldValue),void 0!==o.attributes.style&&null!==o.attributes.style||(o.attributes.style={});for(var u=o.attributes.style,l=0,d=Array.from(r.style);l<d.length;l++){var f=d[l],p=r.style.getPropertyValue(f),m=r.style.getPropertyPriority(f);p===s.style.getPropertyValue(f)&&m===s.style.getPropertyPriority(f)||(u[f]=""===m?p:[p,m])}for(var g=0,y=Array.from(s.style);g<y.length;g++){var b=y[g];""===r.style.getPropertyValue(b)&&(u[b]=!1)}}else o.attributes[e.attributeName]=(0,a.We)(t.doc,r.tagName,e.attributeName,i);break;case"childList":if((0,c.IT)(e.target,t.blockClass,t.blockSelector,!0))return;e.addedNodes.forEach((function(n){return t.genAdds(n,e.target)})),e.removedNodes.forEach((function(n){var r=t.mirror.getId(n),i=(0,a.Zq)(e.target)?t.mirror.getId(e.target.host):t.mirror.getId(e.target);(0,c.IT)(e.target,t.blockClass,t.blockSelector,!1)||(0,c.WU)(n,t.mirror)||!(0,c.nF)(n,t.mirror)||(t.addedSet.has(n)?(v(t.addedSet,n),t.droppedSet.add(n)):t.addedSet.has(e.target)&&-1===r||(0,c.y5)(e.target,t.mirror)||(t.movedSet.has(n)&&t.movedMap[h(r,i)]?v(t.movedSet,n):t.removes.push({parentId:i,id:r,isShadow:!(!(0,a.Zq)(e.target)||!(0,a.DS)(e.target))||void 0})),t.mapRemoves.push(n))}))}},this.genAdds=function(e,n){if(!t.processedNodeManager.inOtherBuffer(e,t)){if(t.mirror.hasNode(e)){if((0,c.WU)(e,t.mirror))return;t.movedSet.add(e);var r=null;n&&t.mirror.hasNode(n)&&(r=t.mirror.getId(n)),r&&-1!==r&&(t.movedMap[h(t.mirror.getId(e),r)]=!0)}else t.addedSet.add(e),t.droppedSet.delete(e);(0,c.IT)(e,t.blockClass,t.blockSelector,!1)||(e.childNodes.forEach((function(e){return t.genAdds(e)})),(0,c.He)(e)&&e.shadowRoot.childNodes.forEach((function(n){t.processedNodeManager.add(n,t),t.genAdds(n,e)})))}}}return(0,i.Z)(e,[{key:"init",value:function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((function(n){t[n]=e[n]}))}},{key:"freeze",value:function(){this.frozen=!0,this.canvasManager.freeze()}},{key:"unfreeze",value:function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}},{key:"isFrozen",value:function(){return this.frozen}},{key:"lock",value:function(){this.locked=!0,this.canvasManager.lock()}},{key:"unlock",value:function(){this.locked=!1,this.canvasManager.unlock(),this.emit()}},{key:"reset",value:function(){this.shadowDomManager.reset(),this.canvasManager.reset()}}]),e}();function v(e,t){e.delete(t),t.childNodes.forEach((function(t){return v(e,t)}))}function m(e,t,n){return 0!==e.length&&g(e,t,n)}function g(e,t,n){var r=t.parentNode;if(!r)return!1;var i=n.getId(r);return!!e.some((function(e){return e.id===i}))||g(e,r,n)}function y(e,t){return 0!==e.size&&b(e,t)}function b(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||b(e,n))}var w=[],S=new(function(){function e(){(0,o.Z)(this,e),this.nodeMap=new WeakMap,this.periodicallyClear()}return(0,i.Z)(e,[{key:"periodicallyClear",value:function(){var e=this;requestAnimationFrame((function(){e.clear(),e.periodicallyClear()}))}},{key:"inOtherBuffer",value:function(e,t){var n=this.nodeMap.get(e);return n&&Array.from(n).some((function(e){return e!==t}))}},{key:"add",value:function(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}},{key:"clear",value:function(){this.nodeMap=new WeakMap}}]),e}());function I(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(n){return e.target}}function C(e,t){var n,r,i=new p;w.push(i),i.init(e);var o=window.MutationObserver||window.__rrMutationObserver,a=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");a&&window[a]&&(o=window[a]);var s=new o(i.processMutations.bind(i));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function k(e){var t=e.mouseInteractionCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.sampling;if(!1===a.mouseInteraction)return function(){};var s=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[];return Object.keys(l.Y2).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]})).forEach((function(e){var a=e.toLowerCase(),s=function(e){return function(n){var a=I(n);if(!(0,c.IT)(a,i,o,!0)){var s=(0,c.z6)(n)?n.changedTouches[0]:n;if(s){var u=r.getId(a),d=s.clientX,f=s.clientY;t({type:l.Y2[e],id:u,x:d,y:f})}}}}(e);u.push((0,c.on)(a,s,n))})),function(){u.forEach((function(e){return e()}))}}function E(e){var t=e.scrollCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.sampling,s=(0,c.P2)((function(e){var a=I(e);if(a&&!(0,c.IT)(a,i,o,!0)){var s=r.getId(a);if(a===n&&n.defaultView){var u=(0,c.$1)(n.defaultView);t({id:s,x:u.left,y:u.top})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}}),a.scroll||100);return(0,c.on)("scroll",s,n)}function x(e,t){var n=Object.assign({},e);return t||delete n.userTriggered,n}var A=["INPUT","TEXTAREA","SELECT"],M=new WeakMap;function T(e){return function(e,t){if(D("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||D("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||D("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||D("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){var r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function N(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function R(e,t){var n,r,i,o=e.mirror,a=e.stylesheetManager,s=null;s="#document"===t.nodeName?o.getId(t):o.getId(t.host);var u="#document"===t.nodeName?null===(n=t.defaultView)||void 0===n?void 0:n.Document:null===(i=null===(r=t.ownerDocument)||void 0===r?void 0:r.defaultView)||void 0===i?void 0:i.ShadowRoot,c=Object.getOwnPropertyDescriptor(null===u||void 0===u?void 0:u.prototype,"adoptedStyleSheets");return null!==s&&-1!==s&&u&&c?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:function(){var e;return null===(e=c.get)||void 0===e?void 0:e.call(this)},set:function(e){var t,n=null===(t=c.set)||void 0===t?void 0:t.call(this,e);if(null!==s&&-1!==s)try{a.adoptStyleSheets(e,s)}catch(r){}return n}}),function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}):function(){}}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.doc.defaultView;if(!n)return function(){};!function(e,t){var n=e.mutationCb,r=e.mousemoveCb,i=e.mouseInteractionCb,o=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb,u=e.mediaInteractionCb,c=e.styleSheetRuleCb,l=e.styleDeclarationCb,d=e.canvasMutationCb,f=e.fontCb,h=e.selectionCb;e.mutationCb=function(){t.mutation&&t.mutation.apply(t,arguments),n.apply(void 0,arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove.apply(t,arguments),r.apply(void 0,arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction.apply(t,arguments),i.apply(void 0,arguments)},e.scrollCb=function(){t.scroll&&t.scroll.apply(t,arguments),o.apply(void 0,arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize.apply(t,arguments),a.apply(void 0,arguments)},e.inputCb=function(){t.input&&t.input.apply(t,arguments),s.apply(void 0,arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction.apply(t,arguments),u.apply(void 0,arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule.apply(t,arguments),c.apply(void 0,arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration.apply(t,arguments),l.apply(void 0,arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation.apply(t,arguments),d.apply(void 0,arguments)},e.fontCb=function(){t.font&&t.font.apply(t,arguments),f.apply(void 0,arguments)},e.selectionCb=function(){t.selection&&t.selection.apply(t,arguments),h.apply(void 0,arguments)}}(e,t);var i,o=C(e,e.doc),d=function(e){var t=e.mousemoveCb,n=e.sampling,r=e.doc,i=e.mirror;if(!1===n.mousemove)return function(){};var o,a="number"===typeof n.mousemove?n.mousemove:50,s="number"===typeof n.mousemoveCallback?n.mousemoveCallback:500,u=[],d=(0,c.P2)((function(e){var n=Date.now()-o;t(u.map((function(e){return e.timeOffset-=n,e})),e),u=[],o=null}),s),f=(0,c.P2)((function(e){var t=I(e),n=(0,c.z6)(e)?e.changedTouches[0]:e,r=n.clientX,a=n.clientY;o||(o=Date.now()),u.push({x:r,y:a,id:i.getId(t),timeOffset:Date.now()-o}),d("undefined"!==typeof DragEvent&&e instanceof DragEvent?l.yh.Drag:e instanceof MouseEvent?l.yh.MouseMove:l.yh.TouchMove)}),a,{trailing:!1}),h=[(0,c.on)("mousemove",f,r),(0,c.on)("touchmove",f,r),(0,c.on)("drag",f,r)];return function(){h.forEach((function(e){return e()}))}}(e),f=k(e),h=E(e),p=function(e){var t=e.viewportResizeCb,n=-1,r=-1,i=(0,c.P2)((function(){var e=(0,c.gp)(),i=(0,c.fM)();n===e&&r===i||(t({width:Number(i),height:Number(e)}),n=e,r=i)}),200);return(0,c.on)("resize",i,window)}(e),v=function(e){var t=e.inputCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,s=e.ignoreClass,l=e.maskInputOptions,d=e.maskInputFn,f=e.sampling,h=e.userTriggeredOnInput;function p(e){var t=I(e),r=e.isTrusted;if(t&&"OPTION"===t.tagName&&(t=t.parentElement),t&&t.tagName&&!(A.indexOf(t.tagName)<0)&&!(0,c.IT)(t,i,o,!0)){var u=t.type;if(!t.classList.contains(s)){var f=t.value,p=!1;"radio"===u||"checkbox"===u?p=t.checked:(l[t.tagName.toLowerCase()]||l[u])&&(f=(0,a.wR)({maskInputOptions:l,tagName:t.tagName,type:u,value:f,maskInputFn:d})),v(t,x({text:f,isChecked:p,userTriggered:r},h));var m=t.name;"radio"===u&&m&&p&&n.querySelectorAll('input[type="radio"][name="'.concat(m,'"]')).forEach((function(e){e!==t&&v(e,x({text:e.value,isChecked:!p,userTriggered:!1},h))}))}}}function v(e,n){var i=M.get(e);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){M.set(e,n);var o=r.getId(e);t(Object.assign(Object.assign({},n),{id:o}))}}var m=("last"===f.input?["change"]:["input","change"]).map((function(e){return(0,c.on)(e,p,n)})),g=n.defaultView;if(!g)return function(){m.forEach((function(e){return e()}))};var y=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),b=[[g.HTMLInputElement.prototype,"value"],[g.HTMLInputElement.prototype,"checked"],[g.HTMLSelectElement.prototype,"value"],[g.HTMLTextAreaElement.prototype,"value"],[g.HTMLSelectElement.prototype,"selectedIndex"],[g.HTMLOptionElement.prototype,"selected"]];return y&&y.set&&m.push.apply(m,(0,u.Z)(b.map((function(e){return(0,c.yU)(e[0],e[1],{set:function(){p({target:this})}},!1,g)})))),function(){m.forEach((function(e){return e()}))}}(e),m=function(e){var t=e.mediaInteractionCb,n=e.blockClass,r=e.blockSelector,i=e.mirror,o=e.sampling,a=function(e){return(0,c.P2)((function(o){var a=I(o);if(a&&!(0,c.IT)(a,n,r,!0)){var s=a.currentTime,u=a.volume,l=a.muted,d=a.playbackRate;t({type:e,id:i.getId(a),currentTime:s,volume:u,muted:l,playbackRate:d})}}),o.media||500)},s=[(0,c.on)("play",a(0)),(0,c.on)("pause",a(1)),(0,c.on)("seeked",a(2)),(0,c.on)("volumechange",a(3)),(0,c.on)("ratechange",a(4))];return function(){s.forEach((function(e){return e()}))}}(e),g=function(e,t){var n=e.styleSheetRuleCb,r=e.mirror,i=e.stylesheetManager,o=t.win;if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return function(){};var a=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=function(e,t){var o=N(this,r,i.styleMirror),s=o.id,u=o.styleId;return(s&&-1!==s||u&&-1!==u)&&n({id:s,styleId:u,adds:[{rule:e,index:t}]}),a.apply(this,[e,t])};var c,l,d=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=function(e){var t=N(this,r,i.styleMirror),o=t.id,a=t.styleId;return(o&&-1!==o||a&&-1!==a)&&n({id:o,styleId:a,removes:[{index:e}]}),d.apply(this,[e])},o.CSSStyleSheet.prototype.replace&&(c=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=function(e){var t=N(this,r,i.styleMirror),o=t.id,a=t.styleId;return(o&&-1!==o||a&&-1!==a)&&n({id:o,styleId:a,replace:e}),c.apply(this,[e])}),o.CSSStyleSheet.prototype.replaceSync&&(l=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=function(e){var t=N(this,r,i.styleMirror),o=t.id,a=t.styleId;return(o&&-1!==o||a&&-1!==a)&&n({id:o,styleId:a,replaceSync:e}),l.apply(this,[e])});var f={};O("CSSGroupingRule")?f.CSSGroupingRule=o.CSSGroupingRule:(O("CSSMediaRule")&&(f.CSSMediaRule=o.CSSMediaRule),O("CSSConditionRule")&&(f.CSSConditionRule=o.CSSConditionRule),O("CSSSupportsRule")&&(f.CSSSupportsRule=o.CSSSupportsRule));var h={};return Object.entries(f).forEach((function(e){var t=(0,s.Z)(e,2),o=t[0],a=t[1];h[o]={insertRule:a.prototype.insertRule,deleteRule:a.prototype.deleteRule},a.prototype.insertRule=function(e,t){var a=N(this.parentStyleSheet,r,i.styleMirror),s=a.id,c=a.styleId;return(s&&-1!==s||c&&-1!==c)&&n({id:s,styleId:c,adds:[{rule:e,index:[].concat((0,u.Z)(T(this)),[t||0])}]}),h[o].insertRule.apply(this,[e,t])},a.prototype.deleteRule=function(e){var t=N(this.parentStyleSheet,r,i.styleMirror),a=t.id,s=t.styleId;return(a&&-1!==a||s&&-1!==s)&&n({id:a,styleId:s,removes:[{index:[].concat((0,u.Z)(T(this)),[e])}]}),h[o].deleteRule.apply(this,[e])}})),function(){o.CSSStyleSheet.prototype.insertRule=a,o.CSSStyleSheet.prototype.deleteRule=d,c&&(o.CSSStyleSheet.prototype.replace=c),l&&(o.CSSStyleSheet.prototype.replaceSync=l),Object.entries(f).forEach((function(e){var t=(0,s.Z)(e,2),n=t[0],r=t[1];r.prototype.insertRule=h[n].insertRule,r.prototype.deleteRule=h[n].deleteRule}))}}(e,{win:n}),y=R(e,e.doc),b=function(e,t){var n=e.styleDeclarationCb,r=e.mirror,i=e.ignoreCSSAttributes,o=e.stylesheetManager,a=t.win,s=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=function(e,t,a){var u;if(i.has(e))return s.apply(this,[e,t,a]);var c=N(null===(u=this.parentRule)||void 0===u?void 0:u.parentStyleSheet,r,o.styleMirror),l=c.id,d=c.styleId;return(l&&-1!==l||d&&-1!==d)&&n({id:l,styleId:d,set:{property:e,value:t,priority:a},index:T(this.parentRule)}),s.apply(this,[e,t,a])};var u=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=function(e){var t;if(i.has(e))return u.apply(this,[e]);var a=N(null===(t=this.parentRule)||void 0===t?void 0:t.parentStyleSheet,r,o.styleMirror),s=a.id,c=a.styleId;return(s&&-1!==s||c&&-1!==c)&&n({id:s,styleId:c,remove:{property:e},index:T(this.parentRule)}),u.apply(this,[e])},function(){a.CSSStyleDeclaration.prototype.setProperty=s,a.CSSStyleDeclaration.prototype.removeProperty=u}}(e,{win:n}),S=e.collectFonts?function(e){var t=e.fontCb,n=e.doc,r=n.defaultView;if(!r)return function(){};var i=[],o=new WeakMap,a=r.FontFace;r.FontFace=function(e,t,n){var r=new a(e,t,n);return o.set(r,{family:e,buffer:"string"!==typeof t,descriptors:n,fontSource:"string"===typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var s=(0,c.r$)(n.fonts,"add",(function(e){return function(n){return setTimeout((function(){var e=o.get(n);e&&(t(e),o.delete(n))}),0),e.apply(this,[n])}}));return i.push((function(){r.FontFace=a})),i.push(s),function(){i.forEach((function(e){return e()}))}}(e):function(){},_=function(e){var t=e.doc,n=e.mirror,r=e.blockClass,i=e.blockSelector,o=e.selectionCb,a=!0,s=function(){var e=t.getSelection();if(!(!e||a&&(null===e||void 0===e?void 0:e.isCollapsed))){a=e.isCollapsed||!1;for(var s=[],u=e.rangeCount||0,l=0;l<u;l++){var d=e.getRangeAt(l),f=d.startContainer,h=d.startOffset,p=d.endContainer,v=d.endOffset;(0,c.IT)(f,r,i,!0)||(0,c.IT)(p,r,i,!0)||s.push({start:n.getId(f),startOffset:h,end:n.getId(p),endOffset:v})}o({ranges:s})}};return s(),(0,c.on)("selectionchange",s)}(e),D=[],Z=(0,r.Z)(e.plugins);try{for(Z.s();!(i=Z.n()).done;){var L=i.value;D.push(L.observer(L.callback,n,L.options))}}catch(F){Z.e(F)}finally{Z.f()}return function(){w.forEach((function(e){return e.reset()})),o.disconnect(),d(),f(),h(),p(),v(),m(),g(),y(),b(),S(),_(),D.forEach((function(e){return e()}))}}function D(e){return"undefined"!==typeof window[e]}function O(e){return Boolean("undefined"!==typeof window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var Z=function(){function e(t){(0,o.Z)(this,e),this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}return(0,i.Z)(e,[{key:"getId",value:function(e,t,n,r){var i=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e),a=i.get(t);return a||(a=this.generateIdFn(),i.set(t,a),o.set(a,t)),a}},{key:"getIds",value:function(e,t){var n=this,r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getId(e,t,r,i)}))}},{key:"getRemoteId",value:function(e,t,n){var r=n||this.getRemoteIdToIdMap(e);if("number"!==typeof t)return t;var i=r.get(t);return i||-1}},{key:"getRemoteIds",value:function(e,t){var n=this,r=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getRemoteId(e,t,r)}))}},{key:"reset",value:function(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}},{key:"getIdToRemoteIdMap",value:function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}},{key:"getRemoteIdToIdMap",value:function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}]),e}(),L=function(){function e(t){(0,o.Z)(this,e),this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Z(a.Bu),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Z(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}return(0,i.Z)(e,[{key:"addIframe",value:function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}},{key:"addLoadListener",value:function(e){this.loadListener=e}},{key:"attachIframe",value:function(e,t){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}},{key:"handleMessage",value:function(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var n=this.crossOriginIframeMap.get(e.source);if(n){var r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}}}},{key:"transformCrossOriginEvent",value:function(e,t){var n,r=this;switch(t.type){case l.tw.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:l.tw.IncrementalSnapshot,data:{source:l.yh.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case l.tw.Meta:case l.tw.Load:case l.tw.DomContentLoaded:return!1;case l.tw.Plugin:return t;case l.tw.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case l.tw.IncrementalSnapshot:switch(t.data.source){case l.yh.Mutation:return t.data.adds.forEach((function(t){r.replaceIds(t,e,["parentId","nextId","previousId"]),r.replaceIdOnNode(t.node,e);var n=r.crossOriginIframeRootIdMap.get(e);n&&r.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((function(t){r.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((function(t){r.replaceIds(t,e,["id"])})),t.data.texts.forEach((function(t){r.replaceIds(t,e,["id"])})),t;case l.yh.Drag:case l.yh.TouchMove:case l.yh.MouseMove:return t.data.positions.forEach((function(t){r.replaceIds(t,e,["id"])})),t;case l.yh.ViewportResize:return!1;case l.yh.MediaInteraction:case l.yh.MouseInteraction:case l.yh.Scroll:case l.yh.CanvasMutation:case l.yh.Input:return this.replaceIds(t.data,e,["id"]),t;case l.yh.StyleSheetRule:case l.yh.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case l.yh.Font:return t;case l.yh.Selection:return t.data.ranges.forEach((function(t){r.replaceIds(t,e,["start","end"])})),t;case l.yh.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null===(n=t.data.styles)||void 0===n||n.forEach((function(t){r.replaceStyleIds(t,e,["styleId"])})),t}}}},{key:"replace",value:function(e,t,n,i){var o,a=(0,r.Z)(i);try{for(a.s();!(o=a.n()).done;){var s=o.value;(Array.isArray(t[s])||"number"===typeof t[s])&&(Array.isArray(t[s])?t[s]=e.getIds(n,t[s]):t[s]=e.getId(n,t[s]))}}catch(u){a.e(u)}finally{a.f()}return t}},{key:"replaceIds",value:function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}},{key:"replaceStyleIds",value:function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}},{key:"replaceIdOnNode",value:function(e,t){var n=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((function(e){n.replaceIdOnNode(e,t)}))}},{key:"patchRootIdOnNode",value:function(e,t){var n=this;e.type===a.Jq.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((function(e){n.patchRootIdOnNode(e,t)}))}}]),e}(),F=function(){function e(t){(0,o.Z)(this,e),this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}return(0,i.Z)(e,[{key:"init",value:function(){this.reset(),this.patchAttachShadow(Element,document)}},{key:"addShadowRoot",value:function(e,t){var n=this;if((0,a.DS)(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=C(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((function(){return r.disconnect()})),this.restoreHandlers.push(E(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout((function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&n.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,n.mirror.getId(e.host)),n.restoreHandlers.push(R({mirror:n.mirror,stylesheetManager:n.bypassOptions.stylesheetManager},e))}),0)}}},{key:"observeAttachShadow",value:function(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}},{key:"patchAttachShadow",value:function(e,t){var n=this;this.restoreHandlers.push((0,c.r$)(e.prototype,"attachShadow",(function(e){return function(r){var i=e.call(this,r);return this.shadowRoot&&(0,c._f)(this)&&n.addShadowRoot(this.shadowRoot,t),i}})))}},{key:"reset",value:function(){this.restoreHandlers.forEach((function(e){try{e()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}]),e}(),V=n(4165),B=n(3246),P=n(3464),j=new Map;var W=function(e,t,n){if(e&&(G(e,t)||"object"===typeof e)){var r=function(e,t){var n=j.get(e);return n||(n=new Map,j.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),i=r.indexOf(e);return-1===i&&(i=r.length,r.push(e)),i}};function U(e,t,n){if(e instanceof Array)return e.map((function(e){return U(e,t,n)}));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:(0,P.c)(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[U(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement)return{rr_type:e.constructor.name,src:e.src};if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[U(e.data,t,n),e.width,e.height]}:G(e,t)||"object"===typeof e?{rr_type:e.constructor.name,index:W(e,t,n)}:e}var H=function(e,t,n){return(0,u.Z)(e).map((function(e){return U(e,t,n)}))},G=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((function(e){return"function"===typeof t[e]}));return Boolean(n.find((function(n){return e instanceof t[n]})))};function z(e,t,n){var r=[];try{var i=(0,c.r$)(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(r){(0,c.IT)(this,t,n,!0)||"__context"in this||(this.__context=r);for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return e.apply(this,[r].concat(o))}}));r.push(i)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){r.forEach((function(e){return e()}))}}function q(e,t,n,i,o,a,s){var u,l=[],d=Object.getOwnPropertyNames(e),f=(0,r.Z)(d);try{var h=function(){var r=u.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(r))return 0;try{if("function"!==typeof e[r])return 0;var a=(0,c.r$)(e,r,(function(e){return function(){for(var a=arguments.length,u=new Array(a),l=0;l<a;l++)u[l]=arguments[l];var d=e.apply(this,u);if(W(d,s,this),!(0,c.IT)(this.canvas,i,o,!0)){var f=H([].concat(u),s,this),h={type:t,property:r,args:f};n(this.canvas,h)}return d}}));l.push(a)}catch(f){var d=(0,c.yU)(e,r,{set:function(e){n(this.canvas,{type:t,property:r,args:[e],setter:!0})}});l.push(d)}};for(f.s();!(u=f.n()).done;)h()}catch(p){f.e(p)}finally{f.f()}return l}var Y=null;try{var Q="undefined"!==typeof module&&"function"===typeof module.require&&module.require("worker_threads")||"function"===typeof require&&require("worker_threads")||"function"===typeof require&&require("worker_threads");Y=Q.Worker}catch(he){}function K(e,t,n){var r=void 0===t?null:t,i=function(e,t){return Buffer.from(e,"base64").toString(t?"utf16":"utf8")}(e,void 0!==n&&n),o=i.indexOf("\n",10)+1,a=i.substring(o)+(r?"//# sourceMappingURL="+r:"");return function(e){return new Y(a,Object.assign({},e,{eval:!0}))}}function X(e,t,n){var r=void 0===t?null:t,i=function(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),i=0,o=n.length;i<o;++i)r[i]=n.charCodeAt(i);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}(e,void 0!==n&&n),o=i.indexOf("\n",10)+1,a=i.substring(o)+(r?"//# sourceMappingURL="+r:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}var J="[object process]"===Object.prototype.toString.call("undefined"!==typeof process?process:0);var $,ee,te,ne,re,ie,oe=($="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",ee=null,te=!1,J?K($,ee,te):function(e,t,n){var r;return function(i){return r=r||X(e,t,n),new Worker(r,i)}}($,ee,te)),ae=function(){function e(t){var n=this;(0,o.Z)(this,e),this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(e,t){!(n.rafStamps.invokeId&&n.rafStamps.latestId!==n.rafStamps.invokeId)&&n.rafStamps.invokeId||(n.rafStamps.invokeId=n.rafStamps.latestId),n.pendingCanvasMutations.has(e)||n.pendingCanvasMutations.set(e,[]),n.pendingCanvasMutations.get(e).push(t)};var r=t.sampling,i=void 0===r?"all":r,a=t.win,s=t.blockClass,u=t.blockSelector,c=t.recordCanvas,l=t.dataURLOptions;this.mutationCb=t.mutationCb,this.mirror=t.mirror,c&&"all"===i&&this.initCanvasMutationObserver(a,s,u),c&&"number"===typeof i&&this.initCanvasFPSObserver(i,a,s,u,{dataURLOptions:l})}return(0,i.Z)(e,[{key:"reset",value:function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}},{key:"freeze",value:function(){this.frozen=!0}},{key:"unfreeze",value:function(){this.frozen=!1}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"initCanvasFPSObserver",value:function(e,t,n,r,i){var o=this,a=z(t,n,r),s=new Map,u=new oe;u.onmessage=function(e){var t=e.data.id;if(s.set(t,!1),"base64"in e.data){var n=e.data,r=n.base64,i=n.type,a=n.width,u=n.height;o.mutationCb({id:t,type:l.FX["2D"],commands:[{property:"clearRect",args:[0,0,a,u]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}]})}};var d,f=1e3/e,h=0;d=requestAnimationFrame((function e(a){h&&a-h<f||(h=a,function(){var e=[];return t.document.querySelectorAll("canvas").forEach((function(t){(0,c.IT)(t,n,r,!0)||e.push(t)})),e}().forEach((function(e){return(0,B.m)(o,void 0,void 0,(0,V.Z)().mark((function t(){var n,r,o,a;return(0,V.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.mirror.getId(e),!s.get(r)){t.next=3;break}return t.abrupt("return");case 3:return s.set(r,!0),["webgl","webgl2"].includes(e.__context)&&(o=e.getContext(e.__context),!1===(null===(n=null===o||void 0===o?void 0:o.getContextAttributes())||void 0===n?void 0:n.preserveDrawingBuffer)&&(null===o||void 0===o||o.clear(o.COLOR_BUFFER_BIT))),t.next=7,createImageBitmap(e);case 7:a=t.sent,u.postMessage({id:r,bitmap:a,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[a]);case 9:case"end":return t.stop()}}),t,this)})))}))),d=requestAnimationFrame(e)})),this.resetObservers=function(){a(),cancelAnimationFrame(d)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var i=z(e,t,n),o=function(e,t,n,i){var o,a=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),u=(0,r.Z)(s);try{var d=function(){var r=o.value;try{if("function"!==typeof t.CanvasRenderingContext2D.prototype[r])return 1;var s=(0,c.r$)(t.CanvasRenderingContext2D.prototype,r,(function(o){return function(){for(var a=this,s=arguments.length,u=new Array(s),d=0;d<s;d++)u[d]=arguments[d];return(0,c.IT)(this.canvas,n,i,!0)||setTimeout((function(){var n=H([].concat(u),t,a);e(a.canvas,{type:l.FX["2D"],property:r,args:n})}),0),o.apply(this,u)}}));a.push(s)}catch(d){var u=(0,c.yU)(t.CanvasRenderingContext2D.prototype,r,{set:function(t){e(this.canvas,{type:l.FX["2D"],property:r,args:[t],setter:!0})}});a.push(u)}};for(u.s();!(o=u.n()).done;)d()}catch(f){u.e(f)}finally{u.f()}return function(){a.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n),a=function(e,t,n,r,i){var o=[];return o.push.apply(o,(0,u.Z)(q(t.WebGLRenderingContext.prototype,l.FX.WebGL,e,n,r,0,t))),"undefined"!==typeof t.WebGL2RenderingContext&&o.push.apply(o,(0,u.Z)(q(t.WebGL2RenderingContext.prototype,l.FX.WebGL2,e,n,r,0,t))),function(){o.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n,this.mirror);this.resetObservers=function(){i(),o(),a()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"startRAFTimestamping",value:function(){var e=this;requestAnimationFrame((function t(n){e.rafStamps.latestId=n,requestAnimationFrame(t)}))}},{key:"flushPendingCanvasMutations",value:function(){var e=this;this.pendingCanvasMutations.forEach((function(t,n){var r=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,r)})),requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"flushPendingCanvasMutationFor",value:function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var r=n.map((function(e){return(0,B._)(e,["type"])})),i=n[0].type;this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}}}}]),e}(),se=function(){function e(t){(0,o.Z)(this,e),this.trackedLinkElements=new WeakSet,this.styleMirror=new c.ug,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}return(0,i.Z)(e,[{key:"attachLinkElement",value:function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}},{key:"trackLinkElement",value:function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}},{key:"adoptStyleSheets",value:function(e,t){if(0!==e.length){var n,i={id:t,styleIds:[]},o=[],s=(0,r.Z)(e);try{for(s.s();!(n=s.n()).done;){var u=n.value,c=void 0;if(this.styleMirror.has(u))c=this.styleMirror.getId(u);else{c=this.styleMirror.add(u);var l=Array.from(u.rules||CSSRule);o.push({styleId:c,rules:l.map((function(e,t){return{rule:(0,a.LS)(e),index:t}}))})}i.styleIds.push(c)}}catch(d){s.e(d)}finally{s.f()}o.length>0&&(i.styles=o),this.adoptedStyleSheetCb(i)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),e}();function ue(e){return Object.assign(Object.assign({},e),{timestamp:Date.now()})}var ce=!1,le=(0,a.bZ)();function de(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.emit,n=e.checkoutEveryNms,i=e.checkoutEveryNth,o=e.blockClass,s=void 0===o?"rr-block":o,u=e.blockSelector,d=void 0===u?null:u,f=e.ignoreClass,h=void 0===f?"rr-ignore":f,p=e.maskTextClass,v=void 0===p?"rr-mask":p,m=e.maskTextSelector,g=void 0===m?null:m,y=e.inlineStylesheet,b=void 0===y||y,I=e.maskAllInputs,C=e.maskInputOptions,k=e.slimDOMOptions,E=e.maskInputFn,x=e.maskTextFn,A=e.hooks,M=e.packFn,T=e.sampling,N=void 0===T?{}:T,R=e.dataURLOptions,D=void 0===R?{}:R,O=e.mousemoveWait,Z=e.recordCanvas,V=void 0!==Z&&Z,B=e.recordCrossOriginIframes,P=void 0!==B&&B,j=e.recordAfter,W=void 0===j?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":j,U=e.userTriggeredOnInput,H=void 0!==U&&U,G=e.collectFonts,z=void 0!==G&&G,q=e.inlineImages,Y=void 0!==q&&q,Q=e.plugins,K=e.keepIframeSrcFn,X=void 0===K?function(){return!1}:K,J=e.ignoreCSSAttributes,$=void 0===J?new Set([]):J,ee=!P||window.parent===window,te=!1;if(!ee)try{window.parent.document,te=!1}catch(he){te=!0}if(ee&&!t)throw new Error("emit function is required");void 0!==O&&void 0===N.mousemove&&(N.mousemove=O),le.reset();var oe,de=!0===I?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==C?C:{password:!0},fe=!0===k||"all"===k?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===k,headMetaDescKeywords:"all"===k}:k||{};(0,c.OK)();var pe=0,ve=function(e){var t,n=(0,r.Z)(Q||[]);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.eventProcessor&&(e=i.eventProcessor(e))}}catch(o){n.e(o)}finally{n.f()}return M&&!te&&(e=M(e)),e};ne=function(e,r){var o;if(!(null===(o=w[0])||void 0===o?void 0:o.isFrozen())||e.type===l.tw.FullSnapshot||e.type===l.tw.IncrementalSnapshot&&e.data.source===l.yh.Mutation||w.forEach((function(e){return e.unfreeze()})),ee)null===t||void 0===t||t(ve(e),r);else if(te){var a={type:"rrweb",event:ve(e),origin:window.location.origin,isCheckout:r};window.parent.postMessage(a,"*")}if(e.type===l.tw.FullSnapshot)oe=e,pe=0;else if(e.type===l.tw.IncrementalSnapshot){if(e.data.source===l.yh.Mutation&&e.data.isAttachIframe)return;pe++;var s=i&&pe>=i,u=n&&e.timestamp-oe.timestamp>n;(s||u)&&re(!0)}};var me,ge=function(e){ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Mutation},e)}))},ye=function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Scroll},e)}))},be=function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.CanvasMutation},e)}))},we=new se({mutationCb:ge,adoptedStyleSheetCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.AdoptedStyleSheet},e)}))}}),Se=new L({mirror:le,mutationCb:ge,stylesheetManager:we,recordCrossOriginIframes:P,wrappedEmit:ne}),Ie=(0,r.Z)(Q||[]);try{for(Ie.s();!(me=Ie.n()).done;){var Ce=me.value;Ce.getMirror&&Ce.getMirror({nodeMirror:le,crossOriginIframeMirror:Se.crossOriginIframeMirror,crossOriginIframeStyleMirror:Se.crossOriginIframeStyleMirror})}}catch(Me){Ie.e(Me)}finally{Ie.f()}ie=new ae({recordCanvas:V,mutationCb:be,win:window,blockClass:s,blockSelector:d,mirror:le,sampling:N.canvas,dataURLOptions:D});var ke=new F({mutationCb:ge,scrollCb:ye,bypassOptions:{blockClass:s,blockSelector:d,maskTextClass:v,maskTextSelector:g,inlineStylesheet:b,maskInputOptions:de,dataURLOptions:D,maskTextFn:x,maskInputFn:E,recordCanvas:V,inlineImages:Y,sampling:N,slimDOMOptions:fe,iframeManager:Se,stylesheetManager:we,canvasManager:ie,keepIframeSrcFn:X,processedNodeManager:S},mirror:le});re=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];ne(ue({type:l.tw.Meta,data:{href:window.location.href,width:(0,c.fM)(),height:(0,c.gp)()}}),e),we.reset(),ke.init(),w.forEach((function(e){return e.lock()}));var t=(0,a.CO)(document,{mirror:le,blockClass:s,blockSelector:d,maskTextClass:v,maskTextSelector:g,inlineStylesheet:b,maskAllInputs:de,maskTextFn:x,slimDOM:fe,dataURLOptions:D,recordCanvas:V,inlineImages:Y,onSerialize:function(e){(0,c.Cj)(e,le)&&Se.addIframe(e),(0,c.qs)(e,le)&&we.trackLinkElement(e),(0,c.He)(e)&&ke.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){Se.attachIframe(e,t),ke.observeAttachShadow(e)},onStylesheetLoad:function(e,t){we.attachLinkElement(e,t)},keepIframeSrcFn:X});if(!t)return console.warn("Failed to snapshot the document");ne(ue({type:l.tw.FullSnapshot,data:{node:t,initialOffset:(0,c.$1)(window)}})),w.forEach((function(e){return e.unlock()})),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&we.adoptStyleSheets(document.adoptedStyleSheets,le.getId(document))};try{var Ee=[],xe=function(e){var t;return _({mutationCb:ge,mousemoveCb:function(e,t){return ne(ue({type:l.tw.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.MouseInteraction},e)}))},scrollCb:ye,viewportResizeCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.ViewportResize},e)}))},inputCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Input},e)}))},mediaInteractionCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.StyleDeclaration},e)}))},canvasMutationCb:be,fontCb:function(e){return ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Font},e)}))},selectionCb:function(e){ne(ue({type:l.tw.IncrementalSnapshot,data:Object.assign({source:l.yh.Selection},e)}))},blockClass:s,ignoreClass:h,maskTextClass:v,maskTextSelector:g,maskInputOptions:de,inlineStylesheet:b,sampling:N,recordCanvas:V,inlineImages:Y,userTriggeredOnInput:H,collectFonts:z,doc:e,maskInputFn:E,maskTextFn:x,keepIframeSrcFn:X,blockSelector:d,slimDOMOptions:fe,dataURLOptions:D,mirror:le,iframeManager:Se,stylesheetManager:we,shadowDomManager:ke,processedNodeManager:S,canvasManager:ie,ignoreCSSAttributes:$,plugins:(null===(t=null===Q||void 0===Q?void 0:Q.filter((function(e){return e.observer})))||void 0===t?void 0:t.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return ne(ue({type:l.tw.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[]},A)};Se.addLoadListener((function(e){try{Ee.push(xe(e.contentDocument))}catch(t){console.warn(t)}}));var Ae=function(){re(),Ee.push(xe(document)),ce=!0};return"interactive"===document.readyState||"complete"===document.readyState?Ae():(Ee.push((0,c.on)("DOMContentLoaded",(function(){ne(ue({type:l.tw.DomContentLoaded,data:{}})),"DOMContentLoaded"===W&&Ae()}))),Ee.push((0,c.on)("load",(function(){ne(ue({type:l.tw.Load,data:{}})),"load"===W&&Ae()}),window))),function(){Ee.forEach((function(e){return e()})),ce=!1}}catch(Te){console.warn(Te)}}de.addCustomEvent=function(e,t){if(!ce)throw new Error("please add custom event after start recording");ne(ue({type:l.tw.Custom,data:{tag:e,payload:t}}))},de.freezePage=function(){w.forEach((function(e){return e.freeze()}))},de.takeFullSnapshot=function(e){if(!ce)throw new Error("please take full snapshot after start recording");re(e)},de.mirror=le;var fe=(0,i.Z)((function e(t){var n=this;(0,o.Z)(this,e),this.logNativeMutationObserver=!1,this.stopRRWebRecording=function(){},this.eventHandler=void 0,this.currentURL=void 0,this.start=function(){n.stopRRWebRecording=de({emit:n.eventHandler,sampling:{mousemove:!1},userTriggeredOnInput:!0}),n.logNativeMutationObserver&&n.selfObserve(),n.startURLObserver()},this.stop=function(){n.stopRRWebRecording()},this.startURLObserver=function(){window.addEventListener("popstate",(function(e){n.onURLChange()})),window.addEventListener("locationchange",(function(e){n.onURLChange()})),window.addEventListener("hashchange",(function(e){n.onURLChange()}));var e=n,t=window.history.pushState;window.history.pushState=function(){return e.onURLChange(),t.apply(window.history,arguments)};var r=window.history.replaceState;window.history.replaceState=function(){return e.onURLChange(),r.apply(window.history,arguments)}},this.onURLChange=function(){setTimeout((function(){var e=window.location.href;if(e!==n.currentURL){n.currentURL=e;try{de.addCustomEvent("url-change",{url:e})}catch(he){}}}))},this.selfObserve=function(){var e=document.getElementsByTagName("body");new MutationObserver((function(e,t){var n,i=(0,r.Z)(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;"childList"===o.type?console.log("A child node has been added or removed.",o):"attributes"===o.type&&console.log("The ".concat(o.attributeName," attribute was modified."),o)}}catch(a){i.e(a)}finally{i.f()}})).observe(e[0],{attributes:!0,childList:!0,subtree:!0})},this.getNodeById=function(e){return de.mirror.getNode(e)},this.getMeta=function(e){return de.mirror.getMeta(e)},this.eventHandler=t,this.currentURL=window.location.href}))},6301:function(e){e.exports=function(e){return new Promise((function(t){return setTimeout(t,e)}))}},763:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=16,c=32,l=64,d=128,f=256,h=1/0,p=9007199254740991,v=NaN,m=4294967295,g=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",u],["flip",512],["partial",c],["partialRight",l],["rearg",f]],y="[object Arguments]",b="[object Array]",w="[object Boolean]",S="[object Date]",I="[object Error]",C="[object Function]",k="[object GeneratorFunction]",E="[object Map]",x="[object Number]",A="[object Object]",M="[object Promise]",T="[object RegExp]",N="[object Set]",R="[object String]",_="[object Symbol]",D="[object WeakMap]",O="[object ArrayBuffer]",Z="[object DataView]",L="[object Float32Array]",F="[object Float64Array]",V="[object Int8Array]",B="[object Int16Array]",P="[object Int32Array]",j="[object Uint8Array]",W="[object Uint8ClampedArray]",U="[object Uint16Array]",H="[object Uint32Array]",G=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,Q=/[&<>"']/g,K=RegExp(Y.source),X=RegExp(Q.source),J=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ie.source),ae=/^\s+/,se=/\s/,ue=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ve=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,Se=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ie=/($^)/,Ce=/['\n\r\u2028\u2029\\]/g,ke="\\ud800-\\udfff",Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xe="\\u2700-\\u27bf",Ae="a-z\\xdf-\\xf6\\xf8-\\xff",Me="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Ne="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Re="['\u2019]",_e="["+ke+"]",De="["+Ne+"]",Oe="["+Ee+"]",Ze="\\d+",Le="["+xe+"]",Fe="["+Ae+"]",Ve="[^"+ke+Ne+Ze+xe+Ae+Me+"]",Be="\\ud83c[\\udffb-\\udfff]",Pe="[^"+ke+"]",je="(?:\\ud83c[\\udde6-\\uddff]){2}",We="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Me+"]",He="\\u200d",Ge="(?:"+Fe+"|"+Ve+")",ze="(?:"+Ue+"|"+Ve+")",qe="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ye="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Qe="(?:"+Oe+"|"+Be+")"+"?",Ke="["+Te+"]?",Xe=Ke+Qe+("(?:"+He+"(?:"+[Pe,je,We].join("|")+")"+Ke+Qe+")*"),Je="(?:"+[Le,je,We].join("|")+")"+Xe,$e="(?:"+[Pe+Oe+"?",Oe,je,We,_e].join("|")+")",et=RegExp(Re,"g"),tt=RegExp(Oe,"g"),nt=RegExp(Be+"(?="+Be+")|"+$e+Xe,"g"),rt=RegExp([Ue+"?"+Fe+"+"+qe+"(?="+[De,Ue,"$"].join("|")+")",ze+"+"+Ye+"(?="+[De,Ue+Ge,"$"].join("|")+")",Ue+"?"+Ge+"+"+qe,Ue+"+"+Ye,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ze,Je].join("|"),"g"),it=RegExp("["+He+ke+Ee+Te+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,at=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],st=-1,ut={};ut[L]=ut[F]=ut[V]=ut[B]=ut[P]=ut[j]=ut[W]=ut[U]=ut[H]=!0,ut[y]=ut[b]=ut[O]=ut[w]=ut[Z]=ut[S]=ut[I]=ut[C]=ut[E]=ut[x]=ut[A]=ut[T]=ut[N]=ut[R]=ut[D]=!1;var ct={};ct[y]=ct[b]=ct[O]=ct[Z]=ct[w]=ct[S]=ct[L]=ct[F]=ct[V]=ct[B]=ct[P]=ct[E]=ct[x]=ct[A]=ct[T]=ct[N]=ct[R]=ct[_]=ct[j]=ct[W]=ct[U]=ct[H]=!0,ct[I]=ct[C]=ct[D]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dt=parseFloat,ft=parseInt,ht="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,pt="object"==typeof self&&self&&self.Object===Object&&self,vt=ht||pt||Function("return this")(),mt=t&&!t.nodeType&&t,gt=mt&&e&&!e.nodeType&&e,yt=gt&>.exports===mt,bt=yt&&ht.process,wt=function(){try{var e=gt&>.require&>.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(t){}}(),St=wt&&wt.isArrayBuffer,It=wt&&wt.isDate,Ct=wt&&wt.isMap,kt=wt&&wt.isRegExp,Et=wt&&wt.isSet,xt=wt&&wt.isTypedArray;function At(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Mt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Nt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Rt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function _t(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Dt(e,t){return!!(null==e?0:e.length)&&Ut(e,t,0)>-1}function Ot(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Zt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Lt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Ft(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Vt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Pt=qt("length");function jt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Wt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Ut(e,t,n){return t===t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Wt(e,Gt,n)}function Ht(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Gt(e){return e!==e}function zt(e,t){var n=null==e?0:e.length;return n?Kt(e,t)/n:v}function qt(e){return function(t){return null==t?i:t[e]}}function Yt(e){return function(t){return null==e?i:e[t]}}function Qt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Kt(e,t){for(var n,r=-1,o=e.length;++r<o;){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function Xt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Jt(e){return e?e.slice(0,mn(e)+1).replace(ae,""):e}function $t(e){return function(t){return e(t)}}function en(e,t){return Zt(t,(function(t){return e[t]}))}function tn(e,t){return e.has(t)}function nn(e,t){for(var n=-1,r=e.length;++n<r&&Ut(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length;n--&&Ut(t,e[n],0)>-1;);return n}var on=Yt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),an=Yt({"&":"&","<":"<",">":">",'"':""","'":"'"});function sn(e){return"\\"+lt[e]}function un(e){return it.test(e)}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function ln(e,t){return function(n){return e(t(n))}}function dn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,o[i++]=n)}return o}function fn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function hn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function pn(e){return un(e)?function(e){var t=nt.lastIndex=0;for(;nt.test(e);)++t;return t}(e):Pt(e)}function vn(e){return un(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.split("")}(e)}function mn(e){for(var t=e.length;t--&&se.test(e.charAt(t)););return t}var gn=Yt({"&":"&","<":"<",">":">",""":'"',"'":"'"});var yn=function e(t){var n=(t=null==t?vt:yn.defaults(vt.Object(),t,yn.pick(vt,at))).Array,r=t.Date,se=t.Error,ke=t.Function,Ee=t.Math,xe=t.Object,Ae=t.RegExp,Me=t.String,Te=t.TypeError,Ne=n.prototype,Re=ke.prototype,_e=xe.prototype,De=t["__core-js_shared__"],Oe=Re.toString,Ze=_e.hasOwnProperty,Le=0,Fe=function(){var e=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ve=_e.toString,Be=Oe.call(xe),Pe=vt._,je=Ae("^"+Oe.call(Ze).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),We=yt?t.Buffer:i,Ue=t.Symbol,He=t.Uint8Array,Ge=We?We.allocUnsafe:i,ze=ln(xe.getPrototypeOf,xe),qe=xe.create,Ye=_e.propertyIsEnumerable,Qe=Ne.splice,Ke=Ue?Ue.isConcatSpreadable:i,Xe=Ue?Ue.iterator:i,Je=Ue?Ue.toStringTag:i,$e=function(){try{var e=fo(xe,"defineProperty");return e({},"",{}),e}catch(t){}}(),nt=t.clearTimeout!==vt.clearTimeout&&t.clearTimeout,it=r&&r.now!==vt.Date.now&&r.now,lt=t.setTimeout!==vt.setTimeout&&t.setTimeout,ht=Ee.ceil,pt=Ee.floor,mt=xe.getOwnPropertySymbols,gt=We?We.isBuffer:i,bt=t.isFinite,wt=Ne.join,Pt=ln(xe.keys,xe),Yt=Ee.max,bn=Ee.min,wn=r.now,Sn=t.parseInt,In=Ee.random,Cn=Ne.reverse,kn=fo(t,"DataView"),En=fo(t,"Map"),xn=fo(t,"Promise"),An=fo(t,"Set"),Mn=fo(t,"WeakMap"),Tn=fo(xe,"create"),Nn=Mn&&new Mn,Rn={},_n=Vo(kn),Dn=Vo(En),On=Vo(xn),Zn=Vo(An),Ln=Vo(Mn),Fn=Ue?Ue.prototype:i,Vn=Fn?Fn.valueOf:i,Bn=Fn?Fn.toString:i;function Pn(e){if(ts(e)&&!Ha(e)&&!(e instanceof Hn)){if(e instanceof Un)return e;if(Ze.call(e,"__wrapped__"))return Bo(e)}return new Un(e)}var jn=function(){function e(){}return function(t){if(!es(t))return{};if(qe)return qe(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Wn(){}function Un(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Hn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new qn;++t<n;)this.add(e[t])}function Qn(e){var t=this.__data__=new zn(e);this.size=t.size}function Kn(e,t){var n=Ha(e),r=!n&&Ua(e),i=!n&&!r&&Ya(e),o=!n&&!r&&!i&&cs(e),a=n||r||i||o,s=a?Xt(e.length,Me):[],u=s.length;for(var c in e)!t&&!Ze.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bo(c,u))||s.push(c);return s}function Xn(e){var t=e.length;return t?e[Yr(0,t-1)]:i}function Jn(e,t){return Zo(Ti(e),sr(t,0,e.length))}function $n(e){return Zo(Ti(e))}function er(e,t,n){(n!==i&&!Pa(e[t],n)||n===i&&!(t in e))&&or(e,t,n)}function tr(e,t,n){var r=e[t];Ze.call(e,t)&&Pa(r,n)&&(n!==i||t in e)||or(e,t,n)}function nr(e,t){for(var n=e.length;n--;)if(Pa(e[n][0],t))return n;return-1}function rr(e,t,n,r){return fr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function ir(e,t){return e&&Ni(t,Rs(t),e)}function or(e,t,n){"__proto__"==t&&$e?$e(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ar(e,t){for(var r=-1,o=t.length,a=n(o),s=null==e;++r<o;)a[r]=s?i:xs(e,t[r]);return a}function sr(e,t,n){return e===e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function ur(e,t,n,r,o,a){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=o?n(e,r,o,a):n(e)),s!==i)return s;if(!es(e))return e;var d=Ha(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Ze.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return Ti(e,s)}else{var f=vo(e),h=f==C||f==k;if(Ya(e))return Ci(e,u);if(f==A||f==y||h&&!o){if(s=c||h?{}:go(e),!u)return c?function(e,t){return Ni(e,po(e),t)}(e,function(e,t){return e&&Ni(t,_s(t),e)}(s,e)):function(e,t){return Ni(e,ho(e),t)}(e,ir(s,e))}else{if(!ct[f])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case O:return ki(e);case w:case S:return new r(+e);case Z:return function(e,t){var n=t?ki(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case L:case F:case V:case B:case P:case j:case W:case U:case H:return Ei(e,n);case E:return new r;case x:case R:return new r(e);case T:return function(e){var t=new e.constructor(e.source,ve.exec(e));return t.lastIndex=e.lastIndex,t}(e);case N:return new r;case _:return i=e,Vn?xe(Vn.call(i)):{}}var i}(e,f,u)}}a||(a=new Qn);var p=a.get(e);if(p)return p;a.set(e,s),as(e)?e.forEach((function(r){s.add(ur(r,t,n,r,e,a))})):ns(e)&&e.forEach((function(r,i){s.set(i,ur(r,t,n,i,e,a))}));var v=d?i:(l?c?io:ro:c?_s:Rs)(e);return Tt(v||e,(function(r,i){v&&(r=e[i=r]),tr(s,i,ur(r,t,n,i,e,a))})),s}function cr(e,t,n){var r=n.length;if(null==e)return!r;for(e=xe(e);r--;){var o=n[r],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function lr(e,t,n){if("function"!=typeof e)throw new Te(o);return Ro((function(){e.apply(i,n)}),t)}function dr(e,t,n,r){var i=-1,o=Dt,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=Zt(t,$t(n))),r?(o=Ot,a=!1):t.length>=200&&(o=tn,a=!1,t=new Yn(t));e:for(;++i<s;){var l=e[i],d=null==n?l:n(l);if(l=r||0!==l?l:0,a&&d===d){for(var f=c;f--;)if(t[f]===d)continue e;u.push(l)}else o(t,d,r)||u.push(l)}return u}Pn.templateSettings={escape:J,evaluate:$,interpolate:ee,variable:"",imports:{_:Pn}},Pn.prototype=Wn.prototype,Pn.prototype.constructor=Pn,Un.prototype=jn(Wn.prototype),Un.prototype.constructor=Un,Hn.prototype=jn(Wn.prototype),Hn.prototype.constructor=Hn,Gn.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},Gn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Gn.prototype.get=function(e){var t=this.__data__;if(Tn){var n=t[e];return n===a?i:n}return Ze.call(t,e)?t[e]:i},Gn.prototype.has=function(e){var t=this.__data__;return Tn?t[e]!==i:Ze.call(t,e)},Gn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Tn&&t===i?a:t,this},zn.prototype.clear=function(){this.__data__=[],this.size=0},zn.prototype.delete=function(e){var t=this.__data__,n=nr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Qe.call(t,n,1),--this.size,!0)},zn.prototype.get=function(e){var t=this.__data__,n=nr(t,e);return n<0?i:t[n][1]},zn.prototype.has=function(e){return nr(this.__data__,e)>-1},zn.prototype.set=function(e,t){var n=this.__data__,r=nr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(En||zn),string:new Gn}},qn.prototype.delete=function(e){var t=co(this,e).delete(e);return this.size-=t?1:0,t},qn.prototype.get=function(e){return co(this,e).get(e)},qn.prototype.has=function(e){return co(this,e).has(e)},qn.prototype.set=function(e,t){var n=co(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(e){return this.__data__.set(e,a),this},Yn.prototype.has=function(e){return this.__data__.has(e)},Qn.prototype.clear=function(){this.__data__=new zn,this.size=0},Qn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Qn.prototype.get=function(e){return this.__data__.get(e)},Qn.prototype.has=function(e){return this.__data__.has(e)},Qn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof zn){var r=n.__data__;if(!En||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new qn(r)}return n.set(e,t),this.size=n.size,this};var fr=Di(wr),hr=Di(Sr,!0);function pr(e,t){var n=!0;return fr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function vr(e,t,n){for(var r=-1,o=e.length;++r<o;){var a=e[r],s=t(a);if(null!=s&&(u===i?s===s&&!us(s):n(s,u)))var u=s,c=a}return c}function mr(e,t){var n=[];return fr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function gr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=yo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?gr(s,t-1,n,r,i):Lt(i,s):r||(i[i.length]=s)}return i}var yr=Oi(),br=Oi(!0);function wr(e,t){return e&&yr(e,t,Rs)}function Sr(e,t){return e&&br(e,t,Rs)}function Ir(e,t){return _t(t,(function(t){return Xa(e[t])}))}function Cr(e,t){for(var n=0,r=(t=bi(t,e)).length;null!=e&&n<r;)e=e[Fo(t[n++])];return n&&n==r?e:i}function kr(e,t,n){var r=t(e);return Ha(e)?r:Lt(r,n(e))}function Er(e){return null==e?e===i?"[object Undefined]":"[object Null]":Je&&Je in xe(e)?function(e){var t=Ze.call(e,Je),n=e[Je];try{e[Je]=i;var r=!0}catch(a){}var o=Ve.call(e);r&&(t?e[Je]=n:delete e[Je]);return o}(e):function(e){return Ve.call(e)}(e)}function xr(e,t){return e>t}function Ar(e,t){return null!=e&&Ze.call(e,t)}function Mr(e,t){return null!=e&&t in xe(e)}function Tr(e,t,r){for(var o=r?Ot:Dt,a=e[0].length,s=e.length,u=s,c=n(s),l=1/0,d=[];u--;){var f=e[u];u&&t&&(f=Zt(f,$t(t))),l=bn(f.length,l),c[u]=!r&&(t||a>=120&&f.length>=120)?new Yn(u&&f):i}f=e[0];var h=-1,p=c[0];e:for(;++h<a&&d.length<l;){var v=f[h],m=t?t(v):v;if(v=r||0!==v?v:0,!(p?tn(p,m):o(d,m,r))){for(u=s;--u;){var g=c[u];if(!(g?tn(g,m):o(e[u],m,r)))continue e}p&&p.push(m),d.push(v)}}return d}function Nr(e,t,n){var r=null==(e=Mo(e,t=bi(t,e)))?e:e[Fo(Ko(t))];return null==r?i:At(r,e,n)}function Rr(e){return ts(e)&&Er(e)==y}function _r(e,t,n,r,o){return e===t||(null==e||null==t||!ts(e)&&!ts(t)?e!==e&&t!==t:function(e,t,n,r,o,a){var s=Ha(e),u=Ha(t),c=s?b:vo(e),l=u?b:vo(t),d=(c=c==y?A:c)==A,f=(l=l==y?A:l)==A,h=c==l;if(h&&Ya(e)){if(!Ya(t))return!1;s=!0,d=!1}if(h&&!d)return a||(a=new Qn),s||cs(e)?to(e,t,n,r,o,a):function(e,t,n,r,i,o,a){switch(n){case Z:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case O:return!(e.byteLength!=t.byteLength||!o(new He(e),new He(t)));case w:case S:case x:return Pa(+e,+t);case I:return e.name==t.name&&e.message==t.message;case T:case R:return e==t+"";case E:var s=cn;case N:var u=1&r;if(s||(s=fn),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=to(s(e),s(t),r,i,o,a);return a.delete(e),l;case _:if(Vn)return Vn.call(e)==Vn.call(t)}return!1}(e,t,c,n,r,o,a);if(!(1&n)){var p=d&&Ze.call(e,"__wrapped__"),v=f&&Ze.call(t,"__wrapped__");if(p||v){var m=p?e.value():e,g=v?t.value():t;return a||(a=new Qn),o(m,g,n,r,a)}}if(!h)return!1;return a||(a=new Qn),function(e,t,n,r,o,a){var s=1&n,u=ro(e),c=u.length,l=ro(t),d=l.length;if(c!=d&&!s)return!1;var f=c;for(;f--;){var h=u[f];if(!(s?h in t:Ze.call(t,h)))return!1}var p=a.get(e),v=a.get(t);if(p&&v)return p==t&&v==e;var m=!0;a.set(e,t),a.set(t,e);var g=s;for(;++f<c;){var y=e[h=u[f]],b=t[h];if(r)var w=s?r(b,y,h,t,e,a):r(y,b,h,e,t,a);if(!(w===i?y===b||o(y,b,n,r,a):w)){m=!1;break}g||(g="constructor"==h)}if(m&&!g){var S=e.constructor,I=t.constructor;S==I||!("constructor"in e)||!("constructor"in t)||"function"==typeof S&&S instanceof S&&"function"==typeof I&&I instanceof I||(m=!1)}return a.delete(e),a.delete(t),m}(e,t,n,r,o,a)}(e,t,n,r,_r,o))}function Dr(e,t,n,r){var o=n.length,a=o,s=!r;if(null==e)return!a;for(e=xe(e);o--;){var u=n[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var c=(u=n[o])[0],l=e[c],d=u[1];if(s&&u[2]){if(l===i&&!(c in e))return!1}else{var f=new Qn;if(r)var h=r(l,d,c,e,t,f);if(!(h===i?_r(d,l,3,r,f):h))return!1}}return!0}function Or(e){return!(!es(e)||(t=e,Fe&&Fe in t))&&(Xa(e)?je:ye).test(Vo(e));var t}function Zr(e){return"function"==typeof e?e:null==e?ru:"object"==typeof e?Ha(e)?jr(e[0],e[1]):Pr(e):fu(e)}function Lr(e){if(!ko(e))return Pt(e);var t=[];for(var n in xe(e))Ze.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Fr(e){if(!es(e))return function(e){var t=[];if(null!=e)for(var n in xe(e))t.push(n);return t}(e);var t=ko(e),n=[];for(var r in e)("constructor"!=r||!t&&Ze.call(e,r))&&n.push(r);return n}function Vr(e,t){return e<t}function Br(e,t){var r=-1,i=za(e)?n(e.length):[];return fr(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function Pr(e){var t=lo(e);return 1==t.length&&t[0][2]?xo(t[0][0],t[0][1]):function(n){return n===e||Dr(n,e,t)}}function jr(e,t){return So(e)&&Eo(t)?xo(Fo(e),t):function(n){var r=xs(n,e);return r===i&&r===t?As(n,e):_r(t,r,3)}}function Wr(e,t,n,r,o){e!==t&&yr(t,(function(a,s){if(o||(o=new Qn),es(a))!function(e,t,n,r,o,a,s){var u=To(e,n),c=To(t,n),l=s.get(c);if(l)return void er(e,n,l);var d=a?a(u,c,n+"",e,t,s):i,f=d===i;if(f){var h=Ha(c),p=!h&&Ya(c),v=!h&&!p&&cs(c);d=c,h||p||v?Ha(u)?d=u:qa(u)?d=Ti(u):p?(f=!1,d=Ci(c,!0)):v?(f=!1,d=Ei(c,!0)):d=[]:is(c)||Ua(c)?(d=u,Ua(u)?d=gs(u):es(u)&&!Xa(u)||(d=go(c))):f=!1}f&&(s.set(c,d),o(d,c,r,a,s),s.delete(c));er(e,n,d)}(e,t,s,n,Wr,r,o);else{var u=r?r(To(e,s),a,s+"",e,t,o):i;u===i&&(u=a),er(e,s,u)}}),_s)}function Ur(e,t){var n=e.length;if(n)return bo(t+=t<0?n:0,n)?e[t]:i}function Hr(e,t,n){t=t.length?Zt(t,(function(e){return Ha(e)?function(t){return Cr(t,1===e.length?e[0]:e)}:e})):[ru];var r=-1;t=Zt(t,$t(uo()));var i=Br(e,(function(e,n,i){var o=Zt(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;for(;++r<a;){var u=xi(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Gr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Cr(e,a);n(s,a)&&$r(o,bi(a,e),s)}return o}function zr(e,t,n,r){var i=r?Ht:Ut,o=-1,a=t.length,s=e;for(e===t&&(t=Ti(t)),n&&(s=Zt(e,$t(n)));++o<a;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==e&&Qe.call(s,u,1),Qe.call(e,u,1);return e}function qr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;bo(i)?Qe.call(e,i,1):di(e,i)}}return e}function Yr(e,t){return e+pt(In()*(t-e+1))}function Qr(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=pt(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return _o(Ao(e,t,ru),e+"")}function Xr(e){return Xn(Ps(e))}function Jr(e,t){var n=Ps(e);return Zo(n,sr(t,0,n.length))}function $r(e,t,n,r){if(!es(e))return e;for(var o=-1,a=(t=bi(t,e)).length,s=a-1,u=e;null!=u&&++o<a;){var c=Fo(t[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var d=u[c];(l=r?r(d,c,u):i)===i&&(l=es(d)?d:bo(t[o+1])?[]:{})}tr(u,c,l),u=u[c]}return e}var ei=Nn?function(e,t){return Nn.set(e,t),e}:ru,ti=$e?function(e,t){return $e(e,"toString",{configurable:!0,enumerable:!1,value:eu(t),writable:!0})}:ru;function ni(e){return Zo(Ps(e))}function ri(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=n(o);++i<o;)a[i]=e[i+t];return a}function ii(e,t){var n;return fr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function oi(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t===t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!us(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ai(e,t,ru,n)}function ai(e,t,n,r){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!==t,u=null===t,c=us(t),l=t===i;o<a;){var d=pt((o+a)/2),f=n(e[d]),h=f!==i,p=null===f,v=f===f,m=us(f);if(s)var g=r||v;else g=l?v&&(r||h):u?v&&h&&(r||!p):c?v&&h&&!p&&(r||!m):!p&&!m&&(r?f<=t:f<t);g?o=d+1:a=d}return bn(a,4294967294)}function si(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Pa(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function ui(e){return"number"==typeof e?e:us(e)?v:+e}function ci(e){if("string"==typeof e)return e;if(Ha(e))return Zt(e,ci)+"";if(us(e))return Bn?Bn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function li(e,t,n){var r=-1,i=Dt,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=Ot;else if(o>=200){var c=t?null:Qi(e);if(c)return fn(c);a=!1,i=tn,u=new Yn}else u=t?[]:s;e:for(;++r<o;){var l=e[r],d=t?t(l):l;if(l=n||0!==l?l:0,a&&d===d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),s.push(l)}else i(u,d,n)||(u!==s&&u.push(d),s.push(l))}return s}function di(e,t){return null==(e=Mo(e,t=bi(t,e)))||delete e[Fo(Ko(t))]}function fi(e,t,n,r){return $r(e,t,n(Cr(e,t)),r)}function hi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ri(e,r?0:o,r?o+1:i):ri(e,r?o+1:0,r?i:o)}function pi(e,t){var n=e;return n instanceof Hn&&(n=n.value()),Ft(t,(function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))}),n)}function vi(e,t,r){var i=e.length;if(i<2)return i?li(e[0]):[];for(var o=-1,a=n(i);++o<i;)for(var s=e[o],u=-1;++u<i;)u!=o&&(a[o]=dr(a[o]||s,e[u],t,r));return li(gr(a,1),t,r)}function mi(e,t,n){for(var r=-1,o=e.length,a=t.length,s={};++r<o;){var u=r<a?t[r]:i;n(s,e[r],u)}return s}function gi(e){return qa(e)?e:[]}function yi(e){return"function"==typeof e?e:ru}function bi(e,t){return Ha(e)?e:So(e,t)?[e]:Lo(ys(e))}var wi=Kr;function Si(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ri(e,t,n)}var Ii=nt||function(e){return vt.clearTimeout(e)};function Ci(e,t){if(t)return e.slice();var n=e.length,r=Ge?Ge(n):new e.constructor(n);return e.copy(r),r}function ki(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function Ei(e,t){var n=t?ki(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function xi(e,t){if(e!==t){var n=e!==i,r=null===e,o=e===e,a=us(e),s=t!==i,u=null===t,c=t===t,l=us(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!l&&e<t||l&&n&&o&&!r&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}function Ai(e,t,r,i){for(var o=-1,a=e.length,s=r.length,u=-1,c=t.length,l=Yt(a-s,0),d=n(c+l),f=!i;++u<c;)d[u]=t[u];for(;++o<s;)(f||o<a)&&(d[r[o]]=e[o]);for(;l--;)d[u++]=e[o++];return d}function Mi(e,t,r,i){for(var o=-1,a=e.length,s=-1,u=r.length,c=-1,l=t.length,d=Yt(a-u,0),f=n(d+l),h=!i;++o<d;)f[o]=e[o];for(var p=o;++c<l;)f[p+c]=t[c];for(;++s<u;)(h||o<a)&&(f[p+r[s]]=e[o++]);return f}function Ti(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function Ni(e,t,n,r){var o=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=r?r(n[u],e[u],u,n,e):i;c===i&&(c=e[u]),o?or(n,u,c):tr(n,u,c)}return n}function Ri(e,t){return function(n,r){var i=Ha(n)?Mt:rr,o=t?t():{};return i(n,e,uo(r,2),o)}}function _i(e){return Kr((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&wo(n[0],n[1],s)&&(a=o<3?i:a,o=1),t=xe(t);++r<o;){var u=n[r];u&&e(t,u,r,a)}return t}))}function Di(e,t){return function(n,r){if(null==n)return n;if(!za(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=xe(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Oi(e){return function(t,n,r){for(var i=-1,o=xe(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}function Zi(e){return function(t){var n=un(t=ys(t))?vn(t):i,r=n?n[0]:t.charAt(0),o=n?Si(n,1).join(""):t.slice(1);return r[e]()+o}}function Li(e){return function(t){return Ft(Xs(Us(t).replace(et,"")),e,"")}}function Fi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=jn(e.prototype),r=e.apply(n,t);return es(r)?r:n}}function Vi(e){return function(t,n,r){var o=xe(t);if(!za(t)){var a=uo(n,3);t=Rs(t),n=function(e){return a(o[e],e,o)}}var s=e(t,n,r);return s>-1?o[a?t[s]:s]:i}}function Bi(e){return no((function(t){var n=t.length,r=n,a=Un.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Te(o);if(a&&!u&&"wrapper"==ao(s))var u=new Un([],!0)}for(r=u?r:n;++r<n;){var c=ao(s=t[r]),l="wrapper"==c?oo(s):i;u=l&&Io(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[ao(l[0])].apply(u,l[3]):1==s.length&&Io(s)?u[c]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Ha(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function Pi(e,t,r,o,a,s,u,c,l,f){var h=t&d,p=1&t,v=2&t,m=24&t,g=512&t,y=v?i:Fi(e);return function d(){for(var b=arguments.length,w=n(b),S=b;S--;)w[S]=arguments[S];if(m)var I=so(d),C=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(w,I);if(o&&(w=Ai(w,o,a,m)),s&&(w=Mi(w,s,u,m)),b-=C,m&&b<f){var k=dn(w,I);return qi(e,t,Pi,d.placeholder,r,w,k,c,l,f-b)}var E=p?r:this,x=v?E[e]:e;return b=w.length,c?w=function(e,t){var n=e.length,r=bn(t.length,n),o=Ti(e);for(;r--;){var a=t[r];e[r]=bo(a,n)?o[a]:i}return e}(w,c):g&&b>1&&w.reverse(),h&&l<b&&(w.length=l),this&&this!==vt&&this instanceof d&&(x=y||Fi(x)),x.apply(E,w)}}function ji(e,t){return function(n,r){return function(e,t,n,r){return wr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Wi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=ci(n),r=ci(r)):(n=ui(n),r=ui(r)),o=e(n,r)}return o}}function Ui(e){return no((function(t){return t=Zt(t,$t(uo())),Kr((function(n){var r=this;return e(t,(function(e){return At(e,r,n)}))}))}))}function Hi(e,t){var n=(t=t===i?" ":ci(t)).length;if(n<2)return n?Qr(t,e):t;var r=Qr(t,ht(e/pn(t)));return un(t)?Si(vn(r),0,e).join(""):r.slice(0,e)}function Gi(e){return function(t,r,o){return o&&"number"!=typeof o&&wo(t,r,o)&&(r=o=i),t=hs(t),r===i?(r=t,t=0):r=hs(r),function(e,t,r,i){for(var o=-1,a=Yt(ht((t-e)/(r||1)),0),s=n(a);a--;)s[i?a:++o]=e,e+=r;return s}(t,r,o=o===i?t<r?1:-1:hs(o),e)}}function zi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ms(t),n=ms(n)),e(t,n)}}function qi(e,t,n,r,o,a,s,u,d,f){var h=8&t;t|=h?c:l,4&(t&=~(h?l:c))||(t&=-4);var p=[e,t,o,h?a:i,h?s:i,h?i:a,h?i:s,u,d,f],v=n.apply(i,p);return Io(e)&&No(v,p),v.placeholder=r,Do(v,e,t)}function Yi(e){var t=Ee[e];return function(e,n){if(e=ms(e),(n=null==n?0:bn(ps(n),292))&&bt(e)){var r=(ys(e)+"e").split("e");return+((r=(ys(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Qi=An&&1/fn(new An([,-0]))[1]==h?function(e){return new An(e)}:uu;function Ki(e){return function(t){var n=vo(t);return n==E?cn(t):n==N?hn(t):function(e,t){return Zt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xi(e,t,r,a,h,p,v,m){var g=2&t;if(!g&&"function"!=typeof e)throw new Te(o);var y=a?a.length:0;if(y||(t&=-97,a=h=i),v=v===i?v:Yt(ps(v),0),m=m===i?m:ps(m),y-=h?h.length:0,t&l){var b=a,w=h;a=h=i}var S=g?i:oo(e),I=[e,t,r,a,h,b,w,p,v,m];if(S&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,a=r==d&&8==n||r==d&&n==f&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?Ai(c,u,t[4]):u,e[4]=c?dn(e[3],s):t[4]}(u=t[5])&&(c=e[5],e[5]=c?Mi(c,u,t[6]):u,e[6]=c?dn(e[5],s):t[6]);(u=t[7])&&(e[7]=u);r&d&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(I,S),e=I[0],t=I[1],r=I[2],a=I[3],h=I[4],!(m=I[9]=I[9]===i?g?0:e.length:Yt(I[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)C=8==t||t==u?function(e,t,r){var o=Fi(e);return function a(){for(var s=arguments.length,u=n(s),c=s,l=so(a);c--;)u[c]=arguments[c];var d=s<3&&u[0]!==l&&u[s-1]!==l?[]:dn(u,l);return(s-=d.length)<r?qi(e,t,Pi,a.placeholder,i,u,d,i,i,r-s):At(this&&this!==vt&&this instanceof a?o:e,this,u)}}(e,t,m):t!=c&&33!=t||h.length?Pi.apply(i,I):function(e,t,r,i){var o=1&t,a=Fi(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=i.length,d=n(l+u),f=this&&this!==vt&&this instanceof t?a:e;++c<l;)d[c]=i[c];for(;u--;)d[c++]=arguments[++s];return At(f,o?r:this,d)}}(e,t,r,a);else var C=function(e,t,n){var r=1&t,i=Fi(e);return function t(){return(this&&this!==vt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,r);return Do((S?ei:No)(C,I),e,t)}function Ji(e,t,n,r){return e===i||Pa(e,_e[n])&&!Ze.call(r,n)?t:e}function $i(e,t,n,r,o,a){return es(e)&&es(t)&&(a.set(t,e),Wr(e,t,i,$i,a),a.delete(t)),e}function eo(e){return is(e)?i:e}function to(e,t,n,r,o,a){var s=1&n,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),d=a.get(t);if(l&&d)return l==t&&d==e;var f=-1,h=!0,p=2&n?new Yn:i;for(a.set(e,t),a.set(t,e);++f<u;){var v=e[f],m=t[f];if(r)var g=s?r(m,v,f,t,e,a):r(v,m,f,e,t,a);if(g!==i){if(g)continue;h=!1;break}if(p){if(!Bt(t,(function(e,t){if(!tn(p,t)&&(v===e||o(v,e,n,r,a)))return p.push(t)}))){h=!1;break}}else if(v!==m&&!o(v,m,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function no(e){return _o(Ao(e,i,Go),e+"")}function ro(e){return kr(e,Rs,ho)}function io(e){return kr(e,_s,po)}var oo=Nn?function(e){return Nn.get(e)}:uu;function ao(e){for(var t=e.name+"",n=Rn[t],r=Ze.call(Rn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function so(e){return(Ze.call(Pn,"placeholder")?Pn:e).placeholder}function uo(){var e=Pn.iteratee||iu;return e=e===iu?Zr:e,arguments.length?e(arguments[0],arguments[1]):e}function co(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function lo(e){for(var t=Rs(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Eo(i)]}return t}function fo(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Or(n)?n:i}var ho=mt?function(e){return null==e?[]:(e=xe(e),_t(mt(e),(function(t){return Ye.call(e,t)})))}:vu,po=mt?function(e){for(var t=[];e;)Lt(t,ho(e)),e=ze(e);return t}:vu,vo=Er;function mo(e,t,n){for(var r=-1,i=(t=bi(t,e)).length,o=!1;++r<i;){var a=Fo(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&$a(i)&&bo(a,i)&&(Ha(e)||Ua(e))}function go(e){return"function"!=typeof e.constructor||ko(e)?{}:jn(ze(e))}function yo(e){return Ha(e)||Ua(e)||!!(Ke&&e&&e[Ke])}function bo(e,t){var n=typeof e;return!!(t=null==t?p:t)&&("number"==n||"symbol"!=n&&we.test(e))&&e>-1&&e%1==0&&e<t}function wo(e,t,n){if(!es(n))return!1;var r=typeof t;return!!("number"==r?za(n)&&bo(t,n.length):"string"==r&&t in n)&&Pa(n[t],e)}function So(e,t){if(Ha(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!us(e))||(ne.test(e)||!te.test(e)||null!=t&&e in xe(t))}function Io(e){var t=ao(e),n=Pn[t];if("function"!=typeof n||!(t in Hn.prototype))return!1;if(e===n)return!0;var r=oo(n);return!!r&&e===r[0]}(kn&&vo(new kn(new ArrayBuffer(1)))!=Z||En&&vo(new En)!=E||xn&&vo(xn.resolve())!=M||An&&vo(new An)!=N||Mn&&vo(new Mn)!=D)&&(vo=function(e){var t=Er(e),n=t==A?e.constructor:i,r=n?Vo(n):"";if(r)switch(r){case _n:return Z;case Dn:return E;case On:return M;case Zn:return N;case Ln:return D}return t});var Co=De?Xa:mu;function ko(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||_e)}function Eo(e){return e===e&&!es(e)}function xo(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==i||e in xe(n)))}}function Ao(e,t,r){return t=Yt(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=Yt(i.length-t,0),s=n(a);++o<a;)s[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(s),At(e,this,u)}}function Mo(e,t){return t.length<2?e:Cr(e,ri(t,0,-1))}function To(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}var No=Oo(ei),Ro=lt||function(e,t){return vt.setTimeout(e,t)},_o=Oo(ti);function Do(e,t,n){var r=t+"";return _o(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ue,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Tt(g,(function(n){var r="_."+n[0];t&n[1]&&!Dt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(le):[]}(r),n)))}function Oo(e){var t=0,n=0;return function(){var r=wn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Zo(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var a=Yr(n,o),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Lo=function(e){var t=Oa(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,n,r,i){t.push(r?i.replace(he,"$1"):n||e)})),t}));function Fo(e){if("string"==typeof e||us(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Vo(e){if(null!=e){try{return Oe.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Bo(e){if(e instanceof Hn)return e.clone();var t=new Un(e.__wrapped__,e.__chain__);return t.__actions__=Ti(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Po=Kr((function(e,t){return qa(e)?dr(e,gr(t,1,qa,!0)):[]})),jo=Kr((function(e,t){var n=Ko(t);return qa(n)&&(n=i),qa(e)?dr(e,gr(t,1,qa,!0),uo(n,2)):[]})),Wo=Kr((function(e,t){var n=Ko(t);return qa(n)&&(n=i),qa(e)?dr(e,gr(t,1,qa,!0),i,n):[]}));function Uo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ps(n);return i<0&&(i=Yt(r+i,0)),Wt(e,uo(t,3),i)}function Ho(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=ps(n),o=n<0?Yt(r+o,0):bn(o,r-1)),Wt(e,uo(t,3),o,!0)}function Go(e){return(null==e?0:e.length)?gr(e,1):[]}function zo(e){return e&&e.length?e[0]:i}var qo=Kr((function(e){var t=Zt(e,gi);return t.length&&t[0]===e[0]?Tr(t):[]})),Yo=Kr((function(e){var t=Ko(e),n=Zt(e,gi);return t===Ko(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Tr(n,uo(t,2)):[]})),Qo=Kr((function(e){var t=Ko(e),n=Zt(e,gi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Tr(n,i,t):[]}));function Ko(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Xo=Kr(Jo);function Jo(e,t){return e&&e.length&&t&&t.length?zr(e,t):e}var $o=no((function(e,t){var n=null==e?0:e.length,r=ar(e,t);return qr(e,Zt(t,(function(e){return bo(e,n)?+e:e})).sort(xi)),r}));function ea(e){return null==e?e:Cn.call(e)}var ta=Kr((function(e){return li(gr(e,1,qa,!0))})),na=Kr((function(e){var t=Ko(e);return qa(t)&&(t=i),li(gr(e,1,qa,!0),uo(t,2))})),ra=Kr((function(e){var t=Ko(e);return t="function"==typeof t?t:i,li(gr(e,1,qa,!0),i,t)}));function ia(e){if(!e||!e.length)return[];var t=0;return e=_t(e,(function(e){if(qa(e))return t=Yt(e.length,t),!0})),Xt(t,(function(t){return Zt(e,qt(t))}))}function oa(e,t){if(!e||!e.length)return[];var n=ia(e);return null==t?n:Zt(n,(function(e){return At(t,i,e)}))}var aa=Kr((function(e,t){return qa(e)?dr(e,t):[]})),sa=Kr((function(e){return vi(_t(e,qa))})),ua=Kr((function(e){var t=Ko(e);return qa(t)&&(t=i),vi(_t(e,qa),uo(t,2))})),ca=Kr((function(e){var t=Ko(e);return t="function"==typeof t?t:i,vi(_t(e,qa),i,t)})),la=Kr(ia);var da=Kr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,oa(e,n)}));function fa(e){var t=Pn(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var pa=no((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return ar(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Hn&&bo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[o],thisArg:i}),new Un(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)}));var va=Ri((function(e,t,n){Ze.call(e,n)?++e[n]:or(e,n,1)}));var ma=Vi(Uo),ga=Vi(Ho);function ya(e,t){return(Ha(e)?Tt:fr)(e,uo(t,3))}function ba(e,t){return(Ha(e)?Nt:hr)(e,uo(t,3))}var wa=Ri((function(e,t,n){Ze.call(e,n)?e[n].push(t):or(e,n,[t])}));var Sa=Kr((function(e,t,r){var i=-1,o="function"==typeof t,a=za(e)?n(e.length):[];return fr(e,(function(e){a[++i]=o?At(t,e,r):Nr(e,t,r)})),a})),Ia=Ri((function(e,t,n){or(e,n,t)}));function Ca(e,t){return(Ha(e)?Zt:Br)(e,uo(t,3))}var ka=Ri((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ea=Kr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&wo(e,t[0],t[1])?t=[]:n>2&&wo(t[0],t[1],t[2])&&(t=[t[0]]),Hr(e,gr(t,1),[])})),xa=it||function(){return vt.Date.now()};function Aa(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Xi(e,d,i,i,i,i,t)}function Ma(e,t){var n;if("function"!=typeof t)throw new Te(o);return e=ps(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Ta=Kr((function(e,t,n){var r=1;if(n.length){var i=dn(n,so(Ta));r|=c}return Xi(e,r,t,n,i)})),Na=Kr((function(e,t,n){var r=3;if(n.length){var i=dn(n,so(Na));r|=c}return Xi(t,r,e,n,i)}));function Ra(e,t,n){var r,a,s,u,c,l,d=0,f=!1,h=!1,p=!0;if("function"!=typeof e)throw new Te(o);function v(t){var n=r,o=a;return r=a=i,d=t,u=e.apply(o,n)}function m(e){var n=e-l;return l===i||n>=t||n<0||h&&e-d>=s}function g(){var e=xa();if(m(e))return y(e);c=Ro(g,function(e){var n=t-(e-l);return h?bn(n,s-(e-d)):n}(e))}function y(e){return c=i,p&&r?v(e):(r=a=i,u)}function b(){var e=xa(),n=m(e);if(r=arguments,a=this,l=e,n){if(c===i)return function(e){return d=e,c=Ro(g,t),f?v(e):u}(l);if(h)return Ii(c),c=Ro(g,t),v(l)}return c===i&&(c=Ro(g,t)),u}return t=ms(t)||0,es(n)&&(f=!!n.leading,s=(h="maxWait"in n)?Yt(ms(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),b.cancel=function(){c!==i&&Ii(c),d=0,r=l=a=c=i},b.flush=function(){return c===i?u:y(xa())},b}var _a=Kr((function(e,t){return lr(e,1,t)})),Da=Kr((function(e,t,n){return lr(e,ms(t)||0,n)}));function Oa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(o);var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Oa.Cache||qn),n}function Za(e){if("function"!=typeof e)throw new Te(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Oa.Cache=qn;var La=wi((function(e,t){var n=(t=1==t.length&&Ha(t[0])?Zt(t[0],$t(uo())):Zt(gr(t,1),$t(uo()))).length;return Kr((function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return At(e,this,r)}))})),Fa=Kr((function(e,t){var n=dn(t,so(Fa));return Xi(e,c,i,t,n)})),Va=Kr((function(e,t){var n=dn(t,so(Va));return Xi(e,l,i,t,n)})),Ba=no((function(e,t){return Xi(e,f,i,i,i,t)}));function Pa(e,t){return e===t||e!==e&&t!==t}var ja=zi(xr),Wa=zi((function(e,t){return e>=t})),Ua=Rr(function(){return arguments}())?Rr:function(e){return ts(e)&&Ze.call(e,"callee")&&!Ye.call(e,"callee")},Ha=n.isArray,Ga=St?$t(St):function(e){return ts(e)&&Er(e)==O};function za(e){return null!=e&&$a(e.length)&&!Xa(e)}function qa(e){return ts(e)&&za(e)}var Ya=gt||mu,Qa=It?$t(It):function(e){return ts(e)&&Er(e)==S};function Ka(e){if(!ts(e))return!1;var t=Er(e);return t==I||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Xa(e){if(!es(e))return!1;var t=Er(e);return t==C||t==k||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ja(e){return"number"==typeof e&&e==ps(e)}function $a(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function es(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ts(e){return null!=e&&"object"==typeof e}var ns=Ct?$t(Ct):function(e){return ts(e)&&vo(e)==E};function rs(e){return"number"==typeof e||ts(e)&&Er(e)==x}function is(e){if(!ts(e)||Er(e)!=A)return!1;var t=ze(e);if(null===t)return!0;var n=Ze.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Oe.call(n)==Be}var os=kt?$t(kt):function(e){return ts(e)&&Er(e)==T};var as=Et?$t(Et):function(e){return ts(e)&&vo(e)==N};function ss(e){return"string"==typeof e||!Ha(e)&&ts(e)&&Er(e)==R}function us(e){return"symbol"==typeof e||ts(e)&&Er(e)==_}var cs=xt?$t(xt):function(e){return ts(e)&&$a(e.length)&&!!ut[Er(e)]};var ls=zi(Vr),ds=zi((function(e,t){return e<=t}));function fs(e){if(!e)return[];if(za(e))return ss(e)?vn(e):Ti(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=vo(e);return(t==E?cn:t==N?fn:Ps)(e)}function hs(e){return e?(e=ms(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function ps(e){var t=hs(e),n=t%1;return t===t?n?t-n:t:0}function vs(e){return e?sr(ps(e),0,m):0}function ms(e){if("number"==typeof e)return e;if(us(e))return v;if(es(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=es(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Jt(e);var n=ge.test(e);return n||be.test(e)?ft(e.slice(2),n?2:8):me.test(e)?v:+e}function gs(e){return Ni(e,_s(e))}function ys(e){return null==e?"":ci(e)}var bs=_i((function(e,t){if(ko(t)||za(t))Ni(t,Rs(t),e);else for(var n in t)Ze.call(t,n)&&tr(e,n,t[n])})),ws=_i((function(e,t){Ni(t,_s(t),e)})),Ss=_i((function(e,t,n,r){Ni(t,_s(t),e,r)})),Is=_i((function(e,t,n,r){Ni(t,Rs(t),e,r)})),Cs=no(ar);var ks=Kr((function(e,t){e=xe(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&wo(t[0],t[1],o)&&(r=1);++n<r;)for(var a=t[n],s=_s(a),u=-1,c=s.length;++u<c;){var l=s[u],d=e[l];(d===i||Pa(d,_e[l])&&!Ze.call(e,l))&&(e[l]=a[l])}return e})),Es=Kr((function(e){return e.push(i,$i),At(Os,i,e)}));function xs(e,t,n){var r=null==e?i:Cr(e,t);return r===i?n:r}function As(e,t){return null!=e&&mo(e,t,Mr)}var Ms=ji((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ve.call(t)),e[t]=n}),eu(ru)),Ts=ji((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ve.call(t)),Ze.call(e,t)?e[t].push(n):e[t]=[n]}),uo),Ns=Kr(Nr);function Rs(e){return za(e)?Kn(e):Lr(e)}function _s(e){return za(e)?Kn(e,!0):Fr(e)}var Ds=_i((function(e,t,n){Wr(e,t,n)})),Os=_i((function(e,t,n,r){Wr(e,t,n,r)})),Zs=no((function(e,t){var n={};if(null==e)return n;var r=!1;t=Zt(t,(function(t){return t=bi(t,e),r||(r=t.length>1),t})),Ni(e,io(e),n),r&&(n=ur(n,7,eo));for(var i=t.length;i--;)di(n,t[i]);return n}));var Ls=no((function(e,t){return null==e?{}:function(e,t){return Gr(e,t,(function(t,n){return As(e,n)}))}(e,t)}));function Fs(e,t){if(null==e)return{};var n=Zt(io(e),(function(e){return[e]}));return t=uo(t),Gr(e,n,(function(e,n){return t(e,n[0])}))}var Vs=Ki(Rs),Bs=Ki(_s);function Ps(e){return null==e?[]:en(e,Rs(e))}var js=Li((function(e,t,n){return t=t.toLowerCase(),e+(n?Ws(t):t)}));function Ws(e){return Ks(ys(e).toLowerCase())}function Us(e){return(e=ys(e))&&e.replace(Se,on).replace(tt,"")}var Hs=Li((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Gs=Li((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),zs=Zi("toLowerCase");var qs=Li((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ys=Li((function(e,t,n){return e+(n?" ":"")+Ks(t)}));var Qs=Li((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ks=Zi("toUpperCase");function Xs(e,t,n){return e=ys(e),(t=n?i:t)===i?function(e){return ot.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var Js=Kr((function(e,t){try{return At(e,i,t)}catch(n){return Ka(n)?n:new se(n)}})),$s=no((function(e,t){return Tt(t,(function(t){t=Fo(t),or(e,t,Ta(e[t],e))})),e}));function eu(e){return function(){return e}}var tu=Bi(),nu=Bi(!0);function ru(e){return e}function iu(e){return Zr("function"==typeof e?e:ur(e,1))}var ou=Kr((function(e,t){return function(n){return Nr(n,e,t)}})),au=Kr((function(e,t){return function(n){return Nr(e,n,t)}}));function su(e,t,n){var r=Rs(t),i=Ir(t,r);null!=n||es(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Ir(t,Rs(t)));var o=!(es(n)&&"chain"in n)||!!n.chain,a=Xa(e);return Tt(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ti(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})})),e}function uu(){}var cu=Ui(Zt),lu=Ui(Rt),du=Ui(Bt);function fu(e){return So(e)?qt(Fo(e)):function(e){return function(t){return Cr(t,e)}}(e)}var hu=Gi(),pu=Gi(!0);function vu(){return[]}function mu(){return!1}var gu=Wi((function(e,t){return e+t}),0),yu=Yi("ceil"),bu=Wi((function(e,t){return e/t}),1),wu=Yi("floor");var Su=Wi((function(e,t){return e*t}),1),Iu=Yi("round"),Cu=Wi((function(e,t){return e-t}),0);return Pn.after=function(e,t){if("function"!=typeof t)throw new Te(o);return e=ps(e),function(){if(--e<1)return t.apply(this,arguments)}},Pn.ary=Aa,Pn.assign=bs,Pn.assignIn=ws,Pn.assignInWith=Ss,Pn.assignWith=Is,Pn.at=Cs,Pn.before=Ma,Pn.bind=Ta,Pn.bindAll=$s,Pn.bindKey=Na,Pn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ha(e)?e:[e]},Pn.chain=fa,Pn.chunk=function(e,t,r){t=(r?wo(e,t,r):t===i)?1:Yt(ps(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,u=n(ht(o/t));a<o;)u[s++]=ri(e,a,a+=t);return u},Pn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Pn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Lt(Ha(r)?Ti(r):[r],gr(t,1))},Pn.cond=function(e){var t=null==e?0:e.length,n=uo();return e=t?Zt(e,(function(e){if("function"!=typeof e[1])throw new Te(o);return[n(e[0]),e[1]]})):[],Kr((function(n){for(var r=-1;++r<t;){var i=e[r];if(At(i[0],this,n))return At(i[1],this,n)}}))},Pn.conforms=function(e){return function(e){var t=Rs(e);return function(n){return cr(n,e,t)}}(ur(e,1))},Pn.constant=eu,Pn.countBy=va,Pn.create=function(e,t){var n=jn(e);return null==t?n:ir(n,t)},Pn.curry=function e(t,n,r){var o=Xi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Pn.curryRight=function e(t,n,r){var o=Xi(t,u,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Pn.debounce=Ra,Pn.defaults=ks,Pn.defaultsDeep=Es,Pn.defer=_a,Pn.delay=Da,Pn.difference=Po,Pn.differenceBy=jo,Pn.differenceWith=Wo,Pn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=n||t===i?1:ps(t))<0?0:t,r):[]},Pn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,0,(t=r-(t=n||t===i?1:ps(t)))<0?0:t):[]},Pn.dropRightWhile=function(e,t){return e&&e.length?hi(e,uo(t,3),!0,!0):[]},Pn.dropWhile=function(e,t){return e&&e.length?hi(e,uo(t,3),!0):[]},Pn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&wo(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=ps(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:ps(r))<0&&(r+=o),r=n>r?0:vs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Pn.filter=function(e,t){return(Ha(e)?_t:mr)(e,uo(t,3))},Pn.flatMap=function(e,t){return gr(Ca(e,t),1)},Pn.flatMapDeep=function(e,t){return gr(Ca(e,t),h)},Pn.flatMapDepth=function(e,t,n){return n=n===i?1:ps(n),gr(Ca(e,t),n)},Pn.flatten=Go,Pn.flattenDeep=function(e){return(null==e?0:e.length)?gr(e,h):[]},Pn.flattenDepth=function(e,t){return(null==e?0:e.length)?gr(e,t=t===i?1:ps(t)):[]},Pn.flip=function(e){return Xi(e,512)},Pn.flow=tu,Pn.flowRight=nu,Pn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Pn.functions=function(e){return null==e?[]:Ir(e,Rs(e))},Pn.functionsIn=function(e){return null==e?[]:Ir(e,_s(e))},Pn.groupBy=wa,Pn.initial=function(e){return(null==e?0:e.length)?ri(e,0,-1):[]},Pn.intersection=qo,Pn.intersectionBy=Yo,Pn.intersectionWith=Qo,Pn.invert=Ms,Pn.invertBy=Ts,Pn.invokeMap=Sa,Pn.iteratee=iu,Pn.keyBy=Ia,Pn.keys=Rs,Pn.keysIn=_s,Pn.map=Ca,Pn.mapKeys=function(e,t){var n={};return t=uo(t,3),wr(e,(function(e,r,i){or(n,t(e,r,i),e)})),n},Pn.mapValues=function(e,t){var n={};return t=uo(t,3),wr(e,(function(e,r,i){or(n,r,t(e,r,i))})),n},Pn.matches=function(e){return Pr(ur(e,1))},Pn.matchesProperty=function(e,t){return jr(e,ur(t,1))},Pn.memoize=Oa,Pn.merge=Ds,Pn.mergeWith=Os,Pn.method=ou,Pn.methodOf=au,Pn.mixin=su,Pn.negate=Za,Pn.nthArg=function(e){return e=ps(e),Kr((function(t){return Ur(t,e)}))},Pn.omit=Zs,Pn.omitBy=function(e,t){return Fs(e,Za(uo(t)))},Pn.once=function(e){return Ma(2,e)},Pn.orderBy=function(e,t,n,r){return null==e?[]:(Ha(t)||(t=null==t?[]:[t]),Ha(n=r?i:n)||(n=null==n?[]:[n]),Hr(e,t,n))},Pn.over=cu,Pn.overArgs=La,Pn.overEvery=lu,Pn.overSome=du,Pn.partial=Fa,Pn.partialRight=Va,Pn.partition=ka,Pn.pick=Ls,Pn.pickBy=Fs,Pn.property=fu,Pn.propertyOf=function(e){return function(t){return null==e?i:Cr(e,t)}},Pn.pull=Xo,Pn.pullAll=Jo,Pn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?zr(e,t,uo(n,2)):e},Pn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?zr(e,t,i,n):e},Pn.pullAt=$o,Pn.range=hu,Pn.rangeRight=pu,Pn.rearg=Ba,Pn.reject=function(e,t){return(Ha(e)?_t:mr)(e,Za(uo(t,3)))},Pn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=uo(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return qr(e,i),n},Pn.rest=function(e,t){if("function"!=typeof e)throw new Te(o);return Kr(e,t=t===i?t:ps(t))},Pn.reverse=ea,Pn.sampleSize=function(e,t,n){return t=(n?wo(e,t,n):t===i)?1:ps(t),(Ha(e)?Jn:Jr)(e,t)},Pn.set=function(e,t,n){return null==e?e:$r(e,t,n)},Pn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:$r(e,t,n,r)},Pn.shuffle=function(e){return(Ha(e)?$n:ni)(e)},Pn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&wo(e,t,n)?(t=0,n=r):(t=null==t?0:ps(t),n=n===i?r:ps(n)),ri(e,t,n)):[]},Pn.sortBy=Ea,Pn.sortedUniq=function(e){return e&&e.length?si(e):[]},Pn.sortedUniqBy=function(e,t){return e&&e.length?si(e,uo(t,2)):[]},Pn.split=function(e,t,n){return n&&"number"!=typeof n&&wo(e,t,n)&&(t=n=i),(n=n===i?m:n>>>0)?(e=ys(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ci(t))&&un(e)?Si(vn(e),0,n):e.split(t,n):[]},Pn.spread=function(e,t){if("function"!=typeof e)throw new Te(o);return t=null==t?0:Yt(ps(t),0),Kr((function(n){var r=n[t],i=Si(n,0,t);return r&&Lt(i,r),At(e,this,i)}))},Pn.tail=function(e){var t=null==e?0:e.length;return t?ri(e,1,t):[]},Pn.take=function(e,t,n){return e&&e.length?ri(e,0,(t=n||t===i?1:ps(t))<0?0:t):[]},Pn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=r-(t=n||t===i?1:ps(t)))<0?0:t,r):[]},Pn.takeRightWhile=function(e,t){return e&&e.length?hi(e,uo(t,3),!1,!0):[]},Pn.takeWhile=function(e,t){return e&&e.length?hi(e,uo(t,3)):[]},Pn.tap=function(e,t){return t(e),e},Pn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Te(o);return es(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ra(e,t,{leading:r,maxWait:t,trailing:i})},Pn.thru=ha,Pn.toArray=fs,Pn.toPairs=Vs,Pn.toPairsIn=Bs,Pn.toPath=function(e){return Ha(e)?Zt(e,Fo):us(e)?[e]:Ti(Lo(ys(e)))},Pn.toPlainObject=gs,Pn.transform=function(e,t,n){var r=Ha(e),i=r||Ya(e)||cs(e);if(t=uo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:es(e)&&Xa(o)?jn(ze(e)):{}}return(i?Tt:wr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Pn.unary=function(e){return Aa(e,1)},Pn.union=ta,Pn.unionBy=na,Pn.unionWith=ra,Pn.uniq=function(e){return e&&e.length?li(e):[]},Pn.uniqBy=function(e,t){return e&&e.length?li(e,uo(t,2)):[]},Pn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?li(e,i,t):[]},Pn.unset=function(e,t){return null==e||di(e,t)},Pn.unzip=ia,Pn.unzipWith=oa,Pn.update=function(e,t,n){return null==e?e:fi(e,t,yi(n))},Pn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:fi(e,t,yi(n),r)},Pn.values=Ps,Pn.valuesIn=function(e){return null==e?[]:en(e,_s(e))},Pn.without=aa,Pn.words=Xs,Pn.wrap=function(e,t){return Fa(yi(t),e)},Pn.xor=sa,Pn.xorBy=ua,Pn.xorWith=ca,Pn.zip=la,Pn.zipObject=function(e,t){return mi(e||[],t||[],tr)},Pn.zipObjectDeep=function(e,t){return mi(e||[],t||[],$r)},Pn.zipWith=da,Pn.entries=Vs,Pn.entriesIn=Bs,Pn.extend=ws,Pn.extendWith=Ss,su(Pn,Pn),Pn.add=gu,Pn.attempt=Js,Pn.camelCase=js,Pn.capitalize=Ws,Pn.ceil=yu,Pn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ms(n))===n?n:0),t!==i&&(t=(t=ms(t))===t?t:0),sr(ms(e),t,n)},Pn.clone=function(e){return ur(e,4)},Pn.cloneDeep=function(e){return ur(e,5)},Pn.cloneDeepWith=function(e,t){return ur(e,5,t="function"==typeof t?t:i)},Pn.cloneWith=function(e,t){return ur(e,4,t="function"==typeof t?t:i)},Pn.conformsTo=function(e,t){return null==t||cr(e,t,Rs(t))},Pn.deburr=Us,Pn.defaultTo=function(e,t){return null==e||e!==e?t:e},Pn.divide=bu,Pn.endsWith=function(e,t,n){e=ys(e),t=ci(t);var r=e.length,o=n=n===i?r:sr(ps(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Pn.eq=Pa,Pn.escape=function(e){return(e=ys(e))&&X.test(e)?e.replace(Q,an):e},Pn.escapeRegExp=function(e){return(e=ys(e))&&oe.test(e)?e.replace(ie,"\\$&"):e},Pn.every=function(e,t,n){var r=Ha(e)?Rt:pr;return n&&wo(e,t,n)&&(t=i),r(e,uo(t,3))},Pn.find=ma,Pn.findIndex=Uo,Pn.findKey=function(e,t){return jt(e,uo(t,3),wr)},Pn.findLast=ga,Pn.findLastIndex=Ho,Pn.findLastKey=function(e,t){return jt(e,uo(t,3),Sr)},Pn.floor=wu,Pn.forEach=ya,Pn.forEachRight=ba,Pn.forIn=function(e,t){return null==e?e:yr(e,uo(t,3),_s)},Pn.forInRight=function(e,t){return null==e?e:br(e,uo(t,3),_s)},Pn.forOwn=function(e,t){return e&&wr(e,uo(t,3))},Pn.forOwnRight=function(e,t){return e&&Sr(e,uo(t,3))},Pn.get=xs,Pn.gt=ja,Pn.gte=Wa,Pn.has=function(e,t){return null!=e&&mo(e,t,Ar)},Pn.hasIn=As,Pn.head=zo,Pn.identity=ru,Pn.includes=function(e,t,n,r){e=za(e)?e:Ps(e),n=n&&!r?ps(n):0;var i=e.length;return n<0&&(n=Yt(i+n,0)),ss(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ut(e,t,n)>-1},Pn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ps(n);return i<0&&(i=Yt(r+i,0)),Ut(e,t,i)},Pn.inRange=function(e,t,n){return t=hs(t),n===i?(n=t,t=0):n=hs(n),function(e,t,n){return e>=bn(t,n)&&e<Yt(t,n)}(e=ms(e),t,n)},Pn.invoke=Ns,Pn.isArguments=Ua,Pn.isArray=Ha,Pn.isArrayBuffer=Ga,Pn.isArrayLike=za,Pn.isArrayLikeObject=qa,Pn.isBoolean=function(e){return!0===e||!1===e||ts(e)&&Er(e)==w},Pn.isBuffer=Ya,Pn.isDate=Qa,Pn.isElement=function(e){return ts(e)&&1===e.nodeType&&!is(e)},Pn.isEmpty=function(e){if(null==e)return!0;if(za(e)&&(Ha(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||cs(e)||Ua(e)))return!e.length;var t=vo(e);if(t==E||t==N)return!e.size;if(ko(e))return!Lr(e).length;for(var n in e)if(Ze.call(e,n))return!1;return!0},Pn.isEqual=function(e,t){return _r(e,t)},Pn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?_r(e,t,i,n):!!r},Pn.isError=Ka,Pn.isFinite=function(e){return"number"==typeof e&&bt(e)},Pn.isFunction=Xa,Pn.isInteger=Ja,Pn.isLength=$a,Pn.isMap=ns,Pn.isMatch=function(e,t){return e===t||Dr(e,t,lo(t))},Pn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Dr(e,t,lo(t),n)},Pn.isNaN=function(e){return rs(e)&&e!=+e},Pn.isNative=function(e){if(Co(e))throw new se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Or(e)},Pn.isNil=function(e){return null==e},Pn.isNull=function(e){return null===e},Pn.isNumber=rs,Pn.isObject=es,Pn.isObjectLike=ts,Pn.isPlainObject=is,Pn.isRegExp=os,Pn.isSafeInteger=function(e){return Ja(e)&&e>=-9007199254740991&&e<=p},Pn.isSet=as,Pn.isString=ss,Pn.isSymbol=us,Pn.isTypedArray=cs,Pn.isUndefined=function(e){return e===i},Pn.isWeakMap=function(e){return ts(e)&&vo(e)==D},Pn.isWeakSet=function(e){return ts(e)&&"[object WeakSet]"==Er(e)},Pn.join=function(e,t){return null==e?"":wt.call(e,t)},Pn.kebabCase=Hs,Pn.last=Ko,Pn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=ps(n))<0?Yt(r+o,0):bn(o,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Wt(e,Gt,o,!0)},Pn.lowerCase=Gs,Pn.lowerFirst=zs,Pn.lt=ls,Pn.lte=ds,Pn.max=function(e){return e&&e.length?vr(e,ru,xr):i},Pn.maxBy=function(e,t){return e&&e.length?vr(e,uo(t,2),xr):i},Pn.mean=function(e){return zt(e,ru)},Pn.meanBy=function(e,t){return zt(e,uo(t,2))},Pn.min=function(e){return e&&e.length?vr(e,ru,Vr):i},Pn.minBy=function(e,t){return e&&e.length?vr(e,uo(t,2),Vr):i},Pn.stubArray=vu,Pn.stubFalse=mu,Pn.stubObject=function(){return{}},Pn.stubString=function(){return""},Pn.stubTrue=function(){return!0},Pn.multiply=Su,Pn.nth=function(e,t){return e&&e.length?Ur(e,ps(t)):i},Pn.noConflict=function(){return vt._===this&&(vt._=Pe),this},Pn.noop=uu,Pn.now=xa,Pn.pad=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Hi(pt(i),n)+e+Hi(ht(i),n)},Pn.padEnd=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;return t&&r<t?e+Hi(t-r,n):e},Pn.padStart=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;return t&&r<t?Hi(t-r,n)+e:e},Pn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),Sn(ys(e).replace(ae,""),t||0)},Pn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&wo(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=hs(e),t===i?(t=e,e=0):t=hs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=In();return bn(e+o*(t-e+dt("1e-"+((o+"").length-1))),t)}return Yr(e,t)},Pn.reduce=function(e,t,n){var r=Ha(e)?Ft:Qt,i=arguments.length<3;return r(e,uo(t,4),n,i,fr)},Pn.reduceRight=function(e,t,n){var r=Ha(e)?Vt:Qt,i=arguments.length<3;return r(e,uo(t,4),n,i,hr)},Pn.repeat=function(e,t,n){return t=(n?wo(e,t,n):t===i)?1:ps(t),Qr(ys(e),t)},Pn.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Pn.result=function(e,t,n){var r=-1,o=(t=bi(t,e)).length;for(o||(o=1,e=i);++r<o;){var a=null==e?i:e[Fo(t[r])];a===i&&(r=o,a=n),e=Xa(a)?a.call(e):a}return e},Pn.round=Iu,Pn.runInContext=e,Pn.sample=function(e){return(Ha(e)?Xn:Xr)(e)},Pn.size=function(e){if(null==e)return 0;if(za(e))return ss(e)?pn(e):e.length;var t=vo(e);return t==E||t==N?e.size:Lr(e).length},Pn.snakeCase=qs,Pn.some=function(e,t,n){var r=Ha(e)?Bt:ii;return n&&wo(e,t,n)&&(t=i),r(e,uo(t,3))},Pn.sortedIndex=function(e,t){return oi(e,t)},Pn.sortedIndexBy=function(e,t,n){return ai(e,t,uo(n,2))},Pn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=oi(e,t);if(r<n&&Pa(e[r],t))return r}return-1},Pn.sortedLastIndex=function(e,t){return oi(e,t,!0)},Pn.sortedLastIndexBy=function(e,t,n){return ai(e,t,uo(n,2),!0)},Pn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=oi(e,t,!0)-1;if(Pa(e[n],t))return n}return-1},Pn.startCase=Ys,Pn.startsWith=function(e,t,n){return e=ys(e),n=null==n?0:sr(ps(n),0,e.length),t=ci(t),e.slice(n,n+t.length)==t},Pn.subtract=Cu,Pn.sum=function(e){return e&&e.length?Kt(e,ru):0},Pn.sumBy=function(e,t){return e&&e.length?Kt(e,uo(t,2)):0},Pn.template=function(e,t,n){var r=Pn.templateSettings;n&&wo(e,t,n)&&(t=i),e=ys(e),t=Ss({},t,r,Ji);var o,a,s=Ss({},t.imports,r.imports,Ji),u=Rs(s),c=en(s,u),l=0,d=t.interpolate||Ie,f="__p += '",h=Ae((t.escape||Ie).source+"|"+d.source+"|"+(d===ee?pe:Ie).source+"|"+(t.evaluate||Ie).source+"|$","g"),p="//# sourceURL="+(Ze.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++st+"]")+"\n";e.replace(h,(function(t,n,r,i,s,u){return r||(r=i),f+=e.slice(l,u).replace(Ce,sn),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),f+="';\n";var v=Ze.call(t,"variable")&&t.variable;if(v){if(fe.test(v))throw new se("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(a?f.replace(G,""):f).replace(z,"$1").replace(q,"$1;"),f="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Js((function(){return ke(u,p+"return "+f).apply(i,c)}));if(m.source=f,Ka(m))throw m;return m},Pn.times=function(e,t){if((e=ps(e))<1||e>p)return[];var n=m,r=bn(e,m);t=uo(t),e-=m;for(var i=Xt(r,t);++n<e;)t(n);return i},Pn.toFinite=hs,Pn.toInteger=ps,Pn.toLength=vs,Pn.toLower=function(e){return ys(e).toLowerCase()},Pn.toNumber=ms,Pn.toSafeInteger=function(e){return e?sr(ps(e),-9007199254740991,p):0===e?e:0},Pn.toString=ys,Pn.toUpper=function(e){return ys(e).toUpperCase()},Pn.trim=function(e,t,n){if((e=ys(e))&&(n||t===i))return Jt(e);if(!e||!(t=ci(t)))return e;var r=vn(e),o=vn(t);return Si(r,nn(r,o),rn(r,o)+1).join("")},Pn.trimEnd=function(e,t,n){if((e=ys(e))&&(n||t===i))return e.slice(0,mn(e)+1);if(!e||!(t=ci(t)))return e;var r=vn(e);return Si(r,0,rn(r,vn(t))+1).join("")},Pn.trimStart=function(e,t,n){if((e=ys(e))&&(n||t===i))return e.replace(ae,"");if(!e||!(t=ci(t)))return e;var r=vn(e);return Si(r,nn(r,vn(t))).join("")},Pn.truncate=function(e,t){var n=30,r="...";if(es(t)){var o="separator"in t?t.separator:o;n="length"in t?ps(t.length):n,r="omission"in t?ci(t.omission):r}var a=(e=ys(e)).length;if(un(e)){var s=vn(e);a=s.length}if(n>=a)return e;var u=n-pn(r);if(u<1)return r;var c=s?Si(s,0,u).join(""):e.slice(0,u);if(o===i)return c+r;if(s&&(u+=c.length-u),os(o)){if(e.slice(u).search(o)){var l,d=c;for(o.global||(o=Ae(o.source,ys(ve.exec(o))+"g")),o.lastIndex=0;l=o.exec(d);)var f=l.index;c=c.slice(0,f===i?u:f)}}else if(e.indexOf(ci(o),u)!=u){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+r},Pn.unescape=function(e){return(e=ys(e))&&K.test(e)?e.replace(Y,gn):e},Pn.uniqueId=function(e){var t=++Le;return ys(e)+t},Pn.upperCase=Qs,Pn.upperFirst=Ks,Pn.each=ya,Pn.eachRight=ba,Pn.first=zo,su(Pn,function(){var e={};return wr(Pn,(function(t,n){Ze.call(Pn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Pn.VERSION="4.17.21",Tt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Pn[e].placeholder=Pn})),Tt(["drop","take"],(function(e,t){Hn.prototype[e]=function(n){n=n===i?1:Yt(ps(n),0);var r=this.__filtered__&&!t?new Hn(this):this.clone();return r.__filtered__?r.__takeCount__=bn(n,r.__takeCount__):r.__views__.push({size:bn(n,m),type:e+(r.__dir__<0?"Right":"")}),r},Hn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Tt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Hn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:uo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Tt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Hn.prototype[e]=function(){return this[n](1).value()[0]}})),Tt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Hn.prototype[e]=function(){return this.__filtered__?new Hn(this):this[n](1)}})),Hn.prototype.compact=function(){return this.filter(ru)},Hn.prototype.find=function(e){return this.filter(e).head()},Hn.prototype.findLast=function(e){return this.reverse().find(e)},Hn.prototype.invokeMap=Kr((function(e,t){return"function"==typeof e?new Hn(this):this.map((function(n){return Nr(n,e,t)}))})),Hn.prototype.reject=function(e){return this.filter(Za(uo(e)))},Hn.prototype.slice=function(e,t){e=ps(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Hn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ps(t))<0?n.dropRight(-t):n.take(t-e)),n)},Hn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Hn.prototype.toArray=function(){return this.take(m)},wr(Hn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Pn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(Pn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Hn,c=s[0],l=u||Ha(t),d=function(e){var t=o.apply(Pn,Lt([e],s));return r&&f?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var f=this.__chain__,h=!!this.__actions__.length,p=a&&!f,v=u&&!h;if(!a&&l){t=v?t:new Hn(this);var m=e.apply(t,s);return m.__actions__.push({func:ha,args:[d],thisArg:i}),new Un(m,f)}return p&&v?e.apply(this,s):(m=this.thru(d),p?r?m.value()[0]:m.value():m)})})),Tt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ne[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Pn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ha(i)?i:[],e)}return this[n]((function(n){return t.apply(Ha(n)?n:[],e)}))}})),wr(Hn.prototype,(function(e,t){var n=Pn[t];if(n){var r=n.name+"";Ze.call(Rn,r)||(Rn[r]=[]),Rn[r].push({name:t,func:n})}})),Rn[Pi(i,2).name]=[{name:"wrapper",func:i}],Hn.prototype.clone=function(){var e=new Hn(this.__wrapped__);return e.__actions__=Ti(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ti(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ti(this.__views__),e},Hn.prototype.reverse=function(){if(this.__filtered__){var e=new Hn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Hn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ha(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=bn(t,e+a);break;case"takeRight":e=Yt(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,d=l.length,f=0,h=bn(u,this.__takeCount__);if(!n||!r&&i==u&&h==u)return pi(e,this.__actions__);var p=[];e:for(;u--&&f<h;){for(var v=-1,m=e[c+=t];++v<d;){var g=l[v],y=g.iteratee,b=g.type,w=y(m);if(2==b)m=w;else if(!w){if(1==b)continue e;break e}}p[f++]=m}return p},Pn.prototype.at=pa,Pn.prototype.chain=function(){return fa(this)},Pn.prototype.commit=function(){return new Un(this.value(),this.__chain__)},Pn.prototype.next=function(){this.__values__===i&&(this.__values__=fs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Pn.prototype.plant=function(e){for(var t,n=this;n instanceof Wn;){var r=Bo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Pn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Hn){var t=e;return this.__actions__.length&&(t=new Hn(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ea],thisArg:i}),new Un(t,this.__chain__)}return this.thru(ea)},Pn.prototype.toJSON=Pn.prototype.valueOf=Pn.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},Pn.prototype.first=Pn.prototype.head,Xe&&(Pn.prototype[Xe]=function(){return this}),Pn}();vt._=yn,(r=function(){return yn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},2352:function(e){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"d",(function(){return k})),n.d(t,"b",(function(){return E})),n.d(t,"c",(function(){return x}));var r=n(1),i=n.n(r),o=n(14),a=n.n(o),s=n(2),u=n.n(s),c=n(15),l=n.n(c);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var f=Array.isArray,h=Object.keys;function p(e){return"function"==typeof e}function v(e){return e instanceof HTMLElement||e instanceof Text}function m(e){return"object"===u()(e)&&!f(e)}function g(e){if(!e||"string"==typeof e)return e;var t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);return delete t.children,t}function y(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!(!f(e)||!f(t))&&(n?e.length===t.length&&!e.find((function(e){return!t.includes(e)})):e.some((function(e){return t.includes(e)})))}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[];if(!h(e).length)return!0;if(null===t||!h(t).length)return!1;if(n)return l()(e,t);var i=h(e).filter((function(e){return h(t).includes(e)}));return i.forEach((function(n){m(e[n])&&m(t[n])&&(r=r.concat(b(e[n],t[n]))),(e[n]===t[n]||y(e[n],t[n]))&&r.push(t)})),r.length>0&&r.filter((function(e){return e})).length===i.length}function w(e){var t,n={children:[]};if(!e)return n;n.name=p(t=e.type)?t.displayName||t.name:t,n.props=g(e.memoizedProps),n.state=function(e){if(e)return e.baseState||e}(e.memoizedState);var r=e.child;if(r)for(n.children.push(r);r.sibling;)n.children.push(r.sibling),r=r.sibling;return n.children=n.children.map((function(e){return w(e)})),p(e.type)&&function(e){return e.children.length>1}(n)?(n.node=function(e){return e.children.map((function(e){return e.node})).filter((function(e){return!!e}))}(n),n.isFragment=!0):n.node=function(e){return v(e.stateNode)?e.stateNode:e.child&&v(e.child.stateNode)?e.child.stateNode:null}(e),n}function S(e){for(;e.length;){var t=e.shift();if(t.node)return t.node;t.children&&Array.isArray(t.children)&&e.push.apply(e,i()(t.children))}}function I(e,t){for(var n=[];e.length;){var r=e.shift().children;r&&Array.isArray(r)&&r.forEach((function(r){t(r)&&(!r.node&&Array.isArray(r.children)&&(r.node=S(r.children.concat([]))),n.push(r)),e.push(r)}))}return n}function C(e,t){var n=function(e){if(e){var t=e.split("(");return 1===t.length?e:t.find((function(e){return e.includes(")")})).replace(/\)*/g,"")}}(t);return new RegExp("^"+e.split("*").map((function(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")})).join(".+")+"$").test(n)}function k(e,t){var n=arguments.length>3?arguments[3]:void 0;return e.reduce((function(e,t){return e.concat(I(e,n&&"function"==typeof n?n:function(e){return"string"==typeof e.name?C(t,e.name):null!==e.name&&"object"===u()(e.name)&&C(t,e.name.displayName)}))}),[t])}function E(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return p(n)?(console.warn("Functions are not supported as filter matchers"),[]):e.filter((function(e){return m(n)&&b(n,e[t],r)||f(n)&&y(n,e[t],r)||e[t]===n}))}function x(e){if(e.hasOwnProperty("_reactRootContainer"))return e._reactRootContainer._internalRoot.current;var t=Object.keys(e).find((function(e){return e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber")||e.startsWith("__reactContainer")}));return t?e[t]:void 0}},function(e,t,n){var r=n(17),i=n(18),o=n(19),a=n(20);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(6);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(3),i=n(6),o=n(22),a=n(23);function s(t){var n="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.default=e.exports,e.exports.__esModule=!0,s(t)}e.exports=s,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i}));var r=n(0);function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,n=arguments.length>1?arguments[1]:void 0;if(e.isReactLoaded)return Promise.resolve("React already loaded");var i=function(){var e=document.createTreeWalker(document);if(n)return document.querySelector(n);for(;e.nextNode();)if(e.currentNode.hasOwnProperty("_reactRootContainer"))return e.currentNode};return new Promise((function(n,o){var a=!1,s=null;!function t(){var o=i();if(o&&(e.isReactLoaded=!0,e.rootReactElement=Object(r.c)(o),e.rootReactElement))return clearTimeout(s),n();a||setTimeout(t,200)}(),s=setTimeout((function(){a=!0,o("Timed out")}),t)}))}}).call(this,n(9))},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n(1),i=n.n(r),o=n(4),a=n.n(o),s=n(5),u=n.n(s),c=n(7),l=n.n(c),d=n(13),f=n.n(d),h=n(3),p=n.n(h),v=n(8),m=n.n(v),g=n(0);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}var b=function(e){l()(n,e);var t=y(n);function n(e){return a()(this,n),e||(e=[]),t.call.apply(t,[this].concat(i()(e)))}return u()(n,[{key:"byProps",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this,"props",e,t))}},{key:"byState",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this,"state",e,t))}}]),n}(m()(Array)),w=function(e){l()(n,e);var t=y(n);function n(e,r){var i;for(var o in a()(this,n),(i=t.call(this,e))._nodes=r,e)i[o]=e[o];return i}return u()(n,[{key:"byProps",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this._nodes,"props",e,t)[0],this._nodes)}},{key:"byState",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this._nodes,"state",e,t)[0],this._nodes)}}]),n}(m()(Object)),S=function(){function e(t,n){a()(this,e),this.selectors=t.split(" ").filter((function(e){return!!e})).map((function(e){return e.trim()})),this.rootComponent=n,this.tree=Object(g.a)(this.rootComponent)}return u()(e,[{key:"find",value:function(){return this.nodes=new b(Object(g.d)(this.selectors,this.tree,!0)),new w(this.nodes[0],this.nodes)}},{key:"findAll",value:function(){return new b(Object(g.d)(this.selectors,this.tree))}}]),e}()},function(e,t,n){var r=n(2).default,i=n(21);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=Array.isArray,i=Object.keys,o=Object.prototype.hasOwnProperty;e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var a,s,u,c=r(t),l=r(n);if(c&&l){if((s=t.length)!=n.length)return!1;for(a=s;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if(c!=l)return!1;var d=t instanceof Date,f=n instanceof Date;if(d!=f)return!1;if(d&&f)return t.getTime()==n.getTime();var h=t instanceof RegExp,p=n instanceof RegExp;if(h!=p)return!1;if(h&&p)return t.toString()==n.toString();var v=i(t);if((s=v.length)!==i(n).length)return!1;for(a=s;0!=a--;)if(!o.call(n,v[a]))return!1;for(a=s;0!=a--;)if(!e(t[u=v[a]],n[u]))return!1;return!0}return t!=t&&n!=n}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"resq$",(function(){return s})),n.d(t,"resq$$",(function(){return u}));var r=n(12),i=n(11);n.d(t,"waitToLoadReact",(function(){return i.a}));var o=n(0);function a(t,n,i){if(!i&&!e.isReactLoaded)throw new Error("Could not find the root element of your application");var a=e.rootReactElement;if(i instanceof HTMLElement&&(a=Object(o.c)(i)),!a)throw new Error("Could not find instance of React in given element");return new r.a(t,a)[n]()}function s(e,t){return a(e,"find",t)}function u(e,t){return a(e,"findAll",t)}}.call(this,n(9))},function(e,t,n){var r=n(10);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(10);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(6),i=n(24);function o(t,n,a){return i()?(e.exports=o=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},e.exports.default=e.exports,e.exports.__esModule=!0),o.apply(null,arguments)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.default=e.exports,e.exports.__esModule=!0}])},573:function(e,t,n){var r=n(763);function i(e){return e.reduce((function(e,t,n,r){return e+t}))}function o(e){if(r.isArray(e))return e;if("string"===typeof e)return e.split("");throw Error("Parameter must be a string or array.")}t.$m=function(e,t){return e=o(e),t=o(t),r.intersection(e,t).length/r.union(e,t).length}},907:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:function(){return r}})},7326:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},5861:function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,u,"next",e)}function u(e){r(a,i,o,s,u,"throw",e)}s(void 0)}))}}n.d(t,{Z:function(){return i}})},5671:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return r}})},5647:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9611),i=n(8814);function o(e,t,n){return o=(0,i.Z)()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&(0,r.Z)(o,n.prototype),o},o.apply(null,arguments)}},3144:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9142);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(0,r.Z)(i.key),i)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},7762:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(181);function i(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(0,r.Z)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}},7277:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(1120),i=n(8814),o=n(1002),a=n(7326);function s(e){var t=(0,i.Z)();return function(){var n,i=(0,r.Z)(e);if(t){var s=(0,r.Z)(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===(0,o.Z)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,a.Z)(e)}(this,n)}}},4942:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9142);function i(e,t,n){return(t=(0,r.Z)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},1752:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1120);function i(){return i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=(0,r.Z)(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},i.apply(this,arguments)}},1120:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:function(){return r}})},136:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9611);function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.Z)(e,t)}},8814:function(e,t,n){"use strict";function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}n.d(t,{Z:function(){return r}})},1413:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(4942);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},4165:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1002);function i(){i=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new _(r||[]);return a(o,"_invoke",{value:M(e,n,s)}),o}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p="suspendedStart",v="suspendedYield",m="executing",g="completed",y={};function b(){}function w(){}function S(){}var I={};d(I,u,(function(){return this}));var C=Object.getPrototypeOf,k=C&&C(C(D([])));k&&k!==n&&o.call(k,u)&&(I=k);var E=S.prototype=b.prototype=Object.create(I);function x(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function n(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==(0,r.Z)(d)&&o.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}})}function M(t,n,r){var i=p;return function(o,a){if(i===m)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=T(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=m;var c=h(t,n,r);if("normal"===c.type){if(i=r.done?g:v,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=g,r.method="throw",r.arg=c.arg)}}}function T(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=h(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function D(t){if(t||""===t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(o.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError((0,r.Z)(t)+" is not iterable")}return w.prototype=S,a(E,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:w,configurable:!0}),w.displayName=d(S,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,d(e,l,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},x(A.prototype),d(A.prototype,c,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new A(f(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},x(E),d(E,l,"Generator"),d(E,u,(function(){return this})),d(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=D,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(R),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;R(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:D(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}},9611:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:function(){return r}})},885:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(181);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||(0,r.Z)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},2982:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(907);var i=n(181);function o(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,i.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},9142:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1002);function i(e){var t=function(e,t){if("object"!==(0,r.Z)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==(0,r.Z)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===(0,r.Z)(t)?t:String(t)}},1002:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:function(){return r}})},181:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(907);function i(e,t){if(e){if("string"===typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}},3464:function(e,t,n){"use strict";n.d(t,{J:function(){return s},c:function(){return a}});for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="undefined"===typeof Uint8Array?[]:new Uint8Array(256),o=0;o<64;o++)i[r.charCodeAt(o)]=o;var a=function(e){var t,n=new Uint8Array(e),i=n.length,o="";for(t=0;t<i;t+=3)o+=r[n[t]>>2],o+=r[(3&n[t])<<4|n[t+1]>>4],o+=r[(15&n[t+1])<<2|n[t+2]>>6],o+=r[63&n[t+2]];return i%3===2?o=o.substring(0,o.length-1)+"=":i%3===1&&(o=o.substring(0,o.length-2)+"=="),o},s=function(e){var t,n,r,o,a,s=.75*e.length,u=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var l=new ArrayBuffer(s),d=new Uint8Array(l);for(t=0;t<u;t+=4)n=i[e.charCodeAt(t)],r=i[e.charCodeAt(t+1)],o=i[e.charCodeAt(t+2)],a=i[e.charCodeAt(t+3)],d[c++]=n<<2|r>>4,d[c++]=(15&r)<<4|o>>2,d[c++]=(3&o)<<6|63&a;return l}},3246:function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function i(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}n.d(t,{_:function(){return r},m:function(){return i}})},5512:function(e,t,n){"use strict";var r;function i(e){return e.nodeType===e.ELEMENT_NODE}function o(e){var t=null===e||void 0===e?void 0:e.host;return Boolean((null===t||void 0===t?void 0:t.shadowRoot)===e)}function a(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function s(e){try{var t=e.rules||e.cssRules;return t?((n=Array.from(t).map(u).join("")).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),n):null}catch(r){return null}var n}function u(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=s(e.styleSheet)||t}catch(n){}return t}n.d(t,{Bu:function(){return y},CO:function(){return O},DS:function(){return a},Df:function(){return U},GQ:function(){return G},IG:function(){return N},Jq:function(){return r},LS:function(){return u},VU:function(){return z},We:function(){return M},Zq:function(){return o},bZ:function(){return l},eD:function(){return D},pe:function(){return T},wR:function(){return d},zi:function(){return g}}),function(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"}(r||(r={}));var c=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function l(){return new c}function d(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,i=e.value,o=e.maskInputFn,a=i||"";return(t[n.toLowerCase()]||t[r])&&(a=o?o(a):"*".repeat(a.length)),a}var f="__rrweb_original__";var h,p,v=1,m=new RegExp("[^a-z0-9-_:]"),g=-2;function y(){return v++}var b=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,w=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,S=/^(data:)([^,]*),(.*)/i;function I(e,t){return(e||"").replace(b,(function(e,n,r,i,o,a){var s,u=r||o||a,c=n||i||"";if(!u)return e;if(!w.test(u))return"url(".concat(c).concat(u).concat(c,")");if(S.test(u))return"url(".concat(c).concat(u).concat(c,")");if("/"===u[0])return"url(".concat(c).concat((s=t,(s.indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+u)).concat(c,")");var l=t.split("/"),d=u.split("/");l.pop();for(var f=0,h=d;f<h.length;f++){var p=h[f];"."!==p&&(".."===p?l.pop():l.push(p))}return"url(".concat(c).concat(l.join("/")).concat(c,")")}))}var C=/^[^ \t\n\r\u000c]+/,k=/^[, \t\n\r\u000c]+/;function E(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function x(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function A(){var e=document.createElement("a");return e.href="",e.href}function M(e,t,n,r){return"src"===n||"href"===n&&r&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&r&&"#"!==r[0]?E(e,r):"background"!==n||!r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n&&r?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}for(var i=[];r(k),!(n>=t.length);){var o=r(C);if(","===o.slice(-1))o=E(e,o.substring(0,o.length-1)),i.push(o);else{var a="";o=E(e,o);for(var s=!1;;){var u=t.charAt(n);if(""===u){i.push((o+a).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,i.push((o+a).trim());break}"("===u&&(s=!0)}a+=u,n+=1}}}return i.join(", ")}(e,r):"style"===n&&r?I(r,A()):"object"===t&&"data"===n&&r?E(e,r):r:E(e,r)}function T(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&T(e.parentNode,t,n);for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&T(e.parentNode,t,n)}function N(e,t,n){var r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===r)return!1;if("string"===typeof t){if(r.classList.contains(t))return!0;if(r.closest(".".concat(t)))return!0}else if(T(r,t,!0))return!0;if(n){if(r.matches(n))return!0;if(r.closest(n))return!0}return!1}function R(e,t){var n=t.doc,i=t.mirror,o=t.blockClass,a=t.blockSelector,u=t.maskTextClass,c=t.maskTextSelector,l=t.inlineStylesheet,v=t.maskInputOptions,g=void 0===v?{}:v,y=t.maskTextFn,b=t.maskInputFn,w=t.dataURLOptions,S=void 0===w?{}:w,C=t.inlineImages,k=t.recordCanvas,E=t.keepIframeSrcFn,T=t.newlyAddedElement,R=void 0!==T&&T,_=function(e,t){if(!t.hasNode(e))return;var n=t.getId(e);return 1===n?void 0:n}(n,i);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:r.Document,childNodes:[],compatMode:e.compatMode}:{type:r.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:r.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:_};case e.ELEMENT_NODE:return function(e,t){for(var n=t.doc,i=t.blockClass,o=t.blockSelector,a=t.inlineStylesheet,u=t.maskInputOptions,c=void 0===u?{}:u,l=t.maskInputFn,v=t.dataURLOptions,g=void 0===v?{}:v,y=t.inlineImages,b=t.recordCanvas,w=t.keepIframeSrcFn,S=t.newlyAddedElement,C=void 0!==S&&S,k=t.rootId,E=function(e,t,n){if("string"===typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&e.matches(n)}(e,i,o),T=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return m.test(t)?"div":t}(e),N={},R=e.attributes.length,_=0;_<R;_++){var D=e.attributes[_];N[D.name]=M(n,T,D.name,D.value)}if("link"===T&&a){var O=Array.from(n.styleSheets).find((function(t){return t.href===e.href})),Z=null;O&&(Z=s(O)),Z&&(delete N.rel,delete N.href,N._cssText=I(Z,O.href))}if("style"===T&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){(Z=s(e.sheet))&&(N._cssText=I(Z,A()))}if("input"===T||"textarea"===T||"select"===T){var L=e.value,F=e.checked;"radio"!==N.type&&"checkbox"!==N.type&&"submit"!==N.type&&"button"!==N.type&&L?N.value=d({type:N.type,tagName:T,value:L,maskInputOptions:c,maskInputFn:l}):F&&(N.checked=F)}"option"===T&&(e.selected&&!c.select?N.selected=!0:delete N.selected);if("canvas"===T&&b)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var i=t.getImageData,o=f in i?i[f]:i;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(e)||(N.rr_dataURL=e.toDataURL(g.type,g.quality));else if(!("__context"in e)){var V=e.toDataURL(g.type,g.quality),B=document.createElement("canvas");B.width=e.width,B.height=e.height,V!==B.toDataURL(g.type,g.quality)&&(N.rr_dataURL=V)}if("img"===T&&y){h||(h=n.createElement("canvas"),p=h.getContext("2d"));var P=e,j=P.crossOrigin;P.crossOrigin="anonymous";var W=function(){try{h.width=P.naturalWidth,h.height=P.naturalHeight,p.drawImage(P,0,0),N.rr_dataURL=h.toDataURL(g.type,g.quality)}catch(e){console.warn("Cannot inline img src=".concat(P.currentSrc,"! Error: ").concat(e))}j?N.crossOrigin=j:P.removeAttribute("crossorigin")};P.complete&&0!==P.naturalWidth?W():P.onload=W}"audio"!==T&&"video"!==T||(N.rr_mediaState=e.paused?"paused":"played",N.rr_mediaCurrentTime=e.currentTime);C||(e.scrollLeft&&(N.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(N.rr_scrollTop=e.scrollTop));if(E){var U=e.getBoundingClientRect(),H=U.width,G=U.height;N={class:N.class,rr_width:"".concat(H,"px"),rr_height:"".concat(G,"px")}}"iframe"!==T||w(N.src)||(e.contentDocument||(N.rr_src=N.src),delete N.src);return{type:r.Element,tagName:T,attributes:N,childNodes:[],isSVG:x(e)||void 0,needBlock:E,rootId:k}}(e,{doc:n,blockClass:o,blockSelector:a,inlineStylesheet:l,maskInputOptions:g,maskInputFn:b,dataURLOptions:S,inlineImages:C,recordCanvas:k,keepIframeSrcFn:E,newlyAddedElement:R,rootId:_});case e.TEXT_NODE:return function(e,t){var n,i=t.maskTextClass,o=t.maskTextSelector,a=t.maskTextFn,s=t.rootId,u=e.parentNode&&e.parentNode.tagName,c=e.textContent,l="STYLE"===u||void 0,d="SCRIPT"===u||void 0;if(l&&c){try{e.nextSibling||e.previousSibling||(null===(n=e.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(c=(f=e.parentNode.sheet).cssRules?Array.from(f.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(h){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(h),e)}c=I(c,A())}var f;d&&(c="SCRIPT_PLACEHOLDER");!l&&!d&&c&&N(e,i,o)&&(c=a?a(c):c.replace(/[\S]/g,"*"));return{type:r.Text,textContent:c||"",isStyle:l,rootId:s}}(e,{maskTextClass:u,maskTextSelector:c,maskTextFn:y,rootId:_});case e.CDATA_SECTION_NODE:return{type:r.CDATA,textContent:"",rootId:_};case e.COMMENT_NODE:return{type:r.Comment,textContent:e.textContent||"",rootId:_};default:return!1}}function _(e){return void 0===e?"":e.toLowerCase()}function D(e,t){var n,s=t.doc,u=t.mirror,c=t.blockClass,l=t.blockSelector,d=t.maskTextClass,f=t.maskTextSelector,h=t.skipChild,p=void 0!==h&&h,v=t.inlineStylesheet,m=void 0===v||v,b=t.maskInputOptions,w=void 0===b?{}:b,S=t.maskTextFn,I=t.maskInputFn,C=t.slimDOMOptions,k=t.dataURLOptions,E=void 0===k?{}:k,x=t.inlineImages,A=void 0!==x&&x,M=t.recordCanvas,T=void 0!==M&&M,N=t.onSerialize,O=t.onIframeLoad,Z=t.iframeLoadTimeout,L=void 0===Z?5e3:Z,F=t.onStylesheetLoad,V=t.stylesheetLoadTimeout,B=void 0===V?5e3:V,P=t.keepIframeSrcFn,j=void 0===P?function(){return!1}:P,W=t.newlyAddedElement,U=void 0!==W&&W,H=t.preserveWhiteSpace,G=void 0===H||H,z=R(e,{doc:s,mirror:u,blockClass:c,blockSelector:l,maskTextClass:d,maskTextSelector:f,inlineStylesheet:m,maskInputOptions:w,maskTextFn:S,maskInputFn:I,dataURLOptions:E,inlineImages:A,recordCanvas:T,keepIframeSrcFn:j,newlyAddedElement:U});if(!z)return console.warn(e,"not serialized"),null;n=u.hasNode(e)?u.getId(e):!function(e,t){if(t.comment&&e.type===r.Comment)return!0;if(e.type===r.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"===typeof e.attributes.href&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(_(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===_(e.attributes.name)||"icon"===_(e.attributes.rel)||"apple-touch-icon"===_(e.attributes.rel)||"shortcut icon"===_(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&_(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(_(e.attributes.property).match(/^(og|twitter|fb):/)||_(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===_(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===_(e.attributes.name)||"googlebot"===_(e.attributes.name)||"bingbot"===_(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===_(e.attributes.name)||"generator"===_(e.attributes.name)||"framework"===_(e.attributes.name)||"publisher"===_(e.attributes.name)||"progid"===_(e.attributes.name)||_(e.attributes.property).match(/^article:/)||_(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===_(e.attributes.name)||"yandex-verification"===_(e.attributes.name)||"csrf-token"===_(e.attributes.name)||"p:domain_verify"===_(e.attributes.name)||"verify-v1"===_(e.attributes.name)||"verification"===_(e.attributes.name)||"shopify-checkout-api-token"===_(e.attributes.name)))return!0}}return!1}(z,C)&&(G||z.type!==r.Text||z.isStyle||z.textContent.replace(/^\s+|\s+$/gm,"").length)?y():g;var q=Object.assign(z,{id:n});if(u.add(e,q),n===g)return null;N&&N(e);var Y=!p;if(q.type===r.Element){Y=Y&&!q.needBlock,delete q.needBlock;var Q=e.shadowRoot;Q&&a(Q)&&(q.isShadowHost=!0)}if((q.type===r.Document||q.type===r.Element)&&Y){C.headWhitespace&&q.type===r.Element&&"head"===q.tagName&&(G=!1);for(var K={doc:s,mirror:u,blockClass:c,blockSelector:l,maskTextClass:d,maskTextSelector:f,skipChild:p,inlineStylesheet:m,maskInputOptions:w,maskTextFn:S,maskInputFn:I,slimDOMOptions:C,dataURLOptions:E,inlineImages:A,recordCanvas:T,preserveWhiteSpace:G,onSerialize:N,onIframeLoad:O,iframeLoadTimeout:L,onStylesheetLoad:F,stylesheetLoadTimeout:B,keepIframeSrcFn:j},X=0,J=Array.from(e.childNodes);X<J.length;X++){(te=D(J[X],K))&&q.childNodes.push(te)}if(i(e)&&e.shadowRoot)for(var $=0,ee=Array.from(e.shadowRoot.childNodes);$<ee.length;$++){var te;(te=D(ee[$],K))&&(a(e.shadowRoot)&&(te.isShadow=!0),q.childNodes.push(te))}}return e.parentNode&&o(e.parentNode)&&a(e.parentNode)&&(q.isShadow=!0),q.type===r.Element&&"iframe"===q.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(u){return}if("complete"===i){var a="about:blank";if(r.location.href!==a||e.src===a||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((function(){o||(t(),o=!0)}),n);e.addEventListener("load",(function(){clearTimeout(s),o=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&O){var n=D(t,{doc:t,mirror:u,blockClass:c,blockSelector:l,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:m,maskInputOptions:w,maskTextFn:S,maskInputFn:I,slimDOMOptions:C,dataURLOptions:E,inlineImages:A,recordCanvas:T,preserveWhiteSpace:G,onSerialize:N,onIframeLoad:O,iframeLoadTimeout:L,onStylesheetLoad:F,stylesheetLoadTimeout:B,keepIframeSrcFn:j});n&&O(e,n)}}),L),q.type===r.Element&&"link"===q.tagName&&"stylesheet"===q.attributes.rel&&function(e,t,n){var r,i=!1;try{r=e.sheet}catch(a){return}if(!r){var o=setTimeout((function(){i||(t(),i=!0)}),n);e.addEventListener("load",(function(){clearTimeout(o),i=!0,t()}))}}(e,(function(){if(F){var t=D(e,{doc:s,mirror:u,blockClass:c,blockSelector:l,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:m,maskInputOptions:w,maskTextFn:S,maskInputFn:I,slimDOMOptions:C,dataURLOptions:E,inlineImages:A,recordCanvas:T,preserveWhiteSpace:G,onSerialize:N,onIframeLoad:O,iframeLoadTimeout:L,onStylesheetLoad:F,stylesheetLoadTimeout:B,keepIframeSrcFn:j});t&&F(e,t)}}),B),q}function O(e,t){var n=t||{},r=n.mirror,i=void 0===r?new c:r,o=n.blockClass,a=void 0===o?"rr-block":o,s=n.blockSelector,u=void 0===s?null:s,l=n.maskTextClass,d=void 0===l?"rr-mask":l,f=n.maskTextSelector,h=void 0===f?null:f,p=n.inlineStylesheet,v=void 0===p||p,m=n.inlineImages,g=void 0!==m&&m,y=n.recordCanvas,b=void 0!==y&&y,w=n.maskAllInputs,S=void 0!==w&&w,I=n.maskTextFn,C=n.maskInputFn,k=n.slimDOM,E=void 0!==k&&k,x=n.dataURLOptions,A=n.preserveWhiteSpace,M=n.onSerialize,T=n.onIframeLoad,N=n.iframeLoadTimeout,R=n.onStylesheetLoad,_=n.stylesheetLoadTimeout,O=n.keepIframeSrcFn;return D(e,{doc:e,mirror:i,blockClass:a,blockSelector:u,maskTextClass:d,maskTextSelector:h,skipChild:!1,inlineStylesheet:v,maskInputOptions:!0===S?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===S?{password:!0}:S,maskTextFn:I,maskInputFn:C,slimDOMOptions:!0===E||"all"===E?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===E,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===E?{}:E,dataURLOptions:x,inlineImages:g,recordCanvas:b,preserveWhiteSpace:A,onSerialize:M,onIframeLoad:T,iframeLoadTimeout:N,onStylesheetLoad:R,stylesheetLoadTimeout:_,keepIframeSrcFn:void 0===O?function(){return!1}:O,newlyAddedElement:!1})}var Z=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function L(e,t){void 0===t&&(t={});var n=1,r=1;function i(e){var t=e.match(/\n/g);t&&(n+=t.length);var i=e.lastIndexOf("\n");r=-1===i?r+e.length:e.length-i}function o(){var e={line:n,column:r};return function(t){return t.position=new a(e),h(),t}}var a=function(e){this.start=e,this.end={line:n,column:r},this.source=t.source};a.prototype.content=e;var s=[];function u(i){var o=new Error("".concat(t.source||"",":").concat(n,":").concat(r,": ").concat(i));if(o.reason=i,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o;s.push(o)}function c(){return f(/^{\s*/)}function l(){return f(/^}/)}function d(){var t,n=[];for(h(),p(n);e.length&&"}"!==e.charAt(0)&&(t=k()||E());)!1!==t&&(n.push(t),p(n));return n}function f(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function h(){f(/^\s*/)}function p(e){var t;for(void 0===e&&(e=[]);t=v();)!1!==t&&e.push(t),t=v();return e}function v(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return u("End of comment missing");var a=e.slice(2,n-2);return r+=2,i(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function m(){var e=f(/^([^{]+)/);if(e)return F(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"\u200c")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function g(){var e=o(),t=f(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=F(t[0]);if(!f(/^:\s*/))return u("property missing ':'");var r=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:n.replace(Z,""),value:r?F(r[0]).replace(Z,""):""});return f(/^[;\s]*/),i}}function y(){var e,t=[];if(!c())return u("missing '{'");for(p(t);e=g();)!1!==e&&(t.push(e),p(t)),e=g();return l()?t:u("missing '}'")}function b(){for(var e,t=[],n=o();e=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),f(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:y()})}var w=C("import"),S=C("charset"),I=C("namespace");function C(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=o(),r=f(t);if(r){var i={type:e};return i[e]=r[1].trim(),n(i)}}}function k(){if("@"===e[0])return function(){var e=o(),t=f(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=f(/^([-\w]+)\s*/)))return u("@keyframes missing name");var r,i=t[1];if(!c())return u("@keyframes missing '{'");for(var a=p();r=b();)a.push(r),a=a.concat(p());return l()?e({type:"keyframes",name:i,vendor:n,keyframes:a}):u("@keyframes missing '}'")}}()||function(){var e=o(),t=f(/^@media *([^{]+)/);if(t){var n=F(t[1]);if(!c())return u("@media missing '{'");var r=p().concat(d());return l()?e({type:"media",media:n,rules:r}):u("@media missing '}'")}}()||function(){var e=o(),t=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:F(t[1]),media:F(t[2])})}()||function(){var e=o(),t=f(/^@supports *([^{]+)/);if(t){var n=F(t[1]);if(!c())return u("@supports missing '{'");var r=p().concat(d());return l()?e({type:"supports",supports:n,rules:r}):u("@supports missing '}'")}}()||w()||S()||I()||function(){var e=o(),t=f(/^@([-\w]+)?document *([^{]+)/);if(t){var n=F(t[1]),r=F(t[2]);if(!c())return u("@document missing '{'");var i=p().concat(d());return l()?e({type:"document",document:r,vendor:n,rules:i}):u("@document missing '}'")}}()||function(){var e=o();if(f(/^@page */)){var t=m()||[];if(!c())return u("@page missing '{'");for(var n,r=p();n=g();)r.push(n),r=r.concat(p());return l()?e({type:"page",selectors:t,declarations:r}):u("@page missing '}'")}}()||function(){var e=o();if(f(/^@host\s*/)){if(!c())return u("@host missing '{'");var t=p().concat(d());return l()?e({type:"host",rules:t}):u("@host missing '}'")}}()||function(){var e=o();if(f(/^@font-face\s*/)){if(!c())return u("@font-face missing '{'");for(var t,n=p();t=g();)n.push(t),n=n.concat(p());return l()?e({type:"font-face",declarations:n}):u("@font-face missing '}'")}}()}function E(){var e=o(),t=m();return t?(p(),e({type:"rule",selectors:t,declarations:y()})):u("selector missing")}return V(function(){var e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:s}}}())}function F(e){return e?e.replace(/^\s+|\s+$/g,""):""}function V(e,t){for(var n=e&&"string"===typeof e.type,r=n?e:t,i=0,o=Object.keys(e);i<o.length;i++){var a=e[o[i]];Array.isArray(a)?a.forEach((function(e){V(e,r)})):a&&"object"===typeof a&&V(a,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var B={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"};var P=/([^\\]):hover/,j=new RegExp(P.source,"g");function W(e,t){var n=null===t||void 0===t?void 0:t.stylesWithHoverClass.get(e);if(n)return n;var r=L(e,{silent:!0});if(!r.stylesheet)return e;var i=[];if(r.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){P.test(e)&&i.push(e)}))})),0===i.length)return e;var o=new RegExp(i.filter((function(e,t){return i.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g"),a=e.replace(o,(function(e){var t=e.replace(j,"$1.\\:hover");return"".concat(e,", ").concat(t)}));return null===t||void 0===t||t.stylesWithHoverClass.set(e,a),a}function U(){return{stylesWithHoverClass:new Map}}function H(e,t){var n=t.doc,i=t.hackCss,o=t.cache;switch(e.type){case r.Document:return n.implementation.createDocument(null,"",null);case r.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case r.Element:var a,s=function(e){var t=B[e.tagName]?B[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);a=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",s):n.createElement(s);var u={};for(var c in e.attributes)if(Object.prototype.hasOwnProperty.call(e.attributes,c)){var l=e.attributes[c];if("option"!==s||"selected"!==c||!1!==l)if(!0===l&&(l=""),c.startsWith("rr_"))u[c]=l;else{var d="textarea"===s&&"value"===c,f="style"===s&&"_cssText"===c;if(f&&i&&"string"===typeof l&&(l=W(l,o)),!d&&!f||"string"!==typeof l)try{if(e.isSVG&&"xlink:href"===c)a.setAttributeNS("http://www.w3.org/1999/xlink",c,l.toString());else if("onload"===c||"onclick"===c||"onmouse"===c.substring(0,7))a.setAttribute("_"+c,l.toString());else{if("meta"===s&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"===c){a.setAttribute("csp-content",l.toString());continue}("link"!==s||"preload"!==e.attributes.rel&&"modulepreload"!==e.attributes.rel||"script"!==e.attributes.as)&&("link"===s&&"prefetch"===e.attributes.rel&&"string"===typeof e.attributes.href&&e.attributes.href.endsWith(".js")||("img"===s&&e.attributes.srcset&&e.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",e.attributes.srcset):a.setAttribute(c,l.toString())))}}catch(b){}else{for(var h=n.createTextNode(l),p=0,v=Array.from(a.childNodes);p<v.length;p++){var m=v[p];m.nodeType===a.TEXT_NODE&&a.removeChild(m)}a.appendChild(h)}}}var g=function(t){var n=u[t];if("canvas"===s&&"rr_dataURL"===t){var r=document.createElement("img");r.onload=function(){var e=a.getContext("2d");e&&e.drawImage(r,0,0,r.width,r.height)},r.src=n.toString(),a.RRNodeType&&(a.rr_dataURL=n.toString())}else if("img"===s&&"rr_dataURL"===t){var i=a;i.currentSrc.startsWith("data:")||(i.setAttribute("rrweb-original-src",e.attributes.src),i.src=n.toString())}if("rr_width"===t)a.style.width=n.toString();else if("rr_height"===t)a.style.height=n.toString();else if("rr_mediaCurrentTime"===t&&"number"===typeof n)a.currentTime=n;else if("rr_mediaState"===t)switch(n){case"played":a.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":a.pause()}};for(var y in u)g(y);if(e.isShadowHost)if(a.shadowRoot)for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);else a.attachShadow({mode:"open"});return a;case r.Text:return n.createTextNode(e.isStyle&&i?W(e.textContent,o):e.textContent);case r.CDATA:return n.createCDATASection(e.textContent);case r.Comment:return n.createComment(e.textContent);default:return null}}function G(e,t){var n,o,a=t.doc,s=t.mirror,u=t.skipChild,c=void 0!==u&&u,l=t.hackCss,d=void 0===l||l,f=t.afterAppend,h=t.cache;if(s.has(e.id)){var p=s.getNode(e.id),v=s.getMeta(p);if(o=e,(n=v)&&o&&n.type===o.type&&(n.type===r.Document?n.compatMode===o.compatMode:n.type===r.DocumentType?n.name===o.name&&n.publicId===o.publicId&&n.systemId===o.systemId:n.type===r.Comment||n.type===r.Text||n.type===r.CDATA?n.textContent===o.textContent:n.type===r.Element&&n.tagName===o.tagName&&JSON.stringify(n.attributes)===JSON.stringify(o.attributes)&&n.isSVG===o.isSVG&&n.needBlock===o.needBlock))return s.getNode(e.id)}var m=H(e,{doc:a,hackCss:d,cache:h});if(!m)return null;if(e.rootId&&s.getNode(e.rootId)!==a&&s.replace(e.rootId,a),e.type===r.Document&&(a.close(),a.open(),"BackCompat"===e.compatMode&&e.childNodes&&e.childNodes[0].type!==r.DocumentType&&(e.childNodes[0].type===r.Element&&"xmlns"in e.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===e.childNodes[0].attributes.xmlns?a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),m=a),s.add(m,e),(e.type===r.Document||e.type===r.Element)&&!c)for(var g=0,y=e.childNodes;g<y.length;g++){var b=y[g],w=G(b,{doc:a,mirror:s,skipChild:!1,hackCss:d,afterAppend:f,cache:h});w?(b.isShadow&&i(m)&&m.shadowRoot?m.shadowRoot.appendChild(w):m.appendChild(w),f&&f(w,b.id)):console.warn("Failed to rebuild",b)}return m}function z(e,t){var n=t.doc,i=t.onVisit,o=t.hackCss,a=void 0===o||o,s=t.afterAppend,u=t.cache,l=t.mirror,d=void 0===l?new c:l,f=G(e,{doc:n,mirror:d,skipChild:!1,hackCss:a,afterAppend:s,cache:u});return function(e,t){for(var n=0,r=e.getIds();n<r.length;n++){var i=r[n];e.has(i)&&t(e.getNode(i))}}(d,(function(e){i&&i(e),function(e,t){var n=t.getMeta(e);if((null===n||void 0===n?void 0:n.type)===r.Element){var i=e;for(var o in n.attributes)if(Object.prototype.hasOwnProperty.call(n.attributes,o)&&o.startsWith("rr_")){var a=n.attributes[o];"rr_scrollLeft"===o&&(i.scrollLeft=a),"rr_scrollTop"===o&&(i.scrollTop=a)}}}(e,d)})),f}},1737:function(e,t,n){"use strict";n.d(t,{$1:function(){return p},Cj:function(){return E},E2:function(){return R},Fn:function(){return k},He:function(){return M},IT:function(){return g},OK:function(){return I},P2:function(){return d},WU:function(){return b},_X:function(){return N},_f:function(){return Z},fM:function(){return m},gp:function(){return v},jB:function(){return D},md:function(){return T},nF:function(){return y},on:function(){return u},qs:function(){return x},r$:function(){return h},s6:function(){return C},ug:function(){return _},vD:function(){return A},y5:function(){return w},yU:function(){return f},z6:function(){return S}});var r=n(5671),i=n(3144),o=n(2982),a=n(7762),s=n(5512);function u(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var c="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",l={map:{},getId:function(){return console.error(c),-1},getNode:function(){return console.error(c),null},removeNodeFromMap:function(){console.error(c)},has:function(){return console.error(c),!1},reset:function(){console.error(c)}};function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,i=0;return function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];var u=Date.now();i||!1!==n.leading||(i=u);var c=t-(u-i),l=this;c<=0||c>t?(r&&(clearTimeout(r),r=null),i=u,e.apply(l,a)):r||!1===n.trailing||(r=setTimeout((function(){i=!1===n.leading?0:Date.now(),r=null,e.apply(l,a)}),c))}}function f(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),o&&o.set&&o.set.call(this,e)}}),function(){return f(e,t,o||{},!0)}}function h(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return"function"===typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch(o){return function(){}}}function p(e){var t,n,r,i,o,a,s=e.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:(null===s||void 0===s?void 0:s.documentElement.scrollLeft)||(null===(n=null===(t=null===s||void 0===s?void 0:s.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===(r=null===s||void 0===s?void 0:s.body)||void 0===r?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null===s||void 0===s?void 0:s.documentElement.scrollTop)||(null===(o=null===(i=null===s||void 0===s?void 0:s.body)||void 0===i?void 0:i.parentElement)||void 0===o?void 0:o.scrollTop)||(null===(a=null===s||void 0===s?void 0:s.body)||void 0===a?void 0:a.scrollTop)||0}}function v(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function m(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function g(e,t,n,r){if(!e)return!1;var i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!i)return!1;if("string"===typeof t){if(i.classList.contains(t))return!0;if(r&&null!==i.closest("."+t))return!0}else if((0,s.pe)(i,t,r))return!0;if(n){if(i.matches(n))return!0;if(r&&null!==i.closest(n))return!0}return!1}function y(e,t){return-1!==t.getId(e)}function b(e,t){return t.getId(e)===s.zi}function w(e,t){if((0,s.Zq)(e))return!1;var n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||w(e.parentNode,t))}function S(e){return Boolean(e.changedTouches)}function I(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(!(0 in n))throw new TypeError("1 argument is required");do{if(e===i)return!0}while(i=i&&i.parentNode);return!1})}function C(e){var t,n={},r=function(e,t){var r={value:e,parent:t,children:[]};return n[e.node.id]=r,r},i=[],o=(0,a.Z)(e);try{for(o.s();!(t=o.n()).done;){var s=t.value,u=s.nextId,c=s.parentId;if(u&&u in n){var l=n[u];if(l.parent){var d=l.parent.children.indexOf(l);l.parent.children.splice(d,0,r(s,l.parent))}else{var f=i.indexOf(l);i.splice(f,0,r(s,null))}}else if(c in n){var h=n[c];h.children.push(r(s,h))}else i.push(r(s,null))}}catch(p){o.e(p)}finally{o.f()}return i}function k(e,t){t(e.value);for(var n=e.children.length-1;n>=0;n--)k(e.children[n],t)}function E(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function x(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function A(e,t){var n,r,i=null===(r=null===(n=e.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===r?void 0:r.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};var o=i.getBoundingClientRect(),a=A(i,t),s=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:s,absoluteScale:a.absoluteScale*s}}function M(e){return Boolean(null===e||void 0===e?void 0:e.shadowRoot)}function T(e,t){var n=e[t[0]];return 1===t.length?n:T(n.cssRules[t[1]].cssRules,t.slice(2))}function N(e){var t=(0,o.Z)(e),n=t.pop();return{positions:t,index:n}}function R(e){for(var t=new Set,n=[],r=e.length;r--;){var i=e[r];t.has(i.id)||(n.push(i),t.add(i.id))}return n}"undefined"!==typeof window&&window.Proxy&&window.Reflect&&(l=new Proxy(l,{get:function(e,t,n){return"map"===t&&console.error(c),Reflect.get(e,t,n)}}));var _=function(){function e(){(0,r.Z)(this,e),this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}return(0,i.Z)(e,[{key:"getId",value:function(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]),e}();function D(e){var t,n,r=null;return(null===(n=null===(t=e.getRootNode)||void 0===t?void 0:t.call(e))||void 0===n?void 0:n.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(r=e.getRootNode().host),r}function O(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=D(n);)n=t;return n}(e);return t.contains(n)}function Z(e){var t=e.ownerDocument;return!!t&&(t.contains(e)||O(e))}},1414:function(e,t,n){"use strict";n.d(t,{FX:function(){return a},SA:function(){return s},Y2:function(){return o},tw:function(){return r},yh:function(){return i}});var r=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(r||{}),i=function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e}(i||{}),o=function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e}(o||{}),a=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(a||{}),s=function(e){return 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}(s||{})}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.m=e,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))},n.u=function(e){return"static/js/"+e+"."+{329:"ba4f54c4",725:"acca8ce9"}[e]+".chunk.js"},n.miniCssF=function(e){return"static/css/"+e+".d0125416.chunk.css"},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={};n.l=function(t,r,i,o){if(e[t])e[t].push(r);else{var a,s;if(void 0!==i)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var l=u[c];if(l.getAttribute("src")==t||l.getAttribute("data-webpack")=="fe:"+i){a=l;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,n.nc&&a.setAttribute("nonce",n.nc),a.setAttribute("data-webpack","fe:"+i),a.src=t),e[t]=[r];var d=function(n,r){a.onerror=a.onload=null,clearTimeout(f);var i=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((function(e){return e(r)})),n)return n(r)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),s&&document.head.appendChild(a)}}}(),n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},n.p="/",function(){if("undefined"!==typeof document){var e=function(e){return new Promise((function(t,r){var i=n.miniCssF(e),o=n.p+i;if(function(e,t){for(var n=document.getElementsByTagName("link"),r=0;r<n.length;r++){var i=(a=n[r]).getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(i===e||i===t))return a}var o=document.getElementsByTagName("style");for(r=0;r<o.length;r++){var a;if((i=(a=o[r]).getAttribute("data-href"))===e||i===t)return a}}(i,o))return t();!function(e,t,n,r,i){var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",o.onerror=o.onload=function(n){if(o.onerror=o.onload=null,"load"===n.type)r();else{var a=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.href||t,u=new Error("Loading CSS chunk "+e+" failed.\n("+s+")");u.code="CSS_CHUNK_LOAD_FAILED",u.type=a,u.request=s,o.parentNode&&o.parentNode.removeChild(o),i(u)}},o.href=t,n?n.parentNode.insertBefore(o,n.nextSibling):document.head.appendChild(o)}(e,o,null,t,r)}))},t={179:0};n.f.miniCss=function(n,r){t[n]?r.push(t[n]):0!==t[n]&&{329:1}[n]&&r.push(t[n]=e(n).then((function(){t[n]=0}),(function(e){throw delete t[n],e})))}}}(),function(){var e={179:0};n.f.j=function(t,r){var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var o=new Promise((function(n,r){i=e[t]=[n,r]}));r.push(i[2]=o);var a=n.p+n.u(t),s=new Error;n.l(a,(function(r){if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,i[1](s)}}),"chunk-"+t,t)}};var t=function(t,r){var i,o,a=r[0],s=r[1],u=r[2],c=0;if(a.some((function(t){return 0!==e[t]}))){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(u)u(n)}for(t&&t(r);c<a.length;c++)o=a[c],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=self.webpackChunkfe=self.webpackChunkfe||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),function(){"use strict";var e={};n.r(e),n.d(e,{default:function(){return Et}});var t=n(4165),r=n(5861),i=n(603),o=n(9478),a=n(5671),s=n(3144),u=function(){function e(t){if((0,a.Z)(this,e),this.structuralVicinity=void 0,this.visualVicinity=void 0,this.serializedElement=void 0,this.attributes={},this.classes={},this.innerText=void 0,this.tag=void 0,this.style=void 0,this.innerFeatures=void 0,this.staticCandidates=void 0,this.positioning=void 0,this.svgs=void 0,"object"===typeof t)for(var n in t)this[n]=t[n];else if("string"===typeof t){var r=JSON.parse(t);for(var i in r)this[i]=r[i]}}return(0,s.Z)(e,[{key:"serialize",value:function(){return JSON.stringify(this)}}]),e}(),c={attributesToExtract:["class","src","placeholder","href","checked","disabled","contenteditable","draggable","hidden","inputmode","role","title","name","type","readonly","size","required","multiple","min","max","step","maxlength","alt","loop","controls","poster"],structuralVicinity:{type:"fixed",value:6,useDecayingLimit:!0},visualVicinity:{radius:50,scanStep:10},vicinityFeatureElementsOnly:!0,react:{}},l=n(1413),d=n(199),f=n(4942),h=function(){function e(t){var n=this;(0,a.Z)(this,e),this.document=t,this.attributesByTagName={rect:["width","height"],circle:["cx","cy","r"],ellipse:["cx","cy","rx","ry"],line:["x1","y1","x2","y2"],polygon:["points"],polyline:["points"],path:["d"],text:["x","y"]},this.limit=5,this.extractSVG=function(e){return Array.from(e.children).map((function(e){var t=n.attributesByTagName[e.tagName.toLowerCase()];if(!t)return null;var r=t.reduce((function(t,n){var r=e.getAttribute(n);return(0,l.Z)((0,l.Z)({},t),{},(0,f.Z)({},n,r))}),{});return{tagName:e.tagName.toLowerCase(),attributes:r}})).filter((function(e){return!!e}))}}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.matches("svg")?[e]:e.querySelectorAll("svg");if(t.length&&!(t.length>this.limit))return Array.from(t).map(this.extractSVG)}}]),e}(),p=n(7762),v=n(885),m=n(2982),g=function(){function e(t){(0,a.Z)(this,e),this.element=void 0,this.elRect=void 0,this.initialScrollPositions=void 0,this.element=t,this.elRect=this.element.getBoundingClientRect()}return(0,s.Z)(e,[{key:"scrollIntoView",value:function(){if(this.getScrollableParentsPositions(),!this.initialScrollPositions.length)return this;if(this.element.scrollIntoView({block:"center",inline:"center"}),!N(this.element)){var e,t=(0,p.Z)(this.initialScrollPositions);try{for(t.s();!(e=t.n()).done;){var n=e.value,r=n.element.getBoundingClientRect();if(this.elRect.top<r.top||this.elRect.bottom>r.bottom){var i=this.elRect.top-r.top+n.element.scrollTop;n.element.scrollTop=i}}}catch(o){t.e(o)}finally{t.f()}}return this}},{key:"restore",value:function(){this.initialScrollPositions.forEach((function(e){var t=e.element,n=e.top,r=e.left;try{t.scroll(r,n)}catch(Rt){console.warn("[ScrollHelper/restore] couldn't restore initial scroll for",{element:t,top:n,left:r},Rt)}}))}},{key:"getScrollableParentsPositions",value:function(){this.initialScrollPositions=[];for(var e=T(this.element);null!=e;){getComputedStyle(e);(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)&&this.initialScrollPositions.push({element:e,top:e.scrollTop,left:e.scrollLeft}),e=T(e)}}}]),e}(),y=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.target,i=void 0===r?document:r,o=n.disabled,s=void 0!==o&&o,u=n.log,c=void 0===u||u,l=n.name,d=n.monitorInput,f=void 0!==d&&d;(0,a.Z)(this,e),this.target=void 0,this.name=void 0,this.disabled=void 0,this.logActivity=void 0,this.monitorInput=void 0,this.cache=void 0,this.observer=void 0,this.ignoreMutationsWithAttributes=["checksum-data-visible","checksum-data-transparently-visible","checksum-data-visible-under-transparent-element","checksum-data-click-offset","checksum-target-node","checksumid"],this.ignoreMutationsWithAttributeRegexPatterns=["checksum-radial-traverse-.+"],this.ignoreElementsWithClasses=["checksum-dom-cache-ignore"],this.inputEnabledSelectors=["input","textarea","select","[contenteditable=true]"].join(","),this.shouldIgnoreMutationRecord=function(e){try{if("attributes"===e.type&&t.ignoreMutationsWithAttributes.includes(e.attributeName))return!0;if("attributes"===e.type&&t.ignoreMutationsWithAttributeRegexPatterns.some((function(t){return new RegExp("^"+t+"$").test(e.attributeName)})))return!0;if("attributes"===e.type&&"class"===e.attributeName){var n=function(e){return e.split(" ").filter((function(e){return![":hover","rrweb-paused"].includes(e)})).sort().join(" ")};return n(e.oldValue)===n(e.target.className)}var r=function(e){return t.ignoreElementsWithClasses.some((function(t){return e.classList.contains(t)}))};if("childList"===e.type&&Array.from(e.addedNodes).every((function(e){return r(e)}))&&Array.from(e.removedNodes).every((function(e){return r(e)})))return!0}catch(Rt){}return!1},this.monitoredTextElements=[],this.monitorInputEnabledElement=function(e){e.addEventListener("input",(function(e){t.invalidate()}))},this.target=i,this.name=l,this.disabled=s,this.logActivity=c,this.monitorInput=f,this.startObserver()}return(0,s.Z)(e,[{key:"startObserver",value:function(){var e=this;this.observer=new MutationObserver((function(t){t.every(e.shouldIgnoreMutationRecord)||(e.invalidate(),e.monitorInput&&t.forEach((function(t){t.addedNodes.forEach((function(t){if(t.nodeType===Node.ELEMENT_NODE){var n=t;(n.matches(e.inputEnabledSelectors)||n.isContentEditable)&&e.monitorInputEnabledElement(n)}}))})))})),this.observer.observe(this.target,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),this.monitorInput&&this.startInputMonitoring()}},{key:"startInputMonitoring",value:function(){this.monitoredTextElements=x(this.inputEnabledSelectors),this.monitoredTextElements.forEach(this.monitorInputEnabledElement)}},{key:"get",value:function(){return this.log("get","has cache:",!!this.cache),this.cache}},{key:"set",value:function(e){this.disabled||(this.cache=e)}},{key:"hasCache",value:function(){return this.log("hasCache",!!this.cache),!!this.cache}},{key:"invalidate",value:function(){this.set(void 0)}},{key:"log",value:function(){var e;if(this.logActivity){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).log.apply(e,["[DOMMutationDependentCache] ".concat(this.name?"[".concat(this.name,"]"):"",":")].concat(n))}}}],[{key:"getInstance",value:function(t,n){var r,i=this.makeNameForCache(t,null===n||void 0===n?void 0:n.flags);e.instances[i]||(e.instances[i]=new e((0,l.Z)((0,l.Z)({},n),{},{name:null!==(r=null===n||void 0===n?void 0:n.name)&&void 0!==r?r:t})),null!==n&&void 0!==n&&n.initialValue&&e.instances[i].set(null===n||void 0===n?void 0:n.initialValue));var o=e.instances[i];return null!==n&&void 0!==n&&n.invalidate&&o.invalidate(),o}},{key:"invalidateAll",value:function(){Object.values(e.instances).forEach((function(e){return e.invalidate()}))}},{key:"makeNameForCache",value:function(e,t){return"".concat(e).concat(t?JSON.stringify(t):"")}}]),e}();y.instances={},window.DOMMutationDependentCache=y;var b=["button","select","input","textarea","option","a","[role=button]","[role=checkbox]","[role=radio]","[role=link]","[type=button]","[aria-disabled=false]",'[id^="react-select"]'],w=["pointer","text","vertical-text","zoom-in","zoom-out","help"],S=["onClick","onMouseDown","onKeyDown","onKeyPress","onInput","onSelect","onDoubleClick","onDragStart","onDrag","onDragEnd","onDragOver","onDrop","onToggle"],I=["onclick","onmousedown","onkeydown","onkeypress","oninput","onselect","ondblclick","ondragstart","ondrag","ondragend","ondragover","ondrop","ontoggle"],C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.allowDisabled,i=void 0!==r&&r,o=n.useDataVisibleAttributes,a=void 0===o||o,s=n.excludeCrossOriginIframes,u=void 0===s||s,c=y.getInstance("getAllInteractableHTMLElements",{target:e}),l=Date.now(),d=function(e){var t=e.reduce((function(e,t){return!i&&t.state.disabled?e:[].concat((0,m.Z)(e),[t.element])}),[]);return console.log("[getAllInteractableHTMLElements] done, took",Date.now()-l,"ms"),t};if(c.hasCache())return d(c.get());var f=x("*",e,{excludeCrossOriginIframes:u}).reduce((function(e,n){var r,i="disabled"in n&&n.disabled,o=n.matches(b.concat(t.appSpecificInteractableElementsSelectors||[]).filter((function(e){return!!e})).join(","))||w.includes(window.getComputedStyle(n).cursor)||n.isContentEditable&&!(null!==(r=n.parentElement)&&void 0!==r&&r.isContentEditable)||t.useEventListenersToDetermineInteractability&&(I.some((function(e){return n[e]}))||function(e){if(window.getEventListeners){var t=window.getEventListeners(e);if(I.some((function(e){return t[e.slice(2)]})))return!0}var n=Object.keys(e).find((function(e){return e.startsWith("__reactFiber")})),r=n?e[n]:void 0;return!(!r||!r.memoizedProps)&&S.some((function(e){return r.memoizedProps[e]}))}(n));return o?[].concat((0,m.Z)(e),[{element:n,disabled:i}]):e}),[]),h=f.reduce((function(e,n){var r=k(n.element,t.appSpecificInteractableElementsSelectors||[]),i=e.find((function(e){return e.element===r}));return i?!n.disabled&&i.state.disabled&&(i.state.disabled=!1):e.push({element:r,state:{disabled:n.disabled}}),e}),[]).filter((function(e){var t=e.element;if(a){if(!t)return!1;var n=t.getAttribute("checksum-data-visible");if(n){var r="true"===n,i="true"===t.getAttribute("checksum-data-visible-under-transparent-element"),o="true"===t.getAttribute("checksum-data-transparently-visible");return r&&!i||o}}return!D(t,{markTransparentElementsAsHidden:!1}).isHidden}));return c.set(h),d(h)},k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e)return e;try{if("isContentEditable"in e&&e.isContentEditable)return e;if("closest"in e){var n=E(e,b.concat(t).filter((function(e){return!!e})).join(","));if(n)return n}var r=window.getComputedStyle(e).cursor;if(["auto","default","context-menu","help","progress","wait"].includes(r))return e;for(var i=e;i;){var o=i.parentElement;if(!o||(o.nodeType!==Node.ELEMENT_NODE||window.getComputedStyle(o).cursor)!==r)return i;i=i.parentNode}return e}catch(Rt){return console.error("getCompoundInteractableRootElement",e,Rt),e}};var E=function e(t,n){if(t.matches(n))return t;var r=t.slot;if(r){for(var i=t.parentElement;i;){if(i.shadowRoot){var o=i.shadowRoot.querySelector('slot[name="'.concat(r,'"]'));if(o)return e(o,n)}i=i.parentElement}return null}var a=t.closest(n);if(a)return a;var s=t.getRootNode();return s.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e(s.host,n):null},x=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.excludeCrossOriginIframes,i=void 0!==r&&r,o=n.includeHTML,a=void 0!==o&&o,s=[];return function t(n){!function(t){t.querySelectorAll(e).forEach((function(e){return s.push(e)}))}(n);var r=[];!function e(t){t.shadowRoot&&r.push(t.shadowRoot),t.childNodes.forEach((function(t){return e(t)}))}(n),r.forEach((function(e){return t(e)})),n.querySelectorAll("iframe").forEach((function(e){if(!i||!function(e){return!e.src||window.location.origin!==new URL(e.src).origin}(e))try{var n=e.contentDocument;n&&t(n)}catch(Rt){return}}))}(t),a&&t.documentElement.matches(e)&&s.push(t.documentElement),s};function A(e){var t=e.getRootNode();return t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?function(e,t){var n=e.querySelectorAll("slot");if(!n.length)return e.innerText;var r=e.cloneNode(!0),i=r.querySelectorAll("slot");return n.forEach((function(e,t){var n=e.assignedNodes();i[t].innerText=n.map((function(e){switch(e.nodeType){case Node.TEXT_NODE:return e.textContent;case Node.ELEMENT_NODE:return e.innerText}})).filter((function(e){return!!e})).join("\n")})),r.innerText.trim()}(e):e.innerText}var M=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).flattenShadowRootChildren,n=void 0!==t&&t,r=Array.from(e.childNodes);if(e.nodeType===Node.ELEMENT_NODE){var i,o=e;if(o.shadowRoot&&(r=r.filter((function(e){return!e.assignedSlot})),n?r=r.concat(Array.from(o.shadowRoot.childNodes)):r.push(o.shadowRoot)),"slot"===o.tagName.toLowerCase())(i=r).push.apply(i,(0,m.Z)(o.assignedNodes()))}return r},T=function(e){var t=e.parentElement;if(t)return t;switch(e.nodeType){case Node.ELEMENT_NODE:var n=e;if(n.assignedSlot)return n.assignedSlot;break;case Node.DOCUMENT_FRAGMENT_NODE:return e.host}var r=e.parentNode;return r&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r.host:null};function N(e){if(!e)return!1;var t=e.getBoundingClientRect();return t.top<=window.innerHeight&&t.left<=window.innerWidth&&t.bottom>=0&&t.right>=0}function R(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=window.getComputedStyle(e),r="0"===n.opacity;return{visible:"hidden"!==n.visibility&&"none"!==n.display&&(!t||!r),isTransparent:r}}function _(e,t){var n,r;return null!==(n=null!==t&&void 0!==t?t:null===e||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView)&&void 0!==n?n:window}function D(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.markTransparentElementsAsHidden,i=void 0===r||r,o=n.markElementsHiddenByTransparentElementAsVisible,a=void 0!==o&&o,s=n.scrollIntoView,u=void 0===s||s,c={isHidden:!0},d=function(e){return(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&t&&t.restore(),(0,l.Z)((0,l.Z)({},c),e)};if(!e)return d({isHidden:!0});var f=R(e="OPTION"===e.tagName&&(e.closest("select")||e.closest("datalist"))||e,i),h=f.visible,m=f.isTransparent;if(c.isTransparent=m,!h)return d({isHidden:!0});if(function(e){var t=e.parentElement,n=window.getComputedStyle(e);if("absolute"===n.position||"fixed"===n.position)return!1;var r=new g(e).scrollIntoView(),i=function(e){return r.restore(),e};for(;t;){if(!(t instanceof _(e).Element))return i(!1);var o=window.getComputedStyle(t);if("absolute"===o.position||"fixed"===o.position)return i(!1);if(("hidden"===o.overflowX||"hidden"===o.overflowY)&&!O(t,e))return i(!0);t=t.parentElement}return i(!1)}(e))return d({isHidden:!0});try{var y;u&&(t=new g(e).scrollIntoView());var b=function(e){var t=e.getBoundingClientRect(),n={top:0,left:0,right:window.innerWidth||document.documentElement.clientWidth,bottom:window.innerHeight||document.documentElement.clientHeight},r={top:Math.max(t.top,n.top),left:Math.max(t.left,n.left),right:Math.min(t.right,n.right),bottom:Math.min(t.bottom,n.bottom)};return r.width=r.right-r.left,r.height=r.bottom-r.top,r.width>0&&r.height>0?r:null}(e);if(!b)return d({isHidden:!0});var w,S=[[b.width/2,b.height/2,!0],[Math.max(.01*b.width,1),Math.max(.01*b.height,1)],[Math.min(.99*b.width,b.width-1),Math.max(.01*b.height,1)],[Math.max(.01*b.width,1),Math.min(.99*b.height,b.height-1)],[Math.min(.99*b.width,b.width-1),Math.min(.99*b.height,b.height-1)]],I=null!==(y=function(e){for(var t=e;t;){if(11===t.nodeType)return console.log(t),t;t=t.parentNode}}(e))&&void 0!==y?y:e.ownerDocument;if(e instanceof _(e).HTMLInputElement&&e.id&&e.type&&["checkbox","radio"].includes(e.type)){var C=x('label[for="'.concat(e.id,'"]'),I);C.length&&(w=C[0])}for(var k=0,E=S;k<E.length;k++){var A=(0,v.Z)(E[k],3),M=A[0],N=A[1],Z=A[2],L=b.left+M>=0&&b.left+M<=window.innerWidth?b.left+M:M,F=b.top+N>=0&&b.top+N<=window.innerHeight?b.top+N:N,V=I.elementFromPoint(L,F);if(V===e)return d({isHidden:!1,clickOffset:Z?void 0:{x:M,y:N}});if(V){if(!0===Z&&V.shadowRoot)return d(D(V));for(var B=V;B;){if(B===e||w&&w===B)return d({isHidden:!1,clickOffset:Z?void 0:{x:M,y:N}});B=T(B)}if(a)try{var P,j=I.elementsFromPoint(L,F),W=(0,p.Z)(j);try{for(W.s();!(P=W.n()).done;){var U=P.value;if(U===e)return d({isHidden:!1,clickOffset:Z?void 0:{x:M,y:N},isBehindTransparentElement:!0});var H=I.defaultView.getComputedStyle(U),G=U.getBoundingClientRect();if("0"!==H.opacity&&"hidden"!==H.visibility&&!/rgba\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*0\s*\)/.test(H.backgroundColor)||G.width>1.2*b.width||G.height>1.2*b.height)break}}catch(z){W.e(z)}finally{W.f()}}catch(Rt){console.error("Error while checking transparent elements over interactable",Rt)}}}return t&&(t.restore(),t=void 0),w?D(w):d({isHidden:!0})}catch(Rt){throw Rt}}function O(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.left<r.right&&n.right>r.left&&n.top<r.bottom&&n.bottom>r.top}function Z(e,t){try{var n=e.ownerDocument.defaultView;return e instanceof n[t]||e instanceof n.top[t]}catch(Rt){}return!1}!function(){for(var e=[],t=1;t<=20;t++){var n=t/20;e.push(n)}e.push(0)}();function L(e){try{return"fixed"===getComputedStyle(e).position||!(!e.parentElement||e.parentElement===document.body)&&L(e.parentElement)}catch(Rt){return console.error("isAncestorOrSelfFixed",Rt),!1}}function F(e){var t=e.getBoundingClientRect().top;return t<0?-t:0}function V(e){var t=e.getBoundingClientRect().bottom,n=window.innerHeight;return t>n?t-n:0}var B=function(e,t){var n=e.tagName.toLowerCase();switch(n){case"img":case"video":case"audio":return{type:d.EI.Media,tag:n,src:e.getAttribute("src"),size:{width:e.clientWidth,height:e.clientHeight},screenSize:{width:window.innerWidth,height:window.innerHeight},isRoot:t,isHidden:D(e).isHidden};case"svg":return{type:d.EI.SVG,tag:n,components:new h(document).extract(e)[0],isRoot:t,isHidden:D(e).isHidden};case"a":return{type:d.EI.Anchor,tag:n,href:e.getAttribute("href"),text:e.innerText,isRoot:t,isHidden:D(e).isHidden};case"button":return{type:d.EI.Button,tag:n,text:e.innerText,buttonType:e.getAttribute("type")||"button",isRoot:t,isHidden:D(e).isHidden};case"input":return{type:d.EI.Input,tag:n,inputType:e.getAttribute("type"),placeholder:e.getAttribute("placeholder"),isRoot:t,isHidden:D(e).isHidden};case"table":case"form":case"textarea":case"iframe":case"select":return{type:d.EI.NoData,tag:n,isRoot:t,isHidden:D(e).isHidden}}if(e.innerHTML.trim()===e.innerText&&e.innerHTML.length)return{type:d.EI.Text,tag:n,text:P(e.innerHTML),isRoot:t,isHidden:D(e).isHidden}},P=function(e){return e.length>256?e.substring(0,256)+"...":e},j=function(e){return Object.keys(e||{}).reduce((function(t,n){var r=e[n];return r&&(t[n]=r),t}),{})},W=function(e){var t=j(e);return!(!t||!Object.keys(t).length)},U=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.contains,i=void 0!==r&&r,o=n.matchWholeWord;return i?void 0!==o&&o?e===t||e.startsWith(t)||e.includes(" ".concat(t," "))||e.endsWith(t):e.includes(t):e===t},H=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.elementsByQueryCache={}}return(0,s.Z)(e,[{key:"getElementsByQuery",value:function(e){return this.elementsByQueryCache[e]||(this.elementsByQueryCache[e]=x(e,this.document)),this.elementsByQueryCache[e]}},{key:"extract",value:function(e){for(var t=this,n=e.element,r=e.setClass,i=e.setAttribute,o=e.getElementsInStructuralVicinity,a=e.getElementsInVisualVicinity,s=function(){var e=n.attributes[u],s=e.name,l=e.value;return c.attributesToExtract.includes(s)?"string"!==typeof l?0:"class"===s?(l.split(" ").forEach((function(e){e.length&&r(e,t.processAttribute({element:n,getElementsInStructuralVicinity:o,getElementsInVisualVicinity:a},s,e,{contains:!0,matchWholeWord:!0}))})),0):void i(s,t.processAttribute({element:n,getElementsInStructuralVicinity:o,getElementsInVisualVicinity:a},s,l)):0},u=0;u<n.attributes.length;++u)s()}},{key:"processAttribute",value:function(e,t,n){var r=e.element,i=e.getElementsInStructuralVicinity,o=e.getElementsInVisualVicinity,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=this.getElementsByQuery("*"),u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.contains,i=void 0!==r&&r,o=n.matchWholeWord,a=void 0!==o&&o;return t=t.replaceAll("\n","\\A ").replaceAll('"','\\"'),i?a?"[".concat(e,'="').concat(t,'"],[').concat(e,'*="').concat(t,' "],[').concat(e,'*=" ').concat(t,' "],[').concat(e,'*=" ').concat(t,'"]'):"[".concat(e,'*="').concat(t,'"]'):"[".concat(e,'="').concat(t,'"]')}(t,n,a),c=this.getElementsByQuery(u),l=this.getElementsByQuery("".concat(r.tagName.toLowerCase())),d=c.filter((function(e){return e.tagName===r.tagName})),f=i?i():[],h=f.filter((function(e){return e.element.attributes[t]&&U(e.element.attributes[t].value,n,a)})),p=o?o():[],v=p.filter((function(e){return e.element.attributes[t]&&U(e.element.attributes[t].value,n,a)}));return{value:n,globalUniqueness:1-c.length/s.length,tagUniqueness:1-d.length/l.length,structuralVicinityUniqueness:i?1-h.length/f.length:void 0,visualVicinityUniqueness:o?1-v.length/p.length:void 0}}}]),e}(),G=function(){function e(t){var n=this;(0,a.Z)(this,e),this.el=null,this.structuralVicinityData=void 0,this.visualVicinityData=void 0,this.serializedElement="",this.attributes={},this.classes={},this.innerText=void 0,this.tag=void 0,this.style=void 0,this.react=void 0,this.innerFeatures=void 0,this.positioning=void 0,this.svgs=void 0,this.attributesExtractor=void 0,this.getElementsInStructuralVicinity=function(){return n.structuralVicinityData.elementsInStructuralVicinity},this.setElementStructuralVicinityData=function(e){n.structuralVicinityData=e},this.setElementVisualVicinityData=function(e){n.visualVicinityData=e},this.getElementsInVisualVicinity=function(){return n.visualVicinityData},this.setSerializedElement=function(e){n.serializedElement=e},this.setAttribute=function(e,t){n.attributes[e]=t},this.setClass=function(e,t){n.classes[e]=t},this.setInnerText=function(e){n.innerText=e},this.setStyle=function(e){n.style=e},this.setTag=function(e){n.tag=e},this.setReact=function(e){n.react=e},this.setInnerFeatures=function(e){n.innerFeatures=e},this.setPositioning=function(e){n.positioning=e},this.setSVGs=function(e){n.svgs=e},this.el=t,this.attributesExtractor=new H(this.el.ownerDocument)}return(0,s.Z)(e,[{key:"serialize",value:function(){}},{key:"getSerializedElement",value:function(){return this.serializedElement}},{key:"element",get:function(){return this.el}},{key:"getAttributes",value:function(){return this.attributes}},{key:"getClasses",value:function(){return this.classes}},{key:"getStyle",value:function(){return this.style}},{key:"getInlineStyle",value:function(){return this.style.inline}},{key:"getComputedStyle",value:function(){return this.style.computed}},{key:"getTag",value:function(){return this.tag}},{key:"getInnerFeatures",value:function(){return this.innerFeatures}},{key:"getInnerText",value:function(){return this.innerText}},{key:"getSVGs",value:function(){return this.svgs}},{key:"toMetadata",value:function(){return{structuralVicinity:this.makeStructuralVicinityMetadata(),visualVicinity:this.makeVisualVicinityMetadata(),serializedElement:this.getSerializedElement(),attributes:this.getAttributes(),classes:this.getClasses(),innerText:this.getInnerText(),tag:this.getTag(),style:this.getStyle(),innerFeatures:this.getInnerFeatures(),staticCandidates:this.extractStaticCandidates(),positioning:this.positioning,svgs:this.getSVGs()}}},{key:"extractStaticCandidates",value:function(){return j({text:this.extractStaticTextCandidate(),labeled:this.extractLabeled(),labeling:this.extractLabeling(),svgTitle:this.extractSVGTitle()})}},{key:"makeVicinityMetadata",value:function(e,t){var n=this;return e.reduce((function(e,r){var i=n.isVicinityQualifiedElement(r.element),o=i.qualified,a=i.feature;if(!o)return e;var s={},u={};n.attributesExtractor.extract({element:r.element,setClass:function(e,t){return s[e]=t},setAttribute:function(e,t){return u[e]=t}});var c=(0,l.Z)({tag:r.element.tagName.toLowerCase(),classes:s,attributes:u,text:n.extractTextForMetadata(r.element),feature:a,relativePosition:n.element.compareDocumentPosition(r.element)},t(r));return e.push(c),e}),[])}},{key:"makeStructuralVicinityMetadata",value:function(){return this.makeVicinityMetadata(this.getElementsInStructuralVicinity(),(function(e){return{position:e.position}}))}},{key:"makeVisualVicinityMetadata",value:function(){return this.makeVicinityMetadata(this.getElementsInVisualVicinity(),(function(e){return{position:[e.position],distance:e.distance}}))}},{key:"isVicinityQualifiedElement",value:function(e){if(e===this.element)return{qualified:!1};if(!c.vicinityFeatureElementsOnly)return{qualified:!0};var t=B(e);return{qualified:!!t,feature:t}}},{key:"extractTextForMetadata",value:function(e){if(e.innerHTML===e.innerText){var t=e.innerHTML;return t.length>256?t.substring(0,256)+"...":t}}},{key:"extractStaticTextCandidate",value:function(){var e,t,n;switch(this.tag){case"input":case"textarea":return null===(e=this.attributes)||void 0===e||null===(t=e.placeholder)||void 0===t?void 0:t.value;default:return null===(n=this.innerText)||void 0===n?void 0:n.content}}},{key:"extractLabeling",value:function(){if("label"===this.element.tagName.toLowerCase())return A(this.element);var e=E(this.element,"label");if(e&&this.attributeExists(e.getAttribute("for")))return A(e);try{if(this.element.id&&this.element.id.length)if(x('[aria-labelledby="'.concat(this.element.id,'"]')).length)return A(this.element)}catch(Rt){console.error("extractLabeling error",Rt)}}},{key:"extractLabeled",value:function(){var e=this.element.getAttribute("aria-label");if(this.attributeExists(e))return e;var t=E(this.element,"label");if(t&&!this.attributeExists(t.getAttribute("for")))return A(t);if(this.element.id&&this.element.id.length)try{var n=x("label[for=".concat(this.element.id,"]"));if(n.length)return A(n[0])}catch(Rt){return}var r=this.element.getAttribute("aria-labelledby");if(this.attributeExists(r)){var i=x(r.split(" ").map((function(e){return"#".concat(e)})).join(","));if(i.length)return A(i[0])}}},{key:"extractSVGTitle",value:function(){try{if("svg"!==this.element.tagName.toLowerCase())return;var e=this.element.querySelector("title");if(!e)return;return A(e)}catch(Rt){console.error("extractSVGTitle error",Rt)}}},{key:"attributeExists",value:function(e){return e&&e.length>0}}]),e}(),z=function(){function e(t,n){(0,a.Z)(this,e),this.element=void 0,this.config=void 0,this.structuralVicinityData={elementsInStructuralVicinity:[],html:""},this.element=t,this.config=n}return(0,s.Z)(e,[{key:"getInitialLimit",value:function(){switch(this.config.type){case"ratio":return document.querySelectorAll("*").length*this.config.value;case"fixed":return this.config.value}}},{key:"calculate",value:function(){var e=Date.now().toString();return this.structuralVicinityData.html=this.populateStructuralVicinity(this.element,[d.i7.Element],{runId:e,step:0,limit:this.getInitialLimit()}),this.structuralVicinityData.elementsInStructuralVicinity.forEach((function(t){return t.element.attributes.removeNamedItem("checksum-radial-traverse-".concat(e))})),this.structuralVicinityData}},{key:"populateStructuralVicinity",value:function(e,t,n){var r=this,i=n.runId,o=n.step,a=n.limit;if(!e||o>a)return"";if(void 0!==e.attributes["checksum-radial-traverse-".concat(i)])return"";this.structuralVicinityData.elementsInStructuralVicinity.push({element:e,position:t}),e.setAttribute("checksum-radial-traverse-".concat(i),o.toString());var s={runId:i,step:o+1,limit:this.config.useDecayingLimit?a-1:a},u=this.populateStructuralVicinity(T(e),[].concat((0,m.Z)(t),[d.i7.Parent]),s),c=this.populateStructuralVicinity(e.previousElementSibling,[].concat((0,m.Z)(t),[d.i7.LeftSibling]),s),l=this.populateStructuralVicinity(e.nextElementSibling,[].concat((0,m.Z)(t),[d.i7.RightSibling]),s),f=[];(function(e){var t,n,r=Array.from(e.children);return e.shadowRoot&&(t=r=r.filter((function(e){return!e.assignedSlot}))).push.apply(t,(0,m.Z)(Array.from(e.shadowRoot.children))),"slot"===e.tagName.toLowerCase()&&(n=r).push.apply(n,(0,m.Z)(e.assignedElements())),r})(e).map((function(e,n){return f.push(r.populateStructuralVicinity(e,[].concat((0,m.Z)(t),[d.i7.Child]),s))}));var h=c+e.outerHTML.replace(e.innerHTML,f.join(""))+l;return u&&!u.includes(e.outerHTML)?u.replace("></",">".concat(h,"</")):u?u.replace(e.outerHTML,h):h}}]),e}(),q=function(e){return e[e.New=0]="New",e[e.Covered=1]="Covered",e[e.ElementTooBig=2]="ElementTooBig",e[e.Self=3]="Self",e}(q||{}),Y=function(){function e(t,n){var r;(0,a.Z)(this,e),this.document=t,this.config=n,this.debug=!1,this.sampleBoxColors=(r={},(0,f.Z)(r,q.New,"green"),(0,f.Z)(r,q.Covered,"orange"),(0,f.Z)(r,q.ElementTooBig,"red"),(0,f.Z)(r,q.Self,"blue"),r)}return(0,s.Z)(e,[{key:"calculate",value:function(e){for(var t=this,n=[],r=this.config.radius,i=this.config.scanStep,o=e.getBoundingClientRect(),a=o.left-r;a<o.left+o.width+r;a+=i)for(var s=function(){var e=a+i/2,s=u+i/2;if(t.doesRectContain(o,{left:a,top:u,right:a+i,bottom:u+i}))return t.addTrace(e,s,i,q.Self),0;var c=t.document.elementFromPoint(e,s);if(!c)return 0;var l=c.getBoundingClientRect();if(l.width>2*r&&l.height>2*r||t.doesRectContain(l,o))return t.addTrace(e,s,i,q.ElementTooBig),0;if(!!n.find((function(e){return e.element===c})))return t.addTrace(e,s,i,q.Covered),0;var d=t.getPosition(o,l),f=d.position,h=d.distance;n.push({element:c,position:f,distance:h}),t.addTrace(e,s,i,q.New)},u=o.top-r;u<o.top+o.height+r;u+=i)s();return n}},{key:"getPosition",value:function(e,t){var n=this.getCenter(t),r=n.x,i=n.y,o=this.getCenter(e),a=o.x,s=o.y;return{distance:Number(Math.sqrt(Math.pow(a-r,2)+Math.pow(s-i,2)).toFixed(2)),position:function(){var e=r-a,t=i-s;return e<0&&t<0?d.BM.TopLeft:e>0&&t<0?d.BM.TopRight:e<0&&t>0?d.BM.BottomLeft:e>0&&t>0?d.BM.BottomRight:0===e&&t<0?d.BM.Top:0===e&&t>0?d.BM.Bottom:e<0&&0===t?d.BM.Left:e>0&&0===t?d.BM.Right:d.BM.Center}()}}},{key:"getCenter",value:function(e){return{x:e.width/2+e.left,y:e.height/2+e.top}}},{key:"addTrace",value:function(e,t,n,r){if(this.debug){var i=this.document.createElement("xdiv");i.setAttribute("style","position: absolute; width: ".concat(n,"px; height: ").concat(n,"px; top: ").concat(t,"px; left: ").concat(e,"px; background: ").concat(this.sampleBoxColors[r],"; z-index: 999999999999;opacity:0.4")),this.document.getElementsByTagName("body")[0].prepend(i)}}},{key:"doesRectContain",value:function(e,t){return t.left>=e.left&&t.right<=e.right&&t.top>=e.top&&t.bottom<=e.bottom}},{key:"doRectsOverlap",value:function(e,t){var n=e.right<t.left,r=e.left>t.right,i=e.top>t.bottom,o=e.top<t.top;return!(n||r||i||o)}}]),e}();window.vve=new Y({radius:50,scanStep:10});var Q=n(2352);window.resq$=Q.resq$,window.resq$$=Q.resq$$;var K=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=this.findParentComponent(e,{ignoreBaseElement:!0});return{component:t,parentComponent:this.findParentComponent(t.node)}}},{key:"findParentComponent",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.ignoreBaseElement,i=void 0!==r&&r,o=n.baseElement,a=void 0===o?void 0:o,s=(0,Q.resq$$)("*",e.parentElement).find((function(t){return 1===t.children.length&&t.children[0].node===e}));return a=null!==(t=a)&&void 0!==t?t:e,s&&(i||s.node!==a)?this.parseRESQresult(s):this.findParentComponent(e.parentElement,{baseElement:a,ignoreBaseElement:i})}},{key:"parseRESQresult",value:function(e){if(e){return{name:e.name,node:e.node,isFragment:e.isFragment,stateTokens:function e(t){switch(typeof t){case"string":return[t];case"object":return Array.isArray(t)?t.map(e):Object.keys(t)}}(e.state),propsNames:Object.keys(e.props),hasChildren:!!e.children.length}}}}]),e}(),X=new K,J=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"extract",value:function(e){return{component:void 0,parentComponent:void 0}}}]),e}(),$=(new J,function(){function e(t,n){(0,a.Z)(this,e),this.element=void 0,this.config=void 0,this.provider=X,this.element=t,this.config=n}return(0,s.Z)(e,[{key:"extract",value:function(){return this.provider.extract(this.element)}}]),e}()),ee=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.tagBaseComputedStyle={}}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.element,n=e.setStyle,r=t.tagName.toLowerCase();if(!this.tagBaseComputedStyle[r]){var i=this.document.createElement(r);this.document.getElementsByTagName("body")[0].prepend(i),this.tagBaseComputedStyle[r]=this.sanitzieStyle(window.getComputedStyle(i)),i.remove()}n({inline:this.sanitzieStyle(t.style,{acceptEmptyValue:!1}),computed:this.diffComputedStyle(this.tagBaseComputedStyle[r],this.sanitzieStyle(window.getComputedStyle(t)))})}},{key:"diffComputedStyle",value:function(e,t){var n,r;return n=e,r=t,Object.keys(r).reduce((function(e,t){return n[t]===r[t]?e:(0,l.Z)((0,l.Z)({},e),{},(0,f.Z)({},t,r[t]))}),{})}},{key:"sanitzieStyle",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).acceptEmptyValue,n=void 0===t||t;return Object.keys(e).reduce((function(t,r){if(!isNaN(r))return t;var i=e[r];return n||i?(t[r]=i,t):t}),{})}}]),e}(),te=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.makeFeatureNode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=e.nodeType===Node.ELEMENT_NODE;return{type:e.nodeType,tag:n?e.tagName.toLowerCase():void 0,feature:n?B(e,t):void 0,children:[],isRoot:t}},this.includeRootElements=!0,this.rootElementsTypeExceptions=[d.EI.Text]}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=[],n=this.makeFeatureNode(e,!0);return this.walk(e,n,t),t}},{key:"walk",value:function(e,t,n){var r=this,i=!1;M(e).forEach((function(e){var o=r.makeFeatureNode(e),a=r.walk(e,o,n);a&&t.children.push(o),i||(i=a)}));var o=!!t.feature;return!o||t.isRoot&&!this.shouldIncludeRootNode(t)||n.push(t.feature),o||i}},{key:"shouldIncludeRootNode",value:function(e){return!!this.includeRootElements&&!this.rootElementsTypeExceptions.includes(e.type)}}]),e}();window.inner_features_extractor=new te;var ne=n(8901),re=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.exact,r=void 0!==n&&n,i=t.tag;return x(void 0===i?"*":i).filter((function(t){return r?t.textContent.trim()===e.trim():t.textContent.includes(e)}))},ie=function(){function e(t){(0,a.Z)(this,e),this.document=t}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=A(e);if(t){var n=ne.M.get().innerText.qualification.maxLength;if(t.length>n)return{content:t,exactMatches:1,containsMatches:1,indexInOrderedSearch:1};var r=re(t,{exact:!0}),i=re(t);return{content:t,exactMatches:r.length,containsMatches:i.length,indexInOrderedSearch:r.indexOf(e)}}}}]),e}(),oe=function(){function e(t){(0,a.Z)(this,e),this.document=t}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.getBoundingClientRect(),n=t.top,r=t.bottom,i=t.left,o=t.right,a=document.documentElement.scrollHeight,s=document.documentElement.scrollWidth;return{viewport:{size:{height:window.innerHeight,width:window.innerWidth},element:{top:this.normalize(n,window.innerHeight),bottom:this.normalize(r,window.innerHeight),left:this.normalize(i,window.innerWidth),right:this.normalize(o,window.innerWidth)}},document:{size:{height:a,width:s},element:{top:this.normalize(n+window.scrollY,a),bottom:this.normalize(r+window.scrollY,a),left:this.normalize(i+window.scrollX,s),right:this.normalize(o+window.scrollX,s)}}}}},{key:"normalize",value:function(e,t){return e/t}}]),e}(),ae=function(){function e(t,n){(0,a.Z)(this,e),this.xmlSerializer=void 0,this.document=void 0,this.config=void 0,this.visualVicinityExtractor=void 0,this.styleExtractor=void 0,this.innerFeaturesExtractor=void 0,this.innerTextExtractor=void 0,this.positioningExtractor=void 0,this.xmlSerializer=new XMLSerializer,this.document=t,this.config=null!==n&&void 0!==n?n:c,this.visualVicinityExtractor=new Y(this.document,this.config.visualVicinity),this.styleExtractor=new ee(this.document),this.innerFeaturesExtractor=new te(this.document),this.innerTextExtractor=new ie(this.document),this.positioningExtractor=new oe(this.document)}return(0,s.Z)(e,[{key:"isSameDocument",value:function(e){return this.document===e}},{key:"extract",value:function(e){var t=new g(e).scrollIntoView(),n=new G(e);return this.serializeElement(n),this.populateElementsInStructuralVicinity(n),this.populateElementsInVisualVicinity(n),this.extractAttributes(n),this.extractInnerText(n),this.extractStyle(n),this.extractTag(n),this.extractInnerFeatures(n),this.extractPositioning(n),this.extractSVGComponents(n),t.restore(),n}},{key:"extractReact",value:function(e){var t=e.element;(0,e.setReact)(new $(t,this.config.react).extract())}},{key:"extractTag",value:function(e){var t=e.element;(0,e.setTag)(t.tagName.toLowerCase())}},{key:"extractPositioning",value:function(e){var t=e.element;(0,e.setPositioning)(this.positioningExtractor.extract(t))}},{key:"extractSVGComponents",value:function(e){var t=e.element;(0,e.setSVGs)(new h(this.document).extract(t))}},{key:"serializeElement",value:function(e){e.element,e.setSerializedElement}},{key:"extractAttributes",value:function(e){var t=e.element,n=e.setClass,r=e.setAttribute,i=e.getElementsInStructuralVicinity,o=e.getElementsInVisualVicinity;return new H(this.document).extract({element:t,setClass:n,setAttribute:r,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o})}},{key:"populateElementsInStructuralVicinity",value:function(e){var t=e.element;(0,e.setElementStructuralVicinityData)(new z(t,this.config.structuralVicinity).calculate())}},{key:"populateElementsInVisualVicinity",value:function(e){var t=e.element;(0,e.setElementVisualVicinityData)(this.visualVicinityExtractor.calculate(t))}},{key:"extractInnerText",value:function(e){var t=e.element;(0,e.setInnerText)(this.innerTextExtractor.extract(t))}},{key:"extractStyle",value:function(e){var t=e.element,n=e.setStyle;return this.styleExtractor.extract({element:t,setStyle:n})}},{key:"extractInnerFeatures",value:function(e){var t=e.element;(0,e.setInnerFeatures)(this.innerFeaturesExtractor.extract(t))}}]),e}(),se=n(3536),ue=function(){function e(t,n){(0,a.Z)(this,e),this.targetElementESRAMetadata=void 0,this.targetElementStaticData={},this.esraMetadataExtractor=void 0,this.qualifiedAttributes=[],this.qualifiedAttributesMap={},this.qualifiedClasses=[],this.qualifiedInnerFeatures=void 0,this.qualifiedInnerText=void 0,this.candidateQueries=[],this.candidates=[],this.uniqueCandidates=[],this.rankedCandidates=[],this.filteredAndSortedRankedCandidates=[],this.finalCandidates=[],this.removedCandidates=void 0,this.similarity=void 0,this.weightsSum=0,this.config={innerText:{dropIfMoreThanNCandidates:5},innerFeatures:{mandatoryPercentage:.6,mandatoryMax:6},results:{scorePercentile:.75,epsilon:.01}},this.targetElementESRAMetadata=t,this.targetElementStaticData=n,this.similarity=new se.k(this.targetElementESRAMetadata),this.esraMetadataExtractor=new ae(document)}return(0,s.Z)(e,[{key:"makeWeight",value:function(e){return this.weightsSum+=e,e}},{key:"getWeight",value:function(e){return e/this.weightsSum}},{key:"extractMetadata",value:function(e){return new u(this.esraMetadataExtractor.extract(e).toMetadata())}},{key:"getLastSelectionLogs",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;if(null===(e=this.candidates)||void 0===e||!e.length)return{};var n=new XMLSerializer,r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return e.slice(0,t).map((function(e){return{score:e.score,metadata:e.metadata,element:n.serializeToString(e.candidate).substring(0,200)}}))},i=this.rankedCandidates[Math.min(this.rankedCandidates.length-1,t)].score,o=function(e){return r(e,t).filter((function(e){return e.score>=i}))};return{candidatesQuery:this.candidateQueries.filter((function(e){return!!e.length})).join(","),totalUniqueCandidates:this.uniqueCandidates.length,topRankingCandidates:r(this.rankedCandidates,t),topRemovedCandidates:{hidden:o(this.removedCandidates.hidden),staticData:o(this.removedCandidates.static)}}}},{key:"select",value:function(){var t,n,r=this;if("html"===this.targetElementESRAMetadata.tag){var i=document.querySelector("html");return[{candidate:i,score:1,esraMetadata:this.extractMetadata(i)}]}this.setQualifiedAttributesQueries(),this.setQualifiedClassesQueries(),this.setInnerFeaturesQueries(),this.candidates=[];var o,a=this.candidateQueries.filter((function(e){return!!e.length})).join(",");(a.length&&(this.candidates=x(a)),(t=this.candidates).push.apply(t,(0,m.Z)(this.getInnerTextCandidates())),this.candidates.length)||(o=this.candidates).push.apply(o,(0,m.Z)(this.getTagCandidates()));this.uniqueCandidates=this.candidates.filter((function(e,t,n){return n.indexOf(e)===t}));var s=e.limitChildren;null!==(n=s)&&void 0!==n&&n.length&&(s=s.map((function(e){return(0,l.Z)((0,l.Z)({},e),{},{parent:document.querySelector(e.selector)})})),this.uniqueCandidates=this.uniqueCandidates.filter((function(e){var t,n=(0,p.Z)(s);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i.parent&&r.isDescendant(i.parent,e)&&i.limit--<=0)return!1}}catch(o){n.e(o)}finally{n.f()}return!0}))),this.rankedCandidates=this.uniqueCandidates.filter((function(e){return e instanceof _(e).HTMLElement})).map((function(e){var t=r.extractMetadata(e),n=r.similarity.rank(t);return{score:n.score,candidate:e,scores:n.scores,esraMetadata:t}})).sort((function(e,t){return t.score-e.score})),this.removedCandidates={hidden:[],static:[]},this.filteredAndSortedRankedCandidates=this.rankedCandidates.filter((function(e){var t=r.isHidden(e.candidate),n=t.isHidden,i=t.clickOffset;return!0===n?(r.removedCandidates.hidden.push(e),!1):(i&&(e.clickOffset=i),!(W(r.targetElementStaticData)&&!function(e,t){var n=j(e),r=j(t),i=function(e){return!e||0===Object.keys(e).length};if(i(n)&&i(r))return!0;if(i(n)||i(r))return!1;var o=Object.keys(n).sort(),a=Object.keys(r).sort();if(o.length!==a.length)return!1;if(!o.every((function(e,t){return e===a[t]})))return!1;for(var s in n)if(n[s]!==r[s])return!1;return!0}(r.formatStaticCandidates(e.esraMetadata.staticCandidates),r.targetElementStaticData))||(e.metadata=JSON.stringify(e.esraMetadata.staticCandidates),r.removedCandidates.static.push(e),!1))})),this.removedCandidates.hidden.slice().reverse().forEach((function(e,t,n){"INPUT"===e.candidate.tagName&&r.filteredAndSortedRankedCandidates.find((function(t){return t.score>.1&&t.candidate.contains(e.candidate)}))&&(r.removedCandidates.hidden.splice(n.length-1-t,1),r.filteredAndSortedRankedCandidates.push(e))})),this.filteredAndSortedRankedCandidates=this.filteredAndSortedRankedCandidates.sort((function(e,t){return t.score-e.score}));var u=this.filteredAndSortedRankedCandidates.length*(1-this.config.results.scorePercentile);this.finalCandidates=[];for(var c=null,d=0;d<this.filteredAndSortedRankedCandidates.length;++d){var f=this.filteredAndSortedRankedCandidates[d];if(d>=u&&(!c||c.score-f.score>this.config.results.epsilon))break;c=f,this.finalCandidates.push(f)}return this.finalCandidates}},{key:"selectOne",value:function(){var e=this.select();return e.length?e[0]:{candidate:void 0,score:0,esraMetadata:void 0}}},{key:"getFinalCandidates",value:function(){return this.finalCandidates}},{key:"setQualifiedAttributesQueries",value:function(){var e=this;this.candidateQueries.push(this.similarity.getQualifiedAttributes().map((function(t){return"[".concat(t,'="').concat(e.targetElementESRAMetadata.attributes[t].value,'"]')})).join(","))}},{key:"setQualifiedClassesQueries",value:function(){this.candidateQueries.push(this.similarity.getQualifiedClasses().map((function(e){return".".concat(e)})).join(","))}},{key:"setInnerFeaturesQueries",value:function(){var e=this,t=this.targetElementESRAMetadata.innerFeatures;t.length>10&&(t=Object.values(t.reduce((function(e,t){if(t.isRoot)return e;var n="".concat(t.type,"_").concat(t.tag);return e[n]?e:(0,l.Z)((0,l.Z)({},e),{},(0,f.Z)({},n,t))}),{})));var n,r=Math.min(Math.ceil(t.length*this.config.innerFeatures.mandatoryPercentage),this.config.innerFeatures.mandatoryMax),i=(n=t,n.reduce((function(e,t){var n=e.map((function(e){return[].concat((0,m.Z)(e),[t])})).filter((function(e){return e.length<=r}));return e.concat(n)}),[[]])).filter((function(e){return e.length===r}));i.forEach((function(t){var n=[];t.forEach((function(t){return n.push(e.getFeatureSelector(t))})),e.cartesian(n).forEach((function(t){return e.candidateQueries.push("*"+t.map((function(e){return":has(".concat(e,")")})).join(""))}))}))}},{key:"cartesian",value:function(e){if(!e.length)return[];var t=[],n=e.length-1;return function r(i,o){for(var a=0,s=e[o].length;a<s;a++){var u=i.slice(0);u.push(e[o][a]),o==n?t.push(u):r(u,o+1)}}([],0),t}},{key:"getFeatureSelector",value:function(e){var t=[e.tag];switch(e.type){case d.EI.Media:e.src&&t.push("".concat(e.tag,'[src="').concat(e.src,'"]'));break;case d.EI.Anchor:t.push("".concat(e.tag,'[href="').concat(e.href,'"]'));break;case d.EI.Button:break;case d.EI.Input:t.push("".concat(e.tag,'[type="').concat(e.inputType,'"]')),e.placeholder&&t.push("".concat(e.tag,'[placeholder="').concat(e.placeholder,'"]'))}return t}},{key:"getInnerTextCandidates",value:function(){var e=this.similarity.getQualifiedInnerText();if(!e)return[];var t=re(e.content,{exact:!0});return t.length>this.config.innerText.dropIfMoreThanNCandidates?[]:t}},{key:"getTagCandidates",value:function(){return x(this.targetElementESRAMetadata.tag)}},{key:"isDescendant",value:function(e,t){return e.contains(t)}},{key:"formatStaticCandidates",value:function(e){var t={};return Object.keys(e).forEach((function(n){t[n]=e[n]})),t}},{key:"isHidden",value:function(e){return D(e)}}]),e}();ue.limitChildren=void 0;var ce=n(1752),le=n(1120),de=n(136),fe=n(7277),he=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"injectSelectorsAndLocators",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,d,f,h,p,v=this,m=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=(r=m.length>1&&void 0!==m[1]?m[1]:{}).testIdSelector,o=r.searchParentFrames,a=void 0===o||o,s=n.map((function(e){return{container:e,removedAttributes:v.stripNodeAttributes(e.element)}})),u=0;case 3:if(!(u<s.length)){e.next=15;break}return c=s[u],e.next=7,this.getSelectorAndLocator(c.container.element,{testIdSelector:i,searchParentFrames:a,stripAttributes:!1});case 7:d=e.sent,f=d.selector,h=d.locator,p=d.parentFramesSelectors,s[u]=(0,l.Z)((0,l.Z)({},c),{},{selector:f,locator:h,parentFramesSelectors:p});case 12:u++,e.next=3;break;case 15:return s.forEach((function(e){(e.removedAttributes.id||e.removedAttributes.originalClasses)&&v.restoreNodeAttributes(e.container.element,e.removedAttributes)})),e.abrupt("return",s.map((function(e){var t=e.container,n=e.selector,r=e.locator,i=e.parentFramesSelectors;return(0,l.Z)((0,l.Z)({},t),{},{selector:n,locator:r,parentFramesSelectors:i})})));case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"stripNodeAttributes",value:function(e){var t,n,r=e;r.id&&(t=r.id,r.removeAttribute("id"));try{if((n=r.getAttribute("class"))&&"string"===typeof n){var i=n.split(" ").filter((function(e){return!e.startsWith("css-")&&!e.startsWith("jss-")})).join(" ");r.setAttribute("class",i)}else n=void 0}catch(Rt){return console.warn("[playwright selector generator] error with class filtering",Rt),{}}return{id:t,originalClasses:n}}},{key:"restoreNodeAttributes",value:function(e,t){var n=e,r=t.id,i=t.originalClasses;r&&n.setAttribute("id",r),i&&n.setAttribute("class",i)}},{key:"getSelectorAndLocator",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h,p,v,m,g,y,b,w,S=this,I=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=I.length>1&&void 0!==I[1]?I[1]:{}).testIdSelector,o=r.searchParentFrames,a=void 0===o||o,s=r.stripAttributes,u=void 0===s||s,n){e.next=3;break}return e.abrupt("return",null);case 3:if(c=this.getIframes(),!a){e.next=10;break}return e.next=7,this.getParentFramesSelectors(n,c);case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0=[];case 11:if(l=e.t0,d=n,!(f=this.getTestAttributeSelector(d,i))){e.next=16;break}return e.abrupt("return",{selector:f,locator:'locator("'.concat(f,'")'),parentFramesSelectors:l});case 16:return u&&(v=this.stripNodeAttributes(n),h=v.id,p=v.originalClasses),m="",g="",e.prev=18,e.next=21,window.playwright.generateSelectorAndLocator(n);case 21:y=e.sent,m=y.selector,g=y.locator,e.next=42;break;case 26:if(e.prev=26,e.t1=e.catch(18),(b=n.ownerDocument.defaultView)===window){e.next=42;break}return b.playwright||(b.playwright=window.playwright),e.prev=31,e.next=34,b.playwright.generateSelectorAndLocator(n);case 34:w=e.sent,m=w.selector,g=w.locator,e.next=42;break;case 39:e.prev=39,e.t2=e.catch(31),console.log("get selector and locator error",n.nodeType,n,"\n",e.t1,"\n",e.t2);case 42:return e.prev=42,u&&this.restoreNodeAttributes(n,{id:h,originalClasses:p}),e.finish(42);case 45:return g&&l&&l.length>0&&(g=l.map((function(e){return"frameLocator('".concat(S.escapeSingleQuotes(S.escapeBackslash(e)),"')")})).join(".")+".".concat(g)),e.abrupt("return",{selector:m,locator:g,parentFramesSelectors:l});case 47:case"end":return e.stop()}}),e,this,[[18,26,42,45],[31,39]])})));return function(t){return e.apply(this,arguments)}}()},{key:"selector",value:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u,c,l;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a=window.top,!(r&&r.length>0)){e.next=22;break}s=(0,p.Z)(r),e.prev=4,s.s();case 6:if((u=s.n()).done){e.next=14;break}return c=u.value,e.next=10,a.playwright.$(c);case 10:l=e.sent,a=l.contentWindow;case 12:e.next=6;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(4),s.e(e.t0);case 19:return e.prev=19,s.f(),e.finish(19);case 22:return e.next=24,a.playwright.$(n);case 24:o=e.sent,e.next=29;break;case 27:e.prev=27,e.t1=e.catch(0);case 29:return e.abrupt("return",null!==(i=o)&&void 0!==i?i:this.selectOnIframe(n));case 30:case"end":return e.stop()}}),e,this,[[0,27],[4,16,19,22]])})));return function(t,n){return e.apply(this,arguments)}}())},{key:"getParentFramesSelectors",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.length){e.next=2;break}return e.abrupt("return",[]);case 2:if((i=n.ownerDocument)!==document){e.next=5;break}return e.abrupt("return",[]);case 5:if(o=r.find((function(e){return e.contentDocument===i}))){e.next=8;break}return e.abrupt("return",[]);case 8:return e.next=10,this.getSelectorAndLocator(o,{searchParentFrames:!1});case 10:return a=e.sent,e.t0=[],e.t1=m.Z,e.next=15,this.getParentFramesSelectors(o,r);case 15:return e.t2=e.sent,e.t3=(0,e.t1)(e.t2),e.t4=[a.selector],e.abrupt("return",e.t0.concat.call(e.t0,e.t3,e.t4));case 19:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getIframes",value:function(){var e=y.getInstance("playwrightElementSelectorGeneratorIframes");if(e.hasCache())return e.get();var t=x("iframe");return e.set(t),t}},{key:"selectOnIframe",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=document.querySelector("iframe")){e.next=3;break}return e.abrupt("return",void 0);case 3:return(i=r.contentWindow).playwright||(i.playwright=window.playwright),e.prev=5,e.next=8,i.playwright.$(n);case 8:return e.abrupt("return",e.sent);case 11:e.prev=11,e.t0=e.catch(5),console.log("selector error",n);case 14:case"end":return e.stop()}}),e,null,[[5,11]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getTestAttributeSelector",value:function(e,t){if(t&&e.getAttribute(t))return"[".concat(t,'="').concat(e.getAttribute(t),'"]')}},{key:"escapeSingleQuotes",value:function(e){return n="'",r="\\'",(t=e)?t.replace(new RegExp(n,"g"),r):t;var t,n,r}},{key:"escapeBackslash",value:function(e){return e.replace(/\\/g,"\\\\")}}]),e}(),pe=n(763);function ve(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var n=e,r={},i=0;i<n.attributes.length;i++){var o=n.attributes[i];r[o.name]=o.value}var a,s=[],u=(0,p.Z)(n.childNodes);try{for(u.s();!(a=u.n()).done;){var c=ve(a.value,t);c&&s.push(c)}}catch(m){u.e(m)}finally{u.f()}var l=s.reduce((function(e,t){return Math.max(e,t.depth)}),0)+1,d="".concat(n.tagName.toLowerCase(),"#").concat(Object.keys(r).sort(),"#").concat(s.map((function(e){return e.templateHash})).join("|")),f=Object.values(r).concat(s.flatMap((function(e){return e.templateValues}))),h={type:"ELEMENT",tagName:n.tagName.toLowerCase(),attributes:r,children:s,templateHash:d,templateValues:f,depth:l,node:e};if(t[d]){if(t[d].depth!==l)throw new Error("Template depth mismatch for template ".concat(d));t[d].nodes.push(h)}else t[d]={hash:d,nodes:[h],depth:l};return h}if(e.nodeType===Node.TEXT_NODE){var v=e.textContent;if(v&&v.trim())return{type:"TEXT",content:v,templateHash:"TEXT",templateValues:[v],depth:0,node:e}}return null}var me=function(e){var t=(0,pe.range)(e.nodes[0].templateValues.length).filter((function(t){var n=e.nodes.map((function(e){return e.templateValues[t]}));return n.every((function(e){return e===n[0]}))}));return(0,l.Z)((0,l.Z)({},e),{},{valuesToInline:new Set(t)})};function ge(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.repetitionThreshold,r=void 0===n?3:n,i=t.depth,o=void 0===i?3:i,a=t.forceSameParent,s={},u={};if(void 0!==a&&a){for(var c=Object.values(e),d=0;d<c.length-1;d++){for(var f=c[d],h=[],v=f.nodes[0].node.parentNode,g=f.nodes.length-1;g>0;g--)f.nodes[g].node.parentNode!==v&&(h=[].concat((0,m.Z)(h),(0,m.Z)(f.nodes.splice(g,1))));0!==h.length&&c.push((0,l.Z)((0,l.Z)({},f),{},{nodes:h}))}for(var y={},b=0,w=c;b<w.length;b++){var S=w[b];if(y[S.hash]){for(var I=0;"".concat(S.hash).concat(I)in y;)I++;y["".concat(S.hash).concat(I)]=S}else y[S.hash]=S}e=y}var C,k=(0,p.Z)(Object.values(e).sort((function(e){return-e.depth})));try{var E=function(){var e,t=C.value;if(t.nodes.length-(null!==(e=u[t.hash])&&void 0!==e?e:0)<r||t.depth<o)return 1;t.label="T".concat(Object.keys(s).length+1);var n=be(t.nodes[0],s,t);t.template=n.template,s[t.hash]=t,n.consumedTemplates.forEach((function(e){var n;u[e]=(null!==(n=u[e])&&void 0!==n?n:0)+t.nodes.length}))};for(k.s();!(C=k.n()).done;)E()}catch(x){k.e(x)}finally{k.f()}return s}function ye(e,t){var n=t+1-Array.from(e.valuesToInline).filter((function(e){return e<t})).length;return"$".concat(n)}function be(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("TEXT"===e.type)return n.valuesToInline.has(r)?{template:e.content,valueIndex:r+1,consumedTemplates:[e.templateHash]}:{template:ye(n,r),valueIndex:r+1,consumedTemplates:[e.templateHash]};var i=r,o=[e.templateHash],a=Object.entries(e.attributes).map((function(e,t){var r=(0,v.Z)(e,2),o=r[0],a=r[1];return n.valuesToInline.has(i+t)?" ".concat(o,'="').concat(a,'"'):" ".concat(o,"=").concat(ye(n,i+t))})).join("");i+=Object.keys(e.attributes).length;var s,u=[],c=(0,p.Z)(e.children);try{for(c.s();!(s=c.n()).done;){var l=be(s.value,t,n,i);u.push(l.template),i=l.valueIndex,o.push.apply(o,(0,m.Z)(l.consumedTemplates))}}catch(f){c.e(f)}finally{c.f()}var d=0===e.children.length;return{template:"<".concat(e.tagName.toLowerCase()).concat(a).concat(d?"/>":">".concat(u.join(""),"</").concat(e.tagName.toLowerCase(),">")),valueIndex:i,consumedTemplates:o}}function we(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,r={};if(!ve(e,r))return{};for(var i=Object.values(r).reduce((function(e,t){var n=me(t);return(0,l.Z)((0,l.Z)({},e),{},(0,f.Z)({},n.hash,n))}),{}),o={},a=function(){var e=ge(i,{repetitionThreshold:t,depth:s,forceSameParent:!0}),n=Object.keys(e).reduce((function(t,n){return function(e){for(var t=0,n=Object.values(o);t<n.length;t++)for(var r=n[t],i=0,a=Object.keys(r);i<a.length;i++)if(a[i]===e)return!0;return!1}(n)?t:(0,l.Z)((0,l.Z)({},t),{},(0,f.Z)({},n,e[n]))}),{}),r=Object.keys(n).reduce((function(e,t){return function(e){for(var t=0,n=Object.values(o);t<n.length;t++)for(var r=n[t],i=0,a=Object.values(r);i<a.length;i++)if(a[i].nodes.map((function(e){return e.node})).filter((function(t){return t.contains(e)})).length>0)return!0;return!1}(n[t].nodes[0].node)?e:(0,l.Z)((0,l.Z)({},e),{},(0,f.Z)({},t,n[t]))}),{});Object.keys(r).length>0&&(o[s]=r)},s=n;s>0;s--)a();return Object.keys(o).reduce((function(e,t){return(0,l.Z)((0,l.Z)({},e),{},(0,f.Z)({},t,Object.values(o[t]).map((function(e){return e.nodes.map((function(e){return e.node}))}))))}),{})}var Se=[{selector:'path[d="M17.5 13V15.6667C17.5 16.0203 17.3361 16.3594 17.0444 16.6095C16.7527 16.8595 16.357 17 15.9444 17H5.05556C4.643 17 4.24733 16.8595 3.95561 16.6095C3.66389 16.3594 3.5 16.0203 3.5 15.6667V13"] + path[d="M14.6673 6.92057L10.5007 2.75391L6.33398 6.92057"] + path[d="M10.5 2.75391V12.7539"]',description:"export button"},{selector:'path[d="M16.0893 13.1868C16.6838 12.7754 17.1321 12.1858 17.3697 11.503C17.6072 10.8202 17.6216 10.0796 17.4107 9.38816C17.1999 8.69667 16.7748 8.09007 16.1968 7.65594C15.6187 7.2218 14.9177 6.9826 14.1948 6.97285H12.8308C12.6017 6.20011 12.1996 5.48973 11.6549 4.89565C11.1102 4.30157 10.4374 3.83943 9.68735 3.54431C8.93734 3.24918 8.12995 3.12885 7.32648 3.19244C6.52301 3.25603 5.7446 3.50187 5.05036 3.9113C4.35612 4.32072 3.7643 4.88297 3.31985 5.55533C2.8754 6.22769 2.59001 6.99248 2.48535 7.79164C2.38068 8.59079 2.4595 9.40329 2.71582 10.1674C2.97214 10.9316 3.39921 11.6272 3.96461 12.2016"] + path[d="M10.0273 10.0039V16.8241"] + path[d="M13.0585 13.0351L10.0273 10.0039L6.99609 13.0351"]',description:"import button"},{selector:'path[d="M20.4696 21.5303C20.7625 21.8232 21.2373 21.8232 21.5302 21.5303C21.8231 21.2374 21.8231 20.7626 21.5302 20.4697L20.4696 21.5303ZM17.1802 16.1197C16.8873 15.8268 16.4125 15.8268 16.1196 16.1197C15.8267 16.4126 15.8267 16.8874 16.1196 17.1803L17.1802 16.1197ZM18.25 11C18.25 15.0041 15.0041 18.25 11 18.25V19.75C15.8325 19.75 19.75 15.8325 19.75 11H18.25ZM11 18.25C6.99594 18.25 3.75 15.0041 3.75 11H2.25C2.25 15.8325 6.16751 19.75 11 19.75V18.25ZM3.75 11C3.75 6.99594 6.99594 3.75 11 3.75V2.25C6.16751 2.25 2.25 6.16751 2.25 11H3.75ZM11 3.75C15.0041 3.75 18.25 6.99594 18.25 11H19.75C19.75 6.16751 15.8325 2.25 11 2.25V3.75ZM21.5302 20.4697L17.1802 16.1197L16.1196 17.1803L20.4696 21.5303L21.5302 20.4697Z"]',description:"search"},{selector:'path[d="M3.75 10H16.875"] + path[d="M8.125 5L3.125 10L8.125 15"]',description:"back"},{selector:'path[d="M3.33301 8H12.6663"] + path[d="M8 3.33331L12.6667 7.99998L8 12.6666"]',description:"forward"},{selector:'path[d="M10 4.16667V15.8333"] + path[d="M4.16699 10H15.8337"]',description:"new or Add button"},{selector:'path[d="M10 10.75C10.4142 10.75 10.75 10.4142 10.75 10C10.75 9.58579 10.4142 9.25 10 9.25C9.58579 9.25 9.25 9.58579 9.25 10C9.25 10.4142 9.58579 10.75 10 10.75Z"] + path[d="M15.833 10.75C16.2472 10.75 16.583 10.4142 16.583 10C16.583 9.58579 16.2472 9.25 15.833 9.25C15.4188 9.25 15.083 9.58579 15.083 10C15.083 10.4142 15.4188 10.75 15.833 10.75Z"] + path[d="M4.16699 10.75C4.58121 10.75 4.91699 10.4142 4.91699 10C4.91699 9.58579 4.58121 9.25 4.16699 9.25C3.75278 9.25 3.41699 9.58579 3.41699 10C3.41699 10.4142 3.75278 10.75 4.16699 10.75Z"]',description:"open menu"},{selector:'path[d="M10 4.16667V15.8333"] + path[d="M4.16699 10H15.8337"]',description:"add filter"},{selector:'path[d="M15 5L5 15"] + path[d="M5 5L15 15"]',description:"close or remove"},{selector:'path[d="M4 6L8 10L12 6"]',description:"open or close dropdown"},{selector:'path[d="M10 17.5C14.1421 17.5 17.5 14.1421 17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5Z"] + path[d="M12.5 7.5L7.5 12.5"] + path[d="M7.5 7.5L12.5 12.5"]',description:"clear input"},{selector:'path[d="M3.33301 5.49054H4.81449H16.6663"] + path[d="M7.14286 5.49999V3.99999C7.14286 3.60216 7.29337 3.22063 7.56128 2.93932C7.82919 2.65802 8.19255 2.49998 8.57143 2.49998H11.4286C11.8075 2.49998 12.1708 2.65802 12.4387 2.93932C12.7066 3.22063 12.8571 3.60216 12.8571 3.99999V5.49999M15 5.49999V16C15 16.3978 14.8495 16.7793 14.5816 17.0607C14.3137 17.342 13.9503 17.5 13.5714 17.5H6.42857C6.04969 17.5 5.68633 17.342 5.41842 17.0607C5.15051 16.7793 5 16.3978 5 16V5.49999H15Z"] + path[d="M8.33203 9.23726V13.4039"] + path[d="M11.666 9.23726V13.4039"]',description:"delete"},{selector:'path[d="M13.3334 4L6.00008 11.3333L2.66675 8"]',description:"checked"},{selector:'path[d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"]',description:"downward-pointing arrow"},{selector:'path[d="M18.0893 3.08926C18.4147 2.76382 18.4147 2.23618 18.0893 1.91074C17.7638 1.58531 17.2362 1.58531 16.9107 1.91074L18.0893 3.08926ZM9.41074 9.41074L8.82149 10L10 11.1785L10.5893 10.5893L9.41074 9.41074ZM16.9107 1.91074L9.41074 9.41074L10.5893 10.5893L18.0893 3.08926L16.9107 1.91074Z"] + path[d="M17.5 2.5L12.25 17.5L9.25 10.75L2.5 7.75L17.5 2.5Z"]',description:"send"}];function Ie(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e4,t=[],n=new MutationObserver((function(e){e.forEach((function(e){e.addedNodes.length>0&&e.addedNodes.forEach((function(e){e instanceof HTMLElement&&function(e){if(e.getElementsByTagName("*").length>50)return!1;if(e.outerHTML.length>5e3)return!1;return!0}(e)&&setTimeout((function(){t.push(function(e){var t,n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),r=[];for(;t=n.nextNode();)D(t.parentNode).isHidden||r.push(t);return r}(e))}),1e3)}))}))}));return n.observe(document.body,{childList:!0,subtree:!0}),setTimeout((function(){n.disconnect()}),e),function(){var e=t.map((function(e){return e.filter((function(e){return!e.isConnected||D(e.parentElement).isHidden}))})).filter((function(e){return e.length})).map((function(e){return"<span>".concat(e.map((function(e){return e.textContent})).join("</span><span>"),"</span>")}));return t=[],e}}var Ce,ke=function(e){return e.ARIA_LABEL="aria-label",e.TEXT="text",e}({}),Ee=function(e){return e.SVG="svg",e}(Ee||{}),xe={markTransparentElementsAsHidden:!1,markElementsHiddenByTransparentElementAsVisible:!0},Ae=function(){function e(){(0,a.Z)(this,e),this.interactableElements=void 0,this.interactableElementsFromSimplifiedDom=void 0,this.selectors=void 0,this.flashingElements=void 0}return(0,s.Z)(e,[{key:"preprocessDocument",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=x("*",t,{includeHTML:!0}),r=(0,p.Z)(n);try{for(r.s();!(e=r.n()).done;){var i=e.value,o=D(i,xe);i.setAttribute("checksum-data-visible",o.isHidden||o.isTransparent?"false":"true"),!o.isHidden&&o.isTransparent&&i.setAttribute("checksum-data-transparently-visible","true"),o.isBehindTransparentElement&&i.setAttribute("checksum-data-visible-under-transparent-element","true"),o.clickOffset&&i.setAttribute("checksum-data-click-offset","".concat(o.clickOffset.x,";").concat(o.clickOffset.y))}}catch(a){r.e(a)}finally{r.f()}}},{key:"markInteractableElements",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.persistChecksumIds,o=void 0===i||i,a=r.checksumIdCounter,s=void 0===a?0:a,u=r.forceIncludeAttribute;this.interactableElements=[],console.log("Getting all interactable elements...");var c=C(n,e,{allowDisabled:!0,excludeCrossOriginIframes:!1});console.log("Got ".concat(c.length," interactable elements"));var l=function(e){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=null===(n=e.getAttribute("checksum-data-click-offset"))||void 0===n?void 0:n.split(";"),a=i&&{x:parseInt(i[0]),y:parseInt(i[1])},u=function(e){if(o)return e._checksumid||(e._checksumid=s.toString(),s++),e.setAttribute("checksumid",e._checksumid),e._checksumid;var t=s.toString();return e.setAttribute("checksumid",t),s++,t}(e);t.interactableElements.push({checksumId:u,element:e,forced:r,clickOffset:a})};return c.forEach((function(e){return l(e)})),u&&x("[".concat(u,"]"),n,{includeHTML:!0}).forEach((function(e){return l(e,!0)})),s}},{key:"truthyFilter",value:function(e){return Boolean(e)}},{key:"generateSimplifiedDom",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.checkElementInstanceType,o=void 0===i||i,a=r.forceIncludeAttribute,s=void 0===a?void 0:a,u=r.forceIncludeElements,c=void 0===u?[]:u,l=r.svgIntegration,d=void 0===l?ke.ARIA_LABEL:l,f=r.onForceIncludeElement,h=void 0===f?void 0:f,v=r.contentWindow,m=void 0===v?window:v;if(!e)return null;var g,y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return e._originalNode=t,e},b=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return y(document.createTextNode(t),n)},w=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return y(document.createElement(t),n)};if(e.nodeType===Node.ELEMENT_NODE&&"head"===e.tagName.toLowerCase())return null;if(e.nodeType===Node.TEXT_NODE)return e.parentElement&&("false"!==e.parentElement.getAttribute("checksum-data-visible")||e.parentElement.hasAttribute("checksumid"))?"body"===e.parentElement.tagName.toLowerCase()?null:null!==(g=e.textContent)&&void 0!==g&&g.trim()?b(e.textContent+" "):null:null;if(e.nodeType!==Node.ELEMENT_NODE)return null;if(o&&!Z(e,"HTMLElement")&&!Z(e,"SVGElement"))return null;var S=e,I="iframe"===S.tagName.toLowerCase()&&S.contentDocument,C=M(I?S.contentDocument.documentElement:S,{flattenShadowRootChildren:!0}).map((function(e){return t.generateSimplifiedDom(e,n,{checkElementInstanceType:o,forceIncludeAttribute:s,forceIncludeElements:c,svgIntegration:d,onForceIncludeElement:h,contentWindow:I?S.contentWindow:m})})).filter(this.truthyFilter),k="false"!==S.getAttribute("checksum-data-visible"),E=S.hasAttribute("checksumid"),x=S.hasAttribute("role"),A=this.getElementCustomDescription(S,{enableSVGCustomDescription:!!d}),T=A.customDescription,N=A.customDescriptionTarget,R=!!T,_=S.hasAttribute("aria-label")||S.hasAttribute("name"),D=c.includes(S)||!!s&&S.hasAttribute(s),O=E||k&&(x||_||R||S.matches(["form","button","input","textarea","a","table","th","tr","td","section","nav","header","footer","main","article","aside","li","ul","select","option","datalist"].join(",")));if(!(O||D)){if(!C.length)return null;if(1===C.length)return C[0]}!O&&D&&(null===h||void 0===h||h(S));var L=function(){if(R&&N===Ee.SVG)switch(d){case ke.ARIA_LABEL:var e=w("svg");return e.setAttribute("aria-label",T),{simplifiedNode:e,appendChildren:!1};case ke.TEXT:if(S.hasAttribute("checksumid")){var t=w("div");return t.innerText=T,{simplifiedNode:t,appendChildren:!1}}return{simplifiedNode:b(" [".concat(T,"] ")),appendChildren:!1}}var n="body"===S.tagName.toLowerCase()&&S.ownerDocument!==document?"div":S.tagName;return{simplifiedNode:w(n)}}(),F=L.simplifiedNode,V=L.appendChildren,B=void 0===V||V;if(!Z(F,"Element"))return F;var P,j=F,W=["aria-.+","data-name","name","type","placeholder","content","value","role","icon","title","checksumid","checked","disabled","selected","label","required","inputmode","min","max","step","minlength","maxlength","alt","hidden","draggable","contenteditable","href","(data-)?test(-)?id"].concat(n),U=S.attributes,H=(0,p.Z)(U);try{for(H.s();!(P=H.n()).done;){var G,z=P.value,q=(0,p.Z)(W);try{for(q.s();!(G=q.n()).done;){var Y,Q=G.value;if(new RegExp("^"+Q+"$").test(z.name))j.setAttribute(z.name,null===(Y=z.value)||void 0===Y||Y)}}catch(X){q.e(X)}finally{q.f()}}}catch(X){H.e(X)}finally{H.f()}if(S.isContentEditable?j.setAttribute("contenteditable","true"):["TEXTAREA","INPUT","SELECT"].includes(S.tagName)||"text"!==window.getComputedStyle(S).cursor||j.setAttribute("contenteditable","cursor-text"),Z(S,"HTMLInputElement")||Z(S,"HTMLSelectElement"))j.setAttribute("value",S.value);else if(Z(S,"HTMLTextAreaElement")&&!S.childNodes.length&&S.value){var K=b(S.value);j.appendChild(K)}return B&&C.forEach((function(e){return j.appendChild(e)})),j}},{key:"getElementCustomDescription",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).enableSVGCustomDescription,n=void 0===t||t;return(Z(e,"SVGElement")||"svg"===e.tagName.toLowerCase())&&n?{customDescriptionTarget:Ee.SVG,customDescription:this.getSVGDescriptionForElement(e)}:{}}},{key:"getSVGDescriptionForElement",value:function(e){var t=this.findSvgElementDescriptionFromBank(e);if(t)return t;var n=e.querySelector("title");return n?n.textContent:void 0}},{key:"findSvgElementDescriptionFromBank",value:function(e){var t;return null===(t=this.getSvgBank().find((function(t){return e.matches("svg:has(".concat(t.selector,")"))})))||void 0===t?void 0:t.description}},{key:"getSvgBank",value:function(){return Se}},{key:"restoreDom",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;x("*",e).forEach((function(e){e.removeAttribute("checksum-data-visible"),e.removeAttribute("checksum-data-transparently-visible"),e.removeAttribute("checksum-data-visible-under-transparent-element"),e.removeAttribute("checksumid"),e.removeAttribute("checksum-data-click-offset")}))}},{key:"mapAndStoreSelectors",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u,c,l,d,f;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},r=new he,e.t0=p.Z,e.next=5,r.injectSelectorsAndLocators(this.interactableElementsFromSimplifiedDom);case 5:e.t1=e.sent,i=(0,e.t0)(e.t1),e.prev=7,i.s();case 9:if((o=i.n()).done){e.next=17;break}if(a=o.value,s=a.checksumId,u=a.element,c=a.clickOffset,l=a.selector,d=a.locator,f=a.parentFramesSelectors,l){e.next=14;break}return console.warn("Unable to get selector for element",u),e.abrupt("continue",15);case 14:n[s]={element:u,selector:l,locator:d,clickOffset:c,parentFramesSelectors:f};case 15:e.next=9;break;case 17:e.next=22;break;case 19:e.prev=19,e.t2=e.catch(7),i.e(e.t2);case 22:return e.prev=22,i.f(),e.finish(22);case 25:return e.abrupt("return",n);case 26:case"end":return e.stop()}}),e,this,[[7,19,22,25]])})));return function(){return e.apply(this,arguments)}}()},{key:"shouldFurtherReduce",value:function(e){return e.outerHTML.length>16e3}},{key:"getRepeatingElementsToExclude",value:function(e,t,n){if(e.length<=t)return[];var r=t,i=e.reduce((function(e,t){var n=t._originalNode;return N(Z(n,"Element")?n:null===n||void 0===n?void 0:n.parentElement)?e.inViewportElements.push(t):e.outOfViewportElements.push(t),e}),{inViewportElements:[],outOfViewportElements:[]}),o=i.inViewportElements,a=i.outOfViewportElements,s=[],u=function(e){var t,i,o=(0,p.Z)(e);try{for(o.s();!(t=o.n()).done;){var a=t.value;if(i=a,n&&(i.hasAttribute(n)||Array.from(i.querySelectorAll("[".concat(n,"]"))).length>0)||s.push(a),s.length===r)return!0}}catch(u){o.e(u)}finally{o.f()}};return u(a)||u(o),s}},{key:"refactorSimplifiedDOM",value:function(e,t){var n=this,r=t.limitNodeRepetitions,i=void 0===r?50:r,o=t.forceIncludeAttribute,a=t.maxDepth,s=void 0===a?5:a;try{for(var u=e.outerHTML.length,c=function(){var t=we(e,i,s);if(0===Object.keys(t).reduce((function(e,n){return e+t[n].length}),0)||!Object.values(t).find((function(e){return e.find((function(e){return e.length>i}))})))return i-=i>10?5:1,1;var r=Object.keys(t).reduce((function(e,n){return"".concat(e).concat(n,": ").concat(t[n].map((function(e){return"[".concat(e.length," (").concat(null===e||void 0===e?void 0:e[0].tagName,")]")}))," ")}),"");console.log("Template nodes found (<depth>: <[node batches]>): ".concat(r));var a,u=Object.keys(t).reduce((function(e,n){return[].concat((0,m.Z)(e),(0,m.Z)(t[n]))}),[]),c=(0,p.Z)(u);try{for(c.s();!(a=c.n()).done;){var l=a.value;if(l.length>i)n.getRepeatingElementsToExclude(Array.from(l),Math.min(l.length-i,Math.ceil(.1*l.length)),o).forEach((function(e){return e.remove()}))}}catch(d){c.e(d)}finally{c.f()}};i>20&&this.shouldFurtherReduce(e);)c();e.outerHTML.length<u&&console.log("Reduced HTML from ".concat(u," to ").concat(e.outerHTML.length))}catch(l){console.warn("Failed refactoring reduced HTML",l)}}},{key:"reduceHTML",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h,p,v,m,g,b,w,S,I,C,k,E,x,A,M,T,N,R=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=R.length>1&&void 0!==R[1]?R[1]:{}).checkElementInstanceType,o=void 0===i||i,a=r.extraAllowedAttributes,s=void 0===a?[]:a,u=r.maintainSelectorsMapping,c=void 0===u||u,l=r.initialChecksumIdIndex,d=void 0===l?0:l,f=r.forceIncludeAttribute,h=r.persistChecksumIds,p=void 0===h||h,v=r.invalidateCache,m=void 0!==v&&v,g=r.svgIntegration,b=void 0===g?ke.ARIA_LABEL:g,w=r.includeFlashingElements,S=void 0===w||w,I=r.onForceIncludeElement,C=r.limitNodeRepetitions,k=void 0===C?50:C,E=R.length>2&&void 0!==R[2]?R[2]:document,!(x=y.getInstance("reduce",{target:E,monitorInput:!0,invalidate:m})).hasCache()){e.next=5;break}return e.abrupt("return",x.get());case 5:if(console.log("Preprocessing document..."),this.preprocessDocument(E),console.log("Done preprocessing document."),console.log("Marking interactable elements..."),A=this.markInteractableElements(n,E,{persistChecksumIds:p,checksumIdCounter:d,forceIncludeAttribute:f}),console.log("Done marking interactable elements."),console.log("Generating simplified DOM..."),M=this.generateSimplifiedDom(E.documentElement,s,{checkElementInstanceType:o,forceIncludeAttribute:f,svgIntegration:b,onForceIncludeElement:I})){e.next=15;break}throw new Error("Unable to get simplified DOM");case 15:if(console.log("Done generating simplified DOM"),console.log("Refactoring simplified DOM..."),this.refactorSimplifiedDOM(M,{limitNodeRepetitions:k,forceIncludeAttribute:f,maxDepth:5}),T=new Set(Array.from(M.querySelectorAll("[checksumid]")).map((function(e){return e.getAttribute("checksumid")}))),this.interactableElementsFromSimplifiedDom=this.interactableElements.filter((function(e){return T.has(e.checksumId)})),console.log("Done refactoring simplified DOM"),console.log("Found ".concat(this.interactableElementsFromSimplifiedDom.length," interactable elements in simplified DOM vs ").concat(this.interactableElements.length," in original DOM")),console.log("Restoring DOM..."),this.restoreDom(E),console.log("Done restoring DOM"),!c){e.next=31;break}return console.log("Mapping selectors..."),e.next=29,this.mapAndStoreSelectors();case 29:this.selectors=e.sent,console.log("Done mapping selectors");case 31:return N={reducedDOM:M,reducedHTML:M.outerHTML,currentChecksumIdIndex:A,selectors:this.selectors},S&&(console.log("Adding flashing HTML..."),N.flashingHTML=this.flashingElements?this.flashingElements():[],this.flashingElements=Ie(),console.log("Done adding flashing HTML")),x.set(N),e.abrupt("return",N);case 35:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getSelectorForChecksumId",value:function(e){var t;return null!==(t=this.selectors[e])&&void 0!==t?t:{selector:e,element:null}}},{key:"getInteractableElements",value:function(){return this.interactableElements}},{key:"getInteractableElementsInReducedHTML",value:function(){return this.interactableElementsFromSimplifiedDom}}]),e}(),Me=function(){function e(){(0,a.Z)(this,e),this.esraExtractors=[],this.appSpecificRules=void 0,this.playwrightSelector=new he,this.defaultExtractReducedHtmlAndSelector=!1,this.defaultInspectInteractableElements=!1,this.previousTargetNodeForReducedHTML=void 0,this.currentReducedHTMLChecksumIdAllocationCount=0,this.htmlReducer=new Ae}return(0,s.Z)(e,[{key:"getSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h,p,v,m=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=m.length>1&&void 0!==m[1]?m[1]:{}).extractPlaywrightSelector,o=void 0===i||i,a=r.extractEsraMetadata,s=void 0===a||a,u=r.extractReducedHtmlAndSelector,c=void 0===u?this.defaultExtractReducedHtmlAndSelector:u,l=r.inspectInteractableElements,d=void 0===l?this.defaultInspectInteractableElements:l,n){e.next=3;break}return e.abrupt("return",null);case 3:if(console.log("[SessionDigesterSelector] generating for node",n),f={},s&&(console.log("extracting ESRA metadata..."),h=this.getESRAExtractor(n).extract(n),f.esraMetadata=h.toMetadata(),console.log("ESRA metadata extraction complete")),!o){e.next=14;break}return console.log("extracting playwright selector..."),e.next=10,this.playwrightSelector.getSelectorAndLocator(n);case 10:p=e.sent,v=p.selector,f.playwrightSelector=v,console.log("Playwright selector extraction complete");case 14:if(!c){e.next=20;break}return console.log("extracting reduced HTML..."),e.next=18,this.getReducedHTMLAndTargetNodeSelector(n);case 18:f.reducedHTML=e.sent,console.log("Reduced HTML extraction complete");case 20:if(!d){e.next=26;break}return console.log("extracting element inspection..."),e.next=24,this.isElementInteractable(n);case 24:f.interactionFoundOnInspection=e.sent,console.log("Element inspection extraction complete");case 26:return console.log("[SessionDigesterSelector] complete",f),e.abrupt("return",f);case 28:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"selector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.playwrightSelector.selector(n));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setAppRules",value:function(e){this.appSpecificRules=e}},{key:"setOptions",value:function(e){var t=e.defaultExtractReducedHtmlAndSelector,n=e.defaultInspectInteractableElements;this.defaultExtractReducedHtmlAndSelector=t,this.defaultInspectInteractableElements=n}},{key:"getReducedHTMLAndTargetNodeSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="checksum-target-node",n.setAttribute(r,"true"),i=this.previousTargetNodeForReducedHTML&&this.previousTargetNodeForReducedHTML!==n,this.previousTargetNodeForReducedHTML=n,o=!1,a=function(e){e.hasAttribute(r)&&(o=!0)},e.next=8,this.htmlReducer.reduceHTML(this.appSpecificRules,{initialChecksumIdIndex:this.currentReducedHTMLChecksumIdAllocationCount,extraAllowedAttributes:[r],checkElementInstanceType:!1,maintainSelectorsMapping:!1,forceIncludeAttribute:r,invalidateCache:i,onForceIncludeElement:a},n.ownerDocument);case 8:return s=e.sent,u=s.reducedDOM,c=s.reducedHTML,l=s.currentChecksumIdIndex,n.removeAttribute(r),this.currentReducedHTMLChecksumIdAllocationCount=l,d=u.matches("[".concat(r,"=true]"))?u:u.querySelector("[".concat(r,"=true]")),f=d?d.getAttribute("checksumid"):void 0,e.abrupt("return",{html:c,selector:f,targetForceIncluded:o});case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getESRAExtractor",value:function(e){var t=this.esraExtractors.find((function(t){return t.isSameDocument(e.ownerDocument)}));if(t)return t;var n=new ae(e.ownerDocument);return this.esraExtractors.push(n),n}},{key:"isElementInteractable",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.htmlReducer.getInteractableElements())||!r.length){e.next=3;break}return e.abrupt("return",r.some((function(e){return e.element===n&&!e.forced})));case 3:return e.next=5,C(n.ownerDocument,this.appSpecificRules);case 5:return i=e.sent,e.abrupt("return",i.includes(n));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}(),Te=n(1414),Ne=n(8739),Re=n(6842),_e=n(6301),De=n.n(_e),Oe=function(e){(0,de.Z)(i,e);var n=(0,fe.Z)(i);function i(e){var t,r=e.sessionMirror,o=e.elementSelector;return(0,a.Z)(this,i),(t=n.call(this)).sessionMirror=void 0,t.elementSelector=void 0,t.numberOfRetries=3,t.currentHref=void 0,t.previousMouseDownData=void 0,t.previousMousePositions=void 0,t.previousMousePositionsNodeSelectors={},t.hasUndefinedFocusNode=!1,t.lastMouseUpTime=0,t.lastMouseDownExtract=void 0,t.allInteractableElementsMetadata={mouseMove:void 0,mouseDown:void 0},t.events=void 0,t.currentEventIndex=-1,t.enableRecordingAvailableInteractableElements=!0,t.useTextInputFastForward=!0,t.textInputFastForwardInitialSelector=void 0,t.appSpecificRules=void 0,t.getBoundingBox=function(e){var n=k(t.sessionMirror.getNodeById(e),t.appSpecificRules.appSpecificInteractableElementsSelectors);if(n)return null===n||void 0===n?void 0:n.getBoundingClientRect()},t.isPointWithinBoundingBox=function(e,t,n){return e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom},t.isPointWithinNodeBoundingBox=function(e,n,r){var i=t.getBoundingBox(e);return!!i&&(n>=i.left&&n<=i.right&&r>=i.top&&r<=i.bottom)},t.elementSelector=o,t.sessionMirror=r,t}return(0,s.Z)(i,[{key:"setEvents",value:function(e){this.events=e}},{key:"setConfiguration",value:function(e){var t=e.enableRecordingAvailableInteractableElements,n=e.useTextInputFastForward,r=void 0===n||n;this.enableRecordingAvailableInteractableElements=t,this.useTextInputFastForward=r}},{key:"setAppRules",value:function(e){this.appSpecificRules=e}},{key:"skipEvents",value:function(e){this.currentEventIndex+=e.length}},{key:"preEvent",value:function(e){++this.currentEventIndex}},{key:"postEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return",r);case 2:if(r.availableInteractableElementsAtStart||!this.enableRecordingAvailableInteractableElements||n.type!==Te.tw.IncrementalSnapshot||n.data.source!==Te.yh.MouseInteraction&&n.data.source!==Te.yh.Input&&n.data.source!==Te.yh.MediaInteraction){e.next=6;break}return e.next=5,this.getInteractableElementsMetadata();case 5:r.availableInteractableElementsAtStart=e.sent;case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleMeta",value:function(e){if(e.href!==this.currentHref)return this.currentHref=e.href,{eventCode:Re.$.Navigation,url:e.href}}},{key:"getNextUserTriggeredInputEvent",value:function(e){for(var t=this.currentEventIndex+1;t<this.events.length;++t){var n=this.events[t];if(n.type===Te.tw.IncrementalSnapshot&&n.data.source===Te.yh.Input&&n.data.userTriggered)return n;if(n.timestamp>e)return}}},{key:"handleInput",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i){var o,a,s,u,c,d=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.userTriggered){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.getNodeById(n.id);case 4:if(o=e.sent,(a=this.getInputEventCode(o,n))!==Re.$.Input||!this.useTextInputFastForward){e.next=18;break}if(this.textInputFastForwardInitialSelector){e.next=11;break}return e.next=10,this.elementSelector.getSelector(o);case 10:this.textInputFastForwardInitialSelector=e.sent;case 11:return s=(0,l.Z)({eventCode:a},this.textInputFastForwardInitialSelector),u=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=d.getNextUserTriggeredInputEvent(i.timestamp+2e3))){e.next=9;break}return r=n.data,e.next=5,d.getNodeById(r.id);case 5:if((a=e.sent)===o){e.next=8;break}return e.abrupt("return",!1);case 8:return e.abrupt("return",d.getInputEventCode(a,r)===Re.$.Input);case 9:return e.abrupt("return",!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=15,u();case 15:if(e.sent){e.next=17;break}this.textInputFastForwardInitialSelector=void 0;case 17:return e.abrupt("return",s);case 18:return e.next=20,this.elementSelector.getSelector(o);case 20:return c=e.sent,e.abrupt("return",(0,l.Z)({eventCode:a},c));case 22:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleMouseMove",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.previousMousePositions=n.positions,this.previousMousePositionsNodeSelectors={},!this.isLastMouseMoveEventBeforeMouseDownOrUndefinedFocus()){e.next=39;break}this.previousMousePositionsNodeSelectors={},r={},i=(0,p.Z)(this.previousMousePositions),e.prev=6,i.s();case 8:if((o=i.n()).done){e.next=28;break}if(a=o.value,s=a.id,!r[s]){e.next=13;break}return e.abrupt("continue",26);case 13:return r[s]=!0,e.next=16,this.getNodeById(s);case 16:return u=e.sent,e.prev=17,e.next=20,this.elementSelector.getSelector(u);case 20:this.previousMousePositionsNodeSelectors[s]=e.sent,e.next=26;break;case 23:e.prev=23,e.t0=e.catch(17),console.warn("error with extracting selector for node during previousMousePositionsNodeSelectors mapping",u,e.t0);case 26:e.next=8;break;case 28:e.next=33;break;case 30:e.prev=30,e.t1=e.catch(6),i.e(e.t1);case 33:return e.prev=33,i.f(),e.finish(33);case 36:return e.next=38,this.getInteractableElementsMetadata();case 38:this.allInteractableElementsMetadata.mouseMove=e.sent;case 39:case"end":return e.stop()}}),e,this,[[6,30,33,36],[17,23]])})));return function(t){return e.apply(this,arguments)}}()},{key:"isLastMouseMoveEventBeforeMouseDownOrUndefinedFocus",value:function(){for(var e=this.currentEventIndex+1;e<this.events.length;++e){var t=this.events[e];if(t.type===Te.tw.IncrementalSnapshot)switch(t.data.source){case Te.yh.MouseMove:return!1;case Te.yh.MouseInteraction:switch(t.data.type){case Te.Y2.Click:case Te.Y2.MouseDown:return!0;case Te.Y2.Focus:return-1===t.data.id}}}return!1}},{key:"handleMouseDown",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNodeById(n.id);case 2:return r=e.sent,e.prev=3,e.t0=r,e.next=7,this.elementSelector.getSelector(r);case 7:return e.t1=e.sent,this.lastMouseDownExtract={node:e.t0,selector:e.t1},e.next=11,this.getInteractableElementsMetadata();case 11:this.allInteractableElementsMetadata.mouseDown=e.sent,e.next=17;break;case 14:e.prev=14,e.t2=e.catch(3),console.warn("error with extracting selector for node during handleMouseDown",r,e.t2);case 17:this.previousMouseDownData=n;case 18:case"end":return e.stop()}}),e,this,[[3,14]])})));return function(t){return e.apply(this,arguments)}}()},{key:"handleMouseUp",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.lastMouseUpTime=r.timestamp;case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isLastMouseDownValidForClick",value:function(e){return!!this.lastMouseDownExtract&&e-this.lastMouseUpTime<10}},{key:"invalidateLastMouseDown",value:function(){this.lastMouseUpTime=0,this.lastMouseDownExtract=void 0,this.allInteractableElementsMetadata.mouseDown=void 0}},{key:"handleFocus",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.hasUndefinedFocusNode=-1===n.id;case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleClick",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i){var o,a,s,u=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==n.x&&void 0!==n.y){e.next=2;break}return e.abrupt("return");case 2:return o=this.isLastMouseDownValidForClick(i.timestamp),function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var r,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.getNodeIdForClick(n,i),e.next=3,u.getNodeById(r);case 3:a=e.sent,console.log("click",a),console.log("isMouseDownValidForClick",o),r!==u.previousMouseDownData.id&&o&&console.warn("not same");case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),a=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var r,a,s,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=19;break}return e.t0=l.Z,e.t1=(0,l.Z)({},u.lastMouseDownExtract.selector),e.t2={},e.next=6,u.elementSelector.getSelector(u.lastMouseDownExtract.node,{extractEsraMetadata:!1});case 6:if(e.t4=r=e.sent,e.t3=null===e.t4,e.t3){e.next=10;break}e.t3=void 0===r;case 10:if(!e.t3){e.next=14;break}e.t5=void 0,e.next=15;break;case 14:e.t5=r.playwrightSelector;case 15:return e.t6=e.t5,e.t7=u.allInteractableElementsMetadata.mouseDown,e.t8={playwrightSelectorForSnapshot:e.t6,availableInteractableElementsAtStart:e.t7},e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t8));case 19:return a=u.getNodeIdForClick(n,i),e.next=22,u.getNodeById(a);case 22:if(s=e.sent,!u.previousMousePositionsNodeSelectors[a]){e.next=42;break}return e.t9=l.Z,e.t10=(0,l.Z)({},u.previousMousePositionsNodeSelectors[a]),e.t11={},e.next=29,u.elementSelector.getSelector(s,{extractEsraMetadata:!1});case 29:if(e.t13=c=e.sent,e.t12=null===e.t13,e.t12){e.next=33;break}e.t12=void 0===c;case 33:if(!e.t12){e.next=37;break}e.t14=void 0,e.next=38;break;case 37:e.t14=c.playwrightSelector;case 38:return e.t15=e.t14,e.t16=u.allInteractableElementsMetadata.mouseMove,e.t17={playwrightSelectorForSnapshot:e.t15,availableInteractableElementsAtStart:e.t16},e.abrupt("return",(0,e.t9)(e.t10,e.t11,e.t17));case 42:return e.abrupt("return",u.elementSelector.getSelector(s));case 43:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=7,a();case 7:return s=e.sent,this.invalidateLastMouseDown(),e.abrupt("return",(0,l.Z)({eventCode:Re.$.Click},s));case 10:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getNextMouseMoveEvent",value:function(){for(var e=this.currentEventIndex+1;e<this.events.length;++e){var t=this.events[e];if(t.type===Te.tw.IncrementalSnapshot&&t.data.source===Te.yh.MouseMove)return t}}},{key:"getNodeIdForClick",value:function(e,t){var n=this;if(this.hasUndefinedFocusNode&&this.previousMouseDownData&&this.previousMouseDownData.id!==e.id){var r={next:function(){var e=n.getNextMouseMoveEvent();if(e){var r=e.data,i=(0,m.Z)(r.positions).reverse().find((function(n){return e.timestamp+n.timeOffset<t.timestamp}));if(i)return i.id}}(),previous:function(){if(n.previousMousePositions){var e=(0,m.Z)(n.previousMousePositions).reverse().find((function(e){return!0}));if(e)return e.id}}(),point:function(){try{var t=n.sessionMirror.getNodeById(e.id),r=Array.from(M(t)).filter((function(e){return"none"===window.getComputedStyle(e).pointerEvents})),i=[];if(r.length){r.forEach((function(e){var t=e,n=t.getAttribute("style");i.push(n),t.setAttribute("style",n+";pointer-events:auto !important")}));var o=document.querySelector("iframe").contentDocument.elementFromPoint(e.x,e.y);if(r.forEach((function(e,t){e.setAttribute("style",i[t])})),o){var a=n.sessionMirror.getMeta(o);if(a)return a.id}}}catch(Rt){console.warn("element from point calc error",Rt)}}(),original:e.id},i=r.next||r.previous||e.id;return r.point&&function(){if(i===r.point)return!1;var t=n.sessionMirror.getNodeById(i);return n.isPointWithinBoundingBox(e.x,e.y,t.getBoundingClientRect())}()?r.point:i}return e.id}},{key:"getNodeById",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=c.length>1&&void 0!==c[1]?c[1]:{}).retriesLeft,o=void 0===i?this.numberOfRetries:i,a=r.useCompoundInteractableDetection,s=void 0===a||a,o){e.next=4;break}return console.error("no node"),e.abrupt("return",null);case 4:if(u=this.sessionMirror.getNodeById(n)){e.next=9;break}return e.next=8,De()(100*(this.numberOfRetries-o+1));case 8:return e.abrupt("return",this.getNodeById(n,{retriesLeft:o-1,useCompoundInteractableDetection:s}));case 9:return e.abrupt("return",s?k(u,this.appSpecificRules.appSpecificInteractableElementsSelectors):u);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getInputEventCode",value:function(e,t){switch(e.getAttribute("type")){case"checkbox":case"radio":return t.isChecked?Re.$.Check:Re.$.UnCheck;default:return Re.$.Input}}},{key:"getInteractableElementsMetadata",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,i,o,a,s;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.enableRecordingAvailableInteractableElements){e.next=2;break}return e.abrupt("return",[]);case 2:return n=document.querySelector("iframe").contentWindow,i=n.document,console.log("Getting all interactable elements..."),o=C(i,this.appSpecificRules),console.log("Got ".concat(o.length," interactable elements")),console.log("Extracting ESRA metadata for all interactable elements..."),a=new ae(i),e.next=11,Promise.all(o.map(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.extract(n).toMetadata(),e.abrupt("return",{esraMetadata:r});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 11:return s=e.sent,console.log("Done processing all interactable elements..."),e.abrupt("return",s);case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),i}(Ne.E),Ze=n(7666),Le=n(3246),Fe=n(5512),Ve=n(7326);!function(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"}(Ce||(Ce={}));var Be=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Pe(e){var t=[];for(var n in e){var r=e[n];if("string"===typeof r){var i=Ge(n);t.push("".concat(i,": ").concat(r,";"))}}return t.join(" ")}var je=/-([a-z])/g,We=/^--[a-zA-Z0-9-]+$/,Ue=function(e){return We.test(e)?e:e.replace(je,(function(e,t){return t?t.toUpperCase():""}))},He=/\B([A-Z])/g,Ge=function(e){return e.replace(He,"-$1").toLowerCase()},ze=function(){function e(){(0,a.Z)(this,e),this.parentElement=null,this.parentNode=null,this.firstChild=null,this.lastChild=null,this.previousSibling=null,this.nextSibling=null,this.ELEMENT_NODE=Je.ELEMENT_NODE,this.TEXT_NODE=Je.TEXT_NODE}return(0,s.Z)(e,[{key:"childNodes",get:function(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}},{key:"contains",value:function(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}},{key:"appendChild",value:function(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"insertBefore",value:function(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}},{key:"removeChild",value:function(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"toString",value:function(){return"RRNode"}}]),e}();function qe(e){return function(e){(0,de.Z)(n,e);var t=(0,fe.Z)(n);function n(e,r,i){var o;return(0,a.Z)(this,n),(o=t.call(this)).nodeType=Je.DOCUMENT_TYPE_NODE,o.RRNodeType=Ce.DocumentType,o.name=e,o.publicId=r,o.systemId=i,o.nodeName=e,o.textContent=null,o}return(0,s.Z)(n,[{key:"toString",value:function(){return"RRDocumentType"}}]),n}(e)}function Ye(e){return function(e){(0,de.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=Je.ELEMENT_NODE,r.RRNodeType=Ce.Element,r.attributes={},r.shadowRoot=null,r.tagName=e.toUpperCase(),r.nodeName=e.toUpperCase(),r}return(0,s.Z)(n,[{key:"textContent",get:function(){var e="";return this.childNodes.forEach((function(t){return e+=t.textContent})),e},set:function(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}},{key:"classList",get:function(){var e=this;return new $e(this.attributes.class,(function(t){e.attributes.class=t}))}},{key:"id",get:function(){return this.attributes.id||""}},{key:"className",get:function(){return this.attributes.class||""}},{key:"style",get:function(){var e=this,t=this.attributes.style?function(e){var t={},n=/:(.+)/;return e.replace(/\/\*.*?\*\//g,"").split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[Ue(r[0].trim())]=r[1].trim())}})),t}(this.attributes.style):{},n=/\B([A-Z])/g;return t.setProperty=function(r,i,o){if(!n.test(r)){var a=Ue(r);i?t[a]=i:delete t[a],"important"===o&&(t[a]+=" !important"),e.attributes.style=Pe(t)}},t.removeProperty=function(r){if(n.test(r))return"";var i=Ue(r),o=t[i]||"";return delete t[i],e.attributes.style=Pe(t),o},t}},{key:"getAttribute",value:function(e){return this.attributes[e]||null}},{key:"setAttribute",value:function(e,t){this.attributes[e]=t}},{key:"setAttributeNS",value:function(e,t,n){this.setAttribute(t,n)}},{key:"removeAttribute",value:function(e){delete this.attributes[e]}},{key:"appendChild",value:function(e){return et(this,e)}},{key:"insertBefore",value:function(e,t){return tt(this,e,t)}},{key:"removeChild",value:function(e){return nt(this,e)}},{key:"attachShadow",value:function(e){var t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}},{key:"dispatchEvent",value:function(e){return!0}},{key:"toString",value:function(){var e="";for(var t in this.attributes)e+="".concat(t,'="').concat(this.attributes[t],'" ');return"".concat(this.tagName," ").concat(e)}}]),n}(e)}function Qe(e){return function(e){(0,de.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=Je.TEXT_NODE,r.nodeName="#text",r.RRNodeType=Ce.Text,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRText text=".concat(JSON.stringify(this.data))}}]),n}(e)}function Ke(e){return function(e){(0,de.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=Je.COMMENT_NODE,r.nodeName="#comment",r.RRNodeType=Ce.Comment,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRComment text=".concat(JSON.stringify(this.data))}}]),n}(e)}function Xe(e){return function(e){(0,de.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeName="#cdata-section",r.nodeType=Je.CDATA_SECTION_NODE,r.RRNodeType=Ce.CDATA,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRCDATASection data=".concat(JSON.stringify(this.data))}}]),n}(e)}var Je,$e=(0,s.Z)((function e(t,n){var r=this;if((0,a.Z)(this,e),this.classes=[],this.add=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,o=t;i<o.length;i++){var a=o[i],s=String(a);r.classes.indexOf(s)>=0||r.classes.push(s)}r.onChange&&r.onChange(r.classes.join(" "))},this.remove=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.classes=r.classes.filter((function(e){return-1===t.indexOf(e)})),r.onChange&&r.onChange(r.classes.join(" "))},t){var i,o=t.trim().split(/\s+/);(i=this.classes).push.apply(i,(0,m.Z)(o))}this.onChange=n}));function et(e,t){return 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 tt(e,t,n){if(!n)return et(e,t);if(n.parentNode!==e)throw new 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.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 nt(e,t){if(t.parentNode!==e)throw new 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}!function(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"}(Je||(Je={}));var rt={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},it={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"},ot=null;function at(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.mirror||t.ownerDocument.mirror;e=function(e,t,n,r){var i;n.afterAppend&&!ot&&(ot=new WeakSet,setTimeout((function(){ot=null}),0));if(!ct(e,t)){var o=ut(t,n.mirror,r);null===(i=e.parentNode)||void 0===i||i.replaceChild(o,e),e=o}switch(t.RRNodeType){case Ce.Document:if(!lt(e,t,n.mirror,r)){var a=r.getMeta(t);a&&(n.mirror.removeNodeFromMap(e),e.close(),e.open(),n.mirror.add(e,a),null===ot||void 0===ot||ot.add(e))}break;case Ce.Element:var s=e,u=t;switch(u.tagName){case"IFRAME":var c=e.contentDocument;if(!c)break;at(c,t.contentDocument,n,r)}if(u.shadowRoot){s.shadowRoot||s.attachShadow({mode:"open"});var l=s.shadowRoot.childNodes,d=u.shadowRoot.childNodes;(l.length>0||d.length>0)&&st(Array.from(l),d,s.shadowRoot,n,r)}}return e}(e,t,n,r);var i=e.childNodes,o=t.childNodes;(i.length>0||o.length>0)&&st(Array.from(i),o,e,n,r),function(e,t,n,r){var i;switch(t.RRNodeType){case Ce.Document:var o=t.scrollData;o&&n.applyScroll(o,!0);break;case Ce.Element:var a=e,s=t;switch(function(e,t,n){var r=e.attributes,i=t.attributes,o=function(){var r=i[a],o=n.getMeta(t);if((null===o||void 0===o?void 0:o.isSVG)&&rt[a])e.setAttributeNS(rt[a],a,r);else if("CANVAS"===t.tagName&&"rr_dataURL"===a){var s=document.createElement("img");s.src=r,s.onload=function(){var t=e.getContext("2d");t&&t.drawImage(s,0,0,s.width,s.height)}}else e.setAttribute(a,r)};for(var a in i)o();for(var s=0,u=Array.from(r);s<u.length;s++){var c=u[s].name;c in i||e.removeAttribute(c)}t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}(a,s,r),s.scrollData&&n.applyScroll(s.scrollData,!0),s.inputData&&n.applyInput(s.inputData),s.tagName){case"AUDIO":case"VIDEO":var u=e,c=s;void 0!==c.paused&&(c.paused?u.pause():u.play()),void 0!==c.muted&&(u.muted=c.muted),void 0!==c.volume&&(u.volume=c.volume),void 0!==c.currentTime&&(u.currentTime=c.currentTime),void 0!==c.playbackRate&&(u.playbackRate=c.playbackRate);break;case"CANVAS":var l=t;if(null!==l.rr_dataURL){var d=document.createElement("img");d.onload=function(){var e=a.getContext("2d");e&&e.drawImage(d,0,0,d.width,d.height)},d.src=l.rr_dataURL}l.canvasMutations.forEach((function(t){return n.applyCanvas(t.event,t.mutation,e)}));break;case"STYLE":var f=a.sheet;f&&t.rules.forEach((function(e){return n.applyStyleSheetMutation(e,f)}))}break;case Ce.Text:case Ce.Comment:case Ce.CDATA:e.textContent!==t.data&&(e.textContent=t.data)}(null===ot||void 0===ot?void 0:ot.has(e))&&(ot.delete(e),null===(i=n.afterAppend)||void 0===i||i.call(n,e,n.mirror.getId(e)))}(e,t,n,r)}function st(e,t,n,r,i){for(var o=0,a=e.length-1,s=0,u=t.length-1,c=e[o],l=e[a],d=t[s],f=t[u],h=void 0,p=void 0;o<=a&&s<=u;)if(void 0===c)c=e[++o];else if(void 0===l)l=e[--a];else if(lt(c,d,r.mirror,i))at(c,d,r,i),c=e[++o],d=t[++s];else if(lt(l,f,r.mirror,i))at(l,f,r,i),l=e[--a],f=t[--u];else if(lt(c,f,r.mirror,i)){try{n.insertBefore(c,l.nextSibling)}catch(Rt){console.warn(Rt)}at(c,f,r,i),c=e[++o],f=t[--u]}else if(lt(l,d,r.mirror,i)){try{n.insertBefore(l,c)}catch(Rt){console.warn(Rt)}at(l,d,r,i),l=e[--a],d=t[++s]}else{if(!h){h={};for(var v=o;v<=a;v++){var m=e[v];m&&r.mirror.hasNode(m)&&(h[r.mirror.getId(m)]=v)}}var g=e[p=h[i.getId(d)]];if(void 0!==p&&g&<(g,d,r.mirror,i)){try{n.insertBefore(g,c)}catch(Rt){console.warn(Rt)}at(g,d,r,i),e[p]=void 0}else{var y=ut(d,r.mirror,i);"#document"===n.nodeName&&c&&(y.nodeType===y.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||y.nodeType===y.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(n.removeChild(c),r.mirror.removeNodeFromMap(c),c=e[++o]);try{n.insertBefore(y,c||null),at(y,d,r,i)}catch(Rt){console.warn(Rt)}}d=t[++s]}if(o>a){var b=t[u+1],w=null;for(b&&(w=r.mirror.getNode(i.getId(b)));s<=u;++s){var S=ut(t[s],r.mirror,i);try{n.insertBefore(S,w),at(S,t[s],r,i)}catch(Rt){console.warn(Rt)}}}else if(s>u)for(;o<=a;o++){var I=e[o];if(I&&n.contains(I))try{n.removeChild(I),r.mirror.removeNodeFromMap(I)}catch(Rt){console.warn(Rt)}}}function ut(e,t,n){var r=n.getId(e),i=n.getMeta(e),o=null;if(r>-1&&(o=t.getNode(r)),null!==o&&ct(o,e))return o;switch(e.RRNodeType){case Ce.Document:o=new Document;break;case Ce.DocumentType:o=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case Ce.Element:var a=e.tagName.toLowerCase();a=it[a]||a,o=i&&"isSVG"in i&&(null===i||void 0===i?void 0:i.isSVG)?document.createElementNS(rt.svg,a):document.createElement(e.tagName);break;case Ce.Text:o=document.createTextNode(e.data);break;case Ce.Comment:o=document.createComment(e.data);break;case Ce.CDATA:o=document.createCDATASection(e.data)}i&&t.add(o,Object.assign({},i));try{null===ot||void 0===ot||ot.add(o)}catch(Rt){}return o}function ct(e,t){return e.nodeType===t.nodeType&&(e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName)}function lt(e,t,n,r){var i=n.getId(e),o=r.getId(t);return-1!==i&&i===o&&ct(e,t)}var dt=function(e){(0,de.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).UNSERIALIZED_STARTING_ID=-2,r._unserializedId=r.UNSERIALIZED_STARTING_ID,r.mirror=new Ct,r.scrollData=null,e&&(r.mirror=e),r}return(0,s.Z)(n,[{key:"unserializedId",get:function(){return this._unserializedId--}},{key:"createDocument",value:function(e,t,r){return new n}},{key:"createDocumentType",value:function(e,t,n){var r=new ft(e,t,n);return r.ownerDocument=this,r}},{key:"createElement",value:function(e){var t,n=e.toUpperCase();switch(n){case"AUDIO":case"VIDEO":t=new pt(n);break;case"IFRAME":t=new gt(n,this.mirror);break;case"CANVAS":t=new vt(n);break;case"STYLE":t=new mt(n);break;default:t=new ht(n)}return t.ownerDocument=this,t}},{key:"createComment",value:function(e){var t=new bt(e);return t.ownerDocument=this,t}},{key:"createCDATASection",value:function(e){var t=new wt(e);return t.ownerDocument=this,t}},{key:"createTextNode",value:function(e){var t=new yt(e);return t.ownerDocument=this,t}},{key:"destroyTree",value:function(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}},{key:"open",value:function(){(0,ce.Z)((0,le.Z)(n.prototype),"open",this).call(this),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}]),n}(function(e){(0,de.Z)(n,e);var t=(0,fe.Z)(n);function n(){var e;(0,a.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call(this,i)).nodeType=Je.DOCUMENT_NODE,e.nodeName="#document",e.compatMode="CSS1Compat",e.RRNodeType=Ce.Document,e.textContent=null,e.ownerDocument=(0,Ve.Z)(e),e}return(0,s.Z)(n,[{key:"documentElement",get:function(){return this.childNodes.find((function(e){return e.RRNodeType===Ce.Element&&"HTML"===e.tagName}))||null}},{key:"body",get:function(){var e;return(null===(e=this.documentElement)||void 0===e?void 0:e.childNodes.find((function(e){return e.RRNodeType===Ce.Element&&"BODY"===e.tagName})))||null}},{key:"head",get:function(){var e;return(null===(e=this.documentElement)||void 0===e?void 0:e.childNodes.find((function(e){return e.RRNodeType===Ce.Element&&"HEAD"===e.tagName})))||null}},{key:"implementation",get:function(){return this}},{key:"firstElementChild",get:function(){return this.documentElement}},{key:"appendChild",value:function(e){var t=e.RRNodeType;if((t===Ce.Element||t===Ce.DocumentType)&&this.childNodes.some((function(e){return e.RRNodeType===t})))throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ".concat(t===Ce.Element?"RRElement":"RRDoctype"," on RRDocument allowed."));var n=et(this,e);return n.parentElement=null,n}},{key:"insertBefore",value:function(e,t){var n=e.RRNodeType;if((n===Ce.Element||n===Ce.DocumentType)&&this.childNodes.some((function(e){return e.RRNodeType===n})))throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ".concat(n===Ce.Element?"RRElement":"RRDoctype"," on RRDocument allowed."));var r=tt(this,e,t);return r.parentElement=null,r}},{key:"removeChild",value:function(e){return nt(this,e)}},{key:"open",value:function(){this.firstChild=null,this.lastChild=null}},{key:"close",value:function(){}},{key:"write",value:function(e){var t;if('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'===e?t="-//W3C//DTD XHTML 1.0 Transitional//EN":'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'===e&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){var n=this.createDocumentType("html",t,"");this.open(),this.appendChild(n)}}},{key:"createDocument",value:function(e,t,r){return new n}},{key:"createDocumentType",value:function(e,t,n){var r=new(qe(ze))(e,t,n);return r.ownerDocument=this,r}},{key:"createElement",value:function(e){var t=new(Ye(ze))(e);return t.ownerDocument=this,t}},{key:"createElementNS",value:function(e,t){return this.createElement(t)}},{key:"createTextNode",value:function(e){var t=new(Qe(ze))(e);return t.ownerDocument=this,t}},{key:"createComment",value:function(e){var t=new(Ke(ze))(e);return t.ownerDocument=this,t}},{key:"createCDATASection",value:function(e){var t=new(Xe(ze))(e);return t.ownerDocument=this,t}},{key:"toString",value:function(){return"RRDocument"}}]),n}(ze)),ft=qe(ze),ht=function(e){(0,de.Z)(n,e);var t=(0,fe.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).inputData=null,e.scrollData=null,e}return(0,s.Z)(n)}(Ye(ze)),pt=function(e){(0,de.Z)(n,e);var t=(0,fe.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n)}(function(e){(0,de.Z)(n,e);var t=(0,fe.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"attachShadow",value:function(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}},{key:"play",value:function(){this.paused=!1}},{key:"pause",value:function(){this.paused=!0}}]),n}(ht)),vt=function(e){(0,de.Z)(n,e);var t=(0,fe.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).rr_dataURL=null,e.canvasMutations=[],e}return(0,s.Z)(n,[{key:"getContext",value:function(){return null}}]),n}(ht),mt=function(e){(0,de.Z)(n,e);var t=(0,fe.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).rules=[],e}return(0,s.Z)(n)}(ht),gt=function(e){(0,de.Z)(n,e);var t=(0,fe.Z)(n);function n(e,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e)).contentDocument=new dt,i.contentDocument.mirror=r,i}return(0,s.Z)(n)}(ht),yt=Qe(ze),bt=Ke(ze),wt=Xe(ze);function St(e,t,n,r){var i,o;switch(e.nodeType){case Je.DOCUMENT_NODE:r&&"IFRAME"===r.nodeName?i=r.contentDocument:(i=t).compatMode=e.compatMode;break;case Je.DOCUMENT_TYPE_NODE:var a=e;i=t.createDocumentType(a.name,a.publicId,a.systemId);break;case Je.ELEMENT_NODE:for(var s=e,u=(o=s)instanceof HTMLFormElement?"FORM":o.tagName.toUpperCase(),c=i=t.createElement(u),l=0,d=Array.from(s.attributes);l<d.length;l++){var f=d[l],h=f.name,p=f.value;c.attributes[h]=p}s.scrollLeft&&(c.scrollLeft=s.scrollLeft),s.scrollTop&&(c.scrollTop=s.scrollTop);break;case Je.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case Je.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case Je.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case Je.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}var v=n.getMeta(e);return t instanceof dt&&(v||(v=kt(i,t.unserializedId),n.add(e,v)),t.mirror.add(i,Object.assign({},v))),i}function It(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Be,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new dt;return function e(r,i){var o=St(r,n,t,i);if(null!==o)if("IFRAME"!==(null===i||void 0===i?void 0:i.nodeName)&&r.nodeType!==Je.DOCUMENT_FRAGMENT_NODE&&(null===i||void 0===i||i.appendChild(o),o.parentNode=i,o.parentElement=i),"IFRAME"===r.nodeName){var a=r.contentDocument;a&&e(a,o)}else r.nodeType!==Je.DOCUMENT_NODE&&r.nodeType!==Je.ELEMENT_NODE&&r.nodeType!==Je.DOCUMENT_FRAGMENT_NODE||(r.nodeType===Je.ELEMENT_NODE&&r.shadowRoot&&e(r.shadowRoot,o),r.childNodes.forEach((function(t){return e(t,o)})))}(e,null),n}var Ct=function(){function e(){(0,a.Z)(this,e),this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return(0,s.Z)(e,[{key:"getId",value:function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]),e}();function kt(e,t){switch(e.RRNodeType){case Ce.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case Ce.DocumentType:var n=e;return{id:t,type:e.RRNodeType,name:n.name,publicId:n.publicId,systemId:n.systemId};case Ce.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case Ce.Text:case Ce.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case Ce.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}function Et(e){return{all:e=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)}))}}}function xt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,r=e.HTMLElement||e.Element,i=468,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||u,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?p.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):o.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(c(arguments[0])?o.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):p.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==c(arguments[0])){var e=arguments[0].left,t=arguments[0].top;p.call(this,this,"undefined"===typeof e?this.scrollLeft:~~e,"undefined"===typeof t?this.scrollTop:~~t)}else{if("number"===typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!==typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var n=function(e){for(;e!==t.body&&!1===f(e);)e=e.parentNode||e.host;return e}(this),r=n.getBoundingClientRect(),i=this.getBoundingClientRect();n!==t.body?(p.call(this,n,n.scrollLeft+i.left-r.left,n.scrollTop+i.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function u(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){if(null===e||"object"!==typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"===typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function l(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function f(e){var t=l(e,"Y")&&d(e,"Y"),n=l(e,"X")&&d(e,"X");return t||n}function h(t){var n,r,o,s,u=(a()-t.startTime)/i;s=u=u>1?1:u,n=.5*(1-Math.cos(Math.PI*s)),r=t.startX+(t.x-t.startX)*n,o=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,o),r===t.x&&o===t.y||e.requestAnimationFrame(h.bind(e,t))}function p(n,r,i){var s,c,l,d,f=a();n===t.body?(s=e,c=e.scrollX||e.pageXOffset,l=e.scrollY||e.pageYOffset,d=o.scroll):(s=n,c=n.scrollLeft,l=n.scrollTop,d=u),h({scrollable:s,method:d,startTime:f,startX:c,startY:l,x:r,y:i})}}var At,Mt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;(0,a.Z)(this,e),this.timeOffset=0,this.raf=null,this.actions=t,this.speed=n.speed}return(0,s.Z)(e,[{key:"addAction",value:function(e){var t=!0===this.raf;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{var n=this.findActionIndex(e);this.actions.splice(n,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}},{key:"start",value:function(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}},{key:"rafCheck",value:function(){var e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){var t=this.actions[0];if(!(this.timeOffset>=t.delay))break;this.actions.shift(),t.doAction()}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}},{key:"clear",value:function(){this.raf&&(!0!==this.raf&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}},{key:"setSpeed",value:function(e){this.speed=e}},{key:"isActive",value:function(){return null!==this.raf}},{key:"findActionIndex",value:function(e){for(var t=0,n=this.actions.length-1;t<=n;){var r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else{if(!(this.actions[r].delay>e.delay))return r+1;n=r-1}}return t}}]),e}();function Tt(e,t){if(e.type===Te.tw.IncrementalSnapshot&&e.data.source===Te.yh.MouseMove&&e.data.positions&&e.data.positions.length){var 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}function Nt(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(At||(At={}));var Rt={type:"xstate.init"};function _t(e){return void 0===e?[]:[].concat(e)}function Dt(e){return{type:"xstate.assign",assignment:e}}function Ot(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function Zt(e){return function(t){return e===t}}function Lt(e){return"string"==typeof e?{type:e}:e}function Ft(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Zt(e)}}function Vt(e,t,n){var r=t,i=!1;return[e.filter((function(e){if("xstate.assign"===e.type){i=!0;var t=Object.assign({},r);return"function"==typeof e.assignment?t=e.assignment(r,n):Object.keys(e.assignment).forEach((function(i){t[i]="function"==typeof e.assignment[i]?e.assignment[i](r,n):e.assignment[i]})),r=t,!1}return!0})),r,i]}function Bt(e,t){void 0===t&&(t={});var n=Nt(Vt(_t(e.states[e.initial].entry).map((function(e){return Ot(e,t.actions)})),e.context,Rt),2),r=n[0],i=n[1],o={config:e,_options:t,initialState:{value:e.initial,actions:r,context:i,matches:Zt(e.initial)},transition:function(t,n){var r,i,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,u=a.context,c=Lt(n),l=e.states[s];if(l.on){var d=_t(l.on[c.type]);try{for(var f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(d),h=f.next();!h.done;h=f.next()){var p=h.value;if(void 0===p)return Ft(s,u);var v="string"==typeof p?{target:p}:p,m=v.target,g=v.actions,y=void 0===g?[]:g,b=v.cond,w=void 0===b?function(){return!0}:b,S=void 0===m,I=null!=m?m:s,C=e.states[I];if(w(u,c)){var k=Nt(Vt((S?_t(y):[].concat(l.exit,y,C.entry).filter((function(e){return e}))).map((function(e){return Ot(e,o._options.actions)})),u,c),3),E=k[0],x=k[1],A=k[2],M=null!=m?m:s;return{value:M,context:x,actions:E,changed:m!==s||E.length>0||A,matches:Zt(M)}}}}catch(Nt){r={error:Nt}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}return Ft(s,u)}};return o}var Pt=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function jt(e){var t=e.initialState,n=At.NotStarted,r=new Set,i={_machine:e,send:function(i){n===At.Running&&(t=e.transition(t,i),Pt(t,Lt(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 o="object"==typeof r?r:{context:e.config.context,value:r};t={value:o.value,actions:[],context:o.context,matches:Zt(o.value)}}return n=At.Running,Pt(t,Rt),i},stop:function(){return n=At.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}function Wt(e,t){var n=t.getCastFn,r=t.applyEventsSynchronously,i=t.emitter,o=Bt({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:Dt({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:Dt((function(e,t){var n=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(n=t.payload.timeOffset),Object.assign(Object.assign({},e),{timeOffset:n,baselineTime:e.events[0].timestamp+n})})),play:function(e){var t,o=e.timer,a=e.events,s=e.baselineTime,u=e.lastPlayedEvent;o.clear();var c,l=(0,p.Z)(a);try{for(l.s();!(c=l.n()).done;){Tt(c.value,s)}}catch(y){l.e(y)}finally{l.f()}var d=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.type===Te.tw.Meta&&r.timestamp<=t)return e.slice(n)}return e}(a,s),f=null===u||void 0===u?void 0:u.timestamp;(null===u||void 0===u?void 0:u.type)===Te.tw.IncrementalSnapshot&&u.data.source===Te.yh.MouseMove&&(f=u.timestamp+(null===(t=u.data.positions[0])||void 0===t?void 0:t.timeOffset)),s<(f||0)&&i.emit(Te.SA.PlayBack);var h,v=new Array,m=(0,p.Z)(d);try{var g=function(){var e=h.value;if(f&&f<s&&(e.timestamp<=f||e===u))return 1;if(e.timestamp<s)v.push(e);else{var t=n(e,!1);o.addAction({doAction:function(){t()},delay:e.delay})}};for(m.s();!(h=m.n()).done;)g()}catch(y){m.e(y)}finally{m.f()}r(v),i.emit(Te.SA.Flush),o.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:Dt((function(e){return Object.assign(Object.assign({},e),{lastPlayedEvent:null})})),startLive:Dt({baselineTime:function(e,t){return e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:Dt((function(e,t){var r=e.baselineTime,i=e.timer,o=e.events;if("ADD_EVENT"===t.type){var a=t.payload.event;Tt(a,r);var s=o.length-1;if(!o[s]||o[s].timestamp<=a.timestamp)o.push(a);else{for(var u=-1,c=0;c<=s;){var l=Math.floor((c+s)/2);o[l].timestamp<=a.timestamp?c=l+1:s=l-1}-1===u&&(u=c),o.splice(u,0,a)}var d=a.timestamp<r,f=n(a,d);d?f():i.isActive()&&i.addAction({doAction:function(){f()},delay:a.delay})}return Object.assign(Object.assign({},e),{events:o})}))}});return jt(o)}var Ut=n(1737),Ht=n(5647),Gt=n(3464),zt=new Map;function qt(e,t){var n=zt.get(e);return n||(n=new Map,zt.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}function Yt(e,n,r){var i=this;return function(o){return(0,Le.m)(i,void 0,void 0,(0,t.Z)().mark((function i(){var a,s,u,c,l,d,f,h,p,v,g;return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o||"object"!==typeof o||!("rr_type"in o)){t.next=55;break}if(r&&(r.isUnchanged=!1),"ImageBitmap"!==o.rr_type||!("args"in o)){t.next=11;break}return t.next=5,Yt(e,n,r)(o.args);case 5:return a=t.sent,t.next=8,createImageBitmap.apply(null,a);case 8:return t.abrupt("return",t.sent);case 11:if(!("index"in o)){t.next=18;break}if(!r&&null!==n){t.next=14;break}return t.abrupt("return",o);case 14:return s=o.rr_type,u=o.index,t.abrupt("return",qt(n,s)[u]);case 18:if(!("args"in o)){t.next=31;break}return c=o.rr_type,l=o.args,d=window[c],t.t0=Ht.Z,t.t1=d,t.t2=m.Z,t.next=26,Promise.all(l.map(Yt(e,n,r)));case 26:return t.t3=t.sent,t.t4=(0,t.t2)(t.t3),t.abrupt("return",(0,t.t0)(t.t1,t.t4));case 31:if(!("base64"in o)){t.next=35;break}return t.abrupt("return",(0,Gt.J)(o.base64));case 35:if(!("src"in o)){t.next=47;break}if(!(f=e.get(o.src))){t.next=41;break}return t.abrupt("return",f);case 41:return(h=new Image).src=o.src,e.set(o.src,h),t.abrupt("return",h);case 45:t.next=53;break;case 47:if(!("data"in o)||"Blob"!==o.rr_type){t.next=53;break}return t.next=50,Promise.all(o.data.map(Yt(e,n,r)));case 50:return p=t.sent,v=new Blob(p,{type:o.type}),t.abrupt("return",v);case 53:t.next=60;break;case 55:if(!Array.isArray(o)){t.next=60;break}return t.next=58,Promise.all(o.map(Yt(e,n,r)));case 58:return g=t.sent,t.abrupt("return",g);case 60:return t.abrupt("return",o);case 61:case"end":return t.stop()}}),i)})))}}function Qt(e,t){try{return t===Te.FX.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(Rt){return null}}var Kt=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Xt(e,t){if(null===t||void 0===t?void 0:t.constructor){var n=t.constructor.name;if(Kt.includes(n)){var r=qt(e,n);r.includes(t)||r.push(t)}}}function Jt(e){var n=e.mutation,r=e.target,i=e.type,o=e.imageMap,a=e.errorHandler;return(0,Le.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var s,u,c,l;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,s=Qt(r,i)){e.next=4;break}return e.abrupt("return");case 4:if(!n.setter){e.next=7;break}return s[n.property]=n.args[0],e.abrupt("return");case 7:return u=s[n.property],e.next=10,Promise.all(n.args.map(Yt(o,s)));case 10:c=e.sent,l=u.apply(s,c),Xt(s,l),!1,e.next=20;break;case 17:e.prev=17,e.t0=e.catch(0),a(n,e.t0);case 20:case"end":return e.stop()}}),e,null,[[0,17]])})))}function $t(e){var n=e.event,r=e.mutation,i=e.target,o=e.imageMap,a=e.errorHandler;return(0,Le.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var s,u,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,s=i.getContext("2d"),!r.setter){e.next=5;break}return s[r.property]=r.args[0],e.abrupt("return");case 5:if(u=s[r.property],"drawImage"!==r.property||"string"!==typeof r.args[0]){e.next=11;break}o.get(n),u.apply(s,r.args),e.next=15;break;case 11:return e.next=13,Promise.all(r.args.map(Yt(o,s)));case 13:c=e.sent,u.apply(s,c);case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(0),a(r,e.t0);case 20:case"end":return e.stop()}}),e,null,[[0,17]])})))}function en(e){var n=e.event,r=e.mutation,i=e.target,o=e.imageMap,a=e.canvasEventMap,s=e.errorHandler;return(0,Le.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var u,c,l,d,f,h;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,u=a.get(n)||r,c="commands"in u?u.commands:[u],![Te.FX.WebGL,Te.FX.WebGL2].includes(r.type)){e.next=13;break}l=0;case 5:if(!(l<c.length)){e.next=12;break}return d=c[l],e.next=9,Jt({mutation:d,type:r.type,target:i,imageMap:o,errorHandler:s});case 9:l++,e.next=5;break;case 12:return e.abrupt("return");case 13:f=0;case 14:if(!(f<c.length)){e.next=21;break}return h=c[f],e.next=18,$t({event:n,mutation:h,target:i,imageMap:o,errorHandler:s});case 18:f++,e.next=14;break;case 21:e.next=26;break;case 23:e.prev=23,e.t0=e.catch(0),s(r,e.t0);case 26:case"end":return e.stop()}}),e,null,[[0,23]])})))}var tn=Et||e,nn="[replayer]",rn={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function on(e){return e.type==Te.tw.IncrementalSnapshot&&(e.data.source==Te.yh.TouchMove||e.data.source==Te.yh.MouseInteraction&&e.data.type==Te.Y2.TouchStart)}var an,sn=function(){function e(t,n){var r=this;if((0,a.Z)(this,e),this.usingVirtualDom=!1,this.virtualDom=new dt,this.mouseTail=null,this.tailPositions=[],this.emitter=tn(),this.legacy_missingNodeRetryMap={},this.cache=(0,Fe.Df)(),this.imageMap=new Map,this.canvasEventMap=new Map,this.mirror=(0,Fe.bZ)(),this.styleMirror=new Ut.ug,this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[],this.handleResize=function(e){r.iframe.style.display="inherit";for(var t=0,n=[r.mouseTail,r.iframe];t<n.length;t++){var i=n[t];i&&(i.setAttribute("width",String(e.width)),i.setAttribute("height",String(e.height)))}},this.applyEventsSynchronously=function(e){var t,n=(0,p.Z)(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;switch(i.type){case Te.tw.DomContentLoaded:case Te.tw.Load:case Te.tw.Custom:continue;case Te.tw.FullSnapshot:case Te.tw.Meta:case Te.tw.Plugin:case Te.tw.IncrementalSnapshot:}r.getCastFn(i,!0)()}}catch(o){n.e(o)}finally{n.f()}!0===r.touchActive?r.mouse.classList.add("touch-active"):!1===r.touchActive&&r.mouse.classList.remove("touch-active"),r.touchActive=null},this.getCastFn=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(e.type){case Te.tw.DomContentLoaded:case Te.tw.Load:break;case Te.tw.Custom:t=function(){r.emitter.emit(Te.SA.CustomEvent,e)};break;case Te.tw.Meta:t=function(){return r.emitter.emit(Te.SA.Resize,{width:e.data.width,height:e.data.height})};break;case Te.tw.FullSnapshot:t=function(){var t;if(r.firstFullSnapshot){if(r.firstFullSnapshot===e)return void(r.firstFullSnapshot=!0)}else r.firstFullSnapshot=!0;r.rebuildFullSnapshot(e,n),null===(t=r.iframe.contentWindow)||void 0===t||t.scrollTo(e.data.initialOffset),r.styleMirror.reset()};break;case Te.tw.IncrementalSnapshot:t=function(){if(r.applyIncremental(e,n),!n&&(e===r.nextUserInteractionEvent&&(r.nextUserInteractionEvent=null,r.backToNormal()),r.config.skipInactive&&!r.nextUserInteractionEvent)){var t,i=(0,p.Z)(r.service.state.context.events);try{for(i.s();!(t=i.n()).done;){var o=t.value;if(!(o.timestamp<=e.timestamp)&&r.isUserInteraction(o)){o.delay-e.delay>1e4*r.speedService.state.context.timer.speed&&(r.nextUserInteractionEvent=o);break}}}catch(u){i.e(u)}finally{i.f()}if(r.nextUserInteractionEvent){var a=r.nextUserInteractionEvent.delay-e.delay,s={speed:Math.min(Math.round(a/5e3),r.config.maxSpeed)};r.speedService.send({type:"FAST_FORWARD",payload:s}),r.emitter.emit(Te.SA.SkipStart,s)}}}}return function(){t&&t();var i,o=(0,p.Z)(r.config.plugins||[]);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.handler&&a.handler(e,n,{replayer:r})}}catch(c){o.e(c)}finally{o.f()}r.service.send({type:"CAST_EVENT",payload:{event:e}});var s=r.service.state.context.events.length-1;if(!r.config.liveMode&&e===r.service.state.context.events[s]){var u=50;e.type===Te.tw.IncrementalSnapshot&&e.data.source===Te.yh.MouseMove&&e.data.positions.length&&(u+=Math.max(0,-e.data.positions[0].timeOffset)),setTimeout((function(){s<r.service.state.context.events.length-1||(r.backToNormal(),r.service.send("END"),r.emitter.emit(Te.SA.Finish))}),u)}r.emitter.emit(Te.SA.EventCast,e)}},!(null===n||void 0===n?void 0:n.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");var i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:rn,useVirtualDom:!0,logger:console};this.config=Object.assign({},i,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(Te.SA.Resize,this.handleResize),this.setupDom();var o,s=(0,p.Z)(this.config.plugins||[]);try{for(s.s();!(o=s.n()).done;){var u=o.value;u.getMirror&&u.getMirror({nodeMirror:this.mirror})}}catch(m){s.e(m)}finally{s.f()}this.emitter.on(Te.SA.Flush,(function(){if(r.usingVirtualDom){var e={mirror:r.mirror,applyCanvas:function(e,t,n){en({event:e,mutation:t,target:n,imageMap:r.imageMap,canvasEventMap:r.canvasEventMap,errorHandler:r.warnCanvasMutationFailed.bind(r)})},applyInput:r.applyInput.bind(r),applyScroll:r.applyScroll.bind(r),applyStyleSheetMutation:function(e,t){e.source===Te.yh.StyleSheetRule?r.applyStyleSheetRule(e,t):e.source===Te.yh.StyleDeclaration&&r.applyStyleDeclaration(e,t)},afterAppend:function(e,t){var n,i=(0,p.Z)(r.config.plugins||[]);try{for(i.s();!(n=i.n()).done;){var o=n.value;o.onBuild&&o.onBuild(e,{id:t,replayer:r})}}catch(m){i.e(m)}finally{i.f()}}};if(r.iframe.contentDocument)try{at(r.iframe.contentDocument,r.virtualDom,e,r.virtualDom.mirror)}catch(Rt){console.warn(Rt)}if(r.virtualDom.destroyTree(),r.usingVirtualDom=!1,Object.keys(r.legacy_missingNodeRetryMap).length)for(var t in r.legacy_missingNodeRetryMap)try{var n=r.legacy_missingNodeRetryMap[t],i=ut(n.node,r.mirror,r.virtualDom.mirror);at(i,n.node,e,r.virtualDom.mirror),n.node=i}catch(o){r.warn(o)}r.constructedStyleMutations.forEach((function(e){r.applyStyleSheetMutation(e)})),r.constructedStyleMutations=[],r.adoptedStyleSheets.forEach((function(e){r.applyAdoptedStyleSheet(e)})),r.adoptedStyleSheets=[]}r.mousePos&&(r.moveAndHover(r.mousePos.x,r.mousePos.y,r.mousePos.id,!0,r.mousePos.debugData),r.mousePos=null),r.lastSelectionData&&(r.applySelection(r.lastSelectionData),r.lastSelectionData=null)})),this.emitter.on(Te.SA.PlayBack,(function(){r.firstFullSnapshot=null,r.mirror.reset(),r.styleMirror.reset()}));var c=new Mt([],{speed:this.config.speed});this.service=Wt({events:t.map((function(e){return n&&n.unpackFn?n.unpackFn(e):e})).sort((function(e,t){return e.timestamp-t.timestamp})),timer:c,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){r.emitter.emit(Te.SA.StateChange,{player:e})})),this.speedService=jt(Bt({id:"speed",context:{normalSpeed:-1,timer:c},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:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:Dt({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(e){r.emitter.emit(Te.SA.StateChange,{speed:e})}));var l=this.service.state.context.events.find((function(e){return e.type===Te.tw.Meta})),d=this.service.state.context.events.find((function(e){return e.type===Te.tw.FullSnapshot}));if(l){var f=l.data,h=f.width,v=f.height;setTimeout((function(){r.emitter.emit(Te.SA.Resize,{width:h,height:v})}),0)}d&&setTimeout((function(){var e;r.firstFullSnapshot||(r.firstFullSnapshot=d,r.rebuildFullSnapshot(d),null===(e=r.iframe.contentWindow)||void 0===e||e.scrollTo(d.data.initialOffset))}),1),this.service.state.context.events.find(on)&&this.mouse.classList.add("touch-device")}return(0,s.Z)(e,[{key:"timer",get:function(){return this.service.state.context.timer}},{key:"on",value:function(e,t){return this.emitter.on(e,t),this}},{key:"off",value:function(e,t){return this.emitter.off(e,t),this}},{key:"setConfig",value:function(e){var t=this;Object.keys(e).forEach((function(n){e[n],t.config[n]=e[n]})),this.config.skipInactive||this.backToNormal(),"undefined"!==typeof e.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),"undefined"!==typeof e.mouseTail&&(!1===e.mouseTail?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"))}},{key:"getMetaData",value:function(){var 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}}},{key:"getCurrentTime",value:function(){return this.timer.timeOffset+this.getTimeOffset()}},{key:"getTimeOffset",value:function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp}},{key:"getMirror",value:function(){return this.mirror}},{key:"play",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:n}}),null===(t=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.getElementsByTagName("html")[0])||void 0===t||t.classList.remove("rrweb-paused"),this.emitter.emit(Te.SA.Start)}},{key:"pause",value:function(e){var t,n;void 0===e&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"===typeof e&&(this.play(e),this.service.send({type:"PAUSE"})),null===(n=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.getElementsByTagName("html")[0])||void 0===n||n.classList.add("rrweb-paused"),this.emitter.emit(Te.SA.Pause)}},{key:"resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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(Te.SA.Resume)}},{key:"destroy",value:function(){this.pause(),this.config.root.removeChild(this.wrapper),this.emitter.emit(Te.SA.Destroy)}},{key:"startLive",value:function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}},{key:"addEvent",value:function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;on(n)&&this.mouse.classList.add("touch-device"),Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))}},{key:"enableInteract",value:function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}},{key:"disableInteract",value:function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}},{key:"resetCache",value:function(){this.cache=(0,Fe.Df)()}},{key:"setupDom",value:function(){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),!1!==this.config.mouseTail&&(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");var 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&&(xt(this.iframe.contentWindow,this.iframe.contentDocument),(0,Ut.OK)(this.iframe.contentWindow))}},{key:"rebuildFullSnapshot",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[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={};var r=[],i=function(e,n){t.collectIframeAndAttachDocument(r,e);var i,o=(0,p.Z)(t.config.plugins||[]);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.onBuild&&a.onBuild(e,{id:n,replayer:t})}}catch(s){o.e(s)}finally{o.f()}};this.mirror.reset(),(0,Fe.VU)(e.data.node,{doc:this.iframe.contentDocument,afterAppend:i,cache:this.cache,mirror:this.mirror}),i(this.iframe.contentDocument,e.data.node.id);for(var o=function(){var e=s[a],n=e.mutationInQueue,r=e.builtNode;t.attachDocumentToIframe(n,r),t.newDocumentQueue=t.newDocumentQueue.filter((function(e){return e!==n}))},a=0,s=r;a<s.length;a++)o();var u=this.iframe.contentDocument,c=u.documentElement,l=u.head;this.insertStyleRules(c,l),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(Te.SA.FullsnapshotRebuilded,e),n||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}},{key:"insertStyleRules",value:function(e,t){var n,r,i=(r=this.config.blockClass,[".".concat(r," { background: currentColor }"),"noscript { display: none !important; }"]).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){var o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,kt(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:Te.yh.StyleSheetRule,adds:i.map((function(e,t){return{rule:e,index:t}}))})}else{var a=document.createElement("style");e.insertBefore(a,t);for(var s=0;s<i.length;s++)null===(n=a.sheet)||void 0===n||n.insertRule(i[s],s)}}},{key:"attachDocumentToIframe",value:function(e,t){var n=this,r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=function(e,o){n.collectIframeAndAttachDocument(i,e);var a=r.getMeta(e);if((null===a||void 0===a?void 0:a.type)===Fe.Jq.Element&&"HTML"===(null===a||void 0===a?void 0:a.tagName.toUpperCase())){var s=t.contentDocument,u=s.documentElement,c=s.head;n.insertStyleRules(u,c)}if(!n.usingVirtualDom){var l,d=(0,p.Z)(n.config.plugins||[]);try{for(d.s();!(l=d.n()).done;){var f=l.value;f.onBuild&&f.onBuild(e,{id:o,replayer:n})}}catch(h){d.e(h)}finally{d.f()}}};(0,Fe.GQ)(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(t.contentDocument,e.node.id);for(var a=function(){var e=u[s],t=e.mutationInQueue,r=e.builtNode;n.attachDocumentToIframe(t,r),n.newDocumentQueue=n.newDocumentQueue.filter((function(e){return e!==t}))},s=0,u=i;s<u.length;s++)a()}},{key:"collectIframeAndAttachDocument",value:function(e,t){var n=this;if((0,Ut.Cj)(t,this.mirror)){var r=this.newDocumentQueue.find((function(e){return e.parentId===n.mirror.getId(t)}));r&&e.push({mutationInQueue:r,builtNode:t})}}},{key:"waitForStylesheetLoad",value:function(){var e,t=this,n=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(n){var r,i=new Set,o=this.service.state,a=function(){o=t.service.state};this.emitter.on(Te.SA.Start,a),this.emitter.on(Te.SA.Pause,a);var s=function(){t.emitter.off(Te.SA.Start,a),t.emitter.off(Te.SA.Pause,a)};n.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(i.add(e),e.addEventListener("load",(function(){i.delete(e),0===i.size&&-1!==r&&(o.matches("playing")&&t.play(t.getCurrentTime()),t.emitter.emit(Te.SA.LoadStylesheetEnd),r&&clearTimeout(r),s())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(Te.SA.LoadStylesheetStart),r=setTimeout((function(){o.matches("playing")&&t.play(t.getCurrentTime()),r=-1,s()}),this.config.loadTimeout))}}},{key:"preloadAllImages",value:function(){return(0,Le.m)(this,void 0,void 0,(0,t.Z)().mark((function e(){var n,r,i,o,a,s=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.service.state,n=function(){s.service.state},this.emitter.on(Te.SA.Start,n),this.emitter.on(Te.SA.Pause,n),r=[],i=(0,p.Z)(this.service.state.context.events),e.prev=6,a=(0,t.Z)().mark((function e(){var n;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=o.value).type===Te.tw.IncrementalSnapshot&&n.data.source===Te.yh.CanvasMutation&&(r.push(s.deserializeAndPreloadCanvasEvents(n.data,n)),("commands"in n.data?n.data.commands:[n.data]).forEach((function(e){s.preloadImages(e,n)})));case 2:case"end":return e.stop()}}),e)})),i.s();case 9:if((o=i.n()).done){e.next=13;break}return e.delegateYield(a(),"t0",11);case 11:e.next=9;break;case 13:e.next=18;break;case 15:e.prev=15,e.t1=e.catch(6),i.e(e.t1);case 18:return e.prev=18,i.f(),e.finish(18);case 21:return e.abrupt("return",Promise.all(r));case 22:case"end":return e.stop()}}),e,this,[[6,15,18,21]])})))}},{key:"preloadImages",value:function(e,t){if("drawImage"===e.property&&"string"===typeof e.args[0]&&!this.imageMap.has(t)){var n=document.createElement("canvas"),r=n.getContext("2d"),i=null===r||void 0===r?void 0:r.createImageData(n.width,n.height);null===i||void 0===i||i.data,JSON.parse(e.args[0]),null===r||void 0===r||r.putImageData(i,0,0)}}},{key:"deserializeAndPreloadCanvasEvents",value:function(e,n){return(0,Le.m)(this,void 0,void 0,(0,t.Z)().mark((function r(){var i,o,a,s=this;return(0,t.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.canvasEventMap.has(n)){r.next=13;break}if(i={isUnchanged:!0},!("commands"in e)){r.next=9;break}return r.next=5,Promise.all(e.commands.map((function(e){return(0,Le.m)(s,void 0,void 0,(0,t.Z)().mark((function n(){var r;return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all(e.args.map(Yt(this.imageMap,null,i)));case 2:return r=t.sent,t.abrupt("return",Object.assign(Object.assign({},e),{args:r}));case 4:case"end":return t.stop()}}),n,this)})))})));case 5:o=r.sent,!1===i.isUnchanged&&this.canvasEventMap.set(n,Object.assign(Object.assign({},e),{commands:o})),r.next=13;break;case 9:return r.next=11,Promise.all(e.args.map(Yt(this.imageMap,null,i)));case 11:a=r.sent,!1===i.isUnchanged&&this.canvasEventMap.set(n,Object.assign(Object.assign({},e),{args:a}));case 13:case"end":return r.stop()}}),r,this)})))}},{key:"applyIncremental",value:function(e,t){var n,r,i,o=this,a=e.data;switch(a.source){case Te.yh.Mutation:try{this.applyMutation(a,t)}catch(y){this.warn("Exception in mutation ".concat(y.message||y),a)}break;case Te.yh.Drag:case Te.yh.TouchMove:case Te.yh.MouseMove:if(t){var s=a.positions[a.positions.length-1];this.mousePos={x:s.x,y:s.y,id:s.id,debugData:a}}else a.positions.forEach((function(n){var r={doAction:function(){o.moveAndHover(n.x,n.y,n.id,t,a)},delay:n.timeOffset+e.timestamp-o.service.state.context.baselineTime};o.timer.addAction(r)})),this.timer.addAction({doAction:function(){},delay:e.delay-(null===(n=a.positions[0])||void 0===n?void 0:n.timeOffset)});break;case Te.yh.MouseInteraction:if(-1===a.id||t)break;var u=new Event(Te.Y2[a.type].toLowerCase()),c=this.mirror.getNode(a.id);if(!c)return this.debugNodeNotFound(a,a.id);this.emitter.emit(Te.SA.MouseInteraction,{type:a.type,target:c});var l=this.config.triggerFocus;switch(a.type){case Te.Y2.Blur:"blur"in c&&c.blur();break;case Te.Y2.Focus:l&&c.focus&&c.focus({preventScroll:!0});break;case Te.Y2.Click:case Te.Y2.TouchStart:case Te.Y2.TouchEnd:t?(a.type===Te.Y2.TouchStart?this.touchActive=!0:a.type===Te.Y2.TouchEnd&&(this.touchActive=!1),this.mousePos={x:a.x,y:a.y,id:a.id,debugData:a}):(a.type===Te.Y2.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x,a.y,a.id,t,a),a.type===Te.Y2.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===Te.Y2.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===Te.Y2.TouchEnd&&this.mouse.classList.remove("touch-active"));break;case Te.Y2.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:c.dispatchEvent(u)}break;case Te.yh.Scroll:if(-1===a.id)break;if(this.usingVirtualDom){var d=this.virtualDom.mirror.getNode(a.id);if(!d)return this.debugNodeNotFound(a,a.id);d.scrollData=a;break}this.applyScroll(a,t);break;case Te.yh.ViewportResize:this.emitter.emit(Te.SA.Resize,{width:a.width,height:a.height});break;case Te.yh.Input:if(-1===a.id)break;if(this.usingVirtualDom){var f=this.virtualDom.mirror.getNode(a.id);if(!f)return this.debugNodeNotFound(a,a.id);f.inputData=a;break}this.applyInput(a);break;case Te.yh.MediaInteraction:var h=this.usingVirtualDom?this.virtualDom.mirror.getNode(a.id):this.mirror.getNode(a.id);if(!h)return this.debugNodeNotFound(a,a.id);var p=h;try{void 0!==a.currentTime&&(p.currentTime=a.currentTime),void 0!==a.volume&&(p.volume=a.volume),void 0!==a.muted&&(p.muted=a.muted),1===a.type&&p.pause(),0===a.type&&p.play(),4===a.type&&(p.playbackRate=a.playbackRate)}catch(y){this.warn("Failed to replay media interactions: ".concat(y.message||y))}break;case Te.yh.StyleSheetRule:case Te.yh.StyleDeclaration:this.usingVirtualDom?a.styleId?this.constructedStyleMutations.push(a):a.id&&(null===(r=this.virtualDom.mirror.getNode(a.id))||void 0===r||r.rules.push(a)):this.applyStyleSheetMutation(a);break;case Te.yh.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){var v=this.virtualDom.mirror.getNode(a.id);if(!v)return this.debugNodeNotFound(a,a.id);v.canvasMutations.push({event:e,mutation:a})}else{var m=this.mirror.getNode(a.id);if(!m)return this.debugNodeNotFound(a,a.id);en({event:e,mutation:a,target:m,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case Te.yh.Font:try{var g=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);null===(i=this.iframe.contentDocument)||void 0===i||i.fonts.add(g)}catch(y){this.warn(y)}break;case Te.yh.Selection:if(t){this.lastSelectionData=a;break}this.applySelection(a);break;case Te.yh.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(a):this.applyAdoptedStyleSheet(a)}}},{key:"applyMutation",value:function(e,t){var n=this;if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,It(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(var r in this.legacy_missingNodeRetryMap)try{var i=this.legacy_missingNodeRetryMap[r],o=St(i.node,this.virtualDom,this.mirror);o&&(i.node=o)}catch(m){this.warn(m)}var a=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes.forEach((function(t){var r,i=a.getNode(t.id);if(!i){if(e.removes.find((function(e){return e.id===t.parentId})))return;return n.warnNodeNotFound(e,t.id)}var o=a.getNode(t.parentId);if(!o)return n.warnNodeNotFound(e,t.parentId);if(t.isShadow&&(0,Ut.He)(o)&&(o=o.shadowRoot),a.removeNodeFromMap(i),o)try{o.removeChild(i),n.usingVirtualDom&&"#text"===i.nodeName&&"STYLE"===o.nodeName&&(null===(r=o.rules)||void 0===r?void 0:r.length)>0&&(o.rules=[])}catch(m){if(!(m instanceof DOMException))throw m;n.warn("parent could not remove child in mutation",o,i,e)}}));var s=Object.assign({},this.legacy_missingNodeRetryMap),u=[],c=function(e){var t,r;if(!n.iframe.contentDocument)return n.warn("Looks like your replayer has been destroyed.");var i=a.getNode(e.parentId);if(!i)return e.node.type===Fe.Jq.Document?n.newDocumentQueue.push(e):u.push(e);e.node.isShadow&&((0,Ut.He)(i)||i.attachShadow({mode:"open"}),i=i.shadowRoot);var o=null,c=null;if(e.previousId&&(o=a.getNode(e.previousId)),e.nextId&&(c=a.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=a.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return u.push(e);if(!e.node.rootId||a.getNode(e.node.rootId)){var l=e.node.rootId?a.getNode(e.node.rootId):n.usingVirtualDom?n.virtualDom:n.iframe.contentDocument;if((0,Ut.Cj)(i,a))n.attachDocumentToIframe(e,i);else{var d=function(e,t){if(!n.usingVirtualDom){var r,i=(0,p.Z)(n.config.plugins||[]);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.onBuild&&o.onBuild(e,{id:t,replayer:n})}}catch(a){i.e(a)}finally{i.f()}}},f=(0,Fe.GQ)(e.node,{doc:l,mirror:a,skipChild:!0,hackCss:!0,cache:n.cache,afterAppend:d});if(-1!==e.previousId&&-1!==e.nextId){var h=a.getMeta(i);if(h&&h.type===Fe.Jq.Element&&"textarea"===h.tagName&&e.node.type===Fe.Jq.Text){var v,m=Array.isArray(i.childNodes)?i.childNodes:Array.from(i.childNodes),g=(0,p.Z)(m);try{for(g.s();!(v=g.n()).done;){var y=v.value;y.nodeType===i.TEXT_NODE&&i.removeChild(y)}}catch(I){g.e(I)}finally{g.f()}}else if((null===h||void 0===h?void 0:h.type)===Fe.Jq.Document){var b=i;e.node.type===Fe.Jq.DocumentType&&(null===(t=b.childNodes[0])||void 0===t?void 0:t.nodeType)===Node.DOCUMENT_TYPE_NODE&&b.removeChild(b.childNodes[0]),"HTML"===f.nodeName&&b.documentElement&&b.removeChild(b.documentElement)}if(o&&o.nextSibling&&o.nextSibling.parentNode?i.insertBefore(f,o.nextSibling):c&&c.parentNode?i.contains(c)?i.insertBefore(f,c):i.insertBefore(f,null):i.appendChild(f),d(f,e.node.id),n.usingVirtualDom&&"#text"===f.nodeName&&"STYLE"===i.nodeName&&(null===(r=i.rules)||void 0===r?void 0:r.length)>0&&(i.rules=[]),(0,Ut.Cj)(f,n.mirror)){var w=n.mirror.getId(f),S=n.newDocumentQueue.find((function(e){return e.parentId===w}));S&&(n.attachDocumentToIframe(S,f),n.newDocumentQueue=n.newDocumentQueue.filter((function(e){return e!==S})))}(e.previousId||e.nextId)&&n.legacy_resolveMissingNode(s,i,f,e)}else s[e.node.id]={node:f,mutation:e}}}};e.adds.forEach((function(e){c(e)}));for(var l=Date.now();u.length;){var d=(0,Ut.s6)(u);if(u.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",d);break}var f,h=(0,p.Z)(d);try{for(h.s();!(f=h.n()).done;){var v=f.value;a.getNode(v.value.parentId)?(0,Ut.Fn)(v,(function(e){c(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",v)}}catch(g){h.e(g)}finally{h.f()}}Object.keys(s).length&&Object.assign(this.legacy_missingNodeRetryMap,s),(0,Ut.E2)(e.texts).forEach((function(t){var r,i=a.getNode(t.id);if(!i){if(e.removes.find((function(e){return e.id===t.id})))return;return n.warnNodeNotFound(e,t.id)}if(i.textContent=t.value,n.usingVirtualDom){var o=i.parentNode;(null===(r=null===o||void 0===o?void 0:o.rules)||void 0===r?void 0:r.length)>0&&(o.rules=[])}})),e.attributes.forEach((function(t){var r=a.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.id})))return;return n.warnNodeNotFound(e,t.id)}for(var i in t.attributes)if("string"===typeof i){var o=t.attributes[i];if(null===o)r.removeAttribute(i);else if("string"===typeof o)try{if("_cssText"===i&&("LINK"===r.nodeName||"STYLE"===r.nodeName))try{var s=a.getMeta(r);Object.assign(s.attributes,t.attributes);var u=(0,Fe.GQ)(s,{doc:r.ownerDocument,mirror:a,skipChild:!0,hackCss:!0,cache:n.cache}),c=r.nextSibling,l=r.parentNode;if(u&&l){l.removeChild(r),l.insertBefore(u,c),a.replace(t.id,u);break}}catch(Rt){}r.setAttribute(i,o)}catch(m){n.warn("An error occurred may due to the checkout feature.",m)}else if("style"===i){var d=o,f=r;for(var h in d)if(!1===d[h])f.style.removeProperty(h);else if(d[h]instanceof Array){var p=d[h];f.style.setProperty(h,p[0],p[1])}else{var v=d[h];f.style.setProperty(h,v)}}}}))}},{key:"applyScroll",value:function(e,t){var n,r,i=this.mirror.getNode(e.id);if(!i)return this.debugNodeNotFound(e,e.id);var o=this.mirror.getMeta(i);if(i===this.iframe.contentDocument)null===(n=this.iframe.contentWindow)||void 0===n||n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((null===o||void 0===o?void 0:o.type)===Fe.Jq.Document)null===(r=i.defaultView)||void 0===r||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(a){}}},{key:"applyInput",value:function(e){var t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(n){}}},{key:"applySelection",value:function(e){var t=this;try{var n=new Set,r=e.ranges.map((function(e){var r=e.start,i=e.startOffset,o=e.end,a=e.endOffset,s=t.mirror.getNode(r),u=t.mirror.getNode(o);if(s&&u){var c=new Range;c.setStart(s,i),c.setEnd(u,a);var l=s.ownerDocument,d=null===l||void 0===l?void 0:l.getSelection();return d&&n.add(d),{range:c,selection:d}}}));n.forEach((function(e){return e.removeAllRanges()})),r.forEach((function(e){var t;return e&&(null===(t=e.selection)||void 0===t?void 0:t.addRange(e.range))}))}catch(i){}}},{key:"applyStyleSheetMutation",value:function(e){var t,n=null;e.styleId?n=this.styleMirror.getStyle(e.styleId):e.id&&(n=(null===(t=this.mirror.getNode(e.id))||void 0===t?void 0:t.sheet)||null),n&&(e.source===Te.yh.StyleSheetRule?this.applyStyleSheetRule(e,n):e.source===Te.yh.StyleDeclaration&&this.applyStyleDeclaration(e,n))}},{key:"applyStyleSheetRule",value:function(e,t){var n,r,i,o;if(null===(n=e.adds)||void 0===n||n.forEach((function(e){var n=e.rule,r=e.index;try{if(Array.isArray(r)){var i=(0,Ut._X)(r),o=i.positions,a=i.index;(0,Ut.md)(t.cssRules,o).insertRule(n,a)}else{var s=void 0===r?void 0:Math.min(r,t.cssRules.length);null===t||void 0===t||t.insertRule(n,s)}}catch(Rt){}})),null===(r=e.removes)||void 0===r||r.forEach((function(e){var n=e.index;try{if(Array.isArray(n)){var r=(0,Ut._X)(n),i=r.positions,o=r.index;(0,Ut.md)(t.cssRules,i).deleteRule(o||0)}else null===t||void 0===t||t.deleteRule(n)}catch(Rt){}})),e.replace)try{null===(i=t.replace)||void 0===i||i.call(t,e.replace)}catch(Rt){}if(e.replaceSync)try{null===(o=t.replaceSync)||void 0===o||o.call(t,e.replaceSync)}catch(Rt){}}},{key:"applyStyleDeclaration",value:function(e,t){e.set&&(0,Ut.md)(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority);e.remove&&(0,Ut.md)(t.rules,e.index).style.removeProperty(e.remove.property)}},{key:"applyAdoptedStyleSheet",value:function(e){var t,n=this,r=this.mirror.getNode(e.id);if(r){null===(t=e.styles)||void 0===t||t.forEach((function(e){var t,i=null,o=null;if((0,Ut.He)(r)?o=(null===(t=r.ownerDocument)||void 0===t?void 0:t.defaultView)||null:"#document"===r.nodeName&&(o=r.defaultView),o)try{i=new o.CSSStyleSheet,n.styleMirror.add(i,e.styleId),n.applyStyleSheetRule({source:Te.yh.StyleSheetRule,adds:e.rules},i)}catch(Rt){}}));var i=0;!function e(t,r){var o=r.map((function(e){return n.styleMirror.getStyle(e)})).filter((function(e){return null!==e}));(0,Ut.He)(t)?t.shadowRoot.adoptedStyleSheets=o:"#document"===t.nodeName&&(t.adoptedStyleSheets=o),o.length!==r.length&&i<10&&(setTimeout((function(){return e(t,r)}),0+100*i),i++)}(r,e.styleIds)}}},{key:"legacy_resolveMissingNode",value:function(e,t,n,r){var i=r.previousId,o=r.nextId,a=i&&e[i],s=o&&e[o];if(a){var u=a.node,c=a.mutation;t.insertBefore(u,n),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(s){var l=s.node,d=s.mutation;t.insertBefore(l,n.nextSibling),delete e[d.node.id],delete this.legacy_missingNodeRetryMap[d.node.id],(d.previousId||d.nextId)&&this.legacy_resolveMissingNode(e,t,l,d)}}},{key:"moveAndHover",value:function(e,t,n,r,i){var o=this.mirror.getNode(n);if(!o)return this.debugNodeNotFound(i,n);var a=(0,Ut.vD)(o,this.iframe),s=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left="".concat(s,"px"),this.mouse.style.top="".concat(u,"px"),r||this.drawMouseTail({x:s,y:u}),this.hoverElements(o)}},{key:"drawMouseTail",value:function(e){var t=this;if(this.mouseTail){var n=!0===this.config.mouseTail?rn:Object.assign({},rn,this.config.mouseTail),r=n.lineCap,i=n.lineWidth,o=n.strokeStyle,a=n.duration,s=function(){if(t.mouseTail){var e=t.mouseTail.getContext("2d");e&&t.tailPositions.length&&(e.clearRect(0,0,t.mouseTail.width,t.mouseTail.height),e.beginPath(),e.lineWidth=i,e.lineCap=r,e.strokeStyle=o,e.moveTo(t.tailPositions[0].x,t.tailPositions[0].y),t.tailPositions.forEach((function(t){return e.lineTo(t.x,t.y)})),e.stroke())}};this.tailPositions.push(e),s(),setTimeout((function(){t.tailPositions=t.tailPositions.filter((function(t){return t!==e})),s()}),a/this.speedService.state.context.timer.speed)}}},{key:"hoverElements",value:function(e){var t;null===(t=this.lastHoveredRootNode||this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")})),this.lastHoveredRootNode=e.getRootNode();for(var n=e;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement}},{key:"isUserInteraction",value:function(e){return e.type===Te.tw.IncrementalSnapshot&&(e.data.source>Te.yh.Mutation&&e.data.source<=Te.yh.Input)}},{key:"backToNormal",value:function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(Te.SA.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}},{key:"warnNodeNotFound",value:function(e,t){this.warn("Node with id '".concat(t,"' not found. "),e)}},{key:"warnCanvasMutationFailed",value:function(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}},{key:"debugNodeNotFound",value:function(e,t){this.debug("Node with id '".concat(t,"' not found. "),e)}},{key:"warn",value:function(){var e;if(this.config.showWarning){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=this.config.logger).warn.apply(e,[nn].concat(n))}}},{key:"debug",value:function(){var e;if(this.config.showDebug){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=this.config.logger).log.apply(e,[nn].concat(n))}}}]),e}(),un=function(){function e(){var n=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.Z)(this,e),this.events=[],this.castedEvents=[],this.replayer=void 0,this.onEventCast=void 0,this.config={enableInteract:!1},this.useTimestampCompression=!0,this.addEvents=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){var i,o,a,s,u,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=r.sort((function(e,t){return e.timestamp-t.timestamp})),n.useTimestampCompression&&(o=Date.now(),i=i.map((function(e,t){return(0,l.Z)((0,l.Z)({},e),{},{timestamp:o+t})}))),n.events=[].concat((0,m.Z)(n.events),(0,m.Z)(i)),a=new Promise((function(e){n.onEventCast=function(t){n.castedEvents.push(t),n.castedEvents.length===n.events.length&&(n.onEventCast=void 0,e(t))}})),s=(0,p.Z)(i);try{for(s.s();!(u=s.n()).done;)c=u.value,n.replayer.addEvent(c)}catch(t){s.e(t)}finally{s.f()}return e.abrupt("return",a);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.stop=function(){n.replayer.destroy()},this.getNodeById=function(e){return n.replayer.getMirror().getNode(e)},this.getMeta=function(e){return n.replayer.getMirror().getMeta(e)},this.config=(0,l.Z)((0,l.Z)({},this.config),i)}return(0,s.Z)(e,[{key:"start",value:function(e){var t=this,n=e.firstEventTimestamp,r=e.speed,i=void 0===r?8:r,o=e.useTimestampCompression,a=void 0===o||o;this.replayer=new sn([],{mouseTail:!1,pauseAnimation:!1,speed:i,triggerFocus:!0,UNSAFE_replayCanvas:!0,liveMode:!0,showDebug:!1,skipInactive:!0}),this.config.enableInteract?this.replayer.enableInteract():this.replayer.disableInteract(),this.useTimestampCompression=a,this.replayer.startLive(this.useTimestampCompression?Date.now():n),this.replayer.on("event-cast",(function(e){t.onEventCast&&t.onEventCast(e)}))}}]),e}(),cn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.Z)(this,e),this.eventProcessor=void 0,this.sessionReplayer=void 0,this.eventHandlers=void 0,this.sessionReplayer=new un(t),this.eventProcessor=new Ze.u({eventHandlers:new Ne.E})}return(0,s.Z)(e,[{key:"setEventHandlers",value:function(e){this.eventHandlers=e,this.eventProcessor.setHandlers(this.eventHandlers)}},{key:"start",value:function(e){this.sessionReplayer.start(e)}},{key:"handleEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.eventProcessor.preCastEvent(n);case 2:return e.next=4,this.sessionReplayer.addEvents([n]);case 4:return e.next=6,this.eventProcessor.processEvent(n);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"skipEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.eventProcessor.skipEvents(n);case 2:return e.next=4,this.sessionReplayer.addEvents(n);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"stop",value:function(){this.sessionReplayer.stop()}}]),e}(),ln=function(e){(0,de.Z)(i,e);var n=(0,fe.Z)(i);function i(){var e;return(0,a.Z)(this,i),(e=n.call(this,{enableInteract:!0})).pageIdentifiers=void 0,e.elementSelector=new Me,e.appSpecificRules=void 0,e.setEventHandlers(new Oe({sessionMirror:e.sessionReplayer,elementSelector:e.elementSelector})),e}return(0,s.Z)(i,[{key:"setConfiguration",value:function(e){var t=e.enableRecordingAvailableInteractableElements,n=e.useTextInputFastForward;this.eventHandlers.setConfiguration({enableRecordingAvailableInteractableElements:t,useTextInputFastForward:n})}},{key:"setEvents",value:function(e){this.eventHandlers.setEvents(e)}},{key:"setOptions",value:function(e){this.elementSelector.setOptions({defaultExtractReducedHtmlAndSelector:e.extractReducedHTML,defaultInspectInteractableElements:e.inspectInteractables})}},{key:"setAppRules",value:function(e){this.appSpecificRules=e,this.elementSelector.setAppRules(e),this.eventHandlers.setAppRules(e)}},{key:"handleEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,ce.Z)((0,le.Z)(i.prototype),"handleEvent",this).call(this,n);case 2:if(!(r=e.sent)){e.next=7;break}return e.next=6,this.resolvePageId();case 6:r.pageIdFromCustomIdentifiers=e.sent;case 7:return e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"resolvePageId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(n=this.appSpecificRules)&&void 0!==n&&n.customPageIdentifiers){e.next=2;break}return e.abrupt("return",void 0);case 2:e.t0=(0,t.Z)().keys(null===(i=this.appSpecificRules)||void 0===i?void 0:i.customPageIdentifiers);case 3:if((e.t1=e.t0()).done){e.next=30;break}r=e.t1.value,a=null===(o=this.appSpecificRules)||void 0===o?void 0:o.customPageIdentifiers[r],s=(0,p.Z)(a),e.prev=7,s.s();case 9:if((u=s.n()).done){e.next=20;break}if(c=u.value){e.next=13;break}return e.abrupt("continue",18);case 13:return e.next=15,this.elementSelector.selector(c);case 15:if(!e.sent){e.next=18;break}return e.abrupt("return",r);case 18:e.next=9;break;case 20:e.next=25;break;case 22:e.prev=22,e.t2=e.catch(7),s.e(e.t2);case 25:return e.prev=25,s.f(),e.finish(25);case 28:e.next=3;break;case 30:return e.abrupt("return",void 0);case 31:case"end":return e.stop()}}),e,this,[[7,22,25,28]])})));return function(){return e.apply(this,arguments)}}()}]),i}(cn),dn=function(e){return e.TextElementAppear="text_element_appear",e.TextElementDisappear="text_element_disappear",e.PageUrlChange="page_url_change",e}({});!function(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"}(an||(an={}));!function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}e.prototype.getId=function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}();var fn=/([^\\]):hover/;new RegExp(fn.source,"g");var hn=function(){function e(t){(0,a.Z)(this,e),this.urlChangeEventCallback=void 0,this.currentURL=void 0,this.originalPushState=void 0,this.originalReplaceState=void 0,this.urlChangeEventCallback=t,this.currentURL=window.location.href}return(0,s.Z)(e,[{key:"onURLChange",value:function(){var e=this;try{var t=Date.now();setTimeout((function(){var n=window.location.href;if(n!==e.currentURL){e.currentURL=n;var r={url:n,timestamp:t};e.urlChangeEventCallback(r)}}))}catch(Rt){}}},{key:"startMonitoring",value:function(){this.toggleWindowEventListeners(!0),this.overrideHistoryStateChanges()}},{key:"stopMonitoring",value:function(){this.toggleWindowEventListeners(!1),this.restoreHistoryStateChanges()}},{key:"toggleWindowEventListeners",value:function(t){var n=this,r=t?"addEventListener":"removeEventListener";e.WINDOW_EVENTS.forEach((function(e){window[r](e,n.onURLChange.bind(n))}))}},{key:"overrideHistoryStateChanges",value:function(){this.originalPushState=window.history.pushState,this.originalReplaceState=window.history.replaceState,this.originalPushState&&(window.history.pushState=function(){return this.onURLChange(),this.originalPushState.apply(window.history,arguments)}.bind(this)),this.originalReplaceState&&(window.history.replaceState=function(){return this.onURLChange(),this.originalReplaceState.apply(window.history,arguments)}.bind(this))}},{key:"restoreHistoryStateChanges",value:function(){this.originalPushState&&(window.history.pushState=this.originalPushState),this.originalReplaceState&&(window.history.replaceState=this.originalReplaceState)}}]),e}();hn.WINDOW_EVENTS=["popstate","locationchange","hashchange"];var pn=function(e){(0,de.Z)(i,e);var n=(0,fe.Z)(i);function i(e){var t,r=e.sessionMirror,o=e.elementSelectorGenerator,s=e.assertionGeneratorOptions;return(0,a.Z)(this,i),(t=n.call(this)).sessionMirror=void 0,t.elementSelectorGenerator=void 0,t.urlObserver=void 0,t.assertionGeneratorOptions=void 0,t.isMonitoring=void 0,t.assertions=[],t.nodeByRRWebId=new Map,t.nodeIdsByParentId=new Map,t.parentIdByNodeId=new Map,t.pageUrlAtMonitoringStart=null,t.urlChangeCount=0,t.visibilityByNodeId=null,t.elementSelectorGenerator=o,t.sessionMirror=r,t.isMonitoring=!1,t.assertionGeneratorOptions=s,t.urlObserver=new hn(t.handleUrlChange.bind((0,Ve.Z)(t))),t}return(0,s.Z)(i,[{key:"startMonitoring",value:function(){this.isMonitoring=!0,this.pageUrlAtMonitoringStart=window.location.href,this.urlChangeCount=0,this.recordElementVisibilityForAllElements(),this.monitorElements(document,!0),this.urlObserver.startMonitoring()}},{key:"monitorElements",value:function(e){var t,n,r=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if([Node.ELEMENT_NODE,Node.DOCUMENT_NODE].includes(e.nodeType)&&!i.IGNORED_TAGS.includes(null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase())){var s=null===(n=this.sessionMirror.getMeta(e))||void 0===n?void 0:n.id;s?(this.nodeByRRWebId[s]=e,this.nodeIdsByParentId[a]=this.nodeIdsByParentId[a]||[],this.nodeIdsByParentId[a].includes(s)||this.nodeIdsByParentId[a].push(s),this.parentIdByNodeId[s]=a,o&&Array.from(e.childNodes).forEach((function(e){r.monitorElements(e,!0,s)}))):console.log("no meta for node",e)}}},{key:"generateAssertions",value:function(){var e=this;return this.log("possible assertions count before filtering",this.countPossibleAssertions()),this.filterAssertionsWithSameText(),this.filterUrlChangeAssertionsBeforeLast(),this.log("possible assertions count after filtering",this.countPossibleAssertions()),this.getAssertionsDomSlicing().map((function(t,n){return e.assertions[n].slice(0,t)})).flat()}},{key:"getAssertionsDomSlicing",value:function(){var e=this,t=function(e){return e.reduce((function(e,t){return e+t}),0)},n=this.assertions.map((function(t){return Math.min(t.length,e.assertionGeneratorOptions.maxAssertionsPerDomTree)}));if(t(n)<=this.assertionGeneratorOptions.maxAssertions)return n;for(var r=this.assertions.map((function(){return 1})),i=0;i<this.assertions.length&&t(r)<this.assertionGeneratorOptions.maxAssertions;i++)r[i]<n[i]&&r[i]++,i===this.assertions.length-1&&(i=0);return r}},{key:"filterAssertionsWithSameText",value:function(){for(var e=new Set,t=this.assertions.length-1;t>=0;t--)for(var n=this.assertions[t],r=n.length-1;r>=0;r--){var i=n[r];if(i.type!==dn.PageUrlChange){var o=i.text;e.has(o)?this.assertions[t].splice(r,1):e.add(o)}}this.assertions=this.assertions.filter((function(e){return 0!==e.length}))}},{key:"filterUrlChangeAssertionsBeforeLast",value:function(){var e=this.assertions.map((function(e,t){return{assertionTree:e,index:t}})).filter((function(e){var t;return(null===(t=e.assertionTree[0])||void 0===t?void 0:t.type)===dn.PageUrlChange})).map((function(e){return e.index}));e.length<=1||(e.pop(),this.assertions=this.assertions.filter((function(t,n){return!e.includes(n)})))}},{key:"countPossibleAssertions",value:function(){return this.assertions.reduce((function(e,t){return e+t.length}),0)}},{key:"stopMonitoringAndGenerateAssertions",value:function(){var e=this.generateAssertions();return this.stopMonitoring(),e}},{key:"stopMonitoring",value:function(){this.isMonitoring=!1,this.urlObserver.stopMonitoring(),this.assertions=[],this.pageUrlAtMonitoringStart=null,this.urlChangeCount=0}},{key:"handleMutation",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isMonitoring){e.next=2;break}return e.abrupt("return");case 2:if(!(n.adds.length>0)){e.next=5;break}return e.next=5,this.handleAdditionMutation(n.adds,r.timestamp);case 5:if(!(n.removes.length>0)){e.next=8;break}return e.next=8,this.handleRemovalMutation(n.removes,r.timestamp);case 8:if(!(n.attributes.length>0)){e.next=11;break}return e.next=11,this.handleAttributeMutation(n.attributes,r.timestamp);case 11:if(!(n.texts.length>0)){e.next=14;break}return e.next=14,this.handleTextMutation(n.texts,r.timestamp);case 14:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleUrlChange",value:function(e){if(this.isMonitoring){this.urlChangeCount++;var t={type:dn.PageUrlChange,url:e.url,urlChangeCount:this.urlChangeCount};this.log("new url change assertion",t),this.assertions.push([t])}}},{key:"handleAdditionMutation",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,o){var a,s,u,c,l,d=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.log("handleAdditionMutation",n),a=n.filter((function(e){return e.node.type===an.Element})),s=a.map((function(e){return e.node.id})),u=a.filter((function(e){var t=e.parentId;return!t||!s.includes(t)})),this.log("handleAdditionMutation roots",u),u.forEach(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=d.sessionMirror.getNodeById(n.node.id),d.monitorElements(r,!0,n.parentId);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),c=a.map((function(e){return e.node.id})),l=c.filter((function(e){return i.isElementVisible(d.nodeByRRWebId[e])})),this.filterChildIds(l).forEach(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",d.updateElementAndDescendantsVisibility(n,o));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleRemovalMutation",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i){var o,a,s=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.log("handleRemovalMutation",n),o=n.map((function(e){return e.id})),a=o.filter((function(e){return s.nodeChangedVisibility(e)})),this.filterChildIds(a).forEach(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",s.updateElementAndDescendantsVisibility(n,i));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),o.forEach((function(e){return s.unmonitorElements(e,!0)}));case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleAttributeMutation",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i){var o,a=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.log("handleAttributeMutation",n),o=n.filter((function(e){var t=e.attributes,n=e.id;return t.style&&a.nodeByRRWebId[n]instanceof Element&&a.nodeChangedVisibility(n)})).map((function(e){return e.id})),this.filterChildIds(o).forEach(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a.updateElementAndDescendantsVisibility(n,i);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"nodeChangedVisibility",value:function(e){var t=this.visibilityByNodeId.get(e)||!1,n=this.nodeByRRWebId[e];return t!==(!!n&&i.isElementVisible(n))}},{key:"handleTextMutation",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var o,a,s,u=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.log("handleTextMutation",n),o=function(e){var t=u.parentIdByNodeId[e.id];return 1===u.getLeavesWithSameText(t).length},a=function(e){var t=u.parentIdByNodeId[e.id];return i.isElementVisible(u.nodeByRRWebId[t])},0!==(s=n.filter(a).filter(o).map((function(e){var t=e.id,n=u.parentIdByNodeId[t],i=u.parentIdByNodeId[n],o=n,a=u.nodeByRRWebId[o],s=u.getDOMNodeText(u.nodeByRRWebId[n]);return{type:dn.TextElementAppear,parentId:i,nodeId:n,childNodeId:o,childTag:a.tagName.toLowerCase(),childDomNode:a,text:s,timestamp:r}}))).length){e.next=6;break}return e.abrupt("return");case 6:this.log("new assertions",s),this.assertions.push(s);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getNodeAncestorIds",value:function(e){for(var t=[],n=this.parentIdByNodeId[e];-1!==n;){if(void 0===n){var r=t.length?t[t.length-1]:e;this.log("parent id is undefined for node id ".concat(e," - possible bug in dom tracking. check tracking of node ").concat(r),this.nodeByRRWebId[r]);break}t.push(n),n=this.parentIdByNodeId[n]}return t}},{key:"filterChildIds",value:function(e){var t=this;return e.filter((function(n){return t.getNodeAncestorIds(n).every((function(t){return!e.includes(t)}))}))}},{key:"getDescendantsIds",value:function(e){var t=this,n=this.nodeIdsByParentId[e]||[];return[].concat((0,m.Z)(n),(0,m.Z)(n.flatMap((function(e){return t.getDescendantsIds(e)}))))}},{key:"unmonitorElements",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.parentIdByNodeId[e];(delete this.nodeByRRWebId[e],this.nodeIdsByParentId[r]=(this.nodeIdsByParentId[r]||[]).filter((function(t){return t!==e})),0===this.nodeIdsByParentId[r].length&&delete this.nodeIdsByParentId[r],delete this.parentIdByNodeId[e],n)&&(this.nodeIdsByParentId[e]||[]).forEach((function(e){t.unmonitorElements(e,!0)}))}},{key:"updateElementAndDescendantsVisibility",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i){var o=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.updateElementVisibility(n,!0,i);case 2:this.getDescendantsIds(n).forEach(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.updateElementVisibility(n,!1,i);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"updateElementVisibility",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r,o){var a,s,u;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((a=this.nodeByRRWebId[n])instanceof Element){e.next=3;break}return e.abrupt("return");case 3:if(s=i.isElementVisible(a),!r||!this.nodeChangedVisibility(n)){e.next=9;break}return e.next=7,this.createTextElementAssertions(n,s,o);case 7:0!==(u=e.sent).length&&(this.log("new assertions",u),this.assertions.push(u));case 9:this.visibilityByNodeId.set(n,s);case 10:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"createTextElementAssertions",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r,i){var o,a=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.parentIdByNodeId[n],e.abrupt("return",this.getDescendantsNodeIdsForAssertions(n).map((function(e){return a.createTextElementAssertion(n,o,e,r,i)})));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"createTextElementAssertion",value:function(e,t,n,r,i){var o=this.nodeByRRWebId[n];return{type:r?dn.TextElementAppear:dn.TextElementDisappear,text:this.getDOMNodeText(o),parentId:t,nodeId:e,childNodeId:n,childTag:o.tagName.toLowerCase(),childDomNode:o,timestamp:i}}},{key:"recordElementVisibilityForAllElements",value:function(){this.visibilityByNodeId=new Map;for(var e=document.getElementsByTagName("*"),t=0;t<e.length;t++)try{var n=e[t];this.visibilityByNodeId.set(this.sessionMirror.getMeta(n).id,i.isElementVisible(n))}catch(Rt){}}},{key:"getDescendantsNodeIdsForAssertions",value:function(e){var t=this,n=this.nodeByRRWebId[e];if(n.nodeType===Node.TEXT_NODE)return n;var r=i.isElementVisible(n),o=this.getAvailableTagsInTree(e).filter((function(e){return i.TAG_PRECEDENCE_ORDERING.includes(e)})).sort(i.sortTags),a=this.getDescendantsLeavesIds(e);return o.flatMap((function(e){var n=a.filter((function(n){var r,i;return(null===(r=t.nodeByRRWebId[n])||void 0===r||null===(i=r.tagName)||void 0===i?void 0:i.toLowerCase())===e}));return n=(n=n.filter((function(e){return t.nodeChangedVisibility(e)}))).filter((function(e){return 1===t.getLeavesWithSameText(e).length})),r?n.sort((function(e,n){return t.nodeByRRWebId[e].getBoundingClientRect().top-t.nodeByRRWebId[n].getBoundingClientRect().top})):n}))}},{key:"getLeavesWithSameText",value:function(e){var t=this,n=this.getDOMNodeText(this.nodeByRRWebId[e]),r=this.nodeIdsByParentId[-1];return r?this.getDescendantsLeavesIds(r).map((function(e){return t.nodeByRRWebId[e]})).filter((function(e){return t.getDOMNodeText(e)===n})):[]}},{key:"getDOMNodeText",value:function(e){return e.nodeType!==Node.ELEMENT_NODE||function(e){var t;return i.IGNORED_TAGS.includes(null===e||void 0===e||null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase())}(e)?"":Array.from(e.childNodes).filter((function(e){return e.nodeType===Node.TEXT_NODE})).map((function(e){return e.textContent})).join("").trim()}},{key:"getDescendantsLeavesIds",value:function(e){var t=this.nodeByRRWebId[e];return t&&(t.tagName||t instanceof Document)?[e].concat((0,m.Z)(this.getDescendantsIds(e))).filter(this.isElementTextLeaf.bind(this)):[]}},{key:"isElementTextLeaf",value:function(e){var t=this,n=this.nodeIdsByParentId[e]||[],r=this.nodeByRRWebId[e];return!!Array.from(r.childNodes).some((function(e){return e.nodeType===Node.TEXT_NODE&&""!==e.textContent.trim()}))||r&&""!==this.getDOMNodeText(r)&&n.every((function(e){var n=t.nodeByRRWebId[e];return n&&""===t.getDOMNodeText(n)}))}},{key:"getAvailableTagsInTree",value:function(e){var t=this,n=this.nodeByRRWebId[e];if(!n||!n.tagName)return[];var r=this.nodeIdsByParentId[e];return r&&0!==r.size?(0,m.Z)(new Set([n.tagName.toLowerCase()].concat((0,m.Z)((0,m.Z)(r).flatMap((function(e){return t.getAvailableTagsInTree(e)})))))):[n.tagName.toLowerCase()]}},{key:"log",value:function(){var e;i.LOG_TO_CONSOLE&&(e=console).log.apply(e,arguments)}}],[{key:"isAssertionsEqual",value:function(e,t){return e.type===t.type&&(e.type===dn.PageUrlChange?e.url===t.url:e.text===t.text)}},{key:"isElementVisible",value:function(e){return!!e&&(!!e.tagName&&("body"===e.tagName.toLowerCase()||!!e.parentElement&&!D(e).isHidden))}},{key:"sortTags",value:function(e,t){return i.TAG_PRECEDENCE_ORDERING.indexOf(e)-i.TAG_PRECEDENCE_ORDERING.indexOf(t)}}]),i}(Ne.E);pn.LOG_TO_CONSOLE=!1,pn.TAG_PRECEDENCE_ORDERING=["h1","h2","h3","h4","h5","h6","a","span","div"],pn.IGNORED_TAGS=["script","style","head","meta","svg"];var vn=n(5473);function mn(e){var t,n;return null!==(t=e._debugSource)&&void 0!==t&&t.fileName?null===(n=e._debugSource)||void 0===n?void 0:n.fileName:""}function gn(e,t){if("Unknown"===e)return!1;if("string"!==typeof e)return!1;if(e[0]!==e[0].toUpperCase())return!1;if(t.type.$$typeof===Symbol.for("react.context")||t.type.$$typeof===Symbol.for("react.forward_ref")||t.type.$$typeof===Symbol.for("react.memo")||t.type.$$typeof===Symbol.for("react.profiler")||t.type.$$typeof===Symbol.for("react.suspense"))return!1;var n=mn(t);return!/.*\/node_modules\//.test(n)&&e!==n&&!/^(?!.*src).*$/.test(n)}function yn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return["",{}];var n=e.type,r=n?n.name||n:"Unknown",i="";if(gn(r,e)){i+="<".concat(r,">");var o=mn(e);t[r]=o}if(e.child){var a=yn(e.child,t),s=(0,v.Z)(a,2),u=s[0],c=s[1];i+=u,t=(0,l.Z)((0,l.Z)({},t),c)}if(gn(r,e)&&(i+="</".concat(r,">")),e.sibling){var d=yn(e.sibling,t),f=(0,v.Z)(d,2),h=f[0],p=f[1];i+=h,t=(0,l.Z)((0,l.Z)({},t),p)}return[i,t]}function bn(e){var t,n=null===(t=e._reactRootContainer)||void 0===t?void 0:t._internalRoot.current;return n||console.log("No react tree in element",e),yn(n)}var wn=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,null,[{key:"setPrefix",value:function(t){["log","warn","error"].forEach((function(n){e.original[n]||(e.original[n]=console[n]),console[n]=function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];i.unshift(t),e.original[n].apply(console,i)}}))}}]),e}();wn.original={};var Sn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e.map((function(e){return e.target}))},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0};(0,a.Z)(this,e),this.filterElements=t,this.observeOptions=n,this.elements=void 0,this.observer=void 0}return(0,s.Z)(e,[{key:"startListening",value:function(){var e=this;this.elements=[],this.observer=new MutationObserver((function(t){e.elements=[].concat((0,m.Z)(e.elements),(0,m.Z)(e.filterElements(t)))})),this.observer.observe(document.body,this.observeOptions)}},{key:"stopListening",value:function(){return this.observer.disconnect(),this.elements}}]),e}();function In(e){var t=e.filter((function(e){return e.addedNodes.length>0})).reduce((function(e,t){return[].concat((0,m.Z)(e),(0,m.Z)(t.addedNodes))}),[]),n=e.filter((function(e){return"attributes"===e.type&&"style"===e.attributeName&&e.target instanceof HTMLElement&&/display\s*:\s*none/.test(e.oldValue)&&R(e.target).visible})).map((function(e){return e.target}));return[].concat((0,m.Z)(t),(0,m.Z)(n))}var Cn=function(e){(0,de.Z)(i,e);var n=(0,fe.Z)(i);function i(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)(this,i),wn.setPrefix("$checksum"),(e=n.call(this)).options={highlightElement:!0},e.elementSelector=void 0,e.testIdCounter=0,e.currentESRASelector=void 0,e.lastHighlights=[],e.assertionGenerator=void 0,e.initialized=!1,e.htmlReducer=void 0,e.appSpecificRules=void 0,e.rrwebEvents=[],e.mutationDetector=void 0,e.elementSelector=new he,e.options=(0,l.Z)((0,l.Z)({},e.options),t),e.htmlReducer=new Ae,e}return(0,s.Z)(i,[{key:"init",value:function(e){var t,n,r,i=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{assertionGenerator:!0},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{maxAssertionsPerDomTree:2,maxAssertions:10};if(this.appSpecificRules=e,!this.initialized){this.initialized=!0;var s=new vn.L((function(e){return i.rrwebEvents.push(e),i.eventProcessor.processEvent(e)}));o.assertionGenerator&&(this.assertionGenerator=new pn({sessionMirror:s,elementSelectorGenerator:this.elementSelector,assertionGeneratorOptions:a})),s.start(),o.assertionGenerator&&this.setEventHandlers(this.assertionGenerator),ue.limitChildren=null!==(t=null===(n=this.appSpecificRules)||void 0===n||null===(r=n.esraSelectionRules)||void 0===r?void 0:r.limitChildren)&&void 0!==t?t:[]}}},{key:"getElementSelector",value:function(){return this.elementSelector}},{key:"setLogPrefix",value:function(e){wn.setPrefix(e)}},{key:"getLastSelectionLogs",value:function(){return this.currentESRASelector?this.currentESRASelector.getLastSelectionLogs():{}}},{key:"getBestMatchingElementSimilarityScore",value:function(e){return this.currentESRASelector=new ue(e),this.currentESRASelector.selectOne().score}},{key:"extractESRAMetadata",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new ae(document).extract(n).toMetadata());case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"select",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.elementSelector.selector(n,r);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getSelectionDataForSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.elementSelector.selector(n,r);case 3:if(a=e.sent){e.next=7;break}return console.warn("could not find element for selector: "+n),e.abrupt("return",null);case 7:return e.next=9,this.elementSelector.getSelectorAndLocator(a,{testIdSelector:null===(i=this.appSpecificRules)||void 0===i||null===(o=i.esraSelectionRules)||void 0===o?void 0:o.testIdSelector});case 9:return s=e.sent,u=s.locator,e.next=13,this.extractESRAMetadata(a);case 13:return c=e.sent,e.abrupt("return",{generatedLocator:u,esraMetadata:c,selector:n,parentFramesSelectors:r});case 17:return e.prev=17,e.t0=e.catch(0),console.log("getMetadataForSelector exception",e.t0),e.abrupt("return");case 21:case"end":return e.stop()}}),e,this,[[0,17]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getMatchingElementSelectionData",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=h.length>1&&void 0!==h[1]?h[1]:{minSelectionScore:.3}).minSelectionScore,o=r.cachedSelector,a=r.staticMetadata,s=h.length>2&&void 0!==h[2]&&h[2],e.prev=2,!o){e.next=8;break}return console.log("Trying to locate using cached selector",o),e.next=7,this.elementSelector.selector(o);case 7:u=e.sent;case 8:if(u||(console.log("Trying to locate using ESRA",n),W(a)&&console.log("and static data",a),this.currentESRASelector=new ue(n,a),(d=this.currentESRASelector.selectOne()).score>=i?(u=d.candidate,c=d.score,l=d.clickOffset):console.log("Best matching element was below threshold",d)),console.log(u?["Located with score ".concat(c),u]:"Element not located"),u){e.next=12;break}return e.abrupt("return");case 12:return s&&new g(u).scrollIntoView(),this.highlightElement(u),e.next=16,this.makeMatchingElementSelectionData(u,c);case 16:return f=e.sent,l&&(f.clickOffset=l),e.abrupt("return",f);case 21:return e.prev=21,e.t0=e.catch(2),console.log("getMatchingElementSelectionData exception",e.t0),e.abrupt("return");case 26:case"end":return e.stop()}}),e,this,[[2,21]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getAllInteractableElementsForLastSelectQuery",value:function(){var e=this,n=this.currentESRASelector.getFinalCandidates();return Promise.all(n.map(function(){var n=(0,r.Z)((0,t.Z)().mark((function n(r){return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=r.esraMetadata,t.next=3,e.makeMatchingElementSelectionData(r.candidate,r.score);case 3:return t.t1=t.sent,t.abrupt("return",{esraMetadata:t.t0,selectionData:t.t1});case 5:case"end":return t.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()))}},{key:"getInteractableElementsRaw",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",C());case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"getInteractableElements",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,i,o=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=C(),i=new ae(document),e.abrupt("return",Promise.all(n.map(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.extract(n).toMetadata(),e.next=3,o.makeMatchingElementSelectionData(n);case 3:return a=e.sent,e.abrupt("return",{esraMetadata:r,selectionData:a});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"getCurrentESRASelector",value:function(){return this.currentESRASelector}},{key:"startMonitoringForAssertions",value:function(){return this.assertionGenerator.startMonitoring()}},{key:"generateAssertions",value:function(){return this.assertionGenerator.generateAssertions()}},{key:"stopMonitoringAndGenerateAssertions",value:function(){return this.assertionGenerator?this.assertionGenerator.stopMonitoringAndGenerateAssertions():(console.warn("Assertion generator not initialized, returning empty assertions"),[])}},{key:"stopMonitoring",value:function(){this.assertionGenerator.stopMonitoring()}},{key:"postRRwebEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",fetch(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(this.rrwebEvents)}));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"reduceHTML",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.length>0&&void 0!==s[0]?s[0]:{},r=s.length>1&&void 0!==s[1]?s[1]:{},i=s.length>2&&void 0!==s[2]?s[2]:document,e.next=5,this.htmlReducer.reduceHTML((0,l.Z)((0,l.Z)({},this.appSpecificRules),n),r,i);case 5:return o=e.sent,r.extractESRAForInterpretationRequiredElements&&(console.log("Extracting ESRA for interpretation required elements..."),a=this.htmlReducer.getInteractableElementsInReducedHTML(),o.elementsForNodeInterpretation=a.reduce((function(e,t){var n,r=t.checksumId,i=t.element;if(!(i instanceof HTMLElement))return e;if(null!==(n=i.innerText)&&void 0!==n&&n.trim().length)return e;var o=new ae(document).extract(i).toMetadata();return[].concat((0,m.Z)(e),[{checksumId:r,esraMetadata:o}])}),[]),console.log("Done with ESRA extraction for interpretation required elements")),e.abrupt("return",o);case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"displayInterpretationForElements",value:function(e){var t=this;this.clearHighlights(),this.htmlReducer.getInteractableElements().forEach((function(n){var r=n.checksumId,i=n.element,o=e[r];o&&(i.isConnected?t.highlightElement(i,{text:o,textType:"hover",clear:!1,textStyle:{width:"120px"}}):console.log("Element ".concat(r," is not connected to the DOM, skipping display")))}))}},{key:"overlayInteractableElementsWithChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u,c,d,f,h=this,p=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(n=p.length>0&&void 0!==p[0]?p[0]:{}).reduceBeforeRender,i=void 0!==r&&r,o=n.mode,a=void 0===o?"full":o,s=n.textPosition,u=void 0===s?"tag"===a?"above":void 0:s,c=n.shouldFlipHighlightTextOutsideViewport,d=void 0===c||c,this.clearHighlights(),!i){e.next=5;break}return e.next=5,this.reduceHTML();case 5:f=function(e,t,n){if(t.isConnected){var r=t.getBoundingClientRect(),i=r.width,o=r.height;if(!(i<=0||o<=0)){var s=function(e){var t=["red","gold","green","steelBlue","orange","hotPink","darkViolet","brown"];return e?t[e%t.length]:"red"}(n);h.highlightElement(t,(0,l.Z)((0,l.Z)({text:e,clear:!1,highlightStyle:{outline:"tag"===a?"3px dashed ".concat(s):"none"}},u?{textPosition:u}:{}),{},{textStyle:function(e){switch(a){case"tag":return{background:e,width:"initial",left:"-2px",border:"3px dashed ".concat(e),"font-weight":"bold"};case"full":return{background:"black",height:"100%"}}}(s),shouldFlipHighlightTextOutsideViewport:d}))}}else console.log("Element ".concat(e," is not connected to the DOM, skipping display"))},this.htmlReducer.getInteractableElementsInReducedHTML().filter((function(e){return!D(e.element,(0,l.Z)((0,l.Z)({},xe),{},{scrollIntoView:!1})).isHidden})).forEach((function(e,t){var n=e.checksumId,r=e.element;f(n,r,t)}));case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getSelectorForChecksumId",value:function(e){return this.htmlReducer.getSelectorForChecksumId(e)}},{key:"getSelectorByPosition",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=document.elementFromPoint(n,r),e.next=3,this.elementSelector.getSelectorAndLocator(i);case 3:return o=e.sent,a=o.selector,s=o.locator,u=o.parentFramesSelectors,e.abrupt("return",{selector:a,locator:s,parentFramesSelectors:u});case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isInput",value:function(e){var t=x(e);if(t.length)return["input","textarea"].includes(t[0].tagName.toLowerCase())}},{key:"getReactTree",value:function(e){return bn(e)}},{key:"isHidden",value:function(e){return D(e)}},{key:"showGrid",value:function(){this.removeGrid();var e=document.createElement("style");e.id="checksum_grid_style",e.innerHTML='\n .checksum_grid {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAJ1JREFUaEPtksEJgDAUxX73H1oRxAECkSrppacXaNI1M8f84Kz7Idf95XP0kM3yVWSzIFORikgG+lqSWIytCFYnDSsiicXYimB10rAikliMrQhWJw0rIonF2IpgddKwIpJYjK0IVicNKyKJxdiKYHXSsCKSWIytCFYnDSsiicXYimB10rAikliMrQhWJw0rIonF2IpgddLwKSLx38Oej8ZiASoSUGMAAAAASUVORK5CYII=");\n background-repeat: repeat;\n background-size: 20px;\n background-position: 0px 0px;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n z-index: 1000;\n }\n',document.body.prepend(e);var t=document.createElement("div");t.classList.add("checksum_grid"),document.body.prepend(t)}},{key:"removeGrid",value:function(){var e=document.querySelector("#checksum_grid_style");e&&e.remove();var t=document.querySelector(".checksum_grid");t&&t.remove()}},{key:"clearHighlights",value:function(){console.log("clearing highlights"),this.lastHighlights.length&&(this.lastHighlights.forEach((function(e){return e.remove()})),this.lastHighlights=[])}},{key:"highlightElement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.highlightStyle,r=void 0===n?{}:n,i=t.textStyle,o=void 0===i?{}:i,a=t.mousePosition,s=t.text,u=t.textType,c=void 0===u?"static":u,l=t.textPosition,d=void 0===l?"overlap":l,f=t.clear,h=void 0===f||f,p=t.shouldFlipHighlightTextOutsideViewport,v=void 0===p||p;if(this.options.highlightElement&&(h&&this.clearHighlights(),e)){var m=L(e),g=e.getBoundingClientRect(),y=document.createElement("div");if(y.style.outline="2px dashed rgba(255,0,0,.75)",y.style.position=m?"fixed":"absolute",y.style.left=g.left+"px",y.style.top=g.top+"px",y.style.width=g.right-g.left+"px",y.style.height=g.bottom-g.top+"px",y.style.pointerEvents="none",y.style.zIndex="2147483647",y.className="checksum-dom-cache-ignore",this.mergeStyle(y,r),a){var b=document.createElement("div");if(b.style.position="absolute",b.style.left=+a.x-16+"px",b.style.top=+a.y-16+"px",b.style.color="#004DFF",b.className="checksum-dom-cache-ignore mouse-cross",b.style.zIndex="2147483648",!document.head.querySelector("style[role=mouse-location]")){var w=document.head.appendChild(document.createElement("style"));w.setAttribute("role","mouse-location"),w.innerHTML=".mouse-cross:before, .mouse-cross:after {position: absolute;left: 15px;content: ' ';height: 33px;width: 3px;background-color: #004DFF;}.mouse-cross:before {transform: rotate(0deg);}.mouse-cross:after {transform: rotate(-90deg);}"}document.body.appendChild(b),this.lastHighlights.push(b)}var S=document.createElement("div");s&&(S.className="checksum-dom-cache-ignore",S.innerText=s,S.style.fontSize="12px",S.style.width="".concat(g.width,"px"),S.style.background="#000000a1",S.style.color="white",S.style.padding="5px",S.style.position="absolute",S.style.pointerEvents="none",S.style.userSelect="none","above"===d?S.style.bottom="".concat(g.height,"px"):"below"===d&&(S.style.top="".concat(g.height,"px")),this.mergeStyle(S,o),y.appendChild(S),y.style.pointerEvents="auto","hover"===c&&(S.style.display="none",y.addEventListener("mouseover",(function(){S.style.display="block"})),y.addEventListener("mouseout",(function(){S.style.display="none"})))),document.body.appendChild(y),"above"===d&&F(S)>0?(S.style.bottom="initial",S.style.top="".concat(g.height,"px")):"below"===d&&V(S)>0&&(S.style.top="initial",S.style.bottom="".concat(g.height,"px")),this.lastHighlights.push(y),v&&this.flipHighlightTextPositionOutsideViewport(S,d,g.height)}}},{key:"flipHighlightTextPositionOutsideViewport",value:function(e,t,n){"above"===t&&F(e)>0?(e.style.bottom="initial",e.style.top="".concat(n,"px")):"below"===t&&V(e)>0&&(e.style.top="initial",e.style.bottom="".concat(n,"px"))}},{key:"getNodeSelector",value:function(e){return(new Me).getSelector(e)}},{key:"startListeningForHTMLChanges",value:function(){this.mutationDetector&&this.mutationDetector.stopListening(),this.mutationDetector=new Sn(In),this.mutationDetector.startListening()}},{key:"stopListeningForHTMLChanges",value:function(e){return this.mutationDetector.stopListening().map((function(e){var t,n;return null===(t=null!==(n=e.innerText)&&void 0!==n?n:e.textContent)||void 0===t?void 0:t.trim()}))}},{key:"recordScrollPosition",value:function(e){var t=this.getSelectorForChecksumId(e).element;if(t){var n=new g(t);n.getScrollableParentsPositions(),t._checksumScrollHelper=n}}},{key:"restoreScrollPosition",value:function(e){var t=this.getSelectorForChecksumId(e).element;t&&t._checksumScrollHelper&&(t._checksumScrollHelper.restore(),delete t._checksumScrollHelper)}},{key:"mergeStyle",value:function(e,t){for(var n in t)e.style[n]=t[n]}},{key:"makeMatchingElementSelectionData",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i,o){var a,s,u,c,l,d,f,h,p,v,m,g,y,b,w,S,I,C,k,E,x,A;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,f=this.setAndGetTestId(n),h=this.getVisibleParent(n),p=this.setAndGetTestId(h),v=this.getElementAtCenterOfElement(n),m=this.setAndGetTestId(v),g={element:f,visibleElement:p===f?void 0:p,atPointElement:m===f||m===p?void 0:m},e.next=9,this.elementSelector.getSelectorAndLocator(n,{testIdSelector:null===(a=this.appSpecificRules)||void 0===a||null===(s=a.esraSelectionRules)||void 0===s?void 0:s.testIdSelector});case 9:return y=e.sent,e.next=12,this.elementSelector.getSelectorAndLocator(v,{testIdSelector:null===(u=this.appSpecificRules)||void 0===u||null===(c=u.esraSelectionRules)||void 0===c?void 0:c.testIdSelector});case 12:return b=e.sent,e.next=15,this.elementSelector.getSelectorAndLocator(h,{testIdSelector:null===(l=this.appSpecificRules)||void 0===l||null===(d=l.esraSelectionRules)||void 0===d?void 0:d.testIdSelector});case 15:return w=e.sent,S={element:null===y||void 0===y?void 0:y.selector,visibleElement:null===w||void 0===w?void 0:w.selector,atPointElement:null===b||void 0===b?void 0:b.selector},I={element:null===y||void 0===y?void 0:y.parentFramesSelectors,visibleElement:null===w||void 0===w?void 0:w.parentFramesSelectors,atPointElement:null===b||void 0===b?void 0:b.parentFramesSelectors},k={element:(C=function(e){return{tag:e.tagName.toLowerCase()}})(n),visibleElement:g.visibleElement?C(h):void 0,atPointElement:g.atPointElement?C(v):void 0},E=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){var i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r!==n||!o){e.next=2;break}return e.abrupt("return",o);case 2:return i=new ae(document),e.abrupt("return",i.extract(r).toMetadata());case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.next=23,E(n);case 23:if(e.t0=e.sent,!g.visibleElement){e.next=30;break}return e.next=27,E(h);case 27:e.t1=e.sent,e.next=31;break;case 30:e.t1=void 0;case 31:if(e.t2=e.t1,!g.atPointElement){e.next=38;break}return e.next=35,E(v);case 35:e.t3=e.sent,e.next=39;break;case 38:e.t3=void 0;case 39:return e.t4=e.t3,x={element:e.t0,visibleElement:e.t2,atPointElement:e.t4},A=null===y||void 0===y?void 0:y.locator,e.abrupt("return",{testIds:g,selectors:S,parentFramesSelectors:I,elementData:k,score:i,esraMetadata:x,generatedLocator:A});case 45:return e.prev=45,e.t5=e.catch(0),console.log("[makeMatchingElementSelectionData] exception",e.t5),e.abrupt("return",{testIds:{element:void 0},selectors:{element:void 0},parentFramesSelectors:{element:void 0},elementData:{element:void 0},esraMetadata:{element:void 0},generatedLocator:void 0});case 49:case"end":return e.stop()}}),e,this,[[0,45]])})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"getElementAtCenterOfElement",value:function(e){var t=e.getBoundingClientRect(),n=t.x,r=t.y,i=e.ownerDocument.elementFromPoint(n,r);return i instanceof HTMLElement?i:void 0}},{key:"setAndGetTestId",value:function(e){if(e){var t=e.getAttribute("data-checksum-testid");if(t)return t;var n=(this.testIdCounter++).toString();return e.setAttribute("data-checksum-testid",n),n}}},{key:"getVisibleParent",value:function(e){return e instanceof HTMLElement?null!==e.offsetParent?e:this.getVisibleParent(T(e)):e}}]),i}(cn),kn=function(){function e(){(0,a.Z)(this,e),this.goals=void 0,this.goals={}}return(0,s.Z)(e,[{key:"init",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"recordGoalFinished",value:function(e){var t;console.log("Goal reached: ".concat(e)),this.goals[e]||(this.goals[e]=0),this.goals[e]+=1,null===(t=window.checksumai)||void 0===t||t.capture("goal_reached",{goalName:e})}},{key:"getGoals",value:function(){return this.goals}}]),e}();window.checksum||(window.checksum={testGenerator:new Cn,testRunner:new Cn({highlightElement:!1}),sessionDigester:new ln,goalTracker:new kn});var En=!!(0,i.v)().app,xn=(0,i.v)().type||En?o.pR.App:void 0;function An(){return(An=(0,r.Z)((0,t.Z)().mark((function e(){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=xn||o.De.appType,e.next=e.t0===o.pR.App?3:e.t0===o.pR.Script?9:10;break;case 3:return e.next=5,Promise.all([n.e(725),n.e(329)]).then(n.bind(n,8426));case 5:return r=e.sent,(0,r.bootstrapApp)(),e.abrupt("break",10);case 9:return e.abrupt("break",10);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}"true"===(0,i.v)().injectESRA&&(window.esraExtractor=new ae(document),window.esraSelector=function(e){return new ue(e)},window.esraMetadata=u),function(){An.apply(this,arguments)}()}()}();
|
|
3
|
+
//# sourceMappingURL=main.3e83459f.js.map
|