UNPKG

@xysfe/memento-player

Version:

memento's replayer UI

30 lines (26 loc) 80.8 kB
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["memento-player"]=t():e["memento-player"]=t()})("undefined"!==typeof self?self:this,(function(){return 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="fb15")}({"0438":function(e,t,n){t=e.exports=n("2350")(!1),t.push([e.i,".rr-player{position:relative;float:left}.rr-player-background{background:#fff;box-shadow:0 24px 48px rgba(17,16,62,.12)}.rr-player__frame{overflow:hidden}.replayer-center>.replayer-wrapper{float:left;clear:both;transform-origin:top left;left:50%;top:50%}.replayer-wrapper>iframe{border:none}",""])},"1d28":function(e,t,n){"use strict";n("35ba")},2350:function(e,t){function n(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"===typeof btoa){var o=r(i),a=i.sources.map((function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"}));return[n].concat(a).concat([o]).join("\n")}return[n].join("\n")}function r(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,"+t;return"/*# "+n+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=n(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r})).join("")},t.i=function(e,n){"string"===typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"===typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"===typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},"2c47":function(e,t,n){t=e.exports=n("2350")(!1),t.push([e.i,'.replayer-wrapper{position:relative}.replayer-mouse{position:absolute;width:20px;height:20px;transition:left .05s linear,top .05s linear;background-size:contain;background-position:50%;background-repeat:no-repeat;background-image:url("data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMwMCIgd2lkdGg9IjMwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBkYXRhLW5hbWU9IkxheWVyIDEiIHZpZXdCb3g9IjAgMCA1MCA1MCI+PHBhdGggZD0iTTQ4LjcxIDQyLjkxTDM0LjA4IDI4LjI5IDQ0LjMzIDE4YTEgMSAwIDAwLS4zMy0xLjYxTDIuMzUgMS4wNmExIDEgMCAwMC0xLjI5IDEuMjlMMTYuMzkgNDRhMSAxIDAgMDAxLjY1LjM2bDEwLjI1LTEwLjI4IDE0LjYyIDE0LjYzYTEgMSAwIDAwMS40MSAwbDQuMzgtNC4zOGExIDEgMCAwMC4wMS0xLjQyem0tNS4wOSAzLjY3TDI5IDMyYTEgMSAwIDAwLTEuNDEgMGwtOS44NSA5Ljg1TDMuNjkgMy42OWwzOC4xMiAxNEwzMiAyNy41OEExIDEgMCAwMDMyIDI5bDE0LjU5IDE0LjYyeiIvPjwvc3ZnPg==");border-color:transparent}.replayer-mouse:after{content:"";display:inline-block;width:20px;height:20px;background:#4950f6;border-radius:100%;transform:translate(-50%,-50%);opacity:.3}.replayer-mouse.active:after{animation:click .2s ease-in-out 1}.replayer-mouse.touch-device{background-image:none;width:70px;height:70px;border-radius:100%;margin-left:-37px;margin-top:-37px;border:4px solid rgba(73,80,246,0);transition:left 0s linear,top 0s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device.touch-active{border-color:#4950f6;transition:left .25s linear,top .25s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device:after{opacity:0}.replayer-mouse.touch-device.active:after{animation:touch-click .2s ease-in-out 1}.replayer-mouse-tail{position:absolute;pointer-events:none}.replayer-time{position:absolute;top:9px;right:0;z-index:100;height:24px;padding:0 14px;background-color:rgba(0,0,0,.4);color:#fff;font-size:12px;line-height:24px;border-radius:12px 0 0 12px}@keyframes click{0%{opacity:.3;width:20px;height:20px}50%{opacity:.5;width:10px;height:10px}}@keyframes touch-click{0%{opacity:0;width:20px;height:20px}50%{opacity:.5;width:10px;height:10px}}',""])},"35ba":function(e,t,n){var r=n("0438");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var i=n("499e").default;i("bfd63b40",r,!0,{sourceMap:!1,shadowMode:!1})},"3fa2":function(e,t,n){var r=n("aefc");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var i=n("499e").default;i("0bfc96b5",r,!0,{sourceMap:!1,shadowMode:!1})},"499e":function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},i=0;i<t.length;i++){var o=t[i],a=o[0],s=o[1],l=o[2],c=o[3],u={id:e+":"+i,css:s,media:l,sourceMap:c};r[a]?r[a].parts.push(u):n.push(r[a]={id:a,parts:[u]})}return n}n.r(t),n.d(t,"default",(function(){return h}));var i="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o={},a=i&&(document.head||document.getElementsByTagName("head")[0]),s=null,l=0,c=!1,u=function(){},d=null,p="data-vue-ssr-id",f="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function h(e,t,n,i){c=n,d=i||{};var a=r(e,t);return m(a),function(t){for(var n=[],i=0;i<a.length;i++){var s=a[i],l=o[s.id];l.refs--,n.push(l)}t?(a=r(e,t),m(a)):a=[];for(i=0;i<n.length;i++){l=n[i];if(0===l.refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete o[l.id]}}}}function m(e){for(var t=0;t<e.length;t++){var n=e[t],r=o[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;i++)r.parts.push(g(n.parts[i]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(i=0;i<n.parts.length;i++)a.push(g(n.parts[i]));o[n.id]={id:n.id,refs:1,parts:a}}}}function v(){var e=document.createElement("style");return e.type="text/css",a.appendChild(e),e}function g(e){var t,n,r=document.querySelector("style["+p+'~="'+e.id+'"]');if(r){if(c)return u;r.parentNode.removeChild(r)}if(f){var i=l++;r=s||(s=v()),t=b.bind(null,r,i,!1),n=b.bind(null,r,i,!0)}else r=v(),t=w.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}var y=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function b(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=y(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function w(e,t){var n=t.css,r=t.media,i=t.sourceMap;if(r&&e.setAttribute("media",r),d.ssrId&&e.setAttribute(p,t.id),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{while(e.firstChild)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}},5041:function(e,t,n){"use strict";n("5d33")},"5d33":function(e,t,n){var r=n("2c47");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var i=n("499e").default;i("9e6aa1be",r,!0,{sourceMap:!1,shadowMode:!1})},"7f2f":function(e,t,n){"use strict";n("3fa2")},ad84:function(e,t,n){t=e.exports=n("2350")(!1),t.push([e.i,".rr-controller{width:100%;height:80px;background:#fff;flex-direction:column;justify-content:space-around;border-radius:0 0 5px 5px}.rr-controller,.rr-timeline{display:flex;align-items:center}.rr-timeline{width:80%}.rr-timeline__time{padding:0 20px;color:#11103e}.rr-progress{width:100%;height:14px;background:#ddd;position:relative;border-radius:3px;cursor:pointer;box-sizing:border-box;border-top:4px solid #fff;border-bottom:4px solid #fff}.rr-progress.disabled{cursor:not-allowed}.rr-progress__step{height:100%;position:absolute;left:0;top:0;z-index:1;background:#e0e1fe}.rr-progress_not-loaded-progress{height:100%;position:absolute;right:0;top:0;background-color:#eee;cursor:not-allowed}.rr-progress__handler{width:20px;height:20px;border-radius:10px;position:absolute;z-index:2;top:2px;transform:translate(-50%,-50%);background:#4950f6}.rr-controller__btns{font-size:13px}.rr-controller__btns,.rr-controller__btns button{display:flex;align-items:center;justify-content:center}.rr-controller__btns button{width:32px;height:32px;padding:0;background:none;border:none;border-radius:50%;cursor:pointer}.rr-controller__btns button:active{background:#e0e1fe}.rr-controller__btns button.active{color:#fff;background:#4950f6}.rr-controller__btns button:disabled{cursor:not-allowed}.event-class{width:10px;height:6px;position:absolute;z-index:10}.event-class:hover .event-tag{display:block}.event-tag{min-width:80px;padding:10px 10px;position:absolute;display:none;top:-40px;transform:translate(-50%,-50%);background-color:#fff;box-shadow:0 2px 12px 0 rgba(0,0,0,.1);text-align:center;cursor:default}.event-tag-inner{margin:0}",""])},aefc:function(e,t,n){t=e.exports=n("2350")(!1),t.push([e.i,'.switch{height:1em;display:flex;align-items:center}.switch.disabled{opacity:.5}.label{margin:0 8px}.switch input[type=checkbox]{position:absolute;opacity:0}.switch label{width:2em;height:1em;position:relative;cursor:pointer;display:block}.switch.disabled label{cursor:not-allowed}.switch label:before{width:2em;left:.1em;transition:background .1s ease;background:rgba(73,80,246,.5)}.switch label:after,.switch label:before{content:"";position:absolute;height:1em;border-radius:50px}.switch label:after{width:1em;left:0;transition:all .2s ease;box-shadow:0 2px 5px 0 rgba(0,0,0,.3);background:#fcfff4;animation:switch-off .2s ease-out;z-index:2}.switch input[type=checkbox]:checked+label:before{background:#4950f6}.switch input[type=checkbox]:checked+label:after{animation:switch-on .2s ease-out;left:1.1em}',""])},bf22:function(e,t,n){var r=n("ad84");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var i=n("499e").default;i("72d6fa0f",r,!0,{sourceMap:!1,shadowMode:!1})},cc0a:function(e,t,n){"use strict";n("bf22")},fb15:function(e,t,n){"use strict";n.r(t);var r,i={};(n.r(i),n.d(i,"default",(function(){return R})),"undefined"!==typeof window)&&((r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=r[1]));var o,a,s,l,c,u,d,p,f=function(){var e=this,t=e._self._c;return t("div",{ref:"player",staticClass:"rr-player",class:{"rr-player-background":e.isCenter},style:e.playerStyle},[t("div",{ref:"frame",staticClass:"rr-player__frame",class:{"replayer-center":e.isCenter},style:e.style}),e.replayer?t("Controller",{attrs:{replayer:e.replayer,showController:e.showController,autoPlay:e.autoPlay,skipInactive:e.playerSkipInactive,tags:e.tags,events:e.eventsFormat,"total-time":e.totalTime},on:{fullscreen:e.fullscreen,customEventClick:e.handleCustomEventClick}}):e._e()],1)},h=[];(function(e){e[e["DomContentLoaded"]=0]="DomContentLoaded",e[e["Load"]=1]="Load",e[e["FullSnapshot"]=2]="FullSnapshot",e[e["IncrementalSnapshot"]=3]="IncrementalSnapshot",e[e["Meta"]=4]="Meta",e[e["PageChange"]=5]="PageChange",e[e["Custom"]=9]="Custom",e[e["Other"]=99]="Other"})(o||(o={})),function(e){e[e["Mutation"]=0]="Mutation",e[e["MouseMove"]=1]="MouseMove",e[e["MouseInteraction"]=2]="MouseInteraction",e[e["Scroll"]=3]="Scroll",e[e["ViewportResize"]=4]="ViewportResize",e[e["Input"]=5]="Input",e[e["TouchMove"]=6]="TouchMove",e[e["MediaInteraction"]=7]="MediaInteraction",e[e["StyleSheetRule"]=8]="StyleSheetRule",e[e["CanvasMutation"]=9]="CanvasMutation",e[e["Drag"]=10]="Drag",e[e["UserDefinedEvent"]=11]="UserDefinedEvent"}(a||(a={})),function(e){e[e["LivePlay"]=0]="LivePlay"}(s||(s={})),function(e){e[e["Console"]=1]="Console",e[e["Network"]=2]="Network"}(l||(l={})),function(e){e[e["MouseUp"]=0]="MouseUp",e[e["MouseDown"]=1]="MouseDown",e[e["Click"]=2]="Click",e[e["ContextMenu"]=3]="ContextMenu",e[e["DblClick"]=4]="DblClick",e[e["Focus"]=5]="Focus",e[e["Blur"]=6]="Blur",e[e["TouchStart"]=7]="TouchStart",e[e["TouchMove_Departed"]=8]="TouchMove_Departed",e[e["TouchEnd"]=9]="TouchEnd"}(c||(c={})),function(e){e[e["2D"]=0]="2D",e[e["WebGL"]=1]="WebGL",e[e["WebGL2"]=2]="WebGL2"}(u||(u={})),function(e){e[e["Play"]=0]="Play",e[e["Pause"]=1]="Pause"}(d||(d={})),function(e){e["Start"]="start",e["Pause"]="pause",e["Resume"]="resume",e["Resize"]="resize",e["Finish"]="finish",e["FullsnapshotRebuilded"]="fullsnapshot-rebuilded",e["LoadStylesheetStart"]="load-stylesheet-start",e["LoadStylesheetEnd"]="load-stylesheet-end",e["SkipStart"]="skip-start",e["SkipEnd"]="skip-end",e["MouseInteraction"]="mouse-interaction",e["EventCast"]="event-cast",e["CustomEvent"]="custom-event",e["Flush"]="flush",e["AddEvents"]="add-events"}(p||(p={})); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var m,v=function(){return v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},v.apply(this,arguments)};function g(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r["throw"](e))}catch(t){o(t)}}function l(e){e.done?n(e.value):i(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function y(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(a)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}}function b(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.")}function w(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{while((void 0===t||t-- >0)&&!(r=o.next()).done)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o["return"])&&n.call(o)}finally{if(i)throw i.error}}return a}function x(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(w(arguments[t]));return 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"})(m||(m={}));RegExp("[^a-z1-6-]");var S=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function E(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(){function e(e){this.start=e,this.end={line:n,column:r},this.source=t.source}return e}();a.prototype.content=e;var s=[];function l(i){var o=new Error(t.source+":"+n+":"+r+": "+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(){var e=p();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:s}}}function u(){return f(/^{\s*/)}function d(){return f(/^}/)}function p(){var t,n=[];h(),m(n);while(e.length&&"}"!==e.charAt(0)&&(t=O()||R()))!1!==t&&(n.push(t),m(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 m(e){var t;void 0===e&&(e=[]);while(t=v())!1!==t&&e.push(t),t=v();return e}function v(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){var n=2;while(""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1)))++n;if(n+=2,""===e.charAt(n-1))return l("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 g(){var e=f(/^([^{]+)/);if(e)return M(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function y(){var e=o(),t=f(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=M(t[0]);if(!f(/^:\s*/))return l("property missing ':'");var r=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:n.replace(S,""),value:r?M(r[0]).replace(S,""):""});return f(/^[;\s]*/),i}}function b(){var e,t=[];if(!u())return l("missing '{'");m(t);while(e=y())!1!==e&&(t.push(e),m(t)),e=y();return d()?t:l("missing '}'")}function w(){var e,t=[],n=o();while(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:b()})}function x(){var e=o(),t=f(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(t=f(/^([-\w]+)\s*/),!t)return l("@keyframes missing name");var r,i=t[1];if(!u())return l("@keyframes missing '{'");var a=m();while(r=w())a.push(r),a=a.concat(m());return d()?e({type:"keyframes",name:i,vendor:n,keyframes:a}):l("@keyframes missing '}'")}}function E(){var e=o(),t=f(/^@supports *([^{]+)/);if(t){var n=M(t[1]);if(!u())return l("@supports missing '{'");var r=m().concat(p());return d()?e({type:"supports",supports:n,rules:r}):l("@supports missing '}'")}}function T(){var e=o(),t=f(/^@host\s*/);if(t){if(!u())return l("@host missing '{'");var n=m().concat(p());return d()?e({type:"host",rules:n}):l("@host missing '}'")}}function k(){var e=o(),t=f(/^@media *([^{]+)/);if(t){var n=M(t[1]);if(!u())return l("@media missing '{'");var r=m().concat(p());return d()?e({type:"media",media:n,rules:r}):l("@media missing '}'")}}function I(){var e=o(),t=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:M(t[1]),media:M(t[2])})}function _(){var e=o(),t=f(/^@page */);if(t){var n=g()||[];if(!u())return l("@page missing '{'");var r,i=m();while(r=y())i.push(r),i=i.concat(m());return d()?e({type:"page",selectors:n,declarations:i}):l("@page missing '}'")}}function N(){var e=o(),t=f(/^@([-\w]+)?document *([^{]+)/);if(t){var n=M(t[1]),r=M(t[2]);if(!u())return l("@document missing '{'");var i=m().concat(p());return d()?e({type:"document",document:r,vendor:n,rules:i}):l("@document missing '}'")}}function A(){var e=o(),t=f(/^@font-face\s*/);if(t){if(!u())return l("@font-face missing '{'");var n,r=m();while(n=y())r.push(n),r=r.concat(m());return d()?e({type:"font-face",declarations:r}):l("@font-face missing '}'")}}var L=F("import"),D=F("charset"),P=F("namespace");function F(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 O(){if("@"===e[0])return x()||k()||I()||E()||L()||D()||P()||N()||_()||T()||A()}function R(){var e=o(),t=g();return t?(m(),e({type:"rule",selectors:t,declarations:b()})):l("selector missing")}return C(c())}function M(e){return e?e.replace(/^\s+|\s+$/g,""):""}function C(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=o[i],s=e[a];Array.isArray(s)?s.forEach((function(e){C(e,r)})):s&&"object"===typeof s&&C(s,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var T={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function k(e){var t=T[e.tagName]?T[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}var I=/([^\\]):hover/g,_=/(\s|;|\{)inset\s*:([^;}]+)/gi;function N(e){var t=E(e,{silent:!0});return t.stylesheet&&t.stylesheet.rules?(t.stylesheet.rules.forEach((function(t){"selectors"in t&&(t.selectors||[]).forEach((function(t){if(I.test(t)){var n=t.replace(I,"$1.\\:hover");e=e.replace(t,t+", "+n)}}))})),e.replace(_,"$1top: $2; right: $2; bottom: $2; left: $2;")):e}var A=/url\((data:image\/svg\+xml;charset=[\w-].*?)\)\s*(;|\}|$)/gi;function L(e){return e?e.replace(A,(function(e,t,n){return'url("'+t+'")'+n})):e}function D(e,t,n,r){switch(void 0===r&&(r=!0),e.type){case m.Document:return t.implementation.createDocument(null,"",null);case m.DocumentType:return t.implementation.createDocumentType(e.name,e.publicId,e.systemId);case m.Element:var i,o=k(e);i=e.isSVG?t.createElementNS("http://www.w3.org/2000/svg",o):t.createElement(o);var a=function(a){if(!e.attributes.hasOwnProperty(a))return"continue";if(e.attributes.hasOwnProperty("_memimage_"+a))return"continue";var s=e.attributes[a];s="boolean"===typeof s||"number"===typeof s?"":s;var l=a;if(a=a.replace("_memimage_",""),a.startsWith("mem_")){if("canvas"===o&&"mem_dataURL"===a){var c=document.createElement("img");c.src=s,c.onload=function(){var e=i.getContext("2d");e&&e.drawImage(c,0,0,c.width,c.height)}}"mem_imgwidth"===a||"mem_width"===a?i.style.width=s:"mem_imgheight"===a||"mem_height"===a?i.style.height=s:"video"===o&&"mem_placeholder"===l&&(i.style.background="center / cover no-repeat url("+s+") !important")}else{var u="textarea"===o&&"value"===a,d="style"===o&&"_cssText"===a;if(d&&n&&(s=N(s),s=L(s)),u||d){for(var p=t.createTextNode(s),f=0,h=Array.from(i.childNodes);f<h.length;f++){var m=h[f];m.nodeType===i.TEXT_NODE&&i.removeChild(m)}return i.appendChild(p),"continue"}if("iframe"===o&&"src"===a)return"continue";try{e.isSVG&&"xlink:href"===a?i.setAttributeNS("http://www.w3.org/1999/xlink",a,s):"onload"===a||"onclick"===a||"onmouse"===a.substring(0,7)?i.setAttribute("_"+a,s):(r&&"link"===o&&"_memimage_href"===l&&s&&s.match(/memento\.oss/)&&(s=s.replace(/^http\:\/\//,"https://")),i.setAttribute(a,s))}catch(v){}}};for(var s in e.attributes)a(s);return i;case m.Text:var l=e.isStyle?L(e.textContent):e.textContent;return t.createTextNode(e.isStyle&&n?N(l):l);case m.CDATA:return t.createCDATASection(e.textContent);case m.Comment:return t.createComment(e.textContent);default:return null}}function P(e,t,n,r,i,o){void 0===r&&(r=!1),void 0===i&&(i=!0),void 0===o&&(o=!0);var a=D(e,t,i,o);if(!a)return null;if(e.type===m.Document&&(t.close(),t.open(),a=t),a.__sn=e,n[e.id]=a,(e.type===m.Document||e.type===m.Element)&&!r)for(var s=0,l=e.childNodes;s<l.length;s++){var c=l[s],u=P(c,t,n,!1,i,o);u?a.appendChild(u):console.warn("Failed to rebuild",c)}return a}function F(e){for(var t in e){var n=e[t],r=n.__sn;if(r.type===m.Element){var i=n;for(var o in r.attributes)if(r.attributes.hasOwnProperty(o)&&o.startsWith("mem_")){var a=r.attributes[o];"mem_scrollLeft"===o&&(i.scrollLeft=a),"mem_scrollTop"===o&&(i.scrollTop=a)}}}}function O(e,t,n,r){void 0===n&&(n=!0),void 0===r&&(r=!0);var i={},o=P(e,t,i,!1,n,r);return F(i),[o,i]}function R(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map((function(e){e(n)})),(e["*"]||[]).slice().map((function(e){e(t,n)}))}}}function j(e,t){return t={exports:{}},e(t,t.exports),t.exports}var z,B=j((function(e,t){(function(){function t(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n=e.HTMLElement||e.Element,r=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||l,scrollIntoView:n.prototype.scrollIntoView},o=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=s(e.navigator.userAgent)?1:0;e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==u(arguments[0])?v.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):i.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]&&(u(arguments[0])?i.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):v.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},n.prototype.scroll=n.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==u(arguments[0])){var e=arguments[0].left,t=arguments[0].top;v.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");i.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)}},n.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==u(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.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))},n.prototype.scrollIntoView=function(){if(!0!==u(arguments[0])){var n=h(this),r=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(v.call(this,n,n.scrollLeft+o.left-r.left,n.scrollTop+o.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e){var t=["MSIE ","Trident/","Edge/"];return new RegExp(t.join("|")).test(e)}function l(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){return.5*(1-Math.cos(Math.PI*e))}function u(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 d(e,t){return"Y"===t?e.clientHeight+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function p(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function f(e){var t=d(e,"Y")&&p(e,"Y"),n=d(e,"X")&&p(e,"X");return t||n}function h(e){while(e!==t.body&&!1===f(e))e=e.parentNode||e.host;return e}function m(t){var n,i,a,s=o(),l=(s-t.startTime)/r;l=l>1?1:l,n=c(l),i=t.startX+(t.x-t.startX)*n,a=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,i,a),i===t.x&&a===t.y||e.requestAnimationFrame(m.bind(e,t))}function v(n,r,a){var s,c,u,d,p=o();n===t.body?(s=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=i.scroll):(s=n,c=n.scrollLeft,u=n.scrollTop,d=l),m({scrollable:s,method:d,startTime:p,startX:c,startY:u,x:r,y:a})}}e.exports={polyfill:t}})()})),U=B.polyfill,$=function(){function e(e,t){void 0===t&&(t=[]),this.timeOffset=0,this.actions=t,this.config=e}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){var t;(t=this.actions).push.apply(t,x(e))},e.prototype.start=function(){this.actions.sort((function(e,t){return e.delay-t.delay})),this.timeOffset=0;var e=performance.now(),t=this,n=t.actions,r=t.config,i=this;function o(t){i.timeOffset+=(t-e)*r.speed,e=t;while(n.length){var a=n[0];if(!(i.timeOffset>=a.delay))break;n.shift(),a.doAction()}(n.length>0||i.config.liveMode)&&(i.raf&&cancelAnimationFrame(i.raf),i.raf=requestAnimationFrame(o))}this.raf=requestAnimationFrame(o)},e.prototype.clear=function(){this.raf&&cancelAnimationFrame(this.raf),this.actions.length=0},e.prototype.findActionIndex=function(e){var t=0,n=this.actions.length-1;while(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;n=r-1}}return t},e}();function W(e,t){if(e.type===o.IncrementalSnapshot&&e.data.source===a.MouseMove){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.timestamp-t} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */function G(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"}(z||(z={}));var H={type:"xstate.init"};function Y(e){return void 0===e?[]:[].concat(e)}function q(e){return{type:"xstate.assign",assignment:e}}function V(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 X(e){return function(t){return e===t}}function Z(e){return"string"==typeof e?{type:e}:e}function Q(e,t){return{value:e,context:t,actions:[],changed:!1,matches:X(e)}}function J(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 K(e,t){void 0===t&&(t={});var n=G(J(Y(e.states[e.initial].entry).map((function(e){return V(e,t.actions)})),e.context,H),2),r=n[0],i=n[1],o={config:e,_options:t,initialState:{value:e.initial,actions:r,context:i,matches:X(e.initial)},transition:function(t,n){var r,i,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,l=a.context,c=Z(n),u=e.states[s];if(u.on){var d=Y(u.on[c.type]);try{for(var p=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),f=p.next();!f.done;f=p.next()){var h=f.value;if(void 0===h)return Q(s,l);var m="string"==typeof h?{target:h}:h,v=m.target,g=m.actions,y=void 0===g?[]:g,b=m.cond,w=void 0===b?function(){return!0}:b,x=void 0===v,S=null!=v?v:s,E=e.states[S];if(w(l,c)){var M=G(J((x?Y(y):[].concat(u.exit,y,E.entry).filter((function(e){return e}))).map((function(e){return V(e,o._options.actions)})),l,c),3),C=M[0],T=M[1],k=M[2],I=null!=v?v:s;return{value:I,context:T,actions:C,changed:v!==s||C.length>0||k,matches:X(I)}}}}catch(G){r={error:G}}finally{try{f&&!f.done&&(i=p.return)&&i.call(p)}finally{if(r)throw r.error}}}return Q(s,l)}};return o}var ee=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function te(e){var t=e.initialState,n=z.NotStarted,r=new Set,i={_machine:e,send:function(i){n===z.Running&&(t=e.transition(t,i),ee(t,Z(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:X(o.value)}}return n=z.Running,ee(t,H),i},stop:function(){return n=z.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}var ne={map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return ne.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete ne.map[t],e.childNodes&&e.childNodes.forEach((function(e){return ne.removeNodeFromMap(e)}))},has:function(e){return ne.map.hasOwnProperty(e)}};function re(){"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach)}function ie(e,t){var n={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};for(var r in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),n)new RegExp("("+r+")").test(t)&&(t=t.replace(RegExp.$1,1===RegExp.$1.length?n[r]:("00"+n[r]).substr((""+n[r]).length)));return t}function oe(e){switch(e.type){case o.DomContentLoaded:case o.Load:case o.PageChange:case o.Custom:return!1;case o.FullSnapshot:case o.Meta:return!0}switch(e.data.source){case a.MouseMove:case a.MouseInteraction:case a.TouchMove:case a.MediaInteraction:return!1;case a.ViewportResize:case a.StyleSheetRule:case a.Scroll:case a.Input:return!0}return!0}var ae=function(){function e(){this.reset()}return e.prototype.add=function(e){var t=this.indexes.get(e.parentId),n={id:e.node.id,mutation:e,children:[],texts:[],attributes:[]};t?(n.parent=t,t.children[n.id]=n):this.tree[n.id]=n,this.indexes.set(n.id,n)},e.prototype.remove=function(e){var t=this,n=this.indexes.get(e.parentId),r=this.indexes.get(e.id),i=function(e){t.removeIdSet.add(e);var n=ne.getNode(e);null===n||void 0===n||n.childNodes.forEach((function(e){return i(e.__sn.id)}))},o=function(n){t.removeIdSet.add(n.id),Object.values(n.children).forEach((function(e){return o(e)}));var r=t.indexes.get(n.id);if(r){var i=r.parent;i&&(delete r.parent,delete i.children[r.id],t.indexes.delete(e.id))}};r?n?(delete r.parent,delete n.children[r.id],this.indexes.delete(e.id),o(r)):(delete this.tree[r.id],this.indexes.delete(r.id),o(r)):(this.removeNodeMutations.push(e),i(e.id))},e.prototype.text=function(e){var t=this.indexes.get(e.id);t?t.texts.push(e):this.textMutations.push(e)},e.prototype.attribute=function(e){var t=this.indexes.get(e.id);t?t.attributes.push(e):this.attributeMutations.push(e)},e.prototype.scroll=function(e){this.scrollMap.set(e.id,e)},e.prototype.input=function(e){this.inputMap.set(e.id,e)},e.prototype.flush=function(){var e,t,n,r,i=this,o=this,s=o.tree,l=o.removeNodeMutations,c=o.textMutations,u=o.attributeMutations,d={source:a.Mutation,removes:l,texts:c,attributes:u,adds:[]},p=function(e,t){t&&i.removeIdSet.add(e.id),d.texts=d.texts.concat(t?[]:e.texts).filter((function(e){return!i.removeIdSet.has(e.id)})),d.attributes=d.attributes.concat(t?[]:e.attributes).filter((function(e){return!i.removeIdSet.has(e.id)})),i.removeIdSet.has(e.id)||i.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return p(e,!0)})):(d.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return p(e,!1)})))};Object.values(s).forEach((function(e){return p(e,!1)}));try{for(var f=b(this.scrollMap.keys()),h=f.next();!h.done;h=f.next()){var m=h.value;this.removeIdSet.has(m)&&this.scrollMap.delete(m)}}catch(x){e={error:x}}finally{try{h&&!h.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}try{for(var v=b(this.inputMap.keys()),g=v.next();!g.done;g=v.next()){m=g.value;this.removeIdSet.has(m)&&this.inputMap.delete(m)}}catch(S){n={error:S}}finally{try{g&&!g.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}var y=new Map(this.scrollMap),w=new Map(this.inputMap);return this.reset(),{mutationData:d,scrollMap:y,inputMap:w}},e.prototype.reset=function(){this.tree=[],this.indexes=new Map,this.removeNodeMutations=[],this.textMutations=[],this.attributeMutations=[],this.removeIdSet=new Set,this.scrollMap=new Map,this.inputMap=new Map},e}();function se(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=se(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 le(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.type===o.Meta&&r.timestamp<=t)return e.slice(n)}return e}function ce(e,t){var n=t.getCastFn,r=t.emitter,i=K({id:"player",context:e,initial:"inited",states:{inited:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},TO_LIVE:{target:"live",actions:["startLive"]}}},playing:{on:{PAUSE:{target:"paused",actions:["pause"]},PLAY:{target:"playing",actions:["recordTimeOffset","play"]},FAST_FORWARD:"skipping",CAST_EVENT:{target:"playing",actions:"castEvent"},ADD_EVENTS:{target:"playing",actions:["addEvents","recordTimeOffset"]}}},paused:{on:{RESUME:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},ADD_EVENTS:{target:"paused",actions:["addEvents"]}}},skipping:{on:{BACK_TO_NORMAL:"playing"}},ended:{on:{REPLAY:{target:"playing",actions:["recordTimeOffset","play"]},ADD_EVENTS:{target:"playing",actions:["addEvents","recordTimeOffset","play"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]}}}}},{actions:{castEvent:q({lastPlayedEvent:function(t,n){return"CAST_EVENT"===n.type?n.payload.event:e.lastPlayedEvent}}),recordTimeOffset:q((function(e,t){var n=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(n=t.payload.timeOffset),v(v({},e),{timeOffset:n,baselineTime:e.events[0].timestamp+n})})),play:function(e){var t,i,o=e.timer,a=e.events,s=e.baselineTime;e.lastPlayedEvent,o.clear();var l=le(a,s),c=new Array,u=function(e){var t=e.timestamp<s;if(t&&!oe(e))return"continue";var i=n(e,t);t?i():c.push({doAction:function(){i(),r.emit(p.EventCast,e)},delay:W(e,s)})};try{for(var d=b(l),f=d.next();!f.done;f=d.next()){var h=f.value;u(h)}}catch(m){t={error:m}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(t)throw t.error}}r.emit(p.Flush),o.addActions(c),o.start()},pause:function(e){e.timer.clear()},startLive:q({baselineTime:function(e,t){return e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:q((function(e,t){var i=e.baselineTime,o=e.timer,a=e.events;if("ADD_EVENT"===t.type){var s=t.payload.event;a.push(s);var l=s.timestamp<i,c=n(s,l);l?c():o.addAction({doAction:function(){c(),r.emit(p.EventCast,s)},delay:W(s,i)})}return v(v({},e),{events:a})})),addEvents:q((function(e,t){var i,o,a=e.timer,s=e.events,l=e.baselineTime,c=e.lastPlayedEvent;if("ADD_EVENTS"===t.type){var u=t.payload.events;if(Array.isArray(u)&&u.length){s=s.concat(u);var d=le(u,l),f=new Array,h=function(e){if(c&&c.timestamp>l&&(e.timestamp<=c.timestamp||e===c))return"continue";var t=e.timestamp<l;if(t&&!oe(e))return"continue";var i=n(e,t);t?i():f.push({doAction:function(){i(),r.emit(p.EventCast,e)},delay:W(e,l)})};try{for(var m=b(d),g=m.next();!g.done;g=m.next()){var y=g.value;h(y)}}catch(w){i={error:w}}finally{try{g&&!g.done&&(o=m.return)&&o.call(m)}finally{if(i)throw i.error}}r.emit(p.AddEvents),a.addActions(f)}}return v(v({},e),{events:s})}))}});return te(i)}for(var ue=function(e){var t=e.blockClass,n=e.mode,r=["iframe, ."+t+" { background: #ccc }","noscript { display: none !important; }"];return"page"===n&&(r.push(".mem-replayer-show { display: block !important; }"),r.push(".mem-replayer-hide { display: none !important; }"),r.push("::-webkit-scrollbar { display: none; }")),r},de="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pe="undefined"===typeof Uint8Array?[]:new Uint8Array(256),fe=0;fe<de.length;fe++)pe[de.charCodeAt(fe)]=fe;var he=function(e){var t,n,r,i,o,a=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var c=new ArrayBuffer(a),u=new Uint8Array(c);for(t=0;t<s;t+=4)n=pe[e.charCodeAt(t)],r=pe[e.charCodeAt(t+1)],i=pe[e.charCodeAt(t+2)],o=pe[e.charCodeAt(t+3)],u[l++]=n<<2|r>>4,u[l++]=(15&r)<<4|i>>2,u[l++]=(3&i)<<6|63&o;return c},me=new Map;function ve(e,t){var n=me.get(e);return n||(n=new Map,me.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}function ge(e,t,n){var r=this;return function(i){return g(r,void 0,Promise,(function(){var r,o,a,s,l,c,u,d,p,f,h,m,v;return y(this,(function(g){switch(g.label){case 0:return i&&"object"===typeof i&&"rr_type"in i?(n&&(n.isUnchanged=!1),"ImageBitmap"===i.rr_type&&"args"in i?[4,ge(e,t,n)(i.args)]:[3,3]):[3,11];case 1:return a=g.sent(),[4,createImageBitmap.apply(null,a)];case 2:return[2,g.sent()];case 3:return"index"in i?n||null===t?[2,i]:(o=i.rr_type,r=i.index,[2,ve(t,o)[r]]):[3,4];case 4:return"args"in i?(o=i.rr_type,a=i.args,s=window[o],c=(l=s.bind).apply,u=[s],d=[[void 0]],[4,Promise.all(a.map(ge(e,t,n)))]):[3,6];case 5:return[2,new(c.apply(l,u.concat([x.apply(void 0,d.concat([g.sent()]))])))];case 6:return"base64"in i?[2,he(i.base64)]:[3,7];case 7:return"src"in i?(p=e.get(i.src),p?[2,p]:(f=new Image,f.src=i.src,e.set(i.src,f),[2,f])):[3,8];case 8:return"data"in i&&"Blob"===i.rr_type?[4,Promise.all(i.data.map(ge(e,t,n)))]:[3,10];case 9:return h=g.sent(),m=new Blob(h,{type:i.type}),[2,m];case 10:return[3,13];case 11:return Array.isArray(i)?[4,Promise.all(i.map(ge(e,t,n)))]:[3,13];case 12:return v=g.sent(),[2,v];case 13:return[2,i]}}))}))}}function ye(e,t){try{return t===u.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(n){return null}}var be=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function we(e,t){if(null===t||void 0===t?void 0:t.constructor){var n=t.constructor.name;if(be.includes(n)){var r=ve(e,n);r.includes(t)||r.push(t)}}}function xe(e){var t=e.mutation,n=e.target,r=e.type,i=e.imageMap,o=e.errorHandler;return g(this,void 0,Promise,(function(){var e,a,s,l,c,u,d;return y(this,(function(p){switch(p.label){case 0:return p.trys.push([0,2,,3]),e=ye(n,r),e?t.setter?(e[t.property]=t.args[0],[2]):(a=e[t.property],[4,Promise.all(t.args.map(ge(i,e)))]):[2];case 1:return s=p.sent(),l=a.apply(e,s),we(e,l),c=!1,c&&("compileShader"===t.property?e.getShaderParameter(s[0],e.COMPILE_STATUS)||console.warn("something went wrong in replay",e.getShaderInfoLog(s[0])):"linkProgram"===t.property&&(e.validateProgram(s[0]),e.getProgramParameter(s[0],e.LINK_STATUS)||console.warn("something went wrong in replay",e.getProgramInfoLog(s[0]))),u=e.getError(),u!==e.NO_ERROR&&console.warn.apply(console,x(["WEBGL ERROR",u,"on command:",t.property],s))),[3,3];case 2:return d=p.sent(),o(t,d),[3,3];case 3:return[2]}}))}))}function Se(e){var t=e.event,n=e.mutation,r=e.target,i=e.imageMap,o=e.errorHandler;return g(this,void 0,Promise,(function(){var e,a,s,l;return y(this,(function(c){switch(c.label){case 0:return c.trys.push([0,4,,5]),e=r.getContext("2d"),n.setter?(e[n.property]=n.args[0],[2]):(a=e[n.property],"drawImage"!==n.property||"string"!==typeof n.args[0]?[3,1]:(i.get(t),a.apply(e,n.args),[3,3]));case 1:return[4,Promise.all(n.args.map(ge(i,e)))];case 2:s=c.sent(),a.apply(e,s),c.label=3;case 3:return[3,5];case 4:return l=c.sent(),o(n,l),[3,5];case 5:return[2]}}))}))}function Ee(e){var t=e.event,n=e.mutation,r=e.target,i=e.imageMap,o=e.canvasEventMap,a=e.errorHandler;return g(this,void 0,Promise,(function(){var e,s,l,c,d;return y(this,(function(p){switch(p.label){case 0:if(p.trys.push([0,10,,11]),e=o.get(t)||n,s="commands"in e?e.commands:[e],![u.WebGL,u.WebGL2].includes(n.type))return[3,5];l=0,p.label=1;case 1:return l<s.length?(c=s[l],[4,xe({mutation:c,type:n.type,target:r,imageMap:i,errorHandler:a})]):[3,4];case 2:p.sent(),p.label=3;case 3:return l++,[3,1];case 4:return[2];case 5:l=0,p.label=6;case 6:return l<s.length?(c=s[l],[4,Se({event:t,mutation:c,target:r,imageMap:i,errorHandler:a})]):[3,9];case 7:p.sent(),p.label=8;case 8:return l++,[3,6];case 9:return[3,11];case 10:return d=p.sent(),a(n,d),[3,11];case 11:return[2]}}))}))}var Me=1e4,Ce=5e3,Te=3e5,ke=R||i,Ie="[replayer]",_e={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"},Ne={normalSpeed:1,speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"mem-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,mouseTail:_e,forceSkipInactive:!1,mode:"player"},Ae=function(){function e(e,t){var n=this;if(this.mouseTail=null,this.tailPositions=[],this.emitter=ke(),this.normalSpeed=-1,this.legacy_missingNodeRetryMap={},this.unloadStylesheetMap={},this.imageMap=new Map,this.canvasEventMap=new Map,!(null===t||void 0===t?void 0:t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");this.config=Object.assign({},Ne,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.emitter.on(p.Resize,this.handleResize),U(),re(),this.setupDom(),this.treeIndex=new ae,this.fragmentParentMap=new Map,this.emitter.on(p.Flush,(function(){var e,t,r,i,o,a,s=n.treeIndex.flush(),l=s.scrollMap,c=s.inputMap;try{for(var u=b(l.values()),d=u.next();!d.done;d=u.next()){var p=d.value;n.applyScroll(p)}}catch(E){e={error:E}}finally{try{d&&!d.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}try{for(var f=b(c.values()),h=f.next();!h.done;h=f.next()){p=h.value;n.applyInput(p)}}catch(M){r={error:M}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}try{for(var v=b(n.fragmentParentMap.entries()),g=v.next();!g.done;g=v.next()){var y=w(g.value,2),x=y[0],S=y[1];ne.map[S.__sn.id]=S,S.__sn.type===m.Element&&"textarea"===S.__sn.tagName&&x.textContent&&(S.value=x.textContent),S.appendChild(x)}}catch(C){o={error:C}}finally{try{g&&!g.done&&(a=v.return)&&a.call(v)}finally{if(o)throw o.error}}n.fragmentParentMap.clear()})),this.emitter.on(p.EventCast,(function(e){n.timeDisplayer&&(n.timeDisplayer.innerText=ie(new Date(e.timestamp),"yyyy/M/d hh:mm:ss"))})),this.service=ce({events:e.map((function(e){return t&&t.unpackFn?t.unpackFn(e):e})),timer:new $(this.config),speed:(null===t||void 0===t?void 0:t.speed)||Ne.speed,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){e.changed}));var r=this.service.state.context.events,i=r.find((function(e){return e.type===o.Meta})),a=r.find((function(e){return e.type===o.FullSnapshot}));if(i){var s=i.data,l=s.width,c=s.height;this.emitter.emit(p.Resize,{width:l,height:c})}a&&this.rebuildFullSnapshot(a)}return Object.defineProperty(e.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){this.emitter.on(e,t)},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach((function(n){t.config[n]=e[n]})),this.config.skipInactive||(this.normalSpeed=-1),!("normalSpeed"in e)&&"speed"in e&&(this.config.normalSpeed=e.speed),"undefined"!==typ